2010-11-10 Nikolas Zimmermann <nzimmermann@rim.com>
authorzimmermann@webkit.org <zimmermann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Nov 2010 11:20:11 +0000 (11:20 +0000)
committerzimmermann@webkit.org <zimmermann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Nov 2010 11:20:11 +0000 (11:20 +0000)
        Reviewed by Dirk Schulze.

        Convert SVGMatrix/SVGTransform/SVGTransformList to the new SVGPropertyTearOff concept
        https://bugs.webkit.org/show_bug.cgi?id=49311

        Move the last list type, SVGTransformList, and the last POD types, SVGMatrix & SVGTransform, over to the new SVGPropertyTearOff concept.
        Removes the need for a custom JSSVGMatrix/V8SVGMatrix implementation, it's all integrated within the bindings now.

        Tests: svg/W3C-SVG-1.1-SE/coords-dom-01-f.svg
               svg/W3C-SVG-1.1-SE/coords-dom-02-f.svg
               svg/W3C-SVG-1.1-SE/coords-dom-03-f.svg
               svg/W3C-SVG-1.1-SE/coords-dom-04-f.svg
               svg/W3C-SVG-1.1-SE/types-dom-01-b.svg
               svg/W3C-SVG-1.1-SE/types-dom-02-f.svg
               svg/W3C-SVG-1.1-SE/types-dom-03-b.svg
               svg/W3C-SVG-1.1-SE/types-dom-04-b.svg
               svg/W3C-SVG-1.1-SE/types-dom-05-b.svg
               svg/dom/SVGMatrix.html
               svg/dom/SVGTransform.html
               svg/dom/SVGTransformList.html

        * Android.jscbindings.mk: Removed JSSVGMatrixCustom.cpp.
        * Android.v8bindings.mk: Removed V8SVGMatrixCustom.cpp.
        * CMakeLists.txt: Remove JSSVGMatrixCustom.cpp.
        * GNUmakefile.am: Ditto. Add SVGAnimatedTransformListPropertyTearOff.h/SVGStaticPropertyWithParentTearOff.h/SVGTransformListPropertyTearOff.h/SVGAnimatedTransformList.h/SVGMatrix.h to build.
        * WebCore.gypi: Ditto.
        * WebCore.pro: Ditto.
        * WebCore.vcproj/WebCore.vcproj: Ditto.
        * WebCore.xcodeproj/project.pbxproj: Ditto.
        * bindings/js/JSBindingsAllInOne.cpp: Remove JSSVGMatrixCustom.cpp
        * bindings/js/JSSVGMatrixCustom.cpp: Removed.
        * bindings/scripts/CodeGenerator.pm: Convert SVGMatrix/SVGTransform/SVGTransformList to the new concept.
        * bindings/scripts/CodeGeneratorJS.pm: Ditto.
        * bindings/scripts/CodeGeneratorObjC.pm: Ditto.
        * bindings/scripts/CodeGeneratorV8.pm: Ditto.
        * bindings/v8/custom/V8SVGMatrixCustom.cpp: Removed.
        * svg/DeprecatedSVGAnimatedPropertyTraits.h: Remove SVGTransformList handling.
        * svg/DeprecatedSVGAnimatedTemplate.h: Ditto.
        * svg/SVGAnimateTransformElement.cpp: Adapt to SVGTransformList API changes.
        (WebCore::transformListFor):
        (WebCore::SVGAnimateTransformElement::resetToBaseValue):
        (WebCore::SVGAnimateTransformElement::calculateAnimatedValue):
        (WebCore::SVGAnimateTransformElement::applyResultsToTarget):
        * svg/SVGAnimatedTransformList.h: Added.
        * svg/SVGGradientElement.cpp: Ditto.
        (WebCore::SVGGradientElement::SVGGradientElement):
        (WebCore::SVGGradientElement::parseMappedAttribute):
        * svg/SVGGradientElement.h: Ditto.
        * svg/SVGLinearGradientElement.cpp: Ditto.
        (WebCore::SVGLinearGradientElement::collectGradientAttributes):
        * svg/SVGMatrix.h: Added. SVGMatrix inherits from AffineTransform, and is only used in the bindings. It implements SVGs special requirements.
        (WebCore::SVGMatrix::translate): Returns a copy of the matrix, not affecting the original matrix.
        (WebCore::SVGMatrix::scale): Ditto.
        (WebCore::SVGMatrix::scaleNonUniform): Ditto.
        (WebCore::SVGMatrix::rotate): Ditto.
        (WebCore::SVGMatrix::flipX): Ditto.
        (WebCore::SVGMatrix::flipY): Ditto.
        (WebCore::SVGMatrix::skewX): Ditto.
        (WebCore::SVGMatrix::skewY): Ditto.
        (WebCore::SVGMatrix::multiply): Ditto.
        (WebCore::SVGMatrix::inverse): Ditto.
        (WebCore::SVGMatrix::rotateFromVector): Dittto.
        * svg/SVGMatrix.idl: Enable StrictTypeChecking/RequiresAllArguments=Raise on all attributes/functions.
        * svg/SVGPatternElement.cpp: Adapt to SVGTransformList API changes.
        (WebCore::SVGPatternElement::SVGPatternElement):
        (WebCore::SVGPatternElement::parseMappedAttribute):
        (WebCore::SVGPatternElement::collectPatternAttributes):
        * svg/SVGPatternElement.h: Ditto.
        * svg/SVGPoint.idl: Enable StrictTypeChecking/RequiresAllArguments=Raise for 'matrixTransform', now that SVGMatrix has been converted to the new scheme.
        * svg/SVGRadialGradientElement.cpp: Adapt to SVGTransformList API changes.
        (WebCore::SVGRadialGradientElement::collectGradientAttributes):
        * svg/SVGSVGElement.cpp: Ditto.
        (WebCore::SVGSVGElement::createSVGTransformFromMatrix):
        (WebCore::SVGSVGElement::viewBoxToViewTransform):
        * svg/SVGSVGElement.h: Ditto.
        * svg/SVGStyledTransformableElement.cpp: Ditto.
        (WebCore::SVGStyledTransformableElement::SVGStyledTransformableElement):
        (WebCore::SVGStyledTransformableElement::animatedLocalTransform):
        (WebCore::SVGStyledTransformableElement::parseMappedAttribute):
        * svg/SVGStyledTransformableElement.h: Ditto.
        * svg/SVGTextElement.cpp: Ditto.
        (WebCore::SVGTextElement::SVGTextElement):
        (WebCore::SVGTextElement::parseMappedAttribute):
        (WebCore::SVGTextElement::animatedLocalTransform):
        * svg/SVGTextElement.h: Ditto.
        * svg/SVGTransform.cpp: Modernize code, inlined some getters.
        (WebCore::SVGTransform::SVGTransform):
        (WebCore::SVGTransform::setMatrix):
        * svg/SVGTransform.h: Reindent header.
        (WebCore::SVGTransform::type):
        (WebCore::SVGTransform::svgMatrix):
        (WebCore::SVGTransform::matrix):
        (WebCore::SVGTransform::angle):
        (WebCore::SVGTransform::rotationCenter):
        (WebCore::SVGTransform::isValid):
        (WebCore::operator==): Avoid function calls, make operator== a friend of SVGTransform, and compare members directly.
        (WebCore::operator!=):
        * svg/SVGTransform.idl:
        * svg/SVGTransformList.cpp: Rewritten as plain Vector<SVGTransform>.
        (WebCore::SVGTransformList::createSVGTransformFromMatrix):
        (WebCore::SVGTransformList::consolidate):
        (WebCore::SVGTransformList::concatenate):
        (WebCore::SVGTransformList::valueAsString):
        * svg/SVGTransformList.h:
        (WebCore::SVGTransformList::SVGTransformList):
        * svg/SVGTransformList.idl: Enable StrictTypeChecking/RequiresAllArguments=Raise on all attributes/functions.
        * svg/SVGTransformable.cpp: Adapt to SVGTransformList API changes.
        (WebCore::SVGTransformable::parseTransformAttribute):
        * svg/SVGTransformable.h: Ditto.
        * svg/SVGViewSpec.cpp: Ditto.
        (WebCore::SVGViewSpec::SVGViewSpec):
        (WebCore::SVGViewSpec::setTransform):
        (WebCore::SVGViewSpec::parseViewSpec):
        * svg/SVGViewSpec.h: Ditto.
        (WebCore::SVGViewSpec::transform):
        * svg/properties/SVGAnimatedListPropertyTearOff.h: Made constructor and members protected.
        * svg/properties/SVGAnimatedPropertyMacros.h: Add new helper macro DECLARE_ANIMATED_TRANSFORM_LIST_PROPERTY. This is needed until we expand all macros.
        * svg/properties/SVGAnimatedTransformListPropertyTearOff.h: Added. Extends SVGAnimatedListPropertyTearOff, returning SVGTransformListPropertyTearOff objects.
        (WebCore::SVGAnimatedTransformListPropertyTearOff::baseVal):
        (WebCore::SVGAnimatedTransformListPropertyTearOff::animVal):
        (WebCore::SVGAnimatedTransformListPropertyTearOff::create):
        (WebCore::SVGAnimatedTransformListPropertyTearOff::SVGAnimatedTransformListPropertyTearOff):
        * svg/properties/SVGListPropertyTearOff.h: Made construct and members protected.
        * svg/properties/SVGProperty.h: Declare commitChange() as pure virtual method.
        * svg/properties/SVGPropertyTraits.h: Handle SVGTransformList.
        * svg/properties/SVGStaticPropertyWithParentTearOff.h: Added. Same concept as JSSVGStaticPODTypeWrapperWithParent, used to expose SVGPropertyTearOffs for types
                                                               that are using this concept themselves. (SVGMatrix attribute of SVGTransform, both are POD types, using SVGPropertyTearOff).
        (WebCore::SVGStaticPropertyWithParentTearOff::create):
        (WebCore::SVGStaticPropertyWithParentTearOff::commitChange):
        (WebCore::SVGStaticPropertyWithParentTearOff::SVGStaticPropertyWithParentTearOff):
        * svg/properties/SVGTransformListPropertyTearOff.h: Added. Extends SVGListPropertyTearOff by two special SVGTransformList methods: consolidate and createSVGTransformFromMatrix.
        (WebCore::SVGTransformListPropertyTearOff::create):
        (WebCore::SVGTransformListPropertyTearOff::createSVGTransformFromMatrix):
        (WebCore::SVGTransformListPropertyTearOff::consolidate):
        (WebCore::SVGTransformListPropertyTearOff::SVGTransformListPropertyTearOff):
2010-11-10  Nikolas Zimmermann  <nzimmermann@rim.com>

        Reviewed by Dirk Schulze.

        Convert SVGMatrix/SVGTransform/SVGTransformList to the new SVGPropertyTearOff concept
        https://bugs.webkit.org/show_bug.cgi?id=49311

        Add tests covering StrictTypeChecking and RequiresAllArguments=Raise for SVGMatrix/SVGPoint.
        Imported several new tests from SVG 1.1 2nd Edition, regarding SVG DOM primitives.

        * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.checksum: Added.
        * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.png: Added.
        * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.txt: Added.
        * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.checksum: Added.
        * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.png: Added.
        * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.txt: Added.
        * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.checksum: Added.
        * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.png: Added.
        * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.txt: Added.
        * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.checksum: Added.
        * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.png: Added.
        * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.txt: Added.
        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.checksum: Added.
        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.png: Added.
        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.txt: Added.
        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.checksum: Added.
        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.png: Added.
        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.txt: Added.
        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.checksum: Added.
        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.png: Added.
        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.txt: Added.
        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.checksum: Added.
        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.png: Added.
        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.txt: Added.
        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.checksum: Added.
        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.png: Added.
        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.txt: Added.
        * svg/W3C-SVG-1.1-SE/coords-dom-01-f.svg: Added.
        * svg/W3C-SVG-1.1-SE/coords-dom-02-f.svg: Added.
        * svg/W3C-SVG-1.1-SE/coords-dom-03-f.svg: Added.
        * svg/W3C-SVG-1.1-SE/coords-dom-04-f.svg: Added.
        * svg/W3C-SVG-1.1-SE/types-dom-01-b.svg: Added.
        * svg/W3C-SVG-1.1-SE/types-dom-02-f.svg: Added.
        * svg/W3C-SVG-1.1-SE/types-dom-03-b.svg: Added.
        * svg/W3C-SVG-1.1-SE/types-dom-04-b.svg: Added.
        * svg/W3C-SVG-1.1-SE/types-dom-05-b.svg: Added.
        * svg/dom/SVGMatrix-expected.txt: Added.
        * svg/dom/SVGMatrix.html: Added.
        * svg/dom/SVGPoint-expected.txt:
        * svg/dom/SVGTransform-expected.txt: Added.
        * svg/dom/SVGTransform.html: Added.
        * svg/dom/SVGTransformList-expected.txt: Added.
        * svg/dom/SVGTransformList.html: Added.
        * svg/dom/script-tests/SVGMatrix.js: Added.
        * svg/dom/script-tests/SVGPoint.js:
        * svg/dom/script-tests/SVGTransform.js: Added.
        * svg/dom/script-tests/SVGTransformList.js: Added.

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

104 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.txt [new file with mode: 0644]
LayoutTests/svg/W3C-SVG-1.1-SE/coords-dom-01-f.svg [new file with mode: 0644]
LayoutTests/svg/W3C-SVG-1.1-SE/coords-dom-02-f.svg [new file with mode: 0644]
LayoutTests/svg/W3C-SVG-1.1-SE/coords-dom-03-f.svg [new file with mode: 0644]
LayoutTests/svg/W3C-SVG-1.1-SE/coords-dom-04-f.svg [new file with mode: 0644]
LayoutTests/svg/W3C-SVG-1.1-SE/types-dom-01-b.svg [new file with mode: 0644]
LayoutTests/svg/W3C-SVG-1.1-SE/types-dom-02-f.svg [new file with mode: 0644]
LayoutTests/svg/W3C-SVG-1.1-SE/types-dom-03-b.svg [new file with mode: 0644]
LayoutTests/svg/W3C-SVG-1.1-SE/types-dom-04-b.svg [new file with mode: 0644]
LayoutTests/svg/W3C-SVG-1.1-SE/types-dom-05-b.svg [new file with mode: 0644]
LayoutTests/svg/animations/animate-gradient-transform-expected.txt
LayoutTests/svg/animations/script-tests/animate-gradient-transform.js
LayoutTests/svg/dom/SVGMatrix-expected.txt [new file with mode: 0644]
LayoutTests/svg/dom/SVGMatrix.html [new file with mode: 0644]
LayoutTests/svg/dom/SVGPoint-expected.txt
LayoutTests/svg/dom/SVGTransform-expected.txt [new file with mode: 0644]
LayoutTests/svg/dom/SVGTransform.html [new file with mode: 0644]
LayoutTests/svg/dom/SVGTransformList-expected.txt [new file with mode: 0644]
LayoutTests/svg/dom/SVGTransformList.html [new file with mode: 0644]
LayoutTests/svg/dom/script-tests/SVGMatrix.js [new file with mode: 0644]
LayoutTests/svg/dom/script-tests/SVGPoint.js
LayoutTests/svg/dom/script-tests/SVGTransform.js [new file with mode: 0644]
LayoutTests/svg/dom/script-tests/SVGTransformList.js [new file with mode: 0644]
WebCore/Android.jscbindings.mk
WebCore/Android.v8bindings.mk
WebCore/CMakeLists.txt
WebCore/ChangeLog
WebCore/GNUmakefile.am
WebCore/WebCore.gypi
WebCore/WebCore.pro
WebCore/WebCore.vcproj/WebCore.vcproj
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bindings/js/JSBindingsAllInOne.cpp
WebCore/bindings/js/JSSVGMatrixCustom.cpp [deleted file]
WebCore/bindings/scripts/CodeGenerator.pm
WebCore/bindings/scripts/CodeGeneratorJS.pm
WebCore/bindings/scripts/CodeGeneratorObjC.pm
WebCore/bindings/scripts/CodeGeneratorV8.pm
WebCore/bindings/v8/custom/V8SVGMatrixCustom.cpp [deleted file]
WebCore/svg/DeprecatedSVGAnimatedPropertyTraits.h
WebCore/svg/DeprecatedSVGAnimatedTemplate.h
WebCore/svg/SVGAnimateTransformElement.cpp
WebCore/svg/SVGAnimatedTransformList.h [new file with mode: 0644]
WebCore/svg/SVGGradientElement.cpp
WebCore/svg/SVGGradientElement.h
WebCore/svg/SVGLinearGradientElement.cpp
WebCore/svg/SVGMatrix.h [new file with mode: 0644]
WebCore/svg/SVGMatrix.idl
WebCore/svg/SVGPatternElement.cpp
WebCore/svg/SVGPatternElement.h
WebCore/svg/SVGPoint.idl
WebCore/svg/SVGRadialGradientElement.cpp
WebCore/svg/SVGSVGElement.cpp
WebCore/svg/SVGSVGElement.h
WebCore/svg/SVGStyledTransformableElement.cpp
WebCore/svg/SVGStyledTransformableElement.h
WebCore/svg/SVGTextElement.cpp
WebCore/svg/SVGTextElement.h
WebCore/svg/SVGTransform.cpp
WebCore/svg/SVGTransform.h
WebCore/svg/SVGTransform.idl
WebCore/svg/SVGTransformList.cpp
WebCore/svg/SVGTransformList.h
WebCore/svg/SVGTransformList.idl
WebCore/svg/SVGTransformable.cpp
WebCore/svg/SVGTransformable.h
WebCore/svg/SVGViewSpec.cpp
WebCore/svg/SVGViewSpec.h
WebCore/svg/properties/SVGAnimatedListPropertyTearOff.h
WebCore/svg/properties/SVGAnimatedPropertyMacros.h
WebCore/svg/properties/SVGAnimatedTransformListPropertyTearOff.h [new file with mode: 0644]
WebCore/svg/properties/SVGListPropertyTearOff.h
WebCore/svg/properties/SVGProperty.h
WebCore/svg/properties/SVGPropertyTearOff.h
WebCore/svg/properties/SVGPropertyTraits.h
WebCore/svg/properties/SVGStaticPropertyWithParentTearOff.h [new file with mode: 0644]
WebCore/svg/properties/SVGTransformListPropertyTearOff.h [new file with mode: 0644]

