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
+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
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)
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
scheduleLayerFlush();
}
-void CoordinatedLayerTreeHost::scrollNonCompositedContents(const WebCore::IntRect& scrollRect, const WebCore::IntSize& /* scrollOffset */)
+void CoordinatedLayerTreeHost::scrollNonCompositedContents(const WebCore::IntRect& scrollRect)
{
setNonCompositedContentsNeedDisplay(scrollRect);
}
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);
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() { }
scheduleDisplay();
}
-void DrawingAreaImpl::scroll(const IntRect& scrollRect, const IntSize& scrollOffset)
+void DrawingAreaImpl::scroll(const IntRect& scrollRect, const IntSize& scrollDelta)
{
if (!m_isPaintingEnabled)
return;
ASSERT(m_scrollOffset.isEmpty());
ASSERT(m_dirtyRegion.isEmpty());
- m_layerTreeHost->scrollNonCompositedContents(scrollRect, scrollOffset);
+ m_layerTreeHost->scrollNonCompositedContents(scrollRect);
return;
}
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)
// 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(); }
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;
scheduleLayerFlush();
}
-void LayerTreeHostGtk::scrollNonCompositedContents(const IntRect& scrollRect, const IntSize& scrollOffset)
+void LayerTreeHostGtk::scrollNonCompositedContents(const IntRect& scrollRect)
{
setNonCompositedContentsNeedDisplay(scrollRect);
}
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();
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;
scheduleLayerFlush();
}
-void LayerTreeHostMac::scrollNonCompositedContents(const IntRect& scrollRect, const IntSize& scrollOffset)
+void LayerTreeHostMac::scrollNonCompositedContents(const IntRect& scrollRect)
{
setNonCompositedContentsNeedDisplay(scrollRect);
}
// 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;
{
}
-void RemoteLayerTreeDrawingArea::scroll(const IntRect& scrollRect, const IntSize& scrollOffset)
+void RemoteLayerTreeDrawingArea::scroll(const IntRect& scrollRect, const IntSize& scrollDelta)
{
}
// 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;
{
}
-void TiledCoreAnimationDrawingArea::scroll(const IntRect& scrollRect, const IntSize& scrollOffset)
+void TiledCoreAnimationDrawingArea::scroll(const IntRect& scrollRect, const IntSize& scrollDelta)
{
}