Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(186)

Unified Diff: webkit/glue/webplugin_impl.cc

Issue 8775: This fixes bug http://code.google.com/p/chromium/issues/detail?id=3881, which... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/glue/webplugin_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/webplugin_impl.cc
===================================================================
--- webkit/glue/webplugin_impl.cc (revision 4311)
+++ webkit/glue/webplugin_impl.cc (working copy)
@@ -188,6 +188,26 @@
impl_->handleEvent(event);
}
+void WebPluginContainer::frameRectsChanged() const {
+ WebCore::Widget::frameRectsChanged();
+ // This is a hack to tickle re-positioning of the plugin in the case where
+ // our parent view was scrolled.
+ 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();
+}
+
void WebPluginContainer::windowCutoutRects(const WebCore::IntRect& bounds,
WTF::Vector<WebCore::IntRect>*
cutouts) const {
@@ -590,16 +610,6 @@
}
}
-void WebPluginImpl::geometryChanged() const {
- if (!widget_)
- return;
-
- // This is a hack to tickle re-positioning of the plugin in the case where
- // our parent view was scrolled.
- const_cast<WebPluginImpl*>(this)->widget_->setFrameRect(
- widget_->frameRect());
-}
-
void WebPluginImpl::setFrameRect(const WebCore::IntRect& rect) {
// Compute a new position and clip rect for ourselves relative to the
// containing window. We ask our delegate to reposition us accordingly.
« no previous file with comments | « webkit/glue/webplugin_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698