summaryrefslogtreecommitdiffstats
path: root/WebKit/chromium/src/FrameLoaderClientImpl.cpp
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-10-22 13:02:20 +0100
committerBen Murdoch <benm@google.com>2010-10-26 15:21:41 +0100
commita94275402997c11dd2e778633dacf4b7e630a35d (patch)
treee66f56c67e3b01f22c9c23cd932271ee9ac558ed /WebKit/chromium/src/FrameLoaderClientImpl.cpp
parent09e26c78506587b3f5d930d7bc72a23287ffbec0 (diff)
downloadexternal_webkit-a94275402997c11dd2e778633dacf4b7e630a35d.zip
external_webkit-a94275402997c11dd2e778633dacf4b7e630a35d.tar.gz
external_webkit-a94275402997c11dd2e778633dacf4b7e630a35d.tar.bz2
Merge WebKit at r70209: Initial merge by Git
Change-Id: Id23a68efa36e9d1126bcce0b137872db00892c8e
Diffstat (limited to 'WebKit/chromium/src/FrameLoaderClientImpl.cpp')
-rw-r--r--WebKit/chromium/src/FrameLoaderClientImpl.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/WebKit/chromium/src/FrameLoaderClientImpl.cpp b/WebKit/chromium/src/FrameLoaderClientImpl.cpp
index ba9c8fd..b4c62f4 100644
--- a/WebKit/chromium/src/FrameLoaderClientImpl.cpp
+++ b/WebKit/chromium/src/FrameLoaderClientImpl.cpp
@@ -1072,7 +1072,11 @@ void FrameLoaderClientImpl::committedLoad(DocumentLoader* loader, const char* da
m_pluginWidget->didReceiveResponse(
m_webFrame->frame()->loader()->activeDocumentLoader()->response());
}
- m_pluginWidget->didReceiveData(data, length);
+
+ // It's possible that the above call removed the pointer to the plugin, so
+ // check before calling it.
+ if (m_pluginWidget.get())
+ m_pluginWidget->didReceiveData(data, length);
}
}
@@ -1411,14 +1415,6 @@ PassRefPtr<Widget> FrameLoaderClientImpl::createPlugin(
if (!webPlugin->initialize(container.get()))
return 0;
- bool zoomTextOnly = m_webFrame->viewImpl()->zoomTextOnly();
- float zoomFactor = zoomTextOnly ? m_webFrame->frame()->textZoomFactor() : m_webFrame->frame()->pageZoomFactor();
- if (zoomFactor != 1) {
- // There's a saved zoom level, so tell the plugin about it since
- // WebViewImpl::setZoomLevel was called before the plugin was created.
- webPlugin->setZoomFactor(zoomFactor, zoomTextOnly);
- }
-
// The element might have been removed during plugin initialization!
if (!element->renderer())
return 0;
@@ -1430,7 +1426,8 @@ PassRefPtr<Widget> FrameLoaderClientImpl::createPlugin(
// (e.g., acrobat reader).
void FrameLoaderClientImpl::redirectDataToPlugin(Widget* pluginWidget)
{
- m_pluginWidget = static_cast<WebPluginContainerImpl*>(pluginWidget);
+ if (pluginWidget->isPluginContainer())
+ m_pluginWidget = static_cast<WebPluginContainerImpl*>(pluginWidget);
ASSERT(m_pluginWidget.get());
}