Tiled scrolling indicator needs to take topContentInset into account
authorbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 May 2014 04:08:48 +0000 (04:08 +0000)
committerbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 May 2014 04:08:48 +0000 (04:08 +0000)
commiteeaed41d6024a94513f81f5d292b7eaa06a7bbb9
tree686b243ea3187af1fe8aa854839d34e2b3412041
parent6d65e38313b36e581518eecbdd4f60d57ad89a98
Tiled scrolling indicator needs to take topContentInset into account
https://bugs.webkit.org/show_bug.cgi?id=132940

Reviewed by Simon Fraser.

The tiled scrolling indicator needs to move down by the value of the
topContentInset. This patch makes that happen by caching the topContentInset in
the TileController. This does feel a little silly since there is already a
function called setTiledScrollingIndicatorPosition() on TiledBacking. However, it
was often the case that calling that function had no effect because m_coverageMap
had not yet been created, and then the information was lost. So instead, we cache
the value.

Set TiledBacking’s copy of topContentInset whenever it changes for the FrameView.
* page/FrameView.cpp:
(WebCore::FrameView::topContentInsetDidChange):

New function to set the inset. Use the inset to position the coverage map.
* platform/graphics/TiledBacking.h:
* platform/graphics/ca/mac/TileController.h:
* platform/graphics/ca/mac/TileController.mm:
(WebCore::TileController::TileController):
(WebCore::TileController::setTopContentInset):

When the coverage map is created, consult the value of the inset.
* platform/graphics/ca/mac/TileCoverageMap.mm:
(WebCore::TileCoverageMap::TileCoverageMap):

Once the backing has been ensured, set the inset.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateBacking):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@168890 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/page/FrameView.cpp
Source/WebCore/platform/graphics/TiledBacking.h
Source/WebCore/platform/graphics/ca/mac/TileController.h
Source/WebCore/platform/graphics/ca/mac/TileController.mm
Source/WebCore/platform/graphics/ca/mac/TileCoverageMap.mm
Source/WebCore/rendering/RenderLayerCompositor.cpp