Closed
Bug 1209964
Opened 9 years ago
Closed 9 years ago
Async adjustment of ImageLayers gets confused by ImageLayer transform (fixed background-image jiggles)
Categories
(Core :: Panning and Zooming, defect)
Core
Panning and Zooming
Tracking
()
RESOLVED
FIXED
mozilla44
Tracking | Status | |
---|---|---|
firefox44 | --- | fixed |
People
(Reporter: mstange, Assigned: botond)
References
Details
Attachments
(3 files)
STR:
1. Load the testcase.
2. Ensure the image is completely visible (not clipped), resize your window if necessary.
3. Scroll.
The image should stay fixed, but it jiggles up and down.
The 256x256 image gets turned into an ImageLayer which has a transform to scale it up to 512x512 CSS pixels, as required by the background-size value.
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → botond
Assignee | ||
Comment 1•9 years ago
|
||
The problem is with the calculations inside AlignedFixedAndStickyLayers(). They assume that the calculated cumulative transforms (|oldCumulativeTransform| and |newCumulativeTransform|) apply on top of the fixed layer's own transform, but in the case where the fixed layer is the same as the subtree root (as here), the cumulative transforms already include the layer's own transform.
Assignee | ||
Comment 2•9 years ago
|
||
(In reply to Botond Ballo [:botond] from comment #1)
> but in the case where the fixed layer is the
> same as the subtree root (as here), the cumulative transforms already
> include the layer's own transform.
(because they are part of the incoming |aPreviousTransformForRoot| and |aCurrentTransformForRoot|).
Assignee | ||
Comment 3•9 years ago
|
||
I took this opportunity to rework the code that calculates |translation| in AlignFixedAndStickyLayers(). It still does the same thing (modulo the fix for this bug), but I think it's expressed a bit more clearly now.
Assignee | ||
Comment 4•9 years ago
|
||
Bug 1209964 - In AlignFixedAndStickyLayers(), properly handle the case where a fixed or sticky layer is its own subtree root and has a local transform. r=kats
Attachment #8669244 -
Flags: review?(bugmail.mozilla)
Assignee | ||
Comment 5•9 years ago
|
||
Bug 1209964 - Reftest. r=mstange
Attachment #8669245 -
Flags: review?(mstange)
Assignee | ||
Comment 7•9 years ago
|
||
Comment 8•9 years ago
|
||
Comment on attachment 8669244 [details]
MozReview Request: Bug 1209964 - In AlignFixedAndStickyLayers(), properly handle the case where a fixed or sticky layer is its own subtree root and has a local transform. r=kats
https://reviewboard.mozilla.org/r/21173/#review19059
Thanks! This code is much easier to follow than the old code (which I'm not ashamed to admit I fall asleep trying to understand).
::: gfx/layers/composite/AsyncCompositionManager.cpp:401
(Diff revision 1)
> -
> + // Offset the layer's anchor point to make sure to make sure fixed position
"to make sure" is repeated
Attachment #8669244 -
Flags: review?(bugmail.mozilla) → review+
Reporter | ||
Comment 9•9 years ago
|
||
Comment on attachment 8669245 [details]
MozReview Request: Bug 1209964 - Reftest. r=mstange
https://reviewboard.mozilla.org/r/21175/#review19103
Attachment #8669245 -
Flags: review?(mstange) → review+
Comment 10•9 years ago
|
||
Comment 11•9 years ago
|
||
Assignee | ||
Comment 12•9 years ago
|
||
(In reply to Pulsebot from comment #11)
> https://hg.mozilla.org/integration/mozilla-inbound/rev/6899c815160c
This was a follow-up to fuzz the reftest on B2G, where it was failing due to some one-pixel differences in the enlarged image.
Comment 13•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/d6d8b1f21461
https://hg.mozilla.org/mozilla-central/rev/5b5ebeeb2979
https://hg.mozilla.org/mozilla-central/rev/6899c815160c
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in
before you can comment on or make changes to this bug.
Description
•