summaryrefslogtreecommitdiffstats
path: root/WebKit/android/plugins/PluginWidgetAndroid.cpp
diff options
context:
space:
mode:
authorGrace Kloba <klobag@google.com>2010-01-21 19:27:06 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2010-01-21 19:27:06 -0800
commitde7e9124bea659d873d5488809d92a334104cb53 (patch)
treec5dad3966f1adabd44c11b38bce1d1ab2c13def5 /WebKit/android/plugins/PluginWidgetAndroid.cpp
parentbfcc13fc3ee6845e9f78ca7c5313d483c9fd56c9 (diff)
parentec4b5ee43c88d914221e8c9f668421ace6bdd72d (diff)
downloadexternal_webkit-de7e9124bea659d873d5488809d92a334104cb53.zip
external_webkit-de7e9124bea659d873d5488809d92a334104cb53.tar.gz
external_webkit-de7e9124bea659d873d5488809d92a334104cb53.tar.bz2
am ec4b5ee4: As we are sharing the view between embedded and full screen, we should make sure to call the correct update when bounds changed.
Merge commit 'ec4b5ee43c88d914221e8c9f668421ace6bdd72d' into eclair-mr2-plus-aosp * commit 'ec4b5ee43c88d914221e8c9f668421ace6bdd72d': As we are sharing the view between embedded and full
Diffstat (limited to 'WebKit/android/plugins/PluginWidgetAndroid.cpp')
-rw-r--r--WebKit/android/plugins/PluginWidgetAndroid.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/WebKit/android/plugins/PluginWidgetAndroid.cpp b/WebKit/android/plugins/PluginWidgetAndroid.cpp
index ac668d7..bf1289a 100644
--- a/WebKit/android/plugins/PluginWidgetAndroid.cpp
+++ b/WebKit/android/plugins/PluginWidgetAndroid.cpp
@@ -107,14 +107,8 @@ void PluginWidgetAndroid::setWindow(NPWindow* window, bool isTransparent) {
if (m_drawingModel == kSurface_ANPDrawingModel) {
- // if the surface exists check for changes and update accordingly
- if (m_embeddedView && m_pluginBounds != oldPluginBounds) {
-
- m_core->updateSurface(m_embeddedView, window->x, window->y,
- window->width, window->height);
-
// if the surface does not exist then create a new surface
- } else if(!m_embeddedView) {
+ if (!m_embeddedView) {
WebCore::PluginPackage* pkg = m_pluginView->plugin();
NPP instance = m_pluginView->instance();
@@ -130,10 +124,15 @@ void PluginWidgetAndroid::setWindow(NPWindow* window, bool isTransparent) {
JNIEnv* env = JSC::Bindings::getJNIEnv();
m_embeddedView = env->NewGlobalRef(tempObj);
}
- }
- if (m_isFullScreen && m_pluginBounds != oldPluginBounds) {
- m_core->updateFullScreenPlugin(window->x, window->y,
- window->width, window->height);
+ } else if (m_pluginBounds != oldPluginBounds) {
+ // if the surface exists check for changes and update accordingly
+ if (m_isFullScreen) {
+ m_core->updateFullScreenPlugin(window->x, window->y,
+ window->width, window->height);
+ } else {
+ m_core->updateSurface(m_embeddedView, window->x, window->y,
+ window->width, window->height);
+ }
}
} else {
m_flipPixelRef->safeUnref();