[WK2] Rename from scrollOffset to scrollDelta in WebChromeClient.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Feb 2013 07:15:01 +0000 (07:15 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Feb 2013 07:15:01 +0000 (07:15 +0000)
https://bugs.webkit.org/show_bug.cgi?id=109885

Patch by Huang Dongsung <luxtella@company100.net> on 2013-02-14
Reviewed by Simon Fraser.

Chrome sends a scroll delta to WebChromeClient but WebChromeClient names it
scrollOffset. So this patch corrects this misnaming.

In addition, all subclasses of LayerTreeHost don't use the misnamed
scrollOffset in scrollNonCompositedContents(), so this patch removes the
scrollOffset argument.

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::scroll):
* WebProcess/WebCoreSupport/WebChromeClient.h:
(WebChromeClient):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::scrollNonCompositedContents):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
(CoordinatedLayerTreeHost):
* WebProcess/WebPage/DrawingArea.h:
(DrawingArea):
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::scroll):
* WebProcess/WebPage/DrawingAreaImpl.h:
(DrawingAreaImpl):
* WebProcess/WebPage/LayerTreeHost.h:
(LayerTreeHost):
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::scrollNonCompositedContents):
* WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
(LayerTreeHostGtk):
* WebProcess/WebPage/mac/LayerTreeHostMac.h:
(LayerTreeHostMac):
* WebProcess/WebPage/mac/LayerTreeHostMac.mm:
(WebKit::LayerTreeHostMac::scrollNonCompositedContents):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
(RemoteLayerTreeDrawingArea):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::scroll):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
(TiledCoreAnimationDrawingArea):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::scroll):

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

17 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h
Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp
Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h
Source/WebKit2/WebProcess/WebPage/DrawingArea.h
Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp
Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.h
Source/WebKit2/WebProcess/WebPage/LayerTreeHost.h
Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp
Source/WebKit2/WebProcess/WebPage/gtk/LayerTreeHostGtk.h
Source/WebKit2/WebProcess/WebPage/mac/LayerTreeHostMac.h
Source/WebKit2/WebProcess/WebPage/mac/LayerTreeHostMac.mm
Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h
Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm
Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h
Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm

index d90e40087d8fa590069f108e80b085441fa135e0..fb1694f030657bedc681c746d69c4b1cba6f5f86 100644 (file)
@@ -1,3 +1,50 @@
+2013-02-14  Huang Dongsung  <luxtella@company100.net>
+
+        [WK2] Rename from scrollOffset to scrollDelta in WebChromeClient.
+        https://bugs.webkit.org/show_bug.cgi?id=109885
+
+        Reviewed by Simon Fraser.
+
+        Chrome sends a scroll delta to WebChromeClient but WebChromeClient names it
+        scrollOffset. So this patch corrects this misnaming.
+
+        In addition, all subclasses of LayerTreeHost don't use the misnamed
+        scrollOffset in scrollNonCompositedContents(), so this patch removes the
+        scrollOffset argument.
+
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+        (WebKit::WebChromeClient::scroll):
+        * WebProcess/WebCoreSupport/WebChromeClient.h:
+        (WebChromeClient):
+        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
+        (WebKit::CoordinatedLayerTreeHost::scrollNonCompositedContents):
+        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
+        (CoordinatedLayerTreeHost):
+        * WebProcess/WebPage/DrawingArea.h:
+        (DrawingArea):
+        * WebProcess/WebPage/DrawingAreaImpl.cpp:
+        (WebKit::DrawingAreaImpl::scroll):
+        * WebProcess/WebPage/DrawingAreaImpl.h:
+        (DrawingAreaImpl):
+        * WebProcess/WebPage/LayerTreeHost.h:
+        (LayerTreeHost):
+        * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
+        (WebKit::LayerTreeHostGtk::scrollNonCompositedContents):
+        * WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
+        (LayerTreeHostGtk):
+        * WebProcess/WebPage/mac/LayerTreeHostMac.h:
+        (LayerTreeHostMac):
+        * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
+        (WebKit::LayerTreeHostMac::scrollNonCompositedContents):
+        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
+        (RemoteLayerTreeDrawingArea):
+        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
+        (WebKit::RemoteLayerTreeDrawingArea::scroll):
+        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
+        (TiledCoreAnimationDrawingArea):
+        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+        (WebKit::TiledCoreAnimationDrawingArea::scroll):
+
 2013-02-14  Alexey Proskuryakov  <ap@apple.com>
 
         <rdar://problem/13161700> REGRESSION: Safari is unable to make SSL connections
