diff options
author | ojan@google.com <ojan@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-09 21:58:05 +0000 |
---|---|---|
committer | ojan@google.com <ojan@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-09 21:58:05 +0000 |
commit | 8a2820a90f85f91c500a9d382f8e8ba870fb621c (patch) | |
tree | 8d8bd23228cd1e6455e64b0de46e961947459382 /chrome/renderer | |
parent | 283f76091ad757bdc17c6d9090209eade4211075 (diff) | |
download | chromium_src-8a2820a90f85f91c500a9d382f8e8ba870fb621c.zip chromium_src-8a2820a90f85f91c500a9d382f8e8ba870fb621c.tar.gz chromium_src-8a2820a90f85f91c500a9d382f8e8ba870fb621c.tar.bz2 |
Patch by Thatcher Ulrich <tulrich@google.com>.
Implement "iframe shim" behavior for windowed plugins.
In FF and IE on windows, iframes are implemented as native HWNDs.
This has the side effect that iframes display on top of windowed
plugins. This side effect has long been known as a workaround for
allowing HTML elements to appear above plugin content.
BUG=1788
Review URL: http://codereview.chromium.org/7032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3137 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r-- | chrome/renderer/render_view.cc | 2 | ||||
-rw-r--r-- | chrome/renderer/webplugin_delegate_proxy.cc | 14 | ||||
-rw-r--r-- | chrome/renderer/webplugin_delegate_proxy.h | 5 |
3 files changed, 14 insertions, 7 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index 4fe474d..722e67f 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -9,7 +9,7 @@ #include <vector> #include "base/command_line.h" -#include "base/gfx/bitmap_header.h" +#include "base/gfx/gdi_util.h" #include "base/gfx/bitmap_platform_device_win.h" #include "base/gfx/image_operations.h" #include "base/gfx/native_theme.h" diff --git a/chrome/renderer/webplugin_delegate_proxy.cc b/chrome/renderer/webplugin_delegate_proxy.cc index 1d6e8d21..315fc89 100644 --- a/chrome/renderer/webplugin_delegate_proxy.cc +++ b/chrome/renderer/webplugin_delegate_proxy.cc @@ -183,6 +183,7 @@ void WebPluginDelegateProxy::FlushGeometryUpdates() { Send(new PluginMsg_UpdateGeometry(instance_id_, plugin_rect_, deferred_clip_rect_, + deferred_cutout_rects_, visible_, NULL, NULL)); @@ -333,12 +334,15 @@ void WebPluginDelegateProxy::OnChannelError() { render_view_->PluginCrashed(plugin_path_); } -void WebPluginDelegateProxy::UpdateGeometry(const gfx::Rect& window_rect, - const gfx::Rect& clip_rect, - bool visible) { +void WebPluginDelegateProxy::UpdateGeometry( + const gfx::Rect& window_rect, + const gfx::Rect& clip_rect, + const std::vector<gfx::Rect>& cutout_rects, + bool visible) { plugin_rect_ = window_rect; if (!windowless_) { deferred_clip_rect_ = clip_rect; + deferred_cutout_rects_ = cutout_rects; visible_ = visible; send_deferred_update_geometry_ = true; return; @@ -369,8 +373,8 @@ void WebPluginDelegateProxy::UpdateGeometry(const gfx::Rect& window_rect, } IPC::Message* msg = new PluginMsg_UpdateGeometry( - instance_id_, window_rect, clip_rect, visible, transport_store_handle, - background_store_handle); + instance_id_, window_rect, clip_rect, cutout_rects, visible, + transport_store_handle, background_store_handle); msg->set_unblock(true); Send(msg); } diff --git a/chrome/renderer/webplugin_delegate_proxy.h b/chrome/renderer/webplugin_delegate_proxy.h index 7a7da77..b401baa 100644 --- a/chrome/renderer/webplugin_delegate_proxy.h +++ b/chrome/renderer/webplugin_delegate_proxy.h @@ -52,7 +52,9 @@ class WebPluginDelegateProxy : public WebPluginDelegate, virtual bool Initialize(const GURL& url, char** argn, char** argv, int argc, WebPlugin* plugin, bool load_manually); virtual void UpdateGeometry(const gfx::Rect& window_rect, - const gfx::Rect& clip_rect, bool visible); + const gfx::Rect& clip_rect, + const std::vector<gfx::Rect>& cutout_rects, + bool visible); virtual void Paint(HDC hdc, const gfx::Rect& rect); virtual void Print(HDC hdc); virtual NPObject* GetPluginScriptableObject(); @@ -157,6 +159,7 @@ class WebPluginDelegateProxy : public WebPluginDelegate, gfx::Rect plugin_rect_; gfx::Rect deferred_clip_rect_; + std::vector<gfx::Rect> deferred_cutout_rects_; bool send_deferred_update_geometry_; bool visible_; |