WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-130891-20140429172909.patch (text/plain), 29.74 KB, created by
Ion Rosca
on 2014-04-29 07:29:32 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Ion Rosca
Created:
2014-04-29 07:29:32 PDT
Size:
29.74 KB
patch
obsolete
>Subversion Revision: 167872 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 34aa5acd7e979dee52a200a687e599219415defa..9bfc93c177f1d2669410f3e186f09f6ac5c9182f 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,67 @@ >+2014-04-28 Ion Rosca <rosca@adobe.com> >+ >+ [CSS Blending] Blending doesn't work if the parent stacking context is a normal flow only element >+ https://bugs.webkit.org/show_bug.cgi?id=130891 >+ >+ 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). >+ >+ When we reset isSelfPaintingLayer, hasSelfPaintingLayerDescendant turns dirty >+ for ancestor layers. This dirty flag is computed in updateDescendantDependentFlags() >+ method. We need to take the logic for computing the hasUnisolatedBlendingDescendants flag >+ out of updateDescendantDependentFlags(), otherwise we are going to set/dirty >+ hasSelfPaintingLayerDescendant while it's being computed recursively. >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Tests: css3/compositing/blend-mode-isolation-accelerated-overflow-hidden.html >+ css3/compositing/blend-mode-isolation-overflow-hidden.html >+ css3/compositing/blend-mode-isolation-turn-off-self-painting-layer.html >+ css3/compositing/blend-mode-isolation-turn-off-self-painting-layer1.html >+ css3/compositing/blend-mode-isolation-turn-off-self-painting-layer2.html >+ css3/compositing/blend-mode-isolation-turn-on-self-painting-layer.html >+ >+ * rendering/RenderLayer.cpp: >+ (WebCore::RenderLayer::updateIsolationForBlendingDescendantsIfNeeded): >+ Adding the logic for computing the hasUnisolatedBlendingDescendants flag if dirty. >+ This logic was moved from updateDescendantDependentFlags() limiting recursion >+ to the current stacking context. >+ Making sure that isSelfPaintingLayer flag is up to date after the isolation flag is computed. >+ (WebCore::RenderLayer::updateAncestorChainHasBlendingDescendants): >+ When hasUnisolatedBlendingDescendants is set for a layer we make sure that >+ isSelfPaintingLayer flag is set too. >+ (WebCore::RenderLayer::updateDescendantDependentFlags): >+ Removing the logic for computing the dirty hasUnisolatedBlendingDescendants flag. >+ (WebCore::RenderLayer::addChild): >+ (WebCore::RenderLayer::removeChild): >+ (WebCore::RenderLayer::collectLayers): >+ (WebCore::RenderLayer::styleChanged): >+ Making sure that the hasUnisolatedBlendingDescendants flag is not dirty before >+ adding, removing a layer, before collecting layers for zorder lists or when >+ style gets changed. >+ (WebCore::RenderLayer::shouldBeSelfPaintingLayer): >+ Adding isolatesBlending() condition for a layer to be self painting. >+ >+ * rendering/RenderLayer.h: >+ Adding updateIsolationForBlendingDescendantsIfNeeded() method. >+ Changing isolatesBlending() to check isStackingContext() first, this will avoid >+ the assertion in hasUnisolatedBlendingDescendants() for non-stacking context elements. >+ * rendering/RenderLayerCompositor.cpp: >+ (WebCore::RenderLayerCompositor::computeCompositingRequirements): >+ Making sure that the hasUnisolatedBlendingDescendants flag is not dirty before computing >+ compositing requirements. >+ * rendering/RenderLayerModelObject.cpp: >+ (WebCore::RenderLayerModelObject::styleDidChange): >+ Telling ancestors that blend mode property has been removed from CSS when the layer for >+ this element is not needed anymore and it's going to be removed. >+ > 2014-04-27 Andrei Bucur <abucur@adobe.com> > > Store the containing region map inside the flow thread >diff --git a/Source/WebCore/rendering/RenderLayer.cpp b/Source/WebCore/rendering/RenderLayer.cpp >index 55be924a773bd00dabcdf9473fe45532b82e94e8..161152ff82799b5d90a5def3f97e325bc09ba9e6 100644 >--- a/Source/WebCore/rendering/RenderLayer.cpp >+++ b/Source/WebCore/rendering/RenderLayer.cpp >@@ -820,6 +820,29 @@ void RenderLayer::updateBlendMode() > m_blendMode = newBlendMode; > } > >+void RenderLayer::updateIsolationForBlendingDescendantsIfNeeded() >+{ >+ if (m_hasUnisolatedBlendingDescendantsStatusDirty) { >+ bool hasUnisolatedBlendingDescendants = false; >+ >+ for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) { >+ if (child->hasBlendMode()) >+ hasUnisolatedBlendingDescendants = true; >+ else if (!child->isStackingContext()) { >+ child->updateIsolationForBlendingDescendantsIfNeeded(); >+ hasUnisolatedBlendingDescendants = child->hasUnisolatedBlendingDescendants(); >+ } >+ >+ if (hasUnisolatedBlendingDescendants) >+ break; >+ } >+ >+ m_hasUnisolatedBlendingDescendants = hasUnisolatedBlendingDescendants; >+ m_hasUnisolatedBlendingDescendantsStatusDirty = false; >+ updateSelfPaintingLayer(); >+ } >+} >+ > void RenderLayer::updateAncestorChainHasBlendingDescendants() > { > for (auto layer = this; layer; layer = layer->parent()) { >@@ -828,6 +851,8 @@ void RenderLayer::updateAncestorChainHasBlendingDescendants() > layer->m_hasUnisolatedBlendingDescendants = true; > layer->m_hasUnisolatedBlendingDescendantsStatusDirty = false; > >+ layer->updateSelfPaintingLayer(); >+ > if (layer->isStackingContext()) > break; > } >@@ -1089,13 +1114,10 @@ void RenderLayer::setAncestorChainHasVisibleDescendant() > > void RenderLayer::updateDescendantDependentFlags(HashSet<const RenderObject*>* outOfFlowDescendantContainingBlocks) > { >- if (m_visibleDescendantStatusDirty || m_hasSelfPaintingLayerDescendantDirty || m_hasOutOfFlowPositionedDescendantDirty || hasUnisolatedBlendingDescendantsStatusDirty()) { >+ if (m_visibleDescendantStatusDirty || m_hasSelfPaintingLayerDescendantDirty || m_hasOutOfFlowPositionedDescendantDirty) { > m_hasVisibleDescendant = false; > m_hasSelfPaintingLayerDescendant = false; > m_hasOutOfFlowPositionedDescendant = false; >-#if ENABLE(CSS_COMPOSITING) >- m_hasUnisolatedBlendingDescendants = false; >-#endif > > HashSet<const RenderObject*> childOutOfFlowDescendantContainingBlocks; > for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) { >@@ -1115,19 +1137,11 @@ void RenderLayer::updateDescendantDependentFlags(HashSet<const RenderObject*>* o > bool hasVisibleDescendant = child->m_hasVisibleContent || child->m_hasVisibleDescendant; > bool hasSelfPaintingLayerDescendant = child->isSelfPaintingLayer() || child->hasSelfPaintingLayerDescendant(); > bool hasOutOfFlowPositionedDescendant = !childOutOfFlowDescendantContainingBlocks.isEmpty(); >-#if ENABLE(CSS_COMPOSITING) >- bool hasUnisolatedBlendingDescendants = child->hasBlendMode() || (child->hasUnisolatedBlendingDescendants() && !child->isolatesBlending()); >- >- m_hasUnisolatedBlendingDescendants |= hasUnisolatedBlendingDescendants; >-#endif > m_hasVisibleDescendant |= hasVisibleDescendant; > m_hasSelfPaintingLayerDescendant |= hasSelfPaintingLayerDescendant; > m_hasOutOfFlowPositionedDescendant |= hasOutOfFlowPositionedDescendant; > > bool allFlagsSet = m_hasVisibleDescendant && m_hasSelfPaintingLayerDescendant && m_hasOutOfFlowPositionedDescendant; >-#if ENABLE(CSS_COMPOSITING) >- allFlagsSet &= m_hasUnisolatedBlendingDescendants; >-#endif > if (allFlagsSet) > break; > } >@@ -1142,9 +1156,6 @@ void RenderLayer::updateDescendantDependentFlags(HashSet<const RenderObject*>* o > updateNeedsCompositedScrolling(); > > m_hasOutOfFlowPositionedDescendantDirty = false; >-#if ENABLE(CSS_COMPOSITING) >- m_hasUnisolatedBlendingDescendantsStatusDirty = false; >-#endif > } > > if (m_visibleContentStatusDirty) { >@@ -1790,6 +1801,9 @@ void RenderLayer::addChild(RenderLayer* child, RenderLayer* beforeChild) > child->dirtyStackingContainerZOrderLists(); > } > >+#if ENABLE(CSS_COMPOSITING) >+ child->updateIsolationForBlendingDescendantsIfNeeded(); >+#endif > child->updateDescendantDependentFlags(); > if (child->m_hasVisibleContent || child->m_hasVisibleDescendant) > setAncestorChainHasVisibleDescendant(); >@@ -1840,6 +1854,9 @@ RenderLayer* RenderLayer::removeChild(RenderLayer* oldChild) > oldChild->setNextSibling(0); > oldChild->setParent(0); > >+#if ENABLE(CSS_COMPOSITING) >+ oldChild->updateIsolationForBlendingDescendantsIfNeeded(); >+#endif > oldChild->updateDescendantDependentFlags(); > if (oldChild->m_hasVisibleContent || oldChild->m_hasVisibleDescendant) > dirtyAncestorChainVisibleDescendantStatus(); >@@ -6245,6 +6262,9 @@ void RenderLayer::updateNormalFlowList() > > void RenderLayer::collectLayers(bool includeHiddenLayers, CollectLayersBehavior behavior, std::unique_ptr<Vector<RenderLayer*>>& posBuffer, std::unique_ptr<Vector<RenderLayer*>>& negBuffer) > { >+#if ENABLE(CSS_COMPOSITING) >+ updateIsolationForBlendingDescendantsIfNeeded(); >+#endif > updateDescendantDependentFlags(); > > bool isStacking = behavior == StopAtStackingContexts ? isStackingContext() : isStackingContainer(); >@@ -6434,6 +6454,7 @@ bool RenderLayer::shouldBeSelfPaintingLayer() const > return !isNormalFlowOnly() > || hasOverlayScrollbars() > || needsCompositedScrolling() >+ || isolatesBlending() > || renderer().hasReflection() > || renderer().hasMask() > || renderer().isTableRow() >@@ -6661,6 +6682,9 @@ void RenderLayer::styleChanged(StyleDifference diff, const RenderStyle* oldStyle > m_marquee = nullptr; > } > >+#if ENABLE(CSS_COMPOSITING) >+ updateIsolationForBlendingDescendantsIfNeeded(); >+#endif > updateScrollbarsAfterStyleChange(oldStyle); > updateStackingContextsAfterStyleChange(oldStyle); > // Overlay scrollbars can make this layer self-painting so we need >diff --git a/Source/WebCore/rendering/RenderLayer.h b/Source/WebCore/rendering/RenderLayer.h >index 00f6dd2da9a13c0e4293f9180d654b744801a0db..cbf3146cb737422c8e2c9b736c35f41288f701fb 100644 >--- a/Source/WebCore/rendering/RenderLayer.h >+++ b/Source/WebCore/rendering/RenderLayer.h >@@ -518,6 +518,7 @@ public: > > #if ENABLE(CSS_COMPOSITING) > void updateBlendMode(); >+ void updateIsolationForBlendingDescendantsIfNeeded(); > #endif > > const LayoutSize& offsetForInFlowPosition() const { return m_offsetForInFlowPosition; } >@@ -802,7 +803,7 @@ public: > m_hasUnisolatedCompositedBlendingDescendants = hasUnisolatedCompositedBlendingDescendants; > } > >- bool isolatesBlending() const { return hasUnisolatedBlendingDescendants() && isStackingContext(); } >+ bool isolatesBlending() const { return isStackingContext() && hasUnisolatedBlendingDescendants(); } > bool hasUnisolatedBlendingDescendants() const > { > ASSERT(!m_hasUnisolatedBlendingDescendantsStatusDirty); >diff --git a/Source/WebCore/rendering/RenderLayerBacking.cpp b/Source/WebCore/rendering/RenderLayerBacking.cpp >index afcfcc201a128f6d087af02705a52a16056aa4a1..066c9b3949fd22df2e0236b1a3899ae3fd117aa0 100644 >--- a/Source/WebCore/rendering/RenderLayerBacking.cpp >+++ b/Source/WebCore/rendering/RenderLayerBacking.cpp >@@ -689,6 +689,9 @@ void RenderLayerBacking::updateGraphicsLayerGeometry() > > bool isSimpleContainer = isSimpleContainerCompositingLayer(); > >+#if ENABLE(CSS_COMPOSITING) >+ m_owningLayer.updateIsolationForBlendingDescendantsIfNeeded(); >+#endif > m_owningLayer.updateDescendantDependentFlags(); > > // m_graphicsLayer is the corresponding GraphicsLayer for this RenderLayer and its non-compositing >diff --git a/Source/WebCore/rendering/RenderLayerCompositor.cpp b/Source/WebCore/rendering/RenderLayerCompositor.cpp >index b3bfe41a6d99dacdcac1fb55559803be9f976c96..b76b9db6d1c131955ad428f788b7858a2c7e73cf 100644 >--- a/Source/WebCore/rendering/RenderLayerCompositor.cpp >+++ b/Source/WebCore/rendering/RenderLayerCompositor.cpp >@@ -1102,6 +1102,9 @@ void RenderLayerCompositor::computeCompositingRequirementsForNamedFlowFixed(Rend > // > void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* ancestorLayer, RenderLayer& layer, OverlapMap* overlapMap, CompositingState& compositingState, bool& layersChanged, bool& descendantHas3DTransform) > { >+#if ENABLE(CSS_COMPOSITING) >+ layer.updateIsolationForBlendingDescendantsIfNeeded(); >+#endif > layer.updateDescendantDependentFlags(); > layer.updateLayerListsIfNeeded(); > >diff --git a/Source/WebCore/rendering/RenderLayerModelObject.cpp b/Source/WebCore/rendering/RenderLayerModelObject.cpp >index eb8f2e9f941789fc7f9273893788ee5c70e0a2e8..bedf6325353ec388286d6de15dca996dd08665c6 100644 >--- a/Source/WebCore/rendering/RenderLayerModelObject.cpp >+++ b/Source/WebCore/rendering/RenderLayerModelObject.cpp >@@ -151,6 +151,10 @@ void RenderLayerModelObject::styleDidChange(StyleDifference diff, const RenderSt > } > } > } else if (layer() && layer()->parent()) { >+#if ENABLE(CSS_COMPOSITING) >+ if (oldStyle->hasBlendMode()) >+ layer()->parent()->dirtyAncestorChainHasBlendingDescendants(); >+#endif > setHasTransform(false); // Either a transform wasn't specified or the object doesn't support transforms, so just null out the bit. > setHasReflection(false); > layer()->removeOnlyThisLayer(); // calls destroyLayer() which clears m_layer >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index af793dfae3533c3d350e15f6da3d885f2a9baae6..863911aa763baf711bf293a00dbbb98ac522aebf 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,23 @@ >+2014-04-28 Ion Rosca <rosca@adobe.com> >+ >+ [CSS Blending] Blending doesn't work if the parent stacking context is a normal flow only element >+ https://bugs.webkit.org/show_bug.cgi?id=130891 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * css3/compositing/blend-mode-isolation-accelerated-overflow-hidden-expected.txt: Added. >+ * css3/compositing/blend-mode-isolation-accelerated-overflow-hidden.html: Added. >+ * css3/compositing/blend-mode-isolation-overflow-hidden-expected.html: Added. >+ * css3/compositing/blend-mode-isolation-overflow-hidden.html: Added. >+ * css3/compositing/blend-mode-isolation-turn-off-self-painting-layer-expected.txt: Added. >+ * css3/compositing/blend-mode-isolation-turn-off-self-painting-layer.html: Added. >+ * css3/compositing/blend-mode-isolation-turn-off-self-painting-layer1-expected.txt: Added. >+ * css3/compositing/blend-mode-isolation-turn-off-self-painting-layer1.html: Added. >+ * css3/compositing/blend-mode-isolation-turn-off-self-painting-layer2-expected.txt: Added. >+ * css3/compositing/blend-mode-isolation-turn-off-self-painting-layer2.html: Added. >+ * css3/compositing/blend-mode-isolation-turn-on-self-painting-layer-expected.txt: Added. >+ * css3/compositing/blend-mode-isolation-turn-on-self-painting-layer.html: Added. >+ > 2014-04-27 Andrei Bucur <abucur@adobe.com> > > Store the containing region map inside the flow thread >diff --git a/LayoutTests/css3/compositing/blend-mode-isolation-accelerated-overflow-hidden-expected.txt b/LayoutTests/css3/compositing/blend-mode-isolation-accelerated-overflow-hidden-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..919af6686ececdcd26ab1318ef5c93b6532641c6 >--- /dev/null >+++ b/LayoutTests/css3/compositing/blend-mode-isolation-accelerated-overflow-hidden-expected.txt >@@ -0,0 +1,28 @@ >+(GraphicsLayer >+ (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) >+ (children 1 >+ (GraphicsLayer >+ (bounds 400.00 20.00) >+ (blendMode difference) >+ (contentsOpaque 1) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+ ) >+) >+ >diff --git a/LayoutTests/css3/compositing/blend-mode-isolation-accelerated-overflow-hidden.html b/LayoutTests/css3/compositing/blend-mode-isolation-accelerated-overflow-hidden.html >new file mode 100644 >index 0000000000000000000000000000000000000000..539530a4a6dd50a6df017d12683becb6d2d5e953 >--- /dev/null >+++ b/LayoutTests/css3/compositing/blend-mode-isolation-accelerated-overflow-hidden.html >@@ -0,0 +1,37 @@ >+<!DOCTYPE HTML> >+<style> >+ .parent { >+ width: 100px; >+ height: 100px; >+ overflow:hidden; >+ isolation:isolate; >+ -webkit-isolation: isolate; >+ } >+ >+ .blender { >+ width: 400px; >+ height: 20px; >+ background: rgb(0, 255, 0); >+ mix-blend-mode: difference; >+ -webkit-mix-blend-mode: difference; >+ } >+ >+ .accelerated { >+ -webkit-transform: translateZ(0px); >+ } >+</style> >+ >+<!-- This test checks that an element with overflow hidden, being normal flow only, can get accelerated in order to isolate blending descendants properly. --> >+<!-- Test passes if you see a green rectangle. --> >+<div class="parent"> >+ <div class="blender accelerated"></div> >+</div> >+ >+<pre id="layerTree"></pre> >+<script> >+ if (window.testRunner) >+ window.testRunner.dumpAsText(); >+ >+ var text = document.getElementById("layerTree"); >+ text.innerHTML = window.internals.layerTreeAsText(document); >+</script> >diff --git a/LayoutTests/css3/compositing/blend-mode-isolation-overflow-hidden-expected.html b/LayoutTests/css3/compositing/blend-mode-isolation-overflow-hidden-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..073a6e6fa908caf89d08067c4c6f8d631f018055 >--- /dev/null >+++ b/LayoutTests/css3/compositing/blend-mode-isolation-overflow-hidden-expected.html >@@ -0,0 +1,20 @@ >+<!DOCTYPE HTML> >+<style> >+ .parent { >+ width: 100px; >+ height: 100px; >+ overflow:hidden; >+ } >+ >+ .blender { >+ width: 400px; >+ height: 20px; >+ background: rgb(0, 255, 0); >+ } >+</style> >+ >+<p>This test checks that an element with overflow hidden, being normal flow only, isolates blending descendants properly.<br/> >+Test passes if you see a green rectangle.</p> >+<div class="parent"> >+ <div class="blender"></div> >+</div> >diff --git a/LayoutTests/css3/compositing/blend-mode-isolation-overflow-hidden.html b/LayoutTests/css3/compositing/blend-mode-isolation-overflow-hidden.html >new file mode 100644 >index 0000000000000000000000000000000000000000..026cb80479fd4d06aaa6816ce4344e4b7cdedb08 >--- /dev/null >+++ b/LayoutTests/css3/compositing/blend-mode-isolation-overflow-hidden.html >@@ -0,0 +1,24 @@ >+<!DOCTYPE HTML> >+<style> >+ .parent { >+ width: 100px; >+ height: 100px; >+ overflow:hidden; >+ isolation:isolate; >+ -webkit-isolation: isolate; >+ } >+ >+ .blender { >+ width: 400px; >+ height: 20px; >+ background: rgb(0, 255, 0); >+ mix-blend-mode: difference; >+ -webkit-mix-blend-mode: difference; >+ } >+</style> >+ >+<p>This test checks that an element with overflow hidden, being normal flow only, isolates blending descendants properly.<br/> >+Test passes if you see a green rectangle.</p> >+<div class="parent"> >+ <div class="blender"></div> >+</div> >diff --git a/LayoutTests/css3/compositing/blend-mode-isolation-turn-off-self-painting-layer-expected.txt b/LayoutTests/css3/compositing/blend-mode-isolation-turn-off-self-painting-layer-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..602c13f96b07965afc46fa9248d183e1f03610e1 >--- /dev/null >+++ b/LayoutTests/css3/compositing/blend-mode-isolation-turn-off-self-painting-layer-expected.txt >@@ -0,0 +1,11 @@ >+layer at (0,0) size 800x600 >+ RenderView at (0,0) size 800x600 >+layer at (0,0) size 800x158 >+ RenderBlock {HTML} at (0,0) size 800x158 >+ RenderBody {BODY} at (8,16) size 784x134 >+ RenderBlock {P} at (0,0) size 784x18 >+ RenderText {#text} at (0,0) size 251x18 >+ text run at (0,0) width 251: "Test passes if you see a green rectangle." >+layer at (8,50) size 100x100 scrollWidth 400 >+ RenderBlock {DIV} at (0,34) size 100x100 >+ RenderBlock {DIV} at (0,0) size 400x20 [bgcolor=#00FF00] >diff --git a/LayoutTests/css3/compositing/blend-mode-isolation-turn-off-self-painting-layer.html b/LayoutTests/css3/compositing/blend-mode-isolation-turn-off-self-painting-layer.html >new file mode 100644 >index 0000000000000000000000000000000000000000..2e5d85633e8b896c779cc92bbdf6f2115f4e76e1 >--- /dev/null >+++ b/LayoutTests/css3/compositing/blend-mode-isolation-turn-off-self-painting-layer.html >@@ -0,0 +1,40 @@ >+<!DOCTYPE HTML> >+<style> >+ .parent { >+ width: 100px; >+ height: 100px; >+ overflow:hidden; >+ isolation:isolate; >+ -webkit-isolation: isolate; >+ } >+ >+ .child { >+ width: 400px; >+ height: 20px; >+ background: rgb(0, 255, 0); >+ } >+ >+ .blending { >+ mix-blend-mode: difference; >+ -webkit-mix-blend-mode: difference; >+ } >+</style> >+ >+<!-- This test checks that an element with overflow hidden will be able to stop isolating after dinamically removing mix-blend-mode on descendants. --> >+<p>Test passes if you see a green rectangle.</p> >+<div class="parent"> >+ <div id="target" class="child blending"></div> >+</div> >+ >+<script type="text/javascript"> >+ if (window.testRunner) >+ window.testRunner.waitUntilDone(); >+ >+ window.addEventListener('load', function() { >+ var target = document.getElementById("target"); >+ target.className = "child"; >+ >+ if (window.testRunner) >+ window.testRunner.notifyDone(); >+ }, false); >+</script> >diff --git a/LayoutTests/css3/compositing/blend-mode-isolation-turn-off-self-painting-layer1-expected.txt b/LayoutTests/css3/compositing/blend-mode-isolation-turn-off-self-painting-layer1-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..602c13f96b07965afc46fa9248d183e1f03610e1 >--- /dev/null >+++ b/LayoutTests/css3/compositing/blend-mode-isolation-turn-off-self-painting-layer1-expected.txt >@@ -0,0 +1,11 @@ >+layer at (0,0) size 800x600 >+ RenderView at (0,0) size 800x600 >+layer at (0,0) size 800x158 >+ RenderBlock {HTML} at (0,0) size 800x158 >+ RenderBody {BODY} at (8,16) size 784x134 >+ RenderBlock {P} at (0,0) size 784x18 >+ RenderText {#text} at (0,0) size 251x18 >+ text run at (0,0) width 251: "Test passes if you see a green rectangle." >+layer at (8,50) size 100x100 scrollWidth 400 >+ RenderBlock {DIV} at (0,34) size 100x100 >+ RenderBlock {DIV} at (0,0) size 400x20 [bgcolor=#00FF00] >diff --git a/LayoutTests/css3/compositing/blend-mode-isolation-turn-off-self-painting-layer1.html b/LayoutTests/css3/compositing/blend-mode-isolation-turn-off-self-painting-layer1.html >new file mode 100644 >index 0000000000000000000000000000000000000000..f90c46b36c8882a816a54c10a75125771fec13f6 >--- /dev/null >+++ b/LayoutTests/css3/compositing/blend-mode-isolation-turn-off-self-painting-layer1.html >@@ -0,0 +1,45 @@ >+<!DOCTYPE HTML> >+<style> >+ .parent { >+ width: 100px; >+ height: 100px; >+ overflow:hidden; >+ isolation:isolate; >+ -webkit-isolation: isolate; >+ } >+ >+ .child { >+ width: 400px; >+ height: 20px; >+ background: rgb(0, 255, 0); >+ } >+ >+ .blending { >+ mix-blend-mode: difference; >+ -webkit-mix-blend-mode: difference; >+ } >+ >+ html { >+ /*Force compositing.*/ >+ -webkit-transform: translateZ(0px); >+ } >+</style> >+ >+<!-- This test checks that an element with overflow hidden will be able to stop isolating after dinamically removing mix-blend-mode on descendants. --> >+<p>Test passes if you see a green rectangle.</p> >+<div class="parent"> >+ <div id="target" class="child blending"></div> >+</div> >+ >+<script type="text/javascript"> >+ if (window.testRunner) >+ window.testRunner.waitUntilDone(); >+ >+ window.addEventListener('load', function() { >+ var target = document.getElementById("target"); >+ target.className = "child"; >+ >+ if (window.testRunner) >+ window.testRunner.notifyDone(); >+ }, false); >+</script> >diff --git a/LayoutTests/css3/compositing/blend-mode-isolation-turn-off-self-painting-layer2-expected.txt b/LayoutTests/css3/compositing/blend-mode-isolation-turn-off-self-painting-layer2-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..19ca435c8b6823f2b24c8a7da602bb992ae27fa0 >--- /dev/null >+++ b/LayoutTests/css3/compositing/blend-mode-isolation-turn-off-self-painting-layer2-expected.txt >@@ -0,0 +1,12 @@ >+layer at (0,0) size 800x600 >+ RenderView at (0,0) size 800x600 >+layer at (0,0) size 800x158 >+ RenderBlock {HTML} at (0,0) size 800x158 >+ RenderBody {BODY} at (8,16) size 784x134 >+ RenderBlock {P} at (0,0) size 784x18 >+ RenderText {#text} at (0,0) size 251x18 >+ text run at (0,0) width 251: "Test passes if you see a green rectangle." >+layer at (8,50) size 100x100 scrollWidth 400 >+ RenderBlock {DIV} at (0,34) size 100x100 >+layer at (8,50) size 400x20 backgroundClip at (8,50) size 100x100 clip at (8,50) size 100x100 outlineClip at (8,50) size 100x100 >+ RenderBlock (relative positioned) {DIV} at (0,0) size 400x20 [bgcolor=#00FF00] >diff --git a/LayoutTests/css3/compositing/blend-mode-isolation-turn-off-self-painting-layer2.html b/LayoutTests/css3/compositing/blend-mode-isolation-turn-off-self-painting-layer2.html >new file mode 100644 >index 0000000000000000000000000000000000000000..8e3870e5738ec01928652da743cebc1942495e71 >--- /dev/null >+++ b/LayoutTests/css3/compositing/blend-mode-isolation-turn-off-self-painting-layer2.html >@@ -0,0 +1,42 @@ >+<!DOCTYPE HTML> >+<style> >+ .parent { >+ width: 100px; >+ height: 100px; >+ overflow:hidden; >+ isolation:isolate; >+ -webkit-isolation: isolate; >+ } >+ >+ .child { >+ width: 400px; >+ height: 20px; >+ background: rgb(0, 255, 0); >+ /*Keep child RenderLayer after removing blending*/ >+ position: relative; >+ } >+ >+ .blending { >+ mix-blend-mode: difference; >+ -webkit-mix-blend-mode: difference; >+ } >+</style> >+ >+<!-- This test checks that an element with overflow hidden will be able to stop isolating after dinamically removing mix-blend-mode on descendants. --> >+<p>Test passes if you see a green rectangle.</p> >+<div class="parent"> >+ <div id="target" class="child blending"></div> >+</div> >+ >+<script type="text/javascript"> >+ if (window.testRunner) >+ window.testRunner.waitUntilDone(); >+ >+ window.addEventListener('load', function() { >+ var target = document.getElementById("target"); >+ target.className = "child"; >+ >+ if (window.testRunner) >+ window.testRunner.notifyDone(); >+ }, false); >+</script> >diff --git a/LayoutTests/css3/compositing/blend-mode-isolation-turn-on-self-painting-layer-expected.txt b/LayoutTests/css3/compositing/blend-mode-isolation-turn-on-self-painting-layer-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..2c88e2a54b6b2a72254f74e97e0b17a43021dd69 >--- /dev/null >+++ b/LayoutTests/css3/compositing/blend-mode-isolation-turn-on-self-painting-layer-expected.txt >@@ -0,0 +1,12 @@ >+layer at (0,0) size 800x600 >+ RenderView at (0,0) size 800x600 >+layer at (0,0) size 800x158 >+ RenderBlock {HTML} at (0,0) size 800x158 >+ RenderBody {BODY} at (8,16) size 784x134 >+ RenderBlock {P} at (0,0) size 784x18 >+ RenderText {#text} at (0,0) size 251x18 >+ text run at (0,0) width 251: "Test passes if you see a green rectangle." >+layer at (8,50) size 100x100 scrollWidth 400 isolatesBlending >+ RenderBlock {DIV} at (0,34) size 100x100 >+layer at (8,50) size 400x20 backgroundClip at (8,50) size 100x100 clip at (8,50) size 100x100 outlineClip at (8,50) size 100x100 blendMode: difference >+ RenderBlock {DIV} at (0,0) size 400x20 [bgcolor=#00FF00] >diff --git a/LayoutTests/css3/compositing/blend-mode-isolation-turn-on-self-painting-layer.html b/LayoutTests/css3/compositing/blend-mode-isolation-turn-on-self-painting-layer.html >new file mode 100644 >index 0000000000000000000000000000000000000000..c6eefaf1a2f6fddb9f4aa1f5687e2f2583ababb0 >--- /dev/null >+++ b/LayoutTests/css3/compositing/blend-mode-isolation-turn-on-self-painting-layer.html >@@ -0,0 +1,40 @@ >+<!DOCTYPE HTML> >+<style> >+ .parent { >+ width: 100px; >+ height: 100px; >+ overflow:hidden; >+ isolation:isolate; >+ -webkit-isolation: isolate; >+ } >+ >+ .child { >+ width: 400px; >+ height: 20px; >+ background: rgb(0, 255, 0); >+ } >+ >+ .blending { >+ mix-blend-mode: difference; >+ -webkit-mix-blend-mode: difference; >+ } >+</style> >+ >+<!-- This test checks that an element with overflow hidden, not being a self painting layer, will be able to dynamically isolate blending descendants. --> >+<p>Test passes if you see a green rectangle.</p> >+<div class="parent"> >+ <div id="target" class="child"></div> >+</div> >+ >+<script type="text/javascript"> >+ if (window.testRunner) >+ window.testRunner.waitUntilDone(); >+ >+ window.addEventListener('load', function() { >+ var target = document.getElementById("target"); >+ target.className = "blending child"; >+ >+ if (window.testRunner) >+ window.testRunner.notifyDone(); >+ }, false); >+</script>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 130891
:
228032
|
228828
|
230293
|
230376
|
230417
|
230903