2011-04-21 Dirk Schulze <krit@webkit.org>
authorkrit@webkit.org <krit@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Apr 2011 17:56:28 +0000 (17:56 +0000)
committerkrit@webkit.org <krit@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Apr 2011 17:56:28 +0000 (17:56 +0000)
        Reviewed by Nikolas Zimmermann.

        SVG feDropShadow implementation of SVG Filters 1.2
        https://bugs.webkit.org/show_bug.cgi?id=52513

        Added dynamic update tests for FEDropShadow as well as a basic pixel test.

        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-dx-attr-expected.checksum: Added.
        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-dx-attr-expected.png: Added.
        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-dy-attr-expected.checksum: Added.
        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-dy-attr-expected.png: Added.
        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-in-attr-expected.checksum: Added.
        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-in-attr-expected.png: Added.
        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-color-attr-expected.checksum: Added.
        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-color-attr-expected.png: Added.
        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-opacity-attr-expected.checksum: Added.
        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-opacity-attr-expected.png: Added.
        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr-expected.checksum: Added.
        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr-expected.png: Added.
        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dx-prop-expected.checksum: Added.
        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dx-prop-expected.png: Added.
        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dy-prop-expected.checksum: Added.
        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dy-prop-expected.png: Added.
        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-in-prop-expected.checksum: Added.
        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-in-prop-expected.png: Added.
        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-color-prop-expected.checksum: Added.
        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-color-prop-expected.png: Added.
        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-opacity-prop-expected.checksum: Added.
        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-opacity-prop-expected.png: Added.
        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-stdDeviation-prop-expected.checksum: Added.
        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-stdDeviation-prop-expected.png: Added.
        * platform/mac/svg/filters/feDropShadow-expected.checksum: Added.
        * platform/mac/svg/filters/feDropShadow-expected.png: Added.
        * platform/mac/svg/filters/feDropShadow-expected.txt: Added.
        * svg/dynamic-updates/SVGFEDropShadowElement-dom-dx-attr-expected.txt: Added.
        * svg/dynamic-updates/SVGFEDropShadowElement-dom-dx-attr.html: Added.
        * svg/dynamic-updates/SVGFEDropShadowElement-dom-dy-attr-expected.txt: Added.
        * svg/dynamic-updates/SVGFEDropShadowElement-dom-dy-attr.html: Added.
        * svg/dynamic-updates/SVGFEDropShadowElement-dom-in-attr-expected.txt: Added.
        * svg/dynamic-updates/SVGFEDropShadowElement-dom-in-attr.html: Added.
        * svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-color-attr-expected.txt: Added.
        * svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-color-attr.html: Added.
        * svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-opacity-attr-expected.txt: Added.
        * svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-opacity-attr.html: Added.
        * svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr-expected.txt: Added.
        * svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr.html: Added.
        * svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dx-prop-expected.txt: Added.
        * svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dx-prop.html: Added.
        * svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dy-prop-expected.txt: Added.
        * svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dy-prop.html: Added.
        * svg/dynamic-updates/SVGFEDropShadowElement-svgdom-in-prop-expected.txt: Added.
        * svg/dynamic-updates/SVGFEDropShadowElement-svgdom-in-prop.html: Added.
        * svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-color-prop-expected.txt: Added.
        * svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-color-prop.html: Added.
        * svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-opacity-prop-expected.txt: Added.
        * svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-opacity-prop.html: Added.
        * svg/dynamic-updates/SVGFEDropShadowElement-svgdom-stdDeviation-prop-expected.txt: Added.
        * svg/dynamic-updates/SVGFEDropShadowElement-svgdom-stdDeviation-prop.html: Added.
        * svg/dynamic-updates/SVGFETurbulenceElement-svgdom-numOctaves-prop.html:
        * svg/dynamic-updates/SVGFETurbulenceElement-svgdom-seed-prop.html:
        * svg/dynamic-updates/SVGFETurbulenceElement-svgdom-stitchTiles-prop.html:
        * svg/dynamic-updates/SVGFETurbulenceElement-svgdom-type-prop.html:
        * svg/dynamic-updates/script-tests/SVGFEDropShadowElement-dom-dx-attr.js: Added.
        (executeTest):
        * svg/dynamic-updates/script-tests/SVGFEDropShadowElement-dom-dy-attr.js: Added.
        (executeTest):
        * svg/dynamic-updates/script-tests/SVGFEDropShadowElement-dom-in-attr.js: Added.
        (executeTest):
        * svg/dynamic-updates/script-tests/SVGFEDropShadowElement-dom-shadow-color-attr.js: Added.
        (executeTest):
        * svg/dynamic-updates/script-tests/SVGFEDropShadowElement-dom-shadow-opacity-attr.js: Added.
        (executeTest):
        * svg/dynamic-updates/script-tests/SVGFEDropShadowElement-dom-stdDeviation-attr.js: Added.
        (executeTest):
        * svg/dynamic-updates/script-tests/SVGFEDropShadowElement-svgdom-dx-prop.js: Added.
        (executeTest):
        * svg/dynamic-updates/script-tests/SVGFEDropShadowElement-svgdom-dy-prop.js: Added.
        (executeTest):
        * svg/dynamic-updates/script-tests/SVGFEDropShadowElement-svgdom-in-prop.js: Added.
        (executeTest):
        * svg/dynamic-updates/script-tests/SVGFEDropShadowElement-svgdom-shadow-color-prop.js: Added.
        (executeTest):
        * svg/dynamic-updates/script-tests/SVGFEDropShadowElement-svgdom-shadow-opacity-prop.js: Added.
        (executeTest):
        * svg/dynamic-updates/script-tests/SVGFEDropShadowElement-svgdom-stdDeviation-prop.js: Added.
        (executeTest):
        * svg/filters/feDropShadow.svg: Added.
2011-04-21  Dirk Schulze  <krit@webkit.org>

        Reviewed by Nikolas Zimmermann.

        SVG feDropShadow implementation of SVG Filters 1.2
        https://bugs.webkit.org/show_bug.cgi?id=52513

        * MigrateHeaders.make:
2011-04-21  Dirk Schulze  <krit@webkit.org>

        Reviewed by Nikolas Zimmermann.

        SVG feDropShadow implementation of SVG Filters 1.2
        https://bugs.webkit.org/show_bug.cgi?id=52513

        This is the implementation of feDropShadow, a shorthand filter and a combination of feGaussianBlur,
        feOffset, feFlood and feComposite to create a drop shadow of an input effect.
        Creating this new filter effect makes it possible to optimize the often used workflow. ShadowBlur, with its
        fast blurring algorithm, is used to blur the shadow and composite operators are responsible for combining the
        source with different colored shadows.
        Shadow color and opacity can be set with the properties flood-color and flood-opacity.

        Tests: svg/dynamic-updates/SVGFEDropShadowElement-dom-dx-attr.html
               svg/dynamic-updates/SVGFEDropShadowElement-dom-dy-attr.html
               svg/dynamic-updates/SVGFEDropShadowElement-dom-in-attr.html
               svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-color-attr.html
               svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-opacity-attr.html
               svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr.html
               svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dx-prop.html
               svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dy-prop.html
               svg/dynamic-updates/SVGFEDropShadowElement-svgdom-in-prop.html
               svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-color-prop.html
               svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-opacity-prop.html
               svg/dynamic-updates/SVGFEDropShadowElement-svgdom-stdDeviation-prop.html
               svg/filters/feDropShadow.svg

        * Android.mk:
        * CMakeLists.txt:
        * DerivedSources.cpp:
        * DerivedSources.make:
        * GNUmakefile.list.am:
        * WebCore.exp.in:
        * WebCore.gypi:
        * WebCore.pro:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/objc/DOM.mm:
        (WebCore::createElementClassMap):
        * bindings/objc/DOMSVG.h:
        * page/DOMWindow.idl:
        * platform/graphics/ShadowBlur.cpp: Added missing copyright after r84410.
        * platform/graphics/ShadowBlur.h: Made blurLayerImage public.
        * platform/graphics/filters/FEDropShadow.cpp: Added.
        (WebCore::FEDropShadow::FEDropShadow):
        (WebCore::FEDropShadow::create):
        (WebCore::FEDropShadow::determineAbsolutePaintRect):
        (WebCore::FEDropShadow::apply):
        (WebCore::FEDropShadow::dump):
        (WebCore::FEDropShadow::externalRepresentation):
        * platform/graphics/filters/FEDropShadow.h: Added.
        (WebCore::FEDropShadow::stdDeviationX):
        (WebCore::FEDropShadow::setStdDeviationX):
        (WebCore::FEDropShadow::stdDeviationY):
        (WebCore::FEDropShadow::setStdDeviationY):
        (WebCore::FEDropShadow::dx):
        (WebCore::FEDropShadow::setDx):
        (WebCore::FEDropShadow::dy):
        (WebCore::FEDropShadow::setDy):
        (WebCore::FEDropShadow::shadowColor):
        (WebCore::FEDropShadow::setShadowColor):
        (WebCore::FEDropShadow::shadowOpacity):
        (WebCore::FEDropShadow::setShadowOpacity):
        * platform/graphics/filters/FEGaussianBlur.cpp:
        (WebCore::FEGaussianBlur::calculateKernelSize): Make kernel calculations accessible for feDropShadow.
        * platform/graphics/filters/FEGaussianBlur.h:
        * svg/SVGAllInOne.cpp:
        * svg/SVGFEDropShadowElement.cpp: Added.
        (WebCore::SVGFEDropShadowElement::SVGFEDropShadowElement):
        (WebCore::SVGFEDropShadowElement::create):
        (WebCore::SVGFEDropShadowElement::stdDeviationXIdentifier):
        (WebCore::SVGFEDropShadowElement::stdDeviationYIdentifier):
        (WebCore::SVGFEDropShadowElement::setStdDeviation):
        (WebCore::SVGFEDropShadowElement::parseMappedAttribute):
        (WebCore::SVGFEDropShadowElement::svgAttributeChanged):
        (WebCore::SVGFEDropShadowElement::synchronizeProperty):
        (WebCore::SVGFEDropShadowElement::build):
        * svg/SVGFEDropShadowElement.h: Added.
        * svg/SVGFEDropShadowElement.idl: Added.
        * svg/svgtags.in:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@84522 268f45cc-cd09-0410-ab3c-d52691b4dbfc

