Checkerboarding on gmail "forward" page with maximized sub-window
Categories
(Core :: Panning and Zooming, defect, P3)
Tracking
()
People
(Reporter: mayankleoboy1, Assigned: hiro)
References
(Regressed 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(5 files, 1 obsolete file)
go to gmail
open a relatively longis email
click on "forward"
- A reply windowpane will appear at the bottom of the page*.
Click to maximize/"pop-out" the window to a pane
Click to maximize/"pop-out" it again
Scroll
ER: No checkerboard
AR: Checkerboard
RENDERTRACE 0.0159 rect red 0 0 1161 2428.67 // viewport
RENDERTRACE 16.5699 rect red 0 0 1161 2428.67 // viewport
RENDERTRACE 21.2076 rect brown 0 0 1161 2428.67 // page
RENDERTRACE 21.2077 rect lightgreen 0 1627.33 1161 801.333 // painted displayport (this layertree updated)
RENDERTRACE 33.1733 rect red 0 0 1161 2428.67 // viewport
RENDERTRACE 49.8013 rect red 0 0 1161 2428.67 // viewport
-- checkerboarding starts below --
RENDERTRACE 66.5649 rect red 0 0 1161 2428.67 // viewport
RENDERTRACE 71.6067 rect brown 0 0 1161 2428.67 // page
RENDERTRACE 71.6255 rect lightgreen 0 1075.33 1161 801.333 // painted displayport (this layertree updated)
Checkerboarded for 1 frames (17.064 ms), 198531 peak, 1819 severity.
A profile from the profiler didnt show any activity on any thread, and the same was also corroborated by looking at Task Manager. (Not sharing the profile due to privacy concern)
I am happy to provide any logging etc.
| Reporter | ||
Comment 1•3 years ago
|
||
| Reporter | ||
Comment 2•3 years ago
|
||
could also repro from a build from Jan22, so not a recent regression
| Reporter | ||
Comment 3•3 years ago
|
||
Comment 4•3 years ago
|
||
-> enabling fission caused this.
With fission prefed on bug 1675547 is the regressor.
Interestingly if I turn off fission but set apz.wr.activate_all_scroll_frames to true then the bug still reproduces.
Testing in a 2021-01-01 build with fission disabled, webrender disabled, but apz.nonwr.activate_all_scroll_frames=true then I cannot reproduce the bug.
Updated•3 years ago
|
Comment 5•3 years ago
|
||
Set release status flags based on info from the regressing bug 1675547
Updated•3 years ago
|
Comment 6•3 years ago
|
||
The severity field is not set for this bug.
:botond, could you have a look please?
For more information, please visit auto_nag documentation.
Comment 7•3 years ago
|
||
S3 for a temporary checkerboarding issue that's not a recent regression.
Updated•3 years ago
|
Updated•3 years ago
|
Updated•2 years ago
|
Comment 8•2 years ago
|
||
I haven't been able to reproduce this so far. Mayank, could you kindly check if you can still see this in a recent nightly?
Comment 9•2 years ago
|
||
I can still reproduce in latest nightly.
Comment 10•2 years ago
|
||
(In reply to Timothy Nikkel (:tnikkel) from comment #9)
I can still reproduce in latest nightly.
Thanks. A few follow-up questions:
- Are you testing using PanGestureInput (touchpad scrolling)?
- Are you maximizing the popped-out compose window, or is the issue otherwise dependent on its height?
- Is there perhaps a particular dev-platform email on which you see this, so that I can try the same one?
Comment 11•2 years ago
|
||
Update: I do see the checkerboarding on Windows (previously I was testing on Linux), so I guess there is some sort of platform difference relevant to the issue. (I'm kind of curious what the difference is.)
Comment 12•2 years ago
|
||
A couple of additional updates:
- Even on Windows, I only see checkerboarding while the pop-out window is loading, not once it's completely loaded.
- On the other hand, about:checkerboard thinks that checkerboarding happens (albeit often at low severity) on both Linux and Windows even in situations when I don't perceive it.
| Assignee | ||
Comment 13•2 years ago
|
||
I did debug the case a bit, but I am confused so much. In the poped-out content there are two scroll containers, an outer scroll container and an inner one, and the inner one is overflow-y: hidden. And the checkerboarding happens on the inner overflow-y: hidden one. Gmail scrolls the inner scroll container in response to outer scrolling? Indeed there are two scroll event listeners on the outer one. I'd hope I am seeing something wrong.
| Assignee | ||
Comment 14•2 years ago
|
||
One thing I realized is, in this Gmail's case the poped-out content is resized so the displayport should be changed, but it isn't reflected to the corresponding APZC since we don't update the displayport in NotifyLayersUpdated. Though with updating the displayport in NotifyLayersUpdated I can still see checkerboarding.
| Assignee | ||
Comment 15•2 years ago
•
|
||
Once after you clicked "change" button in the contents, you can see checkerboarding there.
A key factor to reproduce this issue is making a sub scroll container be non-scrollable by expanding the container size. Even after becoming non-scrollable, the corresponding APZC keeps alive in APZCTree, and I guess it somehow mis-behaves?
EDIT: Looks like you shouldn't scroll the container before clicking the button to reproduce the issue.
| Assignee | ||
Comment 16•2 years ago
|
||
(Note I am focusing on checkerboarding persists for a while you can see it on the recording in comment 3 at the last couple of seconds)
So the checkerboarding is caused by this RestrictToRootDisplayPort call. Due to this call, the displayport is smaller than it should be. The displayport it should be I mean is the one where the inner scroll container is originally expanded.
There are a couple of things I've learned.
The reason why no checkerboarding happens if the scroll container is expanded in the first place is;
- the container is not scrollable by APZ, thus there's no nsGkAtoms::DisplayPort and no nsGkAtoms::DisplayPortMargins
- thus we don't use the
RestrictedToRootDisplayPortas*aVisibleRect
The reason why no checkerboarding happens before expanding the container is;
- the container is scrollable by APZ thus
MinimalDisplayPortproperty is immediately removed - thus we fall into this else branch so that the displayport is big enough
The reason why checkerboarding happens after expanding the container is;
- it's a MinimalDisplayPort case
- we fall into this else if branch so that the displayport is small because of no margins
Given that if the container is expanded in the first place we don't apply RestrictedToRootDisplayPort, I'd like to fix this bug by skipping RestrictedToRootDisplayPort if the container is not scrollable by APZ even if there's valid nsGkAtoms::DisplayPort and nsGkAtoms::DisplayPortMargins.
| Assignee | ||
Comment 17•2 years ago
|
||
| Assignee | ||
Comment 18•2 years ago
|
||
Depends on D189322
Updated•2 years ago
|
Updated•2 years ago
|
| Assignee | ||
Comment 19•2 years ago
|
||
Updated•2 years ago
|
| Assignee | ||
Comment 20•2 years ago
|
||
Looks like we try to build display items without the primary frame of a scroll container during running test_bug1369072.html . see https://treeherder.mozilla.org/logviewer?job_id=431108875&repo=try&lineNumber=5510
In the test we actually call DecideScrollableLayer even if the target element is in display:none subtree. That's totally odd. There's definitely something messed up because the scroll frame (HTMLSrollFrame) is there!
Comment 21•2 years ago
|
||
Woah, that seems very weird. Very curious what is going on.
| Assignee | ||
Comment 22•2 years ago
|
||
Okay I did track down the case.
So in the case of root scrollable frame, we do create the frame by this SetUpDocElementContainingBlock(aDocElement) call in nsCSSFrameConstructor::ConstructDocElementFrame and then bail out from ConstructDocElementFrame if display style value is none. And later in the ConstructDocElementFrame we do set the primary frame. This is the reason why the nsIContent has no primary frame but have the HTMLScrollFrame.
I am going to add a bailing out code from WillUseEmtpryDisplayPortMarings if the primary frame is nullptr.
Comment 23•2 years ago
|
||
Comment 24•2 years ago
|
||
Backed out changeset 413c83e8ccda (Bug 1781007) for causing mochitest failures at test_group_checkerboarding.html.
Backout: https://hg.mozilla.org/integration/autoland/rev/a7702515d4fcfa0f818f50d8e7551159c2229bc5
Failure log: https://treeherder.mozilla.org/logviewer?job_id=431241479&repo=autoland&lineNumber=10112
Updated•2 years ago
|
Comment 25•2 years ago
|
||
(In reply to Hiroyuki Ikezoe (:hiro) from comment #22)
So in the case of root scrollable frame, we do create the frame by this
SetUpDocElementContainingBlock(aDocElement)call in nsCSSFrameConstructor::ConstructDocElementFrame and then bail out fromConstructDocElementFrameif display style value isnone. And later in theConstructDocElementFramewe do set the primary frame. This is the reason why the nsIContent has no primary frame but have the HTMLScrollFrame.
Ah, so it's the case of the root scroll frame, where the primary frame is a little tricky in comparison to non-root scroll frames, I was wondering if maybe that was it.
This comment explains the setup
The primary frame is the "root element frame" which doesn't get constructed in this display none case. And the nsHTMLScrollFrame is an ancestor, and is the same the content element, but it is not the primary frame.
This is what we have the function nsLayoutUtils::FindScrollableFrameFor for
Although in this case it doesn't really matter because we are just getting the presshell via the frame and don't care about the frame.
| Assignee | ||
Comment 26•2 years ago
|
||
So the test I added also catches normal checkerboarding which is not in the scope of this bug. I pushed a comparison test run that the sub scroll in question isn't expanded. https://treeherder.mozilla.org/jobs?repo=try&revision=cd70dfff8e7886890e496d73db87e0d3289e9d03 , the test actually fails.
I will change the test not to use assertNotCheckerboarded.
Comment 27•2 years ago
|
||
Comment 28•2 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/58b8f7f43ab7
https://hg.mozilla.org/mozilla-central/rev/e5788bc62ef8
Updated•2 years ago
|
Updated•2 years ago
|
Reproducible on a 2023-06-19 Nightly build on macOS 12 using the testcase provided in Comment 15.
Verified as fixed on Firefox 120.0b8 and Nightly 121.0a1 on macOS 12, Windows 10, Ubuntu 22.
Description
•