composited scrolling doesn't invalidate fixed-background descendants |
|||
Issue description1. Load https://output.jsbin.com/qedoqat/quiet 2. Scroll the inner scroller Expected: blue circle does not move Actual: blue circle moves with scroller
,
Aug 10 2017
Note that our paint code will paint the circle in the correct location (you can see this by scrolling the window after scrolling the inner scroller, which "snaps" the blue circle to the correct location). This is just a failure to issue a paint invalidation. In Firefox the blue circle moves with the window too. So Firefox is even more broken, or they have made a deliberate decision to ignore background-attachment: fixed inside transforms. Ignoring background-attachment: fixed inside transforms would parallel what we do with position: fixed (see issue 20574 and https://www.w3.org/Bugs/Public/show_bug.cgi?id=16328). But unlike position: fixed, the spec defines background-attachment without reference to containing blocks: https://www.w3.org/TR/css3-background/ "fixed - The background is fixed with regard to the viewport. In paged media where there is no viewport, a ‘fixed’ background is fixed with respect to the page box and therefore replicated on every page. Note that there is only one viewport per view. Even if an element has a scrolling mechanism (see the ‘overflow’ property [CSS21]), a ‘fixed’ background doesn't move with the element."
,
Sep 27 2017
I hit this again and filed a bug against Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1403762.
,
Aug 14
Working on another bug, I found this was fixed recently. Bisected to: https://chromium-review.googlesource.com/c/chromium/src/+/1159382 Don't force paint invalidation on non-composited scroll. Looking at the testcase in devtools with paint flashing enabled, it looks like we're correctly repainting the fixed background on scroll. I think this is the correct fix. Assigning to chrishtr to verify.
,
Aug 21
Yep. I noticed the same thing when writing my patch. There is already a layout test that exhibits the same testcase, so no need to add a new one. |
|||
►
Sign in to add a comment |
|||
Comment 1 by schenney@chromium.org
, Aug 10 2017Labels: BugSource-Chromium PaintTeamTriaged-20170810
Status: Available (was: Unconfirmed)