Rename scrollDelta to scrollOffset everywhere.
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Jan 2011 21:55:21 +0000 (21:55 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Jan 2011 21:55:21 +0000 (21:55 +0000)
Reviewed by Sam Weinig.

* Shared/UpdateInfo.cpp:
(WebKit::UpdateInfo::encode):
(WebKit::UpdateInfo::decode):
* Shared/UpdateInfo.h:
* UIProcess/BackingStore.h:
* UIProcess/mac/BackingStoreMac.mm:
(WebKit::BackingStore::incorporateUpdate):
(WebKit::BackingStore::scroll):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::scroll):
(WebKit::WebChromeClient::delegatedScrollRequested):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
(WebKit::ChunkedUpdateDrawingArea::scroll):
* WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::scroll):
(WebKit::DrawingAreaImpl::display):
* WebProcess/WebPage/DrawingAreaImpl.h:
* WebProcess/WebPage/LayerBackedDrawingArea.cpp:
(WebKit::LayerBackedDrawingArea::scroll):
* WebProcess/WebPage/LayerBackedDrawingArea.h:

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

14 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/UpdateInfo.cpp
Source/WebKit2/Shared/UpdateInfo.h
Source/WebKit2/UIProcess/BackingStore.h
Source/WebKit2/UIProcess/mac/BackingStoreMac.mm
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h
Source/WebKit2/WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp
Source/WebKit2/WebProcess/WebPage/ChunkedUpdateDrawingArea.h
Source/WebKit2/WebProcess/WebPage/DrawingArea.h
Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp
Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.h
Source/WebKit2/WebProcess/WebPage/LayerBackedDrawingArea.cpp
Source/WebKit2/WebProcess/WebPage/LayerBackedDrawingArea.h

index aec442579c7a4337ca8c7e09ed89625b6c28807f..20064a110f662c19232ad53e505f6b7313a00ac0 100644 (file)
@@ -1,3 +1,33 @@
+2011-01-18  Anders Carlsson  <andersca@apple.com>
+
+        Reviewed by Sam Weinig.
+
+        Rename scrollDelta to scrollOffset everywhere.
+
+        * Shared/UpdateInfo.cpp:
+        (WebKit::UpdateInfo::encode):
+        (WebKit::UpdateInfo::decode):
+        * Shared/UpdateInfo.h:
+        * UIProcess/BackingStore.h:
+        * UIProcess/mac/BackingStoreMac.mm:
+        (WebKit::BackingStore::incorporateUpdate):
+        (WebKit::BackingStore::scroll):
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+        (WebKit::WebChromeClient::scroll):
+        (WebKit::WebChromeClient::delegatedScrollRequested):
+        * WebProcess/WebCoreSupport/WebChromeClient.h:
+        * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
+        (WebKit::ChunkedUpdateDrawingArea::scroll):
+        * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
+        * WebProcess/WebPage/DrawingArea.h:
+        * WebProcess/WebPage/DrawingAreaImpl.cpp:
+        (WebKit::DrawingAreaImpl::scroll):
+        (WebKit::DrawingAreaImpl::display):
+        * WebProcess/WebPage/DrawingAreaImpl.h:
+        * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
+        (WebKit::LayerBackedDrawingArea::scroll):
+        * WebProcess/WebPage/LayerBackedDrawingArea.h:
+
 2011-01-18  Anders Carlsson  <andersca@apple.com>
 
         Reviewed by Sam Weinig.
