2011-03-10 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
authorkov@webkit.org <kov@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Mar 2011 14:52:44 +0000 (14:52 +0000)
committerkov@webkit.org <kov@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Mar 2011 14:52:44 +0000 (14:52 +0000)
        Reviewed by Kenneth Rohde Christiansen.

        Tiled backing store's delegated scroll request uses incorrect convention
        https://bugs.webkit.org/show_bug.cgi?id=56011

        Use a point instead of delta, when relaying the scroll request from
        ScrollView::setScrollPosition.

        * loader/EmptyClients.h:
        (WebCore::EmptyChromeClient::delegatedScrollRequested):
        * page/Chrome.cpp:
        (WebCore::Chrome::delegatedScrollRequested):
        * page/Chrome.h:
        * page/ChromeClient.h:
        * platform/HostWindow.h:
        * platform/ScrollView.cpp:
        (WebCore::ScrollView::setScrollPosition):
2011-03-10  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>

        Reviewed by Kenneth Rohde Christiansen.

        Tiled backing store's delegated scroll request uses incorrect convention
        https://bugs.webkit.org/show_bug.cgi?id=56011

        Adapt internal API to match the change from delta to point on the
        WebCore side, and convert the point to a delta for the public API.

        * WebCoreSupport/ChromeClientQt.cpp:
        (WebCore::ChromeClientQt::delegatedScrollRequested):
        * WebCoreSupport/ChromeClientQt.h:
2011-03-10  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>

        Reviewed by Kenneth Rohde Christiansen.

        Tiled backing store's delegated scroll request uses incorrect convention
        https://bugs.webkit.org/show_bug.cgi?id=56011

        Adapt all of the internal API to match the delta to point
        conversion at the WebCore side.

        * UIProcess/API/qt/qwkpage.cpp:
        (QWKPagePrivate::pageDidRequestScroll):
        * UIProcess/API/qt/qwkpage_p.h:
        * UIProcess/PageClient.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::pageDidRequestScroll):
        * UIProcess/WebPageProxy.h:
        * UIProcess/WebPageProxy.messages.in:
        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
        (WebKit::WebChromeClient::delegatedScrollRequested):
        * WebProcess/WebCoreSupport/WebChromeClient.h:
        * WebProcess/WebPage/WebPage.cpp:
        (WebKit::WebPage::pageDidRequestScroll):
        * WebProcess/WebPage/WebPage.h:

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

21 files changed:
Source/WebCore/ChangeLog
Source/WebCore/loader/EmptyClients.h
Source/WebCore/page/Chrome.cpp
Source/WebCore/page/Chrome.h
Source/WebCore/page/ChromeClient.h
Source/WebCore/platform/HostWindow.h
Source/WebCore/platform/ScrollView.cpp
Source/WebKit/qt/ChangeLog
Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/qt/qwkpage.cpp
Source/WebKit2/UIProcess/API/qt/qwkpage_p.h
Source/WebKit2/UIProcess/PageClient.h
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/WebPageProxy.messages.in
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.h

index 937523d28f7538b8740018627a9e2b2343905e52..aaa319458b8cf0850b4eb0e5df64320f6ceeb14a 100644 (file)
@@ -1,3 +1,23 @@
+2011-03-10  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Tiled backing store's delegated scroll request uses incorrect convention
+        https://bugs.webkit.org/show_bug.cgi?id=56011
+
+        Use a point instead of delta, when relaying the scroll request from
+        ScrollView::setScrollPosition.
+
+        * loader/EmptyClients.h:
+        (WebCore::EmptyChromeClient::delegatedScrollRequested):
+        * page/Chrome.cpp:
+        (WebCore::Chrome::delegatedScrollRequested):
+        * page/Chrome.h:
+        * page/ChromeClient.h:
+        * platform/HostWindow.h:
+        * platform/ScrollView.cpp:
+        (WebCore::ScrollView::setScrollPosition):
+
 2011-03-10  Pavel Feldman  <pfeldman@chromium.org>
 
         Reviewed by Yury Semikhatsky.
index 6935c37449c78928a7dc4209d9d5078d12614e0d..ed92f112cba877fd52c346407f5b4ffe26120f6c 100644 (file)
@@ -161,7 +161,7 @@ public:
     virtual void invalidateContentsForSlowScroll(const IntRect&, bool) {};
     virtual void scroll(const IntSize&, const IntRect&, const IntRect&) { }
 #if ENABLE(TILED_BACKING_STORE)
-    virtual void delegatedScrollRequested(const IntSize&) { }
+    virtual void delegatedScrollRequested(const IntPoint&) { }
 #endif
 #if ENABLE(REQUEST_ANIMATION_FRAME)
     virtual void scheduleAnimation() { }
