summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webplugin_impl.h
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-20 01:45:12 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-20 01:45:12 +0000
commit0405e11991b06184e1a03ab7b56c2a695714678c (patch)
tree7eef0fd3811e0fe0c877f8a48fd5ff5d5fe122d9 /webkit/glue/webplugin_impl.h
parente4182160e5cfb36d623ca3f7baef71ea4fd980af (diff)
downloadchromium_src-0405e11991b06184e1a03ab7b56c2a695714678c.zip
chromium_src-0405e11991b06184e1a03ab7b56c2a695714678c.tar.gz
chromium_src-0405e11991b06184e1a03ab7b56c2a695714678c.tar.bz2
The street view in Google maps, which is implemented with a windowed flash plugin would draw over the iframe DOM
element, effectively hiding it. This is handled by our IFrame shim geometry calculation, where we subtract the rect of any IFrame above the plugin in the ZOrder from the plugin rect. Webkit calls Widget::setFrameRect at various times, during layout/size changes/paints, etc. The reason this bug showed up, was due to an optimization in our setFrameRect implementation, where we would bail out if the rect passed in was the same size as the current plugin rect. Basically the IFrame appears above the plugin in the ZOrder much later, which causes us to return without sending over the cutout rects to the browser when it moves the plugin windows. Fix is to move the rects equality check to WebPluginImpl::setFrameRect, where we don't send over the UpdateGeometry IPC to the plugin process if the rects are the same. WebPluginImpl used to implement the webkit Widget interface a long time ago. This is no longer the case. So some of the functions don't need to be virtual anymore. I also made this change. This fixes bug http://b/issue?id=1722236 and http://code.google.com/p/chromium/issues/detail?id=8858 Bug=1722236,8858 Review URL: http://codereview.chromium.org/42413 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12179 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webplugin_impl.h')
-rw-r--r--webkit/glue/webplugin_impl.h30
1 files changed, 17 insertions, 13 deletions
diff --git a/webkit/glue/webplugin_impl.h b/webkit/glue/webplugin_impl.h
index 4736510..e5a526d 100644
--- a/webkit/glue/webplugin_impl.h
+++ b/webkit/glue/webplugin_impl.h
@@ -200,7 +200,7 @@ class WebPluginImpl : public WebPlugin,
void InvalidateRect(const gfx::Rect& rect);
// Widget implementation:
- virtual WebCore::IntRect windowClipRect() const;
+ WebCore::IntRect windowClipRect() const;
// Returns window-relative rectangles that should clip this widget.
// Only rects that intersect the given bounds are relevant.
@@ -211,24 +211,28 @@ class WebPluginImpl : public WebPlugin,
void windowCutoutRects(const WebCore::IntRect& bounds,
WTF::Vector<WebCore::IntRect>* rects) const;
- // Override for when our window changes size or position.
+ // Called by WebPluginContainer::setFrameRect, which overrides
+ // Widget setFrameRect when our window changes size or position.
// Used to notify the plugin when the size or position changes.
- virtual void setFrameRect(const WebCore::IntRect& rect);
+ void setFrameRect(const WebCore::IntRect& rect,
+ bool widget_dimensions_changed);
- // Overrides paint so we can notify the underlying widget to repaint.
- virtual void paint(WebCore::GraphicsContext*, const WebCore::IntRect& rect);
- virtual void print(WebCore::GraphicsContext*);
+ // Called by WebPluginContainer::paint, which overrides Widget::paint so we
+ // can notify the underlying widget to repaint.
+ void paint(WebCore::GraphicsContext*, const WebCore::IntRect& rect);
+ void print(WebCore::GraphicsContext*);
- // Override setFocus so we can notify the Plugin.
- virtual void setFocus();
+ // Called by WebPluginContainer::setFocus, which overrides Widget::setFocus.
+ // Notifies the plugin about focus changes.
+ void setFocus();
- // Override show and hide to be able to control the visible state of the
- // plugin window.
- virtual void show();
- virtual void hide();
+ // Called by WebPluginContainer::show/hide, which overrides Widget show/hide.
+ // This allows us to control the visible state of the plugin window.
+ void show();
+ void hide();
// Handle widget events.
- virtual void handleEvent(WebCore::Event* event);
+ void handleEvent(WebCore::Event* event);
void handleMouseEvent(WebCore::MouseEvent* event);
void handleKeyboardEvent(WebCore::KeyboardEvent* event);