Fix "ASSERTION FAILED: m_representation == PlatformLayerRepresentation" with UI-side...
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 May 2014 04:15:16 +0000 (04:15 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 May 2014 04:15:16 +0000 (04:15 +0000)
https://bugs.webkit.org/show_bug.cgi?id=132899

Reviewed by Beth Dakin.

Source/WebCore:

Export some things

* WebCore.exp.in:

Source/WebKit2:

The new InsetClipLayer and ContentShadowLayer members on scrolling nodes
need to be correctly encoded/decoded for UI-side compositing, and dumped
correctly.

* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(ArgumentCoder<ScrollingStateScrollingNode>::encode):
(ArgumentCoder<ScrollingStateScrollingNode>::decode):
(WebKit::RemoteScrollingTreeTextStream::dump):
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):

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

Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp
Source/WebKit2/UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp

index ca8dd00..1a88dd5 100644 (file)
@@ -1,3 +1,14 @@
+2014-05-13  Simon Fraser  <simon.fraser@apple.com>
+
+        Fix "ASSERTION FAILED: m_representation == PlatformLayerRepresentation" with UI-side compositing
+        https://bugs.webkit.org/show_bug.cgi?id=132899
+
+        Reviewed by Beth Dakin.
+
+        Export some things
+
+        * WebCore.exp.in:
+
 2014-05-13  Hans Muller  <hmuller@adobe.com>
 
         [CSS Shapes] line height grows around polygon and incorrectly causes text to wrap to next line
index 6dd059f..f9820c1 100644 (file)
@@ -2821,10 +2821,12 @@ __ZN7WebCore27ScrollingStateScrollingNode15setFooterHeightEi
 __ZN7WebCore27ScrollingStateScrollingNode15setHeaderHeightEi
 __ZN7WebCore27ScrollingStateScrollingNode15setScrollOriginERKNS_8IntPointE
 __ZN7WebCore27ScrollingStateScrollingNode15setViewportSizeERKNS_9FloatSizeE
+__ZN7WebCore27ScrollingStateScrollingNode17setInsetClipLayerERKNS_19LayerRepresentationE
 __ZN7WebCore27ScrollingStateScrollingNode17setScrollPositionERKNS_10FloatPointE
 __ZN7WebCore27ScrollingStateScrollingNode18setTopContentInsetEf
 __ZN7WebCore27ScrollingStateScrollingNode19setFrameScaleFactorEf
 __ZN7WebCore27ScrollingStateScrollingNode20setTotalContentsSizeERKNS_7IntSizeE
+__ZN7WebCore27ScrollingStateScrollingNode21setContentShadowLayerERKNS_19LayerRepresentationE
 __ZN7WebCore27ScrollingStateScrollingNode24setCounterScrollingLayerERKNS_19LayerRepresentationE
 __ZN7WebCore27ScrollingStateScrollingNode24setScrolledContentsLayerERKNS_19LayerRepresentationE
 __ZN7WebCore27ScrollingStateScrollingNode25setWheelEventHandlerCountEj
index 55b2ae4..9fbfa25 100644 (file)
@@ -1,3 +1,21 @@
+2014-05-13  Simon Fraser  <simon.fraser@apple.com>
+
+        Fix "ASSERTION FAILED: m_representation == PlatformLayerRepresentation" with UI-side compositing
+        https://bugs.webkit.org/show_bug.cgi?id=132899
+
+        Reviewed by Beth Dakin.
+        
+        The new InsetClipLayer and ContentShadowLayer members on scrolling nodes
+        need to be correctly encoded/decoded for UI-side compositing, and dumped
+        correctly.
+
+        * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
+        (ArgumentCoder<ScrollingStateScrollingNode>::encode):
+        (ArgumentCoder<ScrollingStateScrollingNode>::decode):
+        (WebKit::RemoteScrollingTreeTextStream::dump):
+        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
+        (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
+
 2014-05-13  Anders Carlsson  <andersca@apple.com>
 
         Another build fix.
index 1f25c0d..1bf483e 100644 (file)
@@ -133,6 +133,12 @@ void ArgumentCoder<ScrollingStateScrollingNode>::encode(ArgumentEncoder& encoder
 
     if (node.hasChangedProperty(ScrollingStateScrollingNode::CounterScrollingLayer))
         encoder << static_cast<GraphicsLayer::PlatformLayerID>(node.counterScrollingLayer());
+
+    if (node.hasChangedProperty(ScrollingStateScrollingNode::InsetClipLayer))
+        encoder << static_cast<GraphicsLayer::PlatformLayerID>(node.insetClipLayer());
+
+    if (node.hasChangedProperty(ScrollingStateScrollingNode::ContentShadowLayer))
+        encoder << static_cast<GraphicsLayer::PlatformLayerID>(node.contentShadowLayer());
 }
 
 #define SCROLLING_NODE_DECODE(property, type, setter) \
@@ -197,6 +203,20 @@ bool ArgumentCoder<ScrollingStateScrollingNode>::decode(ArgumentDecoder& decoder
         node.setCounterScrollingLayer(layerID);
     }
 
+    if (node.hasChangedProperty(ScrollingStateScrollingNode::InsetClipLayer)) {
+        GraphicsLayer::PlatformLayerID layerID;
+        if (!decoder.decode(layerID))
+            return false;
+        node.setInsetClipLayer(layerID);
+    }
+
+    if (node.hasChangedProperty(ScrollingStateScrollingNode::ContentShadowLayer)) {
+        GraphicsLayer::PlatformLayerID layerID;
+        if (!decoder.decode(layerID))
+            return false;
+        node.setContentShadowLayer(layerID);
+    }
+
     return true;
 }
 
@@ -528,6 +548,9 @@ void RemoteScrollingTreeTextStream::dump(const ScrollingStateScrollingNode& node
     if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::InsetClipLayer))
         dumpProperty(ts, "clip-inset-layer", static_cast<GraphicsLayer::PlatformLayerID>(node.insetClipLayer()));
 
+    if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::ContentShadowLayer))
+        dumpProperty(ts, "content-shadow-layer", static_cast<GraphicsLayer::PlatformLayerID>(node.contentShadowLayer()));
+
     if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::HeaderLayer))
         dumpProperty(ts, "header-layer", static_cast<GraphicsLayer::PlatformLayerID>(node.headerLayer()));
 
index 057132c..72a87f5 100644 (file)
@@ -108,6 +108,12 @@ void RemoteScrollingCoordinatorProxy::connectStateNodeLayers(ScrollingStateTree&
             if (scrollingStateNode->hasChangedProperty(ScrollingStateScrollingNode::CounterScrollingLayer))
                 scrollingStateNode->setCounterScrollingLayer(layerTreeHost.getLayer(scrollingStateNode->counterScrollingLayer()));
 
+            if (scrollingStateNode->hasChangedProperty(ScrollingStateScrollingNode::InsetClipLayer))
+                scrollingStateNode->setInsetClipLayer(layerTreeHost.getLayer(scrollingStateNode->insetClipLayer()));
+
+            if (scrollingStateNode->hasChangedProperty(ScrollingStateScrollingNode::ContentShadowLayer))
+                scrollingStateNode->setContentShadowLayer(layerTreeHost.getLayer(scrollingStateNode->contentShadowLayer()));
+
             // FIXME: we should never have header and footer layers coming from the WebProcess.
             if (scrollingStateNode->hasChangedProperty(ScrollingStateScrollingNode::HeaderLayer))
                 scrollingStateNode->setHeaderLayer(layerTreeHost.getLayer(scrollingStateNode->headerLayer()));