ASSERTION FAILED: accumulation == TransformState::FlattenTransform in WebCore::Graphi...
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Apr 2016 00:08:28 +0000 (00:08 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Apr 2016 00:08:28 +0000 (00:08 +0000)
commit65e205058ecbf2ec9e3e10589c3a284da951cabb
tree161f93c97716dce4bc98a1f22d2c631d276f9ff7
parentb750c6a372a72cbac597eb20b2d38c0830de69ca
ASSERTION FAILED: accumulation == TransformState::FlattenTransform in WebCore::GraphicsLayerCA::computeVisibleAndCoverageRect
https://bugs.webkit.org/show_bug.cgi?id=155362

Reviewed by Zalan Bujtas.

Source/WebCore:

A particular configuration of composited RenderLayers with preserve-3d and clipping
caused assertions because an ancestor clipping layer had masksToBounds() set, but
a preserves3D() parent, triggering an assertion in GraphicsLayerCA::computeVisibleAndCoverageRect().
Make two changes to address this:

First, CSS clip: and clip-path: should force flattening and override preserve-3d in
the RenderStyle.

Second, don't accumulate transforms in GraphicsLayerCA through layers with masksToBounds().

Tests: compositing/clipping/preserve3d-flatten-assertion-nested.html
       compositing/clipping/preserve3d-flatten-assertion.html

* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::accumulatesTransform):

LayoutTests:

Test cases that should not assert in debug builds.

* compositing/clipping/preserve3d-flatten-assertion-nested.html: Added.
* compositing/clipping/preserve3d-flatten-assertion.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199847 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/compositing/clipping/preserve3d-flatten-assertion-expected.txt [new file with mode: 0644]
LayoutTests/compositing/clipping/preserve3d-flatten-assertion-nested-expected.txt [new file with mode: 0644]
LayoutTests/compositing/clipping/preserve3d-flatten-assertion-nested.html [new file with mode: 0644]
LayoutTests/compositing/clipping/preserve3d-flatten-assertion.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp