New issue
Advanced search Search tips

Issue 762962 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Sticky position with perspective double shifts child layers affected by the perspective.

Reported by s...@hinderlingvolkart.com, Sep 7 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.79 Safari/537.36

Steps to reproduce the problem:
1.  Open https://s.codepen.io/betabong/debug/qXzEZL
2. Scroll down a page

What is the expected behavior?
The text "I'm on a layer, but I should not move!" stays right below the other text.

What went wrong?
Setting perspective on the sticky layer and will-change: opacity on the text layer is the key to the bug.

Did this work before? Yes Chrome 60

Does this work in other browsers? Yes

Chrome version: 61.0.3163.79  Channel: stable
OS Version: OS X 10.12.6
Flash Version:
 
chrome-61-sticky-bug.html
1.3 KB View Download
Cc: flackr@chromium.org
Components: Blink>Compositing
Owner: smcgruer@chromium.org
Status: Assigned (was: Unconfirmed)
Summary: Sticky position with perspective double shifts child layers affected by the perspective. (was: Layer within sticky drifts)
The issue seems to be that we create an intermediate layer for perspective which is also getting the sticky position offset despite being a child of the sticky position layer. Updating title to be more specific.
Project Member

Comment 3 by bugdroid1@chromium.org, Oct 4 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/07d92b832e636397f113353dc9413c247996e250

commit 07d92b832e636397f113353dc9413c247996e250
Author: Stephen McGruer <smcgruer@chromium.org>
Date: Wed Oct 04 00:32:26 2017

Account for position:sticky offset in composited-ancestor offset calculation.

In the case where compositor is handling sticky offset, we need to remove the
Blink-side offset to avoid double-counting. Previously this was done directly
in CompositedLayerMapping::UpdateMainGraphicsLayerGeometry but that misses cases
such as the position of child_transform_layer_.

In general CompositedLayerMapping should not know about the sticky offset when
the compositor is going to handle it, so this CL removes it from the composited
ancestor offset calculation which then bubbles down to the required locations.

Bug:  762962 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I31ce57e6623f0ce3995abbb7d79dccf94022354b
Reviewed-on: https://chromium-review.googlesource.com/665581
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Robert Flack <flackr@chromium.org>
Commit-Queue: Stephen McGruer <smcgruer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506247}
[add] https://crrev.com/07d92b832e636397f113353dc9413c247996e250/third_party/WebKit/LayoutTests/compositing/overflow/composited-sticky-element-perspective-child-layer-expected.html
[add] https://crrev.com/07d92b832e636397f113353dc9413c247996e250/third_party/WebKit/LayoutTests/compositing/overflow/composited-sticky-element-perspective-child-layer.html
[modify] https://crrev.com/07d92b832e636397f113353dc9413c247996e250/third_party/WebKit/Source/core/paint/compositing/CompositedLayerMapping.cpp
[modify] https://crrev.com/07d92b832e636397f113353dc9413c247996e250/third_party/WebKit/Source/core/paint/compositing/CompositedLayerMapping.h
[modify] https://crrev.com/07d92b832e636397f113353dc9413c247996e250/third_party/WebKit/Source/core/paint/compositing/CompositedLayerMappingTest.cpp

Status: Fixed (was: Assigned)

Sign in to add a comment