Tiles on bottom of screen are not always allocated when necessary
authormmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 30 Jun 2014 21:21:29 +0000 (21:21 +0000)
committermmaxfield@apple.com <mmaxfield@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 30 Jun 2014 21:21:29 +0000 (21:21 +0000)
commit22caaa3d9c82bc240bab9b43b49393e1465714c0
tree0917bd6eb05eccc94ee0e71333fb0942e2d37526
parent8f2e0fa37b76487e920e7cf7a65925472690f431
Tiles on bottom of screen are not always allocated when necessary
https://bugs.webkit.org/show_bug.cgi?id=134272

Reviewed by Simon Fraser.

Source/WebCore:
The initial visibleRect is in the coordinate of the root layer, so its origin
is at the top left of the view. The initial rect we were using doesn't
include the contents inset, so it was too short, which was causing tiles near
the bottom of the screen to not always be allocated if the tile threshold was
close to the bottom of the view. Instead, we want to include the contents
inset size so the visible rect includes the entire view.
GraphicsLayerCA::recursiveCommitChanges() takes care of mapping and cropping
the visible rect into the tiled layer's coordinate system, at which point it
is used for visible tile logic.

Test: platform/mac-wk2/tiled-drawing/visible-rect-content-inset.html

* platform/graphics/ca/TileCoverageMap.cpp:
(WebCore::TileCoverageMap::update):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):

LayoutTests:
Apply a content inset, then dump visible rects.

* platform/mac-wk2/tiled-drawing/visible-rect-content-inset-expected.txt: Added.
* platform/mac-wk2/tiled-drawing/visible-rect-content-inset.html: Added.
* compositing/visible-rect/iframe-no-layers.html: For WK2, the size of the visibleRect
includes the size of the border of the iframe. In order to elliminate platform
differences, set this border to 0.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170597 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/compositing/visible-rect/iframe-no-layers.html
LayoutTests/platform/mac-wk2/tiled-drawing/visible-rect-content-inset-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac-wk2/tiled-drawing/visible-rect-content-inset.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/ca/TileCoverageMap.cpp
Source/WebCore/rendering/RenderLayerCompositor.cpp