summaryrefslogtreecommitdiffstats
path: root/WebCore/plugins
diff options
context:
space:
mode:
authorDerek Sollenberger <djsollen@google.com>2010-03-15 14:22:08 -0400
committerDerek Sollenberger <djsollen@google.com>2010-03-15 14:25:13 -0400
commit840357963b3a1369006e7b640e829ff1dbc0118c (patch)
tree65420e9bb578fe5314567f9227244c7b36f19761 /WebCore/plugins
parent4ed6eaf1ac174470213fa9b70a0e0413213c6095 (diff)
downloadexternal_webkit-840357963b3a1369006e7b640e829ff1dbc0118c.zip
external_webkit-840357963b3a1369006e7b640e829ff1dbc0118c.tar.gz
external_webkit-840357963b3a1369006e7b640e829ff1dbc0118c.tar.bz2
If the plugin is in an IFrame we need to reposition the plugins surface
every time the IFrame changes position within the document. Change-Id: I03090bda439c3a3cac95dce42b3ea37901dc42f8
Diffstat (limited to 'WebCore/plugins')
-rw-r--r--WebCore/plugins/android/PluginViewAndroid.cpp23
1 files changed, 18 insertions, 5 deletions
diff --git a/WebCore/plugins/android/PluginViewAndroid.cpp b/WebCore/plugins/android/PluginViewAndroid.cpp
index cb41421..2da482f 100644
--- a/WebCore/plugins/android/PluginViewAndroid.cpp
+++ b/WebCore/plugins/android/PluginViewAndroid.cpp
@@ -626,14 +626,27 @@ void PluginView::paint(GraphicsContext* context, const IntRect& rect)
IntRect frame = frameRect();
if (!frame.width() || !frame.height()) {
+ PLUGIN_LOG("--%p FrameRect Dimensions are (0,0).\n", instance());
return;
}
- m_window->inval(rect, false);
- context->save();
- context->translate(frame.x(), frame.y());
- m_window->draw(android_gc2canvas(context));
- context->restore();
+ if (m_window->isSurfaceDrawingModel()) {
+ /* the document position of the frame (e.g. iFrame) containing the
+ surface may have changed, which requires us to to update the global
+ coordinates of the surface. This is necessary because the plugin has
+ not moved within its parent frame and therefore will not get any
+ notification of its global position change.
+ */
+ updatePluginWidget();
+ } else {
+ m_window->inval(rect, false);
+ context->save();
+ context->translate(frame.x(), frame.y());
+ m_window->draw(android_gc2canvas(context));
+ context->restore();
+ }
+
+
}
void PluginView::updatePluginWidget()