Closed
Bug 1128740
Opened 10 years ago
Closed 10 years ago
Nested scrollbars can have the wrong async transform
Categories
(Core :: Panning and Zooming, defect)
Tracking
()
RESOLVED
FIXED
mozilla40
Tracking | Status | |
---|---|---|
firefox40 | --- | fixed |
People
(Reporter: dvander, Assigned: dvander)
References
Details
Attachments
(2 files)
665.17 KB,
image/gif
|
Details | |
1.27 KB,
patch
|
botond
:
review+
|
Details | Diff | Splinter Review |
Screen capture of the problem. It looks like when we scroll, the scrollbar of the textarea moves with the outer scrollport's scrollbar, rather than the textarea. It only appears to happen after the textarea becomes scrolled.
The inner scrollbar winds up in the right place but it looks very bad.
Assignee | ||
Updated•10 years ago
|
Summary: Textarea classic scrollbars and APZ do not interact properly → Nested scrollbars can have the wrong async transform
Assignee | ||
Comment 1•10 years ago
|
||
When scrolling an outer frame, inner scrollbars get the outer async transform applied, but because they're scrollbars then proceed to have that transform clobbered by their local async transform (which is usually nothing). The fix is to just make sure the existing shadow transform is included.
Attachment #8588722 -
Flags: review?(botond)
Comment 2•10 years ago
|
||
Note that this bug would only happen if a layer is both async scrollable and a scrollbar (for an ancestor scrollable layer), which is what was happening in the case dvander posted to IRC:
ContainerLayerComposite (0x7fd184a9a000) [shadow-clip=(x=0, y=0, w=881, h=329)] [shadow-visible=< (x=515, y=146, w=13, h=33); >] [clip=(x=0, y=0, w=881, h=329)] [visible=< (x=515, y=146, w=13, h=33); >] [vscrollbar=4] [metrics0={ [cb=(x=0.000000, y=0.000000, w=881.000000, h=329.000000)] [sr=(x=0.000000, y=0.000000, w=881.000000, h=628.000000)] [s=(0,1)] [dp=(x=0.000000, y=-1.000000, w=881.000000, h=628.000000)] [cdp=(x=0.000000, y=0.000000, w=0.000000, h=0.000000)] [color=rgba(255, 255, 255, 1)] [scrollId=3] [z=1] }]
Comment 3•10 years ago
|
||
Comment on attachment 8588722 [details] [diff] [review]
fix
Review of attachment 8588722 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/layers/composite/AsyncCompositionManager.cpp
@@ +798,5 @@
> scrollbarTransform.PostScale(xScale, 1.f, 1.f);
> scrollbarTransform.PostTranslate(xTranslation, 0, 0);
> }
>
> + Matrix4x4 transform = scrollbarTransform * aScrollbar->GetLocalTransform();
There's a pre-existing bug in this code where it multiplies the async transform (scrollbarTransform) on the left, even though the async transform should apply on top of the regular transform (i.e., should be multiplied on the right).
Let's fix that as well (perhaps in a separate commit for bisection purposes).
Attachment #8588722 -
Flags: review?(botond) → review+
Comment 4•10 years ago
|
||
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #2)
> Note that this bug would only happen if a layer is both async scrollable and
> a scrollbar (for an ancestor scrollable layer), which is what was happening
> in the case dvander posted to IRC:
Heh, multi-layer-apz gives rise to all sorts of fun combinations :)
Comment 5•10 years ago
|
||
I plan to write some tests in bug 1151617 that should make touching this code a little less scary than it is right now.
See Also: → 1151617
Assignee | ||
Comment 6•10 years ago
|
||
Comment 7•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/86a231570055
https://hg.mozilla.org/mozilla-central/rev/f8d74ba6b0de
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox40:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in
before you can comment on or make changes to this bug.
Description
•