index 1b504ed263ba1867d36342e6132e6acde1acf59e..f8871d9a8adc3e784ac9bdbe3cb6c7a0d2c4f3c8 100644 (file)
@@ -33,7 +33,7 @@ void UpdateInfo::encode(CoreIPC::ArgumentEncoder* encoder) const
 {
     encoder->encode(viewSize);
     encoder->encode(scrollRect);
-    encoder->encode(scrollDelta);
+    encoder->encode(scrollOffset);
     encoder->encode(updateRectBounds);
     encoder->encode(updateRects);
     encoder->encode(bitmapHandle);
@@ -45,7 +45,7 @@ bool UpdateInfo::decode(CoreIPC::ArgumentDecoder* decoder, UpdateInfo& result)
         return false;
     if (!decoder->decode(result.scrollRect))
         return false;
-    if (!decoder->decode(result.scrollDelta))
+    if (!decoder->decode(result.scrollOffset))
         return false;
     if (!decoder->decode(result.updateRectBounds))
         return false;
index 850911ca0afffb8a22c5cd4d1f7e9c59f5571888..7b5454eb1c16a012e41f2ac7395e72e7fada8ed0 100644 (file)
@@ -51,7 +51,7 @@ public:
 
     // The rect and delta to be scrolled.
     WebCore::IntRect scrollRect;
-    WebCore::IntSize scrollDelta;
+    WebCore::IntSize scrollOffset;
     
     // The bounds of the update rects.
     WebCore::IntRect updateRectBounds;
index e196a5533d33e459387e6a28d2695ef7339afa35..de8c4a30a98ddb915a85d23b2f17561fb69ee90e 100644 (file)
@@ -60,7 +60,7 @@ public:
 private:
     explicit BackingStore(const WebCore::IntSize&);
 
-    void scroll(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollDelta);
+    void scroll(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset);
 
     WebCore::IntSize m_size;
 
index 979f7559ec28fc85908fc5324d8f2c7bbb2665f3..1c3c07c0b8f44a705ae5f43ae46f7a0a176b663e 100644 (file)
@@ -59,7 +59,7 @@ void BackingStore::incorporateUpdate(const UpdateInfo& updateInfo)
         CGContextScaleCTM(m_bitmapContext.get(), 1, -1);
     }
 
-    scroll(updateInfo.scrollRect, updateInfo.scrollDelta);
+    scroll(updateInfo.scrollRect, updateInfo.scrollOffset);
 
     IntPoint updateRectLocation = updateInfo.updateRectBounds.location();
 
@@ -75,16 +75,16 @@ void BackingStore::incorporateUpdate(const UpdateInfo& updateInfo)
     }
 }
 
-void BackingStore::scroll(const IntRect& scrollRect, const IntSize& scrollDelta)
+void BackingStore::scroll(const IntRect& scrollRect, const IntSize& scrollOffset)
 {
-    if (scrollDelta.isZero())
+    if (scrollOffset.isZero())
         return;
 
     CGContextSaveGState(m_bitmapContext.get());
 
     CGContextClipToRect(m_bitmapContext.get(), scrollRect);
 
-    CGPoint destination = CGPointMake(scrollRect.x() + scrollDelta.width(), scrollRect.y() + scrollDelta.height());
+    CGPoint destination = CGPointMake(scrollRect.x() + scrollOffset.width(), scrollRect.y() + scrollOffset.height());
     paintBitmapContext(m_bitmapContext.get(), m_bitmapContext.get(), destination, scrollRect);
 
     CGContextRestoreGState(m_bitmapContext.get());
index ffca3fa02fe40b17173491ceb52994d71677bcbf..1d7f1cd1d275b44cd2fcc476cded322881f514fc 100644 (file)
@@ -364,16 +364,16 @@ void WebChromeClient::invalidateContentsForSlowScroll(const IntRect& rect, bool)
     m_page->drawingArea()->setNeedsDisplay(rect);
 }
 
-void WebChromeClient::scroll(const IntSize& scrollDelta, const IntRect& scrollRect, const IntRect&)
+void WebChromeClient::scroll(const IntSize& scrollOffset, const IntRect& scrollRect, const IntRect&)
 {
     m_page->pageDidScroll();
-    m_page->drawingArea()->scroll(scrollRect, scrollDelta);
+    m_page->drawingArea()->scroll(scrollRect, scrollOffset);
 }
 
 #if ENABLE(TILED_BACKING_STORE)