96 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-dx-attr-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-dx-attr-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-dy-attr-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-dy-attr-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-in-attr-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-in-attr-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-color-attr-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-color-attr-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-opacity-attr-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-opacity-attr-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dx-prop-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dx-prop-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dy-prop-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dy-prop-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-in-prop-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-in-prop-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-color-prop-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-color-prop-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-opacity-prop-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-opacity-prop-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-stdDeviation-prop-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-stdDeviation-prop-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/filters/feDropShadow-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/svg/filters/feDropShadow-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/filters/feDropShadow-expected.txt [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-dx-attr-expected.txt [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-dx-attr.html [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-dy-attr-expected.txt [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-dy-attr.html [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-in-attr-expected.txt [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-in-attr.html [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-color-attr-expected.txt [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-color-attr.html [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-opacity-attr-expected.txt [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-opacity-attr.html [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr-expected.txt [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr.html [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dx-prop-expected.txt [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dx-prop.html [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dy-prop-expected.txt [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dy-prop.html [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-in-prop-expected.txt [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-in-prop.html [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-color-prop-expected.txt [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-color-prop.html [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-opacity-prop-expected.txt [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-opacity-prop.html [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-stdDeviation-prop-expected.txt [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-stdDeviation-prop.html [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-numOctaves-prop.html
LayoutTests/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-seed-prop.html
LayoutTests/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-stitchTiles-prop.html
LayoutTests/svg/dynamic-updates/SVGFETurbulenceElement-svgdom-type-prop.html
LayoutTests/svg/dynamic-updates/script-tests/SVGFEDropShadowElement-dom-dx-attr.js [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/script-tests/SVGFEDropShadowElement-dom-dy-attr.js [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/script-tests/SVGFEDropShadowElement-dom-in-attr.js [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/script-tests/SVGFEDropShadowElement-dom-shadow-color-attr.js [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/script-tests/SVGFEDropShadowElement-dom-shadow-opacity-attr.js [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/script-tests/SVGFEDropShadowElement-dom-stdDeviation-attr.js [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/script-tests/SVGFEDropShadowElement-svgdom-dx-prop.js [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/script-tests/SVGFEDropShadowElement-svgdom-dy-prop.js [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/script-tests/SVGFEDropShadowElement-svgdom-in-prop.js [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/script-tests/SVGFEDropShadowElement-svgdom-shadow-color-prop.js [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/script-tests/SVGFEDropShadowElement-svgdom-shadow-opacity-prop.js [new file with mode: 0644]
LayoutTests/svg/dynamic-updates/script-tests/SVGFEDropShadowElement-svgdom-stdDeviation-prop.js [new file with mode: 0644]
LayoutTests/svg/filters/feDropShadow.svg [new file with mode: 0644]
Source/WebCore/Android.mk
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.cpp
Source/WebCore/DerivedSources.make
Source/WebCore/GNUmakefile.list.am
Source/WebCore/WebCore.exp.in
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.pro
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/objc/DOM.mm
Source/WebCore/bindings/objc/DOMSVG.h
Source/WebCore/page/DOMWindow.idl
Source/WebCore/platform/graphics/ShadowBlur.cpp
Source/WebCore/platform/graphics/ShadowBlur.h
Source/WebCore/platform/graphics/filters/FEDropShadow.cpp [new file with mode: 0644]
Source/WebCore/platform/graphics/filters/FEDropShadow.h [new file with mode: 0644]
Source/WebCore/platform/graphics/filters/FEGaussianBlur.cpp
Source/WebCore/platform/graphics/filters/FEGaussianBlur.h
Source/WebCore/svg/SVGAllInOne.cpp
Source/WebCore/svg/SVGFEDropShadowElement.cpp [new file with mode: 0644]
Source/WebCore/svg/SVGFEDropShadowElement.h [new file with mode: 0644]
Source/WebCore/svg/SVGFEDropShadowElement.idl [new file with mode: 0644]
Source/WebCore/svg/svgtags.in
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/MigrateHeaders.make

index 342f1e0..ca4b699 100644 (file)
@@ -1,3 +1,93 @@
+2011-04-21  Dirk Schulze  <krit@webkit.org>
+
+        Reviewed by Nikolas Zimmermann.
+
+        SVG feDropShadow implementation of SVG Filters 1.2
+        https://bugs.webkit.org/show_bug.cgi?id=52513
+
+        Added dynamic update tests for FEDropShadow as well as a basic pixel test.
+
+        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-dx-attr-expected.checksum: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-dx-attr-expected.png: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-dy-attr-expected.checksum: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-dy-attr-expected.png: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-in-attr-expected.checksum: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-in-attr-expected.png: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-color-attr-expected.checksum: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-color-attr-expected.png: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-opacity-attr-expected.checksum: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-opacity-attr-expected.png: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr-expected.checksum: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr-expected.png: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dx-prop-expected.checksum: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dx-prop-expected.png: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dy-prop-expected.checksum: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dy-prop-expected.png: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-in-prop-expected.checksum: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-in-prop-expected.png: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-color-prop-expected.checksum: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-color-prop-expected.png: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-opacity-prop-expected.checksum: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-opacity-prop-expected.png: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-stdDeviation-prop-expected.checksum: Added.
+        * platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-stdDeviation-prop-expected.png: Added.
+        * platform/mac/svg/filters/feDropShadow-expected.checksum: Added.
+        * platform/mac/svg/filters/feDropShadow-expected.png: Added.
+        * platform/mac/svg/filters/feDropShadow-expected.txt: Added.
+        * svg/dynamic-updates/SVGFEDropShadowElement-dom-dx-attr-expected.txt: Added.
+        * svg/dynamic-updates/SVGFEDropShadowElement-dom-dx-attr.html: Added.
+        * svg/dynamic-updates/SVGFEDropShadowElement-dom-dy-attr-expected.txt: Added.
+        * svg/dynamic-updates/SVGFEDropShadowElement-dom-dy-attr.html: Added.
+        * svg/dynamic-updates/SVGFEDropShadowElement-dom-in-attr-expected.txt: Added.
+        * svg/dynamic-updates/SVGFEDropShadowElement-dom-in-attr.html: Added.
+        * svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-color-attr-expected.txt: Added.
+        * svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-color-attr.html: Added.
+        * svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-opacity-attr-expected.txt: Added.
+        * svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-opacity-attr.html: Added.
+        * svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr-expected.txt: Added.
+        * svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr.html: Added.
+        * svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dx-prop-expected.txt: Added.
+        * svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dx-prop.html: Added.
+        * svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dy-prop-expected.txt: Added.
+        * svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dy-prop.html: Added.
+        * svg/dynamic-updates/SVGFEDropShadowElement-svgdom-in-prop-expected.txt: Added.
+        * svg/dynamic-updates/SVGFEDropShadowElement-svgdom-in-prop.html: Added.
+        * svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-color-prop-expected.txt: Added.
+        * svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-color-prop.html: Added.
+        * svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-opacity-prop-expected.txt: Added.
+        * svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-opacity-prop.html: Added.
+        * svg/dynamic-updates/SVGFEDropShadowElement-svgdom-stdDeviation-prop-expected.txt: Added.
+        * svg/dynamic-updates/SVGFEDropShadowElement-svgdom-stdDeviation-prop.html: Added.
+        * svg/dynamic-updates/SVGFETurbulenceElement-svgdom-numOctaves-prop.html:
+        * svg/dynamic-updates/SVGFETurbulenceElement-svgdom-seed-prop.html:
+        * svg/dynamic-updates/SVGFETurbulenceElement-svgdom-stitchTiles-prop.html:
+        * svg/dynamic-updates/SVGFETurbulenceElement-svgdom-type-prop.html:
+        * svg/dynamic-updates/script-tests/SVGFEDropShadowElement-dom-dx-attr.js: Added.
+        (executeTest):
+        * svg/dynamic-updates/script-tests/SVGFEDropShadowElement-dom-dy-attr.js: Added.
+        (executeTest):
+        * svg/dynamic-updates/script-tests/SVGFEDropShadowElement-dom-in-attr.js: Added.
+        (executeTest):
+        * svg/dynamic-updates/script-tests/SVGFEDropShadowElement-dom-shadow-color-attr.js: Added.
+        (executeTest):
+        * svg/dynamic-updates/script-tests/SVGFEDropShadowElement-dom-shadow-opacity-attr.js: Added.
+        (executeTest):
+        * svg/dynamic-updates/script-tests/SVGFEDropShadowElement-dom-stdDeviation-attr.js: Added.
+        (executeTest):
+        * svg/dynamic-updates/script-tests/SVGFEDropShadowElement-svgdom-dx-prop.js: Added.
+        (executeTest):
+        * svg/dynamic-updates/script-tests/SVGFEDropShadowElement-svgdom-dy-prop.js: Added.
+        (executeTest):
+        * svg/dynamic-updates/script-tests/SVGFEDropShadowElement-svgdom-in-prop.js: Added.
+        (executeTest):
+        * svg/dynamic-updates/script-tests/SVGFEDropShadowElement-svgdom-shadow-color-prop.js: Added.
+        (executeTest):
+        * svg/dynamic-updates/script-tests/SVGFEDropShadowElement-svgdom-shadow-opacity-prop.js: Added.
+        (executeTest):
+        * svg/dynamic-updates/script-tests/SVGFEDropShadowElement-svgdom-stdDeviation-prop.js: Added.
+        (executeTest):
+        * svg/filters/feDropShadow.svg: Added.
+
 2011-04-21  MORITA Hajime  <morrita@google.com>
 
         Unreviewed expectations update following r84511.
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-dx-attr-expected.checksum b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-dx-attr-expected.checksum
new file mode 100644 (file)
index 0000000..1b0b32b
--- /dev/null
@@ -0,0 +1 @@
+26560eeb38c7431890363a1a9488c30e
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-dx-attr-expected.png b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-dx-attr-expected.png
new file mode 100644 (file)
index 0000000..8e4b45d
Binary files /dev/null and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-dx-attr-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-dy-attr-expected.checksum b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-dy-attr-expected.checksum
new file mode 100644 (file)
index 0000000..9fdd1ee
--- /dev/null
@@ -0,0 +1 @@
+f2f0e48bf63ef0f5623fa1f5176a1c95
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-dy-attr-expected.png b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-dy-attr-expected.png
new file mode 100644 (file)
index 0000000..44fee4b
Binary files /dev/null and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-dy-attr-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-in-attr-expected.checksum b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-in-attr-expected.checksum
new file mode 100644 (file)
index 0000000..7b955bc
--- /dev/null
@@ -0,0 +1 @@
+0984255cc2e589ef3ecff7f036cebd8e
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-in-attr-expected.png b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-in-attr-expected.png
new file mode 100644 (file)
index 0000000..b07e621
Binary files /dev/null and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-in-attr-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-color-attr-expected.checksum b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-color-attr-expected.checksum
new file mode 100644 (file)
index 0000000..fd9f3f9
--- /dev/null
@@ -0,0 +1 @@
+137837a6af78bbd9ff397899c5870b78
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-color-attr-expected.png b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-color-attr-expected.png
new file mode 100644 (file)
index 0000000..c34b257
Binary files /dev/null and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-color-attr-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-opacity-attr-expected.checksum b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-opacity-attr-expected.checksum
new file mode 100644 (file)
index 0000000..fdb5683
--- /dev/null
@@ -0,0 +1 @@
+8121570b277a5b67e7a27cb99763ba94
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-opacity-attr-expected.png b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-opacity-attr-expected.png
new file mode 100644 (file)
index 0000000..31a7a32
Binary files /dev/null and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-opacity-attr-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr-expected.checksum b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr-expected.checksum
new file mode 100644 (file)
index 0000000..88e84a5
--- /dev/null
@@ -0,0 +1 @@
+cf8b6ba1f761825a9cb8138163064e3d
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr-expected.png b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr-expected.png
new file mode 100644 (file)
index 0000000..cde1158
Binary files /dev/null and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dx-prop-expected.checksum b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dx-prop-expected.checksum
new file mode 100644 (file)
index 0000000..2435f6a
--- /dev/null
@@ -0,0 +1 @@
+119adf4afc7a57b91e919b25bc82c2f4
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dx-prop-expected.png b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dx-prop-expected.png
new file mode 100644 (file)
index 0000000..9aa335a
Binary files /dev/null and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dx-prop-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dy-prop-expected.checksum b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dy-prop-expected.checksum
new file mode 100644 (file)
index 0000000..66530ee
--- /dev/null
@@ -0,0 +1 @@
+cc2a0d1af5a86d759fce58980444852f
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dy-prop-expected.png b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dy-prop-expected.png
new file mode 100644 (file)
index 0000000..b78a62a
Binary files /dev/null and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dy-prop-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-in-prop-expected.checksum b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-in-prop-expected.checksum
new file mode 100644 (file)
index 0000000..b5a7d40
--- /dev/null
@@ -0,0 +1 @@
+7804275eafcc478ac9f47e674ed94bf5
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-in-prop-expected.png b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-in-prop-expected.png
new file mode 100644 (file)
index 0000000..b715511
Binary files /dev/null and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-in-prop-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-color-prop-expected.checksum b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-color-prop-expected.checksum
new file mode 100644 (file)
index 0000000..dacd664
--- /dev/null
@@ -0,0 +1 @@
+dfaf4e23731728fc609fa3030e7909fd
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-color-prop-expected.png b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-color-prop-expected.png
new file mode 100644 (file)
index 0000000..d0cf79e
Binary files /dev/null and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-color-prop-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-opacity-prop-expected.checksum b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-opacity-prop-expected.checksum
new file mode 100644 (file)
index 0000000..eb9ad7b
--- /dev/null
@@ -0,0 +1 @@
+640f1ce1da32f4321765c2a2d1761be1
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-opacity-prop-expected.png b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-opacity-prop-expected.png
new file mode 100644 (file)
index 0000000..4f688d3
Binary files /dev/null and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-opacity-prop-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-stdDeviation-prop-expected.checksum b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-stdDeviation-prop-expected.checksum
new file mode 100644 (file)
index 0000000..e85d628
--- /dev/null
@@ -0,0 +1 @@
+e98f6f62fc9116f07a392354a1be82f7
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-stdDeviation-prop-expected.png b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-stdDeviation-prop-expected.png
new file mode 100644 (file)
index 0000000..6c8383c
Binary files /dev/null and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-stdDeviation-prop-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/filters/feDropShadow-expected.checksum b/LayoutTests/platform/mac/svg/filters/feDropShadow-expected.checksum
new file mode 100644 (file)
index 0000000..533131a
--- /dev/null
@@ -0,0 +1 @@
+720ce145151ba726220f99b36e67908a
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/filters/feDropShadow-expected.png b/LayoutTests/platform/mac/svg/filters/feDropShadow-expected.png
new file mode 100644 (file)
index 0000000..ca63109
Binary files /dev/null and b/LayoutTests/platform/mac/svg/filters/feDropShadow-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/filters/feDropShadow-expected.txt b/LayoutTests/platform/mac/svg/filters/feDropShadow-expected.txt
new file mode 100644 (file)
index 0000000..63ec1da
--- /dev/null
@@ -0,0 +1,45 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderSVGRoot {svg} at (0,0) size 684x334
+    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+      RenderSVGResourceFilter {filter} [id="drop-shadow-1"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feDropShadow stdDeviation="2.00, 2.00" dx="2.00" dy="2.00" flood-color="#008000" flood-opacity="1.00]
+          [SourceGraphic]
+      RenderSVGResourceFilter {filter} [id="drop-shadow-2"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feDropShadow stdDeviation="0.00, 0.00" dx="0.00" dy="0.00" flood-color="#008000" flood-opacity="1.00]
+          [SourceGraphic]
+      RenderSVGResourceFilter {filter} [id="drop-shadow-3"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feDropShadow stdDeviation="0.00, 10.00" dx="5.00" dy="5.00" flood-color="#008000" flood-opacity="1.00]
+          [SourceGraphic]
+      RenderSVGResourceFilter {filter} [id="drop-shadow-4"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feDropShadow stdDeviation="10.00, 0.00" dx="5.00" dy="5.00" flood-color="#008000" flood-opacity="1.00]
+          [SourceGraphic]
+      RenderSVGResourceFilter {filter} [id="drop-shadow-5"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feDropShadow stdDeviation="10.00, 10.00" dx="5.00" dy="5.00" flood-color="#008000" flood-opacity="1.00]
+          [SourceGraphic]
+      RenderSVGResourceFilter {filter} [id="drop-shadow-6"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feDropShadow stdDeviation="10.00, 10.00" dx="-5.00" dy="-5.00" flood-color="#008000" flood-opacity="1.00]
+          [SourceGraphic]
+      RenderSVGResourceFilter {filter} [id="drop-shadow-7"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feDropShadow stdDeviation="128.00, 128.00" dx="0.00" dy="0.00" flood-color="#008000" flood-opacity="1.00]
+          [SourceGraphic]
+      RenderSVGResourceFilter {filter} [id="drop-shadow-8"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feDropShadow stdDeviation="10.00, 10.00" dx="5.00" dy="5.00" flood-color="#008000" flood-opacity="0.50]
+          [SourceGraphic]
+    RenderSVGPath {circle} at (0,0) size 159x159 [stroke={[type=SOLID] [color=#0000FF] [stroke width=5.00]}] [fill={[type=SOLID] [color=#FFFF00]}] [cx=75.00] [cy=75.00] [r=70.00]
+      [filter="drop-shadow-1"] RenderSVGResourceFilter {filter} at (-9,-9) size 168x168
+    RenderSVGPath {circle} at (166,0) size 168x159 [stroke={[type=SOLID] [color=#0000FF] [stroke width=5.00]}] [fill={[type=SOLID] [color=#FFFF00]}] [cx=250.00] [cy=75.00] [r=70.00]
+      [filter="drop-shadow-2"] RenderSVGResourceFilter {filter} at (166,-9) size 168x168
+    RenderSVGPath {circle} at (341,0) size 168x159 [stroke={[type=SOLID] [color=#0000FF] [stroke width=5.00]}] [fill={[type=SOLID] [color=#FFFF00]}] [cx=425.00] [cy=75.00] [r=70.00]
+      [filter="drop-shadow-3"] RenderSVGResourceFilter {filter} at (341,-9) size 168x168
+    RenderSVGPath {circle} at (516,0) size 168x159 [stroke={[type=SOLID] [color=#0000FF] [stroke width=5.00]}] [fill={[type=SOLID] [color=#FFFF00]}] [cx=600.00] [cy=75.00] [r=70.00]
+      [filter="drop-shadow-4"] RenderSVGResourceFilter {filter} at (516,-9) size 168x168
+    RenderSVGPath {circle} at (0,166) size 159x168 [stroke={[type=SOLID] [color=#0000FF] [stroke width=5.00]}] [fill={[type=SOLID] [color=#FFFF00]}] [cx=75.00] [cy=250.00] [r=70.00]
+      [filter="drop-shadow-5"] RenderSVGResourceFilter {filter} at (-9,166) size 168x168
+    RenderSVGPath {circle} at (166,166) size 168x168 [stroke={[type=SOLID] [color=#0000FF] [stroke width=5.00]}] [fill={[type=SOLID] [color=#FFFF00]}] [cx=250.00] [cy=250.00] [r=70.00]
+      [filter="drop-shadow-6"] RenderSVGResourceFilter {filter} at (166,166) size 168x168
+    RenderSVGPath {circle} at (341,166) size 168x168 [stroke={[type=SOLID] [color=#0000FF] [stroke width=5.00]}] [fill={[type=SOLID] [color=#FFFF00]}] [cx=425.00] [cy=250.00] [r=70.00]
+      [filter="drop-shadow-7"] RenderSVGResourceFilter {filter} at (341,166) size 168x168
+    RenderSVGPath {circle} at (516,166) size 168x168 [stroke={[type=SOLID] [color=#0000FF] [stroke width=5.00]}] [fill={[type=SOLID] [color=#FFFF00]}] [cx=600.00] [cy=250.00] [r=70.00]
+      [filter="drop-shadow-8"] RenderSVGResourceFilter {filter} at (516,166) size 168x168
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-dx-attr-expected.txt b/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-dx-attr-expected.txt
new file mode 100644 (file)
index 0000000..aa49990
--- /dev/null
@@ -0,0 +1,13 @@
+SVG 1.1 dynamic update tests
+
+Tests dynamic updates of the 'dx' attribute of the SVGFEDropShadowElement object
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS dropShadowElement.getAttribute('dx') is "0"
+PASS dropShadowElement.getAttribute('dx') is "10"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-dx-attr.html b/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-dx-attr.html
new file mode 100644 (file)
index 0000000..85581b5
--- /dev/null
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="resources/SVGTestCase.js"></script>
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<h1>SVG 1.1 dynamic update tests</h1>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/SVGFEDropShadowElement-dom-dx-attr.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-dy-attr-expected.txt b/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-dy-attr-expected.txt
new file mode 100644 (file)
index 0000000..d1cc164
--- /dev/null
@@ -0,0 +1,13 @@
+SVG 1.1 dynamic update tests
+
+Tests dynamic updates of the 'dy' attribute of the SVGFEDropShadowElement object
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS dropShadowElement.getAttribute('dy') is "0"
+PASS dropShadowElement.getAttribute('dy') is "10"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-dy-attr.html b/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-dy-attr.html
new file mode 100644 (file)
index 0000000..4909edc
--- /dev/null
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="resources/SVGTestCase.js"></script>
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<h1>SVG 1.1 dynamic update tests</h1>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/SVGFEDropShadowElement-dom-dy-attr.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-in-attr-expected.txt b/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-in-attr-expected.txt
new file mode 100644 (file)
index 0000000..a9612e5
--- /dev/null
@@ -0,0 +1,13 @@
+SVG 1.1 dynamic update tests
+
+Tests dynamic updates of the 'in' attribute of the SVGFEDropShadowElement object
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS dropShadowElement.getAttribute('in') is "SourceAlpha"
+PASS dropShadowElement.getAttribute('in') is "SourceGraphic"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-in-attr.html b/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-in-attr.html
new file mode 100644 (file)
index 0000000..911d129
--- /dev/null
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="resources/SVGTestCase.js"></script>
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<h1>SVG 1.1 dynamic update tests</h1>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/SVGFEDropShadowElement-dom-in-attr.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-color-attr-expected.txt b/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-color-attr-expected.txt
new file mode 100644 (file)
index 0000000..fc0264b
--- /dev/null
@@ -0,0 +1,13 @@
+SVG 1.1 dynamic update tests
+
+Tests dynamic updates of the 'flood-color' attribute of the SVGFEDropShadowElement object
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS dropShadowElement.getAttribute('flood-color') is "black"
+PASS dropShadowElement.getAttribute('flood-color') is "green"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-color-attr.html b/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-color-attr.html
new file mode 100644 (file)
index 0000000..9a586d5
--- /dev/null
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="resources/SVGTestCase.js"></script>
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<h1>SVG 1.1 dynamic update tests</h1>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/SVGFEDropShadowElement-dom-shadow-color-attr.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-opacity-attr-expected.txt b/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-opacity-attr-expected.txt
new file mode 100644 (file)
index 0000000..6d7f5c2
--- /dev/null
@@ -0,0 +1,13 @@
+SVG 1.1 dynamic update tests
+
+Tests dynamic updates of the 'flood-opacity' attribute of the SVGFEDropShadowElement object
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS dropShadowElement.getAttribute('flood-opacity') is "0"
+PASS dropShadowElement.getAttribute('flood-opacity') is "0.5"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-opacity-attr.html b/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-opacity-attr.html
new file mode 100644 (file)
index 0000000..d1d1663
--- /dev/null
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="resources/SVGTestCase.js"></script>
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<h1>SVG 1.1 dynamic update tests</h1>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/SVGFEDropShadowElement-dom-shadow-opacity-attr.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr-expected.txt b/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr-expected.txt
new file mode 100644 (file)
index 0000000..82adc1b
--- /dev/null
@@ -0,0 +1,13 @@
+SVG 1.1 dynamic update tests
+
+Tests dynamic updates of the 'stdDeviation' attribute of the SVGFEDropShadowElement object
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS dropShadowElement.getAttribute('stdDeviation') is "0"
+PASS dropShadowElement.getAttribute('stdDeviation') is "10"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr.html b/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr.html
new file mode 100644 (file)
index 0000000..55376d4
--- /dev/null
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="resources/SVGTestCase.js"></script>
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<h1>SVG 1.1 dynamic update tests</h1>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/SVGFEDropShadowElement-dom-stdDeviation-attr.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dx-prop-expected.txt b/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dx-prop-expected.txt
new file mode 100644 (file)
index 0000000..1e187ec
--- /dev/null
@@ -0,0 +1,13 @@
+SVG 1.1 dynamic update tests
+
+Tests dynamic updates of the 'dx' property of the SVGFEDropShadowElement object
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS dropShadowElement.dx.baseVal is 0
+PASS dropShadowElement.dx.baseVal is 10
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dx-prop.html b/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dx-prop.html
new file mode 100644 (file)
index 0000000..1243d77
--- /dev/null
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="resources/SVGTestCase.js"></script>
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<h1>SVG 1.1 dynamic update tests</h1>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/SVGFEDropShadowElement-svgdom-dx-prop.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dy-prop-expected.txt b/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dy-prop-expected.txt
new file mode 100644 (file)
index 0000000..d6209c5
--- /dev/null
@@ -0,0 +1,13 @@
+SVG 1.1 dynamic update tests
+
+Tests dynamic updates of the 'dy' property of the SVGFEDropShadowElement object
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS dropShadowElement.dy.baseVal is 0
+PASS dropShadowElement.dy.baseVal is 10
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dy-prop.html b/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dy-prop.html
new file mode 100644 (file)
index 0000000..30ad293
--- /dev/null
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="resources/SVGTestCase.js"></script>
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<h1>SVG 1.1 dynamic update tests</h1>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/SVGFEDropShadowElement-svgdom-dy-prop.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-in-prop-expected.txt b/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-in-prop-expected.txt
new file mode 100644 (file)
index 0000000..1836467
--- /dev/null
@@ -0,0 +1,13 @@
+SVG 1.1 dynamic update tests
+
+Tests dynamic updates of the 'in' property of the SVGFEOffsetElement object
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS dropShadowElement.in1.baseVal is "SourceAlpha"
+PASS dropShadowElement.in1.baseVal is "SourceGraphic"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-in-prop.html b/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-in-prop.html
new file mode 100644 (file)
index 0000000..d9f2a3d
--- /dev/null
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="resources/SVGTestCase.js"></script>
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<h1>SVG 1.1 dynamic update tests</h1>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/SVGFEDropShadowElement-svgdom-in-prop.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-color-prop-expected.txt b/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-color-prop-expected.txt
new file mode 100644 (file)
index 0000000..50ba752
--- /dev/null
@@ -0,0 +1,13 @@
+SVG 1.1 dynamic update tests
+
+Tests dynamic updates of the 'flood-color' property of the SVGFEFloodElement object
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS document.defaultView.getComputedStyle(dropShadowElement).getPropertyValue('flood-color') is "rgb(0, 0, 0)"
+PASS document.defaultView.getComputedStyle(dropShadowElement).getPropertyValue('flood-color') is "rgb(0, 128, 0)"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-color-prop.html b/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-color-prop.html
new file mode 100644 (file)
index 0000000..04d9fc2
--- /dev/null
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="resources/SVGTestCase.js"></script>
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<h1>SVG 1.1 dynamic update tests</h1>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/SVGFEDropShadowElement-svgdom-shadow-color-prop.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-opacity-prop-expected.txt b/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-opacity-prop-expected.txt
new file mode 100644 (file)
index 0000000..c75d893
--- /dev/null
@@ -0,0 +1,13 @@
+SVG 1.1 dynamic update tests
+
+Tests dynamic updates of the 'flood-opacity' property of the SVGFEDropShadowElement object
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS parseFloat(document.defaultView.getComputedStyle(dropShadowElement).getPropertyValue('flood-opacity')).toFixed(1) is "0.0"
+PASS parseFloat(document.defaultView.getComputedStyle(dropShadowElement).getPropertyValue('flood-opacity')).toFixed(1) is "0.5"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-opacity-prop.html b/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-opacity-prop.html
new file mode 100644 (file)
index 0000000..01dc34a
--- /dev/null
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="resources/SVGTestCase.js"></script>
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<h1>SVG 1.1 dynamic update tests</h1>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/SVGFEDropShadowElement-svgdom-shadow-opacity-prop.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-stdDeviation-prop-expected.txt b/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-stdDeviation-prop-expected.txt
new file mode 100644 (file)
index 0000000..7b12291
--- /dev/null
@@ -0,0 +1,15 @@
+SVG 1.1 dynamic update tests
+
+Tests dynamic updates of the 'stdDeviation' property of the SVGFEDropShadowElement object
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS dropShadowElement.stdDeviationX.baseVal is 0
+PASS dropShadowElement.stdDeviationY.baseVal is 0
+PASS dropShadowElement.stdDeviationX.baseVal is 10
+PASS dropShadowElement.stdDeviationY.baseVal is 10
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-stdDeviation-prop.html b/LayoutTests/svg/dynamic-updates/SVGFEDropShadowElement-svgdom-stdDeviation-prop.html
new file mode 100644 (file)
index 0000000..d3a1ed5
--- /dev/null
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="resources/SVGTestCase.js"></script>
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<h1>SVG 1.1 dynamic update tests</h1>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/SVGFEDropShadowElement-svgdom-stdDeviation-prop.js"></script>
+</body>
+</html>
index eb42bfb..2707b6c 100644 (file)
@@ -11,4 +11,4 @@
 <div id="console"></div>
 <script src="script-tests/SVGFETurbulenceElement-svgdom-numOctaves-prop.js"></script>
 </body>
-</html>
\ No newline at end of file
+</html>
index e426722..6f3abec 100644 (file)
@@ -11,4 +11,4 @@
 <div id="console"></div>
 <script src="script-tests/SVGFETurbulenceElement-svgdom-seed-prop.js"></script>
 </body>
-</html>
\ No newline at end of file
+</html>
index 27f9f9e..0691318 100644 (file)
@@ -11,4 +11,4 @@
 <div id="console"></div>
 <script src="script-tests/SVGFETurbulenceElement-svgdom-type-prop.js"></script>
 </body>
-</html>
\ No newline at end of file
+</html>
diff --git a/LayoutTests/svg/dynamic-updates/script-tests/SVGFEDropShadowElement-dom-dx-attr.js b/LayoutTests/svg/dynamic-updates/script-tests/SVGFEDropShadowElement-dom-dx-attr.js
new file mode 100644 (file)
index 0000000..43e3ddb
--- /dev/null
@@ -0,0 +1,44 @@
+// [Name] SVGFEDropShadowElement-dom-dx-attr.js
+// [Expected rendering result] A green circle in the center of the image and a black shadow with offset - and a series of PASS messages
+
+description("Tests dynamic updates of the 'dx' attribute of the SVGFEDropShadowElement object")
+createSVGTestCase();
+
+var dropShadowElement = createSVGElement("feDropShadow");
+dropShadowElement.setAttribute("dx", "0");
+dropShadowElement.setAttribute("dy", "10");
+
+var filterElement = createSVGElement("filter");
+filterElement.setAttribute("id", "myFilter");
+filterElement.setAttribute("filterUnits", "userSpaceOnUse");
+filterElement.setAttribute("x", "0");
+filterElement.setAttribute("y", "0");
+filterElement.setAttribute("width", "200");
+filterElement.setAttribute("height", "200");
+filterElement.appendChild(dropShadowElement);
+
+var defsElement = createSVGElement("defs");
+defsElement.appendChild(filterElement);
+
+rootSVGElement.appendChild(defsElement);
+
+var circleElement = createSVGElement("circle");
+circleElement.setAttribute("cx", "100");
+circleElement.setAttribute("cy", "100");
+circleElement.setAttribute("r", "70");
+circleElement.setAttribute("fill", "green");
+circleElement.setAttribute("filter", "url(#myFilter)");
+rootSVGElement.appendChild(circleElement);
+
+shouldBeEqualToString("dropShadowElement.getAttribute('dx')", "0");
+
+function executeTest() {
+    dropShadowElement.setAttribute("dx", "10");
+    shouldBeEqualToString("dropShadowElement.getAttribute('dx')", "10");
+
+    completeTest();
+}
+
+startTest(circleElement, 100, 100);
+
+var successfullyParsed = true;
diff --git a/LayoutTests/svg/dynamic-updates/script-tests/SVGFEDropShadowElement-dom-dy-attr.js b/LayoutTests/svg/dynamic-updates/script-tests/SVGFEDropShadowElement-dom-dy-attr.js
new file mode 100644 (file)
index 0000000..0d090a8
--- /dev/null
@@ -0,0 +1,44 @@
+// [Name] SVGFEDropShadowElement-dom-dy-attr.js
+// [Expected rendering result] A green circle in the center of the image and a black shadow with offset - and a series of PASS messages
+
+description("Tests dynamic updates of the 'dy' attribute of the SVGFEDropShadowElement object")
+createSVGTestCase();
+
+var dropShadowElement = createSVGElement("feDropShadow");
+dropShadowElement.setAttribute("dx", "10");
+dropShadowElement.setAttribute("dy", "0");
+
+var filterElement = createSVGElement("filter");
+filterElement.setAttribute("id", "myFilter");
+filterElement.setAttribute("filterUnits", "userSpaceOnUse");
+filterElement.setAttribute("x", "0");
+filterElement.setAttribute("y", "0");
+filterElement.setAttribute("width", "200");
+filterElement.setAttribute("height", "200");
+filterElement.appendChild(dropShadowElement);
+
+var defsElement = createSVGElement("defs");
+defsElement.appendChild(filterElement);
+
+rootSVGElement.appendChild(defsElement);
+
+var circleElement = createSVGElement("circle");
+circleElement.setAttribute("cx", "100");
+circleElement.setAttribute("cy", "100");
+circleElement.setAttribute("r", "70");
+circleElement.setAttribute("fill", "green");
+circleElement.setAttribute("filter", "url(#myFilter)");
+rootSVGElement.appendChild(circleElement);
+
+shouldBeEqualToString("dropShadowElement.getAttribute('dy')", "0");
+
+function executeTest() {
+    dropShadowElement.setAttribute("dy", "10");
+    shouldBeEqualToString("dropShadowElement.getAttribute('dy')", "10");
+
+    completeTest();
+}
+
+startTest(circleElement, 100, 100);
+
+var successfullyParsed = true;
diff --git a/LayoutTests/svg/dynamic-updates/script-tests/SVGFEDropShadowElement-dom-in-attr.js b/LayoutTests/svg/dynamic-updates/script-tests/SVGFEDropShadowElement-dom-in-attr.js
new file mode 100644 (file)
index 0000000..9cc2982
--- /dev/null
@@ -0,0 +1,45 @@
+// [Name] SVGFEDropShadowElement-dom-in-attr.js
+// [Expected rendering result] A green circle in the center of the image - and a series of PASS messages
+
+description("Tests dynamic updates of the 'in' attribute of the SVGFEDropShadowElement object")
+createSVGTestCase();
+
+var dropShadowElement = createSVGElement("feDropShadow");
+dropShadowElement.setAttribute("in", "SourceAlpha");
+dropShadowElement.setAttribute("dx", "10");
+dropShadowElement.setAttribute("dy", "10");
+
+var filterElement = createSVGElement("filter");
+filterElement.setAttribute("id", "myFilter");
+filterElement.setAttribute("filterUnits", "userSpaceOnUse");
+filterElement.setAttribute("x", "0");
+filterElement.setAttribute("y", "0");
+filterElement.setAttribute("width", "200");
+filterElement.setAttribute("height", "200");
+filterElement.appendChild(dropShadowElement);
+
+var defsElement = createSVGElement("defs");
+defsElement.appendChild(filterElement);
+
+rootSVGElement.appendChild(defsElement);
+
+var circleElement = createSVGElement("circle");
+circleElement.setAttribute("cx", "100");
+circleElement.setAttribute("cy", "100");
+circleElement.setAttribute("r", "70");
+circleElement.setAttribute("fill", "green");
+circleElement.setAttribute("filter", "url(#myFilter)");
+rootSVGElement.appendChild(circleElement);
+
+shouldBeEqualToString("dropShadowElement.getAttribute('in')", "SourceAlpha");
+
+function executeTest() {
+    dropShadowElement.setAttribute("in", "SourceGraphic");
+    shouldBeEqualToString("dropShadowElement.getAttribute('in')", "SourceGraphic");
+
+    completeTest();
+}
+
+startTest(circleElement, 100, 100);
+
+var successfullyParsed = true;
diff --git a/LayoutTests/svg/dynamic-updates/script-tests/SVGFEDropShadowElement-dom-shadow-color-attr.js b/LayoutTests/svg/dynamic-updates/script-tests/SVGFEDropShadowElement-dom-shadow-color-attr.js
new file mode 100644 (file)
index 0000000..4f8f0cf
--- /dev/null
@@ -0,0 +1,46 @@
+// [Name] SVGFEDropShadowElement-dom-shadow-color-attr.js
+// [Expected rendering result] A green circle with a green shadow - and a series of PASS messages
+
+description("Tests dynamic updates of the 'flood-color' attribute of the SVGFEDropShadowElement object")
+createSVGTestCase();
+
+var dropShadowElement = createSVGElement("feDropShadow");
+dropShadowElement.setAttribute("dx", "10");
+dropShadowElement.setAttribute("dy", "10");
+dropShadowElement.setAttribute("stdDeviation", "0");
+dropShadowElement.setAttribute("flood-color", "black");
+
+var filterElement = createSVGElement("filter");
+filterElement.setAttribute("id", "myFilter");
+filterElement.setAttribute("filterUnits", "userSpaceOnUse");
+filterElement.setAttribute("x", "0");
+filterElement.setAttribute("y", "0");
+filterElement.setAttribute("width", "200");
+filterElement.setAttribute("height", "200");
+filterElement.appendChild(dropShadowElement);
+
+var defsElement = createSVGElement("defs");
+defsElement.appendChild(filterElement);
+
+rootSVGElement.appendChild(defsElement);
+
+var circleElement = createSVGElement("circle");
+circleElement.setAttribute("cx", "100");
+circleElement.setAttribute("cy", "100");
+circleElement.setAttribute("r", "70");
+circleElement.setAttribute("fill", "green");
+circleElement.setAttribute("filter", "url(#myFilter)");
+rootSVGElement.appendChild(circleElement);
+
+shouldBeEqualToString("dropShadowElement.getAttribute('flood-color')", "black");
+
+function executeTest() {
+    dropShadowElement.setAttribute("flood-color", "green");
+    shouldBeEqualToString("dropShadowElement.getAttribute('flood-color')", "green");
+
+    completeTest();
+}
+
+startTest(circleElement, 100, 100);
+
+var successfullyParsed = true;
diff --git a/LayoutTests/svg/dynamic-updates/script-tests/SVGFEDropShadowElement-dom-shadow-opacity-attr.js b/LayoutTests/svg/dynamic-updates/script-tests/SVGFEDropShadowElement-dom-shadow-opacity-attr.js
new file mode 100644 (file)
index 0000000..9348e7e
--- /dev/null
@@ -0,0 +1,46 @@
+// [Name] SVGFEDropShadowElement-dom-shadow-color-attr.js
+// [Expected rendering result] A green circle with a half transparent black shadow - and a series of PASS messages
+
+description("Tests dynamic updates of the 'flood-opacity' attribute of the SVGFEDropShadowElement object")
+createSVGTestCase();
+
+var dropShadowElement = createSVGElement("feDropShadow");
+dropShadowElement.setAttribute("dx", "10");
+dropShadowElement.setAttribute("dy", "10");
+dropShadowElement.setAttribute("stdDeviation", "0");
+dropShadowElement.setAttribute("flood-opacity", "0");
+
+var filterElement = createSVGElement("filter");
+filterElement.setAttribute("id", "myFilter");
+filterElement.setAttribute("filterUnits", "userSpaceOnUse");
+filterElement.setAttribute("x", "0");
+filterElement.setAttribute("y", "0");
+filterElement.setAttribute("width", "200");
+filterElement.setAttribute("height", "200");
+filterElement.appendChild(dropShadowElement);
+
+var defsElement = createSVGElement("defs");
+defsElement.appendChild(filterElement);
+
+rootSVGElement.appendChild(defsElement);
+
+var circleElement = createSVGElement("circle");
+circleElement.setAttribute("cx", "100");
+circleElement.setAttribute("cy", "100");
+circleElement.setAttribute("r", "70");
+circleElement.setAttribute("fill", "green");
+circleElement.setAttribute("filter", "url(#myFilter)");
+rootSVGElement.appendChild(circleElement);
+
+shouldBeEqualToString("dropShadowElement.getAttribute('flood-opacity')", "0");
+
+function executeTest() {
+    dropShadowElement.setAttribute("flood-opacity", "0.5");
+    shouldBeEqualToString("dropShadowElement.getAttribute('flood-opacity')", "0.5");
+
+    completeTest();
+}
+
+startTest(circleElement, 100, 100);
+
+var successfullyParsed = true;
diff --git a/LayoutTests/svg/dynamic-updates/script-tests/SVGFEDropShadowElement-dom-stdDeviation-attr.js b/LayoutTests/svg/dynamic-updates/script-tests/SVGFEDropShadowElement-dom-stdDeviation-attr.js
new file mode 100644 (file)
index 0000000..a018825
--- /dev/null
@@ -0,0 +1,45 @@
+// [Name] SVGFEDropShadowElement-dom-stdDeviation-attr.js
+// [Expected rendering result] A simple circle with a black shadow - and a series of PASS messages
+
+description("Tests dynamic updates of the 'stdDeviation' attribute of the SVGFEDropShadowElement object")
+createSVGTestCase();
+
+var dropShadowElement = createSVGElement("feDropShadow");
+dropShadowElement.setAttribute("stdDeviation", "0");
+dropShadowElement.setAttribute("dx", "0");
+dropShadowElement.setAttribute("dy", "0");
+
+var filterElement = createSVGElement("filter");
+filterElement.setAttribute("id", "myFilter");
+filterElement.setAttribute("filterUnits", "userSpaceOnUse");
+filterElement.setAttribute("x", "0");
+filterElement.setAttribute("y", "0");
+filterElement.setAttribute("width", "200");
+filterElement.setAttribute("height", "200");
+filterElement.appendChild(dropShadowElement);
+
+var defsElement = createSVGElement("defs");
+defsElement.appendChild(filterElement);
+
+rootSVGElement.appendChild(defsElement);
+
+var circleElement = createSVGElement("circle");
+circleElement.setAttribute("cx", "100");
+circleElement.setAttribute("cy", "100");
+circleElement.setAttribute("r", "70");
+circleElement.setAttribute("fill", "green");
+circleElement.setAttribute("filter", "url(#myFilter)");
+rootSVGElement.appendChild(circleElement);
+
+shouldBeEqualToString("dropShadowElement.getAttribute('stdDeviation')", "0");
+
+function executeTest() {
+    dropShadowElement.setAttribute("stdDeviation", "10");
+    shouldBeEqualToString("dropShadowElement.getAttribute('stdDeviation')", "10");
+
+    completeTest();
+}
+
+startTest(circleElement, 100, 100);
+
+var successfullyParsed = true;
diff --git a/LayoutTests/svg/dynamic-updates/script-tests/SVGFEDropShadowElement-svgdom-dx-prop.js b/LayoutTests/svg/dynamic-updates/script-tests/SVGFEDropShadowElement-svgdom-dx-prop.js
new file mode 100644 (file)
index 0000000..af08f1c
--- /dev/null
@@ -0,0 +1,44 @@
+// [Name] SVGFEDropShadowElement-svgdom-dx-prop.js
+// [Expected rendering result] A green circle in the center of the image - and a series of PASS messages
+
+description("Tests dynamic updates of the 'dx' property of the SVGFEDropShadowElement object")
+createSVGTestCase();
+
+var dropShadowElement = createSVGElement("feDropShadow");
+dropShadowElement.setAttribute("dx", "0");
+dropShadowElement.setAttribute("dy", "10");
+
+var filterElement = createSVGElement("filter");
+filterElement.setAttribute("id", "myFilter");
+filterElement.setAttribute("filterUnits", "userSpaceOnUse");
+filterElement.setAttribute("x", "0");
+filterElement.setAttribute("y", "0");
+filterElement.setAttribute("width", "200");
+filterElement.setAttribute("height", "200");
+filterElement.appendChild(dropShadowElement);
+
+var defsElement = createSVGElement("defs");
+defsElement.appendChild(filterElement);
+
+rootSVGElement.appendChild(defsElement);
+
+var circleElement = createSVGElement("circle");
+circleElement.setAttribute("cx", "100");
+circleElement.setAttribute("cy", "100");
+circleElement.setAttribute("r", "70");
+circleElement.setAttribute("fill", "green");
+circleElement.setAttribute("filter", "url(#myFilter)");
+rootSVGElement.appendChild(circleElement);
+
+shouldBe("dropShadowElement.dx.baseVal", "0");
+
+function executeTest() {
+    dropShadowElement.dx.baseVal = 10;
+    shouldBe("dropShadowElement.dx.baseVal", "10");
+
+    completeTest();
+}
+
+startTest(circleElement, 100, 100);
+
+var successfullyParsed = true;
diff --git a/LayoutTests/svg/dynamic-updates/script-tests/SVGFEDropShadowElement-svgdom-dy-prop.js b/LayoutTests/svg/dynamic-updates/script-tests/SVGFEDropShadowElement-svgdom-dy-prop.js
new file mode 100644 (file)
index 0000000..4a732bd
--- /dev/null
@@ -0,0 +1,44 @@
+// [Name] SVGFEDropShadowElement-svgdom-dy-prop.js
+// [Expected rendering result] A green circle in the center of the image - and a series of PASS messages
+
+description("Tests dynamic updates of the 'dy' property of the SVGFEDropShadowElement object")
+createSVGTestCase();
+
+var dropShadowElement = createSVGElement("feDropShadow");
+dropShadowElement.setAttribute("dx", "10");
+dropShadowElement.setAttribute("dy", "0");
+
+var filterElement = createSVGElement("filter");
+filterElement.setAttribute("id", "myFilter");
+filterElement.setAttribute("filterUnits", "userSpaceOnUse");
+filterElement.setAttribute("x", "0");
+filterElement.setAttribute("y", "0");
+filterElement.setAttribute("width", "200");
+filterElement.setAttribute("height", "200");
+filterElement.appendChild(dropShadowElement);
+
+var defsElement = createSVGElement("defs");
+defsElement.appendChild(filterElement);
+
+rootSVGElement.appendChild(defsElement);
+
+var circleElement = createSVGElement("circle");
+circleElement.setAttribute("cx", "100");
+circleElement.setAttribute("cy", "100");
+circleElement.setAttribute("r", "70");
+circleElement.setAttribute("fill", "green");
+circleElement.setAttribute("filter", "url(#myFilter)");
+rootSVGElement.appendChild(circleElement);
+
+shouldBe("dropShadowElement.dy.baseVal", "0");
+
+function executeTest() {
+    dropShadowElement.dy.baseVal = 10;
+    shouldBe("dropShadowElement.dy.baseVal", "10");
+
+    completeTest();
+}
+
+startTest(circleElement, 100, 100);
+
+var successfullyParsed = true;
diff --git a/LayoutTests/svg/dynamic-updates/script-tests/SVGFEDropShadowElement-svgdom-in-prop.js b/LayoutTests/svg/dynamic-updates/script-tests/SVGFEDropShadowElement-svgdom-in-prop.js
new file mode 100644 (file)
index 0000000..3815f21
--- /dev/null
@@ -0,0 +1,45 @@
+// [Name] SVGFEOffsetElement-svgdom-in-prop.js
+// [Expected rendering result] A green circle in the center of the image - and a series of PASS messages
+
+description("Tests dynamic updates of the 'in' property of the SVGFEOffsetElement object")
+createSVGTestCase();
+
+var dropShadowElement = createSVGElement("feDropShadow");
+dropShadowElement.setAttribute("dx", "10");
+dropShadowElement.setAttribute("dy", "10");
+dropShadowElement.setAttribute("in", "SourceAlpha");
+
+var filterElement = createSVGElement("filter");
+filterElement.setAttribute("id", "myFilter");
+filterElement.setAttribute("filterUnits", "userSpaceOnUse");
+filterElement.setAttribute("x", "0");
+filterElement.setAttribute("y", "0");
+filterElement.setAttribute("width", "200");
+filterElement.setAttribute("height", "200");
+filterElement.appendChild(dropShadowElement);
+
+var defsElement = createSVGElement("defs");
+defsElement.appendChild(filterElement);
+
+rootSVGElement.appendChild(defsElement);
+
+var circleElement = createSVGElement("circle");
+circleElement.setAttribute("cx", "100");
+circleElement.setAttribute("cy", "100");
+circleElement.setAttribute("r", "70");
+circleElement.setAttribute("fill", "green");
+circleElement.setAttribute("filter", "url(#myFilter)");
+rootSVGElement.appendChild(circleElement);
+
+shouldBeEqualToString("dropShadowElement.in1.baseVal", "SourceAlpha");
+
+function executeTest() {
+    dropShadowElement.in1.baseVal = "SourceGraphic";
+    shouldBeEqualToString("dropShadowElement.in1.baseVal", "SourceGraphic");
+
+    completeTest();
+}
+
+startTest(circleElement, 100, 100);
+
+var successfullyParsed = true;
diff --git a/LayoutTests/svg/dynamic-updates/script-tests/SVGFEDropShadowElement-svgdom-shadow-color-prop.js b/LayoutTests/svg/dynamic-updates/script-tests/SVGFEDropShadowElement-svgdom-shadow-color-prop.js
new file mode 100644 (file)
index 0000000..0df39d7
--- /dev/null
@@ -0,0 +1,46 @@
+// [Name] SVGFEDropShadowElement-svgdom-shadow-color-prop.js
+// [Expected rendering result] A green circle with a green shadow - and a series of PASS messages
+
+description("Tests dynamic updates of the 'flood-color' property of the SVGFEFloodElement object")
+createSVGTestCase();
+
+var dropShadowElement = createSVGElement("feDropShadow");
+dropShadowElement.setAttribute("dx", "10");
+dropShadowElement.setAttribute("dy", "10");
+dropShadowElement.setAttribute("stdDeviation", "0");
+dropShadowElement.setAttribute("flood-color", "rgb(0, 0, 0)");
+
+var filterElement = createSVGElement("filter");
+filterElement.setAttribute("id", "myFilter");
+filterElement.setAttribute("filterUnits", "userSpaceOnUse");
+filterElement.setAttribute("x", "0");
+filterElement.setAttribute("y", "0");
+filterElement.setAttribute("width", "200");
+filterElement.setAttribute("height", "200");
+filterElement.appendChild(dropShadowElement);
+
+var defsElement = createSVGElement("defs");
+defsElement.appendChild(filterElement);
+
+rootSVGElement.appendChild(defsElement);
+
+var circleElement = createSVGElement("circle");
+circleElement.setAttribute("cx", "100");
+circleElement.setAttribute("cy", "100");
+circleElement.setAttribute("r", "70");
+circleElement.setAttribute("fill", "green");
+circleElement.setAttribute("filter", "url(#myFilter)");
+rootSVGElement.appendChild(circleElement);
+
+shouldBeEqualToString("document.defaultView.getComputedStyle(dropShadowElement).getPropertyValue('flood-color')", "rgb(0, 0, 0)");
+
+function executeTest() {
+    dropShadowElement.style.setProperty("flood-color", "rgb(0, 128, 0)", "");
+    shouldBeEqualToString("document.defaultView.getComputedStyle(dropShadowElement).getPropertyValue('flood-color')", "rgb(0, 128, 0)");
+
+    completeTest();
+}
+
+startTest(circleElement, 100, 100);
+
+var successfullyParsed = true;
diff --git a/LayoutTests/svg/dynamic-updates/script-tests/SVGFEDropShadowElement-svgdom-shadow-opacity-prop.js b/LayoutTests/svg/dynamic-updates/script-tests/SVGFEDropShadowElement-svgdom-shadow-opacity-prop.js
new file mode 100644 (file)
index 0000000..e8bf80f
--- /dev/null
@@ -0,0 +1,46 @@
+// [Name] SVGFEDropShadowElement-svgdom-shddow-opacity-prop.js
+// [Expected rendering result] A green circle with a half transparent black shadow - and a series of PASS messages
+
+description("Tests dynamic updates of the 'flood-opacity' property of the SVGFEDropShadowElement object")
+createSVGTestCase();
+
+var dropShadowElement = createSVGElement("feDropShadow");
+dropShadowElement.setAttribute("dx", "10");
+dropShadowElement.setAttribute("dy", "10");
+dropShadowElement.setAttribute("stdDeviation", "0");
+dropShadowElement.setAttribute("flood-opacity", "0");
+
+var filterElement = createSVGElement("filter");
+filterElement.setAttribute("id", "myFilter");
+filterElement.setAttribute("filterUnits", "userSpaceOnUse");
+filterElement.setAttribute("x", "0");
+filterElement.setAttribute("y", "0");
+filterElement.setAttribute("width", "200");
+filterElement.setAttribute("height", "200");
+filterElement.appendChild(dropShadowElement);
+
+var defsElement = createSVGElement("defs");
+defsElement.appendChild(filterElement);
+
+rootSVGElement.appendChild(defsElement);
+
+var circleElement = createSVGElement("circle");
+circleElement.setAttribute("cx", "100");
+circleElement.setAttribute("cy", "100");
+circleElement.setAttribute("r", "70");
+circleElement.setAttribute("fill", "green");
+circleElement.setAttribute("filter", "url(#myFilter)");
+rootSVGElement.appendChild(circleElement);
+
+shouldBeEqualToString("parseFloat(document.defaultView.getComputedStyle(dropShadowElement).getPropertyValue('flood-opacity')).toFixed(1)", "0.0");
+
+function executeTest() {
+    dropShadowElement.style.setProperty("flood-opacity", ".5", "");
+    shouldBeEqualToString("parseFloat(document.defaultView.getComputedStyle(dropShadowElement).getPropertyValue('flood-opacity')).toFixed(1)", "0.5");
+
+    completeTest();
+}
+
+startTest(circleElement, 100, 100);
+
+var successfullyParsed = true;
diff --git a/LayoutTests/svg/dynamic-updates/script-tests/SVGFEDropShadowElement-svgdom-stdDeviation-prop.js b/LayoutTests/svg/dynamic-updates/script-tests/SVGFEDropShadowElement-svgdom-stdDeviation-prop.js
new file mode 100644 (file)
index 0000000..7249e03
--- /dev/null
@@ -0,0 +1,47 @@
+// [Name] SVGFEDropShadowElement-svgdom-stdDeviation-prop.js
+// [Expected rendering result] A simple circle with a black shadow - and a series of PASS messages
+
+description("Tests dynamic updates of the 'stdDeviation' property of the SVGFEDropShadowElement object")
+createSVGTestCase();
+
+var dropShadowElement = createSVGElement("feDropShadow");
+dropShadowElement.setAttribute("stdDeviation", "0");
+dropShadowElement.setAttribute("dx", "0");
+dropShadowElement.setAttribute("dy", "0");
+
+var filterElement = createSVGElement("filter");
+filterElement.setAttribute("id", "myFilter");
+filterElement.setAttribute("filterUnits", "userSpaceOnUse");
+filterElement.setAttribute("x", "0");
+filterElement.setAttribute("y", "0");
+filterElement.setAttribute("width", "200");
+filterElement.setAttribute("height", "200");
+filterElement.appendChild(dropShadowElement);
+
+var defsElement = createSVGElement("defs");
+defsElement.appendChild(filterElement);
+
+rootSVGElement.appendChild(defsElement);
+
+var circleElement = createSVGElement("circle");
+circleElement.setAttribute("cx", "100");
+circleElement.setAttribute("cy", "100");
+circleElement.setAttribute("r", "70");
+circleElement.setAttribute("fill", "green");
+circleElement.setAttribute("filter", "url(#myFilter)");
+rootSVGElement.appendChild(circleElement);
+
+shouldBe("dropShadowElement.stdDeviationX.baseVal", "0");
+shouldBe("dropShadowElement.stdDeviationY.baseVal", "0");
+
+function executeTest() {
+    dropShadowElement.setStdDeviation(10, 10);
+    shouldBe("dropShadowElement.stdDeviationX.baseVal", "10");
+    shouldBe("dropShadowElement.stdDeviationY.baseVal", "10");
+
+    completeTest();
+}
+
+startTest(rootSVGElement, 100, 100);
+
+var successfullyParsed = true;
diff --git a/LayoutTests/svg/filters/feDropShadow.svg b/LayoutTests/svg/filters/feDropShadow.svg
new file mode 100644 (file)
index 0000000..2d91891
--- /dev/null
@@ -0,0 +1,45 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" >
+<style type="text/css" >
+<![CDATA[
+circle {
+    stroke: blue;
+    stroke-width: 5;
+    fill: yellow;
+}
+]]>
+</style>
+<defs>
+<filter id="drop-shadow-1">
+    <feDropShadow flood-color="green"/>
+</filter>
+<filter id="drop-shadow-2">
+    <feDropShadow stdDeviation="0" dx="0" dy="0" flood-color="green"/>
+</filter>
+<filter id="drop-shadow-3">
+    <feDropShadow stdDeviation="0 10" dx="5" dy="5" flood-color="green"/>
+</filter>
+<filter id="drop-shadow-4">
+    <feDropShadow stdDeviation="10 0" dx="5" dy="5" flood-color="green"/>
+</filter>
+<filter id="drop-shadow-5">
+    <feDropShadow stdDeviation="10" dx="5" dy="5" flood-color="green"/>
+</filter>
+<filter id="drop-shadow-6">
+    <feDropShadow stdDeviation="10" dx="-5" dy="-5" flood-color="green"/>
+</filter>
+<filter id="drop-shadow-7">
+    <feDropShadow stdDeviation="128" dx="0" dy="0" flood-color="green"/>
+</filter>
+<filter id="drop-shadow-8">
+    <feDropShadow stdDeviation="10" dx="5" dy="5" flood-opacity="0.5" flood-color="green"/>
+</filter>
+</defs>
+<circle cx="75" cy="75" r="70" filter="url(#drop-shadow-1)" />
+<circle cx="250" cy="75" r="70" filter="url(#drop-shadow-2)" />
+<circle cx="425" cy="75" r="70" filter="url(#drop-shadow-3)" />
+<circle cx="600" cy="75" r="70" filter="url(#drop-shadow-4)" />
+<circle cx="75" cy="250" r="70" filter="url(#drop-shadow-5)" />
+<circle cx="250" cy="250" r="70" filter="url(#drop-shadow-6)" />
+<circle cx="425" cy="250" r="70" filter="url(#drop-shadow-7)" />
+<circle cx="600" cy="250" r="70" filter="url(#drop-shadow-8)" />
+</svg>
index 9152772..9d6d06a 100644 (file)
@@ -571,6 +571,7 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
        platform/graphics/filters/FEConvolveMatrix.cpp \
        platform/graphics/filters/FEDiffuseLighting.cpp \
        platform/graphics/filters/FEDisplacementMap.cpp \
+       platform/graphics/filters/FEDropShadow.cpp \
        platform/graphics/filters/FEFlood.cpp \
        platform/graphics/filters/FEMerge.cpp \
        platform/graphics/filters/FEMorphology.cpp \
@@ -917,6 +918,7 @@ LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
        svg/SVGFEDiffuseLightingElement.cpp \
        svg/SVGFEDisplacementMapElement.cpp \
        svg/SVGFEDistantLightElement.cpp \
+       svg/SVGFEDropShadowElement.cpp \
        svg/SVGFEFloodElement.cpp \
        svg/SVGFEFuncAElement.cpp \
        svg/SVGFEFuncBElement.cpp \
index b1ab453..995cdac 100644 (file)
@@ -1121,6 +1121,7 @@ SET(WebCore_SOURCES
     platform/graphics/filters/FEConvolveMatrix.cpp
     platform/graphics/filters/FEDiffuseLighting.cpp
     platform/graphics/filters/FEDisplacementMap.cpp
+    platform/graphics/filters/FEDropShadow.cpp
     platform/graphics/filters/FEFlood.cpp
     platform/graphics/filters/FEGaussianBlur.cpp
     platform/graphics/filters/FELighting.cpp
@@ -1649,6 +1650,7 @@ IF (ENABLE_SVG)
         svg/SVGFEDiffuseLightingElement.cpp
         svg/SVGFEDisplacementMapElement.cpp
         svg/SVGFEDistantLightElement.cpp
+        svg/SVGFEDropShadowElement.cpp
         svg/SVGFEFloodElement.cpp
         svg/SVGFEFuncAElement.cpp
         svg/SVGFEFuncBElement.cpp
@@ -1801,6 +1803,7 @@ IF (ENABLE_SVG)
         svg/SVGFEDiffuseLightingElement.idl
         svg/SVGFEDisplacementMapElement.idl
         svg/SVGFEDistantLightElement.idl
+        svg/SVGFEDropShadowElement.idl
         svg/SVGFEFloodElement.idl
         svg/SVGFEFuncAElement.idl
         svg/SVGFEFuncBElement.idl
index a66a432..6fbb1d3 100644 (file)
@@ -1,3 +1,85 @@
+2011-04-21  Dirk Schulze  <krit@webkit.org>
+
+        Reviewed by Nikolas Zimmermann.
+
+        SVG feDropShadow implementation of SVG Filters 1.2
+        https://bugs.webkit.org/show_bug.cgi?id=52513
+
+        This is the implementation of feDropShadow, a shorthand filter and a combination of feGaussianBlur,
+        feOffset, feFlood and feComposite to create a drop shadow of an input effect.
+        Creating this new filter effect makes it possible to optimize the often used workflow. ShadowBlur, with its
+        fast blurring algorithm, is used to blur the shadow and composite operators are responsible for combining the
+        source with different colored shadows.
+        Shadow color and opacity can be set with the properties flood-color and flood-opacity.
+
+        Tests: svg/dynamic-updates/SVGFEDropShadowElement-dom-dx-attr.html
+               svg/dynamic-updates/SVGFEDropShadowElement-dom-dy-attr.html
+               svg/dynamic-updates/SVGFEDropShadowElement-dom-in-attr.html
+               svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-color-attr.html
+               svg/dynamic-updates/SVGFEDropShadowElement-dom-shadow-opacity-attr.html
+               svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr.html
+               svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dx-prop.html
+               svg/dynamic-updates/SVGFEDropShadowElement-svgdom-dy-prop.html
+               svg/dynamic-updates/SVGFEDropShadowElement-svgdom-in-prop.html
+               svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-color-prop.html
+               svg/dynamic-updates/SVGFEDropShadowElement-svgdom-shadow-opacity-prop.html
+               svg/dynamic-updates/SVGFEDropShadowElement-svgdom-stdDeviation-prop.html
+               svg/filters/feDropShadow.svg
+
+        * Android.mk:
+        * CMakeLists.txt:
+        * DerivedSources.cpp:
+        * DerivedSources.make:
+        * GNUmakefile.list.am:
+        * WebCore.exp.in:
+        * WebCore.gypi:
+        * WebCore.pro:
+        * WebCore.vcproj/WebCore.vcproj:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/objc/DOM.mm:
+        (WebCore::createElementClassMap):
+        * bindings/objc/DOMSVG.h:
+        * page/DOMWindow.idl:
+        * platform/graphics/ShadowBlur.cpp: Added missing copyright after r84410.
+        * platform/graphics/ShadowBlur.h: Made blurLayerImage public.
+        * platform/graphics/filters/FEDropShadow.cpp: Added.
+        (WebCore::FEDropShadow::FEDropShadow):
+        (WebCore::FEDropShadow::create):
+        (WebCore::FEDropShadow::determineAbsolutePaintRect):
+        (WebCore::FEDropShadow::apply):
+        (WebCore::FEDropShadow::dump):
+        (WebCore::FEDropShadow::externalRepresentation):
+        * platform/graphics/filters/FEDropShadow.h: Added.
+        (WebCore::FEDropShadow::stdDeviationX):
+        (WebCore::FEDropShadow::setStdDeviationX):
+        (WebCore::FEDropShadow::stdDeviationY):
+        (WebCore::FEDropShadow::setStdDeviationY):
+        (WebCore::FEDropShadow::dx):
+        (WebCore::FEDropShadow::setDx):
+        (WebCore::FEDropShadow::dy):
+        (WebCore::FEDropShadow::setDy):
+        (WebCore::FEDropShadow::shadowColor):
+        (WebCore::FEDropShadow::setShadowColor):
+        (WebCore::FEDropShadow::shadowOpacity):
+        (WebCore::FEDropShadow::setShadowOpacity):
+        * platform/graphics/filters/FEGaussianBlur.cpp:
+        (WebCore::FEGaussianBlur::calculateKernelSize): Make kernel calculations accessible for feDropShadow.
+        * platform/graphics/filters/FEGaussianBlur.h:
+        * svg/SVGAllInOne.cpp:
+        * svg/SVGFEDropShadowElement.cpp: Added.
+        (WebCore::SVGFEDropShadowElement::SVGFEDropShadowElement):
+        (WebCore::SVGFEDropShadowElement::create):
+        (WebCore::SVGFEDropShadowElement::stdDeviationXIdentifier):
+        (WebCore::SVGFEDropShadowElement::stdDeviationYIdentifier):
+        (WebCore::SVGFEDropShadowElement::setStdDeviation):
+        (WebCore::SVGFEDropShadowElement::parseMappedAttribute):
+        (WebCore::SVGFEDropShadowElement::svgAttributeChanged):
+        (WebCore::SVGFEDropShadowElement::synchronizeProperty):
+        (WebCore::SVGFEDropShadowElement::build):
+        * svg/SVGFEDropShadowElement.h: Added.
+        * svg/SVGFEDropShadowElement.idl: Added.
+        * svg/svgtags.in:
+
 2011-04-21  Roland Steiner  <rolandsteiner@chromium.org>
 
         Reviewed by Dimitri Glazkov.
index 3bba78c..33a9147 100644 (file)
 #include "JSSVGFEDiffuseLightingElement.cpp"
 #include "JSSVGFEDisplacementMapElement.cpp"
 #include "JSSVGFEDistantLightElement.cpp"
+#include "JSSVGFEDropShadowElement.cpp"
 #include "JSSVGFEFloodElement.cpp"
 #include "JSSVGFEFuncAElement.cpp"
 #include "JSSVGFEFuncBElement.cpp"
index a4c112a..8caa21c 100644 (file)
@@ -401,6 +401,7 @@ DOM_CLASSES = \
     SVGFEDiffuseLightingElement \
     SVGFEDisplacementMapElement \
     SVGFEDistantLightElement \
+    SVGFEDropShadowElement \
     SVGFEFloodElement \
     SVGFEFuncAElement \
     SVGFEFuncBElement \
index b22bcb2..b9fabff 100644 (file)
@@ -2360,10 +2360,12 @@ webcore_sources += \
        Source/WebCore/platform/graphics/filters/FEDiffuseLighting.h \
        Source/WebCore/platform/graphics/filters/FEDisplacementMap.cpp \
        Source/WebCore/platform/graphics/filters/FEDisplacementMap.h \
-       Source/WebCore/platform/graphics/filters/FEGaussianBlur.cpp \
-       Source/WebCore/platform/graphics/filters/FEGaussianBlur.h \
+       Source/WebCore/platform/graphics/filters/FEDropShadow.cpp \
+       Source/WebCore/platform/graphics/filters/FEDropShadow.h \
        Source/WebCore/platform/graphics/filters/FEFlood.cpp \
        Source/WebCore/platform/graphics/filters/FEFlood.h \
+       Source/WebCore/platform/graphics/filters/FEGaussianBlur.cpp \
+       Source/WebCore/platform/graphics/filters/FEGaussianBlur.h \
        Source/WebCore/platform/graphics/filters/FELighting.cpp \
        Source/WebCore/platform/graphics/filters/FELighting.h \
        Source/WebCore/platform/graphics/filters/FEMerge.cpp \
@@ -3335,6 +3337,8 @@ webcore_sources += \
        Source/WebCore/svg/SVGFEDisplacementMapElement.h \
        Source/WebCore/svg/SVGFEDistantLightElement.cpp \
        Source/WebCore/svg/SVGFEDistantLightElement.h \
+       Source/WebCore/svg/SVGFEDropShadowElement.cpp \
+       Source/WebCore/svg/SVGFEDropShadowElement.h \
        Source/WebCore/svg/SVGFEFloodElement.cpp \
        Source/WebCore/svg/SVGFEFloodElement.h \
        Source/WebCore/svg/SVGFEFuncAElement.cpp \
@@ -4189,6 +4193,8 @@ webcore_built_sources += \
        DerivedSources/WebCore/JSSVGFEDisplacementMapElement.h \
        DerivedSources/WebCore/JSSVGFEDistantLightElement.cpp \
        DerivedSources/WebCore/JSSVGFEDistantLightElement.h \
+       DerivedSources/WebCore/JSSVGFEDropShadowElement.cpp \
+       DerivedSources/WebCore/JSSVGFEDropShadowElement.h \
        DerivedSources/WebCore/JSSVGFEFloodElement.cpp \
        DerivedSources/WebCore/JSSVGFEFloodElement.h \
        DerivedSources/WebCore/JSSVGFEFuncAElement.cpp \
index 4ca6bae..0215748 100644 (file)
@@ -1751,6 +1751,7 @@ __ZNK7WebCore15ProtectionSpace20authenticationSchemeEv
 .objc_class_name_DOMSVGFEDiffuseLightingElement
 .objc_class_name_DOMSVGFEDisplacementMapElement
 .objc_class_name_DOMSVGFEDistantLightElement
+.objc_class_name_DOMSVGFEDropShadowElement
 .objc_class_name_DOMSVGFEFloodElement
 .objc_class_name_DOMSVGFEFuncAElement
 .objc_class_name_DOMSVGFEFuncBElement
index 8c1a429..b6e3216 100644 (file)
             '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMSVGFEDisplacementMapElementInternal.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMSVGFEDistantLightElement.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMSVGFEDistantLightElementInternal.h',
+            '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMSVGFEDropShadowElement.h',
+            '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMSVGFEDropShadowElementInternal.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMSVGFEFloodElement.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMSVGFEFloodElementInternal.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMSVGFEFuncAElement.h',
             'svg/SVGFEDiffuseLightingElement.idl',
             'svg/SVGFEDisplacementMapElement.idl',
             'svg/SVGFEDistantLightElement.idl',
+            'svg/SVGFEDropShadowElement.idl',
             'svg/SVGFEFloodElement.idl',
             'svg/SVGFEFuncAElement.idl',
             'svg/SVGFEFuncBElement.idl',
             'platform/graphics/filters/FEDiffuseLighting.h',
             'platform/graphics/filters/FEDisplacementMap.cpp',
             'platform/graphics/filters/FEDisplacementMap.h',
+            'platform/graphics/filters/FEDropShadow.cpp',
+            'platform/graphics/filters/FEDropShadow.h',
             'platform/graphics/filters/FEFlood.cpp',
             'platform/graphics/filters/FEFlood.h',
             'platform/graphics/filters/FEGaussianBlur.cpp',
             'svg/SVGFEDisplacementMapElement.h',
             'svg/SVGFEDistantLightElement.cpp',
             'svg/SVGFEDistantLightElement.h',
+            'svg/SVGFEDropShadowElement.cpp',
+            'svg/SVGFEDropShadowElement.h',
             'svg/SVGFEFloodElement.cpp',
             'svg/SVGFEFloodElement.h',
             'svg/SVGFEFuncAElement.cpp',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMSVGFEDisplacementMapElement.dep',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMSVGFEDisplacementMapElement.mm',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMSVGFEDistantLightElement.mm',
+            '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMSVGFEDropShadowElement.dep',
+            '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMSVGFEDropShadowElement.mm',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMSVGFEFloodElement.dep',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMSVGFEFloodElement.mm',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/DOMSVGFEFuncAElement.mm',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSSVGFEDisplacementMapElement.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSSVGFEDistantLightElement.cpp',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSSVGFEDistantLightElement.h',
+            '<(PRODUCT_DIR)/DerivedSources/WebCore/JSSVGFEDropShadowElement.cpp',
+            '<(PRODUCT_DIR)/DerivedSources/WebCore/JSSVGFEDropShadowElement.dep',
+            '<(PRODUCT_DIR)/DerivedSources/WebCore/JSSVGFEDropShadowElement.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSSVGFEFloodElement.cpp',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSSVGFEFloodElement.dep',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSSVGFEFloodElement.h',
index 51000c2..8111fb9 100644 (file)
@@ -1927,6 +1927,7 @@ HEADERS += \
     platform/graphics/filters/FEConvolveMatrix.h \
     platform/graphics/filters/FEDiffuseLighting.h \
     platform/graphics/filters/FEDisplacementMap.h \
+    platform/graphics/filters/FEDropShadow.h \
     platform/graphics/filters/FEFlood.h \
     platform/graphics/filters/FEGaussianBlur.h \
     platform/graphics/filters/FELighting.h \
@@ -2327,6 +2328,7 @@ HEADERS += \
     svg/SVGFEDiffuseLightingElement.h \
     svg/SVGFEDisplacementMapElement.h \
     svg/SVGFEDistantLightElement.h \
+    svg/SVGFEFDropShadowElement.h \
     svg/SVGFEFloodElement.h \
     svg/SVGFEFuncAElement.h \
     svg/SVGFEFuncBElement.h \
@@ -3059,6 +3061,7 @@ contains(DEFINES, ENABLE_FILTERS=1) {
         platform/graphics/filters/FEConvolveMatrix.cpp \
         platform/graphics/filters/FEDiffuseLighting.cpp \
         platform/graphics/filters/FEDisplacementMap.cpp \
+        platform/graphics/filters/FEDropShadow.cpp \
         platform/graphics/filters/FEFlood.cpp \
         platform/graphics/filters/FEGaussianBlur.cpp \
         platform/graphics/filters/FELighting.cpp \
@@ -3284,6 +3287,7 @@ contains(DEFINES, ENABLE_SVG=1) {
               svg/SVGFEDiffuseLightingElement.cpp \
               svg/SVGFEDisplacementMapElement.cpp \
               svg/SVGFEDistantLightElement.cpp \
+              svg/SVGFEDropShadowElement.cpp \
               svg/SVGFEFloodElement.cpp \
               svg/SVGFEFuncAElement.cpp \
               svg/SVGFEFuncBElement.cpp \
index 226cf76..8cb8977 100755 (executable)
                                >
                        </File>
                        <File
+                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSSVGFEDropShadowElement.cpp"
+                               >
+                               <FileConfiguration
+                                       Name="Debug|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug_Cairo_CFLite|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release_Cairo_CFLite|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Debug_All|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                               <FileConfiguration
+                                       Name="Release_LTCG|Win32"
+                                       ExcludedFromBuild="true"
+                                       >
+                                       <Tool
+                                               Name="VCCLCompilerTool"
+                                       />
+                               </FileConfiguration>
+                       </File>
+                       <File
+                               RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSSVGFEDropShadowElement.h"
+                               >
+                       </File>
+                       <File
                                RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSSVGFEFloodElement.cpp"
                                >
                                <FileConfiguration
                                                >
                                        </File>
                                        <File
+                                               RelativePath="..\platform\graphics\filters\FEDropShadow.cpp"
+                                               >
+                                       </File>
+                                       <File
+                                               RelativePath="..\platform\graphics\filters\FEDropShadow.h"
+                                               >
+                                       </File>
+                                       <File
                                                RelativePath="..\platform\graphics\filters\FEFlood.cpp"
                                                >
                                        </File>
                                >
                        </File>
                        <File
+                               RelativePath="..\svg\SVGFEDropShadowElement.h"
+                               >
+                       </File>
+                       <File
                                RelativePath="..\svg\SVGFEFloodElement.h"
                                >
                        </File>
index 20455ef..cd02951 100644 (file)
                41F584C7104652CB009CAA64 /* JSMessagePortCustom.h in Headers */ = {isa = PBXBuildFile; fileRef = 41F584C6104652CB009CAA64 /* JSMessagePortCustom.h */; };
                41FA303E1316C29C00C0BFC5 /* RenderMediaControls.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41FA303C1316C29C00C0BFC5 /* RenderMediaControls.cpp */; };
                41FA303F1316C29C00C0BFC5 /* RenderMediaControls.h in Headers */ = {isa = PBXBuildFile; fileRef = 41FA303D1316C29C00C0BFC5 /* RenderMediaControls.h */; };
+               4358E86A1360A21600E4748C /* DOMSVGFEDropShadowElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 4358E8671360A21600E4748C /* DOMSVGFEDropShadowElement.h */; };
+               4358E86B1360A21600E4748C /* DOMSVGFEDropShadowElement.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4358E8681360A21600E4748C /* DOMSVGFEDropShadowElement.mm */; };
+               4358E86C1360A21600E4748C /* DOMSVGFEDropShadowElementInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 4358E8691360A21600E4748C /* DOMSVGFEDropShadowElementInternal.h */; };
+               4358E86D1360A24500E4748C /* DOMSVGFEDropShadowElement.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 4358E8671360A21600E4748C /* DOMSVGFEDropShadowElement.h */; };
+               4358E86F1360A24500E4748C /* DOMSVGFEDropShadowElementInternal.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 4358E8691360A21600E4748C /* DOMSVGFEDropShadowElementInternal.h */; };
+               4358E87C1360A2EE00E4748C /* JSSVGFEDropShadowElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4358E87A1360A2EE00E4748C /* JSSVGFEDropShadowElement.cpp */; };
+               4358E87D1360A2EE00E4748C /* JSSVGFEDropShadowElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 4358E87B1360A2EE00E4748C /* JSSVGFEDropShadowElement.h */; };
+               4358E8801360A31700E4748C /* FEDropShadow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4358E87E1360A31700E4748C /* FEDropShadow.cpp */; };
+               4358E8811360A31700E4748C /* FEDropShadow.h in Headers */ = {isa = PBXBuildFile; fileRef = 4358E87F1360A31700E4748C /* FEDropShadow.h */; };
+               4358E8851360A33B00E4748C /* SVGFEDropShadowElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4358E8821360A33B00E4748C /* SVGFEDropShadowElement.cpp */; };
+               4358E8861360A33B00E4748C /* SVGFEDropShadowElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 4358E8831360A33B00E4748C /* SVGFEDropShadowElement.h */; };
                436708C112D9CA4B00044234 /* RenderSVGBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = 4367088212D9CA4A00044234 /* RenderSVGBlock.h */; };
                436708C312D9CA4B00044234 /* RenderSVGContainer.h in Headers */ = {isa = PBXBuildFile; fileRef = 4367088412D9CA4A00044234 /* RenderSVGContainer.h */; };
                436708C512D9CA4B00044234 /* RenderSVGGradientStop.h in Headers */ = {isa = PBXBuildFile; fileRef = 4367088612D9CA4A00044234 /* RenderSVGGradientStop.h */; };
                        dstPath = Versions/A/PrivateHeaders;
                        dstSubfolderSpec = 1;
                        files = (
+                               4358E86D1360A24500E4748C /* DOMSVGFEDropShadowElement.h in Copy Generated Headers */,
+                               4358E86F1360A24500E4748C /* DOMSVGFEDropShadowElementInternal.h in Copy Generated Headers */,
                                5DF7F5C20F01F92A00526B4B /* CSSPropertyNames.h in Copy Generated Headers */,
                                8538F0300AD71CDB006A81D1 /* DOMAbstractView.h in Copy Generated Headers */,
                                1C11CCBC0AA6093700DADB20 /* DOMAttr.h in Copy Generated Headers */,
                41F584C6104652CB009CAA64 /* JSMessagePortCustom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMessagePortCustom.h; sourceTree = "<group>"; };
                41FA303C1316C29C00C0BFC5 /* RenderMediaControls.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderMediaControls.cpp; sourceTree = "<group>"; };
                41FA303D1316C29C00C0BFC5 /* RenderMediaControls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderMediaControls.h; sourceTree = "<group>"; };
+               4358E8671360A21600E4748C /* DOMSVGFEDropShadowElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMSVGFEDropShadowElement.h; sourceTree = "<group>"; };
+               4358E8681360A21600E4748C /* DOMSVGFEDropShadowElement.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMSVGFEDropShadowElement.mm; sourceTree = "<group>"; };
+               4358E8691360A21600E4748C /* DOMSVGFEDropShadowElementInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMSVGFEDropShadowElementInternal.h; sourceTree = "<group>"; };
+               4358E87A1360A2EE00E4748C /* JSSVGFEDropShadowElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSVGFEDropShadowElement.cpp; sourceTree = "<group>"; };
+               4358E87B1360A2EE00E4748C /* JSSVGFEDropShadowElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSVGFEDropShadowElement.h; sourceTree = "<group>"; };
+               4358E87E1360A31700E4748C /* FEDropShadow.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FEDropShadow.cpp; path = filters/FEDropShadow.cpp; sourceTree = "<group>"; };
+               4358E87F1360A31700E4748C /* FEDropShadow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FEDropShadow.h; path = filters/FEDropShadow.h; sourceTree = "<group>"; };
+               4358E8821360A33B00E4748C /* SVGFEDropShadowElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGFEDropShadowElement.cpp; sourceTree = "<group>"; };
+               4358E8831360A33B00E4748C /* SVGFEDropShadowElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGFEDropShadowElement.h; sourceTree = "<group>"; };
+               4358E8841360A33B00E4748C /* SVGFEDropShadowElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = SVGFEDropShadowElement.idl; sourceTree = "<group>"; };
                4367088112D9CA4A00044234 /* RenderSVGBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSVGBlock.cpp; sourceTree = "<group>"; };
                4367088212D9CA4A00044234 /* RenderSVGBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderSVGBlock.h; sourceTree = "<group>"; };
                4367088312D9CA4A00044234 /* RenderSVGContainer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSVGContainer.cpp; sourceTree = "<group>"; };
                                8502AB200AD438C000378540 /* DOMSVGFEDistantLightElement.h */,
                                8502AB210AD438C000378540 /* DOMSVGFEDistantLightElement.mm */,
                                A8E544790CA9D1C20097D09B /* DOMSVGFEDistantLightElementInternal.h */,
+                               4358E8671360A21600E4748C /* DOMSVGFEDropShadowElement.h */,
+                               4358E8681360A21600E4748C /* DOMSVGFEDropShadowElement.mm */,
+                               4358E8691360A21600E4748C /* DOMSVGFEDropShadowElementInternal.h */,
                                8502AB220AD438C000378540 /* DOMSVGFEFloodElement.h */,
                                8502AB230AD438C000378540 /* DOMSVGFEFloodElement.mm */,
                                A8E544730CA9D1C20097D09B /* DOMSVGFEFloodElementInternal.h */,
                                84730D5E1248F0B300D3A9C9 /* FEDiffuseLighting.h */,
                                84730D5F1248F0B300D3A9C9 /* FEDisplacementMap.cpp */,
                                84730D601248F0B300D3A9C9 /* FEDisplacementMap.h */,
+                               4358E87E1360A31700E4748C /* FEDropShadow.cpp */,
+                               4358E87F1360A31700E4748C /* FEDropShadow.h */,
                                84730D611248F0B300D3A9C9 /* FEFlood.cpp */,
                                84730D621248F0B300D3A9C9 /* FEFlood.h */,
                                84801952108BAFB300CB2B1F /* FEGaussianBlur.cpp */,
                                B2FA3C8D0AB75A6E000E5AC4 /* JSSVGFEDisplacementMapElement.h */,
                                B2FA3C8E0AB75A6E000E5AC4 /* JSSVGFEDistantLightElement.cpp */,
                                B2FA3C8F0AB75A6E000E5AC4 /* JSSVGFEDistantLightElement.h */,
+                               4358E87A1360A2EE00E4748C /* JSSVGFEDropShadowElement.cpp */,
+                               4358E87B1360A2EE00E4748C /* JSSVGFEDropShadowElement.h */,
                                B2FA3C900AB75A6E000E5AC4 /* JSSVGFEFloodElement.cpp */,
                                B2FA3C910AB75A6E000E5AC4 /* JSSVGFEFloodElement.h */,
                                B2FA3C920AB75A6E000E5AC4 /* JSSVGFEFuncAElement.cpp */,
                                B22278430D00BF1F0071B782 /* SVGFEDistantLightElement.cpp */,
                                B22278440D00BF1F0071B782 /* SVGFEDistantLightElement.h */,
                                B22278450D00BF1F0071B782 /* SVGFEDistantLightElement.idl */,
+                               4358E8821360A33B00E4748C /* SVGFEDropShadowElement.cpp */,
+                               4358E8831360A33B00E4748C /* SVGFEDropShadowElement.h */,
+                               4358E8841360A33B00E4748C /* SVGFEDropShadowElement.idl */,
                                B22278460D00BF1F0071B782 /* SVGFEFloodElement.cpp */,
                                B22278470D00BF1F0071B782 /* SVGFEFloodElement.h */,
                                B22278480D00BF1F0071B782 /* SVGFEFloodElement.idl */,
                                086BBD0F136039C2008B15D8 /* Glyph.h in Headers */,
                                0873B86B136064EA00A522C2 /* GlyphPage.h in Headers */,
                                087E0AF713606D0B00FA4BA8 /* SVGGlyph.h in Headers */,
+                               4358E86A1360A21600E4748C /* DOMSVGFEDropShadowElement.h in Headers */,
+                               4358E86C1360A21600E4748C /* DOMSVGFEDropShadowElementInternal.h in Headers */,
+                               4358E87D1360A2EE00E4748C /* JSSVGFEDropShadowElement.h in Headers */,
+                               4358E8811360A31700E4748C /* FEDropShadow.h in Headers */,
+                               4358E8861360A33B00E4748C /* SVGFEDropShadowElement.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                                E1BE512D0CF6C512002EA959 /* XSLTUnicodeSort.cpp in Sources */,
                                977E2E0E12F0FC9C00C13379 /* XSSFilter.cpp in Sources */,
                                087E0AF613606D0B00FA4BA8 /* SVGGlyph.cpp in Sources */,
+                               4358E86B1360A21600E4748C /* DOMSVGFEDropShadowElement.mm in Sources */,
+                               4358E87C1360A2EE00E4748C /* JSSVGFEDropShadowElement.cpp in Sources */,
+                               4358E8801360A31700E4748C /* FEDropShadow.cpp in Sources */,
+                               4358E8851360A33B00E4748C /* SVGFEDropShadowElement.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index 09413cc..db851e3 100644 (file)
@@ -169,6 +169,7 @@ static void createElementClassMap()
     addElementClass(SVGNames::feDiffuseLightingTag, [DOMSVGFEDiffuseLightingElement class]);
     addElementClass(SVGNames::feDisplacementMapTag, [DOMSVGFEDisplacementMapElement class]);
     addElementClass(SVGNames::feDistantLightTag, [DOMSVGFEDistantLightElement class]);
+    addElementClass(SVGNames::feDropShadowTag, [DOMSVGFEDropShadowElement class]);
     addElementClass(SVGNames::feFloodTag, [DOMSVGFEFloodElement class]);
     addElementClass(SVGNames::feFuncATag, [DOMSVGFEFuncAElement class]);
     addElementClass(SVGNames::feFuncBTag, [DOMSVGFEFuncBElement class]);
index 4fc69fd..4282bf4 100644 (file)
@@ -65,6 +65,7 @@
 #import <WebCore/DOMSVGFEDiffuseLightingElement.h>
 #import <WebCore/DOMSVGFEDisplacementMapElement.h>
 #import <WebCore/DOMSVGFEDistantLightElement.h>
+#import <WebCore/DOMSVGFEDropShadowElement.h>
 #import <WebCore/DOMSVGFEFloodElement.h>
 #import <WebCore/DOMSVGFEFuncAElement.h>
 #import <WebCore/DOMSVGFEFuncBElement.h>
index 0ee2ece..b8fa45b 100644 (file)
@@ -753,6 +753,7 @@ module window {
         attribute SVGFEDiffuseLightingElementConstructor SVGFEDiffuseLightingElement;
         attribute SVGFEDisplacementMapElementConstructor SVGFEDisplacementMapElement;
         attribute SVGFEDistantLightElementConstructor SVGFEDistantLightElement;
+        attribute SVGFEDropShadowElementConstructor SVGFEDropShadowElement;
         attribute SVGFEFloodElementConstructor SVGFEFloodElement;
         attribute SVGFEFuncAElementConstructor SVGFEFuncAElement;
         attribute SVGFEFuncBElementConstructor SVGFEFuncBElement;
index 218efef..8b5c7f6 100644 (file)
@@ -1,8 +1,8 @@
 /*
- * Copyright (C) 2011 Apple Inc.
- * Copyright (C) 2010 Sencha, Inc.
- * Copyright (C) 2010 Igalia S.L.
- * All rights reserved.
+ * Copyright (C) 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2010 Sencha, Inc. All rights reserved.
+ * Copyright (C) 2010 Igalia S.L. All rights reserved.
+ * Copyright (C) Research In Motion Limited 2011. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
index 7c9613b..2ba87ff 100644 (file)
@@ -52,11 +52,12 @@ public:
     void drawRectShadow(GraphicsContext*, const FloatRect&, const RoundedIntRect::Radii&);
     void drawInsetShadow(GraphicsContext*, const FloatRect&, const FloatRect& holeRect, const RoundedIntRect::Radii& holeRadii);
 
+    void blurLayerImage(unsigned char*, const IntSize&, int stride);
+
 private:
     void drawShadowBuffer(GraphicsContext*);
 
     void adjustBlurRadius(GraphicsContext*);
-    void blurLayerImage(unsigned char*, const IntSize&, int stride);
     
     enum ShadowDirection {
         OuterShadow,
diff --git a/Source/WebCore/platform/graphics/filters/FEDropShadow.cpp b/Source/WebCore/platform/graphics/filters/FEDropShadow.cpp
new file mode 100644 (file)
index 0000000..43e2110
--- /dev/null
@@ -0,0 +1,139 @@
+/*
+ * Copyright (C) Research In Motion Limited 2011. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+
+#if ENABLE(FILTERS)
+#include "FEDropShadow.h"
+
+#include "ColorSpace.h"
+#include "FEGaussianBlur.h"
+#include "Filter.h"
+#include "GraphicsContext.h"
+#include "RenderTreeAsText.h"
+#include "ShadowBlur.h"
+#include "TextStream.h"
+#include <wtf/ByteArray.h>
+#include <wtf/MathExtras.h>
+
+using namespace std;
+
+namespace WebCore {
+    
+FEDropShadow::FEDropShadow(Filter* filter, float stdX, float stdY, float dx, float dy, const Color& shadowColor, float shadowOpacity)
+    : FilterEffect(filter)
+    , m_stdX(stdX)
+    , m_stdY(stdY)
+    , m_dx(dx)
+    , m_dy(dy)
+    , m_shadowColor(shadowColor)
+    , m_shadowOpacity(shadowOpacity)
+{
+}
+
+PassRefPtr<FEDropShadow> FEDropShadow::create(Filter* filter, float stdX, float stdY, float dx, float dy, const Color& shadowColor, float shadowOpacity)
+{
+    return adoptRef(new FEDropShadow(filter, stdX, stdY, dx, dy, shadowColor, shadowOpacity));
+}
+
+void FEDropShadow::determineAbsolutePaintRect()
+{
+    Filter* filter = this->filter();
+    ASSERT(filter);
+
+    FloatRect absolutePaintRect = inputEffect(0)->absolutePaintRect();
+    FloatRect absoluteOffsetPaintRect(absolutePaintRect);
+    absoluteOffsetPaintRect.move(filter->applyHorizontalScale(m_dx), filter->applyVerticalScale(m_dy));
+    absolutePaintRect.unite(absoluteOffsetPaintRect);
+    absolutePaintRect.intersect(maxEffectRect());
+    
+    unsigned kernelSizeX = 0;
+    unsigned kernelSizeY = 0;
+    FEGaussianBlur::calculateKernelSize(filter, kernelSizeX, kernelSizeY, m_stdX, m_stdY);
+    
+    // We take the half kernel size and multiply it with three, because we run box blur three times.
+    absolutePaintRect.inflateX(3 * kernelSizeX * 0.5f);
+    absolutePaintRect.inflateY(3 * kernelSizeY * 0.5f);
+    setAbsolutePaintRect(enclosingIntRect(absolutePaintRect));
+}
+
+void FEDropShadow::apply()
+{
+    if (hasResult())
+        return;
+
+    FilterEffect* in = inputEffect(0);
+    in->apply();
+    if (!in->hasResult())
+        return;
+
+    ImageBuffer* resultImage = createImageBufferResult();
+    if (!resultImage)
+        return;
+
+    Filter* filter = this->filter();
+    FloatSize blurRadius(filter->applyHorizontalScale(m_stdX), filter->applyVerticalScale(m_stdY));
+    FloatSize offset(filter->applyHorizontalScale(m_dx), filter->applyVerticalScale(m_dy));
+
+    FloatRect drawingRegion = drawingRegionOfInputImage(in->absolutePaintRect());
+    FloatRect drawingRegionWithOffset(drawingRegion);
+    drawingRegionWithOffset.move(offset);
+
+    ImageBuffer* sourceImage = in->asImageBuffer();
+    ASSERT(sourceImage);
+    GraphicsContext* resultContext = resultImage->context();
+    ASSERT(resultContext);
+    resultContext->setAlpha(m_shadowOpacity);
+    resultContext->drawImageBuffer(sourceImage, ColorSpaceDeviceRGB, drawingRegionWithOffset);
+    resultContext->setAlpha(1);
+
+    ShadowBlur contextShadow(blurRadius, offset, m_shadowColor, ColorSpaceDeviceRGB);
+
+    // TODO: Direct pixel access to ImageBuffer would avoid copying the ImageData.
+    IntRect shadowArea(IntPoint(), resultImage->size());
+    RefPtr<ByteArray> srcPixelArray = resultImage->getPremultipliedImageData(shadowArea);
+
+    contextShadow.blurLayerImage(srcPixelArray->data(), shadowArea.size(), 4 * shadowArea.size().width());
+
+    resultImage->putPremultipliedImageData(srcPixelArray.get(), shadowArea.size(), shadowArea, IntPoint());
+
+    resultContext->setCompositeOperation(CompositeSourceIn);
+    resultContext->fillRect(FloatRect(FloatPoint(), absolutePaintRect().size()), m_shadowColor, ColorSpaceDeviceRGB);
+    resultContext->setCompositeOperation(CompositeDestinationOver);
+
+    resultImage->context()->drawImageBuffer(sourceImage, ColorSpaceDeviceRGB, drawingRegion);
+}
+
+void FEDropShadow::dump()
+{
+}
+
+TextStream& FEDropShadow::externalRepresentation(TextStream& ts, int indent) const
+{
+    writeIndent(ts, indent);
+    ts << "[feDropShadow";
+    FilterEffect::externalRepresentation(ts);
+    ts << " stdDeviation=\"" << m_stdX << ", " << m_stdY << "\" dx=\"" << m_dx << "\" dy=\"" << m_dy << "\" flood-color=\"" << m_shadowColor.nameForRenderTreeAsText() <<"\" flood-opacity=\"" << m_shadowOpacity << "]\n";
+    inputEffect(0)->externalRepresentation(ts, indent + 1);
+    return ts;
+}
+    
+} // namespace WebCore
+
+#endif // ENABLE(FILTERS)
diff --git a/Source/WebCore/platform/graphics/filters/FEDropShadow.h b/Source/WebCore/platform/graphics/filters/FEDropShadow.h
new file mode 100644 (file)
index 0000000..2a694b8
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) Research In Motion Limited 2011. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef FEDropShadow_h
+#define FEDropShadow_h
+
+#if ENABLE(FILTERS)
+#include "Filter.h"
+#include "FilterEffect.h"
+
+namespace WebCore {
+    
+class FEDropShadow : public FilterEffect {
+public:
+    static PassRefPtr<FEDropShadow> create(Filter*, float, float, float, float, const Color&, float);
+
+    float stdDeviationX() const { return m_stdX; }
+    void setStdDeviationX(float stdX) { m_stdX = stdX; }
+
+    float stdDeviationY() const { return m_stdY; }
+    void setStdDeviationY(float stdY) { m_stdY = stdY; }
+
+    float dx() const { return m_dx; }
+    void setDx(float dx) { m_dx = dx; }
+
+    float dy() const { return m_dy; }
+    void setDy(float dy) { m_dy = dy; }
+
+    Color shadowColor() const { return m_shadowColor; } 
+    void setShadowColor(const Color& shadowColor) { m_shadowColor = shadowColor; }
+
+    float shadowOpacity() const { return m_shadowOpacity; }
+    void setShadowOpacity(float shadowOpacity) { m_shadowOpacity = shadowOpacity; }
+
+    static float calculateStdDeviation(float);
+
+    virtual void apply();
+    virtual void dump();
+
+    virtual void determineAbsolutePaintRect();
+
+    virtual TextStream& externalRepresentation(TextStream&, int indention) const;
+
+private:
+    FEDropShadow(Filter*, float, float, float, float, const Color&, float);
+    
+    float m_stdX;
+    float m_stdY;
+    float m_dx;
+    float m_dy;
+    Color m_shadowColor;
+    float m_shadowOpacity;
+};
+    
+} // namespace WebCore
+
+#endif // ENABLE(FILTERS)
+#endif // FEDropShadow_h
index 20fd923..9296828 100644 (file)
@@ -129,7 +129,7 @@ inline void kernelPosition(int boxBlur, unsigned& std, int& dLeft, int& dRight)
     }
 }
 
-inline void calculateKernelSize(Filter* filter, unsigned& kernelSizeX, unsigned& kernelSizeY, float stdX, float stdY)
+void FEGaussianBlur::calculateKernelSize(Filter* filter, unsigned& kernelSizeX, unsigned& kernelSizeY, float stdX, float stdY)
 {
     stdX = filter->applyHorizontalScale(stdX);
     stdY = filter->applyVerticalScale(stdY);
index 79f9a45..1d58ef3 100644 (file)
@@ -47,6 +47,8 @@ public:
 
     virtual TextStream& externalRepresentation(TextStream&, int indention) const;
 
+    static void calculateKernelSize(Filter*, unsigned& kernelSizeX, unsigned& kernelSizeY, float stdX, float stdY);
+
 private:
     FEGaussianBlur(Filter*, float, float);
 
index ab23cb4..2e0b0f7 100644 (file)
@@ -56,6 +56,7 @@
 #include "SVGFEDiffuseLightingElement.cpp"
 #include "SVGFEDisplacementMapElement.cpp"
 #include "SVGFEDistantLightElement.cpp"
+#include "SVGFEDropShadowElement.cpp"
 #include "SVGFEFloodElement.cpp"
 #include "SVGFEFuncAElement.cpp"
 #include "SVGFEFuncBElement.cpp"
diff --git a/Source/WebCore/svg/SVGFEDropShadowElement.cpp b/Source/WebCore/svg/SVGFEDropShadowElement.cpp
new file mode 100644 (file)
index 0000000..793b3d1
--- /dev/null
@@ -0,0 +1,152 @@
+/*
+ * Copyright (C) Research In Motion Limited 2011. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+
+#if ENABLE(SVG) && ENABLE(FILTERS)
+#include "SVGFEDropShadowElement.h"
+
+#include "Attribute.h"
+#include "RenderStyle.h"
+#include "SVGFilterBuilder.h"
+#include "SVGNames.h"
+#include "SVGParserUtilities.h"
+#include "SVGRenderStyle.h"
+
+namespace WebCore {
+
+// Animated property definitions
+DEFINE_ANIMATED_STRING(SVGFEDropShadowElement, SVGNames::inAttr, In1, in1)
+DEFINE_ANIMATED_NUMBER(SVGFEDropShadowElement, SVGNames::dxAttr, Dx, dx)
+DEFINE_ANIMATED_NUMBER(SVGFEDropShadowElement, SVGNames::dyAttr, Dy, dy)
+DEFINE_ANIMATED_NUMBER_MULTIPLE_WRAPPERS(SVGFEDropShadowElement, SVGNames::stdDeviationAttr, stdDeviationXIdentifier(), StdDeviationX, stdDeviationX)
+DEFINE_ANIMATED_NUMBER_MULTIPLE_WRAPPERS(SVGFEDropShadowElement, SVGNames::stdDeviationAttr, stdDeviationYIdentifier(), StdDeviationY, stdDeviationY)
+
+inline SVGFEDropShadowElement::SVGFEDropShadowElement(const QualifiedName& tagName, Document* document)
+    : SVGFilterPrimitiveStandardAttributes(tagName, document)
+    , m_dx(2)
+    , m_dy(2)
+    , m_stdDeviationX(2)
+    , m_stdDeviationY(2)
+{
+}
+
+PassRefPtr<SVGFEDropShadowElement> SVGFEDropShadowElement::create(const QualifiedName& tagName, Document* document)
+{
+    return adoptRef(new SVGFEDropShadowElement(tagName, document));
+}
+
+const AtomicString& SVGFEDropShadowElement::stdDeviationXIdentifier()
+{
+    DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGStdDeviationX"));
+    return s_identifier;
+}
+
+const AtomicString& SVGFEDropShadowElement::stdDeviationYIdentifier()
+{
+    DEFINE_STATIC_LOCAL(AtomicString, s_identifier, ("SVGStdDeviationY"));
+    return s_identifier;
+}
+
+void SVGFEDropShadowElement::setStdDeviation(float x, float y)
+{
+    setStdDeviationXBaseValue(x);
+    setStdDeviationYBaseValue(y);
+    invalidate();
+}
+
+void SVGFEDropShadowElement::parseMappedAttribute(Attribute* attr)
+{
+    const String& value = attr->value();
+    if (attr->name() == SVGNames::stdDeviationAttr) {
+        float x, y;
+        if (parseNumberOptionalNumber(value, x, y)) {
+            setStdDeviationXBaseValue(x);
+            setStdDeviationYBaseValue(y);
+        }
+    } else if (attr->name() == SVGNames::inAttr)
+        setIn1BaseValue(value);
+    else if (attr->name() == SVGNames::dxAttr)
+        setDxBaseValue(attr->value().toFloat());
+    else if (attr->name() == SVGNames::dyAttr)
+        setDyBaseValue(attr->value().toFloat());
+    else
+        SVGFilterPrimitiveStandardAttributes::parseMappedAttribute(attr);
+}
+
+void SVGFEDropShadowElement::svgAttributeChanged(const QualifiedName& attrName)
+{
+    SVGFilterPrimitiveStandardAttributes::svgAttributeChanged(attrName);
+    
+    if (attrName == SVGNames::inAttr
+        || attrName == SVGNames::stdDeviationAttr
+        || attrName == SVGNames::dxAttr
+        || attrName == SVGNames::dyAttr)
+        invalidate();
+}
+
+void SVGFEDropShadowElement::synchronizeProperty(const QualifiedName& attrName)
+{
+    SVGFilterPrimitiveStandardAttributes::synchronizeProperty(attrName);
+    
+    if (attrName == anyQName()) {
+        synchronizeStdDeviationX();
+        synchronizeStdDeviationY();
+        synchronizeDx();
+        synchronizeDy();
+        synchronizeIn1();
+        return;
+    }
+    
+    if (attrName == SVGNames::stdDeviationAttr) {
+        synchronizeStdDeviationX();
+        synchronizeStdDeviationY();
+    } else if (attrName == SVGNames::inAttr)
+        synchronizeIn1();
+    else if (attrName == SVGNames::dxAttr)
+        synchronizeDx();
+    else if (attrName == SVGNames::dyAttr)
+        synchronizeDy();
+}
+
+PassRefPtr<FilterEffect> SVGFEDropShadowElement::build(SVGFilterBuilder* filterBuilder, Filter* filter)
+{
+    RenderObject* renderer = this->renderer();
+    if (!renderer)
+        return 0;
+    
+    ASSERT(renderer->style());
+    ASSERT(renderer->style()->svgStyle());
+    const SVGRenderStyle* svgStyle = renderer->style()->svgStyle();
+    
+    Color color = svgStyle->floodColor();
+    float opacity = svgStyle->floodOpacity();
+
+    FilterEffect* input1 = filterBuilder->getEffectById(in1());
+    if (!input1)
+        return 0;
+    
+    RefPtr<FilterEffect> effect = FEDropShadow::create(filter, stdDeviationX(), stdDeviationY(), dx(), dy(), color, opacity);
+    effect->inputEffects().append(input1);
+    return effect.release();
+}
+
+}
+
+#endif // ENABLE(SVG)
diff --git a/Source/WebCore/svg/SVGFEDropShadowElement.h b/Source/WebCore/svg/SVGFEDropShadowElement.h
new file mode 100644 (file)
index 0000000..0290dce
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) Research In Motion Limited 2011. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef SVGFEDropShadowElement_h
+#define SVGFEDropShadowElement_h
+
+#if ENABLE(SVG) && ENABLE(FILTERS)
+#include "FEDropShadow.h"
+#include "SVGAnimatedNumber.h"
+#include "SVGFilterPrimitiveStandardAttributes.h"
+
+namespace WebCore {
+    
+class SVGFEDropShadowElement : public SVGFilterPrimitiveStandardAttributes {
+public:
+    static PassRefPtr<SVGFEDropShadowElement> create(const QualifiedName&, Document*);
+    
+    void setStdDeviation(float stdDeviationX, float stdDeviationY);
+    
+private:
+    SVGFEDropShadowElement(const QualifiedName&, Document*);
+    
+    virtual void parseMappedAttribute(Attribute*);
+    virtual void svgAttributeChanged(const QualifiedName&);
+    virtual void synchronizeProperty(const QualifiedName&);
+    virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*, Filter*);
+    
+    static const AtomicString& stdDeviationXIdentifier();
+    static const AtomicString& stdDeviationYIdentifier();
+    
+    // Animated property declarations
+    DECLARE_ANIMATED_STRING(In1, in1)
+    DECLARE_ANIMATED_NUMBER(Dx, dx)
+    DECLARE_ANIMATED_NUMBER(Dy, dy)
+    DECLARE_ANIMATED_NUMBER(StdDeviationX, stdDeviationX)
+    DECLARE_ANIMATED_NUMBER(StdDeviationY, stdDeviationY)
+};
+    
+} // namespace WebCore
+
+#endif // ENABLE(SVG)
+#endif
diff --git a/Source/WebCore/svg/SVGFEDropShadowElement.idl b/Source/WebCore/svg/SVGFEDropShadowElement.idl
new file mode 100644 (file)
index 0000000..74f9653
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) Research In Motion Limited 2011. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+module svg {
+
+    interface [Conditional=SVG&FILTERS] SVGFEDropShadowElement : SVGElement,
+                                                           SVGFilterPrimitiveStandardAttributes { 
+        readonly attribute SVGAnimatedString in1;
+        readonly attribute SVGAnimatedNumber dx;
+        readonly attribute SVGAnimatedNumber dy;
+        readonly attribute SVGAnimatedNumber stdDeviationX;
+        readonly attribute SVGAnimatedNumber stdDeviationY;
+
+        void setStdDeviation(in float stdDeviationX, in float stdDeviationY);
+    };
+
+}
\ No newline at end of file
index ee6765c..dc4dcf2 100644 (file)
@@ -35,6 +35,7 @@ feConvolveMatrix
 feDiffuseLighting
 feDisplacementMap
 feDistantLight
+feDropShadow
 feFlood
 feFuncA
 feFuncB
index b6ca1b6..836e204 100644 (file)
@@ -1,3 +1,12 @@
+2011-04-21  Dirk Schulze  <krit@webkit.org>
+
+        Reviewed by Nikolas Zimmermann.
+
+        SVG feDropShadow implementation of SVG Filters 1.2
+        https://bugs.webkit.org/show_bug.cgi?id=52513
+
+        * MigrateHeaders.make:
+
 2011-04-20  Dominic Cooney  <dominicc@chromium.org>
 
         Reviewed by Dimitri Glazkov.
index 44f9ae2..eda9985 100644 (file)
@@ -275,6 +275,8 @@ all : \
     $(INTERNAL_HEADERS_DIR)/DOMSVGFEDisplacementMapElementInternal.h \
     $(PRIVATE_HEADERS_DIR)/DOMSVGFEDistantLightElement.h \
     $(INTERNAL_HEADERS_DIR)/DOMSVGFEDistantLightElementInternal.h \
+    $(PRIVATE_HEADERS_DIR)/DOMSVGFEDropShadowElement.h \
+    $(INTERNAL_HEADERS_DIR)/DOMSVGFEDropShadowElementInternal.h \
     $(PRIVATE_HEADERS_DIR)/DOMSVGFEFloodElement.h \
     $(INTERNAL_HEADERS_DIR)/DOMSVGFEFloodElementInternal.h \
     $(PRIVATE_HEADERS_DIR)/DOMSVGFEFuncAElement.h \