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 V4. Addressed Dirk's comments
bug-128958-20140224182519.patch (text/plain), 25.80 KB, created by
Mihai Tica
on 2014-02-24 08:24:43 PST
(
hide
)
Description:
Patch V4. Addressed Dirk's comments
Filename:
MIME Type:
Creator:
Mihai Tica
Created:
2014-02-24 08:24:43 PST
Size:
25.80 KB
patch
obsolete
>Subversion Revision: 164581 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index b520a71eb429a6c4afab547ad9ad01df6ce95550..870d82bf02807567c04c7387a59f2c4cf12a83c9 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,47 @@ >+2014-02-24 Mihai Tica <mitica@adobe.com> >+ >+ [CSS Blending] Parse and implement the -webkit-isolation CSS property. >+ >+ https://bugs.webkit.org/show_bug.cgi?id=128958 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Parse and implement -webkit-isolation, part of the CSS Blending and Compositing spec. >+ This patch adds functionality for HTML and SVG. >+ -webkit-isolation: isolate restricts any child elements from blending with any of the content outside the isolated parent element. >+ >+ Tests: css3/compositing/isolation-isolate-blended-child.html >+ css3/compositing/isolation-parsing.html >+ css3/compositing/svg-isolation-default.html >+ css3/compositing/svg-isolation-isolated-group.html >+ css3/compositing/svg-isolation-simple.html >+ >+ * css/CSSComputedStyleDeclaration.cpp: >+ (WebCore::ComputedStyleExtractor::propertyValue): >+ * css/CSSParser.cpp: >+ (WebCore::isValidKeywordPropertyAndValue): >+ (WebCore::isKeywordPropertyID): >+ (WebCore::CSSParser::parseValue): >+ * css/CSSPrimitiveValueMappings.h: >+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): >+ (WebCore::CSSPrimitiveValue::operator Isolation): >+ * css/CSSPropertyNames.in: Add -webkit-isolation. >+ * css/CSSValueKeywords.in: Add the isolate value. >+ * css/DeprecatedStyleBuilder.cpp: >+ (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): >+ * css/StyleResolver.cpp: >+ (WebCore::StyleResolver::adjustRenderStyle): Explicitly set isolation:isolate to create a stacking context. >+ * rendering/style/RenderStyle.cpp: >+ (WebCore::RenderStyle::changeRequiresLayerRepaint): Changing isolation should trigger a repaint. >+ * rendering/style/RenderStyle.h: Setters and getters for isolation. >+ * rendering/style/RenderStyleConstants.h: Add Isolation enum. >+ * rendering/style/StyleRareNonInheritedData.cpp: Add m_isolation. >+ (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): >+ (WebCore::StyleRareNonInheritedData::operator==): >+ * rendering/style/StyleRareNonInheritedData.h: >+ * rendering/svg/SVGRenderingContext.cpp: >+ (WebCore::SVGRenderingContext::prepareToRenderSVGContent): If isolated, paint in a transparency layer. >+ > 2014-02-24 David Kilzer <ddkilzer@apple.com> > > Remove redundant setting in FeatureDefines.xcconfig >diff --git a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >index 12331d4ff915704f56d9b14e912f43954e8fcbc7..325cd58886ce5aefd30904b9070f69a573b16e7d 100644 >--- a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >+++ b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp >@@ -228,6 +228,7 @@ static const CSSPropertyID computedProperties[] = { > CSSPropertyWebkitBackgroundSize, > #if ENABLE(CSS_COMPOSITING) > CSSPropertyWebkitMixBlendMode, >+ CSSPropertyWebkitIsolation, > #endif > CSSPropertyWebkitBorderFit, > CSSPropertyWebkitBorderHorizontalSpacing, >@@ -2842,6 +2843,8 @@ PassRefPtr<CSSValue> ComputedStyleExtractor::propertyValue(CSSPropertyID propert > #if ENABLE(CSS_COMPOSITING) > case CSSPropertyWebkitMixBlendMode: > return cssValuePool().createValue(style->blendMode()); >+ case CSSPropertyWebkitIsolation: >+ return cssValuePool().createValue(style->isolation()); > #endif > case CSSPropertyBackgroundBlendMode: { > const FillLayer* layers = style->backgroundLayers(); >diff --git a/Source/WebCore/css/CSSParser.cpp b/Source/WebCore/css/CSSParser.cpp >index 0df8f99e5c8d58025473f9e43592117bdaf42f3e..d973f7d3af406c539924699e2e3a59df970f028e 100644 >--- a/Source/WebCore/css/CSSParser.cpp >+++ b/Source/WebCore/css/CSSParser.cpp >@@ -810,6 +810,10 @@ static inline bool isValidKeywordPropertyAndValue(CSSPropertyID propertyId, int > || valueID == CSSValueLuminosity)) > return true; > break; >+ case CSSPropertyWebkitIsolation: >+ if (parserContext.isCSSCompositingEnabled && (valueID == CSSValueAuto || valueID == CSSValueIsolate)) >+ return true; >+ break; > #endif > case CSSPropertyWebkitBorderFit: > if (valueID == CSSValueBorder || valueID == CSSValueLines) >@@ -1079,6 +1083,7 @@ static inline bool isKeywordPropertyID(CSSPropertyID propertyId) > case CSSPropertyWebkitAppearance: > #if ENABLE(CSS_COMPOSITING) > case CSSPropertyWebkitMixBlendMode: >+ case CSSPropertyWebkitIsolation: > #endif > case CSSPropertyWebkitBackfaceVisibility: > case CSSPropertyWebkitBorderAfterStyle: >@@ -2415,6 +2420,10 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important) > if (cssCompositingEnabled()) > validPrimitive = true; > break; >+ case CSSPropertyWebkitIsolation: >+ if (cssCompositingEnabled()) >+ validPrimitive = true; >+ break; > #endif > case CSSPropertyWebkitFlex: { > ShorthandScope scope(this, propId); >diff --git a/Source/WebCore/css/CSSPrimitiveValueMappings.h b/Source/WebCore/css/CSSPrimitiveValueMappings.h >index 83671b46c287ab7fbc88e784ae99c12870a7ffea..000616f287ad07a9b77be38c9763ad56a08f8f34 100644 >--- a/Source/WebCore/css/CSSPrimitiveValueMappings.h >+++ b/Source/WebCore/css/CSSPrimitiveValueMappings.h >@@ -4155,6 +4155,38 @@ template<> inline CSSPrimitiveValue::operator BlendMode() const > return BlendModeNormal; > } > >+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(Isolation isolation) >+ : CSSValue(PrimitiveClass) >+{ >+ m_primitiveUnitType = CSS_VALUE_ID; >+ switch (isolation) { >+ case IsolationAuto: >+ m_value.valueID = CSSValueAuto; >+ break; >+ case IsolationIsolate: >+ m_value.valueID = CSSValueIsolate; >+ break; >+ default: >+ ASSERT_NOT_REACHED(); >+ } >+} >+ >+template<> inline CSSPrimitiveValue::operator Isolation() const >+{ >+ ASSERT(isValueID()); >+ switch (m_value.valueID) { >+ case CSSValueAuto: >+ return IsolationAuto; >+ case CSSValueIsolate: >+ return IsolationIsolate; >+ default: >+ break; >+ } >+ >+ ASSERT_NOT_REACHED(); >+ return IsolationAuto; >+} >+ > template<> inline CSSPrimitiveValue::CSSPrimitiveValue(LineCap e) > : CSSValue(PrimitiveClass) > { >diff --git a/Source/WebCore/css/CSSPropertyNames.in b/Source/WebCore/css/CSSPropertyNames.in >index f5c199e7617f266341d0f1bd67511084024c27fb..19e535dce514436d8c78ab9986646969cdaa6457 100644 >--- a/Source/WebCore/css/CSSPropertyNames.in >+++ b/Source/WebCore/css/CSSPropertyNames.in >@@ -283,6 +283,7 @@ z-index > #endif > #if defined(ENABLE_CSS_COMPOSITING) && ENABLE_CSS_COMPOSITING > -webkit-mix-blend-mode >+-webkit-isolation > #endif > #if defined(ENABLE_CSS_FILTERS) && ENABLE_CSS_FILTERS > -webkit-filter >diff --git a/Source/WebCore/css/CSSValueKeywords.in b/Source/WebCore/css/CSSValueKeywords.in >index 38ad1767ec7d7f1e65ef0b389bfd20aa0234d2f2..e1400a7c5c0b69c4389c35dbd7749282bb61f660 100644 >--- a/Source/WebCore/css/CSSValueKeywords.in >+++ b/Source/WebCore/css/CSSValueKeywords.in >@@ -1024,6 +1024,10 @@ saturation > color > luminosity > >+// isolation >+// auto >+isolate >+ > // object-fit > // fill > // contain >diff --git a/Source/WebCore/css/DeprecatedStyleBuilder.cpp b/Source/WebCore/css/DeprecatedStyleBuilder.cpp >index e9a92466ca953fedebe6e04032390e54c1298da8..6220ef39795e22f51b1a76e32b0cb361f1062428 100644 >--- a/Source/WebCore/css/DeprecatedStyleBuilder.cpp >+++ b/Source/WebCore/css/DeprecatedStyleBuilder.cpp >@@ -2488,6 +2488,7 @@ DeprecatedStyleBuilder::DeprecatedStyleBuilder() > setPropertyHandler(CSSPropertyWebkitBackgroundSize, CSSPropertyBackgroundSize); > #if ENABLE(CSS_COMPOSITING) > setPropertyHandler(CSSPropertyWebkitMixBlendMode, ApplyPropertyDefault<BlendMode, &RenderStyle::blendMode, BlendMode, &RenderStyle::setBlendMode, BlendMode, &RenderStyle::initialBlendMode>::createHandler()); >+ setPropertyHandler(CSSPropertyWebkitIsolation, ApplyPropertyDefault<Isolation, &RenderStyle::isolation, Isolation, &RenderStyle::setIsolation, Isolation, &RenderStyle::initialIsolation>::createHandler()); > #endif > setPropertyHandler(CSSPropertyWebkitBorderFit, ApplyPropertyDefault<EBorderFit, &RenderStyle::borderFit, EBorderFit, &RenderStyle::setBorderFit, EBorderFit, &RenderStyle::initialBorderFit>::createHandler()); > setPropertyHandler(CSSPropertyWebkitBorderHorizontalSpacing, ApplyPropertyComputeLength<short, &RenderStyle::horizontalBorderSpacing, &RenderStyle::setHorizontalBorderSpacing, &RenderStyle::initialHorizontalBorderSpacing>::createHandler()); >diff --git a/Source/WebCore/css/StyleResolver.cpp b/Source/WebCore/css/StyleResolver.cpp >index 083cae1a5100886f790ef68a80467a5ec71cb5ea..2ced321737ef47e57e417c16c5d6ff29d733454c 100644 >--- a/Source/WebCore/css/StyleResolver.cpp >+++ b/Source/WebCore/css/StyleResolver.cpp >@@ -1238,6 +1238,7 @@ void StyleResolver::adjustRenderStyle(RenderStyle& style, const RenderStyle& par > || style.boxReflect() > || style.hasFilter() > || style.hasBlendMode() >+ || style.hasIsolation() > || style.position() == StickyPosition > || (style.position() == FixedPosition && e && e->document().page() && e->document().page()->settings().fixedPositionCreatesStackingContext()) > || style.hasFlowFrom() >diff --git a/Source/WebCore/rendering/style/RenderStyle.cpp b/Source/WebCore/rendering/style/RenderStyle.cpp >index 133ab490ede2496fb93b82e0e17e8a8d668ef91f..ba829f6b524df6c172e49be9311dbc8b9f5c3993 100644 >--- a/Source/WebCore/rendering/style/RenderStyle.cpp >+++ b/Source/WebCore/rendering/style/RenderStyle.cpp >@@ -679,6 +679,9 @@ bool RenderStyle::changeRequiresLayerRepaint(const RenderStyle* other, unsigned& > #if ENABLE(CSS_COMPOSITING) > if (rareNonInheritedData->m_effectiveBlendMode != other->rareNonInheritedData->m_effectiveBlendMode) > return true; >+ >+ if (rareNonInheritedData->m_isolation != other->rareNonInheritedData->m_isolation) >+ return true; > #endif > > if (rareNonInheritedData->opacity != other->rareNonInheritedData->opacity) { >diff --git a/Source/WebCore/rendering/style/RenderStyle.h b/Source/WebCore/rendering/style/RenderStyle.h >index 77a7ade8580c30593dec30f12eba7e3ba6ae20c6..1c0c87455ead9d37b4a925b93d213f3304ba9a7c 100644 >--- a/Source/WebCore/rendering/style/RenderStyle.h >+++ b/Source/WebCore/rendering/style/RenderStyle.h >@@ -967,11 +967,18 @@ public: > > #if ENABLE(CSS_COMPOSITING) > BlendMode blendMode() const { return static_cast<BlendMode>(rareNonInheritedData->m_effectiveBlendMode); } >- void setBlendMode(BlendMode v) { rareNonInheritedData.access()->m_effectiveBlendMode = v; } >+ void setBlendMode(BlendMode blendMode) { SET_VAR(rareNonInheritedData, m_effectiveBlendMode, blendMode); } > bool hasBlendMode() const { return static_cast<BlendMode>(rareNonInheritedData->m_effectiveBlendMode) != BlendModeNormal; } >+ >+ Isolation isolation() const { return static_cast<Isolation>(rareNonInheritedData->m_isolation); } >+ void setIsolation(Isolation isolation) { SET_VAR(rareNonInheritedData, m_isolation, isolation); } >+ bool hasIsolation() const { return rareNonInheritedData->m_isolation != IsolationAuto; } > #else > BlendMode blendMode() const { return BlendModeNormal; } > bool hasBlendMode() const { return false; } >+ >+ Isolation isolation() const { return IsolationAuto; } >+ bool hasIsolation() const { return false; } > #endif > > #if USE(RTL_SCROLLBAR) >@@ -1817,6 +1824,7 @@ public: > #endif > #if ENABLE(CSS_COMPOSITING) > static BlendMode initialBlendMode() { return BlendModeNormal; } >+ static Isolation initialIsolation() { return IsolationAuto; } > #endif > > private: >diff --git a/Source/WebCore/rendering/style/RenderStyleConstants.h b/Source/WebCore/rendering/style/RenderStyleConstants.h >index 704ade06a305a8f80b9ef688b0b837a1ccf4ab3e..0c64ddb5cd986405cfb1c4cdf64be9aeec0da492 100644 >--- a/Source/WebCore/rendering/style/RenderStyleConstants.h >+++ b/Source/WebCore/rendering/style/RenderStyleConstants.h >@@ -550,6 +550,8 @@ enum TextIndentLine { TextIndentFirstLine, TextIndentEachLine }; > enum TextIndentType { TextIndentNormal, TextIndentHanging }; > #endif > >+enum Isolation { IsolationAuto, IsolationIsolate }; >+ > // Fill, Stroke, ViewBox are just used for SVG. > enum LayoutBox { BoxMissing = 0, MarginBox, BorderBox, PaddingBox, ContentBox, Fill, Stroke, ViewBox }; > >diff --git a/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp b/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp >index 8bec162956a82f5f5bf4124914350c0ddbc07643..62c1c94a0d7ff46b4370489e7e120a6141a68a40 100644 >--- a/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp >+++ b/Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp >@@ -92,6 +92,7 @@ StyleRareNonInheritedData::StyleRareNonInheritedData() > , m_aspectRatioType(RenderStyle::initialAspectRatioType()) > #if ENABLE(CSS_COMPOSITING) > , m_effectiveBlendMode(RenderStyle::initialBlendMode()) >+ , m_isolation(RenderStyle::initialIsolation()) > #endif > , m_objectFit(RenderStyle::initialObjectFit()) > { >@@ -172,6 +173,7 @@ inline StyleRareNonInheritedData::StyleRareNonInheritedData(const StyleRareNonIn > , m_aspectRatioType(o.m_aspectRatioType) > #if ENABLE(CSS_COMPOSITING) > , m_effectiveBlendMode(o.m_effectiveBlendMode) >+ , m_isolation(o.m_isolation) > #endif > , m_objectFit(o.m_objectFit) > { >@@ -262,6 +264,7 @@ bool StyleRareNonInheritedData::operator==(const StyleRareNonInheritedData& o) c > && !m_runningAcceleratedAnimation && !o.m_runningAcceleratedAnimation > #if ENABLE(CSS_COMPOSITING) > && m_effectiveBlendMode == o.m_effectiveBlendMode >+ && m_isolation == o.m_isolation > #endif > && m_aspectRatioType == o.m_aspectRatioType > && m_objectFit == o.m_objectFit; >diff --git a/Source/WebCore/rendering/style/StyleRareNonInheritedData.h b/Source/WebCore/rendering/style/StyleRareNonInheritedData.h >index c3ba52615f8fe536592eda9fbfefbb5e07e8bd6f..929b3a1689704dd8ff685c7e7e8859ddab3dcec5 100644 >--- a/Source/WebCore/rendering/style/StyleRareNonInheritedData.h >+++ b/Source/WebCore/rendering/style/StyleRareNonInheritedData.h >@@ -194,6 +194,7 @@ public: > > #if ENABLE(CSS_COMPOSITING) > unsigned m_effectiveBlendMode: 5; // EBlendMode >+ unsigned m_isolation : 1; // Isolation > #endif > > unsigned m_objectFit : 3; // ObjectFit >diff --git a/Source/WebCore/rendering/svg/SVGRenderingContext.cpp b/Source/WebCore/rendering/svg/SVGRenderingContext.cpp >index edb49a7a0ff09f8f8bc3bc6b384932b5ac7371d9..5503a7d1a24a0baeef6c8c7530a1919340290bdd 100644 >--- a/Source/WebCore/rendering/svg/SVGRenderingContext.cpp >+++ b/Source/WebCore/rendering/svg/SVGRenderingContext.cpp >@@ -104,6 +104,7 @@ void SVGRenderingContext::prepareToRenderSVGContent(RenderElement& renderer, Pai > float opacity = isRenderingMask ? 1 : style.opacity(); > const ShadowData* shadow = svgStyle.shadow(); > bool hasBlendMode = style.hasBlendMode(); >+ bool hasIsolation = style.hasIsolation(); > bool isolateMaskForBlending = false; > > #if ENABLE(CSS_COMPOSITING) >@@ -113,11 +114,11 @@ void SVGRenderingContext::prepareToRenderSVGContent(RenderElement& renderer, Pai > } > #endif > >- if (opacity < 1 || shadow || hasBlendMode || isolateMaskForBlending) { >+ if (opacity < 1 || shadow || hasBlendMode || isolateMaskForBlending || hasIsolation) { > FloatRect repaintRect = m_renderer->repaintRectInLocalCoordinates(); > m_paintInfo->context->clip(repaintRect); > >- if (opacity < 1 || hasBlendMode || isolateMaskForBlending) { >+ if (opacity < 1 || hasBlendMode || isolateMaskForBlending || hasIsolation) { > > if (hasBlendMode) > m_paintInfo->context->setCompositeOperation(m_paintInfo->context->compositeOperation(), style.blendMode()); >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 4817099621128e34f4243f43c49a0a5c2fd8961c..75e3b03f33752eda80482438a119702cce2362d8 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,5 +1,28 @@ > 2014-02-24 Mihai Tica <mitica@adobe.com> > >+ [CSS Blending] Parse and implement the -webkit-isolation CSS property. >+ >+ https://bugs.webkit.org/show_bug.cgi?id=128958 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Test parsing of -webkit-isolation. Test if setting -webkit-isolation: isolate creats a stacking context. >+ Test for SVG and HTML that blending is restricted to the contents of an isolated parent element. >+ >+ * css3/compositing/isolation-isolate-blended-child-expected.html: Added. >+ * css3/compositing/isolation-isolate-blended-child.html: Added. >+ * css3/compositing/isolation-isolate-simple-expected.txt: Added. >+ * css3/compositing/isolation-parsing-expected.txt: Added. >+ * css3/compositing/isolation-parsing.html: Added. >+ * css3/compositing/svg-isolation-default-expected.html: Added. >+ * css3/compositing/svg-isolation-default.html: Added. >+ * css3/compositing/svg-isolation-isolated-group-expected.html: Added. >+ * css3/compositing/svg-isolation-isolated-group.html: Added. >+ * css3/compositing/svg-isolation-simple-expected.html: Added. >+ * css3/compositing/svg-isolation-simple.html: Added. >+ >+2014-02-24 Mihai Tica <mitica@adobe.com> >+ > [CSS Blending] An element having -webkit-mix-blend-mode should only blend with the contents of the parent stacking context > https://bugs.webkit.org/show_bug.cgi?id=129154 > >diff --git a/LayoutTests/css3/compositing/isolation-isolate-blended-child-expected.html b/LayoutTests/css3/compositing/isolation-isolate-blended-child-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..c9316eae3d84b56c2fd485342f4e8ecb4f8418b5 >--- /dev/null >+++ b/LayoutTests/css3/compositing/isolation-isolate-blended-child-expected.html >@@ -0,0 +1,29 @@ >+<!DOCTYPE HTML> >+<style> >+ div { >+ margin: 20px; >+ width: 130px; >+ height: 130px; >+ } >+ >+ .parent { >+ background: rgb(55, 55, 55); >+ position: fixed; >+ width: 300px; >+ height: 300px; >+ } >+ >+ .isolator { >+ position: fixed; >+ z-index: 0; >+ background: violet; >+ } >+ >+ .child { >+ margin-top: 0px; >+ -webkit-mix-blend-mode: multiply; >+ background: olive; >+ } >+ >+</style> >+<div class="parent"><div class="isolator"><div class="child"></div></div></div> >diff --git a/LayoutTests/css3/compositing/isolation-isolate-blended-child.html b/LayoutTests/css3/compositing/isolation-isolate-blended-child.html >new file mode 100644 >index 0000000000000000000000000000000000000000..b68ae1cf9620debd0a44d99f2f453fa92b369322 >--- /dev/null >+++ b/LayoutTests/css3/compositing/isolation-isolate-blended-child.html >@@ -0,0 +1,28 @@ >+<!DOCTYPE HTML> >+<!-- Test to ensure that "-webkit-isolation:isolate" creates a stacking context, thus preventing blending with the parent element. --> >+<style> >+ div { >+ margin: 20px; >+ width: 130px; >+ height: 130px; >+ } >+ >+ .parent { >+ background: rgb(55, 55, 55); >+ position: fixed; >+ width: 300px; >+ height: 300px; >+ } >+ >+ .isolator { >+ -webkit-isolation: isolate; >+ background: violet; >+ } >+ >+ .child { >+ -webkit-mix-blend-mode: multiply; >+ background: olive; >+ } >+ >+</style> >+<div class="parent"><div class="isolator"><div class="child"></div></div></div> >diff --git a/LayoutTests/css3/compositing/isolation-isolate-simple-expected.txt b/LayoutTests/css3/compositing/isolation-isolate-simple-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..f89cfd8353f6a42454777565705d9772d7b70c50 >--- /dev/null >+++ b/LayoutTests/css3/compositing/isolation-isolate-simple-expected.txt >@@ -0,0 +1,6 @@ >+PASS 0 is 0 >+PASS 0 is 0 >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+ >diff --git a/LayoutTests/css3/compositing/isolation-parsing-expected.txt b/LayoutTests/css3/compositing/isolation-parsing-expected.txt >new file mode 100644 >index 0000000000000000000000000000000000000000..0995ec48a967039209fef9b0370692c5c696fd55 >--- /dev/null >+++ b/LayoutTests/css3/compositing/isolation-parsing-expected.txt >@@ -0,0 +1,8 @@ >+PASS setProperty("auto") is "auto" >+PASS setProperty("isolate") is "isolate" >+PASS setProperty("") is "auto" >+PASS setProperty("rubbish") is "auto" >+PASS successfullyParsed is true >+ >+TEST COMPLETE >+ >diff --git a/LayoutTests/css3/compositing/isolation-parsing.html b/LayoutTests/css3/compositing/isolation-parsing.html >new file mode 100644 >index 0000000000000000000000000000000000000000..8529dea5e9d06024ddbfdaf97fd953afdbb620db >--- /dev/null >+++ b/LayoutTests/css3/compositing/isolation-parsing.html >@@ -0,0 +1,27 @@ >+<!DOCTYPE html> >+<html> >+<body> >+ <script src="../../resources/js-test.js"></script> >+ <script> >+ function setProperty(value) { >+ var div = document.createElement('div'); >+ document.body.appendChild(div); >+ div.style.setProperty("-webkit-isolation", value); >+ >+ var computedValue = getComputedStyle(div).getPropertyValue("-webkit-isolation"); >+ document.body.removeChild(div); >+ >+ return computedValue; >+ } >+ >+ function test(value, expected) { >+ shouldBeEqualToString('setProperty("' + value + '")', expected); >+ } >+ >+ test("auto", "auto"); >+ test("isolate", "isolate"); >+ test("", "auto"); >+ test("rubbish", "auto"); >+ </script> >+</body> >+</html> >diff --git a/LayoutTests/css3/compositing/svg-isolation-default-expected.html b/LayoutTests/css3/compositing/svg-isolation-default-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..85d15ffd83457c93dae6ac92ac86bb29ac40c5ef >--- /dev/null >+++ b/LayoutTests/css3/compositing/svg-isolation-default-expected.html >@@ -0,0 +1,4 @@ >+<!DOCTYPE HTML> >+<svg xmlns="http://www.w3.org/2000/svg" width="400px" height="400px" style="background: green"> >+ <rect x="100" y="100" width="200" height="200" style="fill: blue; -webkit-mix-blend-mode: multiply"/> >+</svg> >diff --git a/LayoutTests/css3/compositing/svg-isolation-default.html b/LayoutTests/css3/compositing/svg-isolation-default.html >new file mode 100644 >index 0000000000000000000000000000000000000000..cb6bf51710b0e8e655af1d50bfed0201c1ca38fd >--- /dev/null >+++ b/LayoutTests/css3/compositing/svg-isolation-default.html >@@ -0,0 +1,7 @@ >+<!DOCTYPE HTML> >+<!-- Test the default behaviour of isolation with two simple elements. The test passes if the small square is drawn with black (blending is performed since the element is not isolated). --> >+<svg xmlns="http://www.w3.org/2000/svg" width="400px" height="400px" style="background: green"> >+ <g style="-webkit-isolation: auto"> >+ <rect x="100" y="100" width="200" height="200" style="fill: blue; -webkit-mix-blend-mode: multiply"/> >+ </g> >+</svg> >diff --git a/LayoutTests/css3/compositing/svg-isolation-isolated-group-expected.html b/LayoutTests/css3/compositing/svg-isolation-isolated-group-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..05024a8294ab6be6c5cd36878b837f4eed019639 >--- /dev/null >+++ b/LayoutTests/css3/compositing/svg-isolation-isolated-group-expected.html >@@ -0,0 +1,8 @@ >+<!DOCTYPE HTML> >+<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="400px" height="400px" style="background: green"> >+ <g> >+ <rect x="50" y="50" width="200" height="200" style="fill: orange;"/> >+ <rect x="100" y="100" width="250" height="250" style="fill: blue;"/> >+ <rect x="100" y="100" width="150" height="150" style="fill: orange; -webkit-mix-blend-mode: difference;"/> >+ </g> >+</svg> >diff --git a/LayoutTests/css3/compositing/svg-isolation-isolated-group.html b/LayoutTests/css3/compositing/svg-isolation-isolated-group.html >new file mode 100644 >index 0000000000000000000000000000000000000000..fe8f7e2aad876a612f61597034cddef12f65d1e7 >--- /dev/null >+++ b/LayoutTests/css3/compositing/svg-isolation-isolated-group.html >@@ -0,0 +1,9 @@ >+<!DOCTYPE HTML> >+<!-- Test behaviour of isolation for overlapping elements within groups. The test passes if there are no rects drawn with red. >+This implies that the isolation is performed accordingly, meaning the orange rect doesn't blend with the background color. --> >+<svg xmlns="http://www.w3.org/2000/svg" width="400px" height="400px" style="background: green"> >+ <g style="-webkit-isolation: isolate;"> >+ <rect x="100" y="100" width="250" height="250" style="fill: blue;"/> >+ <rect x="50" y="50" width="200" height="200" style="fill: orange; -webkit-mix-blend-mode: difference;"/> >+ </g> >+</svg> >diff --git a/LayoutTests/css3/compositing/svg-isolation-simple-expected.html b/LayoutTests/css3/compositing/svg-isolation-simple-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..9897c93da8915b39e52120dd6df109bf96398fb9 >--- /dev/null >+++ b/LayoutTests/css3/compositing/svg-isolation-simple-expected.html >@@ -0,0 +1,6 @@ >+<!DOCTYPE HTML> >+<svg xmlns="http://www.w3.org/2000/svg" width="400px" height="400px" style="background: green"> >+ <g> >+ <rect x="100" y="100" width="200" height="200" style="fill: blue;"/> >+ </g> >+</svg> >diff --git a/LayoutTests/css3/compositing/svg-isolation-simple.html b/LayoutTests/css3/compositing/svg-isolation-simple.html >new file mode 100644 >index 0000000000000000000000000000000000000000..2e148674d54be9b3173cec1bfe3864e3e42299c4 >--- /dev/null >+++ b/LayoutTests/css3/compositing/svg-isolation-simple.html >@@ -0,0 +1,7 @@ >+<!DOCTYPE HTML> >+<!-- Test isolation with two simple elements. The test passes if the small square is drawn with blue (no blending is performed since the element is isolated). --> >+<svg xmlns="http://www.w3.org/2000/svg" width="400px" height="400px" style="background: green"> >+ <g style="-webkit-isolation: isolate"> >+ <rect x="100" y="100" width="200" height="200" style="fill: blue; -webkit-mix-blend-mode: multiply"/> >+ </g> >+</svg>
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 128958
:
224476
|
224479
|
224608
|
225055
| 225068