Basic support for APZ zooming with containerless scrolling
Categories
(Core :: Panning and Zooming, enhancement, P3)
Tracking
()
People
(Reporter: mstange, Assigned: botond)
References
Details
(Whiteboard: [gfx-noted][geckoview:p3])
Attachments
(9 files, 6 obsolete files)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
Assignee | ||
Updated•7 years ago
|
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Assignee | ||
Updated•7 years ago
|
Comment 6•7 years ago
|
||
Assignee | ||
Updated•7 years ago
|
Assignee | ||
Updated•7 years ago
|
Assignee | ||
Comment 7•7 years ago
|
||
Assignee | ||
Comment 8•7 years ago
|
||
Assignee | ||
Comment 9•7 years ago
|
||
Assignee | ||
Comment 10•7 years ago
|
||
Assignee | ||
Comment 11•7 years ago
|
||
Assignee | ||
Updated•7 years ago
|
Assignee | ||
Updated•7 years ago
|
Assignee | ||
Updated•7 years ago
|
Assignee | ||
Comment 12•7 years ago
|
||
Assignee | ||
Comment 13•7 years ago
|
||
Assignee | ||
Comment 14•7 years ago
|
||
Comment 15•7 years ago
|
||
Reporter | ||
Comment 16•7 years ago
|
||
Assignee | ||
Comment 17•7 years ago
|
||
Comment 18•7 years ago
|
||
Reporter | ||
Comment 19•7 years ago
|
||
Reporter | ||
Comment 20•7 years ago
|
||
Assignee | ||
Comment 21•7 years ago
|
||
Assignee | ||
Updated•7 years ago
|
Assignee | ||
Comment 22•7 years ago
|
||
Assignee | ||
Comment 23•7 years ago
|
||
Assignee | ||
Comment 24•7 years ago
|
||
Assignee | ||
Comment 25•7 years ago
|
||
Assignee | ||
Comment 26•7 years ago
|
||
Assignee | ||
Comment 27•7 years ago
|
||
Reporter | ||
Comment 28•7 years ago
•
|
||
Oh dear, the scopes of things in that function are utterly inscrutable. No, this change of scopes was definitely not an intended effect of the patch. We need to change the scoping such that the AutoCurrentScrollParentIdSetter
gets destroyed in the same spot as before, i.e. ideally just before the
if (mWillBuildScrollableLayer && aBuilder->IsPaintingToWindow()) {
aBuilder->ForceLayerForScrollParent();
}
block. I hope this doesn't conflict with any of the other scope changes that the patch made.
In terms of outside-to-inside wrapping of things, I think we want the following order:
- Viewport clip, affects:
- optional
nsDisplayAsyncZoom
container item, wraps:- optional
nsDisplayScrollInfoLayer
- scroll parent ID setter, affects:
asrSetter
, affects:- the items which are built in the call to
mOuter->BuildDisplayListForChild
.
- the items which are built in the call to
- optional
- optional
So really, the only scope change that this patch wants to make is to have a scope for the nsDisplayAsyncZoom
for which the following are true:
- The asrSetter is not on the stack, and
- The Viewport clip is on the stack.
The rest should stay the same.
Assignee | ||
Comment 29•7 years ago
|
||
(In reply to Markus Stange [:mstange] from comment #28)
In terms of outside-to-inside wrapping of things, I think we want the following order:
- Viewport clip, affects:
- optional
nsDisplayAsyncZoom
container item, wraps:
- optional
nsDisplayScrollInfoLayer
- scroll parent ID setter, affects:
asrSetter
, affects:
- the items which are built in the call to
mOuter->BuildDisplayListForChild
.
Assuming the "viewport clip" is this, that's not consistent with the current state of things! Currently, the viewport clip does not affect the optional nsDisplayScrollInfoLayer
(the viewport clip goes out of scope here, and the nsDisplayScrollInfoLayer
is only built here).
Assignee | ||
Comment 30•7 years ago
|
||
(Answered in person. As the optional scroll info layer is currently outside the viewport clip, it can remain outside the viewport clip and the async zoom container.)
Assignee | ||
Comment 31•7 years ago
|
||
I have a patch series that passes Try (without flipping the pref). I will split it into two parts to keep the size of the patch series manageable (because of moz-phab performance issues and such): the Layout parts in bug 1521644, and the APZ parts here.
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Assignee | ||
Comment 32•7 years ago
|
||
APZ patches now cleaned up:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=ef94da9876f546a5dc57d15f82da46d3b36ac597
Assignee | ||
Comment 33•7 years ago
|
||
(In reply to Botond Ballo [:botond] from comment #22)
Get things into a state where we can enable containerless
scrolling on nightly. This will include fixing scrollbar
rendering, and getting tests to pass with it enabled.I'll do this in separate bugs.
Scrollbar rendering is tracked in bug 1522338.
- Fix fixed-position hit testing. This is enough of an edge
case that I think the pref can be enabled on nightly
without this for a few days. (I could be wrong - that's
what backouts are for.)
Fixed-position hit testing is tracked in bug 1522714. (And I changed my mind about deferring it until after the pref is enabled on Nightly. I intend to fix it first.)
Assignee | ||
Comment 34•7 years ago
|
||
Updated•7 years ago
|
Assignee | ||
Comment 35•7 years ago
|
||
It is an implementation detail of GetCurrentAsyncTransformForFixedAdjustment().
Depends on D13348
Assignee | ||
Comment 36•7 years ago
|
||
Depends on D17719
Assignee | ||
Comment 37•7 years ago
|
||
This reflects the fact that it's no longer optional (the code path that
wouldn't pass one was removed with JPZC).
Depends on D17720
Assignee | ||
Comment 38•7 years ago
|
||
This helper will be reused for translating layers fixed to the RCD-RSF
with containerless scrolling.
Depends on D17722
Assignee | ||
Comment 39•7 years ago
|
||
Depends on D17723
Assignee | ||
Comment 40•7 years ago
|
||
For brevity, this is referred to as the "relative visual offset/transform"
in the code.
Depends on D17724
Assignee | ||
Comment 41•7 years ago
|
||
Depends on D17725
Assignee | ||
Comment 42•7 years ago
|
||
As usual Phabricator is terrible about putting the patches in the right order...
Assignee | ||
Comment 43•7 years ago
|
||
(In reply to Botond Ballo [:botond] from comment #42)
As usual Phabricator is terrible about putting the patches in the right order...
Ok, after some manual use of "Edit Related Revisions", the "Stack" view in Phabricator now shows the correct order.
Assignee | ||
Comment 44•7 years ago
|
||
Here is a high level description of what these patches are doing:
The Layout changes in bug 1521644 make it so that, with layout.scroll.root-frame-containers=false
and apz.allow_zooming=true
, the layer structure looks something like this:
- root container layer
- async zoom container layer
- scrollable content layers, with scroll metadata
- fixed content layers (no scroll metadata, annotated
isFixedPosition
)
- scrollbar layers
- async zoom container layer
The patches in this bug implement correct rendering of this tree in AsyncCompositionManager. Notably:
- We lift the zoom portion of the async transform of the RCD-RSF APZC, from the scrollable content layers to the async zoom container layer (so that the zoom applies to the fixed layers too).
- We transform the fixed content layers by the amount the visual viewport has scrolled relative to the layout viewport. This preserves the behaviour for fixed layers implemented in bug 656036. Previously, this same net transformation was accomplished by having fixed layers carry the scroll metadata, and un-transforming them by the desired amount in
AlignFixedAndStickyLayers
. (See comments 14-17 for more discussion of this.)
Comment 45•7 years ago
|
||
Comment 46•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c858a0fe0fea
https://hg.mozilla.org/mozilla-central/rev/4d6a4c43775b
https://hg.mozilla.org/mozilla-central/rev/11ac6c2ac639
https://hg.mozilla.org/mozilla-central/rev/016c3e822444
https://hg.mozilla.org/mozilla-central/rev/949c039c7de9
https://hg.mozilla.org/mozilla-central/rev/5deb799c5ba3
https://hg.mozilla.org/mozilla-central/rev/9b072d3caedb
https://hg.mozilla.org/mozilla-central/rev/494c256e2e37
https://hg.mozilla.org/mozilla-central/rev/a03c30492ed7
Updated•6 years ago
|
Description
•