index 46907ce0e6c3a1ca57312429f099064d6a5421f5..e04055a2e6e81ab6a23237a7edd11743f42739c6 100644 (file)
@@ -404,10 +404,10 @@ void WebChromeClient::invalidateContentsForSlowScroll(const IntRect& rect, bool)
     m_page->drawingArea()->setNeedsDisplay(rect);
 }
 
-void WebChromeClient::scroll(const IntSize& scrollOffset, const IntRect& scrollRect, const IntRect& clipRect)
+void WebChromeClient::scroll(const IntSize& scrollDelta, const IntRect& scrollRect, const IntRect& clipRect)
 {
     m_page->pageDidScroll();
-    m_page->drawingArea()->scroll(intersection(scrollRect, clipRect), scrollOffset);
+    m_page->drawingArea()->scroll(intersection(scrollRect, clipRect), scrollDelta);
 }
 
 #if USE(TILED_BACKING_STORE)
index 3ea3a3b58c915f21dc0ce2853ee2cfc7a020ed02..76deca4246e6382f0c19956a5dfc7ee8593e41c5 100644 (file)
@@ -111,7 +111,7 @@ private:
     virtual void invalidateRootView(const WebCore::IntRect&, bool) OVERRIDE;
     virtual void invalidateContentsAndRootView(const WebCore::IntRect&, bool) OVERRIDE;
     virtual void invalidateContentsForSlowScroll(const WebCore::IntRect&, bool) OVERRIDE;
-    virtual void scroll(const WebCore::IntSize& scrollOffset, const WebCore::IntRect& scrollRect, const WebCore::IntRect& clipRect) OVERRIDE;
+    virtual void scroll(const WebCore::IntSize& scrollDelta, const WebCore::IntRect& scrollRect, const WebCore::IntRect& clipRect) OVERRIDE;
 #if USE(TILED_BACKING_STORE)
     virtual void delegatedScrollRequested(const WebCore::IntPoint& scrollOffset) OVERRIDE;
 #endif
index 59e839b2c532161c3084ef3cf5141aaa0d89e432..b7d6c018b24259e50247b618f12a1d4853a5590e 100644 (file)
@@ -186,7 +186,7 @@ void CoordinatedLayerTreeHost::setNonCompositedContentsNeedDisplay(const WebCore
     scheduleLayerFlush();
 }
 
-void CoordinatedLayerTreeHost::scrollNonCompositedContents(const WebCore::IntRect& scrollRect, const WebCore::IntSize& /* scrollOffset */)
+void CoordinatedLayerTreeHost::scrollNonCompositedContents(const WebCore::IntRect& scrollRect)
 {
     setNonCompositedContentsNeedDisplay(scrollRect);
 }
index 7e1d1bae043ee7b10d4beaf87ba1d2aee8893d75..837910115ca8a875259edbf1fdc2d5eedff14503 100644 (file)
@@ -65,7 +65,7 @@ public:
     virtual void invalidate();
 
     virtual void setNonCompositedContentsNeedDisplay(const WebCore::IntRect&);
-    virtual void scrollNonCompositedContents(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset);
+    virtual void scrollNonCompositedContents(const WebCore::IntRect& scrollRect);
     virtual void forceRepaint();
     virtual bool forceRepaintAsync(uint64_t callbackID);
     virtual void sizeDidChange(const WebCore::IntSize& newSize);
index 2b0ff43961c83d15f4514c5be654a6435efd1b81..d605b03a856c28933b67511cbe2ece5ba5e8c27d 100644 (file)
@@ -61,7 +61,7 @@ public:
     void didReceiveDrawingAreaMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&);
 
     virtual void setNeedsDisplay(const WebCore::IntRect&) = 0;
-    virtual void scroll(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset) = 0;
+    virtual void scroll(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollDelta) = 0;
 
     // FIXME: These should be pure virtual.
     virtual void pageBackgroundTransparencyChanged() { }
index 4af153dd60bbfc3312a292cae0d3bb96049ca039..de756b14ae3a57123579b8687ca3b2972594328d 100644 (file)
@@ -105,7 +105,7 @@ void DrawingAreaImpl::setNeedsDisplay(const IntRect& rect)
     scheduleDisplay();
 }
 
