diff options
author | Leon Scroggins III <scroggo@google.com> | 2010-05-18 13:32:59 -0400 |
---|---|---|
committer | Leon Scroggins III <scroggo@google.com> | 2010-05-19 11:26:26 -0400 |
commit | f116b073399a3c3f644d6e6aeb2521ef9d2c9e9b (patch) | |
tree | babb51e0eefa5b2c1cf62179d60333d753cd9b55 /WebCore | |
parent | 40a65b8dda8d56276893edcc25c957d13b3a9b77 (diff) | |
download | external_webkit-f116b073399a3c3f644d6e6aeb2521ef9d2c9e9b.zip external_webkit-f116b073399a3c3f644d6e6aeb2521ef9d2c9e9b.tar.gz external_webkit-f116b073399a3c3f644d6e6aeb2521ef9d2c9e9b.tar.bz2 |
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
Diffstat (limited to 'WebCore')
-rw-r--r-- | WebCore/platform/android/PlatformBridge.h | 2 | ||||
-rw-r--r-- | WebCore/platform/android/ScrollViewAndroid.cpp | 3 |
2 files changed, 4 insertions, 1 deletions
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<FrameView*>(this))) + return; android::WebViewCore::getWebViewCore(this)->scrollTo(pt.x(), pt.y()); } |