Move ScrolledContentsLayer property to ScrollingStateScrollingNode
authorfred.wang@free.fr <fred.wang@free.fr@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Jul 2017 17:56:11 +0000 (17:56 +0000)
committerfred.wang@free.fr <fred.wang@free.fr@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Jul 2017 17:56:11 +0000 (17:56 +0000)
https://bugs.webkit.org/show_bug.cgi?id=174134

Patch by Frederic Wang <fwang@igalia.com> on 2017-07-05
Reviewed by Simon Fraser.

Source/WebCore:

ScrollingStateFrameScrollingNode and ScrollingStateOverflowScrollingNode both use a
ScrolledContentsLayer property for the same purpose. This commit moves that property into
their parent class ScrollingStateScrollingNode, so that more code is shared between the two
classes. This will also help the refactoring in bug 174130.

No new tests, only dumped tree may change a bit.

* page/scrolling/ScrollingStateFrameScrollingNode.cpp: Remove scrolled contents layer.
(WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
(WebCore::ScrollingStateFrameScrollingNode::dumpProperties):
(WebCore::ScrollingStateFrameScrollingNode::setScrolledContentsLayer): Deleted.
* page/scrolling/ScrollingStateFrameScrollingNode.h: Ditto.
* page/scrolling/ScrollingStateOverflowScrollingNode.cpp: Ditto.
(WebCore::ScrollingStateOverflowScrollingNode::ScrollingStateOverflowScrollingNode):
(WebCore::ScrollingStateOverflowScrollingNode::dumpProperties):
(WebCore::ScrollingStateOverflowScrollingNode::setScrolledContentsLayer): Deleted.
* page/scrolling/ScrollingStateOverflowScrollingNode.h: Ditto.
(): Deleted.
(WebCore::ScrollingStateOverflowScrollingNode::scrolledContentsLayer): Deleted.
* page/scrolling/ScrollingStateScrollingNode.cpp: Add scrolled contents layer.
(WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
(WebCore::ScrollingStateScrollingNode::setScrolledContentsLayer):
(WebCore::ScrollingStateScrollingNode::dumpProperties): Use the label from the overflow class
which is different from the frame class. The dumping order may change a bit too.
* page/scrolling/ScrollingStateScrollingNode.h: Add ScrolledContentsLayer to the enum and
scrolled contents layer.
(WebCore::ScrollingStateScrollingNode::scrolledContentsLayer):
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateBeforeChildren): Adjust enum value
to use ScrollingStateScrollingNode::ScrolledContentsLayer.

Source/WebKit2:

* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(ArgumentCoder<ScrollingStateScrollingNode>::encode): Add encoding for scrolled contents
layer.
(ArgumentCoder<ScrollingStateFrameScrollingNode>::encode): Remove encoding for scrolled
contents layer.
(ArgumentCoder<ScrollingStateOverflowScrollingNode>::encode): Ditto.
(ArgumentCoder<ScrollingStateScrollingNode>::decode): Add decoding for scrolled contents
layer.
(ArgumentCoder<ScrollingStateFrameScrollingNode>::decode): Remove decoding for scrolled
contents layer.
(ArgumentCoder<ScrollingStateOverflowScrollingNode>::decode): Ditto.
(WebKit::dump): Move dumping of scrolled contents layer from overflow/frame nodes to
scrolling node.
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers): Adjust enum value to use
ScrollingStateScrollingNode::ScrolledContentsLayer.
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::commitStateBeforeChildren): Ditto.
* UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@219137 268f45cc-cd09-0410-ab3c-d52691b4dbfc

13 files changed:
Source/WebCore/ChangeLog
Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp
Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.h
Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp
Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.h
Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp
Source/WebCore/page/scrolling/ScrollingStateScrollingNode.h
Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp
Source/WebKit2/UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp
Source/WebKit2/UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm
Source/WebKit2/UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm

