2010-11-23 Shimeng (Simon) Wang <swang@google.com>
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Nov 2010 22:54:45 +0000 (22:54 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Nov 2010 22:54:45 +0000 (22:54 +0000)
        Reviewed by Steve Block.

        Use platform bridge to set scroll position.
        https://bugs.webkit.org/show_bug.cgi?id=49550

        Refactoring only.  Existing tests shall suffice.

        * platform/android/PlatformBridge.h:
        * platform/android/ScrollViewAndroid.cpp:
        (WebCore::ScrollView::platformSetScrollPosition):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@72631 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/platform/android/PlatformBridge.h
WebCore/platform/android/ScrollViewAndroid.cpp

index c51d168..683d301 100644 (file)
@@ -1,3 +1,16 @@
+2010-11-23  Shimeng (Simon) Wang  <swang@google.com>
+
+        Reviewed by Steve Block.
+
+        Use platform bridge to set scroll position.
+        https://bugs.webkit.org/show_bug.cgi?id=49550
+
+        Refactoring only.  Existing tests shall suffice.
+
+        * platform/android/PlatformBridge.h:
+        * platform/android/ScrollViewAndroid.cpp:
+        (WebCore::ScrollView::platformSetScrollPosition):
+
 2010-11-23  Andreas Kling  <kling@webkit.org>
 
         Reviewed by Tor Arne Vestbø.
index 2427b3a..4269ef8 100644 (file)
@@ -81,6 +81,7 @@ class NPObject;
 
 namespace WebCore {
 
+class ScrollView;
 class Widget;
 
 // An interface to the embedding layer, which has the ability to answer
@@ -104,6 +105,9 @@ public:
     static bool cookiesEnabled();
     // Plugin
     static NPObject* pluginScriptableObject(Widget*);
+
+    static void setScrollPosition(ScrollView*, int x, int y);
+
     // Language
     static String computeDefaultLanguage();
     // Memory details for V8 GC
index db20591..5d4da18 100644 (file)
@@ -70,7 +70,7 @@ void ScrollView::platformSetScrollPosition(const WebCore::IntPoint& pt)
 {
     if (parent()) // don't attempt to scroll subframes; they're fully visible
         return;
-    android::WebViewCore::getWebViewCore(this)->scrollTo(pt.x(), pt.y());
+    PlatformBridge::setScrollPosition(this, pt.x(), pt.y());
 }
 
 void ScrollView::platformScrollbarModes(ScrollbarMode& h, ScrollbarMode& v) const