Fix perf regression in LayoutBoxModelObject::RelativePositionOffset()

In r597543 we introduced a performance regression
due to the changes in LayoutBoxModelObject::RelativePositionOffset().
One of the main differences is that AvailableHeight|Width()
was called always as part of the method,
while that was not the case before.

This patches moves the calls to AvailableHeight|Width()
to the moment where they are needed, trying to minimize
the impact in performance and come back to previous numbers.

No new tests as it's already covered by existent ones.


Change-Id: Id8aaba4736a821af9f401492206840c12a2be0e6
Commit-Queue: Manuel Rego <>
Reviewed-by: Javier Fernandez <>
Cr-Commit-Position: refs/heads/master@{#599034}
1 file changed