Safari pages are blank sometimes (missing tiles)
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Feb 2017 22:33:42 +0000 (22:33 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Feb 2017 22:33:42 +0000 (22:33 +0000)
commit3677d67f2bdb4c68a4304954116f465d701ab15c
treef17321a83d08aa90e1f7f5f964465ef59ea7f099
parentef41b3e82471931c24029428b76b432c4fa30615
Safari pages are blank sometimes (missing tiles)
https://bugs.webkit.org/show_bug.cgi?id=167904

Reviewed by Tim Horton.

Source/WebCore:

After r211683 we failed to udpate the "inWindow" flag on the page tiled layer, because
usingTiledBacking() on GraphicsLayer confusingly was false for the page tiled layer.

Fix by removing usingTiledBacking() entirely, and checking for tiledBacking(),
looking at the layer type when necessary.

Tested by tiled-drawing/tiled-backing-in-window.html

* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::GraphicsLayer):
(WebCore::GraphicsLayer::setIsInWindowIncludingDescendants): This is the bug fix.
(WebCore::GraphicsLayer::getDebugBorderInfo):
(WebCore::GraphicsLayer::dumpProperties):
* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::usingTiledBacking): Deleted.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::recursiveCommitChanges):
(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
(WebCore::GraphicsLayerCA::changeLayerTypeTo):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::willDestroyLayer):
(WebCore::RenderLayerBacking::compositingLayerType):
* rendering/RenderLayerCompositor.cpp: A bit more logging.
(WebCore::RenderLayerCompositor::setIsInWindow):
(WebCore::RenderLayerCompositor::attachRootLayer):

LayoutTests:

New result; this test detected the bug.

* tiled-drawing/tiled-backing-in-window-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@211750 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/tiled-drawing/tiled-backing-in-window-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/GraphicsLayer.cpp
Source/WebCore/platform/graphics/GraphicsLayer.h
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
Source/WebCore/rendering/RenderLayerBacking.cpp
Source/WebCore/rendering/RenderLayerCompositor.cpp