RenderLayer::updateLayerPositions() doesn't propagate the ancestor flags correctly
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 24 Aug 2019 17:35:25 +0000 (17:35 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 24 Aug 2019 17:35:25 +0000 (17:35 +0000)
commit7af7b55c0cab41ca5c01ac2dc34965bafd3ba979
treefe020921d8d15589ee2f00aab3bed007a9c9ac19
parent7f4b8c7b485075a77c46f97fa6c89686a6988104
RenderLayer::updateLayerPositions() doesn't propagate the ancestor flags correctly
https://bugs.webkit.org/show_bug.cgi?id=201115

Reviewed by Zalan Bujtas.

When an updateLayerPositions() traversal starts at a non-root layer, we failed to populate
the ancestor-related UpdateLayerPositionsFlag flags, leaving layers with missing flags
(e.g. the m_hasTransformedAncestor flag). This is detected by the patch in bug 201066.

Fix by having updateLayerPositionsAfterStyleChange() and updateLayerPositionsAfterLayout()
initialize the flags from the parent layer.

This is a behavior change not detected by any existing test, but will be exercised once
the patch from bug 201066 lands.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::flagsForUpdateLayerPositions):
(WebCore::RenderLayer::updateLayerPositionsAfterStyleChange):
(WebCore::RenderLayer::updateLayerPositionsAfterLayout):
(WebCore::outputPaintOrderTreeLegend):
(WebCore::outputPaintOrderTreeRecursive): Log hasTransformedAncestor().
* rendering/RenderLayer.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249088 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderLayer.h