summaryrefslogtreecommitdiffstats
path: root/WebKit/android/WebCoreSupport/PlatformBridge.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/android/WebCoreSupport/PlatformBridge.cpp')
-rw-r--r--WebKit/android/WebCoreSupport/PlatformBridge.cpp13
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;