Closed
Bug 1499961
Opened 7 years ago
Closed 7 years ago
RestyleManager's RecomputePosition may not move reflow roots
Categories
(Core :: Layout, defect, P3)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla65
People
(Reporter: mozbugz, Assigned: mozbugz)
References
Details
Attachments
(2 files)
If a frame gets repositioned, RecomputePosition will bail out if that frame has a view or child with view, in which case a reflow is forced:
https://searchfox.org/mozilla-central/rev/eef79962ba73f7759fd74da658f6e5ceae0fc730/layout/base/RestyleManager.cpp#729-736
But if this frame is a reflow root, then the next reflow will only start at this root and therefore the frame will not actually be moved (as it is the job of its parent).
Passing nsChangeHint_ReflowChangesSizeOrPosition should be enough to reflow at least the parent of that potential root, and therefore handle the position change.
There are a couple more of these later in the function.
| Assignee | ||
Comment 1•7 years ago
|
||
If a frame cannot be repositioned, the reflow request should hint at the
position change, so that if that frame is a reflow root, the next reflow won't
just start from there and ignore the new position.
| Assignee | ||
Comment 2•7 years ago
|
||
| Assignee | ||
Comment 3•7 years ago
|
||
This test would fail with the upcoming bug 1159042 (dynamic reflow roots),
without the RecomputePosition fix in the next patch.
Updated•7 years ago
|
Attachment #9018141 -
Attachment description: Bug 1499961 - Indicate size-change reflow hint when RecomputePosition() bails out - r?dbaron → Bug 1499961 - Indicate position-change reflow hint when RecomputePosition() bails out - r?dbaron,heycam
| Assignee | ||
Comment 4•7 years ago
|
||
Notes:
The test still has a lot of boilerplate from test_intersectionObservers.html. I decided to keep it, to help with expanding the test later on, to cover more of the new reflow roots.
I've tested locally that:
- The test alone passes -- there are no fancy reflow roots yet.
- It passes with the RecomputePosition patch, as there's nothing to fix yet, but at least it's not worse. Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=e7f7ea7b6c300928c37308f20b007a8b018d271e
- It fails on top of WIP bug 1159042, proving that it catches the issue.
- It passes again with both bug 1159042 and the RecomputePosition patch, showing that the patch does its job.
Pushed by gsquelart@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4e0347c2ced9
Regression test for future movable reflow roots - r=dbaron
Pushed by gsquelart@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/26666002fbe3
Indicate position-change reflow hint when RecomputePosition() bails out - r=dbaron,heycam
Comment 7•7 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/4e0347c2ced9
https://hg.mozilla.org/mozilla-central/rev/26666002fbe3
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox65:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Updated•7 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•