New issue
Advanced search Search tips

Issue 881555 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

[Blink] Sticky position is not following containing block chain correctly.

Project Member Reported by trchen@chromium.org, Sep 6

Issue description

What steps will reproduce the problem?
(1) Open http://output.jsbin.com/gelipid/quiet
(2) Scroll down the scroller

What is the expected result? The green box should stay still.
What happens instead? The green box was pushed downward.

This is because the scrolling container of sticky position elements is not calculated correctly by walking up the containing block chain, see:
https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/paint/compositing/compositing_inputs_updater.cc?rcl=4f4887f1a8074ba0a0da57d9cca23eb6cf22ca0c&l=48
https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/paint/compositing/compositing_inputs_updater.cc?rcl=4f4887f1a8074ba0a0da57d9cca23eb6cf22ca0c&l=109

It should be tracked using position-dependent context like info.scrolling_ancestor(|_for_absolute|_for_fixed) instead.

This is non-trivial to fix because it involves invalidation of sticky constraint hash map. Memory leak / dangling pointer ensues if invalidation were not done correctly.

Note: info.ancestor_overflow_layer is different from info.scrolling_ancestor that the latter only includes actually manually scrollable scrollers, where the former counts anything with overflow clip.
 
Status: Available (was: Untriaged)

Sign in to add a comment