Rubber-banding should not affect the visibleRect of the TileCache
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Feb 2013 01:29:39 +0000 (01:29 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Feb 2013 01:29:39 +0000 (01:29 +0000)
commitf35f22853e6ea7a93b74d5c2e469fb7cd987c21f
tree1051f485a4ed8d35e85fc6e2cddd5d1d059f9aff
parent72df750e5e34b33869442f8bbce51bb9e6b56d94
Rubber-banding should not affect the visibleRect of the TileCache
https://bugs.webkit.org/show_bug.cgi?id=110278

Reviewed by Beth Dakin.

When rubber-banding a slow-scrolling page, or image document, we would constantly re-create
the bottom tile because of the logic that adapts the tile size to the visible rect when slow
scrolling.

Avoid that by ensuring that the visibleRect is not affected by rubber-banding. This is done
via a GraphicsLayerClient function that allows RenderLayerCompositor to provide a custom
position for the scroll layer. We constrain that scroll position to remove the overhang that
results from rubber-banding.

I wasn't able to make a test for this, even with internals.setScrollViewPosition().

* platform/graphics/GraphicsLayerClient.h:
(GraphicsLayerClient):
(WebCore::GraphicsLayerClient::customPositionForVisibleRectComputation):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::computeVisibleRect):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::customPositionForVisibleRectComputation):
* rendering/RenderLayerCompositor.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@143417 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/GraphicsLayerClient.h
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebCore/rendering/RenderLayerCompositor.h