summaryrefslogtreecommitdiffstats
path: root/WebKit
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-08-06 08:45:22 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-08-06 08:45:22 -0700
commit122045a3cc401f9838421ad951c4606c3ea41764 (patch)
tree5dcd1306c82f16ebe7c09d6a3361a2fbad483255 /WebKit
parent917c532ef174b5d895c1ff059b279aa1f52c9123 (diff)
parenteab880ad54e75ed123123ba131fbf82099c7c270 (diff)
downloadexternal_webkit-122045a3cc401f9838421ad951c4606c3ea41764.zip
external_webkit-122045a3cc401f9838421ad951c4606c3ea41764.tar.gz
external_webkit-122045a3cc401f9838421ad951c4606c3ea41764.tar.bz2
Merge change 20271
* changes: fixing the surface size if the plugin elects to not handle zoomEvents.
Diffstat (limited to 'WebKit')
-rw-r--r--WebKit/android/jni/WebViewCore.cpp6
-rw-r--r--WebKit/android/jni/WebViewCore.h2
-rw-r--r--WebKit/android/plugins/PluginSurface.cpp4
-rw-r--r--WebKit/android/plugins/PluginSurface.h2
-rw-r--r--WebKit/android/plugins/PluginWidgetAndroid.cpp2
5 files changed, 8 insertions, 8 deletions
diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp
index 35aeedb..e743eff 100644
--- a/WebKit/android/jni/WebViewCore.cpp
+++ b/WebKit/android/jni/WebViewCore.cpp
@@ -254,7 +254,7 @@ WebViewCore::WebViewCore(JNIEnv* env, jobject javaWebViewCore, WebCore::Frame* m
m_javaGlue->m_geolocationPermissionsShowPrompt = GetJMethod(env, clazz, "geolocationPermissionsShowPrompt", "(Ljava/lang/String;)V");
m_javaGlue->m_geolocationPermissionsHidePrompt = GetJMethod(env, clazz, "geolocationPermissionsHidePrompt", "()V");
m_javaGlue->m_addMessageToConsole = GetJMethod(env, clazz, "addMessageToConsole", "(Ljava/lang/String;ILjava/lang/String;)V");
- m_javaGlue->m_createSurface = GetJMethod(env, clazz, "createSurface", "(I)Landroid/view/SurfaceView;");
+ m_javaGlue->m_createSurface = GetJMethod(env, clazz, "createSurface", "(IZ)Landroid/view/SurfaceView;");
m_javaGlue->m_destroySurface = GetJMethod(env, clazz, "destroySurface", "(Landroid/view/SurfaceView;)V");
m_javaGlue->m_attachSurface = GetJMethod(env, clazz, "attachSurface", "(Landroid/view/SurfaceView;IIII)V");
@@ -2095,11 +2095,11 @@ void WebViewCore::setBackgroundColor(SkColor c)
view->setBaseBackgroundColor(bcolor);
}
-jobject WebViewCore::createSurface(SurfaceCallback* cb)
+jobject WebViewCore::createSurface(SurfaceCallback* cb, bool isFixedSize)
{
JNIEnv* env = JSC::Bindings::getJNIEnv();
jobject surface = env->CallObjectMethod(m_javaGlue->object(env).get(),
- m_javaGlue->m_createSurface, (int) cb);
+ m_javaGlue->m_createSurface, (int) cb, isFixedSize);
checkException(env);
return surface;
}
diff --git a/WebKit/android/jni/WebViewCore.h b/WebKit/android/jni/WebViewCore.h
index a2737c8..f763ee5 100644
--- a/WebKit/android/jni/WebViewCore.h
+++ b/WebKit/android/jni/WebViewCore.h
@@ -345,7 +345,7 @@ namespace android {
void requestKeyboard(bool);
// Creates a SurfaceView for a plugin
- jobject createSurface(SurfaceCallback* cb);
+ jobject createSurface(SurfaceCallback* cb, bool isFixedSize);
// Destroys the SurfaceView after removing from the view system.
void destroySurface(jobject surface);
diff --git a/WebKit/android/plugins/PluginSurface.cpp b/WebKit/android/plugins/PluginSurface.cpp
index aba0263..c5bd74a 100644
--- a/WebKit/android/plugins/PluginSurface.cpp
+++ b/WebKit/android/plugins/PluginSurface.cpp
@@ -78,11 +78,11 @@ static inline SkBitmap::Config convertPixelFormat(PixelFormat format) {
}
}
-PluginSurface::PluginSurface(PluginWidgetAndroid* widget)
+PluginSurface::PluginSurface(PluginWidgetAndroid* widget, bool isFixedSize)
: m_jSurfaceView(0)
, m_widget(widget) {
// Create our java SurfaceView.
- jobject obj = widget->webViewCore()->createSurface(this);
+ jobject obj = widget->webViewCore()->createSurface(this, isFixedSize);
if (obj) {
JNIEnv* env = JSC::Bindings::getJNIEnv();
m_jSurfaceView = env->NewGlobalRef(obj);
diff --git a/WebKit/android/plugins/PluginSurface.h b/WebKit/android/plugins/PluginSurface.h
index b8cbac9..2b2b57a 100644
--- a/WebKit/android/plugins/PluginSurface.h
+++ b/WebKit/android/plugins/PluginSurface.h
@@ -50,7 +50,7 @@ class Surface;
class PluginSurface : public SurfaceCallback {
public:
- PluginSurface(PluginWidgetAndroid* widget);
+ PluginSurface(PluginWidgetAndroid* widget, bool isFixedSize);
virtual ~PluginSurface() {
destroy();
}
diff --git a/WebKit/android/plugins/PluginWidgetAndroid.cpp b/WebKit/android/plugins/PluginWidgetAndroid.cpp
index c947b3b..6e05360 100644
--- a/WebKit/android/plugins/PluginWidgetAndroid.cpp
+++ b/WebKit/android/plugins/PluginWidgetAndroid.cpp
@@ -214,7 +214,7 @@ ANPSurface* PluginWidgetAndroid::createSurface(ANPSurfaceType ignored) {
if (m_drawingModel != kSurface_ANPDrawingModel) {
return NULL;
}
- m_surface.set(new android::PluginSurface(this));
+ m_surface.set(new android::PluginSurface(this, !isAcceptingEvent(kZoom_ANPEventFlag)));
ANPSurface* surface = new ANPSurface;
surface->data = m_surface.get();
surface->type = ignored;