-void DrawingAreaImpl::scroll(const IntRect& scrollRect, const IntSize& scrollOffset)
+void DrawingAreaImpl::scroll(const IntRect& scrollRect, const IntSize& scrollDelta)
 {
     if (!m_isPaintingEnabled)
         return;
@@ -115,7 +115,7 @@ void DrawingAreaImpl::scroll(const IntRect& scrollRect, const IntSize& scrollOff
         ASSERT(m_scrollOffset.isEmpty());
         ASSERT(m_dirtyRegion.isEmpty());
 
-        m_layerTreeHost->scrollNonCompositedContents(scrollRect, scrollOffset);
+        m_layerTreeHost->scrollNonCompositedContents(scrollRect);
         return;
     }
 
@@ -150,20 +150,20 @@ void DrawingAreaImpl::scroll(const IntRect& scrollRect, const IntSize& scrollOff
         m_dirtyRegion.subtract(scrollRect);
 
         // Move the dirty parts.
-        Region movedDirtyRegionInScrollRect = intersect(translate(dirtyRegionInScrollRect, scrollOffset), scrollRect);
+        Region movedDirtyRegionInScrollRect = intersect(translate(dirtyRegionInScrollRect, scrollDelta), scrollRect);
 
         // And add them back.
         m_dirtyRegion.unite(movedDirtyRegionInScrollRect);
     } 
     
     // Compute the scroll repaint region.
-    Region scrollRepaintRegion = subtract(scrollRect, translate(scrollRect, scrollOffset));
+    Region scrollRepaintRegion = subtract(scrollRect, translate(scrollRect, scrollDelta));
 
     m_dirtyRegion.unite(scrollRepaintRegion);
     scheduleDisplay();
 
     m_scrollRect = scrollRect;
-    m_scrollOffset += scrollOffset;
+    m_scrollOffset += scrollDelta;
 }
 
 void DrawingAreaImpl::setLayerTreeStateIsFrozen(bool isFrozen)
index c6bfb7196430bce4098da20a50414b9dfba9bb11..2ba999ad2ed4e5a112042c8dc5e55652d6da0266 100644 (file)
@@ -52,7 +52,7 @@ private:
 
     // DrawingArea
     virtual void setNeedsDisplay(const WebCore::IntRect&);
-    virtual void scroll(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset);
+    virtual void scroll(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollDelta);
     virtual void setLayerTreeStateIsFrozen(bool);
     virtual bool layerTreeStateIsFrozen() const { return m_layerTreeStateIsFrozen; }
     virtual LayerTreeHost* layerTreeHost() const { return m_layerTreeHost.get(); }
index 580d12b9b97eaef6a90ca8d3b0e3b86fcda8d819..0638a5a1bbca3ff634f7b08ed87c3156ebe153b6 100644 (file)
@@ -65,7 +65,7 @@ public:
     virtual void invalidate() = 0;
 
     virtual void setNonCompositedContentsNeedDisplay(const WebCore::IntRect&) = 0;
-    virtual void scrollNonCompositedContents(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset) = 0;
+    virtual void scrollNonCompositedContents(const WebCore::IntRect& scrollRect) = 0;
     virtual void forceRepaint() = 0;
     virtual bool forceRepaintAsync(uint64_t /*callbackID*/) { return false; }
     virtual void sizeDidChange(const WebCore::IntSize& newSize) = 0;
index de05511ac1f12104e74e34bbab31298db951245b..e64aa17e4ebd26c48f9ffd7ba6199bb1d071aa55 100644 (file)
@@ -177,7 +177,7 @@ void LayerTreeHostGtk::setNonCompositedContentsNeedDisplay(const IntRect& rect)
     scheduleLayerFlush();
 }
 
-void LayerTreeHostGtk::scrollNonCompositedContents(const IntRect& scrollRect, const IntSize& scrollOffset)
+void LayerTreeHostGtk::scrollNonCompositedContents(const IntRect& scrollRect)
 {
     setNonCompositedContentsNeedDisplay(scrollRect);
 }
index 1edadbc48303d9cc279fe959174490100138b610..5832823b7f34390ad09c8ac68e863908b792bc0f 100644 (file)
@@ -65,7 +65,7 @@ private:
     virtual void setShouldNotifyAfterNextScheduledLayerFlush(bool);
 
     virtual void setNonCompositedContentsNeedDisplay(const WebCore::IntRect&);
