From: simon.fraser@apple.com Date: Wed, 14 May 2014 04:15:16 +0000 (+0000) Subject: Fix "ASSERTION FAILED: m_representation == PlatformLayerRepresentation" with UI-side... X-Git-Url: http://git.webkit.org/?p=WebKit-https.git;a=commitdiff_plain;h=750cb783cffb0e2ee86c0a07123b1be73fa4e5fd Fix "ASSERTION FAILED: m_representation == PlatformLayerRepresentation" with UI-side compositing 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::encode): (ArgumentCoder::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 --- diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index ca8dd00..1a88dd5 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,14 @@ +2014-05-13 Simon Fraser + + 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 [CSS Shapes] line height grows around polygon and incorrectly causes text to wrap to next line diff --git a/Source/WebCore/WebCore.exp.in b/Source/WebCore/WebCore.exp.in index 6dd059f..f9820c1 100644 --- a/Source/WebCore/WebCore.exp.in +++ b/Source/WebCore/WebCore.exp.in @@ -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 diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog index 55b2ae4..9fbfa25 100644 --- a/Source/WebKit2/ChangeLog +++ b/Source/WebKit2/ChangeLog @@ -1,3 +1,21 @@ +2014-05-13 Simon Fraser + + 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::encode): + (ArgumentCoder::decode): + (WebKit::RemoteScrollingTreeTextStream::dump): + * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp: + (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers): + 2014-05-13 Anders Carlsson Another build fix. diff --git a/Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp b/Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp index 1f25c0d..1bf483e 100644 --- a/Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp +++ b/Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp @@ -133,6 +133,12 @@ void ArgumentCoder::encode(ArgumentEncoder& encoder if (node.hasChangedProperty(ScrollingStateScrollingNode::CounterScrollingLayer)) encoder << static_cast(node.counterScrollingLayer()); + + if (node.hasChangedProperty(ScrollingStateScrollingNode::InsetClipLayer)) + encoder << static_cast(node.insetClipLayer()); + + if (node.hasChangedProperty(ScrollingStateScrollingNode::ContentShadowLayer)) + encoder << static_cast(node.contentShadowLayer()); } #define SCROLLING_NODE_DECODE(property, type, setter) \ @@ -197,6 +203,20 @@ bool ArgumentCoder::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(node.insetClipLayer())); + if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::ContentShadowLayer)) + dumpProperty(ts, "content-shadow-layer", static_cast(node.contentShadowLayer())); + if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::HeaderLayer)) dumpProperty(ts, "header-layer", static_cast(node.headerLayer())); diff --git a/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp b/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp index 057132ca..72a87f5 100644 --- a/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp +++ b/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp @@ -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()));