summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webplugin_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/glue/webplugin_impl.cc')
-rw-r--r--webkit/glue/webplugin_impl.cc13
1 files changed, 13 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