WebKit Bugzilla
Attachment 340251 Details for
Bug 185581
: Add new SVGDOM SVGFEBLEND constants
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-185581-20180512171332.patch (text/plain), 27.61 KB, created by
Dirk Schulze
on 2018-05-12 08:13:33 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Dirk Schulze
Created:
2018-05-12 08:13:33 PDT
Size:
27.61 KB
patch
obsolete
>Subversion Revision: 231733 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 17d5abc913f6de24162ff1fcfd9b95cbdf3bc268..5cff448f6a8af0accdb856c5ac8856b6798a7c42 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,22 @@ >+2018-05-12 Dirk Schulze <krit@webkit.org> >+ >+ Add new SVGDOM SVGFEBLEND constants >+ https://bugs.webkit.org/show_bug.cgi?id=185581 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Provide new SVG DOM constants for the new blend modes added to feBlend. >+ >+ https://drafts.fxtf.org/filter-effects-1/#InterfaceSVGFEBlendElement >+ >+ * platform/graphics/GraphicsTypes.cpp: >+ (WebCore::blendModeName): >+ * platform/graphics/GraphicsTypes.h: >+ * svg/SVGFEBlendElement.h: >+ (WebCore::SVGPropertyTraits<BlendMode>::highestEnumValue): >+ (WebCore::SVGPropertyTraits<BlendMode>::toString): >+ * svg/SVGFEBlendElement.idl: >+ > 2018-05-11 Daniel Bates <dabates@apple.com> > > X-Frame-Options: SAMEORIGIN needs to check all ancestor frames >diff --git a/Source/WebCore/platform/graphics/GraphicsTypes.cpp b/Source/WebCore/platform/graphics/GraphicsTypes.cpp >index f26caedab0020a33c3b4ec158435ff0c15cf116a..4431ce845b6a6493bf9782f03640fb71b270042c 100644 >--- a/Source/WebCore/platform/graphics/GraphicsTypes.cpp >+++ b/Source/WebCore/platform/graphics/GraphicsTypes.cpp >@@ -118,7 +118,7 @@ String compositeOperatorName(CompositeOperator op, BlendMode blendOp) > return compositeOperatorNames[op]; > } > >-static String blendModeName(BlendMode blendOp) >+String blendModeName(BlendMode blendOp) > { > ASSERT(blendOp >= BlendModeNormal); > ASSERT(blendOp <= BlendModePlusLighter); >diff --git a/Source/WebCore/platform/graphics/GraphicsTypes.h b/Source/WebCore/platform/graphics/GraphicsTypes.h >index bf5ce3ff394a46aee2ee23ff5e2468658fbf4a0a..3a80c9053dbd9347730997516eb69551cab75822 100644 >--- a/Source/WebCore/platform/graphics/GraphicsTypes.h >+++ b/Source/WebCore/platform/graphics/GraphicsTypes.h >@@ -108,6 +108,7 @@ enum class AlphaPremultiplication { > }; > > String compositeOperatorName(CompositeOperator, BlendMode); >+String blendModeName(BlendMode); > bool parseBlendMode(const String&, BlendMode&); > bool parseCompositeAndBlendOperator(const String&, CompositeOperator&, BlendMode&); > >diff --git a/Source/WebCore/svg/SVGFEBlendElement.h b/Source/WebCore/svg/SVGFEBlendElement.h >index 00423d12c9d43a87fa2a6c5e6b3d5916371971cb..8f86f1eb6e6031261984df0562dec85953f164b6 100644 >--- a/Source/WebCore/svg/SVGFEBlendElement.h >+++ b/Source/WebCore/svg/SVGFEBlendElement.h >@@ -21,6 +21,7 @@ > > #pragma once > >+#include "GraphicsTypes.h" > #include "SVGAnimatedEnumeration.h" > #include "SVGFilterPrimitiveStandardAttributes.h" > >@@ -28,24 +29,14 @@ namespace WebCore { > > template<> > struct SVGPropertyTraits<BlendMode> { >- static unsigned highestEnumValue() { return BlendModeLighten; } >+ static unsigned highestEnumValue() { return BlendModeLuminosity; } > > static String toString(BlendMode type) > { >- switch (type) { >- case BlendModeNormal: >- return ASCIILiteral("normal"); >- case BlendModeMultiply: >- return ASCIILiteral("multiply"); >- case BlendModeScreen: >- return ASCIILiteral("screen"); >- case BlendModeDarken: >- return ASCIILiteral("darken"); >- case BlendModeLighten: >- return ASCIILiteral("lighten"); >- default: >- return emptyString(); >- } >+ if (type < BlendModePlusDarker) >+ return blendModeName(type); >+ >+ return emptyString(); > } > }; > >diff --git a/Source/WebCore/svg/SVGFEBlendElement.idl b/Source/WebCore/svg/SVGFEBlendElement.idl >index 42e7b733560d25f1f982ede1052bea46d101fbd5..21c84600ea50daac51da143f62ef16fd83abd8de 100644 >--- a/Source/WebCore/svg/SVGFEBlendElement.idl >+++ b/Source/WebCore/svg/SVGFEBlendElement.idl >@@ -27,15 +27,26 @@ > DoNotCheckConstants > ] interface SVGFEBlendElement : SVGElement { > // Blend Mode Types >- const unsigned short SVG_FEBLEND_MODE_UNKNOWN = 0; >- const unsigned short SVG_FEBLEND_MODE_NORMAL = 1; >+ const unsigned short SVG_FEBLEND_MODE_UNKNOWN = 0; >+ const unsigned short SVG_FEBLEND_MODE_NORMAL = 1; > const unsigned short SVG_FEBLEND_MODE_MULTIPLY = 2; >- const unsigned short SVG_FEBLEND_MODE_SCREEN = 3; >- const unsigned short SVG_FEBLEND_MODE_DARKEN = 4; >- const unsigned short SVG_FEBLEND_MODE_LIGHTEN = 5; >+ const unsigned short SVG_FEBLEND_MODE_SCREEN = 3; >+ const unsigned short SVG_FEBLEND_MODE_DARKEN = 4; >+ const unsigned short SVG_FEBLEND_MODE_LIGHTEN = 5; >+ const unsigned short SVG_FEBLEND_MODE_OVERLAY = 6; >+ const unsigned short SVG_FEBLEND_MODE_COLOR_DODGE = 7; >+ const unsigned short SVG_FEBLEND_MODE_COLOR_BURN = 8; >+ const unsigned short SVG_FEBLEND_MODE_HARD_LIGHT = 9; >+ const unsigned short SVG_FEBLEND_MODE_SOFT_LIGHT = 10; >+ const unsigned short SVG_FEBLEND_MODE_DIFFERENCE = 11; >+ const unsigned short SVG_FEBLEND_MODE_EXCLUSION = 12; >+ const unsigned short SVG_FEBLEND_MODE_HUE = 13; >+ const unsigned short SVG_FEBLEND_MODE_SATURATION = 14; >+ const unsigned short SVG_FEBLEND_MODE_COLOR = 15; >+ const unsigned short SVG_FEBLEND_MODE_LUMINOSITY = 16; > >- readonly attribute SVGAnimatedString in1; >- readonly attribute SVGAnimatedString in2; >+ readonly attribute SVGAnimatedString in1; >+ readonly attribute SVGAnimatedString in2; > readonly attribute SVGAnimatedEnumeration mode; > }; > >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 5d13163ebbe1d50313c704f61348894f6e3ce4b6..568f660dbe609531f5f17addf153086c93973c5f 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,19 @@ >+2018-05-12 Dirk Schulze <krit@webkit.org> >+ >+ Add new SVGDOM SVGFEBLEND constants >+ https://bugs.webkit.org/show_bug.cgi?id=185581 >+ >+ Provide new SVG DOM constants for the new blend modes added to feBlend. >+ >+ https://drafts.fxtf.org/filter-effects-1/#InterfaceSVGFEBlendElement >+ >+ * svg/custom/js-svg-constructors-expected.txt: >+ * svg/custom/js-svg-constructors.svg: >+ * svg/dom/SVGAnimatedEnumeration-SVGFEBlendElement-expected.txt: >+ * svg/dom/SVGAnimatedEnumeration-SVGFEBlendElement.html: >+ * svg/dom/SVGAnimatedEnumeration-case-sensitive-expected.txt: >+ * svg/dom/SVGAnimatedEnumeration-case-sensitive.html: >+ > 2018-05-11 Daniel Bates <dabates@apple.com> > > X-Frame-Options: SAMEORIGIN needs to check all ancestor frames >diff --git a/LayoutTests/svg/custom/js-svg-constructors-expected.txt b/LayoutTests/svg/custom/js-svg-constructors-expected.txt >index f805c7917ba43bd6de9ebf17cdd26c2956e18bd0..2c2756c47b838c5b5eadebbe69c9ea58a6430b57 100644 >--- a/LayoutTests/svg/custom/js-svg-constructors-expected.txt >+++ b/LayoutTests/svg/custom/js-svg-constructors-expected.txt >@@ -16,6 +16,17 @@ SVGFEBlendElement.SVG_FEBLEND_MODE_MULTIPLY PASSED > SVGFEBlendElement.SVG_FEBLEND_MODE_SCREEN PASSED > SVGFEBlendElement.SVG_FEBLEND_MODE_DARKEN PASSED > SVGFEBlendElement.SVG_FEBLEND_MODE_LIGHTEN PASSED >+SVGFEBlendElement.SVG_FEBLEND_MODE_OVERLAY PASSED >+SVGFEBlendElement.SVG_FEBLEND_MODE_COLOR_DODGE PASSED >+SVGFEBlendElement.SVG_FEBLEND_MODE_COLOR_BURN PASSED >+SVGFEBlendElement.SVG_FEBLEND_MODE_HARD_LIGHT PASSED >+SVGFEBlendElement.SVG_FEBLEND_MODE_SOFT_LIGHT PASSED >+SVGFEBlendElement.SVG_FEBLEND_MODE_DIFFERENCE PASSED >+SVGFEBlendElement.SVG_FEBLEND_MODE_EXCLUSION PASSED >+SVGFEBlendElement.SVG_FEBLEND_MODE_HUE PASSED >+SVGFEBlendElement.SVG_FEBLEND_MODE_SATURATION PASSED >+SVGFEBlendElement.SVG_FEBLEND_MODE_COLOR PASSED >+SVGFEBlendElement.SVG_FEBLEND_MODE_LUMINOSITY PASSED > SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_UNKNOWN PASSED > SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_MATRIX PASSED > SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_SATURATE PASSED >diff --git a/LayoutTests/svg/custom/js-svg-constructors.svg b/LayoutTests/svg/custom/js-svg-constructors.svg >index b8f78da4891769cffb5a8e9431cbf668289c7e10..8beb604dbafc7f5f6cdf4bee967bbfb37297067d 100644 >--- a/LayoutTests/svg/custom/js-svg-constructors.svg >+++ b/LayoutTests/svg/custom/js-svg-constructors.svg >@@ -48,6 +48,17 @@ > expect("SVGFEBlendElement.SVG_FEBLEND_MODE_SCREEN", 3); > expect("SVGFEBlendElement.SVG_FEBLEND_MODE_DARKEN", 4); > expect("SVGFEBlendElement.SVG_FEBLEND_MODE_LIGHTEN", 5); >+ expect("SVGFEBlendElement.SVG_FEBLEND_MODE_OVERLAY", 6); >+ expect("SVGFEBlendElement.SVG_FEBLEND_MODE_COLOR_DODGE", 7); >+ expect("SVGFEBlendElement.SVG_FEBLEND_MODE_COLOR_BURN", 8); >+ expect("SVGFEBlendElement.SVG_FEBLEND_MODE_HARD_LIGHT", 9); >+ expect("SVGFEBlendElement.SVG_FEBLEND_MODE_SOFT_LIGHT", 10); >+ expect("SVGFEBlendElement.SVG_FEBLEND_MODE_DIFFERENCE", 11); >+ expect("SVGFEBlendElement.SVG_FEBLEND_MODE_EXCLUSION", 12); >+ expect("SVGFEBlendElement.SVG_FEBLEND_MODE_HUE", 13); >+ expect("SVGFEBlendElement.SVG_FEBLEND_MODE_SATURATION", 14); >+ expect("SVGFEBlendElement.SVG_FEBLEND_MODE_COLOR", 15); >+ expect("SVGFEBlendElement.SVG_FEBLEND_MODE_LUMINOSITY", 16); > } > > if (window.SVGFEColorMatrixElement) { >diff --git a/LayoutTests/svg/dom/SVGAnimatedEnumeration-SVGFEBlendElement-expected.txt b/LayoutTests/svg/dom/SVGAnimatedEnumeration-SVGFEBlendElement-expected.txt >index 4b145d95909c4cb91a57bd28e6292e7ebc622e5b..9dc74b7e575494f9a68bf7d44210bd2b5ccf461b 100644 >--- a/LayoutTests/svg/dom/SVGAnimatedEnumeration-SVGFEBlendElement-expected.txt >+++ b/LayoutTests/svg/dom/SVGAnimatedEnumeration-SVGFEBlendElement-expected.txt >@@ -29,16 +29,71 @@ PASS feBlendElement.mode.baseVal = SVGFEBlendElement.SVG_FEBLEND_MODE_LIGHTEN is > PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_LIGHTEN > PASS feBlendElement.getAttribute('mode') is "lighten" > >+Switch to 'overlay' >+PASS feBlendElement.mode.baseVal = SVGFEBlendElement.SVG_FEBLEND_MODE_OVERLAY is SVGFEBlendElement.SVG_FEBLEND_MODE_OVERLAY >+PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_OVERLAY >+PASS feBlendElement.getAttribute('mode') is "overlay" >+ >+Switch to 'color-dodge' >+PASS feBlendElement.mode.baseVal = SVGFEBlendElement.SVG_FEBLEND_MODE_COLOR_DODGE is SVGFEBlendElement.SVG_FEBLEND_MODE_COLOR_DODGE >+PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_COLOR_DODGE >+PASS feBlendElement.getAttribute('mode') is "color-dodge" >+ >+Switch to 'color-burn' >+PASS feBlendElement.mode.baseVal = SVGFEBlendElement.SVG_FEBLEND_MODE_COLOR_BURN is SVGFEBlendElement.SVG_FEBLEND_MODE_COLOR_BURN >+PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_COLOR_BURN >+PASS feBlendElement.getAttribute('mode') is "color-burn" >+ >+Switch to 'hard-light' >+PASS feBlendElement.mode.baseVal = SVGFEBlendElement.SVG_FEBLEND_MODE_HARD_LIGHT is SVGFEBlendElement.SVG_FEBLEND_MODE_HARD_LIGHT >+PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_HARD_LIGHT >+PASS feBlendElement.getAttribute('mode') is "hard-light" >+ >+Switch to 'soft-light' >+PASS feBlendElement.mode.baseVal = SVGFEBlendElement.SVG_FEBLEND_MODE_SOFT_LIGHT is SVGFEBlendElement.SVG_FEBLEND_MODE_SOFT_LIGHT >+PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_SOFT_LIGHT >+PASS feBlendElement.getAttribute('mode') is "soft-light" >+ >+Switch to 'difference' >+PASS feBlendElement.mode.baseVal = SVGFEBlendElement.SVG_FEBLEND_MODE_DIFFERENCE is SVGFEBlendElement.SVG_FEBLEND_MODE_DIFFERENCE >+PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_DIFFERENCE >+PASS feBlendElement.getAttribute('mode') is "difference" >+ >+Switch to 'exclusion' >+PASS feBlendElement.mode.baseVal = SVGFEBlendElement.SVG_FEBLEND_MODE_EXCLUSION is SVGFEBlendElement.SVG_FEBLEND_MODE_EXCLUSION >+PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_EXCLUSION >+PASS feBlendElement.getAttribute('mode') is "exclusion" >+ >+Switch to 'hue' >+PASS feBlendElement.mode.baseVal = SVGFEBlendElement.SVG_FEBLEND_MODE_HUE is SVGFEBlendElement.SVG_FEBLEND_MODE_HUE >+PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_HUE >+PASS feBlendElement.getAttribute('mode') is "hue" >+ >+Switch to 'saturation' >+PASS feBlendElement.mode.baseVal = SVGFEBlendElement.SVG_FEBLEND_MODE_SATURATION is SVGFEBlendElement.SVG_FEBLEND_MODE_SATURATION >+PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_SATURATION >+PASS feBlendElement.getAttribute('mode') is "saturation" >+ >+Switch to 'color' >+PASS feBlendElement.mode.baseVal = SVGFEBlendElement.SVG_FEBLEND_MODE_COLOR is SVGFEBlendElement.SVG_FEBLEND_MODE_COLOR >+PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_COLOR >+PASS feBlendElement.getAttribute('mode') is "color" >+ >+Switch to 'luminosity' >+PASS feBlendElement.mode.baseVal = SVGFEBlendElement.SVG_FEBLEND_MODE_LUMINOSITY is SVGFEBlendElement.SVG_FEBLEND_MODE_LUMINOSITY >+PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_LUMINOSITY >+PASS feBlendElement.getAttribute('mode') is "luminosity" >+ > Try setting invalid values >-PASS feBlendElement.mode.baseVal = 6 threw exception TypeError: Type error. >-PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_LIGHTEN >-PASS feBlendElement.getAttribute('mode') is "lighten" >+PASS feBlendElement.mode.baseVal = 17 threw exception TypeError: Type error. >+PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_LUMINOSITY >+PASS feBlendElement.getAttribute('mode') is "luminosity" > PASS feBlendElement.mode.baseVal = -1 threw exception TypeError: Type error. >-PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_LIGHTEN >-PASS feBlendElement.getAttribute('mode') is "lighten" >+PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_LUMINOSITY >+PASS feBlendElement.getAttribute('mode') is "luminosity" > PASS feBlendElement.mode.baseVal = 0 threw exception TypeError: Type error. >-PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_LIGHTEN >-PASS feBlendElement.getAttribute('mode') is "lighten" >+PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_LUMINOSITY >+PASS feBlendElement.getAttribute('mode') is "luminosity" > > Switch to 'normal' > PASS feBlendElement.mode.baseVal = SVGFEBlendElement.SVG_FEBLEND_MODE_NORMAL is SVGFEBlendElement.SVG_FEBLEND_MODE_NORMAL >diff --git a/LayoutTests/svg/dom/SVGAnimatedEnumeration-SVGFEBlendElement.html b/LayoutTests/svg/dom/SVGAnimatedEnumeration-SVGFEBlendElement.html >index 5396a06a48143a55101eef8eaef9b926695e1b04..3a4e7aea50f43716c285995cb355fc8092102311 100644 >--- a/LayoutTests/svg/dom/SVGAnimatedEnumeration-SVGFEBlendElement.html >+++ b/LayoutTests/svg/dom/SVGAnimatedEnumeration-SVGFEBlendElement.html >@@ -42,19 +42,85 @@ shouldBe("feBlendElement.mode.baseVal = SVGFEBlendElement.SVG_FEBLEND_MODE_LIGHT > shouldBe("feBlendElement.mode.baseVal", "SVGFEBlendElement.SVG_FEBLEND_MODE_LIGHTEN"); > shouldBeEqualToString("feBlendElement.getAttribute('mode')", "lighten"); > >+debug(""); >+debug("Switch to 'overlay'"); >+shouldBe("feBlendElement.mode.baseVal = SVGFEBlendElement.SVG_FEBLEND_MODE_OVERLAY", "SVGFEBlendElement.SVG_FEBLEND_MODE_OVERLAY"); >+shouldBe("feBlendElement.mode.baseVal", "SVGFEBlendElement.SVG_FEBLEND_MODE_OVERLAY"); >+shouldBeEqualToString("feBlendElement.getAttribute('mode')", "overlay"); >+ >+debug(""); >+debug("Switch to 'color-dodge'"); >+shouldBe("feBlendElement.mode.baseVal = SVGFEBlendElement.SVG_FEBLEND_MODE_COLOR_DODGE", "SVGFEBlendElement.SVG_FEBLEND_MODE_COLOR_DODGE"); >+shouldBe("feBlendElement.mode.baseVal", "SVGFEBlendElement.SVG_FEBLEND_MODE_COLOR_DODGE"); >+shouldBeEqualToString("feBlendElement.getAttribute('mode')", "color-dodge"); >+ >+debug(""); >+debug("Switch to 'color-burn'"); >+shouldBe("feBlendElement.mode.baseVal = SVGFEBlendElement.SVG_FEBLEND_MODE_COLOR_BURN", "SVGFEBlendElement.SVG_FEBLEND_MODE_COLOR_BURN"); >+shouldBe("feBlendElement.mode.baseVal", "SVGFEBlendElement.SVG_FEBLEND_MODE_COLOR_BURN"); >+shouldBeEqualToString("feBlendElement.getAttribute('mode')", "color-burn"); >+ >+debug(""); >+debug("Switch to 'hard-light'"); >+shouldBe("feBlendElement.mode.baseVal = SVGFEBlendElement.SVG_FEBLEND_MODE_HARD_LIGHT", "SVGFEBlendElement.SVG_FEBLEND_MODE_HARD_LIGHT"); >+shouldBe("feBlendElement.mode.baseVal", "SVGFEBlendElement.SVG_FEBLEND_MODE_HARD_LIGHT"); >+shouldBeEqualToString("feBlendElement.getAttribute('mode')", "hard-light"); >+ >+debug(""); >+debug("Switch to 'soft-light'"); >+shouldBe("feBlendElement.mode.baseVal = SVGFEBlendElement.SVG_FEBLEND_MODE_SOFT_LIGHT", "SVGFEBlendElement.SVG_FEBLEND_MODE_SOFT_LIGHT"); >+shouldBe("feBlendElement.mode.baseVal", "SVGFEBlendElement.SVG_FEBLEND_MODE_SOFT_LIGHT"); >+shouldBeEqualToString("feBlendElement.getAttribute('mode')", "soft-light"); >+ >+debug(""); >+debug("Switch to 'difference'"); >+shouldBe("feBlendElement.mode.baseVal = SVGFEBlendElement.SVG_FEBLEND_MODE_DIFFERENCE", "SVGFEBlendElement.SVG_FEBLEND_MODE_DIFFERENCE"); >+shouldBe("feBlendElement.mode.baseVal", "SVGFEBlendElement.SVG_FEBLEND_MODE_DIFFERENCE"); >+shouldBeEqualToString("feBlendElement.getAttribute('mode')", "difference"); >+ >+debug(""); >+debug("Switch to 'exclusion'"); >+shouldBe("feBlendElement.mode.baseVal = SVGFEBlendElement.SVG_FEBLEND_MODE_EXCLUSION", "SVGFEBlendElement.SVG_FEBLEND_MODE_EXCLUSION"); >+shouldBe("feBlendElement.mode.baseVal", "SVGFEBlendElement.SVG_FEBLEND_MODE_EXCLUSION"); >+shouldBeEqualToString("feBlendElement.getAttribute('mode')", "exclusion"); >+ >+debug(""); >+debug("Switch to 'hue'"); >+shouldBe("feBlendElement.mode.baseVal = SVGFEBlendElement.SVG_FEBLEND_MODE_HUE", "SVGFEBlendElement.SVG_FEBLEND_MODE_HUE"); >+shouldBe("feBlendElement.mode.baseVal", "SVGFEBlendElement.SVG_FEBLEND_MODE_HUE"); >+shouldBeEqualToString("feBlendElement.getAttribute('mode')", "hue"); >+ >+debug(""); >+debug("Switch to 'saturation'"); >+shouldBe("feBlendElement.mode.baseVal = SVGFEBlendElement.SVG_FEBLEND_MODE_SATURATION", "SVGFEBlendElement.SVG_FEBLEND_MODE_SATURATION"); >+shouldBe("feBlendElement.mode.baseVal", "SVGFEBlendElement.SVG_FEBLEND_MODE_SATURATION"); >+shouldBeEqualToString("feBlendElement.getAttribute('mode')", "saturation"); >+ >+debug(""); >+debug("Switch to 'color'"); >+shouldBe("feBlendElement.mode.baseVal = SVGFEBlendElement.SVG_FEBLEND_MODE_COLOR", "SVGFEBlendElement.SVG_FEBLEND_MODE_COLOR"); >+shouldBe("feBlendElement.mode.baseVal", "SVGFEBlendElement.SVG_FEBLEND_MODE_COLOR"); >+shouldBeEqualToString("feBlendElement.getAttribute('mode')", "color"); >+ >+debug(""); >+debug("Switch to 'luminosity'"); >+shouldBe("feBlendElement.mode.baseVal = SVGFEBlendElement.SVG_FEBLEND_MODE_LUMINOSITY", "SVGFEBlendElement.SVG_FEBLEND_MODE_LUMINOSITY"); >+shouldBe("feBlendElement.mode.baseVal", "SVGFEBlendElement.SVG_FEBLEND_MODE_LUMINOSITY"); >+shouldBeEqualToString("feBlendElement.getAttribute('mode')", "luminosity"); >+ > debug(""); > debug("Try setting invalid values"); >-shouldThrow("feBlendElement.mode.baseVal = 6"); >-shouldBe("feBlendElement.mode.baseVal", "SVGFEBlendElement.SVG_FEBLEND_MODE_LIGHTEN"); >-shouldBeEqualToString("feBlendElement.getAttribute('mode')", "lighten"); >+shouldThrow("feBlendElement.mode.baseVal = 17"); >+shouldBe("feBlendElement.mode.baseVal", "SVGFEBlendElement.SVG_FEBLEND_MODE_LUMINOSITY"); >+shouldBeEqualToString("feBlendElement.getAttribute('mode')", "luminosity"); > > shouldThrow("feBlendElement.mode.baseVal = -1"); >-shouldBe("feBlendElement.mode.baseVal", "SVGFEBlendElement.SVG_FEBLEND_MODE_LIGHTEN"); >-shouldBeEqualToString("feBlendElement.getAttribute('mode')", "lighten"); >+shouldBe("feBlendElement.mode.baseVal", "SVGFEBlendElement.SVG_FEBLEND_MODE_LUMINOSITY"); >+shouldBeEqualToString("feBlendElement.getAttribute('mode')", "luminosity"); > > shouldThrow("feBlendElement.mode.baseVal = 0"); >-shouldBe("feBlendElement.mode.baseVal", "SVGFEBlendElement.SVG_FEBLEND_MODE_LIGHTEN"); >-shouldBeEqualToString("feBlendElement.getAttribute('mode')", "lighten"); >+shouldBe("feBlendElement.mode.baseVal", "SVGFEBlendElement.SVG_FEBLEND_MODE_LUMINOSITY"); >+shouldBeEqualToString("feBlendElement.getAttribute('mode')", "luminosity"); > > debug(""); > debug("Switch to 'normal'"); >diff --git a/LayoutTests/svg/dom/SVGAnimatedEnumeration-case-sensitive-expected.txt b/LayoutTests/svg/dom/SVGAnimatedEnumeration-case-sensitive-expected.txt >index 147c8762ebe618eda16d4a55f4818ffba008d6e3..5f78394031054f97d6d3f7b13d9ded77bacf73c4 100644 >--- a/LayoutTests/svg/dom/SVGAnimatedEnumeration-case-sensitive-expected.txt >+++ b/LayoutTests/svg/dom/SVGAnimatedEnumeration-case-sensitive-expected.txt >@@ -78,6 +78,50 @@ PASS feBlendElement.setAttribute('mode', 'lighten') is undefined. > PASS feBlendElement.getAttribute('mode') is "lighten" > PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_LIGHTEN > >+PASS feBlendElement.setAttribute('mode', 'overlay') is undefined. >+PASS feBlendElement.getAttribute('mode') is "overlay" >+PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_OVERLAY >+ >+PASS feBlendElement.setAttribute('mode', 'color-dodge') is undefined. >+PASS feBlendElement.getAttribute('mode') is "color-dodge" >+PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_COLOR_DODGE >+ >+PASS feBlendElement.setAttribute('mode', 'color-burn') is undefined. >+PASS feBlendElement.getAttribute('mode') is "color-burn" >+PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_COLOR_BURN >+ >+PASS feBlendElement.setAttribute('mode', 'hard-light') is undefined. >+PASS feBlendElement.getAttribute('mode') is "hard-light" >+PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_HARD_LIGHT >+ >+PASS feBlendElement.setAttribute('mode', 'soft-light') is undefined. >+PASS feBlendElement.getAttribute('mode') is "soft-light" >+PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_SOFT_LIGHT >+ >+PASS feBlendElement.setAttribute('mode', 'difference') is undefined. >+PASS feBlendElement.getAttribute('mode') is "difference" >+PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_DIFFERENCE >+ >+PASS feBlendElement.setAttribute('mode', 'exclusion') is undefined. >+PASS feBlendElement.getAttribute('mode') is "exclusion" >+PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_EXCLUSION >+ >+PASS feBlendElement.setAttribute('mode', 'hue') is undefined. >+PASS feBlendElement.getAttribute('mode') is "hue" >+PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_HUE >+ >+PASS feBlendElement.setAttribute('mode', 'saturation') is undefined. >+PASS feBlendElement.getAttribute('mode') is "saturation" >+PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_SATURATION >+ >+PASS feBlendElement.setAttribute('mode', 'color') is undefined. >+PASS feBlendElement.getAttribute('mode') is "color" >+PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_COLOR >+ >+PASS feBlendElement.setAttribute('mode', 'luminosity') is undefined. >+PASS feBlendElement.getAttribute('mode') is "luminosity" >+PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_LUMINOSITY >+ > Check invalid case feBlend 'mode' > > feBlendElement.setAttribute('mode', 'multiply') >@@ -100,9 +144,64 @@ PASS feBlendElement.setAttribute('mode', 'DARKEN') is undefined. > PASS feBlendElement.getAttribute('mode') is "DARKEN" > PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_LIGHTEN > >-feBlendElement.setAttribute('mode', 'normal') >+feBlendElement.setAttribute('mode', 'overlay') > PASS feBlendElement.setAttribute('mode', 'LIGHTEN') is undefined. > PASS feBlendElement.getAttribute('mode') is "LIGHTEN" >+PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_OVERLAY >+ >+feBlendElement.setAttribute('mode', 'color-dodge') >+PASS feBlendElement.setAttribute('mode', 'OVERLAY') is undefined. >+PASS feBlendElement.getAttribute('mode') is "OVERLAY" >+PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_COLOR_DODGE >+ >+feBlendElement.setAttribute('mode', 'color-burn') >+PASS feBlendElement.setAttribute('mode', 'COLOR-DODGE') is undefined. >+PASS feBlendElement.getAttribute('mode') is "COLOR-DODGE" >+PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_COLOR_BURN >+ >+feBlendElement.setAttribute('mode', 'hard-light') >+PASS feBlendElement.setAttribute('mode', 'COLOR-BURN') is undefined. >+PASS feBlendElement.getAttribute('mode') is "COLOR-BURN" >+PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_HARD_LIGHT >+ >+feBlendElement.setAttribute('mode', 'soft-light') >+PASS feBlendElement.setAttribute('mode', 'HARD-LIGHT') is undefined. >+PASS feBlendElement.getAttribute('mode') is "HARD-LIGHT" >+PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_SOFT_LIGHT >+ >+feBlendElement.setAttribute('mode', 'difference') >+PASS feBlendElement.setAttribute('mode', 'SOFT-LIGHT') is undefined. >+PASS feBlendElement.getAttribute('mode') is "SOFT-LIGHT" >+PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_DIFFERENCE >+ >+feBlendElement.setAttribute('mode', 'exclusion') >+PASS feBlendElement.setAttribute('mode', 'DIFFERENCE') is undefined. >+PASS feBlendElement.getAttribute('mode') is "DIFFERENCE" >+PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_EXCLUSION >+ >+feBlendElement.setAttribute('mode', 'hue') >+PASS feBlendElement.setAttribute('mode', 'EXCLUSION') is undefined. >+PASS feBlendElement.getAttribute('mode') is "EXCLUSION" >+PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_HUE >+ >+feBlendElement.setAttribute('mode', 'saturation') >+PASS feBlendElement.setAttribute('mode', 'HUE') is undefined. >+PASS feBlendElement.getAttribute('mode') is "HUE" >+PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_SATURATION >+ >+feBlendElement.setAttribute('mode', 'color') >+PASS feBlendElement.setAttribute('mode', 'SATURATION') is undefined. >+PASS feBlendElement.getAttribute('mode') is "SATURATION" >+PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_COLOR >+ >+feBlendElement.setAttribute('mode', 'luminosity') >+PASS feBlendElement.setAttribute('mode', 'COLOR') is undefined. >+PASS feBlendElement.getAttribute('mode') is "COLOR" >+PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_LUMINOSITY >+ >+feBlendElement.setAttribute('mode', 'normal') >+PASS feBlendElement.setAttribute('mode', 'LUMINOSITY') is undefined. >+PASS feBlendElement.getAttribute('mode') is "LUMINOSITY" > PASS feBlendElement.mode.baseVal is SVGFEBlendElement.SVG_FEBLEND_MODE_NORMAL > > Check valid feColorMatrix 'type' >diff --git a/LayoutTests/svg/dom/SVGAnimatedEnumeration-case-sensitive.html b/LayoutTests/svg/dom/SVGAnimatedEnumeration-case-sensitive.html >index 826d98da2b95112644712e7ff8bf1bfa9c8a3669..cb9bb90ea713740f723a3cc719efb641ebc51c01 100644 >--- a/LayoutTests/svg/dom/SVGAnimatedEnumeration-case-sensitive.html >+++ b/LayoutTests/svg/dom/SVGAnimatedEnumeration-case-sensitive.html >@@ -26,7 +26,18 @@ var svgAnimatedEnumeration = { > {"id" : "multiply", "val" : "SVG_FEBLEND_MODE_MULTIPLY"}, > {"id" : "screen", "val" : "SVG_FEBLEND_MODE_SCREEN"}, > {"id" : "darken", "val" : "SVG_FEBLEND_MODE_DARKEN"}, >- {"id" : "lighten", "val" : "SVG_FEBLEND_MODE_LIGHTEN"} >+ {"id" : "lighten", "val" : "SVG_FEBLEND_MODE_LIGHTEN"}, >+ {"id" : "overlay", "val" : "SVG_FEBLEND_MODE_OVERLAY"}, >+ {"id" : "color-dodge", "val" : "SVG_FEBLEND_MODE_COLOR_DODGE"}, >+ {"id" : "color-burn", "val" : "SVG_FEBLEND_MODE_COLOR_BURN"}, >+ {"id" : "hard-light", "val" : "SVG_FEBLEND_MODE_HARD_LIGHT"}, >+ {"id" : "soft-light", "val" : "SVG_FEBLEND_MODE_SOFT_LIGHT"}, >+ {"id" : "difference", "val" : "SVG_FEBLEND_MODE_DIFFERENCE"}, >+ {"id" : "exclusion", "val" : "SVG_FEBLEND_MODE_EXCLUSION"}, >+ {"id" : "hue", "val" : "SVG_FEBLEND_MODE_HUE"}, >+ {"id" : "saturation", "val" : "SVG_FEBLEND_MODE_SATURATION"}, >+ {"id" : "color", "val" : "SVG_FEBLEND_MODE_COLOR"}, >+ {"id" : "luminosity", "val" : "SVG_FEBLEND_MODE_LUMINOSITY"} > ] > }, > "SVGFEColorMatrixElement" : {
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 185581
:
340251
|
340406