Closed Bug 1765966 Opened 2 years ago Closed 2 years ago

don't call CalculateScrollableRectForFrame in UpdateCompositionBoundsForRCDRSF if we don't need to

Categories

(Core :: Layout: Scrolling and Overflow, task)

task

Tracking

()

RESOLVED FIXED
101 Branch
Tracking Status
firefox101 --- fixed

People

(Reporter: tnikkel, Assigned: tnikkel)

References

Details

Attachments

(1 file)

We only use the value to modify shouldSubtractDynamicToolbar and we only use that with a dynamic toolbar.

This saves us some time and also prevents a circular dependency when reflowing a scroll frame. nsHTMLScrollFrame::TryLayout calls nsLayoutUtils::CalculateCompositionSizeForFrame

https://searchfox.org/mozilla-central/rev/6da1ebe13b260efabd88eb98dec5fa8ee65987b2/layout/generic/nsGfxScrollFrame.cpp#616

and then nsLayoutUtils::UpdateCompositionBoundsForRCDRSF calls GetScrolledRect, but reflow can determine the scrolled rect (presence/absence of scrollbars affect it for example).

But this also prevents us from hitting the warning of bug 1695139 in the case of a google search results page as one example, because we are getting the scrolled rect while we might be in an inconsistent state during reflow.

Assignee: nobody → tnikkel
Status: NEW → ASSIGNED
Pushed by tnikkel@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4dfec522e1eb
Don't call CalculateScrollableRectForFrame in UpdateCompositionBoundsForRCDRSF if we don't need to. r=emilio
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 101 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: