Normal-flow-only flex items don't correctly respect z-index
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Nov 2018 22:57:31 +0000 (22:57 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Nov 2018 22:57:31 +0000 (22:57 +0000)
commitb852cd80eafb939aafde6f620eec08375278306e
tree4c0459aaa176fb156fc085048db400f867df0e7f
parent3061b938d1445e8534a92d2b7cd080abd081a09c
Normal-flow-only flex items don't correctly respect z-index
https://bugs.webkit.org/show_bug.cgi?id=191486

Reviewed by Simon Fraser.

Source/WebCore:

Test: css3/flexbox/z-index-with-normal-flow-only.html

* rendering/RenderLayer.cpp:
(WebCore::canCreateStackingContext):
r125693 did not ensure that flex items which would otherwise be
normal-flow-only would be put into the z-order tree when necessary.
Fix by respecting the same trigger we use to make layers for flex items;
namely, not having auto z-index.

LayoutTests:

* css3/flexbox/z-index-with-normal-flow-only-expected.html: Added.
* css3/flexbox/z-index-with-normal-flow-only.html: Added.
Add a test that a <canvas> with z-index 50 correctly stacks below
a <canvas> that is a flex-item with z-index 100.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238058 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/css3/flexbox/z-index-with-normal-flow-only-expected.html [new file with mode: 0644]
LayoutTests/css3/flexbox/z-index-with-normal-flow-only.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayer.cpp