New issue
Advanced search Search tips

Issue 754094 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 21
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 2
Type: Bug



Sign in to add a comment

composited scrolling doesn't invalidate fixed-background descendants

Project Member Reported by skobes@chromium.org, Aug 10 2017

Issue description

1. Load https://output.jsbin.com/qedoqat/quiet
2. Scroll the inner scroller

Expected: blue circle does not move
Actual: blue circle moves with scroller
 
Components: -Blink>Compositing -Blink>Scroll
Labels: BugSource-Chromium PaintTeamTriaged-20170810
Status: Available (was: Unconfirmed)
Firefox does what we do. Edge does not.

Comment 2 by skobes@chromium.org, 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."

Comment 3 by pdr@chromium.org, Sep 27 2017

I hit this again and filed a bug against Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1403762.
Owner: chrishtr@chromium.org
Status: Assigned (was: Available)
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.
Status: Fixed (was: Assigned)
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