Skip to content
Permalink
Browse files
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:


Canonical link: https://commits.webkit.org/231662@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269909 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Chris Lord committed Nov 17, 2020
1 parent 6e7091f commit 4a09fb2324f68c8aa81af1b1a0be7478ac080561
Showing 6 changed files with 30 additions and 28 deletions.
@@ -1,3 +1,21 @@
2020-11-17 Chris Lord <clord@igalia.com>

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:

2020-11-17 Peng Liu <peng.liu6@apple.com>

[Media In GPU Process][MSE] Add infrastructure needed to run MediaPlayerPrivateMediaSourceAVFObjC in the GPU process
@@ -89,16 +89,6 @@ void ScrollingTreeFrameScrollingNodeNicosia::commitStateBeforeChildren(const Scr
auto* layer = static_cast<Nicosia::PlatformLayer*>(scrollingStateNode.footerLayer());
m_footerLayer = downcast<Nicosia::CompositionLayer>(layer);
}
if (scrollingStateNode.hasChangedProperty(ScrollingStateNode::Property::ScrolledContentsLayer)) {
auto* scrollLayer = static_cast<Nicosia::PlatformLayer*>(scrolledContentsLayer());
ASSERT(scrollLayer);
auto& compositionLayer = downcast<Nicosia::CompositionLayer>(*scrollLayer);
auto updateScope = compositionLayer.createUpdateScope();
compositionLayer.updateState([nodeID = scrollingNodeID()](Nicosia::CompositionLayer::LayerState& state) {
state.scrollingNodeID = nodeID;
state.delta.scrollingNodeChanged = true;
});
}
}

void ScrollingTreeFrameScrollingNodeNicosia::commitStateAfterChildren(const ScrollingStateNode& stateNode)
@@ -56,23 +56,6 @@ ScrollingTreeOverflowScrollingNodeNicosia::ScrollingTreeOverflowScrollingNodeNic

ScrollingTreeOverflowScrollingNodeNicosia::~ScrollingTreeOverflowScrollingNodeNicosia() = default;

void ScrollingTreeOverflowScrollingNodeNicosia::commitStateBeforeChildren(const ScrollingStateNode& stateNode)
{
ScrollingTreeScrollingNode::commitStateBeforeChildren(stateNode);

const auto& scrollingStateNode = downcast<ScrollingStateOverflowScrollingNode>(stateNode);
if (scrollingStateNode.hasChangedProperty(ScrollingStateNode::Property::ScrolledContentsLayer)) {
auto* scrollLayer = static_cast<Nicosia::PlatformLayer*>(scrolledContentsLayer());
ASSERT(scrollLayer);
auto& compositionLayer = downcast<Nicosia::CompositionLayer>(*scrollLayer);
auto updateScope = compositionLayer.createUpdateScope();
compositionLayer.updateState([nodeID = scrollingNodeID()](Nicosia::CompositionLayer::LayerState& state) {
state.scrollingNodeID = nodeID;
state.delta.scrollingNodeChanged = true;
});
}
}

void ScrollingTreeOverflowScrollingNodeNicosia::commitStateAfterChildren(const ScrollingStateNode& stateNode)
{
ScrollingTreeOverflowScrollingNode::commitStateAfterChildren(stateNode);
@@ -44,7 +44,6 @@ class ScrollingTreeOverflowScrollingNodeNicosia final : public ScrollingTreeOver
private:
ScrollingTreeOverflowScrollingNodeNicosia(ScrollingTree&, ScrollingNodeID);

void commitStateBeforeChildren(const ScrollingStateNode&) override;
void commitStateAfterChildren(const ScrollingStateNode&) override;

FloatPoint adjustedScrollPosition(const FloatPoint&, ScrollClamping) const override;
@@ -244,6 +244,15 @@ void CoordinatedGraphicsLayer::removeFromParent()
GraphicsLayer::removeFromParent();
}

void CoordinatedGraphicsLayer::setScrollingNodeID(ScrollingNodeID nodeID)
{
if (scrollingNodeID() == nodeID)
return;

GraphicsLayer::setScrollingNodeID(nodeID);
m_nicosia.delta.scrollingNodeChanged = true;
}

void CoordinatedGraphicsLayer::setPosition(const FloatPoint& p)
{
if (position() == p)
@@ -1002,6 +1011,8 @@ void CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly()
state.imageBacking = m_nicosia.imageBacking;
if (localDelta.animatedBackingStoreClientChanged)
state.animatedBackingStoreClient = m_nicosia.animatedBackingStoreClient;
if (localDelta.scrollingNodeChanged)
state.scrollingNodeID = scrollingNodeID();
});
m_nicosia.performLayerSync = !!m_nicosia.delta.value;
m_nicosia.delta = { };
@@ -71,6 +71,7 @@ class WEBCORE_EXPORT CoordinatedGraphicsLayer : public GraphicsLayer {
void addChildBelow(Ref<GraphicsLayer>&&, GraphicsLayer*) override;
bool replaceChild(GraphicsLayer*, Ref<GraphicsLayer>&&) override;
void removeFromParent() override;
void setScrollingNodeID(ScrollingNodeID) override;
void setPosition(const FloatPoint&) override;
void syncPosition(const FloatPoint&) override;
void setAnchorPoint(const FloatPoint3D&) override;

0 comments on commit 4a09fb2

Please sign in to comment.