[Webkit-unassigned] [Bug 198292] [async scrolling] Fixed positioning inside stacking context overflow scroll is jumpy
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue May 28 10:39:08 PDT 2019
https://bugs.webkit.org/show_bug.cgi?id=198292
--- Comment #8 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
Comment on attachment 370738
--> https://bugs.webkit.org/attachment.cgi?id=370738
patch
View in context: https://bugs.webkit.org/attachment.cgi?id=370738&action=review
> Source/WebCore/page/scrolling/cocoa/ScrollingTreeFixedNode.mm:90
> + FloatSize overflowScrollDelta;
> + // FIXME: This code is wrong in complex cases where the fixed element is inside a positioned node as
> + // the scroll container order does not match the scrolling tree ancestor order.
> + for (auto* node = parent(); node; node = node->parent()) {
> + if (is<ScrollingTreeFrameScrollingNode>(*node)) {
> + // Fixed nodes are positioned relative to the containing frame scrolling node.
> + // We bail out after finding one.
> + auto layoutViewport = downcast<ScrollingTreeFrameScrollingNode>(*node).layoutViewport();
> + return m_constraints.layerPositionForViewportRect(layoutViewport) - overflowScrollDelta;
> + }
> +
> + if (is<ScrollingTreeOverflowScrollingNode>(*node)) {
> + // To keep the layer still during async scrolling we adjust by how much the position has changed since layout.
> + auto& overflowNode = downcast<ScrollingTreeOverflowScrollingNode>(*node);
> + auto localDelta = overflowNode.lastCommittedScrollPosition() - overflowNode.currentScrollPosition();
> + overflowScrollDelta += localDelta;
> + }
> + }
> + ASSERT_NOT_REACHED();
> + return FloatPoint();
Won't Sticky nodes need similar logic?
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190528/394049a6/attachment-0001.html>
More information about the webkit-unassigned
mailing list