OSDN Git Service

Revert "Prohibit scrolling not initiated by the user."
authorLeon Scroggins <scroggo@google.com>
Thu, 7 Oct 2010 20:13:31 +0000 (16:13 -0400)
committerLeon Scroggins <scroggo@google.com>
Thu, 7 Oct 2010 20:14:12 +0000 (16:14 -0400)
Bug:3067265

This reverts commit f116b073399a3c3f644d6e6aeb2521ef9d2c9e9b.

Conflicts:

WebCore/platform/android/PlatformBridge.h
WebKit/android/WebCoreSupport/PlatformBridge.cpp

Change-Id: I358ce936a8c6f99717b976cfa07e7fe26014760a

WebCore/platform/android/PlatformBridge.h
WebCore/platform/android/ScrollViewAndroid.cpp
WebKit/android/WebCoreSupport/PlatformBridge.cpp

index 4eeaa6c..1a9c4ca 100644 (file)
@@ -125,8 +125,6 @@ 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*);
     static String resolveFilePathForContentUri(const String&);
 };
 
index aefa64a..fcd52d6 100644 (file)
@@ -32,6 +32,7 @@
 #include "IntRect.h"
 #include "PlatformBridge.h"
 #include "SkRegion.h"
+#include "WebCoreFrameBridge.h"
 #include "WebCoreViewBridge.h"
 #include "WebViewCore.h"
 
@@ -99,8 +100,6 @@ 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());
 }
 
index abfb3bb..945db00 100644 (file)
@@ -34,7 +34,6 @@
 #include "KeyGeneratorClient.h"
 #include "PluginView.h"
 #include "Settings.h"
-#include "WebCoreFrameBridge.h"
 #include "WebRequestContext.h"
 #include "WebViewCore.h"
 #include "npruntime.h"
@@ -132,17 +131,6 @@ 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())->userInitiatedAction();
-}
-
 bool PlatformBridge::popupsAllowed(NPP)
 {
     return false;