Chromium Code Reviews| 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..ab65d202e26dd8fdf5cffc46089aa1356926221b 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,16 @@ 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); |
| + |
|
pdr.
2016/09/15 20:53:08
Nit: extra space
chrishtr
2016/09/15 21:05:39
Done.
|
| } |
| void ChromeClientImpl::attachCompositorAnimationTimeline(CompositorAnimationTimeline* compositorTimeline, LocalFrame* localFrame) |