index 26ea33bb9d99a000b4d459ec4bcbd6a868f53bc4..5881d5ea45871850ffaad331431477c5078caff7 100644 (file)
@@ -88,9 +88,9 @@ void Chrome::scroll(const IntSize& scrollDelta, const IntRect& rectToScroll, con
 }
 
 #if ENABLE(TILED_BACKING_STORE)
-void Chrome::delegatedScrollRequested(const IntSize& scrollDelta)
+void Chrome::delegatedScrollRequested(const IntPoint& scrollPoint)
 {
-    m_client->delegatedScrollRequested(scrollDelta);
+    m_client->delegatedScrollRequested(scrollPoint);
 }
 #endif
 
index 4d162149e940acf8d9ca81116b8176d9703732e2..9984a7cb981eb146df0c8f650ab57ac23b0da503 100644 (file)
@@ -71,7 +71,7 @@ namespace WebCore {
         virtual void invalidateContentsForSlowScroll(const IntRect&, bool);
         virtual void scroll(const IntSize&, const IntRect&, const IntRect&);
 #if ENABLE(TILED_BACKING_STORE)
-        virtual void delegatedScrollRequested(const IntSize& scrollDelta);
+        virtual void delegatedScrollRequested(const IntPoint& scrollPoint);
 #endif
         virtual IntPoint screenToWindow(const IntPoint&) const;
         virtual IntRect windowToScreen(const IntRect&) const;
index 663ae82922e68d329fdf38a76098e4caba18c86f..33b8f7af8d8e9278d9edb3ca72ca0087ec882e27 100644 (file)
@@ -143,7 +143,7 @@ namespace WebCore {
         virtual void invalidateContentsForSlowScroll(const IntRect&, bool) = 0;
         virtual void scroll(const IntSize&, const IntRect&, const IntRect&) = 0;
 #if ENABLE(TILED_BACKING_STORE)
-        virtual void delegatedScrollRequested(const IntSize&) = 0;
+        virtual void delegatedScrollRequested(const IntPoint&) = 0;
 #endif
         virtual IntPoint screenToWindow(const IntPoint&) const = 0;
         virtual IntRect windowToScreen(const IntRect&) const = 0;
index 0d1935669df3235033e2881de27b9a7cf5f6a711..316f043d9a2837bc7a0d613d6af598914b64e3ab 100644 (file)
@@ -52,7 +52,7 @@ public:
 
 #if ENABLE(TILED_BACKING_STORE)
     // Requests the host to do the actual scrolling. This is only used in combination with a tiled backing store.
-    virtual void delegatedScrollRequested(const IntSize& scrollDelta) = 0;
+    virtual void delegatedScrollRequested(const IntPoint& scrollPoint) = 0;
 #endif
 
     // Methods for doing coordinate conversions to and from screen coordinates.
index 96d729fda40d0f238074a7e7e0c6c14bcf25c7b9..236538f3f7b7b5aa50c6096d60a7118bace61bf2 100644 (file)
@@ -378,7 +378,7 @@ void ScrollView::setScrollPosition(const IntPoint& scrollPoint)
 
 #if ENABLE(TILED_BACKING_STORE)
     if (delegatesScrolling()) {
-        hostWindow()->delegatedScrollRequested(IntSize(scrollPoint.x(), scrollPoint.y()));
+        hostWindow()->delegatedScrollRequested(scrollPoint);
         if (!m_actualVisibleContentRect.isEmpty())
             m_actualVisibleContentRect.setLocation(scrollPoint);
         return;
index ed3f58727d9819f5def7b7ea8dbe9e4011f9d35a..1b26e1a24ee17b4e355959ecca69d85546d9f3b0 100644 (file)
@@ -1,3 +1,17 @@
+2011-03-10  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Tiled backing store's delegated scroll request uses incorrect convention
+        https://bugs.webkit.org/show_bug.cgi?id=56011
+
+        Adapt internal API to match the change from delta to point on the
+        WebCore side, and convert the point to a delta for the public API.
+
+        * WebCoreSupport/ChromeClientQt.cpp:
+        (WebCore::ChromeClientQt::delegatedScrollRequested):
+        * WebCoreSupport/ChromeClientQt.h:
+
 2011-03-09  Peter Kasting  <pkasting@google.com>
 
         Reviewed by Mihai Parparita.
index c78437516a6f02e294f7814c7580792e339f3231..acfa6644fa0c32606440ebbcaccedd228b4419f5 100644 (file)
@@ -430,9 +430,10 @@ void ChromeClientQt::scroll(const IntSize& delta, const IntRect& scrollViewRect,
 }
 
 #if ENABLE(TILED_BACKING_STORE)
-void ChromeClientQt::delegatedScrollRequested(const IntSize& delta)
+void ChromeClientQt::delegatedScrollRequested(const IntPoint& point)
 {
-    emit m_webPage->scrollRequested(delta.width(), delta.height(), QRect(QPoint(0, 0), m_webPage->viewportSize()));
+    QPoint currentPosition(m_webPage->mainFrame()->scrollPosition());
+    emit m_webPage->scrollRequested(point.x() - currentPosition.x(), point.y() - currentPosition.y(), QRect(QPoint(0, 0), m_webPage->viewportSize()));
 }
 #endif
 
index 27327efb093c892d9c45b46e3c3ae87a1bdb0007..a12c2ece75e3432a2f26c1396023b325467d220c 100644 (file)
@@ -120,7 +120,7 @@ namespace WebCore {
         virtual void invalidateContentsForSlowScroll(const IntRect&, bool);
         virtual void scroll(const IntSize& scrollDelta, const IntRect& rectToScroll, const IntRect& clipRect);
 #if ENABLE(TILED_BACKING_STORE)
-        virtual void delegatedScrollRequested(const IntSize& scrollDelta);
+        virtual void delegatedScrollRequested(const IntPoint& scrollPoint);
 #endif
 
         virtual IntPoint screenToWindow(const IntPoint&) const;
index 271ef4842fe55d59e37cb8de4854fc650bc6b3a4..0330927c0d0f1630021ef8f46df4c60829474714 100644 (file)
@@ -1,3 +1,28 @@
+2011-03-10  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Tiled backing store's delegated scroll request uses incorrect convention
+        https://bugs.webkit.org/show_bug.cgi?id=56011
+
+        Adapt all of the internal API to match the delta to point
+        conversion at the WebCore side.
+
+        * UIProcess/API/qt/qwkpage.cpp:
+        (QWKPagePrivate::pageDidRequestScroll):
+        * UIProcess/API/qt/qwkpage_p.h:
+        * UIProcess/PageClient.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::pageDidRequestScroll):
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/WebPageProxy.messages.in:
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+        (WebKit::WebChromeClient::delegatedScrollRequested):
+        * WebProcess/WebCoreSupport/WebChromeClient.h:
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::pageDidRequestScroll):
+        * WebProcess/WebPage/WebPage.h:
+
 2011-03-10  Balazs Kelemen  <kbalazs@webkit.org>
 
         Reviewed by Andreas Kling.
index ebab5dbc10252012726563bf55bd2529a5aacf2c..6a31dcb4af2d4c7643731b57754ad5261fde761a 100644 (file)
@@ -194,9 +194,9 @@ void QWKPagePrivate::exitAcceleratedCompositingMode()
     // FIXME: Implement.
 }
 
-void QWKPagePrivate::pageDidRequestScroll(const IntSize& delta)
+void QWKPagePrivate::pageDidRequestScroll(const IntPoint& point)
 {
-    emit q->scrollRequested(delta.width(), delta.height());
+    emit q->scrollRequested(point.x(), point.y());
 }
 
 void QWKPagePrivate::didChangeContentsSize(const IntSize& newSize)
index 79506a65901714eb51b7cb6cd71325de2c12d7c5..566cd08c2261cfa47a01ae85cdcf9cb89bc2b065 100644 (file)
@@ -63,7 +63,7 @@ public:
     virtual void enterAcceleratedCompositingMode(const LayerTreeContext&);
     virtual void exitAcceleratedCompositingMode();
 #endif // USE(ACCELERATED_COMPOSITING)
-    virtual void pageDidRequestScroll(const WebCore::IntSize&);
+    virtual void pageDidRequestScroll(const WebCore::IntPoint&);
     virtual void processDidCrash();
     virtual void pageClosed() { }
     virtual void didRelaunchProcess();
index 0e3a61ec2c727dfda3ac776109961e21a540c961..39d111512b5a31fe142206ee0cc1f39c21a09fe3 100644 (file)
@@ -86,7 +86,7 @@ public:
     virtual void toolTipChanged(const String&, const String&) = 0;
 
 #if ENABLE(TILED_BACKING_STORE)
-    virtual void pageDidRequestScroll(const WebCore::IntSize&) = 0;
+    virtual void pageDidRequestScroll(const WebCore::IntPoint&) = 0;
 #endif
 #if PLATFORM(QT)
     virtual void didChangeContentsSize(const WebCore::IntSize&) = 0;
index 755e48cbde622cc8a730247d5d8904533339aecd..02411f9188b3b357fe71e73c133a3a376bb76772 100644 (file)
@@ -1924,9 +1924,9 @@ void WebPageProxy::runBeforeUnloadConfirmPanel(const String& message, uint64_t f
 }
 
 #if ENABLE(TILED_BACKING_STORE)
-void WebPageProxy::pageDidRequestScroll(const IntSize& delta)
+void WebPageProxy::pageDidRequestScroll(const IntPoint& point)
 {
-    m_pageClient->pageDidRequestScroll(delta);
+    m_pageClient->pageDidRequestScroll(point);
 }
 #endif
 
index b168988a3c497e1c74002ecf27264d7c50b888ae..777f84026aa5a4f741e3427ca05b7e8ac8aa21f7 100644 (file)
@@ -557,7 +557,7 @@ private:
     void reattachToWebProcessWithItem(WebBackForwardListItem*);
 
 #if ENABLE(TILED_BACKING_STORE)
-    void pageDidRequestScroll(const WebCore::IntSize&);
+    void pageDidRequestScroll(const WebCore::IntPoint&);
 #endif
 
 #if PLATFORM(QT)
index 9c6da032ee8c465ac93f834ed8834c583ea3b759..c812ae16257bbb882ab75ed8071c66cb1c3096b2 100644 (file)
@@ -60,7 +60,7 @@ messages -> WebPageProxy {
     DidChangeScrollOffsetPinningForMainFrame(bool hasHorizontalScrollbar, bool hasVerticalScrollbar)
 
 #if ENABLE(TILED_BACKING_STORE)
-    PageDidRequestScroll(WebCore::IntSize delta)
+    PageDidRequestScroll(WebCore::IntPoint point)
 #endif
 #if PLATFORM(QT)
     DidChangeContentsSize(WebCore::IntSize newSize)
index ac4d9fe4ece65caf94c4e335e11931a05464ee50..92426efc4fb31fd1acbe8f94d83eeeec1213c3bd 100644 (file)
@@ -374,7 +374,7 @@ void WebChromeClient::scroll(const IntSize& scrollOffset, const IntRect& scrollR
 }
 
 #if ENABLE(TILED_BACKING_STORE)
-void WebChromeClient::delegatedScrollRequested(const IntSize& scrollOffset)
+void WebChromeClient::delegatedScrollRequested(const IntPoint& scrollOffset)
 {
     m_page->pageDidRequestScroll(scrollOffset);
 }
index 43d637cf8ed40a47a3f1133d7dc7b0562581d94d..c9b04d79bab5dcbbd0f90e8042cb78c2255c7db6 100644 (file)
@@ -113,7 +113,7 @@ private:
     virtual void invalidateContentsForSlowScroll(const WebCore::IntRect&, bool);
     virtual void scroll(const WebCore::IntSize& scrollOffset, const WebCore::IntRect& scrollRect, const WebCore::IntRect& clipRect);
 #if ENABLE(TILED_BACKING_STORE)
-    virtual void delegatedScrollRequested(const WebCore::IntSize& scrollOffset);
+    virtual void delegatedScrollRequested(const WebCore::IntPoint& scrollOffset);
 #endif
     virtual WebCore::IntPoint screenToWindow(const WebCore::IntPoint&) const;
     virtual WebCore::IntRect windowToScreen(const WebCore::IntRect&) const;
index cc9b8cdcaef4b2eb508e8ebeeac6c0a2ea40a9d4..7fdf67e2c4a05e6309787a72c659faf62fc1f5f3 100644 (file)
@@ -789,9 +789,9 @@ void WebPage::pageDidScroll()
 }
 
 #if ENABLE(TILED_BACKING_STORE)
-void WebPage::pageDidRequestScroll(const IntSize& delta)
+void WebPage::pageDidRequestScroll(const IntPoint& point)
 {
-    send(Messages::WebPageProxy::PageDidRequestScroll(delta));
+    send(Messages::WebPageProxy::PageDidRequestScroll(point));
 }
 #endif
 
index 11497ed8754f53cf1391e24d81d42e70e7cb4c37..a5044f0baa200a1ec950fe8e4ca3bee2d42982ce 100644 (file)
@@ -256,7 +256,7 @@ public:
 
     void pageDidScroll();
 #if ENABLE(TILED_BACKING_STORE)
-    void pageDidRequestScroll(const WebCore::IntSize& delta);
+    void pageDidRequestScroll(const WebCore::IntPoint&);
     void setActualVisibleContentRect(const WebCore::IntRect&);
 
     bool resizesToContentsEnabled() const { return !m_resizesToContentsLayoutSize.isEmpty(); }