Changeset 242313 in webkit


Ignore:
Timestamp:
Mar 2, 2019 11:15:21 AM (5 years ago)
Author:
Simon Fraser
Message:

REGRESSION (r242132): Incorrect positioning with multiple position:fixed elements
https://bugs.webkit.org/show_bug.cgi?id=195246

Reviewed by Frederic Wang.

Source/WebCore:

r242132 introduced a bug where the management of 'cumulativeDelta' in ScrollingTree::notifyRelatedNodesRecursive
was incorrect. This value should propagate from ancestors to descendants, but not between siblings in the scrolling
tree, which it did, causing sibling position:fixed to behave incorrectly.

Test: scrollingcoordinator/mac/multiple-fixed.html

  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::notifyRelatedNodesRecursive):

  • page/scrolling/ScrollingTree.h:

LayoutTests:

Test that uses eventSender to scroll (and is thus macOS-only).

  • platform/ios-wk2/TestExpectations:
  • scrollingcoordinator/mac/multiple-fixed-expected.html: Added.
  • scrollingcoordinator/mac/multiple-fixed.html: Added.
Location:
trunk
Files:
3 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r242309 r242313  
     12019-03-02  Simon Fraser  <simon.fraser@apple.com>
     2
     3        REGRESSION (r242132): Incorrect positioning with multiple position:fixed elements
     4        https://bugs.webkit.org/show_bug.cgi?id=195246
     5
     6        Reviewed by Frederic Wang.
     7
     8        Test that uses eventSender to scroll (and is thus macOS-only).
     9
     10        * platform/ios-wk2/TestExpectations:
     11        * scrollingcoordinator/mac/multiple-fixed-expected.html: Added.
     12        * scrollingcoordinator/mac/multiple-fixed.html: Added.
     13
    1142019-03-01  Wenson Hsieh  <wenson_hsieh@apple.com>
    215
  • trunk/LayoutTests/platform/ios-wk2/TestExpectations

    r242191 r242313  
    1313fast/visual-viewport/ios/ [ Pass ]
    1414scrollingcoordinator [ Pass ]
     15scrollingcoordinator/mac [ Skip ]
    1516fast/web-share [ Pass ]
    1617editing/find [ Pass ]
  • trunk/Source/WebCore/ChangeLog

    r242311 r242313  
     12019-03-02  Simon Fraser  <simon.fraser@apple.com>
     2
     3        REGRESSION (r242132): Incorrect positioning with multiple position:fixed elements
     4        https://bugs.webkit.org/show_bug.cgi?id=195246
     5
     6        Reviewed by Frederic Wang.
     7
     8        r242132 introduced a bug where the management of 'cumulativeDelta' in ScrollingTree::notifyRelatedNodesRecursive
     9        was incorrect. This value should propagate from ancestors to descendants, but not between siblings in the scrolling
     10        tree, which it did, causing sibling position:fixed to behave incorrectly.
     11
     12        Test: scrollingcoordinator/mac/multiple-fixed.html
     13
     14        * page/scrolling/ScrollingTree.cpp:
     15        (WebCore::ScrollingTree::notifyRelatedNodesRecursive):
     16        * page/scrolling/ScrollingTree.h:
     17
    1182019-03-02  Darin Adler  <darin@apple.com>
    219
  • trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp

    r242132 r242313  
    266266}
    267267
    268 void ScrollingTree::notifyRelatedNodesRecursive(ScrollingTreeScrollingNode& changedNode, ScrollingTreeNode& currNode, const FloatRect& layoutViewport, FloatSize& cumulativeDelta)
     268void ScrollingTree::notifyRelatedNodesRecursive(ScrollingTreeScrollingNode& changedNode, ScrollingTreeNode& currNode, const FloatRect& layoutViewport, FloatSize cumulativeDelta)
    269269{
    270270    currNode.relatedNodeScrollPositionDidChange(changedNode, layoutViewport, cumulativeDelta);
     
    273273        return;
    274274   
    275     auto deltaForChildren = cumulativeDelta;
    276275    for (auto& child : *currNode.children()) {
    277276        // Never need to cross frame boundaries, since scroll layer adjustments are isolated to each document.
     
    279278            continue;
    280279
    281         notifyRelatedNodesRecursive(changedNode, *child, layoutViewport, deltaForChildren);
     280        notifyRelatedNodesRecursive(changedNode, *child, layoutViewport, cumulativeDelta);
    282281    }
    283282}
  • trunk/Source/WebCore/page/scrolling/ScrollingTree.h

    r242132 r242313  
    162162    ScrollingTreeNode* nodeForID(ScrollingNodeID) const;
    163163
    164     void notifyRelatedNodesRecursive(ScrollingTreeScrollingNode& changedNode, ScrollingTreeNode& currNode, const FloatRect& layoutViewport, FloatSize& cumulativeDelta);
     164    void notifyRelatedNodesRecursive(ScrollingTreeScrollingNode& changedNode, ScrollingTreeNode& currNode, const FloatRect& layoutViewport, FloatSize cumulativeDelta);
    165165
    166166    RefPtr<ScrollingTreeNode> m_rootNode;
Note: See TracChangeset for help on using the changeset viewer.