haikuwebkit/LayoutTests/css3/blending/blend-mode-isolation-accele...

30 lines
601 B
Plaintext
Raw Permalink Normal View History

[CSS Blending] Blending doesn't work if the parent stacking context is not a self painting layer https://bugs.webkit.org/show_bug.cgi?id=130891 Patch by Ion Rosca <rosca@adobe.com> on 2014-05-07 Reviewed by Dean Jackson. Source/WebCore: The stacking context layers having unisolated blending descendants should be able to create transparency layers or to become composited in order to restrict blending content to accessing the information outside the current stacking context. Some layers are not self painting layers and these layers cannot crate transparency layers and cannot be composited, thus they are not able to isolate blending descendants when it's required. The solution in this patch is to make a layer isSelfPaintingLayer when it needs to isolate blending descendants (hasUnisolatedBlendingDescendants). Tests: css3/blending/blend-mode-isolation-accelerated-overflow-hidden.html css3/blending/blend-mode-isolation-overflow-hidden.html css3/blending/blend-mode-isolation-turn-off-self-painting-layer.html css3/blending/blend-mode-isolation-turn-off-self-painting-layer1.html css3/blending/blend-mode-isolation-turn-off-self-painting-layer2.html css3/blending/blend-mode-isolation-turn-on-self-painting-layer.html * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateAncestorChainHasBlendingDescendants): When hasUnisolatedBlendingDescendants is set we make sure that isSelfPaintingLayer flag is set too. (WebCore::RenderLayer::updateDescendantDependentFlags): The flags might be read or changed while walking the descendants, so we don't want to reset them before traversing the tree. (WebCore::RenderLayer::shouldBeSelfPaintingLayer): Adding isolatesBlending() condition for a layer to be self painting. * rendering/RenderLayer.h: Removing ASSERT from hasUnisolatedBlendingDescendants(). It crashes in minibrowser and in layout tests when painting contents. Similar bugs on other flags: #71044, #71277. * rendering/RenderLayerModelObject.cpp: (WebCore::RenderLayerModelObject::styleDidChange): Telling ancestors that blend mode property has been removed from CSS when the layer for this element is going to be removed; styleChanged will not be called anymore. LayoutTests: Removed position:relative which forced tests to avoid this bug. * css3/blending/blend-mode-accelerated-parent-overflow-hidden.html: * css3/blending/blend-mode-clip-accelerated-blending-canvas.html: * css3/blending/blend-mode-clip-accelerated-blending-child.html: * css3/blending/blend-mode-clip-accelerated-blending-with-siblings.html: * css3/blending/blend-mode-clip-accelerated-transformed-blending.html: New tests: * css3/blending/blend-mode-isolation-accelerated-overflow-hidden-expected.txt: Added. * css3/blending/blend-mode-isolation-accelerated-overflow-hidden.html: Added. * css3/blending/blend-mode-isolation-overflow-hidden-expected.html: Added. * css3/blending/blend-mode-isolation-overflow-hidden.html: Added. * css3/blending/blend-mode-isolation-turn-off-self-painting-layer-expected.txt: Added. * css3/blending/blend-mode-isolation-turn-off-self-painting-layer.html: Added. * css3/blending/blend-mode-isolation-turn-off-self-painting-layer1-expected.txt: Added. * css3/blending/blend-mode-isolation-turn-off-self-painting-layer1.html: Added. * css3/blending/blend-mode-isolation-turn-off-self-painting-layer2-expected.txt: Added. * css3/blending/blend-mode-isolation-turn-off-self-painting-layer2.html: Added. * css3/blending/blend-mode-isolation-turn-on-self-painting-layer-expected.txt: Added. * css3/blending/blend-mode-isolation-turn-on-self-painting-layer.html: Added. Canonical link: https://commits.webkit.org/150724@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@168462 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-05-08 05:42:21 +00:00
(GraphicsLayer
(anchor 0.00 0.00)
(bounds 800.00 600.00)
(children 1
(GraphicsLayer
(bounds 800.00 600.00)
(contentsOpaque 1)
(children 1
(GraphicsLayer
(position 8.00 8.00)
(bounds 100.00 100.00)
(children 1
(GraphicsLayer
(bounds 100.00 100.00)
(blendMode difference)
(children 1
(GraphicsLayer
(bounds 400.00 20.00)
(contentsOpaque 1)
)
)
)
)
)
)
)
)
)