Closed Bug 1510369 Opened 6 years ago Closed 5 years ago

Add a pref to control dynamic reflow roots

Categories

(Core :: Layout, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla66
Tracking Status
firefox65 --- wontfix
firefox66 --- fixed

People

(Reporter: dholbert, Assigned: dholbert)

References

Details

Attachments

(3 files)

I think we should add an about:config pref to control whether we allow frames to become Dynamic Reflow Roots (basically just to control the flag-setting in the final patch of bug 1159042).

This will let us:
 - quickly triage regressions to determine whether or not Dynamic Reflow Roots are the cause.
 - easily turn off the feature if it's got late-breaking regressions that turn up  that we can't fix before it hits release.
 - (more importantly) turn it off without backing out the rest of the code in bug 1159042, which will mean we can still potentially ship the optimization for 'contain:layout+size' in bug 1497414 even if we've got some edge cases to sort out around dynamic reflow roots.

I suggest we name the pref "layout.dynamic-reflow-roots.enabled", and we can probably have it default to true for the time being.
This patch does not change behavior - it's purely an optimization to some
existing logic.

Depends on D13131
Thanks for the review!

Obviously, this layers on top of the patches from bug 1159042, so I'll land this after that bugs' patches have stuck.

Also FWIW, I verified that this patch does let me flip the pref to fix the testcase in bug 1510360.  (i.e. I verified that the pref does indeed allow you to turn off dynamic reflow roots.)
Pushed by dholbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1be689a1973e
part 1: Make IsFixedPosContainingBlock assert that all fixed-pos CBs must also be abs-pos CBs. r=dbaron
https://hg.mozilla.org/integration/autoland/rev/e5ea5b3e4d0d
part 2: Adjust logic in InitDynamicReflowRoot() to stop checking conditions once we've determined we can't be a dynamic reflow root. r=dbaron
https://hg.mozilla.org/integration/autoland/rev/563996e91860
part 3: Add about:config pref 'layout.dynamic-reflow-roots.enabled' (enabled by default). r=dbaron
Blocks: 1527120
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: