Index: third_party/WebKit/Source/web/ChromeClientImpl.cpp |
diff --git a/third_party/WebKit/Source/web/ChromeClientImpl.cpp b/third_party/WebKit/Source/web/ChromeClientImpl.cpp |
index f081d46663df622becb2c4881350200450e9306e..4d24be35443228d0754cdf97dce901129f26620c 100644 |
--- a/third_party/WebKit/Source/web/ChromeClientImpl.cpp |
+++ b/third_party/WebKit/Source/web/ChromeClientImpl.cpp |
@@ -795,6 +795,7 @@ String ChromeClientImpl::acceptLanguages() |
void ChromeClientImpl::attachRootGraphicsLayer(GraphicsLayer* rootLayer, LocalFrame* localFrame) |
{ |
+ DCHECK(!RuntimeEnabledFeatures::slimmingPaintV2Enabled()); |
WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(localFrame)->localRoot(); |
// This method can be called while the frame is being detached. In that |
@@ -804,11 +805,15 @@ void ChromeClientImpl::attachRootGraphicsLayer(GraphicsLayer* rootLayer, LocalFr |
webFrame->frameWidget()->setRootGraphicsLayer(rootLayer); |
} |
-void ChromeClientImpl::didPaint(const PaintArtifact& paintArtifact) |
+void ChromeClientImpl::attachRootLayer(WebLayer* rootLayer, LocalFrame* localFrame) |
{ |
- // TODO(jbroman): This doesn't handle OOPIF correctly. We probably need a |
- // branch for WebFrameWidget, like attachRootGraphicsLayer. |
- m_webView->getPaintArtifactCompositor().update(paintArtifact); |
+ WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(localFrame)->localRoot(); |
+ |
+ // This method can be called while the frame is being detached. In that |
+ // case, the rootLayer is null, and the widget is already destroyed. |
+ DCHECK(webFrame->frameWidget() || !rootLayer); |
+ if (webFrame->frameWidget()) |
+ webFrame->frameWidget()->setRootLayer(rootLayer); |
} |
void ChromeClientImpl::attachCompositorAnimationTimeline(CompositorAnimationTimeline* compositorTimeline, LocalFrame* localFrame) |