diff options
author | Grace Kloba <klobag@google.com> | 2010-01-21 19:13:23 -0800 |
---|---|---|
committer | Grace Kloba <klobag@google.com> | 2010-01-21 19:13:23 -0800 |
commit | ec4b5ee43c88d914221e8c9f668421ace6bdd72d (patch) | |
tree | c5dad3966f1adabd44c11b38bce1d1ab2c13def5 | |
parent | 0a3f01ac5e5855c3563694671091d4c1ce89cac5 (diff) | |
download | external_webkit-ec4b5ee43c88d914221e8c9f668421ace6bdd72d.zip external_webkit-ec4b5ee43c88d914221e8c9f668421ace6bdd72d.tar.gz external_webkit-ec4b5ee43c88d914221e8c9f668421ace6bdd72d.tar.bz2 |
As we are sharing the view between embedded and full
screen, we should make sure to call the correct
update when bounds changed.
This should fix the crash when changing orientation.
-rw-r--r-- | WebKit/android/plugins/PluginWidgetAndroid.cpp | 21 |
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(); |