-void WebChromeClient::delegatedScrollRequested(const IntSize& scrollDelta)
+void WebChromeClient::delegatedScrollRequested(const IntSize& scrollOffset)
 {
-    m_page->pageDidRequestScroll(scrollDelta);
+    m_page->pageDidRequestScroll(scrollOffset);
 }
 #endif
 
index 44c36588d3438952e7aee1f9b9e5375f18892dab..d749833666d8ff042eb0cff77cf2e25b0bd1481f 100644 (file)
@@ -107,9 +107,9 @@ private:
     virtual void invalidateWindow(const WebCore::IntRect&, bool);
     virtual void invalidateContentsAndWindow(const WebCore::IntRect&, bool);
     virtual void invalidateContentsForSlowScroll(const WebCore::IntRect&, bool);
-    virtual void scroll(const WebCore::IntSize& scrollDelta, const WebCore::IntRect& scrollRect, const WebCore::IntRect& clipRect);
+    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& scrollDelta);
+    virtual void delegatedScrollRequested(const WebCore::IntSize& scrollOffset);
 #endif
     virtual WebCore::IntPoint screenToWindow(const WebCore::IntPoint&) const;
     virtual WebCore::IntRect windowToScreen(const WebCore::IntRect&) const;
index 513621c9aa8cc928abfb43b773c76a03aff413c8..d629cedf0383ba3a3031a21fc5ccd1a3dbd0a52f 100644 (file)
@@ -49,7 +49,7 @@ ChunkedUpdateDrawingArea::~ChunkedUpdateDrawingArea()
 {
 }
 
-void ChunkedUpdateDrawingArea::scroll(const IntRect& scrollRect, const IntSize& scrollDelta)
+void ChunkedUpdateDrawingArea::scroll(const IntRect& scrollRect, const IntSize& scrollOffset)
 {
     // FIXME: Do something much smarter.
     setNeedsDisplay(scrollRect);
index ac4b42406517f6899fa834a06f49f50f5bdd8555..08aa3e7998c2ca4ffa273a527a69af3c617bbbc4 100644 (file)
@@ -40,7 +40,7 @@ public:
     virtual ~ChunkedUpdateDrawingArea();
 
     virtual void setNeedsDisplay(const WebCore::IntRect&);
-    virtual void scroll(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollDelta);
+    virtual void scroll(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset);
     virtual void display();
 
 #if USE(ACCELERATED_COMPOSITING)
index 75f0b0055d627d2f2a990b60ee61b28e94e99888..f8ffa4ab1e7c583a63f20391076dc67168139ec5 100644 (file)
@@ -52,7 +52,7 @@ public:
 #endif
 
     virtual void setNeedsDisplay(const WebCore::IntRect&) = 0;
-    virtual void scroll(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollDelta) = 0;
+    virtual void scroll(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset) = 0;
 
     virtual void pageBackgroundTransparencyChanged() { }
 
index ab4655ae9fd6ffa56c33af4bd637d4d6ad7ecdbf..04fccb72e81036b805fa0ef63e24808aa520856b 100644 (file)
@@ -65,7 +65,7 @@ void DrawingAreaImpl::setNeedsDisplay(const IntRect& rect)
     scheduleDisplay();
 }
 
