summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webplugin_impl.cc
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-16 01:26:08 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-16 01:26:08 +0000
commit6b2ebf86a61169856aa3e650c294fd3511da5ee3 (patch)
tree738917bf517c07bfaf9fc4806dbd91f53df0c1fe /webkit/glue/webplugin_impl.cc
parent0af12ab12a6888c29b631f58af5f9c28e99657b1 (diff)
downloadchromium_src-6b2ebf86a61169856aa3e650c294fd3511da5ee3.zip
chromium_src-6b2ebf86a61169856aa3e650c294fd3511da5ee3.tar.gz
chromium_src-6b2ebf86a61169856aa3e650c294fd3511da5ee3.tar.bz2
Fix a painting problem observed with windowless flash plugins, when they are initially created with a zero clip
rect, which eventually changes to a non zero clip rect. We don't send over geometry updates to the plugin if the window dimensions don't change, which is true in this case. This causes the plugin process to not send over paints to the renderer process as the plugin clip rect remains zero. The fix based on a discussion with John is to remove the check for whether the plugin dimensions changed and always send over the update geometry IPC to the plugin, where we do check whether these rects changed before calling the underlying plugin. This fixes bug http://code.google.com/p/chromium/issues/detail?id=10536 I am trying to come up with a unit test for this case. Will add it to this CB or submit those as a separate CB. Bug=10536 Review URL: http://codereview.chromium.org/73071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13822 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webplugin_impl.cc')
-rw-r--r--webkit/glue/webplugin_impl.cc24
1 files changed, 7 insertions, 17 deletions
diff --git a/webkit/glue/webplugin_impl.cc b/webkit/glue/webplugin_impl.cc
index 195fb16..24748cc 100644
--- a/webkit/glue/webplugin_impl.cc
+++ b/webkit/glue/webplugin_impl.cc
@@ -133,12 +133,8 @@ bool WebPluginContainer::isPluginView() const {
void WebPluginContainer::setFrameRect(const WebCore::IntRect& rect) {
- bool widget_dimensions_changed = (rect != frameRect());
-
- if (widget_dimensions_changed)
- WebCore::Widget::setFrameRect(rect);
-
- impl_->setFrameRect(rect, widget_dimensions_changed);
+ WebCore::Widget::setFrameRect(rect);
+ impl_->setFrameRect(rect);
}
void WebPluginContainer::paint(WebCore::GraphicsContext* gc,
@@ -198,7 +194,7 @@ void WebPluginContainer::frameRectsChanged() {
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(), true);
+ impl_->setFrameRect(frameRect());
}
// We override this function, to make sure that geometry updates are sent
@@ -221,7 +217,7 @@ void WebPluginContainer::setParentVisible(bool visible) {
void WebPluginContainer::setParent(WebCore::ScrollView* view) {
WebCore::Widget::setParent(view);
if (view) {
- impl_->setFrameRect(frameRect(), true);
+ impl_->setFrameRect(frameRect());
impl_->delegate_->FlushGeometryUpdates();
}
}
@@ -639,8 +635,7 @@ void WebPluginImpl::windowCutoutRects(
}
}
-void WebPluginImpl::setFrameRect(const WebCore::IntRect& rect,
- bool widget_dimensions_changed) {
+void WebPluginImpl::setFrameRect(const WebCore::IntRect& rect) {
if (!parent())
return;
@@ -660,13 +655,8 @@ void WebPluginImpl::setFrameRect(const WebCore::IntRect& rect,
std::vector<gfx::Rect> cutout_rects;
CalculateBounds(rect, &window_rect, &clip_rect, &cutout_rects);
- if (widget_dimensions_changed) {
- // Notify the plugin that its parameters have changed.
- delegate_->UpdateGeometry(
- webkit_glue::FromIntRect(window_rect),
- webkit_glue::FromIntRect(clip_rect));
- }
-
+ delegate_->UpdateGeometry(webkit_glue::FromIntRect(window_rect),
+ webkit_glue::FromIntRect(clip_rect));
if (window_) {
// Notify the window hosting the plugin (the WebViewDelegate) that
// it needs to adjust the plugin, so that all the HWNDs can be moved