Chromium Code Reviews| Index: Source/web/ChromeClientImpl.cpp |
| diff --git a/Source/web/ChromeClientImpl.cpp b/Source/web/ChromeClientImpl.cpp |
| index 080d23627072e3a2a1c9b8e4e8638356c79de991..3f3f3785662240c5b7191e4b1f0be661e0ffd9c2 100644 |
| --- a/Source/web/ChromeClientImpl.cpp |
| +++ b/Source/web/ChromeClientImpl.cpp |
| @@ -92,6 +92,7 @@ |
| #include "web/ExternalPopupMenu.h" |
| #include "web/PopupMenuChromium.h" |
| #include "web/WebFileChooserCompletionImpl.h" |
| +#include "web/WebFrameWidgetImpl.h" |
| #include "web/WebInputEventConversion.h" |
| #include "web/WebLocalFrameImpl.h" |
| #include "web/WebPluginContainerImpl.h" |
| @@ -492,8 +493,13 @@ void ChromeClientImpl::scheduleAnimation() |
| void ChromeClientImpl::scheduleAnimationForFrame(LocalFrame* localRoot) |
| { |
| - // FIXME: This will proxy to a WebWidget attached to the WebLocalFrameImpl. |
| - scheduleAnimation(); |
| + ASSERT(WebLocalFrameImpl::fromFrame(localRoot)); |
| + // If the frame is still being created, it might not yet have a WebWidget. |
|
dcheng
2014/12/10 21:00:58
I guess I don't understand--why are we scheduling
kenrb
2014/12/11 20:21:21
It is called during attachment of the Document's r
dcheng
2014/12/11 23:31:45
Is this going to be temporary code? I'm OK with th
kenrb
2014/12/16 18:51:00
The call to ChromeClientImpl::scheduleAnimation()
dcheng
2014/12/16 20:13:06
A WebView is a WebWidget, so you can never have on
|
| + if (!WebLocalFrameImpl::fromFrame(localRoot)->frameWidget()) { |
|
Nate Chapin
2014/12/10 19:19:03
Style nit: {} not necessary on this if-else
kenrb
2014/12/11 20:21:21
Done.
|
| + scheduleAnimation(); |
| + } else { |
| + WebLocalFrameImpl::fromFrame(localRoot)->frameWidget()->scheduleAnimation(); |
| + } |
| } |
| IntRect ChromeClientImpl::rootViewToScreen(const IntRect& rect) const |
| @@ -695,8 +701,15 @@ GraphicsLayerFactory* ChromeClientImpl::graphicsLayerFactory() const |
| void ChromeClientImpl::attachRootGraphicsLayer(GraphicsLayer* rootLayer, LocalFrame* localRoot) |
| { |
| - // FIXME: Add call to frame's widget for non-zero frames. |
| - m_webView->setRootGraphicsLayer(rootLayer); |
| + // FIXME: For top-level frames we still use the WebView as a WebWidget. This special |
| + // case will be removed when top-level frames get WebFrameWidgets. |
| + if (localRoot->isMainFrame()) { |
| + m_webView->setRootGraphicsLayer(rootLayer); |
| + } else { |
| + WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(localRoot); |
| + ASSERT(webFrame && webFrame->frameWidget()); |
|
ncarter (slow)
2014/12/10 20:16:06
After patching in this change, this ASSERT seems t
kenrb
2014/12/11 20:21:21
This is an artifact of me not testing without the
|
| + webFrame->frameWidget()->setRootGraphicsLayer(rootLayer); |
| + } |
| } |
| void ChromeClientImpl::enterFullScreenForElement(Element* element) |