Avoid nested async zoom containers
Categories
(Core :: Panning and Zooming, enhancement, P3)
Tracking
()
People
(Reporter: botond, Assigned: botond)
References
(Blocks 4 open bugs)
Details
(Whiteboard: [fission-])
Attachments
(1 file)
We can currently get nested async zoom containers in some scenarios, namely OOP iframes, and desktop zooming + RDM. (See bug 1533607 comment 3 for details.)
We don't want nested async zoom containers, as they upset APZ assumptions.
To solve this:
-
For OOP iframes, we don't want iframes to build an async zoom container, only the top-level content document.
-
For desktop zooming + RDM, we do want the document inside the RDM to get an async zoom container, but not the enclosing document.
Once we implement the above changes, the check added in bug 1533607 can be made stricter by removing the escape hatch for nested async zoom containers.
Assignee | ||
Comment 1•5 years ago
|
||
This doesn't need to block containerless scrolling, but it does need to block OOP iframes and desktop zooming.
Assignee | ||
Comment 2•5 years ago
|
||
(I haven't come across a scenario where we can get multiple async zoom containers which are not nested, but that's something we don't want either, and should include in our check.)
Comment 3•5 years ago
|
||
You may know of this, but nsPresContext::IsRootContentDocumentCrossProcess() might be helpful here [1].
[1] https://searchfox.org/mozilla-central/source/layout/base/nsPresContext.h#971
Updated•5 years ago
|
Comment 4•5 years ago
|
||
(In reply to Botond Ballo [:botond] from comment #0)
- For desktop zooming + RDM, we do want the document inside the RDM to get an async zoom container, but not the enclosing document.
I also believe bug 1562503 covers the RDM use case since RDM uses 'iframe mozbrowser' . So one remaining thing here is to enable the assertion in APZCTreeManager.cpp? A test case landed in bug 1562503 covers the OOPIF case, we might want a dedicated test case for the RDM case along with enabling the assertion?
Comment 5•5 years ago
|
||
I was wrong. There are still multiple async zoom containers in fission world. https://treeherder.mozilla.org/#/jobs?repo=try&selectedJob=255392462&revision=00591cc169ca7a728a5e1674d6938a10f6009b9c
Comment 6•4 years ago
|
||
Botond, do we need to fix this bug for the Fission MVP release?
Tentatively tracking for Fission Nightly (M6)
Assignee | ||
Comment 7•4 years ago
|
||
(In reply to Chris Peterson [:cpeterson] from comment #6)
Botond, do we need to fix this bug for the Fission MVP release?
The fission part, yes. The RDM part only needs to block desktop zooming.
The fission part should be easy to fix; I'll post a fix here, and spin off the RDM part into another bug.
Assignee | ||
Comment 8•4 years ago
|
||
Actually, even for Fission, it only needs to block it on mobile (or with desktop zooming).
Assignee | ||
Comment 9•4 years ago
|
||
Oh, it looks like I've already split out the fission part into bug 1540298. It would make sense to track that for M6, rather than this bug.
Assignee | ||
Comment 10•4 years ago
|
||
Moved M6 tracking flag to bug 1540298.
Comment 11•4 years ago
|
||
(In reply to Botond Ballo [:botond] from comment #8)
Actually, even for Fission, it only needs to block it on mobile (or with desktop zooming).
(In reply to Botond Ballo [:botond] from comment #9)
Oh, it looks like I've already split out the fission part into bug 1540298. It would make sense to track that for M6, rather than this bug.
Thanks for updating the bugs.
btw, "Fission MVP" is desktop only. Android Fission will follow soon after desktop. (Android will require some more memory optimizations.)
Comment 12•4 years ago
|
||
(In reply to Botond Ballo [:botond] from comment #9)
Oh, it looks like I've already split out the fission part into bug 1540298. It would make sense to track that for M6, rather than this bug.
Setting [fission-]
whiteboard tag so we don't track this bug for Fission MVP.
Assignee | ||
Comment 13•4 years ago
|
||
A few relevant things that I discovered:
- Even if we don't get nested async zoom containers, we can get nested root content documents (RCDs), which is conceptually just as wrong, and is caught by an existing assertion (tracked in bug 1610657). The fix for the two is likely to be the same (use some logic to suppress both the RCD annotation and the async zoom container on the document that's currently getting the outer RCD annotation).
- Bug 1549775 (enabled locally by setting
devtools.responsive.browserUI.enabled=true
) partially fixes bug 1610657. It probably makes sense to continue investigating these issues with that change in place.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 14•4 years ago
|
||
(In reply to Botond Ballo [:botond] from comment #2)
(I haven't come across a scenario where we can get multiple async zoom containers which are not nested, but that's something we don't want either, and should include in our check.)
We've now ran into such a case (in bug 1650868) and Kats has convinced me that we should move in the direction of allowing multiple non-nested (sibling) async zoom containers, so I'm reducing the scope of this bug to cover nested async zoom containers only.
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 15•3 years ago
|
||
It's not clear to me which scenarios (Fission, RDM, or both) remain affected. Let's do a try push with the assertion enabled and see:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=c8b362c6535bdc65206c3c574fe39277238199c8
Assignee | ||
Comment 16•3 years ago
|
||
Not seeing any failures! I expect the Fission part was fixed by bug 1540298 and the RDM part by bug 1549775.
All that's left to do here is enable the assertion.
Assignee | ||
Comment 17•3 years ago
|
||
Comment 18•3 years ago
|
||
Pushed by bballo@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/830d0f0a9fdc Enable assertion about nested async zoom containers. r=tnikkel
Comment 19•3 years ago
|
||
bugherder |
Updated•3 years ago
|
Description
•