REGRESSION (r238357): Pins on Yelp map disappear
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Dec 2018 02:35:10 +0000 (02:35 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Dec 2018 02:35:10 +0000 (02:35 +0000)
commit5d77bff17f379a6135337de33508e6439bbbf891
tree85bf81763b297b03f2b00bcd230d266baa4257b0
parent0f0fdf6dbc92b9113eb0e0e6bb6962ae5c79c2ca
REGRESSION (r238357): Pins on Yelp map disappear
https://bugs.webkit.org/show_bug.cgi?id=192597
rdar://problem/46578285

Reviewed by Zalan Bujtas.
Source/WebCore:

RenderLayerCompositor::updateBackingAndHierarchy() had a bug where if a RenderLayer gained
a negative z-order child (triggering creation of a foreground layer), we'd fail to
call the "setChildren()" with the vector containing that foreground layer.

When updateBackingAndHierarchy() stops visiting descendants because none are composited,
it may still have to update the child list with the foreground layer, so make sure
the code handles this case.

Tests: compositing/z-order/add-negative-z-child.html
       compositing/z-order/rebuild-sibling-of-layer-with-foreground-layer.html

* rendering/RenderLayer.cpp:
(WebCore::outputPaintOrderTreeRecursive):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateBackingAndHierarchy):

LayoutTests:

Add tests that toggle negative z-index on a child, with and without sibling compositing layers.

* compositing/z-order/add-negative-z-child-expected.html: Added.
* compositing/z-order/add-negative-z-child.html: Added.
* compositing/z-order/rebuild-sibling-of-layer-with-foreground-layer-expected.html: Added.
* compositing/z-order/rebuild-sibling-of-layer-with-foreground-layer.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239146 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/compositing/z-order/add-negative-z-child-expected.html [new file with mode: 0644]
LayoutTests/compositing/z-order/add-negative-z-child.html [new file with mode: 0644]
LayoutTests/compositing/z-order/rebuild-sibling-of-layer-with-foreground-layer-expected.html [new file with mode: 0644]
LayoutTests/compositing/z-order/rebuild-sibling-of-layer-with-foreground-layer.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderLayerCompositor.cpp