diff options
author | sky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-23 04:19:47 +0000 |
---|---|---|
committer | sky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-23 04:19:47 +0000 |
commit | 0db5c993388a37046746e182cb539da7ba0096e8 (patch) | |
tree | c4e447c5f26fd99601c69c1e2350f7f5742dd01a | |
parent | ad6f567c8f3c2a98f44d85ea133511859117e279 (diff) | |
download | chromium_src-0db5c993388a37046746e182cb539da7ba0096e8.zip chromium_src-0db5c993388a37046746e182cb539da7ba0096e8.tar.gz chromium_src-0db5c993388a37046746e182cb539da7ba0096e8.tar.bz2 |
Backs out r8521 in hopes of greener trees.
BUG=none
TEST=none
TBR=jam
Review URL: http://codereview.chromium.org/18545
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8546 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/renderer_host/render_widget_host.cc | 1 | ||||
-rw-r--r-- | webkit/glue/webplugin_impl.cc | 13 | ||||
-rw-r--r-- | webkit/glue/webplugin_impl.h | 1 |
3 files changed, 14 insertions, 1 deletions
diff --git a/chrome/browser/renderer_host/render_widget_host.cc b/chrome/browser/renderer_host/render_widget_host.cc index 354f54b..7a77a02 100644 --- a/chrome/browser/renderer_host/render_widget_host.cc +++ b/chrome/browser/renderer_host/render_widget_host.cc @@ -473,7 +473,6 @@ void RenderWidgetHost::MovePluginWindows( move.window_rect.width(), move.window_rect.height(), flags); if (!defer_window_pos_info) { - DCHECK(false) << "DeferWindowPos given invalid window, so rest ignored."; return; } } diff --git a/webkit/glue/webplugin_impl.cc b/webkit/glue/webplugin_impl.cc index a095b79..811da21 100644 --- a/webkit/glue/webplugin_impl.cc +++ b/webkit/glue/webplugin_impl.cc @@ -203,6 +203,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 4f6782a..3654d3a 100644 --- a/webkit/glue/webplugin_impl.h +++ b/webkit/glue/webplugin_impl.h @@ -66,6 +66,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) |