summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webplugin_impl.h
diff options
context:
space:
mode:
authorojan@google.com <ojan@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-09 21:58:05 +0000
committerojan@google.com <ojan@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-09 21:58:05 +0000
commit8a2820a90f85f91c500a9d382f8e8ba870fb621c (patch)
tree8d8bd23228cd1e6455e64b0de46e961947459382 /webkit/glue/webplugin_impl.h
parent283f76091ad757bdc17c6d9090209eade4211075 (diff)
downloadchromium_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 'webkit/glue/webplugin_impl.h')
-rw-r--r--webkit/glue/webplugin_impl.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/webkit/glue/webplugin_impl.h b/webkit/glue/webplugin_impl.h
index b7a4dab..781369e 100644
--- a/webkit/glue/webplugin_impl.h
+++ b/webkit/glue/webplugin_impl.h
@@ -15,6 +15,7 @@
#include "ResourceHandleClient.h"
#include "ResourceRequest.h"
#include "Widget.h"
+#include "Vector.h"
#pragma warning(pop)
#include "base/basictypes.h"
@@ -64,6 +65,13 @@ class WebPluginContainer : public WebCore::Widget {
virtual void attachToWindow();
virtual void detachFromWindow();
+ // Returns window-relative rectangles that should clip this widget.
+ // Use this to implement iframe shim behavior.
+ //
+ // TODO(tulrich): add this method to WebCore/platform/Widget.h so it
+ // can be used by any platform.
+ void windowCutoutRects(WTF::Vector<WebCore::IntRect>* cutouts) const;
+
// These methods are invoked from webkit when it has data to be sent to the
// plugin. The plugin in this case does not initiate a download for the data.
void didReceiveResponse(const WebCore::ResourceResponse& response);
@@ -176,6 +184,13 @@ class WebPluginImpl : public WebPlugin,
virtual WebCore::IntRect windowClipRect() const;
virtual void geometryChanged() const;
+ // Returns window-relative rectangles that should clip this widget.
+ // Use this to implement iframe shim behavior.
+ //
+ // TODO(tulrich): windowCutoutRects() is not in WebCore::Widgets
+ // yet; need to add it.
+ void windowCutoutRects(WTF::Vector<WebCore::IntRect>* rects) const;
+
// Override for when our window changes size or position.
// Used to notify the plugin when the size or position changes.
virtual void setFrameGeometry(const WebCore::IntRect& rect);
@@ -235,7 +250,8 @@ class WebPluginImpl : public WebPlugin,
// Calculates the bounds of the plugin widget based on the frame rect passed in.
void CalculateBounds(const WebCore::IntRect& frame_rect,
WebCore::IntRect* window_rect,
- WebCore::IntRect* clip_rect);
+ WebCore::IntRect* clip_rect,
+ std::vector<gfx::Rect>* cutout_rects);
void HandleURLRequest(const char *method,
bool is_javascript_url,