-    virtual void scrollNonCompositedContents(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset);
+    virtual void scrollNonCompositedContents(const WebCore::IntRect& scrollRect);
 
     virtual void didInstallPageOverlay();
     virtual void didUninstallPageOverlay();
index e092b239a856c5d70e50b5aa7ffc5a72553c6b8f..75b3537e69600caf9b96d58a9023056d21851510 100644 (file)
@@ -51,7 +51,7 @@ private:
     virtual void setRootCompositingLayer(WebCore::GraphicsLayer*) OVERRIDE;
     virtual void invalidate() OVERRIDE;
     virtual void setNonCompositedContentsNeedDisplay(const WebCore::IntRect&) OVERRIDE;
-    virtual void scrollNonCompositedContents(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset) OVERRIDE;
+    virtual void scrollNonCompositedContents(const WebCore::IntRect& scrollRect) OVERRIDE;
     virtual void forceRepaint() OVERRIDE;
     virtual void sizeDidChange(const WebCore::IntSize& newSize) OVERRIDE;
     virtual void deviceOrPageScaleFactorChanged() OVERRIDE;
index 7e4f7a11b4024d03b5eee5067381ec5f783834b5..c2484751b56228393a6f9b774de3c791e1121a4a 100644 (file)
@@ -121,7 +121,7 @@ void LayerTreeHostMac::setNonCompositedContentsNeedDisplay(const IntRect& rect)
     scheduleLayerFlush();
 }
 
-void LayerTreeHostMac::scrollNonCompositedContents(const IntRect& scrollRect, const IntSize& scrollOffset)
+void LayerTreeHostMac::scrollNonCompositedContents(const IntRect& scrollRect)
 {
     setNonCompositedContentsNeedDisplay(scrollRect);
 }
index 86f32b06198267231e668b4a29abfdadf5877c15..e13d0a417f0c21aba75054d1843fbd6b73e1a329 100644 (file)
@@ -43,7 +43,7 @@ private:
 
     // DrawingArea
     virtual void setNeedsDisplay(const WebCore::IntRect&) OVERRIDE;
-    virtual void scroll(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset) OVERRIDE;
+    virtual void scroll(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollDelta) OVERRIDE;
 
     virtual WebCore::GraphicsLayerFactory* graphicsLayerFactory() OVERRIDE;
     virtual void setRootCompositingLayer(WebCore::GraphicsLayer*) OVERRIDE;
index d014e16ad791b9274a7f31cda5a25045b64cb805..c38fdf13cd0fde6cd5a9abd8fa7f0c296727a959 100644 (file)
@@ -51,7 +51,7 @@ void RemoteLayerTreeDrawingArea::setNeedsDisplay(const IntRect&)
 {
 }
 
-void RemoteLayerTreeDrawingArea::scroll(const IntRect& scrollRect, const IntSize& scrollOffset)
+void RemoteLayerTreeDrawingArea::scroll(const IntRect& scrollRect, const IntSize& scrollDelta)
 {
 }
 
index 6d935cf4350039c5cba4d9c71d1505c0ad9d7880..26c3bc136964d94953027d3778c8ac258afe5de5 100644 (file)
@@ -56,7 +56,7 @@ private:
 
     // DrawingArea
     virtual void setNeedsDisplay(const WebCore::IntRect&) OVERRIDE;
-    virtual void scroll(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset) OVERRIDE;
+    virtual void scroll(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollDelta) OVERRIDE;
 
     virtual void forceRepaint() OVERRIDE;
     virtual bool forceRepaintAsync(uint64_t callbackID) OVERRIDE;
index 97fa2448efb77d7ab324a2a9086df74e70d2b9ea..2601291ca0f10814e72608540af2cc13fad941f6 100644 (file)
@@ -104,7 +104,7 @@ void TiledCoreAnimationDrawingArea::setNeedsDisplay(const IntRect& rect)
 {
 }
 
-void TiledCoreAnimationDrawingArea::scroll(const IntRect& scrollRect, const IntSize& scrollOffset)
+void TiledCoreAnimationDrawingArea::scroll(const IntRect& scrollRect, const IntSize& scrollDelta)
 {
 }