Changeset 269909 in webkit


Ignore:
Timestamp:
Nov 17, 2020 9:38:27 AM (3 years ago)
Author:
Chris Lord
Message:

REGRESSION(r269579) [WPE] Many tests with scrolling flaky after this revision
https://bugs.webkit.org/show_bug.cgi?id=218859

Reviewed by Simon Fraser.

Set scrolling node ID correctly on CoordinatedGraphicsLayer.

  • page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp:

(WebCore::ScrollingTreeFrameScrollingNodeNicosia::commitStateBeforeChildren):

  • page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp:
  • page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.h:
  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:

(WebCore::CoordinatedGraphicsLayer::setScrollingNodeID):
(WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
Location:
trunk/Source/WebCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r269907 r269909  
     12020-11-17  Chris Lord  <clord@igalia.com>
     2
     3        REGRESSION(r269579) [WPE] Many tests with scrolling flaky after this revision
     4        https://bugs.webkit.org/show_bug.cgi?id=218859
     5
     6        Reviewed by Simon Fraser.
     7
     8        Set scrolling node ID correctly on CoordinatedGraphicsLayer.
     9
     10        * page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp:
     11        (WebCore::ScrollingTreeFrameScrollingNodeNicosia::commitStateBeforeChildren):
     12        * page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp:
     13        * page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.h:
     14        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
     15        (WebCore::CoordinatedGraphicsLayer::setScrollingNodeID):
     16        (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
     17        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
     18
    1192020-11-17  Peng Liu  <peng.liu6@apple.com>
    220
  • trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp

    r269579 r269909  
    9090        m_footerLayer = downcast<Nicosia::CompositionLayer>(layer);
    9191    }
    92     if (scrollingStateNode.hasChangedProperty(ScrollingStateNode::Property::ScrolledContentsLayer)) {
    93         auto* scrollLayer = static_cast<Nicosia::PlatformLayer*>(scrolledContentsLayer());
    94         ASSERT(scrollLayer);
    95         auto& compositionLayer = downcast<Nicosia::CompositionLayer>(*scrollLayer);
    96         auto updateScope = compositionLayer.createUpdateScope();
    97         compositionLayer.updateState([nodeID = scrollingNodeID()](Nicosia::CompositionLayer::LayerState& state) {
    98             state.scrollingNodeID = nodeID;
    99             state.delta.scrollingNodeChanged = true;
    100         });
    101     }
    10292}
    10393
  • trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp

    r269579 r269909  
    5757ScrollingTreeOverflowScrollingNodeNicosia::~ScrollingTreeOverflowScrollingNodeNicosia() = default;
    5858
    59 void ScrollingTreeOverflowScrollingNodeNicosia::commitStateBeforeChildren(const ScrollingStateNode& stateNode)
    60 {
    61     ScrollingTreeScrollingNode::commitStateBeforeChildren(stateNode);
    62 
    63     const auto& scrollingStateNode = downcast<ScrollingStateOverflowScrollingNode>(stateNode);
    64     if (scrollingStateNode.hasChangedProperty(ScrollingStateNode::Property::ScrolledContentsLayer)) {
    65         auto* scrollLayer = static_cast<Nicosia::PlatformLayer*>(scrolledContentsLayer());
    66         ASSERT(scrollLayer);
    67         auto& compositionLayer = downcast<Nicosia::CompositionLayer>(*scrollLayer);
    68         auto updateScope = compositionLayer.createUpdateScope();
    69         compositionLayer.updateState([nodeID = scrollingNodeID()](Nicosia::CompositionLayer::LayerState& state) {
    70             state.scrollingNodeID = nodeID;
    71             state.delta.scrollingNodeChanged = true;
    72         });
    73     }
    74 }
    75 
    7659void ScrollingTreeOverflowScrollingNodeNicosia::commitStateAfterChildren(const ScrollingStateNode& stateNode)
    7760{
  • trunk/Source/WebCore/page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.h

    r269579 r269909  
    4545    ScrollingTreeOverflowScrollingNodeNicosia(ScrollingTree&, ScrollingNodeID);
    4646
    47     void commitStateBeforeChildren(const ScrollingStateNode&) override;
    4847    void commitStateAfterChildren(const ScrollingStateNode&) override;
    4948
  • trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp

    r269772 r269909  
    243243        parentLayer->didChangeChildren();
    244244    GraphicsLayer::removeFromParent();
     245}
     246
     247void CoordinatedGraphicsLayer::setScrollingNodeID(ScrollingNodeID nodeID)
     248{
     249    if (scrollingNodeID() == nodeID)
     250        return;
     251
     252    GraphicsLayer::setScrollingNodeID(nodeID);
     253    m_nicosia.delta.scrollingNodeChanged = true;
    245254}
    246255
     
    10031012                if (localDelta.animatedBackingStoreClientChanged)
    10041013                    state.animatedBackingStoreClient = m_nicosia.animatedBackingStoreClient;
     1014                if (localDelta.scrollingNodeChanged)
     1015                    state.scrollingNodeID = scrollingNodeID();
    10051016            });
    10061017        m_nicosia.performLayerSync = !!m_nicosia.delta.value;
  • trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h

    r269614 r269909  
    7272    bool replaceChild(GraphicsLayer*, Ref<GraphicsLayer>&&) override;
    7373    void removeFromParent() override;
     74    void setScrollingNodeID(ScrollingNodeID) override;
    7475    void setPosition(const FloatPoint&) override;
    7576    void syncPosition(const FloatPoint&) override;
Note: See TracChangeset for help on using the changeset viewer.