⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 244630 in webkit


Ignore:
Timestamp:
Apr 24, 2019, 5:46:23 PM (7 years ago)
Author:
Simon Fraser
Message:

REGRESSION (r242132): Nested position:sticky elements move incorrectly
https://bugs.webkit.org/show_bug.cgi?id=197255
rdar://problem/50137744

Reviewed by Zalan Bujtas.
Source/WebCore:

Revert to the behavior of the code before r242132, where we looked at the direct parent
scrolling tree node instead of walking up the ancestor chain to find an enclosing scrolling node.
This fixes nested sticky behavior.

Test: scrollingcoordinator/mac/nested-sticky.html

  • page/scrolling/cocoa/ScrollingTreeStickyNode.mm:

(WebCore::ScrollingTreeStickyNode::applyLayerPositions):

LayoutTests:

  • scrollingcoordinator/mac/nested-sticky-expected.html: Added.
  • scrollingcoordinator/mac/nested-sticky.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r244629 r244630  
     12019-04-24  Simon Fraser  <simon.fraser@apple.com>
     2
     3        REGRESSION (r242132): Nested position:sticky elements move incorrectly
     4        https://bugs.webkit.org/show_bug.cgi?id=197255
     5        rdar://problem/50137744
     6
     7        Reviewed by Zalan Bujtas.
     8
     9        * scrollingcoordinator/mac/nested-sticky-expected.html: Added.
     10        * scrollingcoordinator/mac/nested-sticky.html: Added.
     11
    1122019-04-24  Alicia Boya García  <aboya@igalia.com>
    213
  • trunk/Source/WebCore/ChangeLog

    r244627 r244630  
     12019-04-24  Simon Fraser  <simon.fraser@apple.com>
     2
     3        REGRESSION (r242132): Nested position:sticky elements move incorrectly
     4        https://bugs.webkit.org/show_bug.cgi?id=197255
     5        rdar://problem/50137744
     6
     7        Reviewed by Zalan Bujtas.
     8       
     9        Revert to the behavior of the code before r242132, where we looked at the direct parent
     10        scrolling tree node instead of walking up the ancestor chain to find an enclosing scrolling node.
     11        This fixes nested sticky behavior.
     12
     13        Test: scrollingcoordinator/mac/nested-sticky.html
     14
     15        * page/scrolling/cocoa/ScrollingTreeStickyNode.mm:
     16        (WebCore::ScrollingTreeStickyNode::applyLayerPositions):
     17
    1182019-04-24  Eric Carlson  <eric.carlson@apple.com>
    219
  • trunk/Source/WebCore/page/scrolling/cocoa/ScrollingTreeStickyNode.mm

    r242687 r244630  
    7070    FloatRect constrainingRect;
    7171
    72     auto* enclosingScrollingNode = enclosingScrollingNodeIncludingSelf();
     72    auto* enclosingScrollingNode = parent();
    7373    if (is<ScrollingTreeOverflowScrollingNode>(enclosingScrollingNode))
    7474        constrainingRect = FloatRect(downcast<ScrollingTreeOverflowScrollingNode>(*enclosingScrollingNode).currentScrollPosition(), m_constraints.constrainingRectAtLastLayout().size());
Note: See TracChangeset for help on using the changeset viewer.