index 1b844c6..c903346 100644 (file)
@@ -1,3 +1,41 @@
+2017-07-05  Frederic Wang  <fwang@igalia.com>
+
+        Move ScrolledContentsLayer property to ScrollingStateScrollingNode
+        https://bugs.webkit.org/show_bug.cgi?id=174134
+
+        Reviewed by Simon Fraser.
+
+        ScrollingStateFrameScrollingNode and ScrollingStateOverflowScrollingNode both use a
+        ScrolledContentsLayer property for the same purpose. This commit moves that property into
+        their parent class ScrollingStateScrollingNode, so that more code is shared between the two
+        classes. This will also help the refactoring in bug 174130.
+
+        No new tests, only dumped tree may change a bit.
+
+        * page/scrolling/ScrollingStateFrameScrollingNode.cpp: Remove scrolled contents layer.
+        (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
+        (WebCore::ScrollingStateFrameScrollingNode::dumpProperties):
+        (WebCore::ScrollingStateFrameScrollingNode::setScrolledContentsLayer): Deleted.
+        * page/scrolling/ScrollingStateFrameScrollingNode.h: Ditto.
+        * page/scrolling/ScrollingStateOverflowScrollingNode.cpp: Ditto.
+        (WebCore::ScrollingStateOverflowScrollingNode::ScrollingStateOverflowScrollingNode):
+        (WebCore::ScrollingStateOverflowScrollingNode::dumpProperties):
+        (WebCore::ScrollingStateOverflowScrollingNode::setScrolledContentsLayer): Deleted.
+        * page/scrolling/ScrollingStateOverflowScrollingNode.h: Ditto.
+        (): Deleted.
+        (WebCore::ScrollingStateOverflowScrollingNode::scrolledContentsLayer): Deleted.
+        * page/scrolling/ScrollingStateScrollingNode.cpp: Add scrolled contents layer.
+        (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
+        (WebCore::ScrollingStateScrollingNode::setScrolledContentsLayer):
+        (WebCore::ScrollingStateScrollingNode::dumpProperties): Use the label from the overflow class
+        which is different from the frame class. The dumping order may change a bit too.
+        * page/scrolling/ScrollingStateScrollingNode.h: Add ScrolledContentsLayer to the enum and
+        scrolled contents layer.
+        (WebCore::ScrollingStateScrollingNode::scrolledContentsLayer):
+        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
+        (WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateBeforeChildren): Adjust enum value
+        to use ScrollingStateScrollingNode::ScrolledContentsLayer.
+
 2017-07-05  Emilio Cobos Ãlvarez  <ecobos@igalia.com>
 
         ProcessingInstruction::clearExistingCachedSheet doesn't really exist.
index b6e7133..c97a8a0 100644 (file)
@@ -64,9 +64,6 @@ ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode(const Scrolli
     , m_fixedElementsLayoutRelativeToFrame(stateNode.fixedElementsLayoutRelativeToFrame())
     , m_visualViewportEnabled(stateNode.visualViewportEnabled())
 {
-    if (hasChangedProperty(ScrolledContentsLayer))
-        setScrolledContentsLayer(stateNode.scrolledContentsLayer().toRepresentation(adoptiveTree.preferredLayerRepresentation()));
-
     if (hasChangedProperty(CounterScrollingLayer))
         setCounterScrollingLayer(stateNode.counterScrollingLayer().toRepresentation(adoptiveTree.preferredLayerRepresentation()));
 
@@ -183,15 +180,6 @@ void ScrollingStateFrameScrollingNode::setTopContentInset(float topContentInset)
     setPropertyChanged(TopContentInset);
 }
 
-void ScrollingStateFrameScrollingNode::setScrolledContentsLayer(const LayerRepresentation& layerRepresentation)
-{
-    if (layerRepresentation == m_scrolledContentsLayer)
-        return;
-    
-    m_scrolledContentsLayer = layerRepresentation;
-    setPropertyChanged(ScrolledContentsLayer);
-}
-
 void ScrollingStateFrameScrollingNode::setCounterScrollingLayer(const LayerRepresentation& layerRepresentation)
 {
     if (layerRepresentation == m_counterScrollingLayer)
@@ -271,7 +259,6 @@ void ScrollingStateFrameScrollingNode::dumpProperties(TextStream& ts, ScrollingS
     if (behavior & ScrollingStateTreeAsTextBehaviorIncludeLayerIDs) {
         ts.dumpProperty("counter scrolling layer ID", m_counterScrollingLayer.layerID());
         ts.dumpProperty("inset clip layer ID", m_insetClipLayer.layerID());
-        ts.dumpProperty("scrolled contents layer ID", m_scrolledContentsLayer.layerID());
         ts.dumpProperty("content shadow layer ID", m_contentShadowLayer.layerID());
         ts.dumpProperty("header layer ID", m_headerLayer.layerID());
         ts.dumpProperty("footer layer ID", m_footerLayer.layerID());
index 82605b2..9e35b35 100644 (file)
@@ -97,9 +97,6 @@ public:
     float topContentInset() const { return m_topContentInset; }
     WEBCORE_EXPORT void setTopContentInset(float);
 
-    const LayerRepresentation& scrolledContentsLayer() const { return m_scrolledContentsLayer; }
-    WEBCORE_EXPORT void setScrolledContentsLayer(const LayerRepresentation&);
-
     // This is a layer moved in the opposite direction to scrolling, for example for background-attachment:fixed
     const LayerRepresentation& counterScrollingLayer() const { return m_counterScrollingLayer; }
     WEBCORE_EXPORT void setCounterScrollingLayer(const LayerRepresentation&);
@@ -142,7 +139,6 @@ private:
 
     LayerRepresentation m_counterScrollingLayer;
     LayerRepresentation m_insetClipLayer;
-    LayerRepresentation m_scrolledContentsLayer;
     LayerRepresentation m_contentShadowLayer;
     LayerRepresentation m_headerLayer;
     LayerRepresentation m_footerLayer;
index 28fd203..3cf0fe8 100644 (file)
@@ -46,8 +46,6 @@ ScrollingStateOverflowScrollingNode::ScrollingStateOverflowScrollingNode(Scrolli
 ScrollingStateOverflowScrollingNode::ScrollingStateOverflowScrollingNode(const ScrollingStateOverflowScrollingNode& stateNode, ScrollingStateTree& adoptiveTree)
     : ScrollingStateScrollingNode(stateNode, adoptiveTree)
 {
-    if (hasChangedProperty(ScrolledContentsLayer))
-        setScrolledContentsLayer(stateNode.scrolledContentsLayer().toRepresentation(adoptiveTree.preferredLayerRepresentation()));
 }
 
 ScrollingStateOverflowScrollingNode::~ScrollingStateOverflowScrollingNode()
@@ -59,23 +57,11 @@ Ref<ScrollingStateNode> ScrollingStateOverflowScrollingNode::clone(ScrollingStat
     return adoptRef(*new ScrollingStateOverflowScrollingNode(*this, adoptiveTree));
 }
     
-void ScrollingStateOverflowScrollingNode::setScrolledContentsLayer(const LayerRepresentation& layerRepresentation)
-{
-    if (layerRepresentation == m_scrolledContentsLayer)
-        return;
-    
-    m_scrolledContentsLayer = layerRepresentation;
-    setPropertyChanged(ScrolledContentsLayer);
-}
-
 void ScrollingStateOverflowScrollingNode::dumpProperties(TextStream& ts, ScrollingStateTreeAsTextBehavior behavior) const
 {
     ts << "Overflow scrolling node";
     
     ScrollingStateScrollingNode::dumpProperties(ts, behavior);
-    
-    if ((behavior & ScrollingStateTreeAsTextBehaviorIncludeLayerIDs) && m_scrolledContentsLayer.layerID())
-        ts.dumpProperty("scrolled contents layer", m_scrolledContentsLayer.layerID());
 }
 
 } // namespace WebCore
index 622a300..028938f 100644 (file)
@@ -39,21 +39,11 @@ public:
 
     virtual ~ScrollingStateOverflowScrollingNode();
 
-    enum ChangedProperty {
-        ScrolledContentsLayer = NumScrollingStateNodeBits
-    };
-
-    // This is a layer with the contents that move.
-    const LayerRepresentation& scrolledContentsLayer() const { return m_scrolledContentsLayer; }
-    WEBCORE_EXPORT void setScrolledContentsLayer(const LayerRepresentation&);
-    
     void dumpProperties(TextStream&, ScrollingStateTreeAsTextBehavior) const override;
 
 private:
     ScrollingStateOverflowScrollingNode(ScrollingStateTree&, ScrollingNodeID);
     ScrollingStateOverflowScrollingNode(const ScrollingStateOverflowScrollingNode&, ScrollingStateTree&);
-    
-    LayerRepresentation m_scrolledContentsLayer;    
 };
 
 } // namespace WebCore
index 82e6a63..3d07281 100644 (file)
@@ -53,6 +53,8 @@ ScrollingStateScrollingNode::ScrollingStateScrollingNode(const ScrollingStateScr
     , m_requestedScrollPositionRepresentsProgrammaticScroll(stateNode.requestedScrollPositionRepresentsProgrammaticScroll())
     , m_expectsWheelEventTestTrigger(stateNode.expectsWheelEventTestTrigger())
 {
+    if (hasChangedProperty(ScrolledContentsLayer))
+        setScrolledContentsLayer(stateNode.scrolledContentsLayer().toRepresentation(adoptiveTree.preferredLayerRepresentation()));
 }
 
 ScrollingStateScrollingNode::~ScrollingStateScrollingNode()
@@ -185,6 +187,15 @@ void ScrollingStateScrollingNode::setExpectsWheelEventTestTrigger(bool expectsTe
     setPropertyChanged(ExpectsWheelEventTestTrigger);
 }
 
+void ScrollingStateScrollingNode::setScrolledContentsLayer(const LayerRepresentation& layerRepresentation)
+{
+    if (layerRepresentation == m_scrolledContentsLayer)
+        return;
+
+    m_scrolledContentsLayer = layerRepresentation;
+    setPropertyChanged(ScrolledContentsLayer);
+}
+
 void ScrollingStateScrollingNode::dumpProperties(TextStream& ts, ScrollingStateTreeAsTextBehavior behavior) const
 {
     ScrollingStateNode::dumpProperties(ts, behavior);
@@ -243,6 +254,9 @@ void ScrollingStateScrollingNode::dumpProperties(TextStream& ts, ScrollingStateT
 
     if (m_expectsWheelEventTestTrigger)
         ts.dumpProperty("expects wheel event test trigger", m_expectsWheelEventTestTrigger);
+
+    if ((behavior & ScrollingStateTreeAsTextBehaviorIncludeLayerIDs) && m_scrolledContentsLayer.layerID())
+        ts.dumpProperty("scrolled contents layer", m_scrolledContentsLayer.layerID());
 }
 
 } // namespace WebCore
index f4d275f..f61290b 100644 (file)
@@ -55,6 +55,7 @@ public:
         CurrentVerticalSnapOffsetIndex,
 #endif
         ExpectsWheelEventTestTrigger,
+        ScrolledContentsLayer,
         NumScrollingStateNodeBits // This must remain at the last position.
     };
 
@@ -103,6 +104,10 @@ public:
     bool expectsWheelEventTestTrigger() const { return m_expectsWheelEventTestTrigger; }
     WEBCORE_EXPORT void setExpectsWheelEventTestTrigger(bool);
 
+    // This is a layer with the contents that move.
+    const LayerRepresentation& scrolledContentsLayer() const { return m_scrolledContentsLayer; }
+    WEBCORE_EXPORT void setScrolledContentsLayer(const LayerRepresentation&);
+
 protected:
     ScrollingStateScrollingNode(ScrollingStateTree&, ScrollingNodeType, ScrollingNodeID);
     ScrollingStateScrollingNode(const ScrollingStateScrollingNode&, ScrollingStateTree&);
@@ -122,6 +127,7 @@ private:
     unsigned m_currentVerticalSnapPointIndex { 0 };
 #endif
     ScrollableAreaParameters m_scrollableAreaParameters;
+    LayerRepresentation m_scrolledContentsLayer;
     bool m_requestedScrollPositionRepresentsProgrammaticScroll { false };
     bool m_expectsWheelEventTestTrigger { false };
 };
index 4bafcf3..872550e 100644 (file)
@@ -106,7 +106,7 @@ void ScrollingTreeFrameScrollingNodeMac::commitStateBeforeChildren(const Scrolli
     if (scrollingStateNode.hasChangedProperty(ScrollingStateNode::ScrollLayer))
         m_scrollLayer = scrollingStateNode.layer();
 
-    if (scrollingStateNode.hasChangedProperty(ScrollingStateFrameScrollingNode::ScrolledContentsLayer))
+    if (scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::ScrolledContentsLayer))
         m_scrolledContentsLayer = scrollingStateNode.scrolledContentsLayer();
 
     if (scrollingStateNode.hasChangedProperty(ScrollingStateFrameScrollingNode::CounterScrollingLayer))
index 319b469..1e36fdc 100644 (file)
@@ -1,3 +1,31 @@
+2017-07-05  Frederic Wang  <fwang@igalia.com>
+
+        Move ScrolledContentsLayer property to ScrollingStateScrollingNode
+        https://bugs.webkit.org/show_bug.cgi?id=174134
+
+        Reviewed by Simon Fraser.
+
+        * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
+        (ArgumentCoder<ScrollingStateScrollingNode>::encode): Add encoding for scrolled contents
+        layer.
+        (ArgumentCoder<ScrollingStateFrameScrollingNode>::encode): Remove encoding for scrolled
+        contents layer.
+        (ArgumentCoder<ScrollingStateOverflowScrollingNode>::encode): Ditto.
+        (ArgumentCoder<ScrollingStateScrollingNode>::decode): Add decoding for scrolled contents
+        layer.
+        (ArgumentCoder<ScrollingStateFrameScrollingNode>::decode): Remove decoding for scrolled
+        contents layer.
+        (ArgumentCoder<ScrollingStateOverflowScrollingNode>::decode): Ditto.
+        (WebKit::dump): Move dumping of scrolled contents layer from overflow/frame nodes to
+        scrolling node.
+        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
+        (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers): Adjust enum value to use
+        ScrollingStateScrollingNode::ScrolledContentsLayer.
+        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
+        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::commitStateBeforeChildren): Ditto.
+        * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
+        (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers): Ditto.
+
 2017-07-05  Ada Chan  <adachan@apple.com>
 
         Fix crash in UIKit: +[UIViewController _viewControllerForFullScreenPresentationFromView:]
index a055701..5040416 100644 (file)
@@ -135,6 +135,9 @@ void ArgumentCoder<ScrollingStateScrollingNode>::encode(Encoder& encoder, const
     SCROLLING_NODE_ENCODE(ScrollingStateScrollingNode::ScrollableAreaParams, scrollableAreaParameters)
     SCROLLING_NODE_ENCODE(ScrollingStateScrollingNode::RequestedScrollPosition, requestedScrollPosition)
     SCROLLING_NODE_ENCODE(ScrollingStateScrollingNode::RequestedScrollPosition, requestedScrollPositionRepresentsProgrammaticScroll)
+
+    if (node.hasChangedProperty(ScrollingStateScrollingNode::ScrolledContentsLayer))
+        encoder << static_cast<GraphicsLayer::PlatformLayerID>(node.scrolledContentsLayer());
 }
 
 void ArgumentCoder<ScrollingStateFrameScrollingNode>::encode(Encoder& encoder, const ScrollingStateFrameScrollingNode& node)
@@ -154,9 +157,6 @@ void ArgumentCoder<ScrollingStateFrameScrollingNode>::encode(Encoder& encoder, c
     SCROLLING_NODE_ENCODE(ScrollingStateFrameScrollingNode::MinLayoutViewportOrigin, minLayoutViewportOrigin)
     SCROLLING_NODE_ENCODE(ScrollingStateFrameScrollingNode::MaxLayoutViewportOrigin, maxLayoutViewportOrigin)
 
-    if (node.hasChangedProperty(ScrollingStateFrameScrollingNode::ScrolledContentsLayer))
-        encoder << static_cast<GraphicsLayer::PlatformLayerID>(node.scrolledContentsLayer());
-
     if (node.hasChangedProperty(ScrollingStateFrameScrollingNode::CounterScrollingLayer))
         encoder << static_cast<GraphicsLayer::PlatformLayerID>(node.counterScrollingLayer());
 
@@ -170,9 +170,6 @@ void ArgumentCoder<ScrollingStateFrameScrollingNode>::encode(Encoder& encoder, c
 void ArgumentCoder<ScrollingStateOverflowScrollingNode>::encode(Encoder& encoder, const ScrollingStateOverflowScrollingNode& node)
 {
     encoder << static_cast<const ScrollingStateScrollingNode&>(node);
-    
-    if (node.hasChangedProperty(ScrollingStateOverflowScrollingNode::ScrolledContentsLayer))
-        encoder << static_cast<GraphicsLayer::PlatformLayerID>(node.scrolledContentsLayer());
 }
 
 #define SCROLLING_NODE_DECODE(property, type, setter) \
@@ -223,6 +220,13 @@ bool ArgumentCoder<ScrollingStateScrollingNode>::decode(Decoder& decoder, Scroll
         node.setRequestedScrollPosition(scrollPosition, representsProgrammaticScroll);
     }
 
+    if (node.hasChangedProperty(ScrollingStateScrollingNode::ScrolledContentsLayer)) {
+        GraphicsLayer::PlatformLayerID layerID;
+        if (!decoder.decode(layerID))
+            return false;
+        node.setScrolledContentsLayer(layerID);
+    }
+
     return true;
 }
 
@@ -245,13 +249,6 @@ bool ArgumentCoder<ScrollingStateFrameScrollingNode>::decode(Decoder& decoder, S
     SCROLLING_NODE_DECODE(ScrollingStateFrameScrollingNode::MinLayoutViewportOrigin, FloatPoint, setMinLayoutViewportOrigin)
     SCROLLING_NODE_DECODE(ScrollingStateFrameScrollingNode::MaxLayoutViewportOrigin, FloatPoint, setMaxLayoutViewportOrigin)
 
-    if (node.hasChangedProperty(ScrollingStateFrameScrollingNode::ScrolledContentsLayer)) {
-        GraphicsLayer::PlatformLayerID layerID;
-        if (!decoder.decode(layerID))
-            return false;
-        node.setScrolledContentsLayer(layerID);
-    }
-
     if (node.hasChangedProperty(ScrollingStateFrameScrollingNode::CounterScrollingLayer)) {
         GraphicsLayer::PlatformLayerID layerID;
         if (!decoder.decode(layerID))
@@ -281,13 +278,6 @@ bool ArgumentCoder<ScrollingStateOverflowScrollingNode>::decode(Decoder& decoder
     if (!decoder.decode(static_cast<ScrollingStateScrollingNode&>(node)))
         return false;
 
-    if (node.hasChangedProperty(ScrollingStateOverflowScrollingNode::ScrolledContentsLayer)) {
-        GraphicsLayer::PlatformLayerID layerID;
-        if (!decoder.decode(layerID))
-            return false;
-        node.setScrolledContentsLayer(layerID);
-    }
-
     return true;
 }
 
@@ -483,6 +473,9 @@ static void dump(TextStream& ts, const ScrollingStateScrollingNode& node, bool c
         ts.dumpProperty("requested-scroll-position", node.requestedScrollPosition());
         ts.dumpProperty("requested-scroll-position-is-programatic", node.requestedScrollPositionRepresentsProgrammaticScroll());
     }
+
+    if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::ScrolledContentsLayer))
+        ts.dumpProperty("scrolled-contents-layer", static_cast<GraphicsLayer::PlatformLayerID>(node.scrolledContentsLayer()));
 }
     
 static void dump(TextStream& ts, const ScrollingStateFrameScrollingNode& node, bool changedPropertiesOnly)
@@ -530,9 +523,6 @@ static void dump(TextStream& ts, const ScrollingStateFrameScrollingNode& node, b
     if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateFrameScrollingNode::FrameScaleFactor))
         ts.dumpProperty("frame-scale-factor", node.frameScaleFactor());
 
-    if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateFrameScrollingNode::ScrolledContentsLayer))
-        ts.dumpProperty("scrolled-contents-layer", static_cast<GraphicsLayer::PlatformLayerID>(node.scrolledContentsLayer()));
-
     if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateFrameScrollingNode::InsetClipLayer))
         ts.dumpProperty("clip-inset-layer", static_cast<GraphicsLayer::PlatformLayerID>(node.insetClipLayer()));
 