-void DrawingAreaImpl::scroll(const IntRect& scrollRect, const IntSize& scrollDelta)
+void DrawingAreaImpl::scroll(const IntRect& scrollRect, const IntSize& scrollOffset)
 {
     if (!m_scrollRect.isEmpty() && scrollRect != m_scrollRect) {
         unsigned scrollArea = scrollRect.width() * scrollRect.height();
@@ -81,7 +81,7 @@ void DrawingAreaImpl::scroll(const IntRect& scrollRect, const IntSize& scrollDel
         // Just repaint the entire current scroll rect, we'll scroll the new rect instead.
         setNeedsDisplay(m_scrollRect);
         m_scrollRect = IntRect();
-        m_scrollDelta = IntSize();
+        m_scrollOffset = IntSize();
     }
 
     // Get the part of the dirty region that is in the scroll rect.
@@ -92,19 +92,19 @@ void DrawingAreaImpl::scroll(const IntRect& scrollRect, const IntSize& scrollDel
         m_dirtyRegion.subtract(scrollRect);
 
         // Move the dirty parts.
-        Region movedDirtyRegionInScrollRect = intersect(translate(dirtyRegionInScrollRect, scrollDelta), scrollRect);
+        Region movedDirtyRegionInScrollRect = intersect(translate(dirtyRegionInScrollRect, scrollOffset), scrollRect);
 
         // And add them back.
         m_dirtyRegion.unite(movedDirtyRegionInScrollRect);
     } 
     
     // Compute the scroll repaint region.
-    Region scrollRepaintRegion = subtract(scrollRect, translate(scrollRect, scrollDelta));
+    Region scrollRepaintRegion = subtract(scrollRect, translate(scrollRect, scrollOffset));
 
     m_dirtyRegion.unite(scrollRepaintRegion);
 
     m_scrollRect = scrollRect;
-    m_scrollDelta += scrollDelta;
+    m_scrollOffset += scrollOffset;
 }
 
 void DrawingAreaImpl::attachCompositingContext()
@@ -214,11 +214,11 @@ void DrawingAreaImpl::display(UpdateInfo& updateInfo)
     }
 
     updateInfo.scrollRect = m_scrollRect;
-    updateInfo.scrollDelta = m_scrollDelta;
+    updateInfo.scrollOffset = m_scrollOffset;
 
     m_dirtyRegion = Region();
     m_scrollRect = IntRect();
-    m_scrollDelta = IntSize();
+    m_scrollOffset = IntSize();
     
     RefPtr<ShareableBitmap> bitmap = ShareableBitmap::createShareable(bounds.size());
     if (!bitmap->createHandle(updateInfo.bitmapHandle))
index 1f1b2e2076427b47a5afd1d063987dd5b09fa7e6..01273b71e33a9375a53f4b8c88a5cc09d852cbba 100644 (file)
@@ -44,7 +44,7 @@ private:
 
     // DrawingArea
     virtual void setNeedsDisplay(const WebCore::IntRect&);
-    virtual void scroll(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollDelta);
+    virtual void scroll(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset);
     virtual void attachCompositingContext();
     virtual void detachCompositingContext();
     virtual void setRootCompositingLayer(WebCore::GraphicsLayer*);
@@ -62,7 +62,7 @@ private:
 
     Region m_dirtyRegion;
     WebCore::IntRect m_scrollRect;
-    WebCore::IntSize m_scrollDelta;
+    WebCore::IntSize m_scrollOffset;
     
     // Whether we're waiting for a DidUpdate message. Used for throttling paints so that the 
     // web process won't paint more frequent than the UI process can handle.
index 8a81cca16d359ee35a0c6070229a2a9d1804eef0..3c46c5a37dfb438ce534696a3a2e85038900c675 100644 (file)
@@ -61,7 +61,7 @@ LayerBackedDrawingArea::~LayerBackedDrawingArea()
     platformClear();
 }
 
-void LayerBackedDrawingArea::scroll(const IntRect& scrollRect, const IntSize& scrollDelta)
+void LayerBackedDrawingArea::scroll(const IntRect& scrollRect, const IntSize& scrollOffset)
 {
     // FIXME: Do something much smarter.
     setNeedsDisplay(scrollRect);
index 1b49de2318304ff22063b71cc1d96c86805e1648..81acfd21e4c72a2aa5dd12d2d4dafc4b66b8a329 100644 (file)
@@ -56,7 +56,7 @@ public:
     virtual ~LayerBackedDrawingArea();
 
     virtual void setNeedsDisplay(const WebCore::IntRect&);
-    virtual void scroll(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollDelta);
+    virtual void scroll(const WebCore::IntRect& scrollRect, const WebCore::IntSize& scrollOffset);
     virtual void display();
 
     virtual void pageBackgroundTransparencyChanged();