summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-12 01:53:41 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-12 01:53:41 +0000
commit3f366001f70b1ef4b8884796970cefb0769c469f (patch)
treeab8c1040dc4cccfd420d1241bdcf4c1da37db238
parent56c91f06705c80cf29fa04743aaba6ab364f4005 (diff)
downloadchromium_src-3f366001f70b1ef4b8884796970cefb0769c469f.zip
chromium_src-3f366001f70b1ef4b8884796970cefb0769c469f.tar.gz
chromium_src-3f366001f70b1ef4b8884796970cefb0769c469f.tar.bz2
Bring back overriding setParentVisible, since it's needed when a page scripts the parent element to make it invisible/visible.
BUG=8657 Review URL: http://codereview.chromium.org/45005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11508 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--webkit/glue/webplugin_impl.cc13
-rw-r--r--webkit/glue/webplugin_impl.h1
2 files changed, 14 insertions, 0 deletions
diff --git a/webkit/glue/webplugin_impl.cc b/webkit/glue/webplugin_impl.cc
index 8449b89..09b6974 100644
--- a/webkit/glue/webplugin_impl.cc
+++ b/webkit/glue/webplugin_impl.cc
@@ -207,6 +207,19 @@ void WebPluginContainer::frameRectsChanged() {
impl_->setFrameRect(frameRect());
}
+// We override this function, to make sure that geometry updates are sent
+// over to the plugin. For e.g. when a plugin is instantiated it does
+// not have a valid parent. As a result the first geometry update from
+// webkit is ignored. This function is called when the plugin eventually
+// gets a parent.
+void WebPluginContainer::setParentVisible(bool visible) {
+ WebCore::Widget::setParentVisible(visible);
+ if (visible)
+ show();
+ else
+ hide();
+}
+
// We override this function so that if the plugin is windowed, we can call
// NPP_SetWindow at the first possible moment. This ensures that NPP_SetWindow
// is called before the manual load data is sent to a plugin. If this order is
diff --git a/webkit/glue/webplugin_impl.h b/webkit/glue/webplugin_impl.h
index d2c9988..1373caf 100644
--- a/webkit/glue/webplugin_impl.h
+++ b/webkit/glue/webplugin_impl.h
@@ -67,6 +67,7 @@ class WebPluginContainer : public WebCore::Widget {
virtual void hide();
virtual void handleEvent(WebCore::Event* event);
virtual void frameRectsChanged();
+ virtual void setParentVisible(bool visible);
virtual void setParent(WebCore::ScrollView* view);
#if USE(JSC)