@@ -549,9 +539,6 @@ static void dump(TextStream& ts, const ScrollingStateFrameScrollingNode& node, b
 static void dump(TextStream& ts, const ScrollingStateOverflowScrollingNode& node, bool changedPropertiesOnly)
 {
     dump(ts, static_cast<const ScrollingStateScrollingNode&>(node), changedPropertiesOnly);
-    
-    if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateOverflowScrollingNode::ScrolledContentsLayer))
-        ts.dumpProperty("scrolled-contents-layer", static_cast<GraphicsLayer::PlatformLayerID>(node.scrolledContentsLayer()));
 }
 
 static void dump(TextStream& ts, const ScrollingStateFixedNode& node, bool changedPropertiesOnly)
index 383df58..e5d1eb7 100644 (file)
@@ -106,7 +106,7 @@ void RemoteScrollingCoordinatorProxy::connectStateNodeLayers(ScrollingStateTree&
         case FrameScrollingNode: {
             ScrollingStateFrameScrollingNode& scrollingStateNode = downcast<ScrollingStateFrameScrollingNode>(*currNode);
             
-            if (scrollingStateNode.hasChangedProperty(ScrollingStateFrameScrollingNode::ScrolledContentsLayer))
+            if (scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::ScrolledContentsLayer))
                 scrollingStateNode.setScrolledContentsLayer(layerTreeHost.getLayer(scrollingStateNode.scrolledContentsLayer()));
 
             if (scrollingStateNode.hasChangedProperty(ScrollingStateFrameScrollingNode::CounterScrollingLayer))
@@ -129,7 +129,7 @@ void RemoteScrollingCoordinatorProxy::connectStateNodeLayers(ScrollingStateTree&
         case OverflowScrollingNode: {
             ScrollingStateOverflowScrollingNode& scrollingStateNode = downcast<ScrollingStateOverflowScrollingNode>(*currNode);
 
-            if (scrollingStateNode.hasChangedProperty(ScrollingStateOverflowScrollingNode::ScrolledContentsLayer))
+            if (scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::ScrolledContentsLayer))
                 scrollingStateNode.setScrolledContentsLayer(layerTreeHost.getLayer(scrollingStateNode.scrolledContentsLayer()));
             break;
         }
index 879a98d..433d38e 100644 (file)
@@ -172,7 +172,7 @@ void ScrollingTreeOverflowScrollingNodeIOS::commitStateBeforeChildren(const WebC
     if (scrollingStateNode.hasChangedProperty(ScrollingStateNode::ScrollLayer))
         m_scrollLayer = scrollingStateNode.layer();
 
-    if (scrollingStateNode.hasChangedProperty(ScrollingStateOverflowScrollingNode::ScrolledContentsLayer))
+    if (scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::ScrolledContentsLayer))
         m_scrolledContentsLayer = scrollingStateNode.scrolledContentsLayer();
 }
 
index 1debadd..28d3959 100644 (file)
@@ -63,7 +63,7 @@ void RemoteScrollingCoordinatorProxy::connectStateNodeLayers(ScrollingStateTree&
             if (scrollingStateNode.hasChangedProperty(ScrollingStateNode::ScrollLayer))
                 scrollingStateNode.setLayer(layerRepresentationFromLayerOrView(layerTreeHost.getLayer(scrollingStateNode.layer())));
             
-            if (scrollingStateNode.hasChangedProperty(ScrollingStateOverflowScrollingNode::ScrolledContentsLayer))
+            if (scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::ScrolledContentsLayer))
                 scrollingStateNode.setScrolledContentsLayer(layerRepresentationFromLayerOrView(layerTreeHost.getLayer(scrollingStateNode.scrolledContentsLayer())));
             break;
         };