Use nsChangeHint_UpdateComputedBSize to properly set the IsBResize() flag on reflow input
Categories
(Core :: Layout, defect, P2)
Tracking
()
People
(Reporter: bzbarsky, Assigned: dbaron)
References
(Blocks 4 open bugs, Regressed 2 open bugs)
Details
(Keywords: perf, perf:responsiveness, Whiteboard: [layout-sydney-2018])
Attachments
(4 files, 1 obsolete file)
Updated•8 years ago
|
Updated•8 years ago
|
Comment 1•8 years ago
|
||
Comment 2•8 years ago
|
||
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Comment 3•7 years ago
|
||
Comment 4•7 years ago
|
||
Comment 5•7 years ago
|
||
Comment 6•7 years ago
|
||
Comment 7•7 years ago
|
||
Reporter | ||
Comment 8•7 years ago
|
||
Comment 9•7 years ago
|
||
Comment 10•7 years ago
|
||
Updated•7 years ago
|
Comment 11•7 years ago
|
||
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Updated•6 years ago
|
Comment 12•6 years ago
|
||
Comment 13•6 years ago
|
||
Updated•6 years ago
|
Comment 14•6 years ago
|
||
Updated•6 years ago
|
Comment 15•6 years ago
|
||
Comment 16•6 years ago
|
||
Comment 17•6 years ago
|
||
Updated•6 years ago
|
Updated•6 years ago
|
Comment 18•6 years ago
|
||
Here's the same WIP patch (attachment 9002997 [details] [diff] [review]), rebased to tip.
I tested to see if it helps with bug 1403656, but unfortunately it does not (the latest testcase there still crashes in a build with this rebased patch). Not entirely surprising, given comment 14's note about this not (yet) fixing perf issues.
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Comment 19•6 years ago
|
||
Going to get this on our backlog for Q3.
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 20•6 years ago
|
||
I merged this to tip again, made a bunch of revisions, and pushed to try to see what things look like.
Assignee | ||
Comment 21•6 years ago
|
||
And for comparison, here's a try run before my additional changes. If the differences between the runs are interesting, it might be worth separating out the change from ConvertsToPercentage()
to HasPercent()
(which I think is obviously correct) from the other changes.
Assignee | ||
Comment 22•6 years ago
|
||
Those two try runs had an identical set of failures: multicol-zero-height-001.xht
(two copies), layout/tables/reftests/1031934.html
, and layout/reftests/bugs/1263845.html
.
Assignee | ||
Comment 23•6 years ago
|
||
The failure of layout/tables/reftests/1031934.html
is, I think, a separate incremental reflow bug that needs to be fixed. The failure (a) goes away if I add html { overflow-y: scroll }
to suppress the horizontal resize that happens when we initially try reflowing with a scrollbar and (b) happens when (with the patch only) I resize the width of the page. I suspect there's something in the handling of visibility:collapse
that assumes that the entire table has been reflowed and goes wrong if it hasn't been.
Assignee | ||
Comment 24•6 years ago
|
||
At this point I've nearly fixed all of the test failures (2 of the 3 as separate bugs, one of which I still need to write the patch for but I'm pretty sure I know what will work; 1 as a revision to the patch here). There's still the issue that this doesn't fix one of the performance problems it was expected to fix. It does, however, fix some correctness issues and I might try to get it landed once I clean up the patch and write the necessary tests.
Assignee | ||
Comment 25•6 years ago
|
||
On top of the fixes for bug 1564308 and bug 1564649, I believe this will now pass all tests.
Although I don't think (though I should double-check with the latest revisions, but I think it's unlikely to have changed) this fixes the bug (bug 1348848) that it was intended to fix, it does:
- fix known correctness bugs
- optimize cases to reflow less where we were previously reflowing more than needed (as shown by the fact that those optimizations uncovered two existing bugs shown in our existing tests -- the ones listed in the previous paragraph -- where I could modify the tests so they showed the bugs today)
Thus I think it's worth landing this as it is so far, and then digging in to bug 1348848 as a followup.
Assignee | ||
Comment 26•6 years ago
|
||
Co-authored-by: L. David Baron <dbaron@dbaron.org>
Co-authored-by: Chris Pearce <cpearce@mozilla.com>
Assignee | ||
Comment 27•6 years ago
|
||
This reduces a bit of code complexity, fixes bugs where we weren't
reflowing enough, and optimizes additional cases that we couldn't
optimize in the past.
Co-authored-by: Chris Pearce <cpearce@mozilla.com>
Co-authored-by: L. David Baron <dbaron@dbaron.org>
Depends on D37609
Assignee | ||
Comment 28•6 years ago
|
||
Oh, and the test fix that was part of this bug rather than a separate bug was the fix for layout/reftests/bugs/1263845.html
which I ended up fixing by moving the clearing of the flag to nsFrame::DidReflow
. For a description of that test fix, see the comments in the main patch in both ReflowInput::InitResizeFlags
(referencing nsBlockReflowContext::ComputeCollapsedBStartMargin
, which was the problem in that case) and nsFrame::DidReflow
.
Assignee | ||
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Assignee | ||
Comment 29•6 years ago
|
||
Here's a new try run rebased on top of the dependent bugs.
Comment 30•6 years ago
|
||
Assignee | ||
Comment 31•6 years ago
|
||
Also, for the record, I should note that I believe that on 32-bit systems this patch increased the size of nsIFrame
by a word. If I'm looking at things correctly, it shouldn't have changed anything on 64-bit systems, though. I'm not aware of spare bits we have elsewhere, though, and I've been saying for a while that we shouldn't be overly conservative about adding 1-bit member variables to nsIFrame
despite that at some point (now) it will increase the size of frames by a word.
Assignee | ||
Comment 32•6 years ago
|
||
Oops, I think it increased the size by a word on both 32-bit and 64-bit. (I misread mOverflow
as a struct
when it's actually a union
.)
Comment 33•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/27bcd63fde99
https://hg.mozilla.org/mozilla-central/rev/05f675735d39
Updated•6 years ago
|
Assignee | ||
Comment 35•5 years ago
|
||
I filed bug 1586175 to back this bug out for Firefox 70 (only) in order to give us more time to fix regression bug 1584018.
Updated•3 years ago
|
Description
•