Closed
Bug 1201889
Opened 9 years ago
Closed 9 years ago
Not correctly handling position:fixed inside a scrolled ContainerLayer
Categories
(Core :: Panning and Zooming, defect)
Core
Panning and Zooming
Tracking
()
RESOLVED
FIXED
mozilla44
People
(Reporter: mstange, Assigned: botond)
References
Details
Attachments
(3 files)
When scrolling in the box with the black border, the blue square jiggles. (Ignore the fact that sometimes parts of the black border are missing. That's bug 1194851.) I think some part of https://etherpad.mozilla.org/apz-background-fixed describes what we need to do to fix this. I don't remember specifics, though.
Assignee | ||
Comment 1•9 years ago
|
||
With bug 1166301 landed, I don't see the blue square jiggle any more. Did I misunderstand the STR, or has this been fixed by bug 1166301?
Flags: needinfo?(mstange)
Assignee | ||
Comment 2•9 years ago
|
||
Doh. I was testing with APZ disabled. I can reproduce the problem with bug 1166301 fixed and APZ enabled. Sorry for the noise.
Flags: needinfo?(mstange)
Assignee | ||
Comment 3•9 years ago
|
||
The problem here is what I anticipated (and described an as "edge case") in bug 1187804 comment 7: (In reply to Botond Ballo [:botond] from comment #7) > The remaining part is > handling the case where in between a fixed layer and the ancestor scroll > frame that it's fixed with respect to, there are additional scroll frames > with async transforms that also need to be un-applied. This is more of an > edge case so I'm going to leave fixing it for a follow-up, but for the > record the general idea of the fix I had in mind is changing the condition > "is aTransformScrollId equal to the the fixed layer's target scroll id" to > "is aTransformScrollId on the path from the fixed layer to its target scroll > id". Here, the relevant part of the layer structure is: R | C | F where R is the layer with the scrollable metrics for the RSF, C is the layer with the scrollable metrics for box with the black border, and F is the fixed layer (the blue box). F is fixed with respect to R, and accordingly we unapply R's async transform to it to keep it fixed. However, in the STR described, C is being async-scrolled, and *its* async transform also needs to be unapplied.
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → botond
Assignee | ||
Comment 4•9 years ago
|
||
Here's a patch that implements the proposed approach. It turned out to be trickier and less clean than I thought, but it does work and doesn't regress existing async scrolling reftests. I still need to turn the test case into a new async scrolling reftest.
Assignee | ||
Comment 5•9 years ago
|
||
Bug 1201889 - When adjusting fixed and sticky layers in AsyncCompsitionManager, unapply all async transforms on the path from the fied layer to the layer its fixed with respect to. r=kats
Assignee | ||
Comment 6•9 years ago
|
||
Comment on attachment 8662154 [details] MozReview Request: Bug 1201889 - When adjusting fixed and sticky layers in AsyncCompsitionManager, unapply all async transforms on the path from the fied layer to the layer its fixed with respect to. r=kats Bug 1201889 - When adjusting fixed and sticky layers in AsyncCompsitionManager, unapply all async transforms on the path from the fied layer to the layer its fixed with respect to. r=kats
Attachment #8662154 -
Flags: review?(bugmail.mozilla)
Assignee | ||
Comment 7•9 years ago
|
||
Bug 1201889 - Reftest. r=mstange
Attachment #8666966 -
Flags: review?(mstange)
Assignee | ||
Comment 8•9 years ago
|
||
Kats, if you have any suggestions for how we could handle this more cleanly, please let me know.
Reporter | ||
Comment 9•9 years ago
|
||
Comment on attachment 8666966 [details] MozReview Request: Bug 1201889 - Reftest. r=mstange https://reviewboard.mozilla.org/r/20627/#review18497 ::: layout/reftests/async-scrolling/position-fixed-in-scroll-container.html:3 (Diff revision 1) > +<head> if you insist... :) (I usually leave <head>/<body> tags out, because they're optional in HTML (the elements get created anyway), but I suppose it's clearer with them included.)
Attachment #8666966 -
Flags: review?(mstange) → review+
Assignee | ||
Comment 10•9 years ago
|
||
(In reply to Markus Stange [:mstange] from comment #9) > ::: layout/reftests/async-scrolling/position-fixed-in-scroll-container.html:3 > (Diff revision 1) > > +<head> > > if you insist... :) > > (I usually leave <head>/<body> tags out, because they're optional in HTML > (the elements get created anyway), but I suppose it's clearer with them > included.) They were present in your testcase, which I adapted to produce the reftest files :) Anyways, I removed them. Try push that includes these patches: https://treeherder.mozilla.org/#/jobs?repo=try&revision=4203c34c0f82
Comment 11•9 years ago
|
||
Comment on attachment 8662154 [details] MozReview Request: Bug 1201889 - When adjusting fixed and sticky layers in AsyncCompsitionManager, unapply all async transforms on the path from the fied layer to the layer its fixed with respect to. r=kats https://reviewboard.mozilla.org/r/19527/#review18509 s/fied/fixed/ and s/its/it's/ in the commit message also. ::: gfx/layers/composite/AsyncCompositionManager.cpp:319 (Diff revision 2) > + encounteredFixedToLayer = true; You can get rid of encounteredFixedToLayer entirely, if you just return |encounteredTransformedLayer| inside this if condition, and change the last line in the function to |return false|. I think that would be a little easier to follow because there's fewer logical states and more early-returns. ::: gfx/layers/composite/AsyncCompositionManager.cpp:326 (Diff revision 2) > + // srolling). In such a case, stop the walk, as a new layers id could s/srolling/scrolling/ ::: gfx/layers/composite/AsyncCompositionManager.cpp:345 (Diff revision 2) > - aLayer->GetFixedPositionScrollContainerId() == aTransformScrollId && > + bool isRootFixed = aLayer->GetIsFixedPosition() && Since you're touching this code anyway could you rename this to "isRootOfFixedSubtree"? I always get confused with the variable names in this function.
Attachment #8662154 -
Flags: review?(bugmail.mozilla) → review+
Assignee | ||
Comment 12•9 years ago
|
||
Addressed review comments. The Try run also showed that I was failing to guard for a null pointer before calling AsRefLayer(), fixed that too. New Try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=fc059714640b
Comment 13•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/773c4f8ab8bd https://hg.mozilla.org/integration/mozilla-inbound/rev/c50c8ee77ac7
Comment 14•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/773c4f8ab8bd https://hg.mozilla.org/mozilla-central/rev/c50c8ee77ac7
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
•