Closed
Bug 1209852
Opened 9 years ago
Closed 9 years ago
Fix and re-enable scroll-inactive-layers-2.html
Categories
(Core :: Panning and Zooming, defect)
Tracking
()
RESOLVED
FIXED
mozilla44
Tracking | Status | |
---|---|---|
firefox44 | --- | fixed |
People
(Reporter: kats, Assigned: kats)
References
Details
Attachments
(3 files, 4 obsolete files)
30.90 KB,
text/plain
|
Details | |
937 bytes,
patch
|
mstange
:
review+
|
Details | Diff | Splinter Review |
2.10 KB,
patch
|
mstange
:
review+
|
Details | Diff | Splinter Review |
In order to get bug 1143856 landed without spending an infinite amount of time dealing with regressions, I disabled the scroll-inactive-layers-2.html test which was failing intermittently. I need to debug the problem and re-enable the test.
Assignee | ||
Comment 1•9 years ago
|
||
Here's a log with layout.display-list.dump and layers.dump-decisions set to true of when this failed for me locally.
Assignee | ||
Comment 2•9 years ago
|
||
And here's a success log
Assignee | ||
Comment 3•9 years ago
|
||
From what I understand of the no-paint checks, the failing run should still be passing because all of the reftest-no-paint divs are inside inactive layer managers and so they should never get the NS_FRAME_PAINTED_THEBES flag set on them. Not really sure what's going on here but I'll see if I can capture this in rr.
Assignee | ||
Comment 4•9 years ago
|
||
Failure log for which I have an rr trace
Attachment #8668037 -
Attachment is obsolete: true
Assignee | ||
Comment 5•9 years ago
|
||
It looks like it's correctly inside a BasicLayerManager so I'm not really sure why the cdi->mInactiveLayerManager is null.
Assignee | ||
Comment 6•9 years ago
|
||
markus, any ideas on where to go from here? I have an rr trace for it but I don't have a mental model of what the code is supposed to be doing so it's hard for me to say where things go wrong.
Flags: needinfo?(mstange)
Assignee | ||
Updated•9 years ago
|
Attachment #8668038 -
Attachment mime type: text/x-log → text/plain
Assignee | ||
Updated•9 years ago
|
Attachment #8668049 -
Attachment mime type: text/x-log → text/plain
Assignee | ||
Comment 7•9 years ago
|
||
Working backwards a bit more, the LayerState value for the display item 0x2aaac750d970 is LAYER_NONE, so in the FrameLayerBuilder::AddPaintedDisplayItem function it never goes into the block that assigns tempManager.
Assignee | ||
Comment 8•9 years ago
|
||
Discussed with mstange on IRC, apparently I was barking up the wrong tree. The problem here is actually the invalidation; for some reason the entire page is getting repainted on the scroll rather than just the 50-pixel area that is exposed. I ran it again with MOZ_REFTEST_VERBOSE=1 and nglayout.debug.invalidation=true and it looks like there's a race condition between the APZ flush request from the reftest harness and the paint for the scroll offset change. If the scroll offset change happens first everything is fine because the APZ flush request becomes a no-op. However if the APZ flush request gets processed first the invalid area expands and the entire page gets repainted. I'm not yet sure if this is just an artifact of the harness or an actual bug.
Flags: needinfo?(mstange)
Assignee | ||
Comment 9•9 years ago
|
||
Here's a log of what I saw. Note that since the harness runs the same page twice (because it's an == of the test page with itself). In this run the first load of the page is bad because the "apz-repaints-flushed fired" shows up before the nonempty SendUpdateCanvasForEvent (i.e. before the paint happens). The second load of the page is fine.
Attachment #8668038 -
Attachment is obsolete: true
Attachment #8668049 -
Attachment is obsolete: true
Attachment #8668050 -
Attachment is obsolete: true
Assignee | ||
Comment 10•9 years ago
|
||
It happens even without the forced APZ flush from the harness, because APZ might trigger a repaint on its own. The relevant part of the log seems to be this: 0:04.69 ---- PAINT START ----PresShell(0x7ff306a7e500), nsView(0x7ff306b02000), nsIWidget(0x7ff30b7afc80) 0:04.69 Invalidating changes of the visible region bounds of the scrolled contents 0:04.69 Invalidating layer 0x7ff306b06500: < (x=0, y=0, w=786, h=100); (x=0, y=1100, w=786, h=1121); > 0:04.71 ---- PAINT END ---- 0:04.71 Ending ProcessPendingUpdates 0:04.71 REFTEST INFO | [CONTENT] AfterPaintListener in file:///home/kats/zspace/B2G-aries/gecko/layout/reftests/invalidation/scroll-inactive-layers-2.html 0:04.71 REFTEST INFO | [CONTENT] SendUpdateCanvasForEvent with 3 rects 0:04.71 REFTEST INFO | [CONTENT] Rect: 0 -100 786 0 0:04.71 REFTEST INFO | [CONTENT] Rect: 0 0 800 1050 0:04.71 REFTEST INFO | [CONTENT] Rect: 0 1050 786 2121 Note that the invalidated area is (x=0, y=0, w=786, h=100); (x=0, y=1100, w=786, h=1121) which is above and below the visible area, presumably this is from the displayport. However the AfterPaint event has three rects, the second one of which includes the visible area. So I guess something is causing that area to get painted too, but the invaldation reporting isn't reporting it.
Comment 11•9 years ago
|
||
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #9) > (because it's an == of the test page with itself). Oops. It should probably be an != with about:blank, like the more recent invalidation tests I added.
Assignee | ||
Comment 12•9 years ago
|
||
After some more tracing through the code and help from Markus the problem turned out to be that the initial displayport (as set by InitializeRootDisplayport) has zero margins and then after scrolling APZ expands the displayport to be the entire page. This change in displayport area causes an invalidation and repaint. Forcing the displayport to be a fixed size (which is what this patch does) makes the test pass. I will file a follow-up bug about the extra invalidation/repaint on growing the displayport since that seems like something we should avoid as well.
Attachment #8668476 -
Flags: review?(mstange)
Assignee | ||
Comment 13•9 years ago
|
||
Try push at https://treeherder.mozilla.org/#/jobs?repo=try&revision=1b3fd3c319bb
Attachment #8668477 -
Flags: review?(mstange)
Updated•9 years ago
|
Attachment #8668476 -
Flags: review?(mstange) → review+
Updated•9 years ago
|
Attachment #8668477 -
Flags: review?(mstange) → review+
Comment 14•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/2b27e3f1780d https://hg.mozilla.org/integration/mozilla-inbound/rev/ba7cdf401f27
Comment 15•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/2b27e3f1780d https://hg.mozilla.org/mozilla-central/rev/ba7cdf401f27
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox44:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in
before you can comment on or make changes to this bug.
Description
•