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 /WebKit/android/WebCoreSupport | |
| 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 'WebKit/android/WebCoreSupport')
| -rw-r--r-- | WebKit/android/WebCoreSupport/PlatformBridge.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/WebKit/android/WebCoreSupport/PlatformBridge.cpp b/WebKit/android/WebCoreSupport/PlatformBridge.cpp index 05aa42b..13bbf38 100644 --- a/WebKit/android/WebCoreSupport/PlatformBridge.cpp +++ b/WebKit/android/WebCoreSupport/PlatformBridge.cpp @@ -27,9 +27,11 @@ #include <PlatformBridge.h> #include "CookieClient.h" +#include "FrameView.h" #include "JavaSharedClient.h" #include "KeyGeneratorClient.h" #include "PluginView.h" +#include "WebCoreFrameBridge.h" #include "WebViewCore.h" #include "npruntime.h" #include <wtf/android/AndroidThreading.h> @@ -135,6 +137,17 @@ bool PlatformBridge::isWebViewPaused(const WebCore::FrameView* frameView) return webViewCore->isPaused(); } +bool PlatformBridge::canScroll(const WebCore::FrameView* frameView) +{ + // We want to ignore requests to scroll that were not initiated by the + // user. An example of this is when text is inserted into a + // textfield/area, which results in a scroll. We ignore this because + // we know how to do this ourselves in the UI thread. + // An example of it being initiated by the user is if the user clicks + // an anchor element which simply scrolls the page. + return android::WebFrame::getWebFrame(frameView->frame())->userInitiatedClick(); +} + bool PlatformBridge::popupsAllowed(NPP) { return false; |
