diff options
Diffstat (limited to 'Source/WebKit/android')
-rw-r--r-- | Source/WebKit/android/jni/WebCoreFrameBridge.cpp | 6 | ||||
-rw-r--r-- | Source/WebKit/android/nav/WebView.cpp | 14 |
2 files changed, 5 insertions, 15 deletions
diff --git a/Source/WebKit/android/jni/WebCoreFrameBridge.cpp b/Source/WebKit/android/jni/WebCoreFrameBridge.cpp index afc251b..5fbe0a1 100644 --- a/Source/WebKit/android/jni/WebCoreFrameBridge.cpp +++ b/Source/WebKit/android/jni/WebCoreFrameBridge.cpp @@ -843,12 +843,6 @@ WebFrame::canHandleRequest(const WebCore::ResourceRequest& request) if (equalIgnoringCase(request.httpMethod(), "POST")) return true; const WebCore::KURL& requestUrl = request.url(); - bool isUserGesture = UserGestureIndicator::processingUserGesture(); - if (!mUserInitiatedAction && !isUserGesture && - (requestUrl.protocolIs("http") || requestUrl.protocolIs("https") || - requestUrl.protocolIs("file") || requestUrl.protocolIs("about") || - WebCore::protocolIsJavaScript(requestUrl.string()))) - return true; const WTF::String& url = requestUrl.string(); // Empty urls should not be sent to java if (url.isEmpty()) diff --git a/Source/WebKit/android/nav/WebView.cpp b/Source/WebKit/android/nav/WebView.cpp index c1cb95c..4b18b62 100644 --- a/Source/WebKit/android/nav/WebView.cpp +++ b/Source/WebKit/android/nav/WebView.cpp @@ -2517,7 +2517,7 @@ static void dumpToFile(const char text[], void* file) { } #endif -static void nativeSetProperty(JNIEnv *env, jobject obj, jstring jkey, jstring jvalue) +static bool nativeSetProperty(JNIEnv *env, jobject obj, jstring jkey, jstring jvalue) { WTF::String key = jstringToWtfString(env, jkey); WTF::String value = jstringToWtfString(env, jvalue); @@ -2526,11 +2526,14 @@ static void nativeSetProperty(JNIEnv *env, jobject obj, jstring jkey, jstring jv TilesManager::instance()->setInvertedScreen(true); else TilesManager::instance()->setInvertedScreen(false); + return true; } if (key == "inverted_contrast") { float contrast = value.toFloat(); TilesManager::instance()->setInvertedScreenContrast(contrast); + return true; } + return false; } static jstring nativeGetProperty(JNIEnv *env, jobject obj, jstring key) @@ -2608,11 +2611,6 @@ static bool nativeScrollLayer(JNIEnv* env, jobject obj, jint layerId, jint x, return false; } -static void nativeSetExpandedTileBounds(JNIEnv*, jobject, jboolean enabled) -{ - TilesManager::instance()->setExpandedTileBounds(enabled); -} - static void nativeUseHardwareAccelSkia(JNIEnv*, jobject, jboolean enabled) { BaseRenderer::setCurrentRendererType(enabled ? BaseRenderer::Ganesh : BaseRenderer::Raster); @@ -2827,13 +2825,11 @@ static JNINativeMethod gJavaWebViewMethods[] = { (void*) nativeScrollableLayer }, { "nativeScrollLayer", "(III)Z", (void*) nativeScrollLayer }, - { "nativeSetExpandedTileBounds", "(Z)V", - (void*) nativeSetExpandedTileBounds }, { "nativeUseHardwareAccelSkia", "(Z)V", (void*) nativeUseHardwareAccelSkia }, { "nativeGetBackgroundColor", "()I", (void*) nativeGetBackgroundColor }, - { "nativeSetProperty", "(Ljava/lang/String;Ljava/lang/String;)V", + { "nativeSetProperty", "(Ljava/lang/String;Ljava/lang/String;)Z", (void*) nativeSetProperty }, { "nativeGetProperty", "(Ljava/lang/String;)Ljava/lang/String;", (void*) nativeGetProperty }, |