diff options
Diffstat (limited to 'Source/WebKit')
-rw-r--r-- | Source/WebKit/android/jni/WebCoreFrameBridge.cpp | 10 | ||||
-rw-r--r-- | Source/WebKit/android/jni/WebViewCore.cpp | 9 | ||||
-rw-r--r-- | Source/WebKit/android/nav/WebView.cpp | 13 |
3 files changed, 20 insertions, 12 deletions
diff --git a/Source/WebKit/android/jni/WebCoreFrameBridge.cpp b/Source/WebKit/android/jni/WebCoreFrameBridge.cpp index 829c21c..4ce3d8e 100644 --- a/Source/WebKit/android/jni/WebCoreFrameBridge.cpp +++ b/Source/WebKit/android/jni/WebCoreFrameBridge.cpp @@ -1824,7 +1824,7 @@ static void SslCertErrorCancel(JNIEnv *env, jobject obj, int handle, int cert_er client->cancelSslCertError(cert_error); } -static net::X509Certificate* getX509Cert(JNIEnv *env, jobjectArray chain) +static scoped_refptr<net::X509Certificate> getX509Cert(JNIEnv *env, jobjectArray chain) { // Based on Android's NativeCrypto_SSL_use_certificate int length = env->GetArrayLength(chain); @@ -1862,8 +1862,8 @@ static net::X509Certificate* getX509Cert(JNIEnv *env, jobjectArray chain) certChain[i] = rest[i]->get(); } return net::X509Certificate::CreateFromHandle(first.get(), - net::X509Certificate::SOURCE_FROM_NETWORK, - certChain); + net::X509Certificate::SOURCE_FROM_NETWORK, + certChain); } static void SslClientCertPKCS8(JNIEnv *env, jobject obj, int handle, jbyteArray pkey, jobjectArray chain) @@ -1893,7 +1893,7 @@ static void SslClientCertPKCS8(JNIEnv *env, jobject obj, int handle, jbyteArray client->sslClientCert(NULL, NULL); return; } - net::X509Certificate* certificate = getX509Cert(env, chain); + scoped_refptr<net::X509Certificate> certificate = getX509Cert(env, chain); if (certificate == NULL) { client->sslClientCert(NULL, NULL); return; @@ -1909,7 +1909,7 @@ static void SslClientCertCtx(JNIEnv *env, jobject obj, int handle, jint ctx, job client->sslClientCert(NULL, NULL); return; } - net::X509Certificate* certificate = getX509Cert(env, chain); + scoped_refptr<net::X509Certificate> certificate = getX509Cert(env, chain); if (certificate == NULL) { client->sslClientCert(NULL, NULL); return; diff --git a/Source/WebKit/android/jni/WebViewCore.cpp b/Source/WebKit/android/jni/WebViewCore.cpp index 81c080d..5e0969f 100644 --- a/Source/WebKit/android/jni/WebViewCore.cpp +++ b/Source/WebKit/android/jni/WebViewCore.cpp @@ -3413,7 +3413,7 @@ jobject WebViewCore::createTextFieldInitData(Node* node) env->SetObjectField(initData, classDef->m_name, fieldName.get()); ScopedLocalRef<jstring> label(env, wtfStringToJstring(env, requestLabel(document->frame(), node), false)); - env->SetObjectField(initData, classDef->m_name, label.get()); + env->SetObjectField(initData, classDef->m_label, label.get()); env->SetIntField(initData, classDef->m_maxLength, getMaxLength(node)); LayerAndroid* layer = 0; int layerId = platformLayerIdFromNode(node, &layer); @@ -3888,11 +3888,18 @@ void WebViewCore::setBackgroundColor(SkColor c) // need (int) cast to find the right constructor WebCore::Color bcolor((int)SkColorGetR(c), (int)SkColorGetG(c), (int)SkColorGetB(c), (int)SkColorGetA(c)); + + if (view->baseBackgroundColor() == bcolor) + return; + view->setBaseBackgroundColor(bcolor); // Background color of 0 indicates we want a transparent background if (c == 0) view->setTransparent(true); + + //invalidate so the new color is shown + contentInvalidateAll(); } jclass WebViewCore::getPluginClass(const WTF::String& libName, const char* className) diff --git a/Source/WebKit/android/nav/WebView.cpp b/Source/WebKit/android/nav/WebView.cpp index a277fc3..38ba451 100644 --- a/Source/WebKit/android/nav/WebView.cpp +++ b/Source/WebKit/android/nav/WebView.cpp @@ -984,17 +984,18 @@ static void nativeSetHeightCanMeasure(JNIEnv *env, jobject obj, bool measure) view->setHeightCanMeasure(measure); } -static void nativeDestroy(JNIEnv *env, jobject obj) +static void nativeDestroy(JNIEnv *env, jobject obj, jint ptr) { - WebView* view = GET_NATIVE_VIEW(env, obj); + WebView* view = reinterpret_cast<WebView*>(ptr); ALOGD("nativeDestroy view: %p", view); ALOG_ASSERT(view, "view not set in nativeDestroy"); delete view; } -static void nativeStopGL(JNIEnv *env, jobject obj) +static void nativeStopGL(JNIEnv *env, jobject obj, jint ptr) { - GET_NATIVE_VIEW(env, obj)->stopGL(); + if (ptr) + reinterpret_cast<WebView*>(ptr)->stopGL(); } static jobject nativeGetSelection(JNIEnv *env, jobject obj) @@ -1293,7 +1294,7 @@ static void nativeFindMaxVisibleRect(JNIEnv *env, jobject obj, jint nativeView, static JNINativeMethod gJavaWebViewMethods[] = { { "nativeCreate", "(ILjava/lang/String;Z)V", (void*) nativeCreate }, - { "nativeDestroy", "()V", + { "nativeDestroy", "(I)V", (void*) nativeDestroy }, { "nativeDraw", "(Landroid/graphics/Canvas;Landroid/graphics/RectF;II)V", (void*) nativeDraw }, @@ -1335,7 +1336,7 @@ static JNINativeMethod gJavaWebViewMethods[] = { (void*) nativeTileProfilingGetInt }, { "nativeTileProfilingGetFloat", "(IILjava/lang/String;)F", (void*) nativeTileProfilingGetFloat }, - { "nativeStopGL", "()V", + { "nativeStopGL", "(I)V", (void*) nativeStopGL }, { "nativeScrollableLayer", "(IIILandroid/graphics/Rect;Landroid/graphics/Rect;)I", (void*) nativeScrollableLayer }, |