index ab3a940..c2b6b0d 100644 (file)
@@ -1,3 +1,61 @@
+2010-11-10  Nikolas Zimmermann  <nzimmermann@rim.com>
+
+        Reviewed by Dirk Schulze.
+
+        Convert SVGMatrix/SVGTransform/SVGTransformList to the new SVGPropertyTearOff concept
+        https://bugs.webkit.org/show_bug.cgi?id=49311
+
+        Add tests covering StrictTypeChecking and RequiresAllArguments=Raise for SVGMatrix/SVGPoint.
+        Imported several new tests from SVG 1.1 2nd Edition, regarding SVG DOM primitives.
+
+        * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.checksum: Added.
+        * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.png: Added.
+        * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.txt: Added.
+        * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.checksum: Added.
+        * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.png: Added.
+        * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.txt: Added.
+        * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.checksum: Added.
+        * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.png: Added.
+        * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.txt: Added.
+        * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.checksum: Added.
+        * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.png: Added.
+        * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.txt: Added.
+        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.checksum: Added.
+        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.png: Added.
+        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.txt: Added.
+        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.checksum: Added.
+        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.png: Added.
+        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.txt: Added.
+        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.checksum: Added.
+        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.png: Added.
+        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.txt: Added.
+        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.checksum: Added.
+        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.png: Added.
+        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.txt: Added.
+        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.checksum: Added.
+        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.png: Added.
+        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.txt: Added.
+        * svg/W3C-SVG-1.1-SE/coords-dom-01-f.svg: Added.
+        * svg/W3C-SVG-1.1-SE/coords-dom-02-f.svg: Added.
+        * svg/W3C-SVG-1.1-SE/coords-dom-03-f.svg: Added.
+        * svg/W3C-SVG-1.1-SE/coords-dom-04-f.svg: Added.
+        * svg/W3C-SVG-1.1-SE/types-dom-01-b.svg: Added.
+        * svg/W3C-SVG-1.1-SE/types-dom-02-f.svg: Added.
+        * svg/W3C-SVG-1.1-SE/types-dom-03-b.svg: Added.
+        * svg/W3C-SVG-1.1-SE/types-dom-04-b.svg: Added.
+        * svg/W3C-SVG-1.1-SE/types-dom-05-b.svg: Added.
+        * svg/dom/SVGMatrix-expected.txt: Added.
+        * svg/dom/SVGMatrix.html: Added.
+        * svg/dom/SVGPoint-expected.txt:
+        * svg/dom/SVGTransform-expected.txt: Added.
+        * svg/dom/SVGTransform.html: Added.
+        * svg/dom/SVGTransformList-expected.txt: Added.
+        * svg/dom/SVGTransformList.html: Added.
+        * svg/dom/script-tests/SVGMatrix.js: Added.
+        * svg/dom/script-tests/SVGPoint.js:
+        * svg/dom/script-tests/SVGTransform.js: Added.
+        * svg/dom/script-tests/SVGTransformList.js: Added.
+
 2010-11-11  Kent Tamura  <tkent@chromium.org>
 
         Reviewed by Shinichiro Hamaji.
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.checksum b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.checksum
new file mode 100644 (file)
index 0000000..72d6bdd
--- /dev/null
@@ -0,0 +1 @@
+8fd79fe9781a9bd714d37014bd4cca34
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.png b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.png
new file mode 100644 (file)
index 0000000..c4a3e47
Binary files /dev/null and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.txt b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.txt
new file mode 100644 (file)
index 0000000..58f9ecb
--- /dev/null
@@ -0,0 +1,16 @@
+layer at (0,0) size 480x360
+  RenderView at (0,0) size 480x360
+layer at (0,0) size 480x360
+  RenderSVGRoot {svg} at (0,0) size 480x360
+    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+    RenderSVGContainer {g} at (200,140) size 80x80
+      RenderSVGContainer {g} at (200,140) size 80x80 [transform={m=((1.00,0.00)(0.00,1.00)) t=(240.00,180.00)}]
+        RenderSVGContainer {g} at (200,140) size 80x80
+          RenderSVGPath {circle} at (200,140) size 80x80 [fill={[type=SOLID] [color=#FF0000]}] [cx=0.00] [cy=0.00] [r=40.00]
+        RenderSVGContainer {g} at (200,140) size 80x80 [transform={m=((0.00,1.00)(-1.00,0.00)) t=(0.00,0.00)}]
+          RenderSVGPath {circle} at (200,140) size 80x80 [fill={[type=SOLID] [color=#00FF00]}] [cx=0.00] [cy=0.00] [r=40.00]
+    RenderSVGContainer {g} at (10,310) size 231x37
+      RenderSVGText {text} at (10,310) size 231x37 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 231x37
+          chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 231.00: "$Revision: 1.7 $"
+    RenderSVGPath {rect} at (0,0) size 480x360 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.checksum b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.checksum
new file mode 100644 (file)
index 0000000..a53f214
--- /dev/null
@@ -0,0 +1 @@
+c88d033f28473566d8d957c53222282f
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.png b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.png
new file mode 100644 (file)
index 0000000..4578dbe
Binary files /dev/null and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.txt b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.txt
new file mode 100644 (file)
index 0000000..8649408
--- /dev/null
@@ -0,0 +1,16 @@
+layer at (0,0) size 480x360
+  RenderView at (0,0) size 480x360
+layer at (0,0) size 480x360
+  RenderSVGRoot {svg} at (0,0) size 480x360
+    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+    RenderSVGContainer {g} at (160,140) size 160x80
+      RenderSVGContainer {g} at (160,140) size 160x80 [transform={m=((1.00,0.00)(0.00,1.00)) t=(220.00,160.00)}]
+        RenderSVGContainer {g} at (160,140) size 160x80
+          RenderSVGPath {circle} at (160,140) size 160x80 [transform={m=((2.00,0.00)(0.00,1.00)) t=(20.00,20.00)}] [fill={[type=SOLID] [color=#FF0000]}] [cx=0.00] [cy=0.00] [r=40.00]
+        RenderSVGContainer {g} at (160,140) size 160x80 [transform={m=((2.00,0.00)(0.00,1.00)) t=(20.00,20.00)}]
+          RenderSVGPath {circle} at (160,140) size 160x80 [fill={[type=SOLID] [color=#00FF00]}] [cx=0.00] [cy=0.00] [r=40.00]
+    RenderSVGContainer {g} at (10,310) size 231x37
+      RenderSVGText {text} at (10,310) size 231x37 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 231x37
+          chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 231.00: "$Revision: 1.7 $"
+    RenderSVGPath {rect} at (0,0) size 480x360 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.checksum b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.checksum
new file mode 100644 (file)
index 0000000..bc72932
--- /dev/null
@@ -0,0 +1 @@
+2e347e5fe2d169ec3b91cab22df9f2c9
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.png b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.png
new file mode 100644 (file)
index 0000000..b0e8057
Binary files /dev/null and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.txt b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.txt
new file mode 100644 (file)
index 0000000..77a8184
--- /dev/null
@@ -0,0 +1,28 @@
+layer at (0,0) size 480x360
+  RenderView at (0,0) size 480x360
+layer at (0,0) size 480x360
+  RenderSVGRoot {svg} at (0,0) size 480x360
+    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+    RenderSVGContainer {g} at (10,17) size 392x203
+      RenderSVGText {text} at (10,17) size 392x16 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 392x16
+          chunk 1 text run 1 at (10.00,30.00) startOffset 0 endOffset 60 width 392.00: "Test that some methods taking an SVGMatrix take a copy of it"
+      RenderSVGPath {rect} at (10,50) size 50x50 [fill={[type=SOLID] [color=#00FF00]}] [x=10.00] [y=50.00] [width=50.00] [height=50.00]
+      RenderSVGPath {rect} at (10,110) size 50x50 [fill={[type=SOLID] [color=#00FF00]}] [x=10.00] [y=110.00] [width=50.00] [height=50.00]
+      RenderSVGPath {rect} at (10,170) size 50x50 [fill={[type=SOLID] [color=#00FF00]}] [x=10.00] [y=170.00] [width=50.00] [height=50.00]
+      RenderSVGContainer {g} at (70,70) size 240x132
+        RenderSVGText {text} at (70,70) size 240x12 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 240x12
+            chunk 1 text run 1 at (70.00,80.00) startOffset 0 endOffset 47 width 240.00: "SVGTransformList.createSVGTransformFromMatrix()"
+        RenderSVGText {text} at (70,130) size 238x12 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 238x12
+            chunk 1 text run 1 at (70.00,140.00) startOffset 0 endOffset 44 width 238.00: "SVGSVGElement.createSVGTransformFromMatrix()"
+        RenderSVGText {text} at (70,190) size 118x12 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 118x12
+            chunk 1 text run 1 at (70.00,200.00) startOffset 0 endOffset 24 width 118.00: "SVGTransform.setMatrix()"
+      RenderSVGContainer {g} at (0,0) size 0x0 [transform={m=((3.00,0.00)(0.00,1.00)) t=(0.00,0.00)}]
+    RenderSVGContainer {g} at (10,310) size 231x37
+      RenderSVGText {text} at (10,310) size 231x37 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 231x37
+          chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 231.00: "$Revision: 1.7 $"
+    RenderSVGPath {rect} at (0,0) size 480x360 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.checksum b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.checksum
new file mode 100644 (file)
index 0000000..cb9379a
--- /dev/null
@@ -0,0 +1 @@
+258dc3d456ef36aca814c3c9d7994f1f
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.png b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.png
new file mode 100644 (file)
index 0000000..ba4b20e
Binary files /dev/null and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.txt b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.txt
new file mode 100644 (file)
index 0000000..21dc933
--- /dev/null
@@ -0,0 +1,66 @@
+layer at (0,0) size 480x360
+  RenderView at (0,0) size 480x360
+layer at (0,0) size 480x360
+  RenderSVGRoot {svg} at (0,0) size 480x360
+    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+    RenderSVGContainer {g} at (19,33) size 179x261
+      RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+      RenderSVGContainer {g} at (19,33) size 179x261 [transform={m=((1.00,0.00)(0.00,1.00)) t=(20.00,-10.00)}]
+        RenderSVGContainer {g} at (19,33) size 179x261 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,40.00)}]
+          RenderSVGPath {rect} at (19,34) size 17x17 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#00FF00]}] [x=0.00] [y=5.00] [width=15.00] [height=15.00]
+          RenderSVGText {text} at (20,3) size 139x21 contains 1 chunk(s)
+            RenderSVGInlineText {#text} at (0,0) size 139x21
+              chunk 1 text run 1 at (20.00,20.00) startOffset 0 endOffset 17 width 139.00: "Scripting enabled"
+          RenderSVGPath {rect} at (19,54) size 17x17 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#00FF00]}] [x=0.00] [y=25.00] [width=15.00] [height=15.00]
+          RenderSVGText {text} at (20,23) size 148x21 contains 1 chunk(s)
+            RenderSVGInlineText {#text} at (0,0) size 148x21
+              chunk 1 text run 1 at (20.00,40.00) startOffset 0 endOffset 17 width 148.00: "Passed subtest #1"
+          RenderSVGPath {rect} at (19,74) size 17x17 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#00FF00]}] [x=0.00] [y=45.00] [width=15.00] [height=15.00]
+          RenderSVGText {text} at (20,43) size 148x21 contains 1 chunk(s)
+            RenderSVGInlineText {#text} at (0,0) size 148x21
+              chunk 1 text run 1 at (20.00,60.00) startOffset 0 endOffset 17 width 148.00: "Passed subtest #2"
+          RenderSVGPath {rect} at (19,94) size 17x17 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#00FF00]}] [x=0.00] [y=65.00] [width=15.00] [height=15.00]
+          RenderSVGText {text} at (20,63) size 148x21 contains 1 chunk(s)
+            RenderSVGInlineText {#text} at (0,0) size 148x21
+              chunk 1 text run 1 at (20.00,80.00) startOffset 0 endOffset 17 width 148.00: "Passed subtest #3"
+          RenderSVGPath {rect} at (19,114) size 17x17 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#00FF00]}] [x=0.00] [y=85.00] [width=15.00] [height=15.00]
+          RenderSVGText {text} at (20,83) size 148x21 contains 1 chunk(s)
+            RenderSVGInlineText {#text} at (0,0) size 148x21
+              chunk 1 text run 1 at (20.00,100.00) startOffset 0 endOffset 17 width 148.00: "Passed subtest #4"
+          RenderSVGPath {rect} at (19,134) size 17x17 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#00FF00]}] [x=0.00] [y=105.00] [width=15.00] [height=15.00]
+          RenderSVGText {text} at (20,103) size 148x21 contains 1 chunk(s)
+            RenderSVGInlineText {#text} at (0,0) size 148x21
+              chunk 1 text run 1 at (20.00,120.00) startOffset 0 endOffset 17 width 148.00: "Passed subtest #5"
+          RenderSVGPath {rect} at (19,154) size 17x17 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#00FF00]}] [x=0.00] [y=125.00] [width=15.00] [height=15.00]
+          RenderSVGText {text} at (20,123) size 148x21 contains 1 chunk(s)
+            RenderSVGInlineText {#text} at (0,0) size 148x21
+              chunk 1 text run 1 at (20.00,140.00) startOffset 0 endOffset 17 width 148.00: "Passed subtest #6"
+          RenderSVGPath {rect} at (19,174) size 17x17 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#00FF00]}] [x=0.00] [y=145.00] [width=15.00] [height=15.00]
+          RenderSVGText {text} at (20,143) size 148x21 contains 1 chunk(s)
+            RenderSVGInlineText {#text} at (0,0) size 148x21
+              chunk 1 text run 1 at (20.00,160.00) startOffset 0 endOffset 17 width 148.00: "Passed subtest #7"
+          RenderSVGPath {rect} at (19,194) size 17x17 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#00FF00]}] [x=0.00] [y=165.00] [width=15.00] [height=15.00]
+          RenderSVGText {text} at (20,163) size 148x21 contains 1 chunk(s)
+            RenderSVGInlineText {#text} at (0,0) size 148x21
+              chunk 1 text run 1 at (20.00,180.00) startOffset 0 endOffset 17 width 148.00: "Passed subtest #8"
+          RenderSVGPath {rect} at (19,214) size 17x17 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#00FF00]}] [x=0.00] [y=185.00] [width=15.00] [height=15.00]
+          RenderSVGText {text} at (20,183) size 148x21 contains 1 chunk(s)
+            RenderSVGInlineText {#text} at (0,0) size 148x21
+              chunk 1 text run 1 at (20.00,200.00) startOffset 0 endOffset 17 width 148.00: "Passed subtest #9"
+          RenderSVGPath {rect} at (19,234) size 17x17 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#00FF00]}] [x=0.00] [y=205.00] [width=15.00] [height=15.00]
+          RenderSVGText {text} at (20,203) size 158x21 contains 1 chunk(s)
+            RenderSVGInlineText {#text} at (0,0) size 158x21
+              chunk 1 text run 1 at (20.00,220.00) startOffset 0 endOffset 18 width 158.00: "Passed subtest #10"
+          RenderSVGPath {rect} at (19,254) size 17x17 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#00FF00]}] [x=0.00] [y=225.00] [width=15.00] [height=15.00]
+          RenderSVGText {text} at (20,223) size 158x21 contains 1 chunk(s)
+            RenderSVGInlineText {#text} at (0,0) size 158x21
+              chunk 1 text run 1 at (20.00,240.00) startOffset 0 endOffset 18 width 158.00: "Passed subtest #11"
+          RenderSVGPath {rect} at (19,274) size 17x17 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#00FF00]}] [x=0.00] [y=245.00] [width=15.00] [height=15.00]
+          RenderSVGText {text} at (20,243) size 158x21 contains 1 chunk(s)
+            RenderSVGInlineText {#text} at (0,0) size 158x21
+              chunk 1 text run 1 at (20.00,260.00) startOffset 0 endOffset 18 width 158.00: "Passed subtest #12"
+    RenderSVGContainer {g} at (10,310) size 231x37
+      RenderSVGText {text} at (10,310) size 231x37 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 231x37
+          chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 231.00: "$Revision: 1.5 $"
+    RenderSVGPath {rect} at (0,0) size 480x360 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.checksum b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.checksum
new file mode 100644 (file)
index 0000000..7333c4e
--- /dev/null
@@ -0,0 +1 @@
+25956c72537d152c485b50b8561dad57
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.png b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.png
new file mode 100644 (file)
index 0000000..7d694e4
Binary files /dev/null and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.txt b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.txt
new file mode 100644 (file)
index 0000000..899d3de
--- /dev/null
@@ -0,0 +1,39 @@
+layer at (0,0) size 480x360
+  RenderView at (0,0) size 480x360
+layer at (0,0) size 480x360
+  RenderSVGRoot {svg} at (0,0) size 480x360
+    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+    RenderSVGContainer {g} at (10,8) size 365x295
+      RenderSVGContainer {g} at (10,8) size 365x295
+        RenderSVGContainer {g} at (16,8) size 359x157 [transform={m=((1.00,0.00)(0.00,1.00)) t=(70.00,-60.00)}]
+          RenderSVGText {text} at (30,132) size 344x23 contains 1 chunk(s)
+            RenderSVGInlineText {#text} at (0,0) size 344x23
+              chunk 1 text run 1 at (30.00,150.00) startOffset 0 endOffset 37 width 344.00: "Rotated Text for testing SVGLocatable"
+          RenderSVGText {text} at (100,112) size 304x23 contains 1 chunk(s)
+            RenderSVGInlineText {#text} at (0,0) size 304x23
+              chunk 1 text run 1 at (100.00,130.00) startOffset 0 endOffset 35 width 304.00: "Some other text with id 'otherText'"
+          RenderSVGViewportContainer {svg} at (275,45) size 100x100
+            RenderSVGPath {circle} at (275,45) size 100x100 [fill={[type=SOLID] [color=#0000FF]}] [cx=0.00] [cy=0.00] [r=50.00]
+        RenderSVGText {text} at (10,189) size 280x14 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 280x14
+            chunk 1 text run 1 at (10.00,200.00) startOffset 0 endOffset 50 width 280.00: ".getScreenCTM(): 0.42,0.42,-0.42,0.42,70.00,-60.00"
+        RenderSVGText {text} at (10,209) size 241x14 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 241x14
+            chunk 1 text run 1 at (10.00,220.00) startOffset 0 endOffset 44 width 241.00: ".getCTM(): 0.42,0.42,-0.42,0.42,70.00,-60.00"
+        RenderSVGText {text} at (10,229) size 311x14 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 311x14
+            chunk 1 text run 1 at (10.00,240.00) startOffset 0 endOffset 56 width 311.00: ".getTransformToElement(): 0.42,0.42,-0.42,0.42,0.00,0.00"
+        RenderSVGText {text} at (10,249) size 345x14 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 345x14
+            chunk 1 text run 1 at (10.00,260.00) startOffset 0 endOffset 65 width 345.00: ".getBBox() for 'blueCircle': .x=-50,.y=-50,.width=100,.height=100"
+        RenderSVGText {text} at (10,269) size 259x14 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 259x14
+            chunk 1 text run 1 at (10.00,280.00) startOffset 0 endOffset 47 width 259.00: ".farthestViewportElement of blueCircle=svg-root"
+        RenderSVGText {text} at (10,289) size 278x14 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 278x14
+            chunk 1 text run 1 at (10.00,300.00) startOffset 0 endOffset 47 width 278.00: ".nearestViewportElement of blueCircle=nestedSVG"
+    RenderSVGContainer {g} at (10,310) size 231x37
+      RenderSVGText {text} at (10,310) size 231x37 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 231x37
+          chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 231.00: "$Revision: 1.6 $"
+    RenderSVGPath {rect} at (0,0) size 480x360 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.checksum b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.checksum
new file mode 100644 (file)
index 0000000..0cf5de7
--- /dev/null
@@ -0,0 +1 @@
+2bf592766edbf0a467f15d87c2c92bb1
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.png b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.png
new file mode 100644 (file)
index 0000000..3059aff
Binary files /dev/null and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.txt b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.txt
new file mode 100644 (file)
index 0000000..c0fa374
--- /dev/null
@@ -0,0 +1,52 @@
+layer at (0,0) size 480x360
+  RenderView at (0,0) size 480x360
+layer at (0,0) size 480x360
+  RenderSVGRoot {svg} at (0,0) size 480x360
+    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+    RenderSVGContainer {g} at (49,38) size 391x254
+      RenderSVGText {text} at (49,38) size 161x21 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 161x21
+          chunk 1 (end anchor) text run 1 at (49.00,55.00) startOffset 0 endOffset 19 width 161.00: "animVal != baseVal:"
+      RenderSVGContainer {g} at (240,40) size 200x252 [transform={m=((0.00,1.00)(-1.00,0.00)) t=(500.00,0.00)}]
+        RenderSVGPath {rect} at (420,40) size 20x20 [fill={[type=SOLID] [color=#008000]}] [x=40.00] [y=60.00] [width=20.00] [height=20.00]
+        RenderSVGText {text} at (70,62) size 162x16 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 162x16
+            chunk 1 text run 1 at (70.00,75.00) startOffset 0 endOffset 21 width 162.00: "SVGAnimatedNumberList"
+        RenderSVGPath {rect} at (390,40) size 20x20 [fill={[type=SOLID] [color=#008000]}] [x=40.00] [y=90.00] [width=20.00] [height=20.00]
+        RenderSVGText {text} at (70,92) size 133x16 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 133x16
+            chunk 1 text run 1 at (70.00,105.00) startOffset 0 endOffset 17 width 133.00: "SVGAnimatedLength"
+        RenderSVGPath {rect} at (360,40) size 20x20 [fill={[type=SOLID] [color=#008000]}] [x=40.00] [y=120.00] [width=20.00] [height=20.00]
+        RenderSVGText {text} at (70,122) size 155x16 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 155x16
+            chunk 1 text run 1 at (70.00,135.00) startOffset 0 endOffset 21 width 155.00: "SVGAnimatedLengthList"
+        RenderSVGPath {rect} at (330,40) size 20x20 [fill={[type=SOLID] [color=#008000]}] [x=40.00] [y=150.00] [width=20.00] [height=20.00]
+        RenderSVGText {text} at (70,152) size 125x16 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 125x16
+            chunk 1 text run 1 at (70.00,165.00) startOffset 0 endOffset 16 width 125.00: "SVGAnimatedAngle"
+        RenderSVGPath {rect} at (300,40) size 20x20 [fill={[type=SOLID] [color=#008000]}] [x=40.00] [y=180.00] [width=20.00] [height=20.00]
+        RenderSVGText {text} at (70,182) size 118x16 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 118x16
+            chunk 1 text run 1 at (70.00,195.00) startOffset 0 endOffset 15 width 118.00: "SVGAnimatedRect"
+        RenderSVGPath {rect} at (270,40) size 20x20 [fill={[type=SOLID] [color=#008000]}] [x=40.00] [y=210.00] [width=20.00] [height=20.00]
+        RenderSVGText {text} at (70,212) size 177x16 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 177x16
+            chunk 1 text run 1 at (70.00,225.00) startOffset 0 endOffset 24 width 177.00: "SVGAnimatedTransformList"
+        RenderSVGPath {rect} at (240,40) size 20x20 [fill={[type=SOLID] [color=#008000]}] [x=40.00] [y=240.00] [width=20.00] [height=20.00]
+        RenderSVGText {text} at (70,242) size 222x16 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 222x16
+            chunk 1 text run 1 at (70.00,255.00) startOffset 0 endOffset 30 width 222.00: "SVGAnimatedPreserveAspectRatio"
+      RenderSVGHiddenContainer {g} at (0,0) size 0x0
+        RenderSVGText {text} at (0,-17) size 38x26 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 38x26
+            chunk 1 text run 1 at (0.00,0.00) startOffset 0 endOffset 1 width 10.00: "a"
+            chunk 1 text run 2 at (10.00,0.00) startOffset 1 endOffset 2 width 10.00: "b"
+            chunk 1 text run 3 at (20.00,0.00) startOffset 2 endOffset 3 width 9.00: "c"
+        RenderSVGPath {circle} at (0,0) size 50x50 [fill={[type=SOLID] [color=#000000]}] [cx=0.00] [cy=0.00] [r=50.00]
+        RenderSVGResourceMarker {marker} [id="marker"] [markerUnits=strokeWidth] [ref at (0,0)] [angle=90.00]
+        RenderSVGViewportContainer {svg} at (0,0) size 0x0
+    RenderSVGContainer {g} at (10,310) size 231x37
+      RenderSVGText {text} at (10,310) size 231x37 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 231x37
+          chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 231.00: "$Revision: 1.8 $"
+    RenderSVGPath {rect} at (0,0) size 480x360 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.checksum b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.checksum
new file mode 100644 (file)
index 0000000..ed3c2cb
--- /dev/null
@@ -0,0 +1 @@
+6f1abdce08d52a0e07c5153d3fca804e
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.png b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.png
new file mode 100644 (file)
index 0000000..dad6542
Binary files /dev/null and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.txt b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.txt
new file mode 100644 (file)
index 0000000..8e6a7e1
--- /dev/null
@@ -0,0 +1,18 @@
+layer at (0,0) size 480x360
+  RenderView at (0,0) size 480x360
+layer at (0,0) size 480x360
+  RenderSVGRoot {svg} at (0,0) size 480x360
+    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+    RenderSVGContainer {g} at (10,13) size 470x347
+      RenderSVGText {text} at (10,13) size 346x21 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 346x21
+          chunk 1 text run 1 at (10.00,30.00) startOffset 0 endOffset 40 width 346.00: "Test that getBBox() works before SVGLoad"
+      RenderSVGPath {rect} at (10,40) size 50x50 [fill={[type=SOLID] [color=#008000]}] [x=10.00] [y=40.00] [width=50.00] [height=50.00]
+      RenderSVGText {text} at (1000,983) size 31x21 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 31x21
+          chunk 1 text run 1 at (1000.00,1000.00) startOffset 0 endOffset 3 width 31.00: "Abc"
+    RenderSVGContainer {g} at (10,310) size 231x37
+      RenderSVGText {text} at (10,310) size 231x37 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 231x37
+          chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 231.00: "$Revision: 1.7 $"
+    RenderSVGPath {rect} at (0,0) size 480x360 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.checksum b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.checksum
new file mode 100644 (file)
index 0000000..b5fc17a
--- /dev/null
@@ -0,0 +1 @@
+dfc0a9a72238773656a655694b96b85d
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.png b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.png
new file mode 100644 (file)
index 0000000..d059986
Binary files /dev/null and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.txt b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.txt
new file mode 100644 (file)
index 0000000..661d920
--- /dev/null
@@ -0,0 +1,74 @@
+layer at (0,0) size 480x360
+  RenderView at (0,0) size 480x360
+layer at (0,0) size 480x360
+  RenderSVGRoot {svg} at (0,0) size 480x360
+    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+    RenderSVGContainer {g} at (10,13) size 430x279
+      RenderSVGText {text} at (10,13) size 301x21 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 301x21
+          chunk 1 text run 1 at (10.00,30.00) startOffset 0 endOffset 35 width 301.00: "Testing liveness of SVG DOM objects"
+      RenderSVGContainer {g} at (90,40) size 350x252 [transform={m=((0.00,1.00)(-1.00,0.00)) t=(500.00,0.00)}]
+        RenderSVGPath {rect} at (420,40) size 20x20 [fill={[type=SOLID] [color=#008000]}] [x=40.00] [y=60.00] [width=20.00] [height=20.00]
+        RenderSVGText {text} at (70,62) size 162x16 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 162x16
+            chunk 1 text run 1 at (70.00,75.00) startOffset 0 endOffset 21 width 162.00: "SVGAnimatedNumberList"
+        RenderSVGPath {rect} at (390,40) size 20x20 [fill={[type=SOLID] [color=#008000]}] [x=40.00] [y=90.00] [width=20.00] [height=20.00]
+        RenderSVGText {text} at (70,92) size 133x16 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 133x16
+            chunk 1 text run 1 at (70.00,105.00) startOffset 0 endOffset 17 width 133.00: "SVGAnimatedLength"
+        RenderSVGPath {rect} at (360,40) size 20x20 [fill={[type=SOLID] [color=#008000]}] [x=40.00] [y=120.00] [width=20.00] [height=20.00]
+        RenderSVGText {text} at (70,122) size 155x16 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 155x16
+            chunk 1 text run 1 at (70.00,135.00) startOffset 0 endOffset 21 width 155.00: "SVGAnimatedLengthList"
+        RenderSVGPath {rect} at (330,40) size 20x20 [fill={[type=SOLID] [color=#008000]}] [x=40.00] [y=150.00] [width=20.00] [height=20.00]
+        RenderSVGText {text} at (70,152) size 125x16 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 125x16
+            chunk 1 text run 1 at (70.00,165.00) startOffset 0 endOffset 16 width 125.00: "SVGAnimatedAngle"
+        RenderSVGPath {rect} at (300,40) size 20x20 [fill={[type=SOLID] [color=#008000]}] [x=40.00] [y=180.00] [width=20.00] [height=20.00]
+        RenderSVGText {text} at (70,182) size 118x16 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 118x16
+            chunk 1 text run 1 at (70.00,195.00) startOffset 0 endOffset 15 width 118.00: "SVGAnimatedRect"
+        RenderSVGPath {rect} at (270,40) size 20x20 [fill={[type=SOLID] [color=#008000]}] [x=40.00] [y=210.00] [width=20.00] [height=20.00]
+        RenderSVGText {text} at (70,212) size 177x16 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 177x16
+            chunk 1 text run 1 at (70.00,225.00) startOffset 0 endOffset 24 width 177.00: "SVGAnimatedTransformList"
+        RenderSVGPath {rect} at (240,40) size 20x20 [fill={[type=SOLID] [color=#008000]}] [x=40.00] [y=240.00] [width=20.00] [height=20.00]
+        RenderSVGText {text} at (70,242) size 222x16 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 222x16
+            chunk 1 text run 1 at (70.00,255.00) startOffset 0 endOffset 30 width 222.00: "SVGAnimatedPreserveAspectRatio"
+        RenderSVGPath {rect} at (210,40) size 20x20 [fill={[type=SOLID] [color=#008000]}] [x=40.00] [y=270.00] [width=20.00] [height=20.00]
+        RenderSVGText {text} at (70,272) size 141x16 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 141x16
+            chunk 1 text run 1 at (70.00,285.00) startOffset 0 endOffset 18 width 141.00: "SVGAnimatedBoolean"
+        RenderSVGPath {rect} at (180,40) size 20x20 [fill={[type=SOLID] [color=#008000]}] [x=40.00] [y=300.00] [width=20.00] [height=20.00]
+        RenderSVGText {text} at (70,302) size 126x16 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 126x16
+            chunk 1 text run 1 at (70.00,315.00) startOffset 0 endOffset 17 width 126.00: "SVGAnimatedString"
+        RenderSVGPath {rect} at (150,40) size 20x20 [fill={[type=SOLID] [color=#008000]}] [x=40.00] [y=330.00] [width=20.00] [height=20.00]
+        RenderSVGText {text} at (70,332) size 170x16 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 170x16
+            chunk 1 text run 1 at (70.00,345.00) startOffset 0 endOffset 22 width 170.00: "SVGAnimatedEnumeration"
+        RenderSVGPath {rect} at (120,40) size 20x20 [fill={[type=SOLID] [color=#008000]}] [x=40.00] [y=360.00] [width=20.00] [height=20.00]
+        RenderSVGText {text} at (70,362) size 134x16 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 134x16
+            chunk 1 text run 1 at (70.00,375.00) startOffset 0 endOffset 18 width 134.00: "SVGAnimatedInteger"
+        RenderSVGPath {rect} at (90,40) size 20x20 [fill={[type=SOLID] [color=#008000]}] [x=40.00] [y=390.00] [width=20.00] [height=20.00]
+        RenderSVGText {text} at (70,392) size 140x16 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 140x16
+            chunk 1 text run 1 at (70.00,405.00) startOffset 0 endOffset 17 width 140.00: "SVGAnimatedNumber"
+      RenderSVGHiddenContainer {g} at (0,0) size 0x0
+        RenderSVGText {text} at (10,-17) size 35x25 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 35x25
+            chunk 1 text run 1 at (10.00,0.00) startOffset 0 endOffset 1 width 10.00: "a"
+            chunk 1 text run 2 at (20.00,0.00) startOffset 1 endOffset 2 width 10.00: "b"
+            chunk 1 text run 3 at (30.00,0.00) startOffset 2 endOffset 3 width 9.00: "c"
+        RenderSVGPath {circle} at (0,0) size 100x100 [fill={[type=SOLID] [color=#000000]}] [cx=0.00] [cy=0.00] [r=100.00]
+        RenderSVGResourceMarker {marker} [id="marker"] [markerUnits=strokeWidth] [ref at (0,0)] [angle=60.00]
+        RenderSVGViewportContainer {svg} at (0,0) size 0x0
+        RenderSVGResourceFilter {filter} [id=""] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+          [feTurbulence type="TURBULANCE" baseFrequency="4.00, 5.00" seed="0.00" numOctaves="1" stitchTiles="0"]
+    RenderSVGContainer {g} at (10,310) size 231x37
+      RenderSVGText {text} at (10,310) size 231x37 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 231x37
+          chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 231.00: "$Revision: 1.7 $"
+    RenderSVGPath {rect} at (0,0) size 480x360 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.checksum b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.checksum
new file mode 100644 (file)
index 0000000..d3fac77
--- /dev/null
@@ -0,0 +1 @@
+f5fb7b810d10db343299888950fb87f9
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.png b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.png
new file mode 100644 (file)
index 0000000..3de6416
Binary files /dev/null and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.txt b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.txt
new file mode 100644 (file)
index 0000000..66c39c0
--- /dev/null
@@ -0,0 +1,31 @@
+layer at (0,0) size 480x360
+  RenderView at (0,0) size 480x360
+layer at (0,0) size 480x360
+  RenderSVGRoot {svg} at (0,0) size 480x360
+    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+    RenderSVGContainer {g} at (10,13) size 368x177
+      RenderSVGText {text} at (10,13) size 368x21 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 368x21
+          chunk 1 text run 1 at (10.00,30.00) startOffset 0 endOffset 47 width 368.00: "Test side effects of assigning to valueAsString"
+      RenderSVGPath {rect} at (10,40) size 30x30 [fill={[type=SOLID] [color=#008000]}] [x=10.00] [y=40.00] [width=30.00] [height=30.00]
+      RenderSVGPath {rect} at (10,80) size 30x30 [fill={[type=SOLID] [color=#008000]}] [x=10.00] [y=80.00] [width=30.00] [height=30.00]
+      RenderSVGPath {rect} at (10,120) size 30x30 [fill={[type=SOLID] [color=#008000]}] [x=10.00] [y=120.00] [width=30.00] [height=30.00]
+      RenderSVGPath {rect} at (10,160) size 30x30 [fill={[type=SOLID] [color=#008000]}] [x=10.00] [y=160.00] [width=30.00] [height=30.00]
+      RenderSVGContainer {g} at (50,46) size 182x137
+        RenderSVGText {text} at (50,46) size 172x17 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 172x17
+            chunk 1 text run 1 at (50.00,60.00) startOffset 0 endOffset 25 width 172.00: "Valid string on SVGLength"
+        RenderSVGText {text} at (50,86) size 182x17 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 182x17
+            chunk 1 text run 1 at (50.00,100.00) startOffset 0 endOffset 27 width 182.00: "Invalid string on SVGLength"
+        RenderSVGText {text} at (50,126) size 165x17 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 165x17
+            chunk 1 text run 1 at (50.00,140.00) startOffset 0 endOffset 24 width 165.00: "Valid string on SVGAngle"
+        RenderSVGText {text} at (50,166) size 175x17 contains 1 chunk(s)
+          RenderSVGInlineText {#text} at (0,0) size 175x17
+            chunk 1 text run 1 at (50.00,180.00) startOffset 0 endOffset 26 width 175.00: "Invalid string on SVGAngle"
+    RenderSVGContainer {g} at (10,310) size 231x37
+      RenderSVGText {text} at (10,310) size 231x37 contains 1 chunk(s)
+        RenderSVGInlineText {#text} at (0,0) size 231x37
+          chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 231.00: "$Revision: 1.6 $"
+    RenderSVGPath {rect} at (0,0) size 480x360 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
diff --git a/LayoutTests/svg/W3C-SVG-1.1-SE/coords-dom-01-f.svg b/LayoutTests/svg/W3C-SVG-1.1-SE/coords-dom-01-f.svg
new file mode 100644 (file)
index 0000000..4f7d7bd
--- /dev/null
@@ -0,0 +1,115 @@
+<svg id="svg-root" width="100%" height="100%" 
+  viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg" 
+  xmlns:xlink="http://www.w3.org/1999/xlink">
+  <!--======================================================================-->
+  <!--=  Copyright 2008 World Wide Web Consortium, (Massachusetts          =-->
+  <!--=  Institute of Technology, European Research Consortium for         =-->
+  <!--=  Informatics and Mathematics (ERCIM), Keio University).            =-->
+  <!--=  All Rights Reserved.                                              =-->
+  <!--=  See http://www.w3.org/Consortium/Legal/.                          =-->
+  <!--======================================================================-->
+  <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
+    template-version="1.4" reviewer="CM" author="ED" status="accepted"
+    version="$Revision: 1.7 $" testname="$RCSfile: coords-dom-01-f.svg,v $">
+    <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/coords.html#DOMInterfaces">
+      <p>
+        Tests the liveness of SVGTransform.matrix.
+      </p>
+    </d:testDescription>
+    <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
+      <p>
+        Load the svg, you should see a green circle.
+      </p>
+    </d:operatorScript>
+    <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
+      <p>
+        The test has passed if:
+      </p>
+      <ul>
+        <li>There is no red visible</li>
+        <li>There is a green circle visible</li>
+      </ul>
+    </d:passCriteria>
+  </d:SVGTestCase>
+  <title id="test-title">$RCSfile: coords-dom-01-f.svg,v $</title>
+  <defs>
+    <font-face
+      font-family="SVGFreeSansASCII"
+      unicode-range="U+0-7F">
+      <font-face-src>
+        <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
+      </font-face-src>
+    </font-face>
+  </defs>
+  <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+    
+    
+    <g transform="translate(240 180)">
+      <g id="reference">
+        <circle r="40" fill="red"/>
+      </g>
+    
+      <g id="g" transform="translate(20 20)">
+        <circle id="c" r="40" fill="blue"/>
+      </g>
+    </g>   
+    
+    <script type="text/ecmascript"><![CDATA[
+      var eps = 1 / 65535; // 16.16 fixpoint epsilon
+      var passed = false;
+      
+      function isequal( value, expected, epsilon )
+      {
+        return(Math.abs(value - expected) < epsilon);
+      }
+      try
+      {
+        var g = document.getElementById("g");
+        var c = document.getElementById("c");
+        var tfm = g.transform.baseVal.getItem(0);
+        var mtx = tfm.matrix;
+        tfm.setTranslate(300,200);
+        if(tfm.type == SVGTransform.SVG_TRANSFORM_TRANSLATE &&
+           isequal(mtx.e, 300, eps) && isequal(mtx.f, 200, eps))
+        {
+          tfm.setScale(4,4);
+          if(tfm.type == SVGTransform.SVG_TRANSFORM_SCALE &&
+             isequal(mtx.a, 4, eps) && isequal(mtx.d, 4, eps))
+          {
+            tfm.setRotate(90,0,0);
+            if(tfm.type == SVGTransform.SVG_TRANSFORM_ROTATE &&
+               isequal(mtx.a, Math.cos(Math.PI/2), eps) && isequal(mtx.b, Math.sin(Math.PI/2), eps) &&
+               isequal(mtx.c, -Math.sin(Math.PI/2), eps) && isequal(mtx.d, Math.cos(Math.PI/2), eps) &&
+               isequal(mtx.e, 0, eps) && isequal(mtx.f, 0, eps))
+            {
+              passed = true;
+            }
+          }
+        }
+      }
+      catch(e) {}
+      
+      if(passed)
+      {
+        c.setAttribute("fill", "lime");
+      }
+      else
+      {
+        c.setAttribute("fill", "red");
+      }
+    ]]></script>
+        
+  </g>
+  <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+  <text id="revision" x="10" y="340" stroke="none" 
+    fill="black">$Revision: 1.7 $</text>
+  </g>
+  <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+  <!-- comment out this watermark once the test is approved --><!--
+  <g id="draft-watermark">
+    <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+    <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" 
+      text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+  </g>-->
+</svg>
diff --git a/LayoutTests/svg/W3C-SVG-1.1-SE/coords-dom-02-f.svg b/LayoutTests/svg/W3C-SVG-1.1-SE/coords-dom-02-f.svg
new file mode 100644 (file)
index 0000000..7222847
--- /dev/null
@@ -0,0 +1,96 @@
+<svg id="svg-root" width="100%" height="100%" 
+  viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg" 
+  xmlns:xlink="http://www.w3.org/1999/xlink">
+  <!--======================================================================-->
+  <!--=  Copyright 2008 World Wide Web Consortium, (Massachusetts          =-->
+  <!--=  Institute of Technology, European Research Consortium for         =-->
+  <!--=  Informatics and Mathematics (ERCIM), Keio University).            =-->
+  <!--=  All Rights Reserved.                                              =-->
+  <!--=  See http://www.w3.org/Consortium/Legal/.                          =-->
+  <!--======================================================================-->
+  <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
+    template-version="1.4" reviewer="CM" author="ED" status="accepted"
+    version="$Revision: 1.7 $" testname="$RCSfile: coords-dom-02-f.svg,v $">
+    <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/coords.html#InterfaceSVGTransform">
+        <p>
+          Tests the liveness of SVGTransform.matrix, that the SVGTransform object is updated when the SVGTransform.matrix object is changed.
+        </p>
+    </d:testDescription>
+    <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
+      <p>
+        Run the test. No interaction required.
+      </p>
+    </d:operatorScript>
+    <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
+      <p>
+        The test has passed if:
+      </p>
+      <ul>
+        <li>There is no red visible</li>
+        <li>There is a green ellipse visible</li>
+      </ul>
+    </d:passCriteria>
+  </d:SVGTestCase>
+  <title id="test-title">$RCSfile: coords-dom-02-f.svg,v $</title>
+  <defs>
+    <font-face
+      font-family="SVGFreeSansASCII"
+      unicode-range="U+0-7F">
+      <font-face-src>
+        <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
+      </font-face-src>
+    </font-face>
+  </defs>
+  <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+    
+    
+    <g transform="translate(220 160)">
+      <g id="reference">
+        <circle r="40" fill="red" transform="translate(20 20) scale(2 1)"/>
+      </g>
+    
+      <g id="g" transform="translate(20 20)">
+        <circle id="c" r="40" fill="blue"/>
+      </g>
+    </g>   
+    
+    <script type="text/ecmascript"><![CDATA[
+      var passed = false;
+      
+      try
+      {
+        var g = document.getElementById("g");
+        var c = document.getElementById("c");
+        var tfm = g.transform.baseVal.getItem(0);
+        var mtx = tfm.matrix;
+        mtx.a = 2;
+        if(tfm.type == SVGTransform.SVG_TRANSFORM_MATRIX)
+        {
+          passed = true;
+        }
+      }
+      catch(e) {}
+      
+      if(passed)
+      {
+        c.setAttribute("fill", "lime");
+      }
+      else
+      {
+        c.setAttribute("fill", "red");
+      }
+    ]]></script>
+        
+  </g>
+  <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+  <text id="revision" x="10" y="340" stroke="none" 
+    fill="black">$Revision: 1.7 $</text>
+  </g>
+  <rect xml:id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+  <!-- comment out this watermark once the test is approved --><!--
+  <g id="draft-watermark">
+    <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+    <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240" 
+      text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+  </g>-->
+</svg>
diff --git a/LayoutTests/svg/W3C-SVG-1.1-SE/coords-dom-03-f.svg b/LayoutTests/svg/W3C-SVG-1.1-SE/coords-dom-03-f.svg
new file mode 100644 (file)
index 0000000..b44d16c
--- /dev/null
@@ -0,0 +1,116 @@
+<svg id="svg-root" width="100%" height="100%"
+  viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+  xmlns:xlink="http://www.w3.org/1999/xlink">
+  <!--======================================================================-->
+  <!--=  Copyright 2008 World Wide Web Consortium, (Massachusetts          =-->
+  <!--=  Institute of Technology, European Research Consortium for         =-->
+  <!--=  Informatics and Mathematics (ERCIM), Keio University).            =-->
+  <!--=  All Rights Reserved.                                              =-->
+  <!--=  See http://www.w3.org/Consortium/Legal/.                          =-->
+  <!--======================================================================-->
+  <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
+    template-version="1.3" reviewer="ED" author="CM" status="accepted"
+    version="$Revision: 1.7 $" testname="$RCSfile: coords-dom-03-f.svg,v $">
+    <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/coords.html#InterfaceSVGTransformList">
+        <p>
+          This tests that SVGTransformList.createSVGTransformFromMatrix(),
+          SVGSVGElement.createSVGTransformFromMatrix() and SVGTransform.setMatrix()
+          all do not track changes to the SVGMatrix passed to them.
+        </p>
+        <p>
+        After loading the test, three rectangles will be presented.  The
+        upper rectangle indicates the result of testing whether
+        SVGTransformList.createSVGTransformFromMatrix() behaved correctly,
+        the middle rectangle indicates the status for SVGSVGElement.createSVGTransformFromMatrix(),
+        and the bottom rectangle for SVGTransform.setMatrix().
+      </p>
+    </d:testDescription>
+    <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
+      <p>
+        Run the test. No interaction required.
+      </p>
+    </d:operatorScript>
+    <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
+      <p>
+        The test is passed if the three rectangles are green.
+      </p>
+    </d:passCriteria>
+  </d:SVGTestCase>
+  <title id="test-title">$RCSfile: coords-dom-03-f.svg,v $</title>
+  <defs>
+    <font-face
+      font-family="SVGFreeSansASCII"
+      unicode-range="U+0-7F">
+      <font-face-src>
+        <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
+      </font-face-src>
+    </font-face>
+  </defs>
+  <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+
+    <text x='10' y='30' font-size='14'>Test that some methods taking an SVGMatrix take a copy of it</text>
+
+    <rect id='r1' x='10' y='50' width='50' height='50'/>
+    <rect id='r2' x='10' y='110' width='50' height='50'/>
+    <rect id='r3' x='10' y='170' width='50' height='50'/>
+    <g font-size='10'>
+      <text x='70' y='80'>SVGTransformList.createSVGTransformFromMatrix()</text>
+      <text x='70' y='140'>SVGSVGElement.createSVGTransformFromMatrix()</text>
+      <text x='70' y='200'>SVGTransform.setMatrix()</text>
+    </g>
+
+    <g id='g' transform='scale(5)'/>
+
+    <script><![CDATA[
+      var svg = document.documentElement,
+          g = document.getElementById('g'),
+          r1 = document.getElementById('r1'),
+          r2 = document.getElementById('r2'),
+          r3 = document.getElementById('r3');
+
+      var m1 = svg.createSVGMatrix(),
+          m2 = svg.createSVGMatrix(),
+          m3 = svg.createSVGMatrix();
+
+      var t;
+
+      m1.a = 3; m1.b = 0; m1.c = 0; m1.d = 1; m1.e = 0; m1.f = 0;
+      m2.a = 3; m2.b = 0; m2.c = 0; m2.d = 1; m2.e = 0; m2.f = 0;
+      m3.a = 3; m3.b = 0; m3.c = 0; m3.d = 1; m3.e = 0; m3.f = 0;
+
+      try {
+        t = g.transform.baseVal.createSVGTransformFromMatrix(m1);
+        m1.a = 2;
+        r1.setAttribute('fill', t.matrix != m1 && t.matrix.a == 3 ? 'lime' : 'red');
+      } catch (e) {
+      }
+
+      try {
+        t = svg.createSVGTransformFromMatrix(m2);
+        m2.a = 2;
+        r2.setAttribute('fill', t.matrix != m2 && t.matrix.a == 3 ? 'lime' : 'red');
+      } catch (e) {
+      }
+
+      try {
+        t = g.transform.baseVal.getItem(0);
+        t.setMatrix(m3);
+        m3.a = 2;
+        r3.setAttribute('fill', t.matrix != m3 && t.matrix.a == 3 ? 'lime' : 'red');
+      } catch (e) {
+      }
+    ]]></script>
+
+  </g>
+  <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+    <text id="revision" x="10" y="340" stroke="none"
+      fill="black">$Revision: 1.7 $</text>
+  </g>
+  <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+  <!-- comment out this watermark once the test is approved -->
+  <!--<g id="draft-watermark">
+    <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+    <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+      text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+  </g>-->
+</svg>
diff --git a/LayoutTests/svg/W3C-SVG-1.1-SE/coords-dom-04-f.svg b/LayoutTests/svg/W3C-SVG-1.1-SE/coords-dom-04-f.svg
new file mode 100644 (file)
index 0000000..9e620bc
--- /dev/null
@@ -0,0 +1,166 @@
+<svg id="svg-root" width="100%" height="100%"
+  viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+  xmlns:xlink="http://www.w3.org/1999/xlink" onload="test()">
+  <!--======================================================================-->
+  <!--=  Copyright 2008 World Wide Web Consortium, (Massachusetts          =-->
+  <!--=  Institute of Technology, European Research Consortium for         =-->
+  <!--=  Informatics and Mathematics (ERCIM), Keio University).            =-->
+  <!--=  All Rights Reserved.                                              =-->
+  <!--=  See http://www.w3.org/Consortium/Legal/.                          =-->
+  <!--======================================================================-->
+  <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
+    template-version="1.4" reviewer="CL" author="ED" status="accepted"
+    version="$Revision: 1.5 $" testname="$RCSfile: coords-dom-04-f.svg,v $">
+    <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/coords.html#InterfaceSVGTransformList">
+      <p>
+               The test checks the SVGTransformList.consolidate method.
+      </p>
+    </d:testDescription>
+    <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
+      <p>
+        Run the test. No interaction required.
+      </p>
+    </d:operatorScript>
+    <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
+      <p>
+               There must be 13 green rectangles visible. 
+               The text next to the first rectangle must say "Scripting enabled".
+               The other 12 lines must each say "Passed subtest #n" where n is the subtest number 1..12.
+               If anything red shows, the test has failed.
+      </p>
+    </d:passCriteria>
+  </d:SVGTestCase>
+  <title id="test-title">$RCSfile: coords-dom-04-f.svg,v $</title>
+  <defs>
+    <font-face
+      font-family="SVGFreeSansASCII"
+      unicode-range="U+0-7F">
+      <font-face-src>
+        <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
+      </font-face-src>
+    </font-face>
+  </defs>
+  <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+       <defs>
+               <style>
+                       #test-body-content rect { stroke: black; }
+               </style>
+               <script type="text/ecmascript"><![CDATA[
+               var pos = { "x": 20, "y": 40 };
+               var subtestCounter = 1;
+               var passed = true;
+               
+               function toString(m)
+               {       
+                       var decimals = 0;
+                       return m.a.toFixed(decimals) + "," + 
+                                  m.b.toFixed(decimals) + "," + 
+                                  m.c.toFixed(decimals) + "," + 
+                                  m.d.toFixed(decimals) + "," + 
+                                  m.e.toFixed(decimals) + "," + 
+                                  m.f.toFixed(decimals);
+               }
+
+               function referenceEqual(m1,ref,eps)
+               {
+                       return (Math.abs(m1.a-ref[0]) < eps &&
+                                       Math.abs(m1.b-ref[1]) < eps &&
+                                       Math.abs(m1.c-ref[2]) < eps &&
+                                       Math.abs(m1.d-ref[3]) < eps &&
+                                       Math.abs(m1.e-ref[4]) < eps &&
+                                       Math.abs(m1.f-ref[5]) < eps);
+               }
+
+               function assertEquals(m, ref, eps)
+               {
+                       var result = document.createElementNS("http://www.w3.org/2000/svg", "text");
+                       var resultrect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
+                       result.setAttribute("x", pos.x);
+                       result.setAttribute("y", pos.y);
+                       resultrect.setAttribute("fill", "lime");
+                       resultrect.setAttribute("width", 15);
+                       resultrect.setAttribute("height", 15);
+                       resultrect.setAttribute("y", pos.y-15);
+                       
+                       if(referenceEqual(m, ref, eps))
+                       {       
+                               result.textContent = "Passed subtest #" + subtestCounter;
+                       }
+                       else
+                       {
+                               passed = false;
+                               result.textContent = "Failed subtest #" + subtestCounter + ". Expected " + ref + " but got " + toString(m);
+                       }
+                       pos.y += 20;
+                       subtestCounter++;
+                       var results = document.getElementById("subteststatus");
+                       results.appendChild(resultrect)
+                       results.appendChild(result);
+               }
+               
+               function test()
+               {
+                       eps = 0.005; // "close enough"
+                       r = document.getElementById("r");
+
+                       t1 = r.transform.baseVal.getItem(0);
+                       t2 = r.transform.baseVal.getItem(1);
+                       
+                       // check that matrices are as specified in the markup
+                       assertEquals(t1.matrix, [1, 0, 0, 1, 10, 10], eps);
+                       assertEquals(t2.matrix, [0, 1, -1, 0, 0, 0], eps);
+
+                       // consolidate
+                       tfm = r.transform.baseVal.consolidate();
+                       
+                       // check that the consolidation is ok
+                       assertEquals(tfm.matrix, [0, 1, -1, 0, 10, 10], eps);
+                       
+                       // check that t1 and t2 were not affected by the consolidation
+                       assertEquals(t1.matrix, [1, 0, 0, 1, 10, 10], eps);
+                       assertEquals(t2.matrix, [0, 1, -1, 0, 0, 0], eps);
+                       
+                       // check that modifying t1 has no effect on the consolidated transform
+                       t1.setTranslate(10,200);
+                       assertEquals(t1.matrix, [1, 0, 0, 1, 10, 200], eps);
+                       assertEquals(tfm.matrix, [0, 1, -1, 0, 10, 10], eps);
+                       
+                       // check that modifying t2 has no effect on the consolidated transform
+                       t2.setRotate(-90, 0, 0);
+                       assertEquals(t2.matrix, [0, -1, 1, 0, 0, 0], eps);
+                       assertEquals(tfm.matrix, [0, 1, -1, 0, 10, 10], eps);
+                       
+                       // check that modifying the consolidated transform has no effect on the t1 and t2 transforms
+                       tfm.matrix.f = 400;
+                       assertEquals(tfm.matrix, [0, 1, -1, 0, 10, 400], eps);
+                       assertEquals(t1.matrix, [1, 0, 0, 1, 10, 200], eps);
+                       assertEquals(t2.matrix, [0, -1, 1, 0, 0, 0], eps);
+               
+                       document.getElementById("status").setAttributeNS(null, "fill", passed ? "lime" : "red");
+                       document.getElementById("scriptstatus").textContent = "Scripting enabled";
+               }
+       
+       ]]></script>
+       </defs>
+
+       <g transform="translate(20 -10)">
+               <g id="subteststatus" transform="translate(0,40)">
+                       <rect id="status" y="5" width="15" height="15" fill="red"/>
+                       <text id="scriptstatus" y="20" x="20" >Scripting disabled</text>
+               </g>
+       
+               <polyline id="r" fill="none" stroke="green" display="none" transform="translate(10 10) rotate(90)" points="0 0 30 40 80 -20" stroke-width="10"/>
+       </g>
+  </g>
+  <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+    <text id="revision" x="10" y="340" stroke="none"
+      fill="black">$Revision: 1.5 $</text>
+  </g>
+  <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+  <!-- comment out this watermark once the test is approved --><!--
+  <g id="draft-watermark">
+    <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+    <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+      text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+  </g>-->
+</svg>
diff --git a/LayoutTests/svg/W3C-SVG-1.1-SE/types-dom-01-b.svg b/LayoutTests/svg/W3C-SVG-1.1-SE/types-dom-01-b.svg
new file mode 100644 (file)
index 0000000..60093ac
--- /dev/null
@@ -0,0 +1,107 @@
+<svg version="1.1" baseProfile="tiny" onload="testSVGLocatable()" id="svg-root"
+  width="100%" height="100%" viewBox="0 0 480 360"
+  xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+  <!--======================================================================-->
+  <!--=  SVG 1.1 2nd Edition Test Case                                     =-->
+  <!--======================================================================-->
+  <!--=  Copyright 2009 World Wide Web Consortium, (Massachusetts          =-->
+  <!--=  Institute of Technology, European Research Consortium for         =-->
+  <!--=  Informatics and Mathematics (ERCIM), Keio University).            =-->
+  <!--=  All Rights Reserved.                                              =-->
+  <!--=  See http://www.w3.org/Consortium/Legal/.                          =-->
+  <!--======================================================================-->
+  <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
+    template-version="1.3" reviewer="AE,ED" author="AN" status="accepted"
+    version="$Revision: 1.6 $" testname="$RCSfile: types-dom-01-b.svg,v $">
+    <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/types.html#BasicDOMInterfaces">
+      <p>
+        This test checks all the methods and properties of the SVGLocatable interface.
+        Note the use of nested svg elements and testing against different elements in the hierarchy.
+        Note that the values of .getScreenCTM() and .getCTM() can only be tested correctly if they are
+        in the html-based test or the width and height of the root element is explicitly set to 480x360.
+        The methods .getScreenCTM() and .getCTM() are tested from the rotated text element, the method .getBBox(),
+        .getTransformToElement() is tested between the rotated text and its parent group, the method .getBBox() and
+        the properties .farthestViewportElement and .nearestViewportElement are tested on the blue circle.
+      </p>
+    </d:testDescription>
+    <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
+      <p>
+        Run the test. No interaction required. Make sure scripting is enabled.
+      </p>
+    </d:operatorScript>
+    <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
+      <p>
+        For the test to pass, the values generated by script must match the values provided in the png image. The correct values are:
+      </p>
+      <p>
+        .getScreenCTM() for id "rotText": 0.42,0.42,-0.42,0.42,70.00,-60.00
+      </p>
+      <p>
+        .getCTM() for id "rotText": 0.42,0.42,-0.42,0.42,70.00,-60.00
+      </p>
+      <p>
+        .getTransformToElement() between id "rotText" and id "parentGroup": 0.42,0.42,-0.42,0.42,0.00,0.00
+      </p>
+      <p>
+        .getBBox() for 'blueCircle': .x=-50,.y=-50,.width=100,.height=100
+      </p>
+      <p>
+        .farthestViewportElement of blueCircle=svg-root
+      </p>
+      <p>
+        .nearestViewportElement of blueCircle=nestedSVG
+      </p>
+    </d:passCriteria>
+  </d:SVGTestCase>
+  <title id="test-title">$RCSfile: types-dom-01-b.svg,v $</title>
+  <defs>
+    <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+      <font-face-src>
+        <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
+      </font-face-src>
+    </font-face>
+  </defs>
+  <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+    <script type="text/ecmascript">
+      function testSVGLocatable() {
+      var rotText = document.getElementById("rotatedText");
+      var blueCircle = document.getElementById("blueCircle")
+      var matr = rotText.getScreenCTM();
+      document.getElementById("result1").firstChild.nodeValue = ".getScreenCTM(): " + matr.a.toFixed(2) + "," + matr.b.toFixed(2) + "," + matr.c.toFixed(2) + "," + matr.d.toFixed(2) + "," + matr.e.toFixed(2) + "," + matr.f.toFixed(2);
+      var matr = rotText.getCTM();
+      document.getElementById("result2").firstChild.nodeValue = ".getCTM(): " + matr.a.toFixed(2) + "," + matr.b.toFixed(2) + "," + matr.c.toFixed(2) + "," + matr.d.toFixed(2) + "," + matr.e.toFixed(2) + "," + matr.f.toFixed(2);
+      var matr = rotText.getTransformToElement(document.getElementById("parentGroup"));
+      document.getElementById("result3").firstChild.nodeValue = ".getTransformToElement(): " + matr.a.toFixed(2) + "," + matr.b.toFixed(2) + "," + matr.c.toFixed(2) + "," + matr.d.toFixed(2) + "," + matr.e.toFixed(2) + "," + matr.f.toFixed(2);
+      var bbox = blueCircle.getBBox();
+      document.getElementById("result4").firstChild.nodeValue = ".getBBox() for 'blueCircle': .x="+bbox.x+",.y="+bbox.y+",.width="+bbox.width+",.height="+bbox.height;
+      document.getElementById("result5").firstChild.nodeValue = ".farthestViewportElement of blueCircle="+blueCircle.farthestViewportElement.getAttributeNS(null,"id");
+      document.getElementById("result6").firstChild.nodeValue = ".nearestViewportElement of blueCircle="+blueCircle.nearestViewportElement.getAttributeNS(null,"id");
+      }
+    </script>
+    <g font-size="12">
+      <g id="parentGroup" transform="translate(70,-60)">
+        <text id="rotatedText" transform="scale(0.6),rotate(45)" font-size="20" x="30" y="150">Rotated Text for testing SVGLocatable</text>
+        <text id="otherText" transform="scale(0.7)" font-size="20" x="100" y="130">Some other text with id 'otherText'</text>
+        <svg id="nestedSVG" x="200" y="100" width="110" height="110" viewBox="-55 -55 110 110">
+          <circle id="blueCircle" cx="0" cy="0" r="50" fill="blue"/>
+        </svg>
+      </g>
+      <text id="result1" x="10" y="200"> </text>
+      <text id="result2" x="10" y="220"> </text>
+      <text id="result3" x="10" y="240"> </text>
+      <text id="result4" x="10" y="260"> </text>
+      <text id="result5" x="10" y="280"> </text>
+      <text id="result6" x="10" y="300"> </text>
+    </g>
+  </g>
+  <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+    <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text>
+  </g>
+  <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+  <!-- comment out this watermark once the test is approved -->
+  <!--<g id="draft-watermark">
+    <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+    <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+      text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+  </g>-->
+</svg>
diff --git a/LayoutTests/svg/W3C-SVG-1.1-SE/types-dom-02-f.svg b/LayoutTests/svg/W3C-SVG-1.1-SE/types-dom-02-f.svg
new file mode 100644 (file)
index 0000000..cac86de
--- /dev/null
@@ -0,0 +1,156 @@
+<svg id="svg-root" width="100%" height="100%"
+  viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+  xmlns:xlink="http://www.w3.org/1999/xlink">
+  <!--======================================================================-->
+  <!--=  Copyright 2008 World Wide Web Consortium, (Massachusetts          =-->
+  <!--=  Institute of Technology, European Research Consortium for         =-->
+  <!--=  Informatics and Mathematics (ERCIM), Keio University).            =-->
+  <!--=  All Rights Reserved.                                              =-->
+  <!--=  See http://www.w3.org/Consortium/Legal/.                          =-->
+  <!--======================================================================-->
+  <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
+    template-version="1.3" reviewer="CL" author="CM" status="accepted"
+    version="$Revision: 1.8 $" testname="$RCSfile: types-dom-02-f.svg,v $">
+    <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/types.html#BasicDOMInterfaces">
+      <p>
+        This tests that the animVal properties that are objects
+        are always distinct from their corresponding baseVal properties.
+        This is tested for interfaces SVGAnimatedNumberList, SVGAnimatedLength,
+        SVGAnimatedLengthList, SVGAnimatedAngle, SVGAnimatedRect,
+        SVGAnimatedTransformList and SVGAnimatedPreserveAspectRatio.
+      </p>
+    </d:testDescription>
+    <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
+      <p>
+        Run the test. No interaction required.
+      </p>
+    </d:operatorScript>
+    <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
+      <p>
+        Once loaded, the test shows 7 rectangles
+        representing seven sub-tests reflecting
+        the result of checking that an animVal object is
+        not the same object as its corresponding baseVal object.
+        Each rectangle will be either black to indicate that
+        the sub-test wasn't run, red to indicate that the
+        sub-test failed, and green to indicate that the
+        sub-test passed.
+      </p>
+      <p>
+        The test is passed if all 7 rectangles are green.
+      </p>
+    </d:passCriteria>
+  </d:SVGTestCase>
+  <title id="test-title">$RCSfile: types-dom-02-f.svg,v $</title>
+  <defs>
+    <font-face
+      font-family="SVGFreeSansASCII"
+      unicode-range="U+0-7F">
+      <font-face-src>
+        <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
+      </font-face-src>
+    </font-face>
+  </defs>
+  <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+
+    <text x='210' y='55' text-anchor='end'>animVal != baseVal:</text>
+
+    <g font-size='14' transform='translate(500)rotate(90)'>
+      <rect id='r1b' x='40' y='60' width='20' height='20'/>
+      <text x='70' y='75'>SVGAnimatedNumberList</text>
+      <rect id='r2b' x='40' y='90' width='20' height='20'/>
+      <text x='70' y='105'>SVGAnimatedLength</text>
+      <rect id='r3b' x='40' y='120' width='20' height='20'/>
+      <text x='70' y='135'>SVGAnimatedLengthList</text>
+      <rect id='r4b' x='40' y='150' width='20' height='20'/>
+      <text x='70' y='165'>SVGAnimatedAngle</text>
+      <rect id='r5b' x='40' y='180' width='20' height='20'/>
+      <text x='70' y='195'>SVGAnimatedRect</text>
+      <rect id='r6b' x='40' y='210' width='20' height='20'/>
+      <text x='70' y='225'>SVGAnimatedTransformList</text>
+      <rect id='r7b' x='40' y='240' width='20' height='20'/>
+      <text x='70' y='255'>SVGAnimatedPreserveAspectRatio</text>
+    </g>
+
+    <g display='none'>
+      <text id='text' rotate='0 20 40'>abc</text>
+      <circle id='circle' r='50'/>
+      <marker id='marker' orient='1.5708rad'/>
+      <svg id='svg' viewBox='10 20 30 40'/>
+    </g>
+
+    <script><![CDATA[
+      function $(id) { return document.getElementById(id); }
+
+      var text = $('text'),
+          circle = $('circle'),
+          marker = $('marker'),
+          svg = $('svg');
+
+      function expect_value(id, fn, value) {
+        try {
+          if (fn() === value) {
+            $(id).setAttribute('fill', 'green');
+            return;
+          }
+        } catch (e) {
+        }
+        $(id).setAttribute('fill', 'red');
+      }
+
+      // SVGAnimatedNumberList: rotate on text
+      expect_value
+        ('r1b',
+         function() { return text.rotate.animVal != text.rotate.baseVal; },
+         true);
+
+      // SVGAnimatedLength: r on circle
+      expect_value
+        ('r2b',
+         function() { return circle.r.animVal != text.rotate.baseVal; },
+         true);
+
+      // SVGAnimatedLengthList: x on text
+      expect_value
+        ('r3b',
+         function() { return text.x.animVal != text.x.baseVal; },
+         true);
+
+      // SVGAnimatedAngle: orient on marker
+      expect_value
+        ('r4b',
+         function() { return marker.orientAngle.animVal != marker.orientAngle.baseVal; },
+         true);
+
+      // SVGAnimatedRect: viewBox on svg
+      expect_value
+        ('r5b',
+         function() { return svg.viewBox.animVal != svg.viewBox.baseVal; },
+         true);
+
+      // SVGAnimatedTransformList: transform on circle
+      expect_value
+        ('r6b',
+         function() { return circle.transform.animVal != circle.transform.baseVal; },
+         true);
+
+      // SVGAnimatedPreserveAspectRatio: preserveAspectRatio on svg
+      expect_value
+        ('r7b',
+         function() { return svg.preserveAspectRatio.animVal != svg.preserveAspectRatio.baseVal; },
+         true);
+    ]]></script>
+
+  </g>
+  <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+    <text id="revision" x="10" y="340" stroke="none"
+      fill="black">$Revision: 1.8 $</text>
+  </g>
+  <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+  <!-- comment out this watermark once the test is approved --><!--
+  <g id="draft-watermark">
+    <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+    <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+      text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+  </g>-->
+</svg>
diff --git a/LayoutTests/svg/W3C-SVG-1.1-SE/types-dom-03-b.svg b/LayoutTests/svg/W3C-SVG-1.1-SE/types-dom-03-b.svg
new file mode 100644 (file)
index 0000000..b922825
--- /dev/null
@@ -0,0 +1,84 @@
+<svg id="svg-root" width="100%" height="100%"
+  viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+  xmlns:xlink="http://www.w3.org/1999/xlink">
+  <!--======================================================================-->
+  <!--=  Copyright 2008 World Wide Web Consortium, (Massachusetts          =-->
+  <!--=  Institute of Technology, European Research Consortium for         =-->
+  <!--=  Informatics and Mathematics (ERCIM), Keio University).            =-->
+  <!--=  All Rights Reserved.                                              =-->
+  <!--=  See http://www.w3.org/Consortium/Legal/.                          =-->
+  <!--======================================================================-->
+  <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
+    template-version="1.3" reviewer="ED" author="CM" status="accepted"
+    version="$Revision: 1.7 $" testname="$RCSfile: types-dom-03-b.svg,v $">
+    <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/#__svg__SVGLocatable__getBBox">
+      <p>
+        Test that bounding box geometry can be obtained
+        before the SVGLoad event is dispatched.
+      </p>
+    </d:testDescription>
+    <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
+      <p>
+        Run the test. No interaction required.
+      </p>
+    </d:operatorScript>
+    <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
+      <p>
+        Load the test.  A rectangle will be shown indicating
+        the result of the test.  It will be black if test
+        did not run, red if the test failed and green if
+        the test passed.
+      </p>
+      <p>
+        The test is passed if the rectangle is green.
+      </p>
+    </d:passCriteria>
+  </d:SVGTestCase>
+  <title id="test-title">$RCSfile: types-dom-03-b.svg,v $</title>
+  <defs>
+    <font-face
+      font-family="SVGFreeSansASCII"
+      unicode-range="U+0-7F">
+      <font-face-src>
+        <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
+      </font-face-src>
+    </font-face>
+  </defs>
+  <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+
+    <text x='10' y='30'>Test that getBBox() works before SVGLoad</text>
+
+    <rect id='r' x='10' y='40' width='50' height='50'/>
+    <text id='t' visibility='hidden' x='1000' y='1000'>Abc</text>
+
+    <script><![CDATA[
+      function $(x) { return document.getElementById(x); }
+
+      var t = $('t'),
+          r = $('r'),
+          b1, b2, pass = false;
+
+      try {
+        b1 = t.getBBox();
+        b2 = r.getBBox();
+        if (b1.x > 0 && b1.y > 0 && b1.width > 0 && b1.height > 0
+              && b2.x == 10 && b2.y == 40 && b2.width == 50 && b2.height == 50) {
+          pass = true;
+        }
+      } catch (e) {
+      }
+      r.setAttribute('fill', pass ? 'green' : 'red');
+    ]]></script>
+  </g>
+  <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+    <text id="revision" x="10" y="340" stroke="none"
+      fill="black">$Revision: 1.7 $</text>
+  </g>
+  <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+  <!-- comment out this watermark once the test is approved --><!--
+  <g id="draft-watermark">
+    <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+    <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+      text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+  </g>-->
+</svg>
diff --git a/LayoutTests/svg/W3C-SVG-1.1-SE/types-dom-04-b.svg b/LayoutTests/svg/W3C-SVG-1.1-SE/types-dom-04-b.svg
new file mode 100644 (file)
index 0000000..37df625
--- /dev/null
@@ -0,0 +1,250 @@
+<svg id="svg-root" width="100%" height="100%"
+  viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+  xmlns:xlink="http://www.w3.org/1999/xlink">
+  <!--======================================================================-->
+  <!--=  Copyright 2008 World Wide Web Consortium, (Massachusetts          =-->
+  <!--=  Institute of Technology, European Research Consortium for         =-->
+  <!--=  Informatics and Mathematics (ERCIM), Keio University).            =-->
+  <!--=  All Rights Reserved.                                              =-->
+  <!--=  See http://www.w3.org/Consortium/Legal/.                          =-->
+  <!--======================================================================-->
+  <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
+    template-version="1.3" reviewer="ED" author="CM" status="accepted"
+    version="$Revision: 1.7 $" testname="$RCSfile: types-dom-04-b.svg,v $">
+    <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/svgdom.html#SVGDOMOverview">
+      <p>
+        This tests that SVG DOM objects that correspond to attributes
+        are live.
+        This is tested for interfaces
+        SVGAnimatedNumberList, SVGAnimatedLength,
+        SVGAnimatedLengthList, SVGAnimatedAngle, SVGAnimatedRect,
+        SVGAnimatedTransformList, SVGAnimatedPreserveAspectRatio,
+        SVGAnimatedBoolean, SVGAnimatedString, SVGAnimatedEnumeration,
+        SVGAnimatedInteger and SVGAnimatedNumber.
+      </p>
+    </d:testDescription>
+    <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
+      <p>
+        Run the test. No interaction required.
+      </p>
+    </d:operatorScript>
+    <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
+      <p>
+        Once loaded, the test shows 12 rectangles, one for
+        each sub-test.  Each sub-test is checking that
+        an SVG DOM object of a particular interface is live.
+        The rectangle indicates the result of running the
+        sub-test: black to indicate that it wasn't run,
+        red to indicate that it failed, and green to indicate
+        that it passed.
+      </p>
+      <p>
+        The test is passed if all 12 rectangles are green.
+      </p>
+    </d:passCriteria>
+  </d:SVGTestCase>
+  <title id="test-title">$RCSfile: types-dom-04-b.svg,v $</title>
+  <defs>
+    <font-face
+      font-family="SVGFreeSansASCII"
+      unicode-range="U+0-7F">
+      <font-face-src>
+        <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
+      </font-face-src>
+    </font-face>
+  </defs>
+  <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+
+    <text x='10' y='30'>Testing liveness of SVG DOM objects</text>
+
+    <g font-size='14' transform='translate(500)rotate(90)'>
+      <rect id='r1' x='40' y='60' width='20' height='20'/>
+      <text x='70' y='75'>SVGAnimatedNumberList</text>
+      <rect id='r2' x='40' y='90' width='20' height='20'/>
+      <text x='70' y='105'>SVGAnimatedLength</text>
+      <rect id='r3' x='40' y='120' width='20' height='20'/>
+      <text x='70' y='135'>SVGAnimatedLengthList</text>
+      <rect id='r4' x='40' y='150' width='20' height='20'/>
+      <text x='70' y='165'>SVGAnimatedAngle</text>
+      <rect id='r5' x='40' y='180' width='20' height='20'/>
+      <text x='70' y='195'>SVGAnimatedRect</text>
+      <rect id='r6' x='40' y='210' width='20' height='20'/>
+      <text x='70' y='225'>SVGAnimatedTransformList</text>
+      <rect id='r7' x='40' y='240' width='20' height='20'/>
+      <text x='70' y='255'>SVGAnimatedPreserveAspectRatio</text>
+      <rect id='r8' x='40' y='270' width='20' height='20'/>
+      <text x='70' y='285'>SVGAnimatedBoolean</text>
+      <rect id='r9' x='40' y='300' width='20' height='20'/>
+      <text x='70' y='315'>SVGAnimatedString</text>
+      <rect id='r10' x='40' y='330' width='20' height='20'/>
+      <text x='70' y='345'>SVGAnimatedEnumeration</text>
+      <rect id='r11' x='40' y='360' width='20' height='20'/>
+      <text x='70' y='375'>SVGAnimatedInteger</text>
+      <rect id='r12' x='40' y='390' width='20' height='20'/>
+      <text x='70' y='405'>SVGAnimatedNumber</text>
+    </g>
+
+    <g display='none'>
+      <text id='text' rotate='0 20 40' x='10 20' lengthAdjust='spacing'>abc</text>
+      <circle id='circle' r='50' transform='scale(1) scale(2)' class='one'/>
+      <marker id='marker' orient='30'/>
+      <svg id='svg' viewBox='10 20 30 40' preserveAspectRatio='none' externalResourcesRequired='false'/>
+      <filter>
+        <feTurbulence id='feTurbulence' baseFrequency='2 3' numOctaves='2'/>
+      </filter>
+    </g>
+
+    <script><![CDATA[
+      function $(id) { return document.getElementById(id); }
+
+      var text = $('text'),
+          circle = $('circle'),
+          marker = $('marker'),
+          svg = $('svg'),
+          feTurbulence = $('feTurbulence');
+
+      function expect_exception(id, fn, code) {
+        try {
+          fn();
+        } catch (e) {
+          if (e.code == code) {
+            $(id).setAttribute('fill', 'green');
+            return;
+          }
+        }
+        $(id).setAttribute('fill', 'red');
+      }
+
+      function expect_value(id, fn, value) {
+        try {
+          if (fn() === value) {
+            $(id).setAttribute('fill', 'green');
+            return;
+          }
+        } catch (e) {
+        }
+        $(id).setAttribute('fill', 'red');
+      }
+
+      // SVGAnimatedNumberList: rotate on text
+      expect_value
+        ('r1',
+         function() {
+           return text.rotate.baseVal.numberOfItems == 3
+               && (text.setAttribute('rotate', '0 20'), text.rotate.baseVal.numberOfItems == 2);
+         },
+         true);
+
+      // SVGAnimatedLength: r on circle
+      expect_value
+        ('r2',
+         function() {
+           return circle.r.baseVal.value == 50
+               && (circle.setAttribute('r', '100'), circle.r.baseVal.value == 100);
+         },
+         true);
+
+      // SVGAnimatedLengthList: x on text
+      expect_value
+        ('r3',
+         function() {
+           return text.x.baseVal.numberOfItems == 2
+               && (text.setAttribute('x', '10'), text.x.baseVal.numberOfItems == 1);
+         },
+         true);
+
+      // SVGAnimatedAngle: orient on marker
+      expect_value
+        ('r4',
+         function() {
+           return marker.orientAngle.baseVal.value == 30
+               && (marker.setAttribute('orient', '60'), marker.orientAngle.baseVal.value == 60);
+         },
+         true);
+
+      // SVGAnimatedRect: viewBox on svg
+      expect_value
+        ('r5',
+         function() {
+           return svg.viewBox.baseVal.x == 10
+               && (svg.setAttribute('viewBox', '20 30 40 50'), svg.viewBox.baseVal.x == 20);
+         },
+         true);
+
+      // SVGAnimatedTransformList: transform on circle
+      expect_value
+        ('r6',
+         function() {
+           return circle.transform.baseVal.numberOfItems == 2
+               && (circle.setAttribute('transform', 'scale(1)'), circle.transform.baseVal.numberOfItems == 1);
+         },
+         true);
+
+      // SVGAnimatedPreserveAspectRatio: preserveAspectRatio on svg
+      expect_value
+        ('r7',
+         function() {
+           return svg.preserveAspectRatio.baseVal.align == 1 /* none */
+               && (svg.setAttribute('preserveAspectRatio', 'xMidYMid'), svg.preserveAspectRatio.baseVal.align == 6);
+         },
+         true);
+
+      // SVGAnimatedBoolean: externalResourcesRequired on svg
+      expect_value
+        ('r8',
+         function() {
+           return !svg.externalResourcesRequired.baseVal
+               && (svg.setAttribute('externalResourcesRequired', 'true'), svg.externalResourcesRequired.baseVal);
+         },
+         true);
+
+      // SVGAnimatedString: class on circle
+      expect_value
+        ('r9',
+         function() {
+           return circle.className.baseVal == 'one'
+               && (circle.setAttribute('class', 'two'), circle.className.baseVal == 'two');
+         },
+         true);
+
+      // SVGAnimatedEnumeration: lengthAdjust on text
+      expect_value
+        ('r10',
+         function() {
+           return text.lengthAdjust.baseVal == 1 /* spacing*/
+               && (text.setAttribute('lengthAdjust', 'spacingAndGlyphs'), text.lengthAdjust.baseVal == 2);
+         },
+         true);
+
+      // SVGAnimatedInteger: numOctaves on feTurbulence
+      expect_value
+        ('r11',
+         function() {
+           return feTurbulence.numOctaves.baseVal == 2
+               && (feTurbulence.setAttribute('numOctaves', '1'), feTurbulence.numOctaves.baseVal == 1);
+         },
+         true);
+
+      // SVGAnimatedNumber: baseFrequency on feTurbulence
+      expect_value
+        ('r12',
+         function() {
+           return feTurbulence.baseFrequencyY.baseVal == 3
+               && (feTurbulence.setAttribute('baseFrequency', '4 5'), feTurbulence.baseFrequencyY.baseVal == 5);
+         },
+         true);
+    ]]></script>
+
+  </g>
+  <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+    <text id="revision" x="10" y="340" stroke="none"
+      fill="black">$Revision: 1.7 $</text>
+  </g>
+  <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+  <!-- comment out this watermark once the test is approved --><!--
+  <g id="draft-watermark">
+    <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+    <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+      text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+  </g>-->
+</svg>
diff --git a/LayoutTests/svg/W3C-SVG-1.1-SE/types-dom-05-b.svg b/LayoutTests/svg/W3C-SVG-1.1-SE/types-dom-05-b.svg
new file mode 100644 (file)
index 0000000..52ca383
--- /dev/null
@@ -0,0 +1,127 @@
+<svg id="svg-root" width="100%" height="100%"
+  viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+  xmlns:xlink="http://www.w3.org/1999/xlink">
+  <!--======================================================================-->
+  <!--=  Copyright 2008 World Wide Web Consortium, (Massachusetts          =-->
+  <!--=  Institute of Technology, European Research Consortium for         =-->
+  <!--=  Informatics and Mathematics (ERCIM), Keio University).            =-->
+  <!--=  All Rights Reserved.                                              =-->
+  <!--=  See http://www.w3.org/Consortium/Legal/.                          =-->
+  <!--======================================================================-->
+  <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
+    template-version="1.3" reviewer="ED" author="CM" status="accepted"
+    version="$Revision: 1.6 $" testname="$RCSfile: types-dom-05-b.svg,v $">
+    <d:testDescription xmlns="http://www.w3.org/1999/xhtml" href="http://www.w3.org/TR/SVG11/types.html#BasicDOMInterfaces">
+      <p>
+        This tests that assigning a valid length or angle string to
+        valueAsString on an SVGLength or SVGAngle will affect that object's
+        unitType, and that assigning an invalid string will throw
+        a DOMException with code SYNTAX_ERR.
+      </p>
+    </d:testDescription>
+    <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
+      <p>
+        Run the test. No interaction required.
+      </p>
+    </d:operatorScript>
+    <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
+      <p>
+        Once the test is loaded, four rectangles are presented, indicating
+        the result of passing a valid or invalid string to an
+        SVGLength or SVGAngle object, as indicated.  Each rectangle
+        will be black if the sub-test did not run, red if it
+        failed or green if it passed.
+      </p>
+      <p>
+        The test is passed if all four rectangles are green.
+      </p>
+    </d:passCriteria>
+  </d:SVGTestCase>
+  <title id="test-title">$RCSfile: types-dom-05-b.svg,v $</title>
+  <defs>
+    <font-face
+      font-family="SVGFreeSansASCII"
+      unicode-range="U+0-7F">
+      <font-face-src>
+        <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
+      </font-face-src>
+    </font-face>
+  </defs>
+  <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+
+    <text x='10' y='30'>Test side effects of assigning to valueAsString</text>
+
+    <rect id='r1' x='10' y='40' width='30' height='30'/>
+    <rect id='r2' x='10' y='80' width='30' height='30'/>
+    <rect id='r3' x='10' y='120' width='30' height='30'/>
+    <rect id='r4' x='10' y='160' width='30' height='30'/>
+    <g font-size='15'>
+      <text x='50' y='60'>Valid string on SVGLength</text>
+      <text x='50' y='100'>Invalid string on SVGLength</text>
+      <text x='50' y='140'>Valid string on SVGAngle</text>
+      <text x='50' y='180'>Invalid string on SVGAngle</text>
+    </g>
+
+    <circle id='c' r='1em' display='none'/>
+    <marker id='m' orient='20rad' display='none'/>
+    <script>
+      var b,
+          c = document.getElementById('c');
+          m = document.getElementById('m');
+      
+      b = false;
+      try {
+        if (c.r.baseVal.unitType != 3) { /* SVGLength.SVG_LENGTHTYPE_EMS */
+          throw 1;
+        }
+        c.r.baseVal.valueAsString = '2px';
+        if (c.r.baseVal.unitType == 5) { /* SVGLength.SVG_LENGTHTYPE_PX */
+          b = true;
+        }
+      } catch (e) {
+      }
+      document.getElementById('r1').setAttribute('fill', b ? 'green' : 'red');
+
+      b = false;
+      try {
+        c.r.baseVal.valueAsString = 'rubbish';
+      } catch (e) {
+        b = e.code == 12; // SYNTAX_ERR
+      }
+      document.getElementById('r2').setAttribute('fill', b ? 'green' : 'red');
+
+      b = false;
+      try {
+        if (m.orientAngle.baseVal.unitType != 3) { /* SVGAngle.SVG_ANGLETYPE_RAD */
+          throw 1;
+        }
+        m.orientAngle.baseVal.valueAsString = '2grad';
+        if (m.orientAngle.baseVal.unitType == 4) { /* SVGAngle.SVG_ANGLETYPE_GRAD */
+          b = true;
+        }
+      } catch (e) {
+      }
+      document.getElementById('r3').setAttribute('fill', b ? 'green' : 'red');
+
+      b = false;
+      try {
+        m.orientAngle.baseVal.valueAsString = 'rubbish';
+      } catch (e) {
+        b = e.code == 12; // SYNTAX_ERR
+      }
+      document.getElementById('r4').setAttribute('fill', b ? 'green' : 'red');
+    </script>
+
+  </g>
+  <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+    <text id="revision" x="10" y="340" stroke="none"
+      fill="black">$Revision: 1.6 $</text>
+  </g>
+  <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+  <!-- comment out this watermark once the test is approved --><!--
+  <g id="draft-watermark">
+    <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+    <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+      text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+  </g>-->
+</svg>
index 056f484..eb62209 100644 (file)
@@ -6,11 +6,11 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 
 PASS gradient.gradientTransform.baseVal.consolidate().matrix.e is 0
-PASS gradient.gradientTransform.animVal.consolidate().matrix.e is 0
+PASS gradient.gradientTransform.animVal.consolidate().matrix.e threw exception Error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7.
 PASS gradient.gradientTransform.baseVal.consolidate().matrix.e is 100
-PASS gradient.gradientTransform.animVal.consolidate().matrix.e is 100
+PASS gradient.gradientTransform.animVal.consolidate().matrix.e threw exception Error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7.
 PASS gradient.gradientTransform.baseVal.consolidate().matrix.e is 200
-PASS gradient.gradientTransform.animVal.consolidate().matrix.e is 200
+PASS gradient.gradientTransform.animVal.consolidate().matrix.e threw exception Error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7.
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 5d14964..08f68b9 100644 (file)
@@ -46,21 +46,21 @@ function sample1() {
     // FIXME: Add animVal support. Animates baseVal at the moment.
     // Check initial conditions
     shouldBe("gradient.gradientTransform.baseVal.consolidate().matrix.e", "0");
-    shouldBe("gradient.gradientTransform.animVal.consolidate().matrix.e", "0");
+    shouldThrow("gradient.gradientTransform.animVal.consolidate().matrix.e");
 }
 
 function sample2() {
     // FIXME: Add animVal support. Animates baseVal at the moment.
     // Check half-time conditions
     shouldBe("gradient.gradientTransform.baseVal.consolidate().matrix.e", "100");
-    shouldBe("gradient.gradientTransform.animVal.consolidate().matrix.e", "100");
+    shouldThrow("gradient.gradientTransform.animVal.consolidate().matrix.e");
 }
 
 function sample3() {
     // FIXME: Add animVal support. Animates baseVal at the moment.
     // Check end conditions
     shouldBe("gradient.gradientTransform.baseVal.consolidate().matrix.e", "200");
-    shouldBe("gradient.gradientTransform.animVal.consolidate().matrix.e", "200");
+    shouldThrow("gradient.gradientTransform.animVal.consolidate().matrix.e");
 }
 
 function executeTest() {  
diff --git a/LayoutTests/svg/dom/SVGMatrix-expected.txt b/LayoutTests/svg/dom/SVGMatrix-expected.txt
new file mode 100644 (file)
index 0000000..fe2301b
--- /dev/null
@@ -0,0 +1,124 @@
+This test checks the SVGMatrix API
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+
+Check initial matrix values
+PASS matrix.a is 1
+PASS matrix.b is 0
+PASS matrix.c is 0
+PASS matrix.d is 1
+PASS matrix.e is 0
+PASS matrix.f is 0
+
+Check assigning matrices
+PASS matrix.a = 2 is 2
+PASS matrix.f = 200 is 200
+
+Check assigning invalid matrices
+PASS matrix.a = matrix threw exception TypeError: Type error.
+PASS matrix.a = svgElement threw exception TypeError: Type error.
+PASS matrix.a = 'aString' threw exception TypeError: Type error.
+PASS matrix.b = matrix threw exception TypeError: Type error.
+PASS matrix.b = svgElement threw exception TypeError: Type error.
+PASS matrix.b = 'aString' threw exception TypeError: Type error.
+PASS matrix.c = matrix threw exception TypeError: Type error.
+PASS matrix.c = svgElement threw exception TypeError: Type error.
+PASS matrix.c = 'aString' threw exception TypeError: Type error.
+PASS matrix.d = matrix threw exception TypeError: Type error.
+PASS matrix.d = svgElement threw exception TypeError: Type error.
+PASS matrix.d = 'aString' threw exception TypeError: Type error.
+PASS matrix.e = matrix threw exception TypeError: Type error.
+PASS matrix.e = svgElement threw exception TypeError: Type error.
+PASS matrix.e = 'aString' threw exception TypeError: Type error.
+PASS matrix.f = matrix threw exception TypeError: Type error.
+PASS matrix.f = svgElement threw exception TypeError: Type error.
+PASS matrix.f = 'aString' threw exception TypeError: Type error.
+
+Check that the matrix is still containing the correct values
+PASS matrix.a is 2
+PASS matrix.b is 0
+PASS matrix.c is 0
+PASS matrix.d is 1
+PASS matrix.e is 0
+PASS matrix.f is 200
+
+Check assigning null works as expected
+PASS matrix.f = null is null
+PASS matrix.a is 2
+PASS matrix.b is 0
+PASS matrix.c is 0
+PASS matrix.d is 1
+PASS matrix.e is 0
+PASS matrix.f is 0
+
+Check calling 'multiply' with invalid arguments
+PASS matrix.multiply() threw exception SyntaxError: Not enough arguments.
+PASS matrix.multiply(true) threw exception TypeError: Type error.
+PASS matrix.multiply(2) threw exception TypeError: Type error.
+PASS matrix.multiply('aString') threw exception TypeError: Type error.
+PASS matrix.multiply(svgElement) threw exception TypeError: Type error.
+
+Check calling 'translate' with invalid arguments
+PASS matrix.translate() threw exception SyntaxError: Not enough arguments.
+PASS matrix.translate(true) threw exception SyntaxError: Not enough arguments.
+PASS matrix.translate(2) threw exception SyntaxError: Not enough arguments.
+PASS matrix.translate('aString') threw exception SyntaxError: Not enough arguments.
+PASS matrix.translate(svgElement) threw exception SyntaxError: Not enough arguments.
+PASS matrix.translate('aString', 'aString') threw exception TypeError: Type error.
+PASS matrix.translate(svgElement, svgElement) threw exception TypeError: Type error.
+PASS matrix.translate(2, 'aString') threw exception TypeError: Type error.
+PASS matrix.translate(2, svgElement) threw exception TypeError: Type error.
+PASS matrix.translate('aString', 2) threw exception TypeError: Type error.
+PASS matrix.translate(svgElement, 2) threw exception TypeError: Type error.
+
+Check calling 'scale' with invalid arguments
+PASS matrix.scale() threw exception SyntaxError: Not enough arguments.
+PASS matrix.scale('aString') threw exception TypeError: Type error.
+PASS matrix.scale(svgElement) threw exception TypeError: Type error.
+
+Check calling 'scaleNonUniform' with invalid arguments
+PASS matrix.scaleNonUniform() threw exception SyntaxError: Not enough arguments.
+PASS matrix.scaleNonUniform(true) threw exception SyntaxError: Not enough arguments.
+PASS matrix.scaleNonUniform(2) threw exception SyntaxError: Not enough arguments.
+PASS matrix.scaleNonUniform('aString') threw exception SyntaxError: Not enough arguments.
+PASS matrix.scaleNonUniform(svgElement) threw exception SyntaxError: Not enough arguments.
+PASS matrix.scaleNonUniform('aString', 'aString') threw exception TypeError: Type error.
+PASS matrix.scaleNonUniform(svgElement, svgElement) threw exception TypeError: Type error.
+PASS matrix.scaleNonUniform(2, 'aString') threw exception TypeError: Type error.
+PASS matrix.scaleNonUniform(2, svgElement) threw exception TypeError: Type error.
+PASS matrix.scaleNonUniform('aString', 2) threw exception TypeError: Type error.
+PASS matrix.scaleNonUniform(svgElement, 2) threw exception TypeError: Type error.
+
+Check calling 'rotate' with invalid arguments
+PASS matrix.rotate() threw exception SyntaxError: Not enough arguments.
+PASS matrix.rotate('aString') threw exception TypeError: Type error.
+PASS matrix.rotate(svgElement) threw exception TypeError: Type error.
+
+Check calling 'rotateFromVector' with invalid arguments
+PASS matrix.rotateFromVector() threw exception SyntaxError: Not enough arguments.
+PASS matrix.rotateFromVector(true) threw exception SyntaxError: Not enough arguments.
+PASS matrix.rotateFromVector(2) threw exception SyntaxError: Not enough arguments.
+PASS matrix.rotateFromVector('aString') threw exception SyntaxError: Not enough arguments.
+PASS matrix.rotateFromVector(svgElement) threw exception SyntaxError: Not enough arguments.
+PASS matrix.rotateFromVector('aString', 'aString') threw exception TypeError: Type error.
+PASS matrix.rotateFromVector(svgElement, svgElement) threw exception TypeError: Type error.
+PASS matrix.rotateFromVector(2, 'aString') threw exception TypeError: Type error.
+PASS matrix.rotateFromVector(2, svgElement) threw exception TypeError: Type error.
+PASS matrix.rotateFromVector('aString', 2) threw exception TypeError: Type error.
+PASS matrix.rotateFromVector(svgElement, 2) threw exception TypeError: Type error.
+
+Check calling 'skewX' with invalid arguments
+PASS matrix.skewX() threw exception SyntaxError: Not enough arguments.
+PASS matrix.skewX('aString') threw exception TypeError: Type error.
+PASS matrix.skewX(svgElement) threw exception TypeError: Type error.
+
+Check calling 'skewY' with invalid arguments
+PASS matrix.skewY() threw exception SyntaxError: Not enough arguments.
+PASS matrix.skewY('aString') threw exception TypeError: Type error.
+PASS matrix.skewY(svgElement) threw exception TypeError: Type error.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dom/SVGMatrix.html b/LayoutTests/svg/dom/SVGMatrix.html
new file mode 100644 (file)
index 0000000..9a1c2c6
--- /dev/null
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/SVGMatrix.js"></script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
index 992ab1a..1aed6cb 100644 (file)
@@ -19,6 +19,21 @@ PASS point.y = null is null
 Check that the point is still containing the correct values
 PASS point.x is 100
 PASS point.y is 0
+
+Reset to -50, 100
+
+Check 'matrixTransform' method - multiply with -1,0,0,2,10,10 matrix, should flip x coordinate, multiply y by two and translate each coordinate by 10
+PASS (newPoint = point.matrixTransform(ctm)).toString() is "[object SVGPoint]"
+PASS newPoint.x is 60
+PASS newPoint.y is 210
+
+Check invalid arguments for 'matrixTransform'
+PASS point.matrixTransform() threw exception SyntaxError: Not enough arguments.
+PASS point.matrixTransform(-1) threw exception TypeError: Type error.
+PASS point.matrixTransform(5) threw exception TypeError: Type error.
+PASS point.matrixTransform('aString') threw exception TypeError: Type error.
+PASS point.matrixTransform(point) threw exception TypeError: Type error.
+PASS point.matrixTransform(svgElement) threw exception TypeError: Type error.
 PASS successfullyParsed is true
 
 TEST COMPLETE
diff --git a/LayoutTests/svg/dom/SVGTransform-expected.txt b/LayoutTests/svg/dom/SVGTransform-expected.txt
new file mode 100644 (file)
index 0000000..5f8c178
--- /dev/null
@@ -0,0 +1,115 @@
+This test checks the SVGTransform API
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+
+Check initial transform values
+PASS transform.type is SVGTransform.SVG_TRANSFORM_MATRIX
+PASS transform.angle is 0
+PASS transform.matrix.a is 1
+PASS transform.matrix.b is 0
+PASS transform.matrix.c is 0
+PASS transform.matrix.d is 1
+PASS transform.matrix.e is 0
+PASS transform.matrix.f is 0
+
+Change to skewX transformation
+PASS transform.setSkewX(45) is undefined.
+PASS transform.type is SVGTransform.SVG_TRANSFORM_SKEWX
+PASS transform.angle is 45
+PASS transform.matrix.a is 1
+PASS transform.matrix.b is 0
+PASS transform.matrix.c.toFixed(1) is "1.0"
+PASS transform.matrix.d is 1
+PASS transform.matrix.e is 0
+PASS transform.matrix.f is 0
+
+Changing matrix.e to 100, should reset transformation type to MATRIX, and angle should be 0
+PASS transform.matrix.e = 100 is 100
+PASS transform.type is SVGTransform.SVG_TRANSFORM_MATRIX
+PASS transform.angle is 0
+PASS transform.matrix.a is 1
+PASS transform.matrix.b is 0
+PASS transform.matrix.c.toFixed(1) is "1.0"
+PASS transform.matrix.d is 1
+PASS transform.matrix.e is 100
+PASS transform.matrix.f is 0
+
+Now revert to initial matrix
+PASS transform.matrix.c = null is null
+PASS transform.matrix.e = 0 is 0
+PASS transform.type is SVGTransform.SVG_TRANSFORM_MATRIX
+PASS transform.angle is 0
+PASS transform.matrix.a is 1
+PASS transform.matrix.b is 0
+PASS transform.matrix.c is 0
+PASS transform.matrix.d is 1
+PASS transform.matrix.e is 0
+PASS transform.matrix.f is 0
+
+Check passing invalid arguments to 'setMatrix'
+PASS transform.setMatrix() threw exception SyntaxError: Not enough arguments.
+PASS transform.setMatrix(transform) threw exception TypeError: Type error.
+PASS transform.setMatrix(svgElement) threw exception TypeError: Type error.
+PASS transform.setMatrix('aString') threw exception TypeError: Type error.
+PASS transform.setMatrix(1) threw exception TypeError: Type error.
+PASS transform.setMatrix(false) threw exception TypeError: Type error.
+
+Check passing invalid arguments to 'setTranslate'
+PASS transform.setTranslate() threw exception SyntaxError: Not enough arguments.
+PASS transform.setTranslate(transform) threw exception SyntaxError: Not enough arguments.
+PASS transform.setTranslate(svgElement) threw exception SyntaxError: Not enough arguments.
+PASS transform.setTranslate('aString') threw exception SyntaxError: Not enough arguments.
+PASS transform.setTranslate(1, transform) threw exception TypeError: Type error.
+PASS transform.setTranslate(1, svgElement) threw exception TypeError: Type error.
+PASS transform.setTranslate(1, 'aString') threw exception TypeError: Type error.
+PASS transform.setTranslate(transform, 1) threw exception TypeError: Type error.
+PASS transform.setTranslate(svgElement, 1) threw exception TypeError: Type error.
+PASS transform.setTranslate('aString', 1) threw exception TypeError: Type error.
+PASS transform.setTranslate(transform, transform) threw exception TypeError: Type error.
+PASS transform.setTranslate(svgElement, svgElement) threw exception TypeError: Type error.
+PASS transform.setTranslate('aString', 'aString') threw exception TypeError: Type error.
+
+Check passing invalid arguments to 'setScale'
+PASS transform.setScale() threw exception SyntaxError: Not enough arguments.
+PASS transform.setScale(transform) threw exception SyntaxError: Not enough arguments.
+PASS transform.setScale(svgElement) threw exception SyntaxError: Not enough arguments.
+PASS transform.setScale('aString') threw exception SyntaxError: Not enough arguments.
+PASS transform.setScale(1, transform) threw exception TypeError: Type error.
+PASS transform.setScale(1, svgElement) threw exception TypeError: Type error.
+PASS transform.setScale(1, 'aString') threw exception TypeError: Type error.
+PASS transform.setScale(transform, 1) threw exception TypeError: Type error.
+PASS transform.setScale(svgElement, 1) threw exception TypeError: Type error.
+PASS transform.setScale('aString', 1) threw exception TypeError: Type error.
+PASS transform.setScale(transform, transform) threw exception TypeError: Type error.
+PASS transform.setScale(svgElement, svgElement) threw exception TypeError: Type error.
+PASS transform.setScale('aString', 'aString') threw exception TypeError: Type error.
+
+Check passing invalid arguments to 'setRotate'
+PASS transform.setRotate() threw exception SyntaxError: Not enough arguments.
+PASS transform.setRotate(transform) threw exception SyntaxError: Not enough arguments.
+PASS transform.setRotate(svgElement) threw exception SyntaxError: Not enough arguments.
+PASS transform.setRotate('aString') threw exception SyntaxError: Not enough arguments.
+PASS transform.setRotate(1, transform) threw exception SyntaxError: Not enough arguments.
+PASS transform.setRotate(1, svgElement) threw exception SyntaxError: Not enough arguments.
+PASS transform.setRotate(1, 'aString') threw exception SyntaxError: Not enough arguments.
+PASS transform.setRotate(1, 1, transform) threw exception TypeError: Type error.
+PASS transform.setRotate(1, 1, svgElement) threw exception TypeError: Type error.
+PASS transform.setRotate(1, 1, 'aString') threw exception TypeError: Type error.
+
+Check passing invalid arguments to 'setSkewX'
+PASS transform.setSkewX() threw exception SyntaxError: Not enough arguments.
+PASS transform.setSkewX(transform) threw exception TypeError: Type error.
+PASS transform.setSkewX(svgElement) threw exception TypeError: Type error.
+PASS transform.setSkewX('aString') threw exception TypeError: Type error.
+
+Check passing invalid arguments to 'setSkewY'
+PASS transform.setSkewY() threw exception SyntaxError: Not enough arguments.
+PASS transform.setSkewY(transform) threw exception TypeError: Type error.
+PASS transform.setSkewY(svgElement) threw exception TypeError: Type error.
+PASS transform.setSkewY('aString') threw exception TypeError: Type error.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dom/SVGTransform.html b/LayoutTests/svg/dom/SVGTransform.html
new file mode 100644 (file)
index 0000000..659421c
--- /dev/null
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/SVGTransform.js"></script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dom/SVGTransformList-expected.txt b/LayoutTests/svg/dom/SVGTransformList-expected.txt
new file mode 100644 (file)
index 0000000..ca338f4
--- /dev/null
@@ -0,0 +1,17 @@
+This test checks the SVGTransformList API
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+
+Check passing invalid arguments to 'createSVGTransformFromMatrix'
+PASS transform.createSVGTransformFromMatrix() threw exception SyntaxError: Not enough arguments.
+PASS transform.createSVGTransformFromMatrix(svgElement.createSVGTransform()) threw exception TypeError: Type error.
+PASS transform.createSVGTransformFromMatrix(svgElement) threw exception TypeError: Type error.
+PASS transform.createSVGTransformFromMatrix('aString') threw exception TypeError: Type error.
+PASS transform.createSVGTransformFromMatrix(1) threw exception TypeError: Type error.
+PASS transform.createSVGTransformFromMatrix(true) threw exception TypeError: Type error.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
diff --git a/LayoutTests/svg/dom/SVGTransformList.html b/LayoutTests/svg/dom/SVGTransformList.html
new file mode 100644 (file)
index 0000000..f539edd
--- /dev/null
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
+<script src="../../fast/js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+<script src="script-tests/SVGTransformList.js"></script>
+<script src="../../fast/js/resources/js-test-post.js"></script>
+</body>
+</html>
diff --git a/LayoutTests/svg/dom/script-tests/SVGMatrix.js b/LayoutTests/svg/dom/script-tests/SVGMatrix.js
new file mode 100644 (file)
index 0000000..fdb6ba3
--- /dev/null
@@ -0,0 +1,140 @@
+description("This test checks the SVGMatrix API");
+
+var svgElement = document.createElementNS("http://www.w3.org/2000/svg", "svg");
+var matrix = svgElement.createSVGMatrix();
+
+debug("");
+debug("Check initial matrix values");
+shouldBe("matrix.a", "1");
+shouldBe("matrix.b", "0");
+shouldBe("matrix.c", "0");
+shouldBe("matrix.d", "1");
+shouldBe("matrix.e", "0");
+shouldBe("matrix.f", "0");
+
+debug("");
+debug("Check assigning matrices");
+shouldBe("matrix.a = 2", "2");
+shouldBe("matrix.f = 200", "200");
+
+debug("");
+debug("Check assigning invalid matrices");
+shouldThrow("matrix.a = matrix");
+shouldThrow("matrix.a = svgElement");
+shouldThrow("matrix.a = 'aString'");
+
+shouldThrow("matrix.b = matrix");
+shouldThrow("matrix.b = svgElement");
+shouldThrow("matrix.b = 'aString'");
+
+shouldThrow("matrix.c = matrix");
+shouldThrow("matrix.c = svgElement");
+shouldThrow("matrix.c = 'aString'");
+
+shouldThrow("matrix.d = matrix");
+shouldThrow("matrix.d = svgElement");
+shouldThrow("matrix.d = 'aString'");
+
+shouldThrow("matrix.e = matrix");
+shouldThrow("matrix.e = svgElement");
+shouldThrow("matrix.e = 'aString'");
+
+shouldThrow("matrix.f = matrix");
+shouldThrow("matrix.f = svgElement");
+shouldThrow("matrix.f = 'aString'");
+
+debug("");
+debug("Check that the matrix is still containing the correct values");
+shouldBe("matrix.a", "2");
+shouldBe("matrix.b", "0");
+shouldBe("matrix.c", "0");
+shouldBe("matrix.d", "1");
+shouldBe("matrix.e", "0");
+shouldBe("matrix.f", "200");
+
+debug("");
+debug("Check assigning null works as expected");
+shouldBeNull("matrix.f = null");
+shouldBe("matrix.a", "2");
+shouldBe("matrix.b", "0");
+shouldBe("matrix.c", "0");
+shouldBe("matrix.d", "1");
+shouldBe("matrix.e", "0");
+shouldBe("matrix.f", "0");
+
+debug("");
+debug("Check calling 'multiply' with invalid arguments");
+shouldThrow("matrix.multiply()");
+shouldThrow("matrix.multiply(true)");
+shouldThrow("matrix.multiply(2)");
+shouldThrow("matrix.multiply('aString')");
+shouldThrow("matrix.multiply(svgElement)");
+
+debug("");
+debug("Check calling 'translate' with invalid arguments");
+shouldThrow("matrix.translate()");
+shouldThrow("matrix.translate(true)");
+shouldThrow("matrix.translate(2)");
+shouldThrow("matrix.translate('aString')");
+shouldThrow("matrix.translate(svgElement)");
+shouldThrow("matrix.translate('aString', 'aString')");
+shouldThrow("matrix.translate(svgElement, svgElement)");
+shouldThrow("matrix.translate(2, 'aString')");
+shouldThrow("matrix.translate(2, svgElement)");
+shouldThrow("matrix.translate('aString', 2)");
+shouldThrow("matrix.translate(svgElement, 2)");
+
+debug("");
+debug("Check calling 'scale' with invalid arguments");
+shouldThrow("matrix.scale()");
+shouldThrow("matrix.scale('aString')");
+shouldThrow("matrix.scale(svgElement)");
+
+
+debug("");
+debug("Check calling 'scaleNonUniform' with invalid arguments");
+shouldThrow("matrix.scaleNonUniform()");
+shouldThrow("matrix.scaleNonUniform(true)");
+shouldThrow("matrix.scaleNonUniform(2)");
+shouldThrow("matrix.scaleNonUniform('aString')");
+shouldThrow("matrix.scaleNonUniform(svgElement)");
+shouldThrow("matrix.scaleNonUniform('aString', 'aString')");
+shouldThrow("matrix.scaleNonUniform(svgElement, svgElement)");
+shouldThrow("matrix.scaleNonUniform(2, 'aString')");
+shouldThrow("matrix.scaleNonUniform(2, svgElement)");
+shouldThrow("matrix.scaleNonUniform('aString', 2)");
+shouldThrow("matrix.scaleNonUniform(svgElement, 2)");
+
+debug("");
+debug("Check calling 'rotate' with invalid arguments");
+shouldThrow("matrix.rotate()");
+shouldThrow("matrix.rotate('aString')");
+shouldThrow("matrix.rotate(svgElement)");
+
+debug("");
+debug("Check calling 'rotateFromVector' with invalid arguments");
+shouldThrow("matrix.rotateFromVector()");
+shouldThrow("matrix.rotateFromVector(true)");
+shouldThrow("matrix.rotateFromVector(2)");
+shouldThrow("matrix.rotateFromVector('aString')");
+shouldThrow("matrix.rotateFromVector(svgElement)");
+shouldThrow("matrix.rotateFromVector('aString', 'aString')");
+shouldThrow("matrix.rotateFromVector(svgElement, svgElement)");
+shouldThrow("matrix.rotateFromVector(2, 'aString')");
+shouldThrow("matrix.rotateFromVector(2, svgElement)");
+shouldThrow("matrix.rotateFromVector('aString', 2)");
+shouldThrow("matrix.rotateFromVector(svgElement, 2)");
+
+debug("");
+debug("Check calling 'skewX' with invalid arguments");
+shouldThrow("matrix.skewX()");
+shouldThrow("matrix.skewX('aString')");
+shouldThrow("matrix.skewX(svgElement)");
+
+debug("");
+debug("Check calling 'skewY' with invalid arguments");
+shouldThrow("matrix.skewY()");
+shouldThrow("matrix.skewY('aString')");
+shouldThrow("matrix.skewY(svgElement)");
+
+successfullyParsed = true;
index 1a38a3d..bcd78d2 100644 (file)
@@ -23,4 +23,29 @@ debug("Check that the point is still containing the correct values");
 shouldBe("point.x", "100");
 shouldBe("point.y", "0");
 
+debug("");
+debug("Reset to -50, 100");
+point.x = -50;
+point.y = 100;
+
+debug("");
+debug("Check 'matrixTransform' method - multiply with -1,0,0,2,10,10 matrix, should flip x coordinate, multiply y by two and translate each coordinate by 10");
+var ctm = svgElement.createSVGMatrix();
+ctm.a = -1;
+ctm.d = 2;
+ctm.e = 10;
+ctm.f = 10;
+shouldBeEqualToString("(newPoint = point.matrixTransform(ctm)).toString()", "[object SVGPoint]");
+shouldBe("newPoint.x", "60");
+shouldBe("newPoint.y", "210");
+
+debug("");
+debug("Check invalid arguments for 'matrixTransform'");
+shouldThrow("point.matrixTransform()");
+shouldThrow("point.matrixTransform(-1)");
+shouldThrow("point.matrixTransform(5)");
+shouldThrow("point.matrixTransform('aString')");
+shouldThrow("point.matrixTransform(point)");
+shouldThrow("point.matrixTransform(svgElement)");
+
 successfullyParsed = true;
diff --git a/LayoutTests/svg/dom/script-tests/SVGTransform.js b/LayoutTests/svg/dom/script-tests/SVGTransform.js
new file mode 100644 (file)
index 0000000..65a587c
--- /dev/null
@@ -0,0 +1,122 @@
+description("This test checks the SVGTransform API");
+
+var svgElement = document.createElementNS("http://www.w3.org/2000/svg", "svg");
+var transform = svgElement.createSVGTransform();
+
+debug("");
+debug("Check initial transform values");
+shouldBe("transform.type", "SVGTransform.SVG_TRANSFORM_MATRIX");
+shouldBe("transform.angle", "0");
+shouldBe("transform.matrix.a", "1");
+shouldBe("transform.matrix.b", "0");
+shouldBe("transform.matrix.c", "0");
+shouldBe("transform.matrix.d", "1");
+shouldBe("transform.matrix.e", "0");
+shouldBe("transform.matrix.f", "0");
+
+debug("");
+debug("Change to skewX transformation");
+shouldBeUndefined("transform.setSkewX(45)");
+shouldBe("transform.type", "SVGTransform.SVG_TRANSFORM_SKEWX");
+shouldBe("transform.angle", "45");
+shouldBe("transform.matrix.a", "1");
+shouldBe("transform.matrix.b", "0");
+shouldBeEqualToString("transform.matrix.c.toFixed(1)", "1.0");
+shouldBe("transform.matrix.d", "1");
+shouldBe("transform.matrix.e", "0");
+shouldBe("transform.matrix.f", "0");
+
+debug("");
+debug("Changing matrix.e to 100, should reset transformation type to MATRIX, and angle should be 0");
+shouldBe("transform.matrix.e = 100", "100");
+shouldBe("transform.type", "SVGTransform.SVG_TRANSFORM_MATRIX");
+shouldBe("transform.angle", "0");
+shouldBe("transform.matrix.a", "1");
+shouldBe("transform.matrix.b", "0");
+shouldBeEqualToString("transform.matrix.c.toFixed(1)", "1.0");
+shouldBe("transform.matrix.d", "1");
+shouldBe("transform.matrix.e", "100");
+shouldBe("transform.matrix.f", "0");
+
+debug("");
+debug("Now revert to initial matrix");
+shouldBeNull("transform.matrix.c = null");
+shouldBe("transform.matrix.e = 0", "0");
+shouldBe("transform.type", "SVGTransform.SVG_TRANSFORM_MATRIX");
+shouldBe("transform.angle", "0");
+shouldBe("transform.matrix.a", "1");
+shouldBe("transform.matrix.b", "0");
+shouldBe("transform.matrix.c", "0");
+shouldBe("transform.matrix.d", "1");
+shouldBe("transform.matrix.e", "0");
+shouldBe("transform.matrix.f", "0");
+
+debug("");
+debug("Check passing invalid arguments to 'setMatrix'");
+shouldThrow("transform.setMatrix()");
+shouldThrow("transform.setMatrix(transform)");
+shouldThrow("transform.setMatrix(svgElement)");
+shouldThrow("transform.setMatrix('aString')");
+shouldThrow("transform.setMatrix(1)");
+shouldThrow("transform.setMatrix(false)");
+
+debug("");
+debug("Check passing invalid arguments to 'setTranslate'");
+shouldThrow("transform.setTranslate()");
+shouldThrow("transform.setTranslate(transform)");
+shouldThrow("transform.setTranslate(svgElement)");
+shouldThrow("transform.setTranslate('aString')");
+shouldThrow("transform.setTranslate(1, transform)");
+shouldThrow("transform.setTranslate(1, svgElement)");
+shouldThrow("transform.setTranslate(1, 'aString')");
+shouldThrow("transform.setTranslate(transform, 1)");
+shouldThrow("transform.setTranslate(svgElement, 1)");
+shouldThrow("transform.setTranslate('aString', 1)");
+shouldThrow("transform.setTranslate(transform, transform)");
+shouldThrow("transform.setTranslate(svgElement, svgElement)");
+shouldThrow("transform.setTranslate('aString', 'aString')");
+
+debug("");
+debug("Check passing invalid arguments to 'setScale'");
+shouldThrow("transform.setScale()");
+shouldThrow("transform.setScale(transform)");
+shouldThrow("transform.setScale(svgElement)");
+shouldThrow("transform.setScale('aString')");
+shouldThrow("transform.setScale(1, transform)");
+shouldThrow("transform.setScale(1, svgElement)");
+shouldThrow("transform.setScale(1, 'aString')");
+shouldThrow("transform.setScale(transform, 1)");
+shouldThrow("transform.setScale(svgElement, 1)");
+shouldThrow("transform.setScale('aString', 1)");
+shouldThrow("transform.setScale(transform, transform)");
+shouldThrow("transform.setScale(svgElement, svgElement)");
+shouldThrow("transform.setScale('aString', 'aString')");
+
+debug("");
+debug("Check passing invalid arguments to 'setRotate'");
+shouldThrow("transform.setRotate()");
+shouldThrow("transform.setRotate(transform)");
+shouldThrow("transform.setRotate(svgElement)");
+shouldThrow("transform.setRotate('aString')");
+shouldThrow("transform.setRotate(1, transform)");
+shouldThrow("transform.setRotate(1, svgElement)");
+shouldThrow("transform.setRotate(1, 'aString')");
+shouldThrow("transform.setRotate(1, 1, transform)");
+shouldThrow("transform.setRotate(1, 1, svgElement)");
+shouldThrow("transform.setRotate(1, 1, 'aString')");
+
+debug("");
+debug("Check passing invalid arguments to 'setSkewX'");
+shouldThrow("transform.setSkewX()");
+shouldThrow("transform.setSkewX(transform)");
+shouldThrow("transform.setSkewX(svgElement)");
+shouldThrow("transform.setSkewX('aString')");
+
+debug("");
+debug("Check passing invalid arguments to 'setSkewY'");
+shouldThrow("transform.setSkewY()");
+shouldThrow("transform.setSkewY(transform)");
+shouldThrow("transform.setSkewY(svgElement)");
+shouldThrow("transform.setSkewY('aString')");
+
+successfullyParsed = true;
diff --git a/LayoutTests/svg/dom/script-tests/SVGTransformList.js b/LayoutTests/svg/dom/script-tests/SVGTransformList.js
new file mode 100644 (file)
index 0000000..f5fd92f
--- /dev/null
@@ -0,0 +1,16 @@
+description("This test checks the SVGTransformList API");
+
+var svgElement = document.createElementNS("http://www.w3.org/2000/svg", "svg");
+var rectElement = document.createElementNS("http://www.w3.org/2000/svg", "rect");
+var transform = rectElement.transform.baseVal;
+
+debug("");
+debug("Check passing invalid arguments to 'createSVGTransformFromMatrix'");
+shouldThrow("transform.createSVGTransformFromMatrix()");
+shouldThrow("transform.createSVGTransformFromMatrix(svgElement.createSVGTransform())");
+shouldThrow("transform.createSVGTransformFromMatrix(svgElement)");
+shouldThrow("transform.createSVGTransformFromMatrix('aString')");
+shouldThrow("transform.createSVGTransformFromMatrix(1)");
+shouldThrow("transform.createSVGTransformFromMatrix(true)");
+
+successfullyParsed = true;
index 008a837..f304bd3 100644 (file)
@@ -146,7 +146,6 @@ LOCAL_SRC_FILES += \
        bindings/js/JSSQLTransactionCustom.cpp \
        bindings/js/JSSVGElementInstanceCustom.cpp \
        bindings/js/JSSVGLengthCustom.cpp \
-       bindings/js/JSSVGMatrixCustom.cpp \
        bindings/js/JSSVGPathSegCustom.cpp \
        bindings/js/JSSVGPathSegListCustom.cpp \
        bindings/js/JSSharedWorkerCustom.cpp \
index 87c6a7d..14f4fb8 100644 (file)
@@ -155,7 +155,6 @@ LOCAL_SRC_FILES += \
        bindings/v8/custom/V8SVGDocumentCustom.cpp \
        bindings/v8/custom/V8SVGElementCustom.cpp \
        bindings/v8/custom/V8SVGLengthCustom.cpp \
-       bindings/v8/custom/V8SVGMatrixCustom.cpp
        bindings/v8/custom/V8SVGPathSegCustom.cpp \
 endif
 
index 97a3d2e..70c9cb0 100644 (file)
@@ -1715,7 +1715,6 @@ IF (ENABLE_SVG)
     LIST(APPEND WebCore_SOURCES
         bindings/js/JSSVGElementInstanceCustom.cpp
         bindings/js/JSSVGLengthCustom.cpp
-        bindings/js/JSSVGMatrixCustom.cpp
         bindings/js/JSSVGPathSegCustom.cpp
         bindings/js/JSSVGPathSegListCustom.cpp
         css/SVGCSSComputedStyleDeclaration.cpp
index e3d7d2b..a31b01f 100644 (file)
@@ -1,3 +1,141 @@
+2010-11-10  Nikolas Zimmermann  <nzimmermann@rim.com>
+
+        Reviewed by Dirk Schulze.
+
+        Convert SVGMatrix/SVGTransform/SVGTransformList to the new SVGPropertyTearOff concept
+        https://bugs.webkit.org/show_bug.cgi?id=49311
+
+        Move the last list type, SVGTransformList, and the last POD types, SVGMatrix & SVGTransform, over to the new SVGPropertyTearOff concept.
+        Removes the need for a custom JSSVGMatrix/V8SVGMatrix implementation, it's all integrated within the bindings now.
+
+        Tests: svg/W3C-SVG-1.1-SE/coords-dom-01-f.svg
+               svg/W3C-SVG-1.1-SE/coords-dom-02-f.svg
+               svg/W3C-SVG-1.1-SE/coords-dom-03-f.svg
+               svg/W3C-SVG-1.1-SE/coords-dom-04-f.svg
+               svg/W3C-SVG-1.1-SE/types-dom-01-b.svg
+               svg/W3C-SVG-1.1-SE/types-dom-02-f.svg
+               svg/W3C-SVG-1.1-SE/types-dom-03-b.svg
+               svg/W3C-SVG-1.1-SE/types-dom-04-b.svg
+               svg/W3C-SVG-1.1-SE/types-dom-05-b.svg
+               svg/dom/SVGMatrix.html
+               svg/dom/SVGTransform.html
+               svg/dom/SVGTransformList.html
+
+        * Android.jscbindings.mk: Removed JSSVGMatrixCustom.cpp.
+        * Android.v8bindings.mk: Removed V8SVGMatrixCustom.cpp.
+        * CMakeLists.txt: Remove JSSVGMatrixCustom.cpp. 
+        * GNUmakefile.am: Ditto. Add SVGAnimatedTransformListPropertyTearOff.h/SVGStaticPropertyWithParentTearOff.h/SVGTransformListPropertyTearOff.h/SVGAnimatedTransformList.h/SVGMatrix.h to build.
+        * WebCore.gypi: Ditto.
+        * WebCore.pro: Ditto.
+        * WebCore.vcproj/WebCore.vcproj: Ditto.
+        * WebCore.xcodeproj/project.pbxproj: Ditto.
+        * bindings/js/JSBindingsAllInOne.cpp: Remove JSSVGMatrixCustom.cpp
+        * bindings/js/JSSVGMatrixCustom.cpp: Removed.
+        * bindings/scripts/CodeGenerator.pm: Convert SVGMatrix/SVGTransform/SVGTransformList to the new concept.
+        * bindings/scripts/CodeGeneratorJS.pm: Ditto.
+        * bindings/scripts/CodeGeneratorObjC.pm: Ditto.
+        * bindings/scripts/CodeGeneratorV8.pm: Ditto.
+        * bindings/v8/custom/V8SVGMatrixCustom.cpp: Removed.
+        * svg/DeprecatedSVGAnimatedPropertyTraits.h: Remove SVGTransformList handling.
+        * svg/DeprecatedSVGAnimatedTemplate.h: Ditto.
+        * svg/SVGAnimateTransformElement.cpp: Adapt to SVGTransformList API changes.
+        (WebCore::transformListFor):
+        (WebCore::SVGAnimateTransformElement::resetToBaseValue):
+        (WebCore::SVGAnimateTransformElement::calculateAnimatedValue):
+        (WebCore::SVGAnimateTransformElement::applyResultsToTarget):
+        * svg/SVGAnimatedTransformList.h: Added.
+        * svg/SVGGradientElement.cpp: Ditto.
+        (WebCore::SVGGradientElement::SVGGradientElement):
+        (WebCore::SVGGradientElement::parseMappedAttribute):
+        * svg/SVGGradientElement.h: Ditto.
+        * svg/SVGLinearGradientElement.cpp: Ditto.
+        (WebCore::SVGLinearGradientElement::collectGradientAttributes):
+        * svg/SVGMatrix.h: Added. SVGMatrix inherits from AffineTransform, and is only used in the bindings. It implements SVGs special requirements.
+        (WebCore::SVGMatrix::translate): Returns a copy of the matrix, not affecting the original matrix.
+        (WebCore::SVGMatrix::scale): Ditto.
+        (WebCore::SVGMatrix::scaleNonUniform): Ditto.
+        (WebCore::SVGMatrix::rotate): Ditto.
+        (WebCore::SVGMatrix::flipX): Ditto.
+        (WebCore::SVGMatrix::flipY): Ditto.
+        (WebCore::SVGMatrix::skewX): Ditto.
+        (WebCore::SVGMatrix::skewY): Ditto.
+        (WebCore::SVGMatrix::multiply): Ditto.
+        (WebCore::SVGMatrix::inverse): Ditto.
+        (WebCore::SVGMatrix::rotateFromVector): Dittto.
+        * svg/SVGMatrix.idl: Enable StrictTypeChecking/RequiresAllArguments=Raise on all attributes/functions.
+        * svg/SVGPatternElement.cpp: Adapt to SVGTransformList API changes.
+        (WebCore::SVGPatternElement::SVGPatternElement):
+        (WebCore::SVGPatternElement::parseMappedAttribute):
+        (WebCore::SVGPatternElement::collectPatternAttributes):
+        * svg/SVGPatternElement.h: Ditto.
+        * svg/SVGPoint.idl: Enable StrictTypeChecking/RequiresAllArguments=Raise for 'matrixTransform', now that SVGMatrix has been converted to the new scheme.
+        * svg/SVGRadialGradientElement.cpp: Adapt to SVGTransformList API changes.
+        (WebCore::SVGRadialGradientElement::collectGradientAttributes):
+        * svg/SVGSVGElement.cpp: Ditto.
+        (WebCore::SVGSVGElement::createSVGTransformFromMatrix):
+        (WebCore::SVGSVGElement::viewBoxToViewTransform):
+        * svg/SVGSVGElement.h: Ditto.
+        * svg/SVGStyledTransformableElement.cpp: Ditto.
+        (WebCore::SVGStyledTransformableElement::SVGStyledTransformableElement):
+        (WebCore::SVGStyledTransformableElement::animatedLocalTransform):
+        (WebCore::SVGStyledTransformableElement::parseMappedAttribute):
+        * svg/SVGStyledTransformableElement.h: Ditto.
+        * svg/SVGTextElement.cpp: Ditto.
+        (WebCore::SVGTextElement::SVGTextElement):
+        (WebCore::SVGTextElement::parseMappedAttribute):
+        (WebCore::SVGTextElement::animatedLocalTransform):
+        * svg/SVGTextElement.h: Ditto.
+        * svg/SVGTransform.cpp: Modernize code, inlined some getters.
+        (WebCore::SVGTransform::SVGTransform):
+        (WebCore::SVGTransform::setMatrix):
+        * svg/SVGTransform.h: Reindent header.
+        (WebCore::SVGTransform::type):
+        (WebCore::SVGTransform::svgMatrix):
+        (WebCore::SVGTransform::matrix):
+        (WebCore::SVGTransform::angle):
+        (WebCore::SVGTransform::rotationCenter):
+        (WebCore::SVGTransform::isValid):
+        (WebCore::operator==): Avoid function calls, make operator== a friend of SVGTransform, and compare members directly.
+        (WebCore::operator!=):
+        * svg/SVGTransform.idl:
+        * svg/SVGTransformList.cpp: Rewritten as plain Vector<SVGTransform>.
+        (WebCore::SVGTransformList::createSVGTransformFromMatrix):
+        (WebCore::SVGTransformList::consolidate):
+        (WebCore::SVGTransformList::concatenate):
+        (WebCore::SVGTransformList::valueAsString):
+        * svg/SVGTransformList.h:
+        (WebCore::SVGTransformList::SVGTransformList):
+        * svg/SVGTransformList.idl: Enable StrictTypeChecking/RequiresAllArguments=Raise on all attributes/functions.
+        * svg/SVGTransformable.cpp: Adapt to SVGTransformList API changes.
+        (WebCore::SVGTransformable::parseTransformAttribute):
+        * svg/SVGTransformable.h: Ditto.
+        * svg/SVGViewSpec.cpp: Ditto.
+        (WebCore::SVGViewSpec::SVGViewSpec):
+        (WebCore::SVGViewSpec::setTransform):
+        (WebCore::SVGViewSpec::parseViewSpec):
+        * svg/SVGViewSpec.h: Ditto.
+        (WebCore::SVGViewSpec::transform):
+        * svg/properties/SVGAnimatedListPropertyTearOff.h: Made constructor and members protected.
+        * svg/properties/SVGAnimatedPropertyMacros.h: Add new helper macro DECLARE_ANIMATED_TRANSFORM_LIST_PROPERTY. This is needed until we expand all macros.
+        * svg/properties/SVGAnimatedTransformListPropertyTearOff.h: Added. Extends SVGAnimatedListPropertyTearOff, returning SVGTransformListPropertyTearOff objects.
+        (WebCore::SVGAnimatedTransformListPropertyTearOff::baseVal):
+        (WebCore::SVGAnimatedTransformListPropertyTearOff::animVal):
+        (WebCore::SVGAnimatedTransformListPropertyTearOff::create):
+        (WebCore::SVGAnimatedTransformListPropertyTearOff::SVGAnimatedTransformListPropertyTearOff):
+        * svg/properties/SVGListPropertyTearOff.h: Made construct and members protected.
+        * svg/properties/SVGProperty.h: Declare commitChange() as pure virtual method.
+        * svg/properties/SVGPropertyTraits.h: Handle SVGTransformList.
+        * svg/properties/SVGStaticPropertyWithParentTearOff.h: Added. Same concept as JSSVGStaticPODTypeWrapperWithParent, used to expose SVGPropertyTearOffs for types
+                                                               that are using this concept themselves. (SVGMatrix attribute of SVGTransform, both are POD types, using SVGPropertyTearOff).
+        (WebCore::SVGStaticPropertyWithParentTearOff::create):
+        (WebCore::SVGStaticPropertyWithParentTearOff::commitChange):
+        (WebCore::SVGStaticPropertyWithParentTearOff::SVGStaticPropertyWithParentTearOff):
+        * svg/properties/SVGTransformListPropertyTearOff.h: Added. Extends SVGListPropertyTearOff by two special SVGTransformList methods: consolidate and createSVGTransformFromMatrix.
+        (WebCore::SVGTransformListPropertyTearOff::create):
+        (WebCore::SVGTransformListPropertyTearOff::createSVGTransformFromMatrix):
+        (WebCore::SVGTransformListPropertyTearOff::consolidate):
+        (WebCore::SVGTransformListPropertyTearOff::SVGTransformListPropertyTearOff):
+
 2010-11-11  Alejandro G. Castro  <alex@igalia.com>
 
         Reviewed by Nikolas Zimmermann.
index 1d1bfdb..270b2a8 100644 (file)
@@ -798,7 +798,6 @@ webcore_sources += \
        WebCore/bindings/js/JSSVGContextCache.h \
        WebCore/bindings/js/JSSVGElementInstanceCustom.cpp \
        WebCore/bindings/js/JSSVGLengthCustom.cpp \
-       WebCore/bindings/js/JSSVGMatrixCustom.cpp \
        WebCore/bindings/js/JSSVGPathSegCustom.cpp \
        WebCore/bindings/js/JSSVGPathSegListCustom.cpp \
        WebCore/bindings/js/JSSVGPODListCustom.h \
@@ -3060,6 +3059,7 @@ webcore_sources += \
        WebCore/svg/properties/SVGAnimatedPropertySynchronizer.h \
        WebCore/svg/properties/SVGAnimatedPropertyTearOff.h \
        WebCore/svg/properties/SVGAnimatedStaticPropertyTearOff.h \
+       WebCore/svg/properties/SVGAnimatedTransformListPropertyTearOff.h \
        WebCore/svg/properties/SVGListProperty.h \
        WebCore/svg/properties/SVGListPropertyTearOff.h \
        WebCore/svg/properties/SVGProperty.h \
@@ -3067,6 +3067,8 @@ webcore_sources += \
        WebCore/svg/properties/SVGPropertyTraits.h \
        WebCore/svg/properties/SVGStaticListPropertyTearOff.h \
        WebCore/svg/properties/SVGStaticPropertyTearOff.h \
+       WebCore/svg/properties/SVGStaticPropertyWithParentTearOff.h \
+       WebCore/svg/properties/SVGTransformListPropertyTearOff.h \
        WebCore/svg/RadialGradientAttributes.h \
        WebCore/svg/SVGAElement.cpp \
        WebCore/svg/SVGAElement.h \
@@ -3089,6 +3091,7 @@ webcore_sources += \
        WebCore/svg/SVGAnimatedPreserveAspectRatio.h \
        WebCore/svg/SVGAnimatedRect.h \
        WebCore/svg/SVGAnimatedString.h \
+       WebCore/svg/SVGAnimatedTransformList.h \
        WebCore/svg/SVGAnimateElement.cpp \
        WebCore/svg/SVGAnimateElement.h \
        WebCore/svg/SVGAnimateMotionElement.cpp \
@@ -3231,6 +3234,7 @@ webcore_sources += \
        WebCore/svg/SVGMarkerElement.h \
        WebCore/svg/SVGMaskElement.cpp \
        WebCore/svg/SVGMaskElement.h \
+       WebCore/svg/SVGMatrix.h \
        WebCore/svg/SVGMetadataElement.cpp \
        WebCore/svg/SVGMetadataElement.h \
        WebCore/svg/SVGMissingGlyphElement.cpp \
index f79dbcd..846b6a1 100644 (file)
             'bindings/js/JSSVGContextCache.h',
             'bindings/js/JSSVGElementInstanceCustom.cpp',
             'bindings/js/JSSVGLengthCustom.cpp',
-            'bindings/js/JSSVGMatrixCustom.cpp',
             'bindings/js/JSSVGPathSegCustom.cpp',
             'bindings/js/JSSVGPathSegListCustom.cpp',
             'bindings/js/JSSVGPODListCustom.h',
             'bindings/v8/custom/V8SVGDocumentCustom.cpp',
             'bindings/v8/custom/V8SVGElementCustom.cpp',
             'bindings/v8/custom/V8SVGLengthCustom.cpp',
-            'bindings/v8/custom/V8SVGMatrixCustom.cpp',
             'bindings/v8/custom/V8SVGPathSegCustom.cpp',
             'bindings/v8/custom/V8SharedWorkerCustom.cpp',
             'bindings/v8/custom/V8StyleSheetCustom.cpp',
             'svg/properties/SVGAnimatedPropertySynchronizer.h',
             'svg/properties/SVGAnimatedPropertyTearOff.h',
             'svg/properties/SVGAnimatedStaticPropertyTearOff.h',
+            'svg/properties/SVGAnimatedTransformListPropertyTearOff.h',
             'svg/properties/SVGListProperty.h',
             'svg/properties/SVGListPropertyTearOff.h',
             'svg/properties/SVGProperty.h',
             'svg/properties/SVGPropertyTraits.h',
             'svg/properties/SVGStaticListPropertyTearOff.h',
             'svg/properties/SVGStaticPropertyTearOff.h',
+            'svg/properties/SVGStaticPropertyWithParentTearOff.h',
+            'svg/properties/SVGTransformListPropertyTearOff.h',
             'svg/ColorDistance.cpp',
             'svg/ColorDistance.h',
             'svg/DeprecatedSVGAnimatedProperty.h',
             'svg/SVGAnimatedPreserveAspectRatio.h',
             'svg/SVGAnimatedRect.h',
             'svg/SVGAnimatedString.h',
+            'svg/SVGAnimatedTransformList.h',
             'svg/SVGAnimationElement.cpp',
             'svg/SVGAnimationElement.h',
             'svg/SVGCircleElement.cpp',
             'svg/SVGMarkerElement.h',
             'svg/SVGMaskElement.cpp',
             'svg/SVGMaskElement.h',
+            'svg/SVGMatrix.h',
             'svg/SVGMetadataElement.cpp',
             'svg/SVGMetadataElement.h',
             'svg/SVGMissingGlyphElement.cpp',
index 8ca1c1d..e1cd5a1 100644 (file)
@@ -471,7 +471,6 @@ v8 {
         bindings/v8/custom/V8SVGDocumentCustom.cpp \
         bindings/v8/custom/V8SVGElementCustom.cpp \
         bindings/v8/custom/V8SVGLengthCustom.cpp \
-        bindings/v8/custom/V8SVGMatrixCustom.cpp \
         bindings/v8/custom/V8SVGPathSegCustom.cpp \
         \
         bindings/v8/specialization/V8BindingState.cpp\
@@ -2371,6 +2370,7 @@ HEADERS += \
     svg/properties/SVGAnimatedPropertySynchronizer.h \
     svg/properties/SVGAnimatedPropertyTearOff.h \
     svg/properties/SVGAnimatedStaticPropertyTearOff.h \
+    svg/properties/SVGAnimatedTransformListPropertyTearOff.h \
     svg/properties/SVGListProperty.h \
     svg/properties/SVGListPropertyTearOff.h \
     svg/properties/SVGProperty.h \
@@ -2378,6 +2378,8 @@ HEADERS += \
     svg/properties/SVGPropertyTraits.h \
     svg/properties/SVGStaticListPropertyTearOff.h \
     svg/properties/SVGStaticPropertyTearOff.h \
+    svg/properties/SVGStaticPropertyWithParentTearOff.h \
+    svg/properties/SVGTransformListPropertyTearOff.h \
     svg/SVGAElement.h \
     svg/SVGAltGlyphElement.h \
     svg/SVGAngle.h \
@@ -2394,6 +2396,7 @@ HEADERS += \
     svg/SVGAnimatedPreserveAspectRatio.h \
     svg/SVGAnimatedRect.h \
     svg/SVGAnimatedString.h \
+    svg/SVGAnimatedTransformList.h \
     svg/SVGAnimateElement.h \
     svg/SVGAnimateMotionElement.h \
     svg/SVGAnimateTransformElement.h \
@@ -2463,6 +2466,7 @@ HEADERS += \
     svg/SVGLocatable.h \
     svg/SVGMarkerElement.h \
     svg/SVGMaskElement.h \
+    svg/SVGMatrix.h \
     svg/SVGMetadataElement.h \
     svg/SVGMissingGlyphElement.h \
     svg/SVGMPathElement.h \
@@ -3369,7 +3373,6 @@ contains(DEFINES, ENABLE_SVG=1) {
     # TODO: this-one-is-not-auto-added! FIXME! tmp/SVGElementFactory.cpp \
             bindings/js/JSSVGElementInstanceCustom.cpp \
             bindings/js/JSSVGLengthCustom.cpp \
-            bindings/js/JSSVGMatrixCustom.cpp \
             bindings/js/JSSVGPathSegCustom.cpp \
             bindings/js/JSSVGPathSegListCustom.cpp
     }
index 0157ad6..47ee579 100644 (file)
                                        </FileConfiguration>\r
                                </File>\r
                                <File\r
-                                       RelativePath="..\bindings\js\JSSVGMatrixCustom.cpp"\r
-                                       >\r
-                                       <FileConfiguration\r
-                                               Name="Debug|Win32"\r
-                                               ExcludedFromBuild="true"\r
-                                               >\r
-                                               <Tool\r
-                                                       Name="VCCLCompilerTool"\r
-                                               />\r
-                                       </FileConfiguration>\r
-                                       <FileConfiguration\r
-                                               Name="Release|Win32"\r
-                                               ExcludedFromBuild="true"\r
-                                               >\r
-                                               <Tool\r
-                                                       Name="VCCLCompilerTool"\r
-                                               />\r
-                                       </FileConfiguration>\r
-                                       <FileConfiguration\r
-                                               Name="Debug_Internal|Win32"\r
-                                               ExcludedFromBuild="true"\r
-                                               >\r
-                                               <Tool\r
-                                                       Name="VCCLCompilerTool"\r
-                                               />\r
-                                       </FileConfiguration>\r
-                                       <FileConfiguration\r
-                                               Name="Debug_Cairo|Win32"\r
-                                               ExcludedFromBuild="true"\r
-                                               >\r
-                                               <Tool\r
-                                                       Name="VCCLCompilerTool"\r
-                                               />\r
-                                       </FileConfiguration>\r
-                                       <FileConfiguration\r
-                                               Name="Release_Cairo|Win32"\r
-                                               ExcludedFromBuild="true"\r
-                                               >\r
-                                               <Tool\r
-                                                       Name="VCCLCompilerTool"\r
-                                               />\r
-                                       </FileConfiguration>\r
-                                       <FileConfiguration\r
-                                               Name="Debug_All|Win32"\r
-                                               ExcludedFromBuild="true"\r
-                                               >\r
-                                               <Tool\r
-                                                       Name="VCCLCompilerTool"\r
-                                               />\r
-                                       </FileConfiguration>\r
-                               </File>\r
-                               <File\r
                                        RelativePath="..\bindings\js\JSSVGPathSegCustom.cpp"\r
                                        >\r
                                        <FileConfiguration\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath="..\svg\SVGAnimatedTransformList.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="..\svg\SVGAnimateElement.h"\r
                                >\r
                        </File>\r
                                >\r
                        </File>\r
                        <File\r
+                               RelativePath="..\svg\SVGMatrix.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
                                RelativePath="..\svg\SVGMetadataElement.h"\r
                                >\r
                        </File>\r
                                        >\r
                                </File>\r
                                <File\r
+                                       RelativePath="..\svg\properties\SVGAnimatedTransformListPropertyTearOff.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
                                        RelativePath="..\svg\properties\SVGListProperty.h"\r
                                        >\r
                                </File>\r
                                        RelativePath="..\svg\properties\SVGStaticPropertyTearOff.h"\r
                                        >\r
                                </File>\r
+                               <File\r
+                                       RelativePath="..\svg\properties\SVGStaticPropertyWithParentTearOff.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\svg\properties\SVGTransformListPropertyTearOff.h"\r
+                                       >\r
+                               </File>\r
                        </Filter>\r
                </Filter>\r
                <Filter\r
index d6acd9e..d68e75f 100644 (file)
@@ -60,6 +60,7 @@
                080081970ED3B2DD00C53BC0 /* WMLAnchorElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 080081950ED3B2DD00C53BC0 /* WMLAnchorElement.h */; };
                0804BF6E0EE09C3B0006C000 /* WMLDoElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0804BF6C0EE09C3B0006C000 /* WMLDoElement.cpp */; };
                0804BF6F0EE09C3B0006C000 /* WMLDoElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 0804BF6D0EE09C3B0006C000 /* WMLDoElement.h */; };
+               0806E57A12893045007CED32 /* SVGMatrix.h in Headers */ = {isa = PBXBuildFile; fileRef = 0806E57912893045007CED32 /* SVGMatrix.h */; settings = {ATTRIBUTES = (Private, ); }; };
                08082373117987C100241DE8 /* RenderSVGResourceContainer.h in Headers */ = {isa = PBXBuildFile; fileRef = 08082372117987C100241DE8 /* RenderSVGResourceContainer.h */; };
                080AEC810ED8708B00DF4CCE /* WMLIntrinsicEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 080AEC7D0ED8708A00DF4CCE /* WMLIntrinsicEvent.cpp */; };
                080AEC820ED8708B00DF4CCE /* WMLIntrinsicEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 080AEC7E0ED8708B00DF4CCE /* WMLIntrinsicEvent.h */; };
@@ -95,6 +96,7 @@
                082341C50FCF3A9500D75BD6 /* WMLSelectElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 082341C30FCF3A9400D75BD6 /* WMLSelectElement.cpp */; };
                082341C60FCF3A9500D75BD6 /* WMLSelectElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 082341C40FCF3A9400D75BD6 /* WMLSelectElement.h */; };
                0823D159127AD6AC000EBC95 /* SVGAnimatedInteger.h in Headers */ = {isa = PBXBuildFile; fileRef = 0823D158127AD6AC000EBC95 /* SVGAnimatedInteger.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               08250939128BD4D800E2ED8E /* SVGAnimatedTransformList.h in Headers */ = {isa = PBXBuildFile; fileRef = 08250938128BD4D800E2ED8E /* SVGAnimatedTransformList.h */; settings = {ATTRIBUTES = (Private, ); }; };
                082FCAC4110927CE00CC4821 /* JSSVGContextCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 082FCAC3110927CE00CC4821 /* JSSVGContextCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
                083192AA112B43050083C3B9 /* RenderSVGResource.h in Headers */ = {isa = PBXBuildFile; fileRef = 083192A7112B43050083C3B9 /* RenderSVGResource.h */; };
                083192AB112B43050083C3B9 /* RenderSVGResourceMasker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 083192A8112B43050083C3B9 /* RenderSVGResourceMasker.cpp */; };
                08563BD0117865F50012B578 /* RenderSVGResource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08563BCF117865F50012B578 /* RenderSVGResource.cpp */; };
                085797091278394C00A8EC5F /* SVGAnimatedBoolean.h in Headers */ = {isa = PBXBuildFile; fileRef = 085797081278394C00A8EC5F /* SVGAnimatedBoolean.h */; settings = {ATTRIBUTES = (Private, ); }; };
                08591AA50F085C4E009BACB1 /* InputElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 08591AA40F085C4E009BACB1 /* InputElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               085A15931289A8DD002710E3 /* SVGAnimatedTransformListPropertyTearOff.h in Headers */ = {isa = PBXBuildFile; fileRef = 085A15921289A8DD002710E3 /* SVGAnimatedTransformListPropertyTearOff.h */; settings = {ATTRIBUTES = (Private, ); }; };
                085AFDC80F2977350061F2B3 /* WMLFormControlElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 085AFDC60F2977350061F2B3 /* WMLFormControlElement.cpp */; };
                085AFDC90F2977350061F2B3 /* WMLFormControlElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 085AFDC70F2977350061F2B3 /* WMLFormControlElement.h */; settings = {ATTRIBUTES = (); }; };
                085B05C211FAE16C004D65F6 /* SVGResourcesCycleSolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 085B05C011FAE16C004D65F6 /* SVGResourcesCycleSolver.cpp */; };
                08C4C51B0EF19A4000E4840F /* WMLImageLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 08C4C5170EF19A4000E4840F /* WMLImageLoader.h */; };
                08C6A7AB117DFBAB00FEA1A2 /* RenderSVGResourceSolidColor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08C6A7A9117DFBAB00FEA1A2 /* RenderSVGResourceSolidColor.cpp */; };
                08C6A7AC117DFBAB00FEA1A2 /* RenderSVGResourceSolidColor.h in Headers */ = {isa = PBXBuildFile; fileRef = 08C6A7AA117DFBAB00FEA1A2 /* RenderSVGResourceSolidColor.h */; };
+               08C7136E128956A3001B107E /* SVGTransformListPropertyTearOff.h in Headers */ = {isa = PBXBuildFile; fileRef = 08C7136D128956A3001B107E /* SVGTransformListPropertyTearOff.h */; settings = {ATTRIBUTES = (Private, ); }; };
                08C7A2C710DC7462002D368B /* SVGNames.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 656581E909D1508D000E61D7 /* SVGNames.h */; };
                08C859C01274575400A5728D /* SVGAnimatedRect.h in Headers */ = {isa = PBXBuildFile; fileRef = 08C859BF1274575300A5728D /* SVGAnimatedRect.h */; settings = {ATTRIBUTES = (Private, ); }; };
                08C925190FCC7C4A00480DEC /* FilterEffect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08C925170FCC7C4A00480DEC /* FilterEffect.cpp */; };
                08C9251A0FCC7C4A00480DEC /* FilterEffect.h in Headers */ = {isa = PBXBuildFile; fileRef = 08C925180FCC7C4A00480DEC /* FilterEffect.h */; };
+               08CA3D4412894A3800FFF260 /* SVGStaticPropertyWithParentTearOff.h in Headers */ = {isa = PBXBuildFile; fileRef = 08CA3D4312894A3800FFF260 /* SVGStaticPropertyWithParentTearOff.h */; settings = {ATTRIBUTES = (Private, ); }; };
                08CD61BC0ED3929C002DDF51 /* WMLTaskElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08CD61B80ED3929C002DDF51 /* WMLTaskElement.cpp */; };
                08CD61BD0ED3929C002DDF51 /* WMLTaskElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 08CD61B90ED3929C002DDF51 /* WMLTaskElement.h */; };
                08D46CE3127AD5FC0089694B /* SVGAnimatedEnumeration.h in Headers */ = {isa = PBXBuildFile; fileRef = 08D46CE2127AD5FC0089694B /* SVGAnimatedEnumeration.h */; settings = {ATTRIBUTES = (Private, ); }; };
                B25599A30D00D8BA00BB825C /* SVGImage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B255990B0D00D8B900BB825C /* SVGImage.cpp */; };
                B25599A40D00D8BA00BB825C /* SVGImage.h in Headers */ = {isa = PBXBuildFile; fileRef = B255990C0D00D8B900BB825C /* SVGImage.h */; };
                B25599A50D00D8BA00BB825C /* EmptyClients.h in Headers */ = {isa = PBXBuildFile; fileRef = B255990D0D00D8B900BB825C /* EmptyClients.h */; };
-               B25DFAAF0B2E2929000E6510 /* JSSVGMatrixCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B25DFAAE0B2E2929000E6510 /* JSSVGMatrixCustom.cpp */; };
                B262B8040D1F32D000158F09 /* SVGFont.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B262B8030D1F32D000158F09 /* SVGFont.cpp */; };
                B266CD4D0C3AEC6500EB08D2 /* JSSVGException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B266CD4B0C3AEC6500EB08D2 /* JSSVGException.cpp */; };
                B266CD4E0C3AEC6500EB08D2 /* JSSVGException.h in Headers */ = {isa = PBXBuildFile; fileRef = B266CD4C0C3AEC6500EB08D2 /* JSSVGException.h */; };
                080081950ED3B2DD00C53BC0 /* WMLAnchorElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLAnchorElement.h; sourceTree = "<group>"; };
                0804BF6C0EE09C3B0006C000 /* WMLDoElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLDoElement.cpp; sourceTree = "<group>"; };
                0804BF6D0EE09C3B0006C000 /* WMLDoElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLDoElement.h; sourceTree = "<group>"; };
+               0806E57912893045007CED32 /* SVGMatrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGMatrix.h; sourceTree = "<group>"; };
                08082372117987C100241DE8 /* RenderSVGResourceContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderSVGResourceContainer.h; sourceTree = "<group>"; };
                080AEC7D0ED8708A00DF4CCE /* WMLIntrinsicEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLIntrinsicEvent.cpp; sourceTree = "<group>"; };
                080AEC7E0ED8708B00DF4CCE /* WMLIntrinsicEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLIntrinsicEvent.h; sourceTree = "<group>"; };
                082341C30FCF3A9400D75BD6 /* WMLSelectElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLSelectElement.cpp; sourceTree = "<group>"; };
                082341C40FCF3A9400D75BD6 /* WMLSelectElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLSelectElement.h; sourceTree = "<group>"; };
                0823D158127AD6AC000EBC95 /* SVGAnimatedInteger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedInteger.h; sourceTree = "<group>"; };
+               08250938128BD4D800E2ED8E /* SVGAnimatedTransformList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedTransformList.h; sourceTree = "<group>"; };
                082FCAC3110927CE00CC4821 /* JSSVGContextCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSVGContextCache.h; sourceTree = "<group>"; };
                083192A7112B43050083C3B9 /* RenderSVGResource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderSVGResource.h; sourceTree = "<group>"; };
                083192A8112B43050083C3B9 /* RenderSVGResourceMasker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSVGResourceMasker.cpp; sourceTree = "<group>"; };
                08563BCF117865F50012B578 /* RenderSVGResource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSVGResource.cpp; sourceTree = "<group>"; };
                085797081278394C00A8EC5F /* SVGAnimatedBoolean.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedBoolean.h; sourceTree = "<group>"; };
                08591AA40F085C4E009BACB1 /* InputElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InputElement.h; sourceTree = "<group>"; };
+               085A15921289A8DD002710E3 /* SVGAnimatedTransformListPropertyTearOff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedTransformListPropertyTearOff.h; sourceTree = "<group>"; };
                085AFDC60F2977350061F2B3 /* WMLFormControlElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLFormControlElement.cpp; sourceTree = "<group>"; };
                085AFDC70F2977350061F2B3 /* WMLFormControlElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLFormControlElement.h; sourceTree = "<group>"; };
                085B05C011FAE16C004D65F6 /* SVGResourcesCycleSolver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGResourcesCycleSolver.cpp; sourceTree = "<group>"; };
                08C4C5170EF19A4000E4840F /* WMLImageLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLImageLoader.h; sourceTree = "<group>"; };
                08C6A7A9117DFBAB00FEA1A2 /* RenderSVGResourceSolidColor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSVGResourceSolidColor.cpp; sourceTree = "<group>"; };
                08C6A7AA117DFBAB00FEA1A2 /* RenderSVGResourceSolidColor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderSVGResourceSolidColor.h; sourceTree = "<group>"; };
+               08C7136D128956A3001B107E /* SVGTransformListPropertyTearOff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTransformListPropertyTearOff.h; sourceTree = "<group>"; };
                08C859BF1274575300A5728D /* SVGAnimatedRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedRect.h; sourceTree = "<group>"; };
                08C925170FCC7C4A00480DEC /* FilterEffect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FilterEffect.cpp; path = filters/FilterEffect.cpp; sourceTree = "<group>"; };
                08C925180FCC7C4A00480DEC /* FilterEffect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FilterEffect.h; path = filters/FilterEffect.h; sourceTree = "<group>"; };
+               08CA3D4312894A3800FFF260 /* SVGStaticPropertyWithParentTearOff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGStaticPropertyWithParentTearOff.h; sourceTree = "<group>"; };
                08CD61B80ED3929C002DDF51 /* WMLTaskElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLTaskElement.cpp; sourceTree = "<group>"; };
                08CD61B90ED3929C002DDF51 /* WMLTaskElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLTaskElement.h; sourceTree = "<group>"; };
                08D46CE2127AD5FC0089694B /* SVGAnimatedEnumeration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedEnumeration.h; sourceTree = "<group>"; };
                B255990B0D00D8B900BB825C /* SVGImage.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SVGImage.cpp; sourceTree = "<group>"; };
                B255990C0D00D8B900BB825C /* SVGImage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SVGImage.h; sourceTree = "<group>"; };
                B255990D0D00D8B900BB825C /* EmptyClients.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = EmptyClients.h; sourceTree = "<group>"; };
-               B25DFAAE0B2E2929000E6510 /* JSSVGMatrixCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSSVGMatrixCustom.cpp; sourceTree = "<group>"; };
                B262B8030D1F32D000158F09 /* SVGFont.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SVGFont.cpp; sourceTree = "<group>"; };
                B266CD4B0C3AEC6500EB08D2 /* JSSVGException.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSSVGException.cpp; sourceTree = "<group>"; };
                B266CD4C0C3AEC6500EB08D2 /* JSSVGException.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSSVGException.h; sourceTree = "<group>"; };
                                081CDFBE126ECFE800D215CA /* SVGAnimatedPropertySynchronizer.h */,
                                088A0DFF126EF1DB00978F7A /* SVGAnimatedPropertyTearOff.h */,
                                08525E621278C00100A84778 /* SVGAnimatedStaticPropertyTearOff.h */,
+                               085A15921289A8DD002710E3 /* SVGAnimatedTransformListPropertyTearOff.h */,
                                0810764312828556007C63BA /* SVGListProperty.h */,
                                088A0E00126EF1DB00978F7A /* SVGListPropertyTearOff.h */,
                                088A0E01126EF1DB00978F7A /* SVGProperty.h */,
                                088A0E03126EF1DB00978F7A /* SVGPropertyTraits.h */,
                                0880F70D1282B46D00948505 /* SVGStaticListPropertyTearOff.h */,
                                0813A4E91284132600992511 /* SVGStaticPropertyTearOff.h */,
+                               08CA3D4312894A3800FFF260 /* SVGStaticPropertyWithParentTearOff.h */,
+                               08C7136D128956A3001B107E /* SVGTransformListPropertyTearOff.h */,
                        );
                        path = properties;
                        sourceTree = "<group>";
                                93309D95099E64910056E581 /* EditCommand.h */,
                                4F1534DD11B532EC0021FD86 /* EditingBehavior.h */,
                                4F1534DF11B533020021FD86 /* EditingBehaviorTypes.h */,
-                               9BAB6C6A12550631001626D4 /* EditingStyle.h */,
                                9BAB6C6B12550631001626D4 /* EditingStyle.cpp */,
+                               9BAB6C6A12550631001626D4 /* EditingStyle.h */,
                                4B3043CA0AE0373B00A82647 /* Editor.cpp */,
                                4B3043CB0AE0373B00A82647 /* Editor.h */,
                                93A38B4A0D0E5808006872C2 /* EditorCommand.cpp */,
                                B22277F50D00BF1F0071B782 /* SVGAnimatedRect.idl */,
                                084DB59A128008CC002A6D64 /* SVGAnimatedString.h */,
                                B22277F60D00BF1F0071B782 /* SVGAnimatedString.idl */,
+                               08250938128BD4D800E2ED8E /* SVGAnimatedTransformList.h */,
                                B22277F80D00BF1F0071B782 /* SVGAnimatedTransformList.idl */,
                                B22277F90D00BF1F0071B782 /* SVGAnimateElement.cpp */,
                                B22277FA0D00BF1F0071B782 /* SVGAnimateElement.h */,
                                B22278B00D00BF200071B782 /* SVGMaskElement.cpp */,
                                B22278B10D00BF200071B782 /* SVGMaskElement.h */,
                                B22278B20D00BF200071B782 /* SVGMaskElement.idl */,
+                               0806E57912893045007CED32 /* SVGMatrix.h */,
                                B22278B30D00BF200071B782 /* SVGMatrix.idl */,
                                B22278B40D00BF200071B782 /* SVGMetadataElement.cpp */,
                                B22278B50D00BF200071B782 /* SVGMetadataElement.h */,
                                082FCAC3110927CE00CC4821 /* JSSVGContextCache.h */,
                                08A48A6D0E86CF6D00E225DD /* JSSVGElementInstanceCustom.cpp */,
                                08E4FE450E2BD41400F4CAE0 /* JSSVGLengthCustom.cpp */,
-                               B25DFAAE0B2E2929000E6510 /* JSSVGMatrixCustom.cpp */,
                                B2C96D8C0B3AF2B7005E80EC /* JSSVGPathSegCustom.cpp */,
                                B297BC6F0B3C14CF0045A590 /* JSSVGPathSegListCustom.cpp */,
                                087D97BE10FB8D7700C00874 /* JSSVGPODListCustom.h */,
                BCB16BFB0979C38700467741 /* loader */ = {
                        isa = PBXGroup;
                        children = (
-                               A8D2B2521287A56000AF4DDA /* cache */,
                                1A8F6BB00DB55CDC001DB794 /* appcache */,
                                512DD8E80D91E691000F89EE /* archive */,
+                               A8D2B2521287A56000AF4DDA /* cache */,
                                5126E6B60A2E3AEF005C29FA /* icon */,
                                93A1EAA20A5634D8006960A0 /* mac */,
                                E1C416160F6563180092D2FB /* CrossOriginAccessControl.cpp */,
                                1A569CFA0D7E2B82007C3983 /* c_instance.h in Headers */,
                                1A569CFC0D7E2B82007C3983 /* c_runtime.h in Headers */,
                                1A569CFE0D7E2B82007C3983 /* c_utility.h in Headers */,
-                               BCB16C180979C3BD00467741 /* MemoryCache.h in Headers */,
                                BCB16C1A0979C3BD00467741 /* CachedCSSStyleSheet.h in Headers */,
                                BC64B4CC0CB4295D005F2B62 /* CachedFont.h in Headers */,
                                51C0AA390F2AA10A001648C2 /* CachedFrame.h in Headers */,
                                976D6C8F122B8A3D001FD1F7 /* FileThreadTask.h in Headers */,
                                976D6C91122B8A3D001FD1F7 /* FileWriter.h in Headers */,
                                893C47A81238908B002B3D86 /* FileWriterCallback.h in Headers */,
+                               46700ED1127B96CB00F5D5D6 /* FileWriterSync.h in Headers */,
                                BC5EB69F0E81DAEB00B25965 /* FillLayer.h in Headers */,
                                845E72F80FD261EE00A87D79 /* Filter.h in Headers */,
                                08C9251A0FCC7C4A00480DEC /* FilterEffect.h in Headers */,
                                4E19592A0A39DACC00220FE5 /* MediaQuery.h in Headers */,
                                4E19592C0A39DACC00220FE5 /* MediaQueryEvaluator.h in Headers */,
                                4E19592E0A39DACC00220FE5 /* MediaQueryExp.h in Headers */,
+                               BCB16C180979C3BD00467741 /* MemoryCache.h in Headers */,
                                9FFE3E7B11B59C5D0037874E /* MemoryInfo.h in Headers */,
                                93309DFA099E64920056E581 /* MergeIdenticalElementsCommand.h in Headers */,
                                E1ADECCE0E76AD8B004A1A5E /* MessageChannel.h in Headers */,
                                1CEFC9B90D78DC8C007D2579 /* SchedulePair.h in Headers */,
                                5162C7F511F77EFB00612EFE /* SchemeRegistry.h in Headers */,
                                BCEC01BE0C274DAC009F4EC9 /* Screen.h in Headers */,
-                               F39BE95C12673BF400E0A674 /* ScriptArguments.h in Headers */,
                                A84D82C111D3474800972990 /* ScriptableDocumentParser.h in Headers */,
+                               F39BE95C12673BF400E0A674 /* ScriptArguments.h in Headers */,
                                7AFD4A8B1131C2760035B883 /* ScriptBreakpoint.h in Headers */,
                                41F1D21F0EF35C2A00DA8753 /* ScriptCachedFrameData.h in Headers */,
                                416E75CB0EDF90C700360E1D /* ScriptCallFrame.h in Headers */,
                                08C859C01274575400A5728D /* SVGAnimatedRect.h in Headers */,
                                08525E631278C00100A84778 /* SVGAnimatedStaticPropertyTearOff.h in Headers */,
                                084DB59B128008CC002A6D64 /* SVGAnimatedString.h in Headers */,
+                               085A15931289A8DD002710E3 /* SVGAnimatedTransformListPropertyTearOff.h in Headers */,
                                B22279900D00BF220071B782 /* SVGAnimateElement.h in Headers */,
                                B22279930D00BF220071B782 /* SVGAnimateMotionElement.h in Headers */,
                                B22279950D00BF220071B782 /* SVGAnimateTransformElement.h in Headers */,
                                B2227A440D00BF220071B782 /* SVGMarkerElement.h in Headers */,
                                08735FB910E91232006D6FAD /* SVGMarkerLayoutInfo.h in Headers */,
                                B2227A470D00BF220071B782 /* SVGMaskElement.h in Headers */,
+                               0806E57A12893045007CED32 /* SVGMatrix.h in Headers */,
                                B2227A4B0D00BF220071B782 /* SVGMetadataElement.h in Headers */,
                                B2A1F2B10CEF0ABF00442F6A /* SVGMissingGlyphElement.h in Headers */,
                                B2227A4E0D00BF220071B782 /* SVGMPathElement.h in Headers */,
                                E4AFD0100DAF335500F5F55C /* SVGSMILElement.h in Headers */,
                                0880F70E1282B46D00948505 /* SVGStaticListPropertyTearOff.h in Headers */,
                                0813A4EA1284132600992511 /* SVGStaticPropertyTearOff.h in Headers */,
+                               08CA3D4412894A3800FFF260 /* SVGStaticPropertyWithParentTearOff.h in Headers */,
                                B2227AA90D00BF220071B782 /* SVGStopElement.h in Headers */,
                                B2227AAC0D00BF220071B782 /* SVGStringList.h in Headers */,
                                B2227AAF0D00BF220071B782 /* SVGStylable.h in Headers */,
                                B2227ADA0D00BF220071B782 /* SVGTransformable.h in Headers */,
                                B2227ADD0D00BF220071B782 /* SVGTransformDistance.h in Headers */,
                                B2227ADF0D00BF220071B782 /* SVGTransformList.h in Headers */,
+                               08C7136E128956A3001B107E /* SVGTransformListPropertyTearOff.h in Headers */,
                                B2227AE20D00BF220071B782 /* SVGTRefElement.h in Headers */,
                                B2227AE50D00BF220071B782 /* SVGTSpanElement.h in Headers */,
                                B2227AE70D00BF220071B782 /* SVGUnitTypes.h in Headers */,
                                93F199ED08245E59001E9ABC /* XSLTProcessor.h in Headers */,
                                E1BE512E0CF6C512002EA959 /* XSLTUnicodeSort.h in Headers */,
                                97DD4D870FDF4D6E00ECF9A4 /* XSSAuditor.h in Headers */,
-                               46700ED1127B96CB00F5D5D6 /* FileWriterSync.h in Headers */,
+                               08250939128BD4D800E2ED8E /* SVGAnimatedTransformList.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                        isa = PBXProject;
                        buildConfigurationList = 149C284308902B11008A9EFC /* Build configuration list for PBXProject "WebCore" */;
                        compatibilityVersion = "Xcode 2.4";
-                       developmentRegion = English;
                        hasScannedForEncodings = 1;
                        knownRegions = (
                                English,
                                1A569CF90D7E2B82007C3983 /* c_instance.cpp in Sources */,
                                1A569CFB0D7E2B82007C3983 /* c_runtime.cpp in Sources */,
                                1A569CFD0D7E2B82007C3983 /* c_utility.cpp in Sources */,
-                               BCB16C170979C3BD00467741 /* MemoryCache.cpp in Sources */,
                                BCB16C190979C3BD00467741 /* CachedCSSStyleSheet.cpp in Sources */,
                                BC64B4CB0CB4295D005F2B62 /* CachedFont.cpp in Sources */,
                                51C0AA410F2AA15E001648C2 /* CachedFrame.cpp in Sources */,
                                5160300B0CC4251200C8AC25 /* FileSystemPOSIX.cpp in Sources */,
                                976D6C8D122B8A3D001FD1F7 /* FileThread.cpp in Sources */,
                                976D6C90122B8A3D001FD1F7 /* FileWriter.cpp in Sources */,
+                               46700ED0127B96CB00F5D5D6 /* FileWriterSync.cpp in Sources */,
                                BC5EB69E0E81DAEB00B25965 /* FillLayer.cpp in Sources */,
                                08C925190FCC7C4A00480DEC /* FilterEffect.cpp in Sources */,
                                A8CFF04D0A154F09000A4234 /* FixedTableLayout.cpp in Sources */,
                                B2FA3DA80AB75A6F000E5AC4 /* JSSVGMarkerElement.cpp in Sources */,
                                B2FA3DAA0AB75A6F000E5AC4 /* JSSVGMaskElement.cpp in Sources */,
                                B2FA3DAC0AB75A6F000E5AC4 /* JSSVGMatrix.cpp in Sources */,
-                               B25DFAAF0B2E2929000E6510 /* JSSVGMatrixCustom.cpp in Sources */,
                                B2FA3DAE0AB75A6F000E5AC4 /* JSSVGMetadataElement.cpp in Sources */,
                                B27B28290CEF0C0700D39D54 /* JSSVGMissingGlyphElement.cpp in Sources */,
                                8542A7980AE5C94300DF58DF /* JSSVGNumber.cpp in Sources */,
                                4E1959290A39DACC00220FE5 /* MediaQuery.cpp in Sources */,
                                4E19592B0A39DACC00220FE5 /* MediaQueryEvaluator.cpp in Sources */,
                                4E19592D0A39DACC00220FE5 /* MediaQueryExp.cpp in Sources */,
+                               BCB16C170979C3BD00467741 /* MemoryCache.cpp in Sources */,
                                9FFE3E7A11B59C5D0037874E /* MemoryInfo.cpp in Sources */,
                                93309DF9099E64920056E581 /* MergeIdenticalElementsCommand.cpp in Sources */,
                                E1ADECCF0E76AD8B004A1A5E /* MessageChannel.cpp in Sources */,
                                93E227E30AF589AD00D48324 /* ResourceLoader.cpp in Sources */,
                                51AA3F6F0BD5AA9E00892971 /* ResourceLoaderMac.mm in Sources */,
                                973E325610883B7C005BC493 /* ResourceLoadNotifier.cpp in Sources */,
+                               D0CE58F8125E4CC200F3F199 /* ResourceLoadScheduler.cpp in Sources */,
                                514C767C0CE923A1007EF3CD /* ResourceRequestBase.cpp in Sources */,
                                514C76530CE9234E007EF3CD /* ResourceRequestMac.mm in Sources */,
                                514C767E0CE923A1007EF3CD /* ResourceResponseBase.cpp in Sources */,
                                93F19B0508245E59001E9ABC /* XSLTProcessorLibxslt.cpp in Sources */,
                                E1BE512D0CF6C512002EA959 /* XSLTUnicodeSort.cpp in Sources */,
                                97DD4D860FDF4D6E00ECF9A4 /* XSSAuditor.cpp in Sources */,
-                               46700ED0127B96CB00F5D5D6 /* FileWriterSync.cpp in Sources */,
-                               D0CE58F8125E4CC200F3F199 /* ResourceLoadScheduler.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index b786431..e46b050 100644 (file)
 #include "JSSQLTransactionSyncCustom.cpp"
 #include "JSSVGElementInstanceCustom.cpp"
 #include "JSSVGLengthCustom.cpp"
-#include "JSSVGMatrixCustom.cpp"
 #include "JSSVGPathSegCustom.cpp"
 #include "JSSVGPathSegListCustom.cpp"
 #include "JSScriptProfileNodeCustom.cpp"
diff --git a/WebCore/bindings/js/JSSVGMatrixCustom.cpp b/WebCore/bindings/js/JSSVGMatrixCustom.cpp
deleted file mode 100644 (file)
index 56f735e..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (C) 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
- * Copyright (C) 2009 Jeff Schiller <codedread@gmail.com>
- *
- * 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)
-#include "JSSVGMatrix.h"
-
-#include "AffineTransform.h"
-#include "SVGException.h"
-#include <runtime/Error.h>
-
-using namespace JSC;
-
-namespace WebCore {
-
-JSValue JSSVGMatrix::multiply(ExecState* exec)
-{
-    if (exec->argumentCount() < 1)
-        return throwError(exec, createSyntaxError(exec, "Not enough arguments"));
-
-    if (!exec->argument(0).inherits(&JSSVGMatrix::s_info))
-        return throwError(exec, createTypeError(exec, "secondMatrix argument was not a SVGMatrix"));
-
-    JSSVGMatrix* matrixObj = static_cast<JSSVGMatrix*>(asObject(exec->argument(0)));
-
-    AffineTransform m1(*impl());
-    AffineTransform m2(*(matrixObj->impl()));
-
-    SVGElement* context = JSSVGContextCache::svgContextForDOMObject(this);
-    return toJS(exec, globalObject(), JSSVGStaticPODTypeWrapper<AffineTransform>::create(m1.multLeft(m2)).get(), context);
-}
-
-JSValue JSSVGMatrix::inverse(ExecState* exec)
-{
-    AffineTransform imp(*impl());
-
-    SVGElement* context = JSSVGContextCache::svgContextForDOMObject(this);
-    JSValue result = toJS(exec, globalObject(), JSSVGStaticPODTypeWrapper<AffineTransform>::create(imp.inverse()).get(), context);
-
-    if (!imp.isInvertible())
-        setDOMException(exec, SVGException::SVG_MATRIX_NOT_INVERTABLE);
-
-    return result;
-}
-
-JSValue JSSVGMatrix::rotateFromVector(ExecState* exec)
-{
-    AffineTransform imp(*impl());
-    float x = exec->argument(0).toFloat(exec);
-    float y = exec->argument(1).toFloat(exec);
-
-    SVGElement* context = JSSVGContextCache::svgContextForDOMObject(this);
-    JSValue result = toJS(exec, globalObject(), JSSVGStaticPODTypeWrapper<AffineTransform>::create(imp.rotateFromVector(x, y)).get(), context);
-
-    if (x == 0.0 || y == 0.0)
-        setDOMException(exec, SVGException::SVG_INVALID_VALUE_ERR);
-
-    return result;
-}
-
-}
-
-#endif // ENABLE(SVG)
index d439c19..1e56b0c 100644 (file)
@@ -50,19 +50,10 @@ my %numericTypeHash = ("int" => 1, "short" => 1, "long" => 1, "long long" => 1,
 
 my %primitiveTypeHash = ( "boolean" => 1, "void" => 1, "Date" => 1);
 
-my %podTypeHash = ("SVGTransform" => 1);
-my %podTypesWithWritablePropertiesHash = ("SVGMatrix" => 1);
 my %stringTypeHash = ("DOMString" => 1, "AtomicString" => 1);
 
 my %nonPointerTypeHash = ("DOMTimeStamp" => 1, "CompareHow" => 1, "SVGPaintType" => 1);
 
-my %svgNewStyleAnimatedTypeHash = ("SVGAnimatedAngle" => 1, "SVGAnimatedBoolean" => 1,
-                                   "SVGAnimatedEnumeration" => 1, "SVGAnimatedInteger" => 1,
-                                   "SVGAnimatedLength" => 1, "SVGAnimatedLengthList" => 1,
-                                   "SVGAnimatedNumber" => 1, "SVGAnimatedNumberList" => 1,
-                                   "SVGAnimatedPreserveAspectRatio" => 1, "SVGAnimatedRect" => 1,
-                                   "SVGAnimatedString" => 1);
-
 my %svgAnimatedTypeHash = ("SVGAnimatedAngle" => 1, "SVGAnimatedBoolean" => 1,
                            "SVGAnimatedEnumeration" => 1, "SVGAnimatedInteger" => 1,
                            "SVGAnimatedLength" => 1, "SVGAnimatedLengthList" => 1,
@@ -81,17 +72,21 @@ my %svgTypeNeedingTearOff = (
     "SVGAngle" => "SVGPropertyTearOff<SVGAngle>",
     "SVGLength" => "SVGPropertyTearOff<SVGLength>",
     "SVGLengthList" => "SVGListPropertyTearOff<SVGLengthList>",
+    "SVGMatrix" => "SVGPropertyTearOff<SVGMatrix>",
     "SVGNumber" => "SVGPropertyTearOff<float>",
     "SVGNumberList" => "SVGListPropertyTearOff<SVGNumberList>",
     "SVGPoint" => "SVGPropertyTearOff<FloatPoint>",
     "SVGPointList" => "SVGListPropertyTearOff<SVGPointList>",
     "SVGPreserveAspectRatio" => "SVGPropertyTearOff<SVGPreserveAspectRatio>",
     "SVGRect" => "SVGPropertyTearOff<FloatRect>",
-    "SVGStringList" => "SVGStaticListPropertyTearOff<SVGStringList>"
+    "SVGStringList" => "SVGStaticListPropertyTearOff<SVGStringList>",
+    "SVGTransform" => "SVGPropertyTearOff<SVGTransform>",
+    "SVGTransformList" => "SVGTransformListPropertyTearOff"
 );
 
 my %svgTypeWithWritablePropertiesNeedingTearOff = (
-    "SVGPoint" => 1
+    "SVGPoint" => 1,
+    "SVGMatrix" => 1
 );
 
 # Cache of IDL file pathnames.
@@ -312,28 +307,8 @@ sub AvoidInclusionOfType
     my $object = shift;
     my $type = shift;
 
-    # Special case: SVGRect.h / SVGPoint.h / SVGNumber.h / SVGMatrix.h do not exist.
-    return 1 if $type eq "SVGRect" or $type eq "SVGPoint" or $type eq "SVGNumber" or $type eq "SVGMatrix";
-    return 0;
-}
-
-# FIXME: This method will go away once all SVG animated properties are converted to the new scheme.
-sub IsPodType
-{
-    my $object = shift;
-    my $type = shift;
-
-    return 1 if $podTypeHash{$type};
-    return 1 if $podTypesWithWritablePropertiesHash{$type};
-    return 0;
-}
-
-sub IsPodTypeWithWriteableProperties
-{
-    my $object = shift;
-    my $type = shift;
-
-    return 1 if $podTypesWithWritablePropertiesHash{$type};
+    # Special case: SVGRect.h / SVGPoint.h / SVGNumber.h do not exist.
+    return 1 if $type eq "SVGRect" or $type eq "SVGPoint" or $type eq "SVGNumber";
     return 0;
 }
 
@@ -415,22 +390,14 @@ sub GetSVGWrappedTypeNeedingTearOff
         $svgTypeNeedingTearOff =~ s/SVGListPropertyTearOff<//;
     } elsif ($svgTypeNeedingTearOff =~ /SVGStaticListPropertyTearOff/) {
         $svgTypeNeedingTearOff =~ s/SVGStaticListPropertyTearOff<//;
-    }
+    }  elsif ($svgTypeNeedingTearOff =~ /SVGTransformListPropertyTearOff/) {
+        $svgTypeNeedingTearOff =~ s/SVGTransformListPropertyTearOff<//;
+    } 
 
     $svgTypeNeedingTearOff =~ s/>//;
     return $svgTypeNeedingTearOff;
 }
 
-# FIXME: This method will go away once all SVG animated properties are converted to the new scheme.
-sub IsSVGNewStyleAnimatedType
-{
-    my $object = shift;
-    my $type = shift;
-
-    return 1 if $svgNewStyleAnimatedTypeHash{$type};
-    return 0;
-}
-
 sub IsSVGAnimatedType
 {
     my $object = shift;
index b18e57e..07575f7 100644 (file)
@@ -325,7 +325,7 @@ sub IsSVGTypeNeedingContextParameter
 
     return 0 unless $implClassName =~ /SVG/;
     return 0 if $implClassName =~ /Element/;
-    return 0 if $codeGenerator->IsSVGNewStyleAnimatedType($implClassName);
+    return 0 if $codeGenerator->IsSVGAnimatedType($implClassName);
     return 0 if $codeGenerator->IsSVGTypeNeedingTearOff($implClassName);
 
     my @noContextNeeded = ("SVGColor", "SVGDocument", "SVGPaint", "SVGZoomEvent");
@@ -672,18 +672,9 @@ sub GenerateHeader
     my ($svgPropertyType, $svgListPropertyType, $svgNativeType) = GetSVGPropertyTypes($implType);
     $implType = $svgNativeType if $svgNativeType;
 
-    # FIXME: Old style SVG JS bindings, will vanish soon.
-    my $podType = $dataNode->extendedAttributes->{"PODType"};
-    if ($podType) {
-        $implType = "JSSVGPODTypeWrapper<$podType> ";
-        $headerIncludes{"$podType.h"} = 1 if $podType ne "float";
-        $headerIncludes{"JSSVGPODTypeWrapper.h"} = 1;
-    }
-
-    my $svgPropertyOrPodType;
-    $svgPropertyOrPodType = $podType if $podType;
-    $svgPropertyOrPodType = $svgPropertyType if $svgPropertyType;
-    $svgPropertyOrPodType = $svgListPropertyType if $svgListPropertyType;
+    my $svgPropertyOrListPropertyType;
+    $svgPropertyOrListPropertyType = $svgPropertyType if $svgPropertyType;
+    $svgPropertyOrListPropertyType = $svgListPropertyType if $svgListPropertyType;
 
     my $numConstants = @{$dataNode->constants};
     my $numAttributes = @{$dataNode->attributes};
@@ -691,11 +682,11 @@ sub GenerateHeader
 
     push(@headerContent, "\nnamespace WebCore {\n\n");
 
-    if ($codeGenerator->IsSVGNewStyleAnimatedType($implClassName)) {
+    if ($codeGenerator->IsSVGAnimatedType($implClassName)) {
         $headerIncludes{"$implClassName.h"} = 1;
     } else {
         # Implementation class forward declaration
-        AddClassForwardIfNeeded($implClassName) unless $svgPropertyOrPodType;
+        AddClassForwardIfNeeded($implClassName) unless $svgPropertyOrListPropertyType;
     }
 
     AddClassForwardIfNeeded("JSDOMWindowShell") if $interfaceName eq "DOMWindow";
@@ -944,9 +935,7 @@ sub GenerateHeader
     }
 
     if (!$hasParent || $dataNode->extendedAttributes->{"GenerateToJS"} || $dataNode->extendedAttributes->{"CustomToJS"}) {
-        if ($podType) {
-            push(@headerContent, "JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, $implType*, SVGElement*);\n");
-        } elsif ($svgPropertyType) {
+        if ($svgPropertyType) {
             push(@headerContent, "JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, $implType*);\n");
         } elsif (IsSVGTypeNeedingContextParameter($implClassName)) {
             push(@headerContent, "JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, $implType*, SVGElement* context);\n");
@@ -955,10 +944,7 @@ sub GenerateHeader
         }
     }
     if (!$hasParent || $dataNode->extendedAttributes->{"GenerateNativeConverter"}) {
-
-        if ($podType) {
-            push(@headerContent, "$podType to${interfaceName}(JSC::JSValue);\n");
-        } elsif ($interfaceName eq "NodeFilter") {
+        if ($interfaceName eq "NodeFilter") {
             push(@headerContent, "PassRefPtr<NodeFilter> toNodeFilter(JSC::JSValue);\n");
         } else {
             push(@headerContent, "$implType* to${interfaceName}(JSC::JSValue);\n");
@@ -1430,15 +1416,9 @@ sub GenerateImplementation
     my ($svgPropertyType, $svgListPropertyType, $svgNativeType) = GetSVGPropertyTypes($implType);
     $implType = $svgNativeType if $svgNativeType;
 
-    my $podType = $dataNode->extendedAttributes->{"PODType"};
-    if ($podType) {
-        $implType = "JSSVGPODTypeWrapper<$podType> ";
-    }
-
-    my $svgPropertyOrPodType;
-    $svgPropertyOrPodType = $podType if $podType;
-    $svgPropertyOrPodType = $svgPropertyType if $svgPropertyType;
-    $svgPropertyOrPodType = $svgListPropertyType if $svgListPropertyType;
+    my $svgPropertyOrListPropertyType;
+    $svgPropertyOrListPropertyType = $svgPropertyType if $svgPropertyType;
+    $svgPropertyOrListPropertyType = $svgListPropertyType if $svgListPropertyType;
 
     # Constructor
     if ($interfaceName eq "DOMWindow") {
@@ -1561,11 +1541,6 @@ sub GenerateImplementation
                 push(@implContent, "{\n");
                 push(@implContent, "    ${className}* castedThis = static_cast<$className*>(asObject(slotBase));\n");
 
-                my $implClassNameForValueConversion = "";
-                if (!$svgPropertyOrPodType and ($codeGenerator->IsSVGAnimatedType($implClassName) or $attribute->type !~ /^readonly/)) {
-                    $implClassNameForValueConversion = $implClassName;
-                }
-
                 if ($dataNode->extendedAttributes->{"CheckDomainSecurity"} && 
                         !$attribute->signature->extendedAttributes->{"DoNotCheckDomainSecurity"} &&
                         !$attribute->signature->extendedAttributes->{"DoNotCheckDomainSecurityOnGet"}) {
@@ -1578,12 +1553,12 @@ sub GenerateImplementation
                 } elsif ($attribute->signature->extendedAttributes->{"CheckNodeSecurity"}) {
                     $implIncludes{"JSDOMBinding.h"} = 1;
                     push(@implContent, "    $implClassName* imp = static_cast<$implClassName*>(castedThis->impl());\n");
-                    push(@implContent, "    return checkNodeSecurity(exec, imp->$implGetterFunctionName()) ? " . NativeToJSValue($attribute->signature, 0, $implClassName, $implClassNameForValueConversion, "imp->$implGetterFunctionName()", "castedThis") . " : jsUndefined();\n");
+                    push(@implContent, "    return checkNodeSecurity(exec, imp->$implGetterFunctionName()) ? " . NativeToJSValue($attribute->signature, 0, $implClassName, "imp->$implGetterFunctionName()", "castedThis") . " : jsUndefined();\n");
                 } elsif ($attribute->signature->extendedAttributes->{"CheckFrameSecurity"}) {
                     $implIncludes{"Document.h"} = 1;
                     $implIncludes{"JSDOMBinding.h"} = 1;
                     push(@implContent, "    $implClassName* imp = static_cast<$implClassName*>(castedThis->impl());\n");
-                    push(@implContent, "    return checkNodeSecurity(exec, imp->contentDocument()) ? " . NativeToJSValue($attribute->signature,  0, $implClassName, $implClassNameForValueConversion, "imp->$implGetterFunctionName()", "castedThis") . " : jsUndefined();\n");
+                    push(@implContent, "    return checkNodeSecurity(exec, imp->contentDocument()) ? " . NativeToJSValue($attribute->signature, 0, $implClassName, "imp->$implGetterFunctionName()", "castedThis") . " : jsUndefined();\n");
                 } elsif ($type eq "EventListener") {
                     $implIncludes{"EventListener.h"} = 1;
                     push(@implContent, "    UNUSED_PARAM(exec);\n");
@@ -1616,27 +1591,21 @@ sub GenerateImplementation
                     }
 
                     if ($svgListPropertyType) {
-                        push(@implContent, "    JSValue result =  " . NativeToJSValue($attribute->signature, 0, $implClassName, "", "castedThis->impl()->$implGetterFunctionName()", "castedThis") . ";\n");
-                    } elsif ($svgPropertyOrPodType) {
-                        push(@implContent, "    $svgPropertyOrPodType imp(*castedThis->impl());\n") if $podType;
-                        push(@implContent, "    $svgPropertyOrPodType& imp = castedThis->impl()->propertyReference();\n") if !$podType;
-                        if ($svgPropertyOrPodType eq "float") { # Special case for JSSVGNumber
-                            push(@implContent, "    JSValue result =  " . NativeToJSValue($attribute->signature, 0, $implClassName, "", "imp", "castedThis") . ";\n");
+                        push(@implContent, "    JSValue result =  " . NativeToJSValue($attribute->signature, 0, $implClassName, "castedThis->impl()->$implGetterFunctionName()", "castedThis") . ";\n");
+                    } elsif ($svgPropertyOrListPropertyType) {
+                        push(@implContent, "    $svgPropertyOrListPropertyType& imp = castedThis->impl()->propertyReference();\n");
+                        if ($svgPropertyOrListPropertyType eq "float") { # Special case for JSSVGNumber
+                            push(@implContent, "    JSValue result =  " . NativeToJSValue($attribute->signature, 0, $implClassName, "imp", "castedThis") . ";\n");
                         } else {
-                            push(@implContent, "    JSValue result =  " . NativeToJSValue($attribute->signature, 0, $implClassName, "", "imp.$implGetterFunctionName()", "castedThis") . ";\n");
+                            push(@implContent, "    JSValue result =  " . NativeToJSValue($attribute->signature, 0, $implClassName, "imp.$implGetterFunctionName()", "castedThis") . ";\n");
                         }
                     } else {
                         my $getterExpression = "imp->" . $codeGenerator->GetterExpressionPrefix(\%implIncludes, $interfaceName, $attribute) . ")";
-                        my $jsType = NativeToJSValue($attribute->signature, 0, $implClassName, $implClassNameForValueConversion, $getterExpression, "castedThis");
+                        my $jsType = NativeToJSValue($attribute->signature, 0, $implClassName, $getterExpression, "castedThis");
                         push(@implContent, "    $implClassName* imp = static_cast<$implClassName*>(castedThis->impl());\n");
                         if ($codeGenerator->IsSVGAnimatedType($type)) {
                             push(@implContent, "    RefPtr<$type> obj = $jsType;\n");
-
-                            if ($codeGenerator->IsSVGNewStyleAnimatedType($type)) {
-                                push(@implContent, "    JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());\n");
-                            } else {
-                                push(@implContent, "    JSValue result =  toJS(exec, castedThis->globalObject(), obj.get(), imp);\n");
-                            }
+                            push(@implContent, "    JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());\n");
                         } else {
                             push(@implContent, "    JSValue result = $jsType;\n");
                         }
@@ -1647,12 +1616,12 @@ sub GenerateImplementation
 
                 } else {
                     push(@implContent, "    ExceptionCode ec = 0;\n");                    
-                    if ($svgPropertyOrPodType) {
-                        push(@implContent, "    $svgPropertyOrPodType imp(*castedThis->impl());\n");
-                        push(@implContent, "    JSC::JSValue result = " . NativeToJSValue($attribute->signature, 0, $implClassName, "", "imp.$implGetterFunctionName(ec)", "castedThis") . ";\n");
+                    if ($svgPropertyOrListPropertyType) {
+                        push(@implContent, "    $svgPropertyOrListPropertyType imp(*castedThis->impl());\n");
+                        push(@implContent, "    JSC::JSValue result = " . NativeToJSValue($attribute->signature, 0, $implClassName, "imp.$implGetterFunctionName(ec)", "castedThis") . ";\n");
                     } else {
                         push(@implContent, "    $implClassName* imp = static_cast<$implClassName*>(castedThis->impl());\n");
-                        push(@implContent, "    JSC::JSValue result = " . NativeToJSValue($attribute->signature, 0, $implClassName, $implClassNameForValueConversion, "imp->$implGetterFunctionName(ec)", "castedThis") . ";\n");
+                        push(@implContent, "    JSC::JSValue result = " . NativeToJSValue($attribute->signature, 0, $implClassName, "imp->$implGetterFunctionName(ec)", "castedThis") . ";\n");
                     }
 
                     push(@implContent, "    setDOMException(exec, ec);\n");
@@ -1812,10 +1781,9 @@ sub GenerateImplementation
                             }
 
                             my $nativeValue = JSValueToNative($attribute->signature, "value");
-                            if ($svgPropertyOrPodType) {
-                                push(@implContent, "    $svgPropertyOrPodType podImp(*imp);\n") if $podType;
-                                push(@implContent, "    $svgPropertyOrPodType& podImp = imp->propertyReference();\n") if !$podType;
-                                if ($svgPropertyOrPodType eq "float") { # Special case for JSSVGNumber
+                            if ($svgPropertyOrListPropertyType) {
+                                push(@implContent, "    $svgPropertyOrListPropertyType& podImp = imp->propertyReference();\n");
+                                if ($svgPropertyOrListPropertyType eq "float") { # Special case for JSSVGNumber
                                     push(@implContent, "    podImp = $nativeValue;\n");
                                 } else {
                                     push(@implContent, "    podImp.set$implSetterFunctionName($nativeValue");
@@ -1823,7 +1791,6 @@ sub GenerateImplementation
                                     push(@implContent, ");\n");
                                     push(@implContent, "    setDOMException(exec, ec);\n") if @{$attribute->setterExceptions};
                                 }
-                                push(@implContent, "    imp->commitChange(podImp, castedThis);\n") if $podType;
                                 if ($svgPropertyType) {
                                     if (@{$attribute->setterExceptions}) {
                                         push(@implContent, "    if (!ec)\n"); 
@@ -1915,32 +1882,11 @@ sub GenerateImplementation
                 push(@implContent, "        return JSValue::encode(jsUndefined());\n");
             }
 
-            # Special case for JSSVGLengthList / JSSVGTransformList / JSSVGPointList / JSSVGNumberList
-            # Instead of having JSSVG*Custom.cpp implementations for the SVGList interface for all of these
-            # classes, we directly forward the calls to JSSVGPODListCustom, which centralizes the otherwise
-            # duplicated code for the JSSVG*List classes mentioned above.
-            my $svgPODListType;
-            if ($implClassName =~ /SVG.*List/ and !$svgListPropertyType) {
-                $svgPODListType = $implClassName;
-                $svgPODListType =~ s/List$//;
-                $svgPODListType = "" unless $codeGenerator->IsPodType($svgPODListType);
-                
-                # Ignore additional (non-SVGList) SVGTransformList methods, that are not handled through JSSVGPODListCustom
-                $svgPODListType = "" if $functionImplementationName =~ /createSVGTransformFromMatrix/;
-                $svgPODListType = "" if $functionImplementationName =~ /consolidate/;
-            }
-
             if ($function->signature->extendedAttributes->{"Custom"} || $function->signature->extendedAttributes->{"JSCCustom"}) {
                 push(@implContent, "    return JSValue::encode(castedThis->" . $functionImplementationName . "(exec));\n");
-            } elsif ($svgPODListType) {
-                $implIncludes{"JS${svgPODListType}.h"} = 1;
-                $implIncludes{"JSSVGPODListCustom.h"} = 1;
-                push(@implContent, "    return JSValue::encode(JSSVGPODListCustom::$functionImplementationName<$className, " . GetNativeType($svgPODListType)
-                                 . ">(castedThis, exec, to" . $svgPODListType . "));\n");
             } else {
                 push(@implContent, "    $implType* imp = static_cast<$implType*>(castedThis->impl());\n");
-                push(@implContent, "    $svgPropertyOrPodType podImp(*imp);\n") if $podType;
-                push(@implContent, "    $svgPropertyOrPodType& podImp = imp->propertyReference();\n") if !$podType and $svgPropertyType;
+                push(@implContent, "    $svgPropertyOrListPropertyType& podImp = imp->propertyReference();\n") if $svgPropertyType;
 
                 my $numParameters = @{$function->parameters};
 
@@ -1979,7 +1925,7 @@ sub GenerateImplementation
                 } else {
                     my $argsIndex = 0;
                     my $paramIndex = 0;
-                    my $functionString = (($svgPropertyOrPodType and !$svgListPropertyType) ? "podImp." : "imp->") . $functionImplementationName . "(";
+                    my $functionString = (($svgPropertyOrListPropertyType and !$svgListPropertyType) ? "podImp." : "imp->") . $functionImplementationName . "(";
                     my $hasOptionalArguments = 0;
 
                     if ($function->signature->extendedAttributes->{"CustomArgumentHandling"}) {
@@ -2024,7 +1970,7 @@ sub GenerateImplementation
                                 $hasOptionalArguments = 1;
                             }
                             push(@implContent, "    if (argsCount <= $argsIndex) {\n");
-                            GenerateImplementationFunctionCall($function, $functionString, $paramIndex, "    " x 2, $podType, $svgPropertyType, $implClassName);
+                            GenerateImplementationFunctionCall($function, $functionString, $paramIndex, "    " x 2, $svgPropertyType, $implClassName);
                             push(@implContent, "    }\n\n");
                         }
 
@@ -2122,7 +2068,7 @@ sub GenerateImplementation
                     }
 
                     push(@implContent, "\n");
-                    GenerateImplementationFunctionCall($function, $functionString, $paramIndex, "    ", $podType, $svgPropertyType, $implClassName);
+                    GenerateImplementationFunctionCall($function, $functionString, $paramIndex, "    ", $svgPropertyType, $implClassName);
                 }
             }
             push(@implContent, "}\n\n");
@@ -2192,8 +2138,6 @@ sub GenerateImplementation
         push(@implContent, "{\n");
         if ($svgPropertyType) {
             push(@implContent, "    return getDOMObjectWrapper<$className, $implType>(exec, globalObject, object);\n");
-        } elsif ($podType) {
-            push(@implContent, "    return getDOMObjectWrapper<$className, $implType>(exec, globalObject, object, context);\n");
         } elsif (IsSVGTypeNeedingContextParameter($implClassName)) {
             push(@implContent, "    return getDOMObjectWrapper<$className>(exec, globalObject, object, context);\n");
         } else {
@@ -2203,16 +2147,9 @@ sub GenerateImplementation
     }
 
     if ((!$hasParent or $dataNode->extendedAttributes->{"GenerateNativeConverter"}) and !$dataNode->extendedAttributes->{"CustomNativeConverter"}) {
-        if ($podType) {
-            push(@implContent, "$podType to${interfaceName}(JSC::JSValue value)\n");
-            push(@implContent, "{\n");
-            push(@implContent, "    return value.inherits(&${className}::s_info) ? ($podType) *static_cast<$className*>(asObject(value))->impl() : $podType()");
-        } else {
-            push(@implContent, "$implType* to${interfaceName}(JSC::JSValue value)\n");
-            push(@implContent, "{\n");
-            push(@implContent, "    return value.inherits(&${className}::s_info) ? static_cast<$className*>(asObject(value))->impl() : 0");
-        }
-
+        push(@implContent, "$implType* to${interfaceName}(JSC::JSValue value)\n");
+        push(@implContent, "{\n");
+        push(@implContent, "    return value.inherits(&${className}::s_info) ? static_cast<$className*>(asObject(value))->impl() : 0");
         push(@implContent, ";\n}\n");
     }
 
@@ -2387,7 +2324,6 @@ sub GenerateImplementationFunctionCall()
     my $functionString = shift;
     my $paramIndex = shift;
     my $indent = shift;
-    my $podType = shift;
     my $svgPropertyType = shift;
     my $implClassName = shift;
 
@@ -2406,7 +2342,6 @@ sub GenerateImplementationFunctionCall()
     if ($function->signature->type eq "void") {
         push(@implContent, $indent . "$functionString;\n");
         push(@implContent, $indent . "setDOMException(exec, ec);\n") if @{$function->raisesExceptions};
-        push(@implContent, $indent . "imp->commitChange(podImp, castedThis);\n") if $podType;
 
         if ($svgPropertyType) {
             if (@{$function->raisesExceptions}) {
@@ -2419,7 +2354,7 @@ sub GenerateImplementationFunctionCall()
 
         push(@implContent, $indent . "return JSValue::encode(jsUndefined());\n");
     } else {
-        push(@implContent, "\n" . $indent . "JSC::JSValue result = " . NativeToJSValue($function->signature, 1, $implClassName, "", $functionString, "castedThis") . ";\n");
+        push(@implContent, "\n" . $indent . "JSC::JSValue result = " . NativeToJSValue($function->signature, 1, $implClassName, $functionString, "castedThis") . ";\n");
         push(@implContent, $indent . "setDOMException(exec, ec);\n") if @{$function->raisesExceptions};
 
         $callWith = $function->signature->extendedAttributes->{"CallWith"};
@@ -2428,12 +2363,6 @@ sub GenerateImplementationFunctionCall()
             push(@implContent, $indent . "    return JSValue::encode(jsUndefined());\n");
         }
 
-        if ($podType and not $function->signature->extendedAttributes->{"Immutable"}) {
-            # Immutable methods do not commit changes back to the instance, thus producing
-            # a new instance rather than mutating existing one.
-            push(@implContent, $indent . "imp->commitChange(podImp, castedThis);\n");
-        }
-
         push(@implContent, $indent . "return JSValue::encode(result);\n");
     }
 }
@@ -2458,9 +2387,7 @@ my %nativeType = (
     "NodeFilter" => "RefPtr<NodeFilter>",
     "SerializedScriptValue" => "RefPtr<SerializedScriptValue>",
     "IDBKey" => "RefPtr<IDBKey>",
-    "SVGMatrix" => "AffineTransform",
     "SVGPaintType" => "SVGPaint::SVGPaintType",
-    "SVGTransform" => "SVGTransform",
     "boolean" => "bool",
     "double" => "double",
     "float" => "float",
@@ -2508,6 +2435,11 @@ sub GetSVGPropertyTypes
         $svgListPropertyType = $svgWrappedNativeType;
         $headerIncludes{"$svgWrappedNativeType.h"} = 1;
         $headerIncludes{"SVGAnimatedListPropertyTearOff.h"} = 1;
+    } elsif ($svgNativeType =~ /SVGTransformListPropertyTearOff/) {
+        $svgListPropertyType = $svgWrappedNativeType;
+        $headerIncludes{"$svgWrappedNativeType.h"} = 1;
+        $headerIncludes{"SVGAnimatedListPropertyTearOff.h"} = 1;
+        $headerIncludes{"SVGTransformListPropertyTearOff.h"} = 1;
     }
 
     return ($svgPropertyType, $svgListPropertyType, $svgNativeType);
@@ -2572,7 +2504,6 @@ sub NativeToJSValue
     my $signature = shift;
     my $inFunctionCall = shift;
     my $implClassName = shift;
-    my $implClassNameForValueConversion = shift;
     my $value = shift;
     my $thisValue = shift;
 
@@ -2606,35 +2537,6 @@ sub NativeToJSValue
     }
     
     my $globalObject = "$thisValue->globalObject()";
-    if ($codeGenerator->IsPodType($type)) {
-        $implIncludes{"JS$type.h"} = 1;
-
-        my $nativeType = GetNativeType($type);
-
-        my $getter = $value;
-        $getter =~ s/imp->//;
-        $getter =~ s/\(\)//;
-
-        my $setter = "set" . $codeGenerator->WK_ucfirst($getter);
-
-        # Function calls will never return 'modifyable' POD types (ie. SVGRect getBBox()) - no need to keep track changes to the returned SVGRect
-        if ($inFunctionCall eq 0
-            and not $codeGenerator->IsSVGAnimatedType($implClassName)
-            and $codeGenerator->IsPodTypeWithWriteableProperties($type)
-            and not defined $signature->extendedAttributes->{"Immutable"}) {
-            if ($codeGenerator->IsPodType($implClassName)) {
-                return "toJS(exec, $globalObject, JSSVGStaticPODTypeWrapperWithPODTypeParent<$nativeType, $implClassName>::create($value, $thisValue->impl()).get(), JSSVGContextCache::svgContextForDOMObject(castedThis))";
-            } else {
-                return "toJS(exec, $globalObject, JSSVGStaticPODTypeWrapperWithParent<$nativeType, $implClassName>::create(imp, &${implClassName}::$getter, &${implClassName}::$setter).get(), imp)";
-            }
-        }
-
-        if ($implClassNameForValueConversion eq "") {
-            return "toJS(exec, $globalObject, JSSVGStaticPODTypeWrapper<$nativeType>::create($value).get(), 0 /* no context on purpose */)";
-        } else {
-            return "toJS(exec, $globalObject, JSSVGDynamicPODTypeWrapperCache<$nativeType, $implClassNameForValueConversion>::lookupOrCreateWrapper(imp, &${implClassNameForValueConversion}::$getter, &${implClassNameForValueConversion}::$setter).get(), JSSVGContextCache::svgContextForDOMObject(castedThis));"
-        }
-    } 
 
     if ($type eq "CSSStyleDeclaration") {
         $implIncludes{"CSSMutableStyleDeclaration.h"} = 1;
@@ -2675,20 +2577,35 @@ sub NativeToJSValue
         return "toJSNewlyCreated(exec, $globalObject, WTF::getPtr($value))";
     }
 
-    if ($codeGenerator->IsSVGNewStyleAnimatedType($implClassName)) {
+    if ($codeGenerator->IsSVGAnimatedType($implClassName)) {
         # Convert from abstract SVGProperty to real type, so the right toJS() method can be invoked.
         $value = "static_cast<" . GetNativeType($type) . ">($value)";
     } elsif ($codeGenerator->IsSVGTypeNeedingTearOff($type) and not $implClassName =~ /List$/) {
         my $tearOffType = $codeGenerator->GetSVGTypeNeedingTearOff($type);
         if ($codeGenerator->IsSVGTypeWithWritablePropertiesNeedingTearOff($type) and $inFunctionCall eq 0 and not defined $signature->extendedAttributes->{"Immutable"}) {
-            $tearOffType =~ s/SVGPropertyTearOff</SVGStaticPropertyTearOff<$implClassName, /;
-            $implIncludes{"SVGStaticPropertyTearOff.h"} = 1;
-
             my $getter = $value;
+            $getter =~ s/imp\.//;
             $getter =~ s/imp->//;
             $getter =~ s/\(\)//;
-            my $updater = "update" . $codeGenerator->WK_ucfirst($getter);
-            $value = "${tearOffType}::create(imp, $value, &${implClassName}::$updater)";
+            my $updateMethod = "&${implClassName}::update" . $codeGenerator->WK_ucfirst($getter);
+
+            my $selfIsTearOffType = $codeGenerator->IsSVGTypeNeedingTearOff($implClassName);
+            if ($selfIsTearOffType) {
+                $implIncludes{"SVGStaticPropertyWithParentTearOff.h"} = 1;
+                $tearOffType =~ s/SVGPropertyTearOff</SVGStaticPropertyWithParentTearOff<$implClassName, /;
+
+                if ($value =~ /matrix/ and $implClassName eq "SVGTransform") {
+                    # SVGTransform offers a matrix() method for internal usage that returns an AffineTransform
+                    # and a svgMatrix() method returning a SVGMatrix, used for the bindings.
+                    $value =~ s/matrix/svgMatrix/;
+                }
+
+                $value = "${tearOffType}::create(castedThis->impl(), $value, $updateMethod)";
+            } else {
+                $implIncludes{"SVGStaticPropertyTearOff.h"} = 1;
+                $tearOffType =~ s/SVGPropertyTearOff</SVGStaticPropertyTearOff<$implClassName, /;
+                $value = "${tearOffType}::create(imp, $value, $updateMethod)";
+            }
         } elsif ($tearOffType =~ /SVGStaticListPropertyTearOff/) {
             my $extraImp = "GetOwnerElementForType<$implClassName, IsDerivedFromSVGElement<$implClassName>::value>::ownerElement(imp), ";
             $value = "${tearOffType}::create($extraImp$value)";
index 69e24a9..50334a2 100644 (file)
@@ -492,7 +492,7 @@ sub GetPropertyAttributes
     # FIXME: <rdar://problem/5049934> Consider using 'nonatomic' on the DOM @property declarations.
     if ($codeGenerator->IsStringType($type) || IsNativeObjCType($type)) {
         push(@attributes, "copy");
-    } elsif ($codeGenerator->IsPodType($type) || $codeGenerator->IsSVGAnimatedType($type)) {
+    } elsif ($codeGenerator->IsSVGAnimatedType($type)) {
         push(@attributes, "retain");
     } elsif (!$codeGenerator->IsStringType($type) && !$codeGenerator->IsPrimitiveType($type) && $type ne "DOMTimeStamp" && $type ne "CompareHow" && $type ne "SVGPaintType") {
         push(@attributes, "retain");
@@ -587,25 +587,12 @@ sub AddIncludesForType
         return;
     }
 
-    if ($codeGenerator->IsSVGNewStyleAnimatedType($type)) {
-        $implIncludes{"${type}.h"} = 1;
-        $implIncludes{"DOM${type}Internal.h"} = 1;
-        return;
-    }
-
     if ($codeGenerator->IsSVGAnimatedType($type)) {
-        $implIncludes{"DeprecatedSVGAnimatedTemplate.h"} = 1;
+        $implIncludes{"${type}.h"} = 1;
         $implIncludes{"DOM${type}Internal.h"} = 1;
         return;
     }
 
-    if ($type eq "SVGMatrix") {
-        $implIncludes{"AffineTransform.h"} = 1;
-        $implIncludes{"DOMSVGMatrixInternal.h"} = 1;
-        $implIncludes{"SVGException.h"} = 1;
-        return;
-    }
-
     if ($type =~ /(\w+)(Abs|Rel)$/) {
         $implIncludes{"$1.h"} = 1;
         $implIncludes{"DOM${type}Internal.h"} = 1;
@@ -683,6 +670,9 @@ sub GetSVGPropertyTypes
     } elsif ($svgNativeType =~ /SVGListPropertyTearOff/ or $svgNativeType =~ /SVGStaticListPropertyTearOff/) {
         $svgListPropertyType = "WebCore::$svgWrappedNativeType";
         $svgListPropertyType =~ s/</\<WebCore::/;
+    } elsif ($svgNativeType =~ /SVGTransformListPropertyTearOff/) {
+        $svgListPropertyType = "WebCore::$svgWrappedNativeType";
+        $svgListPropertyType =~ s/</\<WebCore::/;
     }
 
     return ($svgPropertyType, $svgListPropertyType, $svgNativeType);
@@ -999,8 +989,6 @@ sub GenerateHeader
 
     unless ($isProtocol) {
         # Generate internal interfaces
-        my $podType = $dataNode->extendedAttributes->{"PODType"};
-        my $podTypeWithNamespace;
         my $implClassName = GetImplClassName($interfaceName);
         my $implClassNameWithNamespace = "WebCore::" . $implClassName;
 
@@ -1008,16 +996,15 @@ sub GenerateHeader
         my ($svgPropertyType, $svgListPropertyType, $svgNativeType) = GetSVGPropertyTypes($implClassName);
         $implType = $svgNativeType if $svgNativeType;
 
-        if ($podType) {
-            $podTypeWithNamespace = ($podType eq "float") ? "$podType" : "WebCore::$podType";
-        }
         # Generate interface definitions. 
         @internalHeaderContent = split("\r", $implementationLicenseTemplate);
 
         push(@internalHeaderContent, "\n#import <WebCore/$className.h>\n\n");
         push(@internalHeaderContent, "#import <WebCore/SVGAnimatedPropertyTearOff.h>\n\n") if $svgPropertyType;
-        push(@internalHeaderContent, "#import <WebCore/SVGAnimatedListPropertyTearOff.h>\n\n") if $svgListPropertyType;
+        if ($svgListPropertyType) {
+            push(@internalHeaderContent, "#import <WebCore/SVGAnimatedListPropertyTearOff.h>\n\n");
+            push(@internalHeaderContent, "#import <WebCore/SVGTransformListPropertyTearOff.h>\n\n") if $svgListPropertyType =~ /SVGTransformList/;
+        }
         push(@internalHeaderContent, $interfaceAvailabilityVersionCheck) if length $interfaceAvailabilityVersion;
 
         if ($interfaceName eq "Node") {
@@ -1026,16 +1013,12 @@ sub GenerateHeader
 
         my $startedNamespace = 0;
 
-        if ($codeGenerator->IsSVGNewStyleAnimatedType($interfaceName)) {
+        if ($codeGenerator->IsSVGAnimatedType($interfaceName)) {
             push(@internalHeaderContent, "#import <WebCore/$implClassName.h>\n\n");
-        } elsif ($codeGenerator->IsSVGAnimatedType($interfaceName)) {
-            push(@internalHeaderContent, "#import <WebCore/DeprecatedSVGAnimatedTemplate.h>\n\n");
         } else {
             push(@internalHeaderContent, "namespace WebCore {\n");
             $startedNamespace = 1;
-            if ($podType and $podType ne "float") {
-                push(@internalHeaderContent, "    class $podType;\n");
-            } elsif ($interfaceName eq "Node") {
+            if ($interfaceName eq "Node") {
                 push(@internalHeaderContent, "    class EventTarget;\n    class Node;\n");
             } else {
                 push(@internalHeaderContent, "    class $implClassName;\n");
@@ -1043,13 +1026,8 @@ sub GenerateHeader
             push(@internalHeaderContent, "}\n\n");
         }
 
-        if ($podType) {
-            push(@internalHeaderContent, "$podTypeWithNamespace core($className *);\n");
-            push(@internalHeaderContent, "$className *kit($podTypeWithNamespace);\n");
-        } else {
-            push(@internalHeaderContent, "$implType* core($className *);\n");
-            push(@internalHeaderContent, "$className *kit($implType*);\n");
-        }
+        push(@internalHeaderContent, "$implType* core($className *);\n");
+        push(@internalHeaderContent, "$className *kit($implType*);\n");
 
         if ($dataNode->extendedAttributes->{Polymorphic}) {
             push(@internalHeaderContent, "Class kitClass($implType*);\n");
@@ -1084,18 +1062,11 @@ sub GenerateImplementation
 
     my $numAttributes = @{$dataNode->attributes};
     my $numFunctions = @{$dataNode->functions};
-
-    my $podType = $dataNode->extendedAttributes->{"PODType"};
-    my $podTypeWithNamespace;
     my $implType = $implClassNameWithNamespace;
 
     my ($svgPropertyType, $svgListPropertyType, $svgNativeType) = GetSVGPropertyTypes($implClassName);
     $implType = $svgNativeType if $svgNativeType;
 
-    if ($podType) {
-        $podTypeWithNamespace = ($podType eq "float") ? "$podType" : "WebCore::$podType";
-    }
-
     # - Add default header template.
     @implContentHeader = split("\r", $implementationLicenseTemplate);
 
@@ -1124,20 +1095,14 @@ sub GenerateImplementation
 
     $implIncludes{"DOMSVGPathSegInternal.h"} = 1 if $interfaceName =~ /^SVGPathSeg.+/;
 
-    if ($codeGenerator->IsSVGAnimatedType($interfaceName) and !$codeGenerator->IsSVGNewStyleAnimatedType($interfaceName)) {
-        $implIncludes{"DeprecatedSVGAnimatedTemplate.h"} = 1;
-    } elsif ($interfaceName =~ /(\w+)(Abs|Rel)$/) {
+    if ($interfaceName =~ /(\w+)(Abs|Rel)$/) {
         $implIncludes{"$1.h"} = 1;
     } else {
-        if (!$podType) {
-            if (!$codeGenerator->AvoidInclusionOfType($implClassName)) {
-                $implIncludes{"$implClassName.h"} = 1 ;
-            } elsif ($codeGenerator->IsSVGTypeNeedingTearOff($implClassName)) {
-                my $includeType = $codeGenerator->GetSVGWrappedTypeNeedingTearOff($implClassName);
-                $implIncludes{"${includeType}.h"} = 1;
-            }
-        } else {
-            $implIncludes{"$podType.h"} = 1 unless $podType eq "float";
+        if (!$codeGenerator->AvoidInclusionOfType($implClassName)) {
+            $implIncludes{"$implClassName.h"} = 1 ;
+        } elsif ($codeGenerator->IsSVGTypeNeedingTearOff($implClassName)) {
+            my $includeType = $codeGenerator->GetSVGWrappedTypeNeedingTearOff($implClassName);
+            $implIncludes{"${includeType}.h"} = 1;
         }
     } 
 
@@ -1146,9 +1111,7 @@ sub GenerateImplementation
     push(@implContent, "#import <wtf/GetPtr.h>\n\n");
 
     # add implementation accessor
-    if ($podType) {
-        push(@implContent, "#define IMPL reinterpret_cast<$podTypeWithNamespace*>(_internal)\n\n");
-    } elsif ($parentImplClassName eq "Object") {
+    if ($parentImplClassName eq "Object") {
         push(@implContent, "#define IMPL reinterpret_cast<$implType*>(_internal)\n\n");
     } else {
         my $baseClassWithNamespace = "WebCore::$baseClass";
@@ -1171,8 +1134,6 @@ sub GenerateImplementation
             push(@implContent, "        [self detach];\n");
             push(@implContent, "        IMPL->deref();\n");
             push(@implContent, "    };\n");
-        } elsif ($podType) {
-            push(@implContent, "    delete IMPL;\n");
         } else {
             push(@implContent, "    if (_internal)\n");
             push(@implContent, "        IMPL->deref();\n");
@@ -1187,8 +1148,6 @@ sub GenerateImplementation
             push(@implContent, "        [self detach];\n");
             push(@implContent, "        IMPL->deref();\n");
             push(@implContent, "    };\n");
-        } elsif ($podType) {
-            push(@implContent, "    delete IMPL;\n");
         } else {
             push(@implContent, "    if (_internal)\n");
             push(@implContent, "        IMPL->deref();\n");
@@ -1285,7 +1244,7 @@ sub GenerateImplementation
             } elsif ($attribute->signature->extendedAttributes->{"ConvertToString"}) {
                 $getterContentHead = "WTF::String::number(" . $getterContentHead;
                 $getterContentTail .= ")";
-            } elsif ($codeGenerator->IsPodType($idlType) or $idlType eq "Date") {
+            } elsif ($idlType eq "Date") {
                 $getterContentHead = "kit($getterContentHead";
                 $getterContentTail .= ")";
             } elsif ($svgPropertyType) {
@@ -1296,7 +1255,35 @@ sub GenerateImplementation
                 } else {    
                     $getterContentHead = "IMPL->propertyReference().$getterContentHead";
                 }
-            } elsif ($codeGenerator->IsSVGNewStyleAnimatedType($implClassName) and $codeGenerator->IsSVGTypeNeedingTearOff($idlType)) {
+
+                if ($codeGenerator->IsSVGTypeWithWritablePropertiesNeedingTearOff($idlType) and not defined $attribute->signature->extendedAttributes->{"Immutable"}) {
+                    my $getter = $getterContentHead;
+                    $getter =~ s/\(\)//;
+                    
+                    my $tearOffType = GetSVGTypeWithNamespace($idlType);
+                    my $selfIsTearOffType = $codeGenerator->IsSVGTypeNeedingTearOff($implClassName);
+                    if ($selfIsTearOffType) {
+                        $implIncludes{"SVGStaticPropertyWithParentTearOff.h"} = 1;
+                        $tearOffType =~ s/SVGPropertyTearOff</SVGStaticPropertyWithParentTearOff<$implClassNameWithNamespace, /;
+
+                        my $getter = $getterExpressionPrefix;
+                        $getter =~ s/IMPL->//;
+                        $getter =~ s/\(//;
+                        my $updateMethod = "&${implClassNameWithNamespace}::update" . $codeGenerator->WK_ucfirst($getter);
+
+                        if ($getterContentHead =~ /matrix/ and $implClassName eq "SVGTransform") {
+                            # SVGTransform offers a matrix() method for internal usage that returns an AffineTransform
+                            # and a svgMatrix() method returning a SVGMatrix, used for the bindings.
+                            $getterContentHead =~ s/matrix/svgMatrix/;
+                        }
+
+                        $getterContentHead = "${tearOffType}::create(IMPL, $getterContentHead$getterContentTail, $updateMethod)";
+
+                        $getterContentHead = "kit(WTF::getPtr($getterContentHead";
+                        $getterContentTail = "))";
+                    }
+                }
+            } elsif ($codeGenerator->IsSVGAnimatedType($implClassName) and $codeGenerator->IsSVGTypeNeedingTearOff($idlType)) {
                 my $idlTypeWithNamespace = GetSVGTypeWithNamespace($idlType);
                 $getterContentHead = "kit(static_cast<$idlTypeWithNamespace*>($getterContentHead)";
                 $getterContentTail .= ")";
@@ -1320,8 +1307,8 @@ sub GenerateImplementation
                         my $getter = $getterContentHead;
                         $getter =~ s/IMPL->//;
                         $getter =~ s/\(//;
-                        my $updater = "update" . $codeGenerator->WK_ucfirst($getter);
-                        $getterContentHead = "kit(WTF::getPtr(${idlTypeWithNamespace}::create(IMPL, $getterContentHead$getterContentTail, &${implClassNameWithNamespace}::$updater";
+                        my $updateMethod = "&${implClassNameWithNamespace}::update" . $codeGenerator->WK_ucfirst($getter);
+                        $getterContentHead = "kit(WTF::getPtr(${idlTypeWithNamespace}::create(IMPL, $getterContentHead$getterContentTail, $updateMethod";
                         $getterContentTail .= "))";
                     } elsif ($idlTypeWithNamespace =~ /SVGStaticListPropertyTearOff/) {
                         my $extraImp = "WebCore::GetOwnerElementForType<$implClassNameWithNamespace, WebCore::IsDerivedFromSVGElement<$implClassNameWithNamespace>::value>::ownerElement(IMPL), ";
@@ -1429,8 +1416,6 @@ sub GenerateImplementation
                 } elsif ($svgListPropertyType) {
                     $getterContentHead = "$getterExpressionPrefix";
                     push(@implContent, "    IMPL->$coreSetterName($arg);\n");
-                } elsif ($podType) {
-                    push(@implContent, "    IMPL->$coreSetterName($arg);\n");
                 } else {
                     my $setterExpressionPrefix = $codeGenerator->SetterExpressionPrefix(\%implIncludes, $interfaceName, $attribute);
                     my $ec = $hasSetterException ? ", ec" : "";
@@ -1547,12 +1532,10 @@ sub GenerateImplementation
             }
 
             # FIXME! We need [Custom] support for ObjC, to move these hacks into DOMSVGLength/MatrixCustom.mm
-            my $svgMatrixRotateFromVector = ($podType and $podType eq "AffineTransform" and $functionName eq "rotateFromVector");
-            my $svgMatrixInverse = ($podType and $podType eq "AffineTransform" and $functionName eq "inverse");
             my $svgLengthConvertToSpecifiedUnits = ($svgPropertyType and $svgPropertyType eq "WebCore::SVGLength" and $functionName eq "convertToSpecifiedUnits");
 
             push(@parameterNames, "IMPL->contextElement()") if $svgLengthConvertToSpecifiedUnits; 
-            push(@parameterNames, "ec") if $raisesExceptions and !($svgMatrixRotateFromVector || $svgMatrixInverse);
+            push(@parameterNames, "ec") if $raisesExceptions;
 
             # Handle arguments that are 'SVGProperty' based (SVGAngle/SVGLength). We need to convert from SVGPropertyTearOff<Type>* to Type,
             # to be able to call the desired WebCore function. If the conversion fails, we can't extract Type and need to raise an exception.
@@ -1561,6 +1544,10 @@ sub GenerateImplementation
                 $currentParameter++;
 
                 my $paramName = $param->name;
+
+                # make a new parameter name if the original conflicts with a property name
+                $paramName = "in" . ucfirst($paramName) if $attributeNames{$paramName};
+
                 my $idlType = $codeGenerator->StripModule($param->type);
                 next if not $codeGenerator->IsSVGTypeNeedingTearOff($idlType) or $implClassName =~ /List$/;
 
@@ -1591,21 +1578,7 @@ sub GenerateImplementation
                 $content = $caller . "->$content";
             }
 
-            if ($svgMatrixRotateFromVector) {
-                # Special case with rotateFromVector & SVGMatrix        
-                push(@functionContent, "    $exceptionInit\n");
-                push(@functionContent, "    if (x == 0.0 || y == 0.0)\n");
-                push(@functionContent, "        ec = WebCore::SVGException::SVG_INVALID_VALUE_ERR;\n");
-                push(@functionContent, "    $exceptionRaiseOnError\n");
-                push(@functionContent, "    return kit($content);\n");
-            } elsif ($svgMatrixInverse) {
-                # Special case with inverse & SVGMatrix
-                push(@functionContent, "    $exceptionInit\n");
-                push(@functionContent, "    if (!$caller->isInvertible())\n");
-                push(@functionContent, "        ec = WebCore::SVGException::SVG_MATRIX_NOT_INVERTABLE;\n");
-                push(@functionContent, "    $exceptionRaiseOnError\n");
-                push(@functionContent, "    return kit($content);\n");
-            } elsif ($returnType eq "void") {
+            if ($returnType eq "void") {
                 # Special case 'void' return type.
                 if ($raisesExceptions) {
                     push(@functionContent, "    $exceptionInit\n");
@@ -1617,7 +1590,7 @@ sub GenerateImplementation
                     push(@functionContent, "    $exceptionRaiseOnError\n");
                 } else {
                     push(@functionContent, "    $content;\n");
-                    push(@functionContent, "    IMPL->commitChange()\n") if $svgPropertyType;
+                    push(@functionContent, "    IMPL->commitChange();\n") if $svgPropertyType;
                 }
             } elsif (defined $needsCustom{"NodeToReturn"}) {
                 # Special case the insertBefore, replaceChild, removeChild 
@@ -1641,8 +1614,6 @@ sub GenerateImplementation
                     if ($codeGenerator->IsSVGTypeNeedingTearOff($function->signature->type) and not $implClassName =~ /List$/) {
                         my $idlTypeWithNamespace = GetSVGTypeWithNamespace($function->signature->type);
                         $content = "kit(WTF::getPtr(${idlTypeWithNamespace}::create($content)))";
-                    } elsif ($codeGenerator->IsPodType($function->signature->type)) {
-                        $content = "kit($content)";
                     } else {
                         $content = "kit(WTF::getPtr($content))";
                     }
@@ -1693,28 +1664,12 @@ sub GenerateImplementation
     push(@implContent, "\@end\n");
 
     # Generate internal interfaces
-    if ($podType) {
-        push(@implContent, "\n$podTypeWithNamespace core($className *wrapper)\n");
-        push(@implContent, "{\n");
-        push(@implContent, "    return wrapper ? *reinterpret_cast<$podTypeWithNamespace*>(wrapper->_internal) : $podTypeWithNamespace();\n");
-        push(@implContent, "}\n\n");
-    } else {
-        push(@implContent, "\n$implType* core($className *wrapper)\n");
-        push(@implContent, "{\n");
-        push(@implContent, "    return wrapper ? reinterpret_cast<$implType*>(wrapper->_internal) : 0;\n");
-        push(@implContent, "}\n\n");
-    }
+    push(@implContent, "\n$implType* core($className *wrapper)\n");
+    push(@implContent, "{\n");
+    push(@implContent, "    return wrapper ? reinterpret_cast<$implType*>(wrapper->_internal) : 0;\n");
+    push(@implContent, "}\n\n");
 
-    if ($podType) {
-        # FIXME: Implement caching.
-        push(@implContent, "$className *kit($podTypeWithNamespace value)\n");
-        push(@implContent, "{\n");
-        push(@implContent, "    $assertMainThread;\n");
-        push(@implContent, "    $className *wrapper = [[$className alloc] _init];\n");
-        push(@implContent, "    wrapper->_internal = reinterpret_cast<DOMObjectInternal*>(new $podTypeWithNamespace(value));\n");
-        push(@implContent, "    return [wrapper autorelease];\n");
-        push(@implContent, "}\n");
-    } elsif ($parentImplClassName eq "Object") {        
+    if ($parentImplClassName eq "Object") {        
         push(@implContent, "$className *kit($implType* value)\n");
         push(@implContent, "{\n");
         push(@implContent, "    $assertMainThread;\n");
index 6e92ec7..25eea7f 100644 (file)
@@ -87,14 +87,6 @@ sub finish
     $object->WriteData();
 }
 
-# Workaround for V8 bindings difference where RGBColor is not a POD type.
-# FIXME: This method will go away once all SVG animated properties are converted to the new scheme.
-sub IsPodType
-{
-    my $type = shift;
-    return $codeGenerator->IsPodType($type);
-}
-
 # Params: 'domClass' struct
 sub GenerateInterface
 {
@@ -169,22 +161,6 @@ sub AddIncludesForType
     }
 }
 
-sub AddIncludesForSVGAnimatedType
-{
-    my $type = shift;
-    return if $codeGenerator->IsSVGNewStyleAnimatedType($type);
-
-    $type =~ s/SVGAnimated//;
-
-    if ($type eq "Point" or $type eq "Rect") {
-        $implIncludes{"Float$type.h"} = 1;
-    } elsif ($type eq "String") {
-        $implIncludes{"PlatformString.h"} = 1;
-    }
-
-    $implIncludes{"DeprecatedSVGAnimatedTemplate.h"} = 1;
-}
-
 # If the node has a [Conditional=XXX] attribute, returns an "ENABLE(XXX)" string for use in an #if.
 sub GenerateConditionalString
 {
@@ -226,9 +202,16 @@ sub GetSVGPropertyTypes
     } elsif ($svgNativeType =~ /SVGListPropertyTearOff/ or $svgNativeType =~ /SVGStaticListPropertyTearOff/) {
         $svgListPropertyType = $svgWrappedNativeType;
         $implIncludes{"SVGAnimatedListPropertyTearOff.h"} = 1;
+    } elsif ($svgNativeType =~ /SVGTransformListPropertyTearOff/) {
+        $svgListPropertyType = $svgWrappedNativeType;
+        $implIncludes{"SVGAnimatedListPropertyTearOff.h"} = 1;
+        $implIncludes{"SVGTransformListPropertyTearOff.h"} = 1;
+    }
+
+    if ($svgPropertyType) {
+        $svgPropertyType = "SVGPoint" if $svgPropertyType eq "FloatPoint";
     }
 
-    $svgPropertyType = "SVGPoint" if $svgPropertyType eq "FloatPoint";
     return ($svgPropertyType, $svgListPropertyType, $svgNativeType);
 }
 
@@ -249,10 +232,8 @@ sub GenerateHeader
 
     # - Add default header template
     push(@headerContent, GenerateHeaderContentHeader($dataNode));
-    my $podType = $dataNode->extendedAttributes->{"PODType"};
 
     my %headerInclues = ();
-    $headerIncludes{"$podType.h"} = 1 if $podType and ($podType ne "double" and $podType ne "float" and $podType ne "RGBA32");
     $headerIncludes{"wtf/text/StringHash.h"} = 1;
     $headerIncludes{"WrapperTypeInfo.h"} = 1;
     $headerIncludes{"V8DOMWrapper.h"} = 1;
@@ -270,7 +251,6 @@ sub GenerateHeader
     push(@headerContent, "#include <wtf/HashMap.h>\n");
     
     push(@headerContent, "\nnamespace WebCore {\n");
-    push(@headerContent, "\ntemplate<typename PODType> class V8SVGPODTypeWrapper;\n") if $podType;
     push(@headerContent, "\ntemplate<typename PropertyType> class SVGPropertyTearOff;\n") if $svgPropertyType;
     if ($svgListPropertyType) {
         if ($svgListPropertyType =~ /SVGStaticListPropertyTearOff/) {
@@ -478,7 +458,6 @@ sub GetHeaderClassInclude
         $className =~ s/Abs|Rel//;
     }
     return "" if ($codeGenerator->AvoidInclusionOfType($className));
-    return "DeprecatedSVGAnimatedTemplate.h" if $codeGenerator->IsSVGAnimatedType($className) and !$codeGenerator->IsSVGNewStyleAnimatedType($className); 
     return "${className}.h";
 }
 
@@ -704,28 +683,15 @@ sub GenerateNormalAttrGetter
     my $attrName = $attribute->signature->name;
 
     my $attrType = GetTypeFromSignature($attribute->signature);
-    my $attrIsPodType = IsPodType($attrType);
 
     my $nativeType = GetNativeTypeFromSignature($attribute->signature, -1);
-    my $isPodType = IsPodType($implClassName);
     my $skipContext = 0;
 
-    if ($isPodType) {
-        $implClassName = GetNativeType($implClassName);
-        $implIncludes{"V8SVGPODTypeWrapper.h"} = 1;
-    }
-
     # Special case: SVGZoomEvent's attributes are all read-only
     if ($implClassName eq "SVGZoomEvent") {
-        $attrIsPodType = 0;
         $skipContext = 1;
     }
 
-    # Special case for SVGColor
-    if (($implClassName eq "SVGColor") and ($attrName eq "rgbColor")) {
-        $attrIsPodType = 0;
-    }
-
     my $getterStringUsesImp = $implClassName ne "SVGNumber";
     my $svgNativeType = $codeGenerator->GetSVGTypeNeedingTearOff($implClassName);
 
@@ -739,19 +705,9 @@ static v8::Handle<v8::Value> ${attrName}AttrGetter(v8::Local<v8::String> name, c
     INC_STATS(\"DOM.$implClassName.$attrName._get\");
 END
 
-    if ($isPodType) {
-        push(@implContentDecls, <<END);
-    V8SVGPODTypeWrapper<$implClassName>* impWrapper = V8SVGPODTypeWrapper<$implClassName>::toNative(info.Holder());
-    $implClassName impInstance = *impWrapper;
-END
-        if ($getterStringUsesImp) {
-            push(@implContentDecls, <<END);
-    $implClassName* imp = &impInstance;
-END
-        }
-    } elsif ($svgNativeType) {
+    if ($svgNativeType) {
         my $svgWrappedNativeType = $codeGenerator->GetSVGWrappedTypeNeedingTearOff($implClassName);
-        if ($svgWrappedNativeType =~ /List$/) {
+        if ($svgWrappedNativeType =~ /List/) {
             push(@implContentDecls, <<END);
     $svgNativeType* imp = V8${implClassName}::toNative(info.Holder());
 END
@@ -808,7 +764,7 @@ END
         push(@implContentDecls, "    if (!V8BindingSecurity::checkNodeSecurity(V8BindingState::Only(), imp->contentDocument()))\n    return v8::Handle<v8::Value>();\n\n");
     }
 
-    my $useExceptions = 1 if @{$attribute->getterExceptions} and !($isPodType);
+    my $useExceptions = 1 if @{$attribute->getterExceptions};
     if ($useExceptions) {
         $implIncludes{"ExceptionCode.h"} = 1;
         push(@implContentDecls, "    ExceptionCode ec = 0;\n");
@@ -832,97 +788,61 @@ END
     my $result;
     my $wrapper;
 
-    if ($attrIsPodType) {
-        $implIncludes{"V8SVGPODTypeWrapper.h"} = 1;
-
-        my $getter = $getterString;
-        $getter =~ s/imp->//;
-        $getter =~ s/\(\)//;
-        my $setter = "set" . $codeGenerator->WK_ucfirst($getter);
-
-        my $implClassIsAnimatedType = $codeGenerator->IsSVGAnimatedType($implClassName);
-        if (not $implClassIsAnimatedType and $codeGenerator->IsPodTypeWithWriteableProperties($attrType) and not defined $attribute->signature->extendedAttributes->{"Immutable"}) {
-            if (IsPodType($implClassName)) {
-                my $wrapper = "V8SVGStaticPODTypeWrapperWithPODTypeParent<$nativeType, $implClassName>::create($getterString, impWrapper)";
-                push(@implContentDecls, "    RefPtr<V8SVGStaticPODTypeWrapperWithPODTypeParent<$nativeType, $implClassName> > wrapper = $wrapper;\n");
-            } else {
-                my $wrapper = "V8SVGStaticPODTypeWrapperWithParent<$nativeType, $implClassName>::create(imp, &${implClassName}::$getter, &${implClassName}::$setter)";
-                push(@implContentDecls, "    RefPtr<V8SVGStaticPODTypeWrapperWithParent<$nativeType, $implClassName> > wrapper = $wrapper;\n");
-            }
-        } else {
-            if ($implClassIsAnimatedType) {
-                # We can't hash member function pointers, so instead generate
-                # some hashing material based on the names of the methods.
-                my $hashhex = substr(Digest::MD5::md5_hex("${implClassName}::$getter ${implClassName}::$setter)"), 0, 8);
-                my $wrapper = "V8SVGDynamicPODTypeWrapperCache<$nativeType, $implClassName>::lookupOrCreateWrapper(imp, &${implClassName}::$getter, &${implClassName}::$setter, 0x$hashhex)";
-                push(@implContentDecls, "    RefPtr<V8SVGPODTypeWrapper<" . $nativeType . "> > wrapper = $wrapper;\n");
-            } else {
-                my $wrapper = GenerateSVGStaticPodTypeWrapper($returnType, $getterString);
-                push(@implContentDecls, "    RefPtr<V8SVGStaticPODTypeWrapper<" . $nativeType . "> > wrapper = $wrapper;\n");
-            }
-        }
-
-    } else {
         if ($attribute->signature->type eq "EventListener" && $dataNode->name eq "DOMWindow") {
-            push(@implContentDecls, "    if (!imp->document())\n");
-            push(@implContentDecls, "        return v8::Handle<v8::Value>();\n");
-        }
+        push(@implContentDecls, "    if (!imp->document())\n");
+        push(@implContentDecls, "        return v8::Handle<v8::Value>();\n");
+    }
 
-        if ($useExceptions) {
-            if ($nativeType =~ /^V8Parameter/) {
-              push(@implContentDecls, "    " . ConvertToV8Parameter($attribute->signature, $nativeType, "v", $getterString) . ";\n");
-            } else {
-              push(@implContentDecls, "    $nativeType v = $getterString;\n");
-            }
-            push(@implContentDecls, GenerateSetDOMException("    "));
-            $result = "v";
-            $result .= ".release()" if (IsRefPtrType($returnType));
+    if ($useExceptions) {
+        if ($nativeType =~ /^V8Parameter/) {
+          push(@implContentDecls, "    " . ConvertToV8Parameter($attribute->signature, $nativeType, "v", $getterString) . ";\n");
         } else {
-            # Can inline the function call into the return statement to avoid overhead of using a Ref<> temporary
-            $result = $getterString;
+          push(@implContentDecls, "    $nativeType v = $getterString;\n");
         }
+        push(@implContentDecls, GenerateSetDOMException("    "));
+        $result = "v";
+        $result .= ".release()" if (IsRefPtrType($returnType));
+    } else {
+        # Can inline the function call into the return statement to avoid overhead of using a Ref<> temporary
+        $result = $getterString;
+    }
  
-        # Special case for readonly or Replaceable attributes (with a few exceptions). This attempts to ensure that JS wrappers don't get
-        # garbage-collected prematurely when their lifetime is strongly tied to their owner. We accomplish this by inserting a reference to
-        # the newly created wrapper into an internal field of the holder object.
-        if (!IsNodeSubType($dataNode) && $attrName ne "self" && (IsWrapperType($returnType) && ($attribute->type =~ /^readonly/ || $attribute->signature->extendedAttributes->{"Replaceable"})
-            && $returnType ne "EventTarget" && $returnType ne "SerializedScriptValue" && $returnType ne "DOMWindow" 
-            && $returnType !~ /SVG/ && $returnType !~ /HTML/ && !IsDOMNodeType($returnType))) {
-            AddIncludesForType($returnType);
-            my $domMapFunction = GetDomMapFunction(0, $returnType);
-            # Check for a wrapper in the wrapper cache. If there is one, we know that a hidden reference has already
-            # been created. If we don't find a wrapper, we create both a wrapper and a hidden reference.
-            push(@implContentDecls, "    RefPtr<$returnType> result = ${getterString};\n");
-            push(@implContentDecls, "    v8::Handle<v8::Value> wrapper = result.get() ? ${domMapFunction}.get(result.get()) : v8::Handle<v8::Value>();\n");
-            push(@implContentDecls, "    if (wrapper.IsEmpty()) {\n");
-            push(@implContentDecls, "        wrapper = toV8(result.get());\n");
-            push(@implContentDecls, "        if (!wrapper.IsEmpty())\n");
-            if ($dataNode->name eq "DOMWindow") {
-                push(@implContentDecls, "            V8DOMWrapper::setHiddenWindowReference(imp->frame(), wrapper);\n");
-            } else {
-                push(@implContentDecls, "            V8DOMWrapper::setHiddenReference(info.Holder(), wrapper);\n");
-            }
-            push(@implContentDecls, "    }\n");
-            push(@implContentDecls, "    return wrapper;\n");
-            push(@implContentDecls, "}\n\n");
-            push(@implContentDecls, "#endif // ${conditionalString}\n\n") if $conditionalString;
-            return;
+    # Special case for readonly or Replaceable attributes (with a few exceptions). This attempts to ensure that JS wrappers don't get
+    # garbage-collected prematurely when their lifetime is strongly tied to their owner. We accomplish this by inserting a reference to
+    # the newly created wrapper into an internal field of the holder object.
+    if (!IsNodeSubType($dataNode) && $attrName ne "self" && (IsWrapperType($returnType) && ($attribute->type =~ /^readonly/ || $attribute->signature->extendedAttributes->{"Replaceable"})
+        && $returnType ne "EventTarget" && $returnType ne "SerializedScriptValue" && $returnType ne "DOMWindow" 
+        && $returnType !~ /SVG/ && $returnType !~ /HTML/ && !IsDOMNodeType($returnType))) {
+        AddIncludesForType($returnType);
+        my $domMapFunction = GetDomMapFunction(0, $returnType);
+        # Check for a wrapper in the wrapper cache. If there is one, we know that a hidden reference has already
+        # been created. If we don't find a wrapper, we create both a wrapper and a hidden reference.
+        push(@implContentDecls, "    RefPtr<$returnType> result = ${getterString};\n");
+        push(@implContentDecls, "    v8::Handle<v8::Value> wrapper = result.get() ? ${domMapFunction}.get(result.get()) : v8::Handle<v8::Value>();\n");
+        push(@implContentDecls, "    if (wrapper.IsEmpty()) {\n");
+        push(@implContentDecls, "        wrapper = toV8(result.get());\n");
+        push(@implContentDecls, "        if (!wrapper.IsEmpty())\n");
+        if ($dataNode->name eq "DOMWindow") {
+            push(@implContentDecls, "            V8DOMWrapper::setHiddenWindowReference(imp->frame(), wrapper);\n");
+        } else {
+            push(@implContentDecls, "            V8DOMWrapper::setHiddenReference(info.Holder(), wrapper);\n");
         }
+        push(@implContentDecls, "    }\n");
+        push(@implContentDecls, "    return wrapper;\n");
+        push(@implContentDecls, "}\n\n");
+        push(@implContentDecls, "#endif // ${conditionalString}\n\n") if $conditionalString;
+        return;
     }
 
     if (IsSVGTypeNeedingContextParameter($attrType) && !$skipContext) {
-        if ($attrIsPodType) {
-            push(@implContentDecls, GenerateSVGContextAssignment($implClassName, "wrapper.get()", "    "));
-        } else {
-            push(@implContentDecls, GenerateSVGContextRetrieval($implClassName, "    "));
-            # The templating associated with passing withSVGContext()'s return value directly into toV8 can get compilers confused,
-            # so just manually set the return value to a PassRefPtr of the expected type.
-            push(@implContentDecls, "    PassRefPtr<$attrType> resultAsPassRefPtr = V8Proxy::withSVGContext($result, context);\n");
-            $result = "resultAsPassRefPtr";
-        }
+        push(@implContentDecls, GenerateSVGContextRetrieval($implClassName, "    "));
+        # The templating associated with passing withSVGContext()'s return value directly into toV8 can get compilers confused,
+        # so just manually set the return value to a PassRefPtr of the expected type.
+        push(@implContentDecls, "    PassRefPtr<$attrType> resultAsPassRefPtr = V8Proxy::withSVGContext($result, context);\n");
+        $result = "resultAsPassRefPtr";
     }
 
-    if ($codeGenerator->IsSVGNewStyleAnimatedType($implClassName) and $codeGenerator->IsSVGTypeNeedingTearOff($attrType)) {
+    if ($codeGenerator->IsSVGAnimatedType($implClassName) and $codeGenerator->IsSVGTypeNeedingTearOff($attrType)) {
         $implIncludes{"V8$attrType.h"} = 1;
         my $svgNativeType = $codeGenerator->GetSVGTypeNeedingTearOff($attrType);
         # Convert from abstract SVGProperty to real type, so the right toJS() method can be invoked.
@@ -932,14 +852,30 @@ END
         $implIncludes{"SVGPropertyTearOff.h"} = 1;
         my $tearOffType = $codeGenerator->GetSVGTypeNeedingTearOff($attrType);
         if ($codeGenerator->IsSVGTypeWithWritablePropertiesNeedingTearOff($attrType) and not defined $attribute->signature->extendedAttributes->{"Immutable"}) {
-            $tearOffType =~ s/SVGPropertyTearOff</SVGStaticPropertyTearOff<$implClassName, /;
-            $implIncludes{"SVGStaticPropertyTearOff.h"} = 1;
-
             my $getter = $result;
             $getter =~ s/imp->//;
             $getter =~ s/\(\)//;
-            my $updater = "update" . $codeGenerator->WK_ucfirst($getter);
-            push(@implContentDecls, "    return toV8(WTF::getPtr(${tearOffType}::create(imp, $result, &${implClassName}::$updater)));\n");
+
+            my $updateMethod = "&${implClassName}::update" . $codeGenerator->WK_ucfirst($getter);
+
+            my $selfIsTearOffType = $codeGenerator->IsSVGTypeNeedingTearOff($implClassName);
+            if ($selfIsTearOffType) {
+                $implIncludes{"SVGStaticPropertyWithParentTearOff.h"} = 1;
+                $tearOffType =~ s/SVGPropertyTearOff</SVGStaticPropertyWithParentTearOff<$implClassName, /;
+
+                if ($result =~ /matrix/ and $implClassName eq "SVGTransform") {
+                    # SVGTransform offers a matrix() method for internal usage that returns an AffineTransform
+                    # and a svgMatrix() method returning a SVGMatrix, used for the bindings.
+                    $result =~ s/matrix/svgMatrix/;
+                }
+
+                push(@implContentDecls, "    return toV8(WTF::getPtr(${tearOffType}::create(wrapper, $result, $updateMethod)));\n");
+            } else {
+                $implIncludes{"SVGStaticPropertyTearOff.h"} = 1;
+                $tearOffType =~ s/SVGPropertyTearOff</SVGStaticPropertyTearOff<$implClassName, /;
+
+                push(@implContentDecls, "    return toV8(WTF::getPtr(${tearOffType}::create(imp, $result, $updateMethod)));\n");
+            }
         } elsif ($tearOffType =~ /SVGStaticListPropertyTearOff/) {
             my $extraImp = "GetOwnerElementForType<$implClassName, IsDerivedFromSVGElement<$implClassName>::value>::ownerElement(imp), ";
             push(@implContentDecls, "    return toV8(WTF::getPtr(${tearOffType}::create($extraImp$result)));\n");
@@ -948,9 +884,6 @@ END
         } else {
             push(@implContentDecls, "    return toV8(WTF::getPtr(${tearOffType}::create($result)));\n");
         }
-    } elsif ($attrIsPodType) {
-        $implIncludes{"V8${attrType}.h"} = 1;
-        push(@implContentDecls, "    return toV8(wrapper.release().get());\n");
     } else {
         push(@implContentDecls, "    " . ReturnNativeToJSValue($attribute->signature, $result, "    ").";\n");
     }
@@ -1003,16 +936,8 @@ sub GenerateNormalAttrSetter
         }
     }
 
-    my $isPodType = IsPodType($implClassName);
     my $svgNativeType = $codeGenerator->GetSVGTypeNeedingTearOff($implClassName);
-
-    if ($isPodType) {
-        $implClassName = GetNativeType($implClassName);
-        $implIncludes{"V8SVGPODTypeWrapper.h"} = 1;
-        push(@implContentDecls, "    V8SVGPODTypeWrapper<$implClassName>* wrapper = V8SVGPODTypeWrapper<$implClassName>::toNative(info.Holder());\n");
-        push(@implContentDecls, "    $implClassName impInstance = *wrapper;\n");
-        push(@implContentDecls, "    $implClassName* imp = &impInstance;\n");
-    } elsif ($svgNativeType) {
+    if ($svgNativeType) {
         my $svgWrappedNativeType = $codeGenerator->GetSVGWrappedTypeNeedingTearOff($implClassName);
         if ($svgWrappedNativeType =~ /List$/) {
             push(@implContentDecls, <<END);
@@ -1082,7 +1007,7 @@ END
         $result = "WTF::getPtr(" . $result . ")";
     }
 
-    my $useExceptions = 1 if @{$attribute->setterExceptions} and !($isPodType);
+    my $useExceptions = 1 if @{$attribute->setterExceptions};
 
     if ($useExceptions) {
         $implIncludes{"ExceptionCode.h"} = 1;
@@ -1116,9 +1041,7 @@ END
         push(@implContentDecls, "        V8Proxy::setDOMException(ec);\n");
     }
 
-    if ($isPodType) {
-        push(@implContentDecls, "    wrapper->commitChange(*imp, V8Proxy::svgContext(wrapper));\n");
-    } elsif ($svgNativeType) {
+    if ($svgNativeType) {
         if ($useExceptions) {
             push(@implContentDecls, "    if (!ec)\n");
             push(@implContentDecls, "        wrapper->commitChange();\n");
@@ -1127,16 +1050,10 @@ END
         }
     } elsif (IsSVGTypeNeedingContextParameter($implClassName)) {
         $implIncludes{"SVGElement.h"} = 1;
-
-        my $currentObject = "imp";
-        if ($isPodType) {
-            $currentObject = "wrapper";
-        }
-
-        push(@implContentDecls, "    if (SVGElement* context = V8Proxy::svgContext($currentObject))\n");
+        push(@implContentDecls, "    if (SVGElement* context = V8Proxy::svgContext(imp))\n");
         push(@implContentDecls, "        context->svgAttributeChanged(imp->associatedAttributeName());\n");
     }
-    
+
     push(@implContentDecls, "    return;\n");
     push(@implContentDecls, "}\n\n");  # end of setter
     push(@implContentDecls, "#endif // ${conditionalString}\n\n") if $conditionalString;
@@ -1327,18 +1244,13 @@ END
 
     my ($svgPropertyType, $svgListPropertyType, $svgNativeType) = GetSVGPropertyTypes($implClassName);
 
-    if (IsPodType($implClassName)) {
-        my $nativeClassName = GetNativeType($implClassName);
-        push(@implContentDecls, "    V8SVGPODTypeWrapper<$nativeClassName>* impWrapper = V8SVGPODTypeWrapper<$nativeClassName>::toNative(args.Holder());\n");
-        push(@implContentDecls, "    $nativeClassName impInstance = *impWrapper;\n");
-        push(@implContentDecls, "    $nativeClassName* imp = &impInstance;\n");
-    } elsif ($svgNativeType) {
+    if ($svgNativeType) {
         my $nativeClassName = GetNativeType($implClassName); 
         if ($implClassName =~ /List$/) {
-            push(@implContentDecls, "    $nativeClassName imp = V8${svgListPropertyType}::toNative(args.Holder());\n");
+            push(@implContentDecls, "    $nativeClassName imp = V8${implClassName}::toNative(args.Holder());\n");
         } else {
             my $svgWrappedNativeType = $codeGenerator->GetSVGWrappedTypeNeedingTearOff($implClassName);
-            push(@implContentDecls, "    $nativeClassName wrapper = V8${svgPropertyType}::toNative(args.Holder());\n");
+            push(@implContentDecls, "    $nativeClassName wrapper = V8${implClassName}::toNative(args.Holder());\n");
             push(@implContentDecls, "    $svgWrappedNativeType& impInstance = wrapper->propertyReference();\n");
             push(@implContentDecls, "    $svgWrappedNativeType* imp = &impInstance;\n");
         }
@@ -1412,10 +1324,6 @@ END
             push(@implContentDecls, "    }\n");
         }
 
-        if (BasicTypeCanFailConversion($parameter)) {
-            push(@implContentDecls, "    bool ${parameterName}Ok;\n");
-        }
-
         $implIncludes{"ExceptionCode.h"} = 1;
         my $nativeType = GetNativeTypeFromSignature($parameter, $paramIndex);
         if ($parameter->extendedAttributes->{"Callback"}) {
@@ -1441,13 +1349,13 @@ END
             push(@implContentDecls, "        return v8::Undefined();\n");
         } elsif (TypeCanFailConversion($parameter)) {
             push(@implContentDecls, "    $nativeType $parameterName = " .
-                 JSValueToNative($parameter, "args[$paramIndex]", BasicTypeCanFailConversion($parameter) ?  "${parameterName}Ok" : undef) . ";\n");
-            push(@implContentDecls, "    if (UNLIKELY(!$parameterName" . (BasicTypeCanFailConversion($parameter) ? "Ok" : "") . ")) {\n");
+                 JSValueToNative($parameter, "args[$paramIndex]") . ";\n");
+            push(@implContentDecls, "    if (UNLIKELY(!$parameterName)) {\n");
             push(@implContentDecls, "        ec = TYPE_MISMATCH_ERR;\n");
             push(@implContentDecls, "        goto fail;\n");
             push(@implContentDecls, "    }\n");
         } elsif ($nativeType =~ /^V8Parameter/) {
-            my $value = JSValueToNative($parameter, "args[$paramIndex]", BasicTypeCanFailConversion($parameter) ?  "${parameterName}Ok" : undef);
+            my $value = JSValueToNative($parameter, "args[$paramIndex]");
             push(@implContentDecls, "    " . ConvertToV8Parameter($parameter, $nativeType, $parameterName, $value) . "\n");
         } else {
             $implIncludes{"V8BindingMacros.h"} = 1;
@@ -1474,7 +1382,7 @@ END
                 }
             }
             push(@implContentDecls, "    EXCEPTION_BLOCK($nativeType, $parameterName, " .
-                 JSValueToNative($parameter, "args[$paramIndex]", BasicTypeCanFailConversion($parameter) ?  "${parameterName}Ok" : undef) . ");\n");
+                 JSValueToNative($parameter, "args[$paramIndex]") . ");\n");
         }
 
         if ($parameter->extendedAttributes->{"IsIndex"}) {
@@ -1814,7 +1722,6 @@ sub GenerateImplementation
     my $visibleInterfaceName = GetVisibleInterfaceName($interfaceName);
     my $className = "V8$interfaceName";
     my $implClassName = $interfaceName;
-
     my $hasLegacyParent = $dataNode->extendedAttributes->{"LegacyParent"};
 
     # - Add default header template
@@ -1827,10 +1734,6 @@ sub GenerateImplementation
     $implIncludes{"V8DOMWrapper.h"} = 1;
     $implIncludes{"V8IsolatedContext.h"} = 1;
 
-    if ($className =~ /^V8SVGAnimated/) {
-        AddIncludesForSVGAnimatedType($interfaceName);
-    }
-
     AddIncludesForType($interfaceName);
 
     my $toActive = IsActiveDomType($interfaceName) ? "${className}::toActiveDOMObject" : "0";
@@ -2668,7 +2571,7 @@ sub GetDomMapFunction
     return "getDOMSVGElementInstanceMap()" if $type eq "SVGElementInstance";
     return "getDOMNodeMap()" if ($dataNode && IsNodeSubType($dataNode));
     # Only use getDOMSVGObjectWithContextMap() for non-node svg objects
-    return "getDOMSVGObjectWithContextMap()" if $type =~ /SVG/ and $type ne "SVGLength" and $type ne "SVGLengthList" and not $codeGenerator->IsSVGNewStyleAnimatedType($type);
+    return "getDOMSVGObjectWithContextMap()" if $type =~ /SVG/ and not $codeGenerator->IsSVGTypeNeedingTearOff($type) and not $codeGenerator->IsSVGAnimatedType($type);
     return "" if $type eq "DOMImplementation";
     return "getActiveDOMObjectMap()" if IsActiveDomType($type);
     return "getDOMObjectMap()";
@@ -2696,8 +2599,6 @@ sub GetNativeTypeForConversions
     my $dataNode = shift;
     my $type = shift;
 
-    $type = "AffineTransform" if $type eq "SVGMatrix";
-    $type = "V8SVGPODTypeWrapper<$type>" if $dataNode->extendedAttributes->{"PODType"};
     $type = $codeGenerator->GetSVGTypeNeedingTearOff($type) if $codeGenerator->IsSVGTypeNeedingTearOff($type); 
     return $type;
 }
@@ -2710,22 +2611,13 @@ sub GenerateFunctionCallString()
     my $implClassName = shift;
 
     my $name = $function->signature->name;
-    my $isPodType = IsPodType($implClassName);
     my $returnType = GetTypeFromSignature($function->signature);
-    my $returnsPodType = IsPodType($returnType);
     my $nativeReturnType = GetNativeType($returnType, 0);
     my $result = "";
 
     my $isSVGTearOffType = ($codeGenerator->IsSVGTypeNeedingTearOff($returnType) and not $implClassName =~ /List$/);
     $nativeReturnType = $codeGenerator->GetSVGWrappedTypeNeedingTearOff($returnType) if $isSVGTearOffType;
 
-    # Special case: SVG matrix transform methods should not mutate
-    # the matrix but return a copy
-    my $copyFirst = 0;
-    if ($implClassName eq "SVGMatrix" && $function->signature->type eq "SVGMatrix") {
-        $copyFirst = 1;
-    }
-
     if ($function->signature->extendedAttributes->{"v8implname"}) {
         $name = $function->signature->extendedAttributes->{"v8implname"};
     }
@@ -2735,23 +2627,10 @@ sub GenerateFunctionCallString()
     }
 
     my $functionString = "imp->${name}(";
-
-    if ($copyFirst) {
-        $functionString = "result.${name}(";
-    }
-
     if ($function->signature->extendedAttributes->{"ClassMethod"}) {
         $functionString = "${implClassName}::${name}(";
     }
 
-    my $returnsListItemPodType = 0;
-    # SVG lists functions that return POD types require special handling
-    if (IsSVGListTypeNeedingSpecialHandling($implClassName) && IsSVGListMethod($name) && $returnsPodType) {
-        $returnsListItemPodType = 1;
-        $result .= $indent . "SVGList<RefPtr<SVGPODListItem<$nativeReturnType> > >* listImp = imp;\n";
-        $functionString = "listImp->${name}(";
-    }
-
     my $index = 0;
     my $hasScriptState = 0;
 
@@ -2787,12 +2666,6 @@ sub GenerateFunctionCallString()
         my $paramName = $parameter->name;
         my $paramType = $parameter->type;
 
-        # This is a bit of a hack... we need to convert parameters to methods on SVG lists
-        # of POD types which are items in the list to appropriate SVGList<> instances
-        if ($returnsListItemPodType && $paramType . "List" eq $implClassName) {
-            $paramName = "SVGPODListItem<" . GetNativeType($paramType, 1) . ">::copy($paramName)";
-        }
-
         if ($parameter->type eq "NodeFilter" || $parameter->type eq "XPathNSResolver") {
             $functionString .= "$paramName.get()";
         } elsif ($codeGenerator->IsSVGTypeNeedingTearOff($parameter->type) and not $implClassName =~ /List$/) {
@@ -2801,6 +2674,8 @@ sub GenerateFunctionCallString()
             $result .= $indent . "    V8Proxy::setDOMException(WebCore::TYPE_MISMATCH_ERR);\n";
             $result .= $indent . "    return v8::Handle<v8::Value>();\n";
             $result .= $indent . "}\n";
+        } elsif ($parameter->type eq "SVGMatrix" and $implClassName eq "SVGTransformList") {
+            $functionString .= "$paramName.get()";
         } else {
             $functionString .= $paramName;
         }
@@ -2833,16 +2708,16 @@ sub GenerateFunctionCallString()
 
     if ($returnType eq "void") {
         $result .= $indent . "$functionString;\n";
-    } elsif ($copyFirst) {
-        $result .= $indent . GetNativeType($returnType, 0) . " result = *imp;\n" . $indent . "$functionString;\n";
-    } elsif ($returnsListItemPodType) {
-        $result .= $indent . "RefPtr<SVGPODListItem<$nativeReturnType> > result = $functionString;\n";
-    } elsif ($hasScriptState or @{$function->raisesExceptions} or $returnsPodType or $isPodType or IsSVGTypeNeedingContextParameter($returnType)) {
+    } elsif ($hasScriptState or @{$function->raisesExceptions}) {
         $result .= $indent . $nativeReturnType . " result = $functionString;\n";
     } else {
         # Can inline the function call into the return statement to avoid overhead of using a Ref<> temporary
         $return = $functionString;
         $returnIsRef = 0;
+    
+        if ($implClassName eq "SVGTransformList" and IsRefPtrType($returnType)) {
+            $return = "WTF::getPtr(" . $return . ")";
+        }
     }
 
     if (@{$function->raisesExceptions}) {
@@ -2855,17 +2730,6 @@ sub GenerateFunctionCallString()
         $result .= $indent . "    return throwError(state.exception());\n"
     }
 
-    # If the return type is a POD type, separate out the wrapper generation
-    if ($returnsListItemPodType) {
-        $result .= $indent . "RefPtr<V8SVGPODTypeWrapper<" . $nativeReturnType . "> > wrapper = ";
-        $result .= "V8SVGPODTypeWrapperCreatorForList<" . $nativeReturnType . ">::create($return, imp->associatedAttributeName());\n";
-        $return = "wrapper";
-    } elsif ($returnsPodType) {
-        $result .= $indent . "RefPtr<V8SVGPODTypeWrapper<" . $nativeReturnType . "> > wrapper = ";
-        $result .= GenerateSVGStaticPodTypeWrapper($returnType, $return) . ";\n";
-        $return = "wrapper";
-    }
-
     if ($isSVGTearOffType) {
         $implIncludes{"V8$returnType.h"} = 1;
         $implIncludes{"SVGPropertyTearOff.h"} = 1;
@@ -2892,24 +2756,12 @@ sub GenerateFunctionCallString()
     }
 
     # If the implementing class is a POD type, commit changes
-    if ($isPodType) {
-        if (!$generatedSVGContextRetrieval) {
-            $result .= GenerateSVGContextRetrieval($implClassName, $indent);
-            $generatedSVGContextRetrieval = 1;
-        }
-
-        $result .= $indent . "impWrapper->commitChange(impInstance, context);\n";
-    } elsif ($codeGenerator->IsSVGTypeNeedingTearOff($implClassName) and not $implClassName =~ /List$/) {
+    if ($codeGenerator->IsSVGTypeNeedingTearOff($implClassName) and not $implClassName =~ /List$/) {
         $result .= $indent . "wrapper->commitChange();\n";
     }
 
-    if ($returnsPodType) {
-        $implIncludes{"V8${returnType}.h"} = 1;
-        $result .= $indent . "return toV8(wrapper.release());\n";
-    } else {
-        $return .= ".release()" if ($returnIsRef);
-        $result .= $indent . ReturnNativeToJSValue($function->signature, $return, $indent) . ";\n";
-    }
+    $return .= ".release()" if ($returnIsRef);
+    $result .= $indent . ReturnNativeToJSValue($function->signature, $return, $indent) . ";\n";
 
     return $result;
 }
@@ -2997,8 +2849,6 @@ sub GetNativeType
     return "bool" if $type eq "boolean";
     return "String" if $type eq "DOMString";
     return "Range::CompareHow" if $type eq "CompareHow";
-    return "AffineTransform" if $type eq "SVGMatrix";
-    return "SVGTransform" if $type eq "SVGTransform";
     return "SVGPaint::SVGPaintType" if $type eq "SVGPaintType";
     return "DOMTimeStamp" if $type eq "DOMTimeStamp";
     return "unsigned" if $type eq "unsigned int";
@@ -3043,16 +2893,6 @@ sub TranslateParameter
     }
 }
 
-sub BasicTypeCanFailConversion
-{
-    my $signature = shift;
-    my $type = GetTypeFromSignature($signature);
-
-    return 1 if $type eq "SVGMatrix";
-    return 1 if $type eq "SVGTransform";
-    return 0;
-}
-
 sub TypeCanFailConversion
 {
     my $signature = shift;
@@ -3063,15 +2903,13 @@ sub TypeCanFailConversion
     return 1 if $type eq "Attr";
     return 1 if $type eq "VoidCallback";
     return 1 if $type eq "IDBKey";
-    return BasicTypeCanFailConversion($signature);
+    return 0;
 }
 
 sub JSValueToNative
 {
     my $signature = shift;
     my $value = shift;
-    my $okParam = shift;
-    my $maybeOkParam = $okParam ? ", ${okParam}" : "";
 
     my $type = GetTypeFromSignature($signature);
 
@@ -3079,8 +2917,8 @@ sub JSValueToNative
     return "$value->BooleanValue()" if $type eq "boolean";
     return "static_cast<$type>($value->NumberValue())" if $type eq "float" or $type eq "double";
 
-    return "toInt32($value${maybeOkParam})" if $type eq "long";
-    return "toUInt32($value${maybeOkParam})" if $type eq "unsigned long" or $type eq "unsigned short";
+    return "toInt32($value)" if $type eq "long";
+    return "toUInt32($value)" if $type eq "unsigned long" or $type eq "unsigned short";
     return "toInt64($value)" if $type eq "unsigned long long" or $type eq "long long";
     return "static_cast<Range::CompareHow>($value->Int32Value())" if $type eq "CompareHow";
     return "static_cast<SVGPaint::SVGPaintType>($value->ToInt32()->Int32Value())" if $type eq "SVGPaintType";
@@ -3134,15 +2972,6 @@ sub JSValueToNative
     } else {
         $implIncludes{"V8$type.h"} = 1;
 
-        if (IsPodType($type)) {
-            my $nativeType = GetNativeType($type);
-            $implIncludes{"V8SVGPODTypeWrapper.h"} = 1;
-
-            return "V8SVGPODTypeUtil::toSVGPODType<${nativeType}>(&V8${type}::info, $value${maybeOkParam})"
-        }
-
-        $implIncludes{"V8${type}.h"} = 1;
-
         # Perform type checks on the parameter, if it is expected Node type,
         # return NULL.
         return "V8${type}::HasInstance($value) ? V8${type}::toNative(v8::Handle<v8::Object>::Cast($value)) : 0";
@@ -3239,14 +3068,6 @@ my %non_wrapper_types = (
     'DOMString' => 1,
     'CompareHow' => 1,
     'SerializedScriptValue' => 1,
-    'SVGAngle' => 1,
-    'SVGRect' => 1,
-    'SVGPoint' => 1,
-    'SVGPreserveAspectRatio' => 1,
-    'SVGMatrix' => 1,
-    'SVGTransform' => 1,
-    'SVGLength' => 1,
-    'SVGNumber' => 1,
     'SVGPaintType' => 1,
     'DOMTimeStamp' => 1,
     'JSObject' => 1,
@@ -3357,25 +3178,9 @@ sub ReturnNativeToJSValue
     $implIncludes{"wtf/RefPtr.h"} = 1;
     $implIncludes{"wtf/GetPtr.h"} = 1;
 
-    if (IsPodType($type)) {
-        $value = GenerateSVGStaticPodTypeWrapper($type, $value) . ".get()";
-    }
-
     return "return toV8($value)";
 }
 
-# FIXME: This method will go away once all SVG animated properties are converted to the new scheme.
-sub GenerateSVGStaticPodTypeWrapper {
-    my $type = shift;
-    my $value = shift;
-
-    $implIncludes{"V8$type.h"}=1;
-    $implIncludes{"V8SVGPODTypeWrapper.h"} = 1;
-
-    my $nativeType = GetNativeType($type);
-    return "V8SVGStaticPODTypeWrapper<$nativeType>::create($value)";
-}
-
 # Internal helper
 sub WriteData
 {
@@ -3426,7 +3231,7 @@ sub IsSVGTypeNeedingContextParameter
 
     return 0 unless $implClassName =~ /SVG/;
     return 0 if $implClassName =~ /Element/;
-    return 0 if $codeGenerator->IsSVGNewStyleAnimatedType($implClassName);
+    return 0 if $codeGenerator->IsSVGAnimatedType($implClassName);
     return 0 if $codeGenerator->IsSVGTypeNeedingTearOff($implClassName);
 
     my @noContextNeeded = ("SVGColor", "SVGDocument", "SVGPaintType", "SVGPaint", "SVGZoomEvent");
@@ -3455,19 +3260,9 @@ sub GenerateSVGContextRetrieval
     my $srcType = shift;
     my $indent = shift;
 
-    my $srcIsPodType = IsPodType($srcType);
-
-    my $srcObject = "imp";
-    if ($srcIsPodType) {
-        $srcObject = "impWrapper";
-    }
-
-    my $contextDecl;
-
+    my $contextDecl = "imp";
     if (IsSVGTypeNeedingContextParameter($srcType)) {
-        $contextDecl = "V8Proxy::svgContext($srcObject)";
-    } else {
-        $contextDecl = $srcObject;
+        $contextDecl = "V8Proxy::svgContext($contextDecl)";
     }
 
     return $indent . "SVGElement* context = $contextDecl;\n";
@@ -3487,26 +3282,6 @@ sub IsSVGListMutator
     return 0;
 }
 
-sub IsSVGListMethod
-{
-    my $functionName = shift;
-
-    return 1 if $functionName eq "getFirst";
-    return 1 if $functionName eq "getLast";
-    return 1 if $functionName eq "getItem";
-
-    return IsSVGListMutator($functionName);
-}
-
-sub IsSVGListTypeNeedingSpecialHandling
-{
-    my $className = shift;
-
-    return 1 if $className eq "SVGTransformList";
-
-    return 0;
-}
-
 sub GetVisibleInterfaceName
 {
     my $interfaceName = shift;
diff --git a/WebCore/bindings/v8/custom/V8SVGMatrixCustom.cpp b/WebCore/bindings/v8/custom/V8SVGMatrixCustom.cpp
deleted file mode 100644 (file)
index f310238..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- * 
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- * 
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-#include <config.h>
-
-#if ENABLE(SVG)
-#include "AffineTransform.h"
-
-#include "SVGException.h"
-#include "V8Binding.h"
-#include "V8Proxy.h"
-#include "V8SVGMatrix.h"
-#include "V8SVGPODTypeWrapper.h"
-
-namespace WebCore {
-
-v8::Handle<v8::Value> V8SVGMatrix::multiplyCallback(const v8::Arguments& args)
-{
-    INC_STATS("DOM.SVGMatrix.multiply()");
-    if (args.Length() < 1)
-        return throwError("Not enough arguments");
-
-    if (!V8SVGMatrix::HasInstance(args[0]))
-        return throwError("secondMatrix argument was not a SVGMatrix");
-
-    AffineTransform m1 = *V8SVGPODTypeWrapper<AffineTransform>::toNative(args.Holder());
-    AffineTransform m2 = *V8SVGPODTypeWrapper<AffineTransform>::toNative(v8::Handle<v8::Object>::Cast(args[0]));
-
-    RefPtr<V8SVGStaticPODTypeWrapper<AffineTransform> > wrapper = V8SVGStaticPODTypeWrapper<AffineTransform>::create(m1.multLeft(m2));
-    return toV8(wrapper.get());
-}
-
-v8::Handle<v8::Value> V8SVGMatrix::inverseCallback(const v8::Arguments& args)
-{
-    INC_STATS("DOM.SVGMatrix.inverse()");
-    AffineTransform matrix = *V8SVGPODTypeWrapper<AffineTransform>::toNative(args.Holder());
-    ExceptionCode ec = 0;
-    AffineTransform result = matrix.inverse();
-
-    if (!matrix.isInvertible())
-        ec = SVGException::SVG_MATRIX_NOT_INVERTABLE;
-
-    if (ec != 0) {
-        V8Proxy::setDOMException(ec);
-        return v8::Handle<v8::Value>();
-    }
-
-    RefPtr<V8SVGStaticPODTypeWrapper<AffineTransform> > wrapper = V8SVGStaticPODTypeWrapper<AffineTransform>::create(result);
-    return toV8(wrapper.get());
-}
-
-v8::Handle<v8::Value> V8SVGMatrix::rotateFromVectorCallback(const v8::Arguments& args)
-{
-    INC_STATS("DOM.SVGMatrix.rotateFromVector()");
-    AffineTransform matrix = *V8SVGPODTypeWrapper<AffineTransform>::toNative(args.Holder());
-    ExceptionCode ec = 0;
-    float x = toFloat(args[0]);
-    float y = toFloat(args[1]);
-    AffineTransform result = matrix;
-    result.rotateFromVector(x, y);
-    if (x == 0.0 || y == 0.0)
-        ec = SVGException::SVG_INVALID_VALUE_ERR;
-
-    if (ec != 0) {
-        V8Proxy::setDOMException(ec);
-        return v8::Handle<v8::Value>();
-    }
-
-    RefPtr<V8SVGStaticPODTypeWrapper<AffineTransform> > wrapper = V8SVGStaticPODTypeWrapper<AffineTransform>::create(result);
-    return toV8(wrapper.get());
-}
-
-} // namespace WebCore
-
-#endif
index e20a4c7..3e31095 100644 (file)
 #define DeprecatedSVGAnimatedPropertyTraits_h
 
 #if ENABLE(SVG)
-#include "PlatformString.h"
-#include "SVGTransformList.h"
 
+// FIXME: Remove this file!
 namespace WebCore {
 
 template<typename Type>
 struct DeprecatedSVGAnimatedPropertyTraits : public Noncopyable { };
 
-// SVGAnimatedTransformList
-template<>
-struct DeprecatedSVGAnimatedPropertyTraits<SVGTransformList*> : public Noncopyable {
-    typedef SVGTransformList* PassType;
-    typedef SVGTransformList* ReturnType;
-    typedef RefPtr<SVGTransformList> StoredType;
-
-    static ReturnType null() { return 0; }
-    static ReturnType toReturnType(const StoredType& type) { return type.get(); }
-    static String toString(PassType type) { return type ? type->valueAsString() : String(); }
-};
-
 }
 
 #endif
index 9258692..7021d12 100644 (file)
 #include <wtf/Forward.h>
 #include <wtf/HashMap.h>
 
+// FIXME: Remove this file!
 namespace WebCore {
    
     class SVGElement;
-    class SVGTransformList;
 
     struct DeprecatedSVGAnimatedTypeWrapperKey {            
         // Empty value
@@ -151,9 +151,6 @@ namespace WebCore {
         return wrapper.release();
     }
 
-    // Common type definitions, to ease IDL generation.
-    typedef DeprecatedSVGAnimatedTemplate<SVGTransformList*> SVGAnimatedTransformList;
-
 }
 
 #endif
index 7471ea7..f5d5aa8 100644 (file)
@@ -86,15 +86,16 @@ void SVGAnimateTransformElement::parseMappedAttribute(Attribute* attr)
 }
 
     
-static PassRefPtr<SVGTransformList> transformListFor(SVGElement* element)
+static SVGTransformList* transformListFor(SVGElement* element)
 {
     ASSERT(element);
     if (element->isStyledTransformable())
-        return static_cast<SVGStyledTransformableElement*>(element)->transform();
+        return &static_cast<SVGStyledTransformableElement*>(element)->transform();
     if (element->hasTagName(SVGNames::textTag))
-        return static_cast<SVGTextElement*>(element)->transform();
+        return &static_cast<SVGTextElement*>(element)->transform();
     if (element->hasTagName(SVGNames::linearGradientTag) || element->hasTagName(SVGNames::radialGradientTag))
-        return static_cast<SVGGradientElement*>(element)->gradientTransform();
+        return &static_cast<SVGGradientElement*>(element)->gradientTransform();
+    // FIXME: Handle patternTransform, which is obviously missing!
     return 0;
 }
     
@@ -109,9 +110,8 @@ void SVGAnimateTransformElement::resetToBaseValue(const String& baseValue)
     }
 
     if (baseValue.isEmpty()) {
-        ExceptionCode ec;
-        RefPtr<SVGTransformList> list = transformListFor(targetElement());
-        list->clear(ec);
+        if (SVGTransformList* list = transformListFor(targetElement()))
+            list->clear();
     } else
         targetElement()->setAttribute(SVGNames::transformAttr, baseValue);
 }
@@ -121,18 +121,17 @@ void SVGAnimateTransformElement::calculateAnimatedValue(float percentage, unsign
     if (!hasValidTarget())
         return;
     SVGElement* targetElement = resultElement->targetElement();
-    RefPtr<SVGTransformList> transformList = transformListFor(targetElement);
+    SVGTransformList* transformList = transformListFor(targetElement);
     ASSERT(transformList);
 
-    ExceptionCode ec;
     if (!isAdditive())
-        transformList->clear(ec);
+        transformList->clear();
     if (isAccumulated() && repeat) {
         SVGTransform accumulatedTransform = SVGTransformDistance(m_fromTransform, m_toTransform).scaledDistance(repeat).addToSVGTransform(SVGTransform());
-        transformList->appendItem(accumulatedTransform, ec);
+        transformList->append(accumulatedTransform);
     }
     SVGTransform transform = SVGTransformDistance(m_fromTransform, m_toTransform).scaledDistance(percentage).addToSVGTransform(m_fromTransform);
-    transformList->appendItem(transform, ec);
+    transformList->append(transform);
 }
     
 bool SVGAnimateTransformElement::calculateFromAndToValues(const String& fromString, const String& toString)
@@ -181,18 +180,22 @@ void SVGAnimateTransformElement::applyResultsToTarget()
     }
 
     // ...except in case where we have additional instances in <use> trees.
+    SVGTransformList* transformList = transformListFor(targetElement);
+    if (!transformList)
+        return;
+
     const HashSet<SVGElementInstance*>& instances = targetElement->instancesForElement();
-    RefPtr<SVGTransformList> transformList = transformListFor(targetElement);
     const HashSet<SVGElementInstance*>::const_iterator end = instances.end();
     for (HashSet<SVGElementInstance*>::const_iterator it = instances.begin(); it != end; ++it) {
         SVGElement* shadowTreeElement = (*it)->shadowTreeElement();
         ASSERT(shadowTreeElement);
         if (shadowTreeElement->isStyledTransformable())
-            static_cast<SVGStyledTransformableElement*>(shadowTreeElement)->setTransformBaseValue(transformList.get());
+            static_cast<SVGStyledTransformableElement*>(shadowTreeElement)->setTransformBaseValue(*transformList);
         else if (shadowTreeElement->hasTagName(SVGNames::textTag))
-            static_cast<SVGTextElement*>(shadowTreeElement)->setTransformBaseValue(transformList.get());
+            static_cast<SVGTextElement*>(shadowTreeElement)->setTransformBaseValue(*transformList);
         else if (shadowTreeElement->hasTagName(SVGNames::linearGradientTag) || shadowTreeElement->hasTagName(SVGNames::radialGradientTag))
-            static_cast<SVGGradientElement*>(shadowTreeElement)->setGradientTransformBaseValue(transformList.get());
+            static_cast<SVGGradientElement*>(shadowTreeElement)->setGradientTransformBaseValue(*transformList);
+        // FIXME: Handle patternTransform, obviously missing!
         if (RenderObject* renderer = shadowTreeElement->renderer()) {
             renderer->setNeedsTransformUpdate();
             RenderSVGResource::markForLayoutAndParentResourceInvalidation(renderer);
diff --git a/WebCore/svg/SVGAnimatedTransformList.h b/WebCore/svg/SVGAnimatedTransformList.h
new file mode 100644 (file)
index 0000000..dcf87dd
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) Research In Motion Limited 2010. 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 SVGAnimatedTransformList_h
+#define SVGAnimatedTransformList_h
+
+#if ENABLE(SVG)
+#include "SVGAnimatedTransformListPropertyTearOff.h"
+
+namespace WebCore {
+
+typedef SVGAnimatedTransformListPropertyTearOff SVGAnimatedTransformList;
+
+} // namespace WebCore
+
+#endif // ENABLE(SVG)
+#endif
index ca61088..337944b 100644 (file)
@@ -41,7 +41,6 @@ namespace WebCore {
 SVGGradientElement::SVGGradientElement(const QualifiedName& tagName, Document* document)
     : SVGStyledElement(tagName, document)
     , m_gradientUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
-    , m_gradientTransform(SVGTransformList::create(SVGNames::gradientTransformAttr))
 {
 }
 
@@ -53,11 +52,12 @@ void SVGGradientElement::parseMappedAttribute(Attribute* attr)
         else if (attr->value() == "objectBoundingBox")
             setGradientUnitsBaseValue(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
     } else if (attr->name() == SVGNames::gradientTransformAttr) {
-        SVGTransformList* gradientTransforms = gradientTransformBaseValue();
-        if (!SVGTransformable::parseTransformAttribute(gradientTransforms, attr->value())) {
-            ExceptionCode ec = 0;
-            gradientTransforms->clear(ec);
-        }
+        SVGTransformList newList;
+        if (!SVGTransformable::parseTransformAttribute(newList, attr->value()))
+            newList.clear();
+
+        detachAnimatedGradientTransformListWrappers(newList.size());
+        gradientTransformBaseValue() = newList;
     } else if (attr->name() == SVGNames::spreadMethodAttr) {
         if (attr->value() == "reflect")
             setSpreadMethodBaseValue(SpreadMethodReflect);
index 6e23608..1b28e22 100644 (file)
@@ -24,6 +24,7 @@
 #if ENABLE(SVG)
 #include "Gradient.h"
 #include "SVGAnimatedPropertyMacros.h"
+#include "SVGAnimatedTransformList.h"
 #include "SVGExternalResourcesRequired.h"
 #include "SVGStyledElement.h"
 #include "SVGTransformList.h"
@@ -51,7 +52,7 @@ namespace WebCore {
 
         DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGGradientElement, SVGNames::spreadMethodAttr, int, SpreadMethod, spreadMethod)
         DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGGradientElement, SVGNames::gradientUnitsAttr, int, GradientUnits, gradientUnits)
-        DECLARE_ANIMATED_PROPERTY(SVGGradientElement, SVGNames::gradientTransformAttr, SVGTransformList*, GradientTransform, gradientTransform)
+        DECLARE_ANIMATED_TRANSFORM_LIST_PROPERTY_NEW(SVGGradientElement, SVGNames::gradientTransformAttr, SVGTransformList, GradientTransform, gradientTransform)
 
         // SVGURIReference
         DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGGradientElement, XLinkNames::hrefAttr, String, Href, href)
index 840a31e..fa3e40c 100644 (file)
@@ -127,8 +127,11 @@ void SVGLinearGradientElement::collectGradientAttributes(LinearGradientAttribute
         if (!attributes.hasBoundingBoxMode() && current->hasAttribute(SVGNames::gradientUnitsAttr))
             attributes.setBoundingBoxMode(current->gradientUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
 
-        if (!attributes.hasGradientTransform() && current->hasAttribute(SVGNames::gradientTransformAttr))
-            attributes.setGradientTransform(current->gradientTransform()->consolidate().matrix());
+        if (!attributes.hasGradientTransform() && current->hasAttribute(SVGNames::gradientTransformAttr)) {
+            AffineTransform transform;
+            current->gradientTransform().concatenate(transform);
+            attributes.setGradientTransform(transform);
+        }
 
         if (!attributes.hasStops()) {
             const Vector<Gradient::ColorStop>& stops(current->buildStops());
diff --git a/WebCore/svg/SVGMatrix.h b/WebCore/svg/SVGMatrix.h
new file mode 100644 (file)
index 0000000..807b703
--- /dev/null
@@ -0,0 +1,131 @@
+/*
+ * Copyright (C) Research In Motion Limited 2010. 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 SVGMatrix_h
+#define SVGMatrix_h
+
+#if ENABLE(SVG)
+#include "AffineTransform.h"
+#include "SVGException.h"
+
+namespace WebCore {
+
+// Only used in the bindings.
+class SVGMatrix : public AffineTransform {
+public:
+    SVGMatrix() { }
+    SVGMatrix(const AffineTransform& other)
+        : AffineTransform(other)
+    {
+    }
+
+    SVGMatrix(double a, double b, double c, double d, double e, double f)
+        : AffineTransform(a, b, c, d, e, f)
+    {
+    }
+
+    SVGMatrix translate(double tx, double ty)
+    {
+        AffineTransform copy = *this;
+        copy.translate(tx, ty);
+        return static_cast<SVGMatrix>(copy);
+    }
+
+    SVGMatrix scale(double s)
+    {
+        AffineTransform copy = *this;
+        copy.scale(s, s);
+        return static_cast<SVGMatrix>(copy);
+    }
+
+    SVGMatrix scaleNonUniform(double sx, double sy)
+    {
+        AffineTransform copy = *this;
+        copy.scale(sx, sy);
+        return static_cast<SVGMatrix>(copy);
+    }
+
+    SVGMatrix rotate(double d)
+    {
+        AffineTransform copy = *this;
+        copy.rotate(d);
+        return static_cast<SVGMatrix>(copy);
+    }
+
+    SVGMatrix flipX()
+    {
+        AffineTransform copy = *this;
+        copy.flipX();
+        return static_cast<SVGMatrix>(copy);
+    }
+
+    SVGMatrix flipY()
+    {
+        AffineTransform copy = *this;
+        copy.flipY();
+        return static_cast<SVGMatrix>(copy);
+    }
+
+    SVGMatrix skewX(double angle)
+    {
+        AffineTransform copy = *this;
+        copy.skewX(angle);
+        return static_cast<SVGMatrix>(copy);
+    }
+
+    SVGMatrix skewY(double angle)
+    {
+        AffineTransform copy = *this;
+        copy.skewY(angle);
+        return static_cast<SVGMatrix>(copy);
+    }
+
+    // SVGMatrix::multiply needs to call SVGMatrix::multLeft.
+    SVGMatrix multiply(const SVGMatrix& other)
+    {
+        AffineTransform copy = *this;
+        copy.multLeft(static_cast<const AffineTransform&>(other));
+        return static_cast<SVGMatrix>(copy);
+    }
+
+    SVGMatrix inverse(ExceptionCode& ec) const
+    {
+        AffineTransform transform = AffineTransform::inverse();
+        if (!isInvertible())
+            ec = SVGException::SVG_MATRIX_NOT_INVERTABLE;
+
+        return transform;
+    }
+
+    SVGMatrix rotateFromVector(double x, double y, ExceptionCode& ec)
+    {
+        if (!x || !y)
+            ec = SVGException::SVG_INVALID_VALUE_ERR;
+
+        AffineTransform copy = *this;
+        copy.rotateFromVector(x, y);
+        return static_cast<SVGMatrix>(copy);
+    }
+
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(SVG)
+#endif
index c6e996d..270a62c 100644 (file)
 
 module svg {
 
-    interface [Conditional=SVG, PODType=AffineTransform] SVGMatrix {
+    interface [Conditional=SVG] SVGMatrix {
         // FIXME: these attributes should all be floats but since we implement
         // AffineTransform with doubles setting these as doubles makes more sense.
-        attribute double a;
-        attribute double b;
-        attribute double c;
-        attribute double d;
-        attribute double e;
-        attribute double f;
+        attribute [StrictTypeChecking] double a;
+        attribute [StrictTypeChecking] double b;
+        attribute [StrictTypeChecking] double c;
+        attribute [StrictTypeChecking] double d;
+        attribute [StrictTypeChecking] double e;
+        attribute [StrictTypeChecking] double f;
 
-        [Custom] SVGMatrix multiply(in SVGMatrix secondMatrix);
-        [Custom] SVGMatrix inverse()
+        [StrictTypeChecking, RequiresAllArguments=Raise] SVGMatrix multiply(in SVGMatrix secondMatrix);
+        SVGMatrix inverse()
             raises(SVGException);
-        [Immutable] SVGMatrix translate(in float x, in float y);
-        [Immutable] SVGMatrix scale(in float scaleFactor);
-        [Immutable] SVGMatrix scaleNonUniform(in float scaleFactorX, in float scaleFactorY);
-        [Immutable] SVGMatrix rotate(in float angle);
-        [Custom] SVGMatrix rotateFromVector(in float x, in float y)
+        [Immutable, StrictTypeChecking, RequiresAllArguments=Raise] SVGMatrix translate(in float x, in float y);
+        [Immutable, StrictTypeChecking, RequiresAllArguments=Raise] SVGMatrix scale(in float scaleFactor);
+        [Immutable, StrictTypeChecking, RequiresAllArguments=Raise] SVGMatrix scaleNonUniform(in float scaleFactorX, in float scaleFactorY);
+        [Immutable, StrictTypeChecking, RequiresAllArguments=Raise] SVGMatrix rotate(in float angle);
+        [StrictTypeChecking, RequiresAllArguments=Raise] SVGMatrix rotateFromVector(in float x, in float y)
             raises(SVGException);
         [Immutable] SVGMatrix flipX();
         [Immutable] SVGMatrix flipY();
-        [Immutable] SVGMatrix skewX(in float angle);
-        [Immutable] SVGMatrix skewY(in float angle);
+        [Immutable, StrictTypeChecking, RequiresAllArguments=Raise] SVGMatrix skewX(in float angle);
+        [Immutable, StrictTypeChecking, RequiresAllArguments=Raise] SVGMatrix skewY(in float angle);
     };
 
 }