[Blink] Sticky position is not following containing block chain correctly. |
|
Issue descriptionWhat 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. |
|
►
Sign in to add a comment |
|
Comment 1 by schenney@chromium.org
, Sep 10