Have will-change create stacking context when necessary
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 15 Aug 2015 20:13:24 +0000 (20:13 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 15 Aug 2015 20:13:24 +0000 (20:13 +0000)
commit3c48636508b11e0888da498d4a9a3ba983475c49
treed9e7771db77fb9f206e609a2a554ef04d6bd2cee
parent8be886b4e575af44f5090290f6c780dd0c46eb46
Have will-change create stacking context when necessary
https://bugs.webkit.org/show_bug.cgi?id=148060

Reviewed by Zalan Bujtas.

Source/WebCore:

If will-change includes a property whose non-initial value can create
stacking context, create stacking context for that element.

Test: fast/css/will-change/will-change-creates-stacking-context.html

* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
* rendering/style/RenderStyle.h: Add willChangeCreatesStackingContext(),
which on most cases is a fast, inlined 'return false'. Otherwise ask
the WillChangeData.
* rendering/style/WillChangeData.cpp:
(WebCore::propertyCreatesStackingContext):
(WebCore::WillChangeData::createsStackingContext):
* rendering/style/WillChangeData.h:

LayoutTests:

Ref test for will-change creating stacking context.

* fast/css/will-change/resources/will-change-stacking-helper.js: Added.
(makeStackingBlock):
* fast/css/will-change/will-change-creates-stacking-context-expected.html: Added.
* fast/css/will-change/will-change-creates-stacking-context.html: Added.
* platform/efl/TestExpectations: Mark image failure on EFL, since some CSS
properties in the test are disabled there.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@188514 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/css/will-change/resources/will-change-stacking-helper.js [new file with mode: 0644]
LayoutTests/fast/css/will-change/will-change-creates-stacking-context-expected.html [new file with mode: 0644]
LayoutTests/fast/css/will-change/will-change-creates-stacking-context.html [new file with mode: 0644]
LayoutTests/platform/efl/TestExpectations
LayoutTests/platform/mac-mavericks/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/rendering/style/RenderStyle.h
Source/WebCore/rendering/style/WillChangeData.cpp
Source/WebCore/rendering/style/WillChangeData.h