Simplify PresShell::ResizeReflowIgnoreOverride.
Categories
(Core :: Layout, task)
Tracking
()
People
(Reporter: emilio, Assigned: emilio)
References
Details
(Whiteboard: [geckoview:m1909])
Attachments
(4 files)
I want this to:
- Thread all the resizes via that (this includes allowing it to not flush).
- Making it less scary to touch in general.
| Assignee | ||
Comment 1•6 years ago
|
||
This avoids doing wasted work and sending spurious resize
events if this case would be hit.
In practice, it cannot be hit yet, I think, because
callers do check for this and bail out earlier. But
there's no assertion to that respect so this shouldn't
hurt.
| Assignee | ||
Comment 2•6 years ago
|
||
This is much easier than the existing ResizeReflowIgnoreOverride function, and
this will allow me to avoid flushing if needed (we already kinda do that
already with the "suppressResizeReflow" thing), which in turn allows me to
consolidate a bunch of the logic for resizes.
The function should be much easier to follow:
- Set the new viewport (async, doesn't do any work).
- Invalidate layout as needed due to the viewport change (that is, resize hint
for the root frame, and invalidate isizes if needed). Also async and doesn't
do any reflowing itself. - Flush layout / do the reflowing all at once. I think we can stop doing this
much more often now, but that's follow-up work.
| Assignee | ||
Comment 3•6 years ago
|
||
Now that this code path is on its own, we can write more straight-forward code.
| Assignee | ||
Comment 4•6 years ago
|
||
Going to try landing these as incrementally as possible since this code is non-trivial.
Comment 6•6 years ago
|
||
| bugherder | ||
Updated•6 years ago
|
| Assignee | ||
Comment 7•6 years ago
|
||
We have an optimization to avoid an expensive reflow from SetFullZoom, see
mSuppressResizeReflow1.
That was done because we used to do a full synchronous reflow right after. We no
longer do that, but due to that member we also don't invalidate!
My second patch in this bug changes the behavior of that flag so that we don't
synchronously reflow, but we do invalidate. So in turn this test before the
change wasn't really testing the zoomed code-path since it was using the clean
layout from before the zoom operation.
a11y getBounds and co. don't flush layout (they probably should), but since with
my patch we dirty the frame tree, and dirty frames return bogus offsets, the
test starts failing.
Flush layout explicitly to ensure we're testing the zoomed code path.
| Assignee | ||
Updated•6 years ago
|
Comment 9•6 years ago
|
||
| bugherder | ||
Comment 10•6 years ago
|
||
Adding this bug to GV's September sprint because it blocks Fenix image bug 1551659.
Comment 11•6 years ago
|
||
| bugherder uplift | ||
Comment 12•6 years ago
|
||
Waiting for a response to https://phabricator.services.mozilla.com/D43799#inline-273207
| Assignee | ||
Comment 13•6 years ago
|
||
Yeah, sorry, I'll be on PTO until Thursday. I replied, but I'll update the patch following your suggestions before re-requesting review.
Comment 14•6 years ago
|
||
Yep, no problem. Thank you for following up!
Comment 15•6 years ago
|
||
Comment 16•6 years ago
|
||
| bugherder | ||
Comment 17•6 years ago
|
||
| Assignee | ||
Updated•6 years ago
|
Comment 18•6 years ago
|
||
| bugherder | ||
Updated•6 years ago
|
Description
•