From f116b073399a3c3f644d6e6aeb2521ef9d2c9e9b Mon Sep 17 00:00:00 2001 From: Leon Scroggins III Date: Tue, 18 May 2010 13:32:59 -0400 Subject: Prohibit scrolling not initiated by the user. We used to have an ANDROID specific change that was removed when webkit changed. See https://android-git.corp.google.com/w/?p=platform/external/webkit.git;a=commitdiff;h=57a47dd4f75b9c15804c3c61479540cfdc11bd6e Bug 1330729 Bug 2694223 Change-Id: Id51edbb4943eb0a1357477d4bcd31d838febb8fb --- WebCore/platform/android/PlatformBridge.h | 2 ++ WebCore/platform/android/ScrollViewAndroid.cpp | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'WebCore') diff --git a/WebCore/platform/android/PlatformBridge.h b/WebCore/platform/android/PlatformBridge.h index 43313a5..ad181e6 100644 --- a/WebCore/platform/android/PlatformBridge.h +++ b/WebCore/platform/android/PlatformBridge.h @@ -135,6 +135,8 @@ public: // ANDROID // TODO: Upstream to webkit.org. See https://bugs.webkit.org/show_bug.cgi?id=34082 static bool isWebViewPaused(const FrameView*); + + static bool canScroll(const FrameView*); }; } diff --git a/WebCore/platform/android/ScrollViewAndroid.cpp b/WebCore/platform/android/ScrollViewAndroid.cpp index f9e4285..4b09d74 100644 --- a/WebCore/platform/android/ScrollViewAndroid.cpp +++ b/WebCore/platform/android/ScrollViewAndroid.cpp @@ -31,7 +31,6 @@ #include "FrameView.h" #include "IntRect.h" #include "SkRegion.h" -#include "WebCoreFrameBridge.h" #include "WebCoreViewBridge.h" #include "WebViewCore.h" @@ -70,6 +69,8 @@ void ScrollView::platformSetScrollPosition(const WebCore::IntPoint& pt) { if (parent()) // don't attempt to scroll subframes; they're fully visible return; + if (isFrameView() && !PlatformBridge::canScroll(static_cast(this))) + return; android::WebViewCore::getWebViewCore(this)->scrollTo(pt.x(), pt.y()); } -- cgit v1.1