Changeset 71802 in webkit


Ignore:
Timestamp:
Nov 11, 2010 3:20:11 AM (13 years ago)
Author:
Nikolas Zimmermann
Message:

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-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.
Location:
trunk
Files:
50 added
2 deleted
52 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r71799 r71802  
     12010-11-10  Nikolas Zimmermann  <nzimmermann@rim.com>
     2
     3        Reviewed by Dirk Schulze.
     4
     5        Convert SVGMatrix/SVGTransform/SVGTransformList to the new SVGPropertyTearOff concept
     6        https://bugs.webkit.org/show_bug.cgi?id=49311
     7
     8        Add tests covering StrictTypeChecking and RequiresAllArguments=Raise for SVGMatrix/SVGPoint.
     9        Imported several new tests from SVG 1.1 2nd Edition, regarding SVG DOM primitives.
     10
     11        * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.checksum: Added.
     12        * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.png: Added.
     13        * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-01-f-expected.txt: Added.
     14        * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.checksum: Added.
     15        * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.png: Added.
     16        * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-02-f-expected.txt: Added.
     17        * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.checksum: Added.
     18        * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.png: Added.
     19        * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-03-f-expected.txt: Added.
     20        * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.checksum: Added.
     21        * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.png: Added.
     22        * platform/mac/svg/W3C-SVG-1.1-SE/coords-dom-04-f-expected.txt: Added.
     23        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.checksum: Added.
     24        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.png: Added.
     25        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-01-b-expected.txt: Added.
     26        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.checksum: Added.
     27        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.png: Added.
     28        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-02-f-expected.txt: Added.
     29        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.checksum: Added.
     30        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.png: Added.
     31        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-03-b-expected.txt: Added.
     32        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.checksum: Added.
     33        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.png: Added.
     34        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-04-b-expected.txt: Added.
     35        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.checksum: Added.
     36        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.png: Added.
     37        * platform/mac/svg/W3C-SVG-1.1-SE/types-dom-05-b-expected.txt: Added.
     38        * svg/W3C-SVG-1.1-SE/coords-dom-01-f.svg: Added.
     39        * svg/W3C-SVG-1.1-SE/coords-dom-02-f.svg: Added.
     40        * svg/W3C-SVG-1.1-SE/coords-dom-03-f.svg: Added.
     41        * svg/W3C-SVG-1.1-SE/coords-dom-04-f.svg: Added.
     42        * svg/W3C-SVG-1.1-SE/types-dom-01-b.svg: Added.
     43        * svg/W3C-SVG-1.1-SE/types-dom-02-f.svg: Added.
     44        * svg/W3C-SVG-1.1-SE/types-dom-03-b.svg: Added.
     45        * svg/W3C-SVG-1.1-SE/types-dom-04-b.svg: Added.
     46        * svg/W3C-SVG-1.1-SE/types-dom-05-b.svg: Added.
     47        * svg/dom/SVGMatrix-expected.txt: Added.
     48        * svg/dom/SVGMatrix.html: Added.
     49        * svg/dom/SVGPoint-expected.txt:
     50        * svg/dom/SVGTransform-expected.txt: Added.
     51        * svg/dom/SVGTransform.html: Added.
     52        * svg/dom/SVGTransformList-expected.txt: Added.
     53        * svg/dom/SVGTransformList.html: Added.
     54        * svg/dom/script-tests/SVGMatrix.js: Added.
     55        * svg/dom/script-tests/SVGPoint.js:
     56        * svg/dom/script-tests/SVGTransform.js: Added.
     57        * svg/dom/script-tests/SVGTransformList.js: Added.
     58
    1592010-11-11  Kent Tamura  <tkent@chromium.org>
    260
  • trunk/LayoutTests/svg/animations/animate-gradient-transform-expected.txt

    r59928 r71802  
    77
    88PASS gradient.gradientTransform.baseVal.consolidate().matrix.e is 0
    9 PASS gradient.gradientTransform.animVal.consolidate().matrix.e is 0
     9PASS gradient.gradientTransform.animVal.consolidate().matrix.e threw exception Error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7.
    1010PASS gradient.gradientTransform.baseVal.consolidate().matrix.e is 100
    11 PASS gradient.gradientTransform.animVal.consolidate().matrix.e is 100
     11PASS gradient.gradientTransform.animVal.consolidate().matrix.e threw exception Error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7.
    1212PASS gradient.gradientTransform.baseVal.consolidate().matrix.e is 200
    13 PASS gradient.gradientTransform.animVal.consolidate().matrix.e is 200
     13PASS gradient.gradientTransform.animVal.consolidate().matrix.e threw exception Error: NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7.
    1414PASS successfullyParsed is true
    1515
  • trunk/LayoutTests/svg/animations/script-tests/animate-gradient-transform.js

    r59928 r71802  
    4747    // Check initial conditions
    4848    shouldBe("gradient.gradientTransform.baseVal.consolidate().matrix.e", "0");
    49     shouldBe("gradient.gradientTransform.animVal.consolidate().matrix.e", "0");
     49    shouldThrow("gradient.gradientTransform.animVal.consolidate().matrix.e");
    5050}
    5151
     
    5454    // Check half-time conditions
    5555    shouldBe("gradient.gradientTransform.baseVal.consolidate().matrix.e", "100");
    56     shouldBe("gradient.gradientTransform.animVal.consolidate().matrix.e", "100");
     56    shouldThrow("gradient.gradientTransform.animVal.consolidate().matrix.e");
    5757}
    5858
     
    6161    // Check end conditions
    6262    shouldBe("gradient.gradientTransform.baseVal.consolidate().matrix.e", "200");
    63     shouldBe("gradient.gradientTransform.animVal.consolidate().matrix.e", "200");
     63    shouldThrow("gradient.gradientTransform.animVal.consolidate().matrix.e");
    6464}
    6565
  • trunk/LayoutTests/svg/dom/SVGPoint-expected.txt

    r71512 r71802  
    2020PASS point.x is 100
    2121PASS point.y is 0
     22
     23Reset to -50, 100
     24
     25Check '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
     26PASS (newPoint = point.matrixTransform(ctm)).toString() is "[object SVGPoint]"
     27PASS newPoint.x is 60
     28PASS newPoint.y is 210
     29
     30Check invalid arguments for 'matrixTransform'
     31PASS point.matrixTransform() threw exception SyntaxError: Not enough arguments.
     32PASS point.matrixTransform(-1) threw exception TypeError: Type error.
     33PASS point.matrixTransform(5) threw exception TypeError: Type error.
     34PASS point.matrixTransform('aString') threw exception TypeError: Type error.
     35PASS point.matrixTransform(point) threw exception TypeError: Type error.
     36PASS point.matrixTransform(svgElement) threw exception TypeError: Type error.
    2237PASS successfullyParsed is true
    2338
  • trunk/LayoutTests/svg/dom/script-tests/SVGPoint.js

    r71512 r71802  
    2424shouldBe("point.y", "0");
    2525
     26debug("");
     27debug("Reset to -50, 100");
     28point.x = -50;
     29point.y = 100;
     30
     31debug("");
     32debug("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");
     33var ctm = svgElement.createSVGMatrix();
     34ctm.a = -1;
     35ctm.d = 2;
     36ctm.e = 10;
     37ctm.f = 10;
     38shouldBeEqualToString("(newPoint = point.matrixTransform(ctm)).toString()", "[object SVGPoint]");
     39shouldBe("newPoint.x", "60");
     40shouldBe("newPoint.y", "210");
     41
     42debug("");
     43debug("Check invalid arguments for 'matrixTransform'");
     44shouldThrow("point.matrixTransform()");
     45shouldThrow("point.matrixTransform(-1)");
     46shouldThrow("point.matrixTransform(5)");
     47shouldThrow("point.matrixTransform('aString')");
     48shouldThrow("point.matrixTransform(point)");
     49shouldThrow("point.matrixTransform(svgElement)");
     50
    2651successfullyParsed = true;
  • trunk/WebCore/Android.jscbindings.mk

    r71515 r71802  
    147147        bindings/js/JSSVGElementInstanceCustom.cpp \
    148148        bindings/js/JSSVGLengthCustom.cpp \
    149         bindings/js/JSSVGMatrixCustom.cpp \
    150149        bindings/js/JSSVGPathSegCustom.cpp \
    151150        bindings/js/JSSVGPathSegListCustom.cpp \
  • trunk/WebCore/Android.v8bindings.mk

    r71515 r71802  
    156156        bindings/v8/custom/V8SVGElementCustom.cpp \
    157157        bindings/v8/custom/V8SVGLengthCustom.cpp \
    158         bindings/v8/custom/V8SVGMatrixCustom.cpp
    159158        bindings/v8/custom/V8SVGPathSegCustom.cpp \
    160159endif
  • trunk/WebCore/CMakeLists.txt

    r71711 r71802  
    17161716        bindings/js/JSSVGElementInstanceCustom.cpp
    17171717        bindings/js/JSSVGLengthCustom.cpp
    1718         bindings/js/JSSVGMatrixCustom.cpp
    17191718        bindings/js/JSSVGPathSegCustom.cpp
    17201719        bindings/js/JSSVGPathSegListCustom.cpp
  • trunk/WebCore/ChangeLog

    r71801 r71802  
     12010-11-10  Nikolas Zimmermann  <nzimmermann@rim.com>
     2
     3        Reviewed by Dirk Schulze.
     4
     5        Convert SVGMatrix/SVGTransform/SVGTransformList to the new SVGPropertyTearOff concept
     6        https://bugs.webkit.org/show_bug.cgi?id=49311
     7
     8        Move the last list type, SVGTransformList, and the last POD types, SVGMatrix & SVGTransform, over to the new SVGPropertyTearOff concept.
     9        Removes the need for a custom JSSVGMatrix/V8SVGMatrix implementation, it's all integrated within the bindings now.
     10
     11        Tests: svg/W3C-SVG-1.1-SE/coords-dom-01-f.svg
     12               svg/W3C-SVG-1.1-SE/coords-dom-02-f.svg
     13               svg/W3C-SVG-1.1-SE/coords-dom-03-f.svg
     14               svg/W3C-SVG-1.1-SE/coords-dom-04-f.svg
     15               svg/W3C-SVG-1.1-SE/types-dom-01-b.svg
     16               svg/W3C-SVG-1.1-SE/types-dom-02-f.svg
     17               svg/W3C-SVG-1.1-SE/types-dom-03-b.svg
     18               svg/W3C-SVG-1.1-SE/types-dom-04-b.svg
     19               svg/W3C-SVG-1.1-SE/types-dom-05-b.svg
     20               svg/dom/SVGMatrix.html
     21               svg/dom/SVGTransform.html
     22               svg/dom/SVGTransformList.html
     23
     24        * Android.jscbindings.mk: Removed JSSVGMatrixCustom.cpp.
     25        * Android.v8bindings.mk: Removed V8SVGMatrixCustom.cpp.
     26        * CMakeLists.txt: Remove JSSVGMatrixCustom.cpp.
     27        * GNUmakefile.am: Ditto. Add SVGAnimatedTransformListPropertyTearOff.h/SVGStaticPropertyWithParentTearOff.h/SVGTransformListPropertyTearOff.h/SVGAnimatedTransformList.h/SVGMatrix.h to build.
     28        * WebCore.gypi: Ditto.
     29        * WebCore.pro: Ditto.
     30        * WebCore.vcproj/WebCore.vcproj: Ditto.
     31        * WebCore.xcodeproj/project.pbxproj: Ditto.
     32        * bindings/js/JSBindingsAllInOne.cpp: Remove JSSVGMatrixCustom.cpp
     33        * bindings/js/JSSVGMatrixCustom.cpp: Removed.
     34        * bindings/scripts/CodeGenerator.pm: Convert SVGMatrix/SVGTransform/SVGTransformList to the new concept.
     35        * bindings/scripts/CodeGeneratorJS.pm: Ditto.
     36        * bindings/scripts/CodeGeneratorObjC.pm: Ditto.
     37        * bindings/scripts/CodeGeneratorV8.pm: Ditto.
     38        * bindings/v8/custom/V8SVGMatrixCustom.cpp: Removed.
     39        * svg/DeprecatedSVGAnimatedPropertyTraits.h: Remove SVGTransformList handling.
     40        * svg/DeprecatedSVGAnimatedTemplate.h: Ditto.
     41        * svg/SVGAnimateTransformElement.cpp: Adapt to SVGTransformList API changes.
     42        (WebCore::transformListFor):
     43        (WebCore::SVGAnimateTransformElement::resetToBaseValue):
     44        (WebCore::SVGAnimateTransformElement::calculateAnimatedValue):
     45        (WebCore::SVGAnimateTransformElement::applyResultsToTarget):
     46        * svg/SVGAnimatedTransformList.h: Added.
     47        * svg/SVGGradientElement.cpp: Ditto.
     48        (WebCore::SVGGradientElement::SVGGradientElement):
     49        (WebCore::SVGGradientElement::parseMappedAttribute):
     50        * svg/SVGGradientElement.h: Ditto.
     51        * svg/SVGLinearGradientElement.cpp: Ditto.
     52        (WebCore::SVGLinearGradientElement::collectGradientAttributes):
     53        * svg/SVGMatrix.h: Added. SVGMatrix inherits from AffineTransform, and is only used in the bindings. It implements SVGs special requirements.
     54        (WebCore::SVGMatrix::translate): Returns a copy of the matrix, not affecting the original matrix.
     55        (WebCore::SVGMatrix::scale): Ditto.
     56        (WebCore::SVGMatrix::scaleNonUniform): Ditto.
     57        (WebCore::SVGMatrix::rotate): Ditto.
     58        (WebCore::SVGMatrix::flipX): Ditto.
     59        (WebCore::SVGMatrix::flipY): Ditto.
     60        (WebCore::SVGMatrix::skewX): Ditto.
     61        (WebCore::SVGMatrix::skewY): Ditto.
     62        (WebCore::SVGMatrix::multiply): Ditto.
     63        (WebCore::SVGMatrix::inverse): Ditto.
     64        (WebCore::SVGMatrix::rotateFromVector): Dittto.
     65        * svg/SVGMatrix.idl: Enable StrictTypeChecking/RequiresAllArguments=Raise on all attributes/functions.
     66        * svg/SVGPatternElement.cpp: Adapt to SVGTransformList API changes.
     67        (WebCore::SVGPatternElement::SVGPatternElement):
     68        (WebCore::SVGPatternElement::parseMappedAttribute):
     69        (WebCore::SVGPatternElement::collectPatternAttributes):
     70        * svg/SVGPatternElement.h: Ditto.
     71        * svg/SVGPoint.idl: Enable StrictTypeChecking/RequiresAllArguments=Raise for 'matrixTransform', now that SVGMatrix has been converted to the new scheme.
     72        * svg/SVGRadialGradientElement.cpp: Adapt to SVGTransformList API changes.
     73        (WebCore::SVGRadialGradientElement::collectGradientAttributes):
     74        * svg/SVGSVGElement.cpp: Ditto.
     75        (WebCore::SVGSVGElement::createSVGTransformFromMatrix):
     76        (WebCore::SVGSVGElement::viewBoxToViewTransform):
     77        * svg/SVGSVGElement.h: Ditto.
     78        * svg/SVGStyledTransformableElement.cpp: Ditto.
     79        (WebCore::SVGStyledTransformableElement::SVGStyledTransformableElement):
     80        (WebCore::SVGStyledTransformableElement::animatedLocalTransform):
     81        (WebCore::SVGStyledTransformableElement::parseMappedAttribute):
     82        * svg/SVGStyledTransformableElement.h: Ditto.
     83        * svg/SVGTextElement.cpp: Ditto.
     84        (WebCore::SVGTextElement::SVGTextElement):
     85        (WebCore::SVGTextElement::parseMappedAttribute):
     86        (WebCore::SVGTextElement::animatedLocalTransform):
     87        * svg/SVGTextElement.h: Ditto.
     88        * svg/SVGTransform.cpp: Modernize code, inlined some getters.
     89        (WebCore::SVGTransform::SVGTransform):
     90        (WebCore::SVGTransform::setMatrix):
     91        * svg/SVGTransform.h: Reindent header.
     92        (WebCore::SVGTransform::type):
     93        (WebCore::SVGTransform::svgMatrix):
     94        (WebCore::SVGTransform::matrix):
     95        (WebCore::SVGTransform::angle):
     96        (WebCore::SVGTransform::rotationCenter):
     97        (WebCore::SVGTransform::isValid):
     98        (WebCore::operator==): Avoid function calls, make operator== a friend of SVGTransform, and compare members directly.
     99        (WebCore::operator!=):
     100        * svg/SVGTransform.idl:
     101        * svg/SVGTransformList.cpp: Rewritten as plain Vector<SVGTransform>.
     102        (WebCore::SVGTransformList::createSVGTransformFromMatrix):
     103        (WebCore::SVGTransformList::consolidate):
     104        (WebCore::SVGTransformList::concatenate):
     105        (WebCore::SVGTransformList::valueAsString):
     106        * svg/SVGTransformList.h:
     107        (WebCore::SVGTransformList::SVGTransformList):
     108        * svg/SVGTransformList.idl: Enable StrictTypeChecking/RequiresAllArguments=Raise on all attributes/functions.
     109        * svg/SVGTransformable.cpp: Adapt to SVGTransformList API changes.
     110        (WebCore::SVGTransformable::parseTransformAttribute):
     111        * svg/SVGTransformable.h: Ditto.
     112        * svg/SVGViewSpec.cpp: Ditto.
     113        (WebCore::SVGViewSpec::SVGViewSpec):
     114        (WebCore::SVGViewSpec::setTransform):
     115        (WebCore::SVGViewSpec::parseViewSpec):
     116        * svg/SVGViewSpec.h: Ditto.
     117        (WebCore::SVGViewSpec::transform):
     118        * svg/properties/SVGAnimatedListPropertyTearOff.h: Made constructor and members protected.
     119        * svg/properties/SVGAnimatedPropertyMacros.h: Add new helper macro DECLARE_ANIMATED_TRANSFORM_LIST_PROPERTY. This is needed until we expand all macros.
     120        * svg/properties/SVGAnimatedTransformListPropertyTearOff.h: Added. Extends SVGAnimatedListPropertyTearOff, returning SVGTransformListPropertyTearOff objects.
     121        (WebCore::SVGAnimatedTransformListPropertyTearOff::baseVal):
     122        (WebCore::SVGAnimatedTransformListPropertyTearOff::animVal):
     123        (WebCore::SVGAnimatedTransformListPropertyTearOff::create):
     124        (WebCore::SVGAnimatedTransformListPropertyTearOff::SVGAnimatedTransformListPropertyTearOff):
     125        * svg/properties/SVGListPropertyTearOff.h: Made construct and members protected.
     126        * svg/properties/SVGProperty.h: Declare commitChange() as pure virtual method.
     127        * svg/properties/SVGPropertyTraits.h: Handle SVGTransformList.
     128        * svg/properties/SVGStaticPropertyWithParentTearOff.h: Added. Same concept as JSSVGStaticPODTypeWrapperWithParent, used to expose SVGPropertyTearOffs for types
     129                                                               that are using this concept themselves. (SVGMatrix attribute of SVGTransform, both are POD types, using SVGPropertyTearOff).
     130        (WebCore::SVGStaticPropertyWithParentTearOff::create):
     131        (WebCore::SVGStaticPropertyWithParentTearOff::commitChange):
     132        (WebCore::SVGStaticPropertyWithParentTearOff::SVGStaticPropertyWithParentTearOff):
     133        * svg/properties/SVGTransformListPropertyTearOff.h: Added. Extends SVGListPropertyTearOff by two special SVGTransformList methods: consolidate and createSVGTransformFromMatrix.
     134        (WebCore::SVGTransformListPropertyTearOff::create):
     135        (WebCore::SVGTransformListPropertyTearOff::createSVGTransformFromMatrix):
     136        (WebCore::SVGTransformListPropertyTearOff::consolidate):
     137        (WebCore::SVGTransformListPropertyTearOff::SVGTransformListPropertyTearOff):
     138
    11392010-11-11  Alejandro G. Castro  <alex@igalia.com>
    2140
  • trunk/WebCore/GNUmakefile.am

    r71791 r71802  
    799799        WebCore/bindings/js/JSSVGElementInstanceCustom.cpp \
    800800        WebCore/bindings/js/JSSVGLengthCustom.cpp \
    801         WebCore/bindings/js/JSSVGMatrixCustom.cpp \
    802801        WebCore/bindings/js/JSSVGPathSegCustom.cpp \
    803802        WebCore/bindings/js/JSSVGPathSegListCustom.cpp \
     
    30613060        WebCore/svg/properties/SVGAnimatedPropertyTearOff.h \
    30623061        WebCore/svg/properties/SVGAnimatedStaticPropertyTearOff.h \
     3062        WebCore/svg/properties/SVGAnimatedTransformListPropertyTearOff.h \
    30633063        WebCore/svg/properties/SVGListProperty.h \
    30643064        WebCore/svg/properties/SVGListPropertyTearOff.h \
     
    30683068        WebCore/svg/properties/SVGStaticListPropertyTearOff.h \
    30693069        WebCore/svg/properties/SVGStaticPropertyTearOff.h \
     3070        WebCore/svg/properties/SVGStaticPropertyWithParentTearOff.h \
     3071        WebCore/svg/properties/SVGTransformListPropertyTearOff.h \
    30703072        WebCore/svg/RadialGradientAttributes.h \
    30713073        WebCore/svg/SVGAElement.cpp \
     
    30903092        WebCore/svg/SVGAnimatedRect.h \
    30913093        WebCore/svg/SVGAnimatedString.h \
     3094        WebCore/svg/SVGAnimatedTransformList.h \
    30923095        WebCore/svg/SVGAnimateElement.cpp \
    30933096        WebCore/svg/SVGAnimateElement.h \
     
    32323235        WebCore/svg/SVGMaskElement.cpp \
    32333236        WebCore/svg/SVGMaskElement.h \
     3237        WebCore/svg/SVGMatrix.h \
    32343238        WebCore/svg/SVGMetadataElement.cpp \
    32353239        WebCore/svg/SVGMetadataElement.h \
  • trunk/WebCore/WebCore.gypi

    r71711 r71802  
    678678            'bindings/js/JSSVGElementInstanceCustom.cpp',
    679679            'bindings/js/JSSVGLengthCustom.cpp',
    680             'bindings/js/JSSVGMatrixCustom.cpp',
    681680            'bindings/js/JSSVGPathSegCustom.cpp',
    682681            'bindings/js/JSSVGPathSegListCustom.cpp',
     
    838837            'bindings/v8/custom/V8SVGElementCustom.cpp',
    839838            'bindings/v8/custom/V8SVGLengthCustom.cpp',
    840             'bindings/v8/custom/V8SVGMatrixCustom.cpp',
    841839            'bindings/v8/custom/V8SVGPathSegCustom.cpp',
    842840            'bindings/v8/custom/V8SharedWorkerCustom.cpp',
     
    39753973            'svg/properties/SVGAnimatedPropertyTearOff.h',
    39763974            'svg/properties/SVGAnimatedStaticPropertyTearOff.h',
     3975            'svg/properties/SVGAnimatedTransformListPropertyTearOff.h',
    39773976            'svg/properties/SVGListProperty.h',
    39783977            'svg/properties/SVGListPropertyTearOff.h',
     
    39823981            'svg/properties/SVGStaticListPropertyTearOff.h',
    39833982            'svg/properties/SVGStaticPropertyTearOff.h',
     3983            'svg/properties/SVGStaticPropertyWithParentTearOff.h',
     3984            'svg/properties/SVGTransformListPropertyTearOff.h',
    39843985            'svg/ColorDistance.cpp',
    39853986            'svg/ColorDistance.h',
     
    40204021            'svg/SVGAnimatedRect.h',
    40214022            'svg/SVGAnimatedString.h',
     4023            'svg/SVGAnimatedTransformList.h',
    40224024            'svg/SVGAnimationElement.cpp',
    40234025            'svg/SVGAnimationElement.h',
     
    41584160            'svg/SVGMaskElement.cpp',
    41594161            'svg/SVGMaskElement.h',
     4162            'svg/SVGMatrix.h',
    41604163            'svg/SVGMetadataElement.cpp',
    41614164            'svg/SVGMetadataElement.h',
  • trunk/WebCore/WebCore.pro

    r71711 r71802  
    472472        bindings/v8/custom/V8SVGElementCustom.cpp \
    473473        bindings/v8/custom/V8SVGLengthCustom.cpp \
    474         bindings/v8/custom/V8SVGMatrixCustom.cpp \
    475474        bindings/v8/custom/V8SVGPathSegCustom.cpp \
    476475        \
     
    23722371    svg/properties/SVGAnimatedPropertyTearOff.h \
    23732372    svg/properties/SVGAnimatedStaticPropertyTearOff.h \
     2373    svg/properties/SVGAnimatedTransformListPropertyTearOff.h \
    23742374    svg/properties/SVGListProperty.h \
    23752375    svg/properties/SVGListPropertyTearOff.h \
     
    23792379    svg/properties/SVGStaticListPropertyTearOff.h \
    23802380    svg/properties/SVGStaticPropertyTearOff.h \
     2381    svg/properties/SVGStaticPropertyWithParentTearOff.h \
     2382    svg/properties/SVGTransformListPropertyTearOff.h \
    23812383    svg/SVGAElement.h \
    23822384    svg/SVGAltGlyphElement.h \
     
    23952397    svg/SVGAnimatedRect.h \
    23962398    svg/SVGAnimatedString.h \
     2399    svg/SVGAnimatedTransformList.h \
    23972400    svg/SVGAnimateElement.h \
    23982401    svg/SVGAnimateMotionElement.h \
     
    24642467    svg/SVGMarkerElement.h \
    24652468    svg/SVGMaskElement.h \
     2469    svg/SVGMatrix.h \
    24662470    svg/SVGMetadataElement.h \
    24672471    svg/SVGMissingGlyphElement.h \
     
    33703374            bindings/js/JSSVGElementInstanceCustom.cpp \
    33713375            bindings/js/JSSVGLengthCustom.cpp \
    3372             bindings/js/JSSVGMatrixCustom.cpp \
    33733376            bindings/js/JSSVGPathSegCustom.cpp \
    33743377            bindings/js/JSSVGPathSegListCustom.cpp
  • trunk/WebCore/WebCore.vcproj/WebCore.vcproj

    r71711 r71802  
    6025260252                                </File>
    6025360253                                <File
    60254                                         RelativePath="..\bindings\js\JSSVGMatrixCustom.cpp"
    60255                                         >
    60256                                         <FileConfiguration
    60257                                                 Name="Debug|Win32"
    60258                                                 ExcludedFromBuild="true"
    60259                                                 >
    60260                                                 <Tool
    60261                                                         Name="VCCLCompilerTool"
    60262                                                 />
    60263                                         </FileConfiguration>
    60264                                         <FileConfiguration
    60265                                                 Name="Release|Win32"
    60266                                                 ExcludedFromBuild="true"
    60267                                                 >
    60268                                                 <Tool
    60269                                                         Name="VCCLCompilerTool"
    60270                                                 />
    60271                                         </FileConfiguration>
    60272                                         <FileConfiguration
    60273                                                 Name="Debug_Internal|Win32"
    60274                                                 ExcludedFromBuild="true"
    60275                                                 >
    60276                                                 <Tool
    60277                                                         Name="VCCLCompilerTool"
    60278                                                 />
    60279                                         </FileConfiguration>
    60280                                         <FileConfiguration
    60281                                                 Name="Debug_Cairo|Win32"
    60282                                                 ExcludedFromBuild="true"
    60283                                                 >
    60284                                                 <Tool
    60285                                                         Name="VCCLCompilerTool"
    60286                                                 />
    60287                                         </FileConfiguration>
    60288                                         <FileConfiguration
    60289                                                 Name="Release_Cairo|Win32"
    60290                                                 ExcludedFromBuild="true"
    60291                                                 >
    60292                                                 <Tool
    60293                                                         Name="VCCLCompilerTool"
    60294                                                 />
    60295                                         </FileConfiguration>
    60296                                         <FileConfiguration
    60297                                                 Name="Debug_All|Win32"
    60298                                                 ExcludedFromBuild="true"
    60299                                                 >
    60300                                                 <Tool
    60301                                                         Name="VCCLCompilerTool"
    60302                                                 />
    60303                                         </FileConfiguration>
    60304                                 </File>
    60305                                 <File
    6030660254                                        RelativePath="..\bindings\js\JSSVGPathSegCustom.cpp"
    6030760255                                        >
     
    6188561833                        </File>
    6188661834                        <File
     61835                                RelativePath="..\svg\SVGAnimatedTransformList.h"
     61836                                >
     61837                        </File>
     61838                        <File
    6188761839                                RelativePath="..\svg\SVGAnimateElement.h"
    6188861840                                >
     
    6237862330                        <File
    6237962331                                RelativePath="..\svg\SVGMaskElement.h"
     62332                                >
     62333                        </File>
     62334                        <File
     62335                                RelativePath="..\svg\SVGMatrix.h"
    6238062336                                >
    6238162337                        </File>
     
    6293262888                                </File>
    6293362889                                <File
     62890                                        RelativePath="..\svg\properties\SVGAnimatedTransformListPropertyTearOff.h"
     62891                                        >
     62892                                </File>
     62893                                <File
    6293462894                                        RelativePath="..\svg\properties\SVGListProperty.h"
    6293562895                                        >
     
    6295762917                                <File
    6295862918                                        RelativePath="..\svg\properties\SVGStaticPropertyTearOff.h"
     62919                                        >
     62920                                </File>
     62921                                <File
     62922                                        RelativePath="..\svg\properties\SVGStaticPropertyWithParentTearOff.h"
     62923                                        >
     62924                                </File>
     62925                                <File
     62926                                        RelativePath="..\svg\properties\SVGTransformListPropertyTearOff.h"
    6295962927                                        >
    6296062928                                </File>
  • trunk/WebCore/WebCore.xcodeproj/project.pbxproj

    r71711 r71802  
    6161                0804BF6E0EE09C3B0006C000 /* WMLDoElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0804BF6C0EE09C3B0006C000 /* WMLDoElement.cpp */; };
    6262                0804BF6F0EE09C3B0006C000 /* WMLDoElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 0804BF6D0EE09C3B0006C000 /* WMLDoElement.h */; };
     63                0806E57A12893045007CED32 /* SVGMatrix.h in Headers */ = {isa = PBXBuildFile; fileRef = 0806E57912893045007CED32 /* SVGMatrix.h */; settings = {ATTRIBUTES = (Private, ); }; };
    6364                08082373117987C100241DE8 /* RenderSVGResourceContainer.h in Headers */ = {isa = PBXBuildFile; fileRef = 08082372117987C100241DE8 /* RenderSVGResourceContainer.h */; };
    6465                080AEC810ED8708B00DF4CCE /* WMLIntrinsicEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 080AEC7D0ED8708A00DF4CCE /* WMLIntrinsicEvent.cpp */; };
     
    9697                082341C60FCF3A9500D75BD6 /* WMLSelectElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 082341C40FCF3A9400D75BD6 /* WMLSelectElement.h */; };
    9798                0823D159127AD6AC000EBC95 /* SVGAnimatedInteger.h in Headers */ = {isa = PBXBuildFile; fileRef = 0823D158127AD6AC000EBC95 /* SVGAnimatedInteger.h */; settings = {ATTRIBUTES = (Private, ); }; };
     99                08250939128BD4D800E2ED8E /* SVGAnimatedTransformList.h in Headers */ = {isa = PBXBuildFile; fileRef = 08250938128BD4D800E2ED8E /* SVGAnimatedTransformList.h */; settings = {ATTRIBUTES = (Private, ); }; };
    98100                082FCAC4110927CE00CC4821 /* JSSVGContextCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 082FCAC3110927CE00CC4821 /* JSSVGContextCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
    99101                083192AA112B43050083C3B9 /* RenderSVGResource.h in Headers */ = {isa = PBXBuildFile; fileRef = 083192A7112B43050083C3B9 /* RenderSVGResource.h */; };
     
    144146                085797091278394C00A8EC5F /* SVGAnimatedBoolean.h in Headers */ = {isa = PBXBuildFile; fileRef = 085797081278394C00A8EC5F /* SVGAnimatedBoolean.h */; settings = {ATTRIBUTES = (Private, ); }; };
    145147                08591AA50F085C4E009BACB1 /* InputElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 08591AA40F085C4E009BACB1 /* InputElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
     148                085A15931289A8DD002710E3 /* SVGAnimatedTransformListPropertyTearOff.h in Headers */ = {isa = PBXBuildFile; fileRef = 085A15921289A8DD002710E3 /* SVGAnimatedTransformListPropertyTearOff.h */; settings = {ATTRIBUTES = (Private, ); }; };
    146149                085AFDC80F2977350061F2B3 /* WMLFormControlElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 085AFDC60F2977350061F2B3 /* WMLFormControlElement.cpp */; };
    147150                085AFDC90F2977350061F2B3 /* WMLFormControlElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 085AFDC70F2977350061F2B3 /* WMLFormControlElement.h */; settings = {ATTRIBUTES = (); }; };
     
    235238                08C6A7AB117DFBAB00FEA1A2 /* RenderSVGResourceSolidColor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08C6A7A9117DFBAB00FEA1A2 /* RenderSVGResourceSolidColor.cpp */; };
    236239                08C6A7AC117DFBAB00FEA1A2 /* RenderSVGResourceSolidColor.h in Headers */ = {isa = PBXBuildFile; fileRef = 08C6A7AA117DFBAB00FEA1A2 /* RenderSVGResourceSolidColor.h */; };
     240                08C7136E128956A3001B107E /* SVGTransformListPropertyTearOff.h in Headers */ = {isa = PBXBuildFile; fileRef = 08C7136D128956A3001B107E /* SVGTransformListPropertyTearOff.h */; settings = {ATTRIBUTES = (Private, ); }; };
    237241                08C7A2C710DC7462002D368B /* SVGNames.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 656581E909D1508D000E61D7 /* SVGNames.h */; };
    238242                08C859C01274575400A5728D /* SVGAnimatedRect.h in Headers */ = {isa = PBXBuildFile; fileRef = 08C859BF1274575300A5728D /* SVGAnimatedRect.h */; settings = {ATTRIBUTES = (Private, ); }; };
    239243                08C925190FCC7C4A00480DEC /* FilterEffect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08C925170FCC7C4A00480DEC /* FilterEffect.cpp */; };
    240244                08C9251A0FCC7C4A00480DEC /* FilterEffect.h in Headers */ = {isa = PBXBuildFile; fileRef = 08C925180FCC7C4A00480DEC /* FilterEffect.h */; };
     245                08CA3D4412894A3800FFF260 /* SVGStaticPropertyWithParentTearOff.h in Headers */ = {isa = PBXBuildFile; fileRef = 08CA3D4312894A3800FFF260 /* SVGStaticPropertyWithParentTearOff.h */; settings = {ATTRIBUTES = (Private, ); }; };
    241246                08CD61BC0ED3929C002DDF51 /* WMLTaskElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 08CD61B80ED3929C002DDF51 /* WMLTaskElement.cpp */; };
    242247                08CD61BD0ED3929C002DDF51 /* WMLTaskElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 08CD61B90ED3929C002DDF51 /* WMLTaskElement.h */; };
     
    42274232                B25599A40D00D8BA00BB825C /* SVGImage.h in Headers */ = {isa = PBXBuildFile; fileRef = B255990C0D00D8B900BB825C /* SVGImage.h */; };
    42284233                B25599A50D00D8BA00BB825C /* EmptyClients.h in Headers */ = {isa = PBXBuildFile; fileRef = B255990D0D00D8B900BB825C /* EmptyClients.h */; };
    4229                 B25DFAAF0B2E2929000E6510 /* JSSVGMatrixCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B25DFAAE0B2E2929000E6510 /* JSSVGMatrixCustom.cpp */; };
    42304234                B262B8040D1F32D000158F09 /* SVGFont.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B262B8030D1F32D000158F09 /* SVGFont.cpp */; };
    42314235                B266CD4D0C3AEC6500EB08D2 /* JSSVGException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B266CD4B0C3AEC6500EB08D2 /* JSSVGException.cpp */; };
     
    61106114                0804BF6C0EE09C3B0006C000 /* WMLDoElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLDoElement.cpp; sourceTree = "<group>"; };
    61116115                0804BF6D0EE09C3B0006C000 /* WMLDoElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLDoElement.h; sourceTree = "<group>"; };
     6116                0806E57912893045007CED32 /* SVGMatrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGMatrix.h; sourceTree = "<group>"; };
    61126117                08082372117987C100241DE8 /* RenderSVGResourceContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderSVGResourceContainer.h; sourceTree = "<group>"; };
    61136118                080AEC7D0ED8708A00DF4CCE /* WMLIntrinsicEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLIntrinsicEvent.cpp; sourceTree = "<group>"; };
     
    61456150                082341C40FCF3A9400D75BD6 /* WMLSelectElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLSelectElement.h; sourceTree = "<group>"; };
    61466151                0823D158127AD6AC000EBC95 /* SVGAnimatedInteger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedInteger.h; sourceTree = "<group>"; };
     6152                08250938128BD4D800E2ED8E /* SVGAnimatedTransformList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedTransformList.h; sourceTree = "<group>"; };
    61476153                082FCAC3110927CE00CC4821 /* JSSVGContextCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSVGContextCache.h; sourceTree = "<group>"; };
    61486154                083192A7112B43050083C3B9 /* RenderSVGResource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderSVGResource.h; sourceTree = "<group>"; };
     
    61916197                085797081278394C00A8EC5F /* SVGAnimatedBoolean.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedBoolean.h; sourceTree = "<group>"; };
    61926198                08591AA40F085C4E009BACB1 /* InputElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InputElement.h; sourceTree = "<group>"; };
     6199                085A15921289A8DD002710E3 /* SVGAnimatedTransformListPropertyTearOff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedTransformListPropertyTearOff.h; sourceTree = "<group>"; };
    61936200                085AFDC60F2977350061F2B3 /* WMLFormControlElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLFormControlElement.cpp; sourceTree = "<group>"; };
    61946201                085AFDC70F2977350061F2B3 /* WMLFormControlElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLFormControlElement.h; sourceTree = "<group>"; };
     
    62706277                08C6A7A9117DFBAB00FEA1A2 /* RenderSVGResourceSolidColor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderSVGResourceSolidColor.cpp; sourceTree = "<group>"; };
    62716278                08C6A7AA117DFBAB00FEA1A2 /* RenderSVGResourceSolidColor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderSVGResourceSolidColor.h; sourceTree = "<group>"; };
     6279                08C7136D128956A3001B107E /* SVGTransformListPropertyTearOff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTransformListPropertyTearOff.h; sourceTree = "<group>"; };
    62726280                08C859BF1274575300A5728D /* SVGAnimatedRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedRect.h; sourceTree = "<group>"; };
    62736281                08C925170FCC7C4A00480DEC /* FilterEffect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FilterEffect.cpp; path = filters/FilterEffect.cpp; sourceTree = "<group>"; };
    62746282                08C925180FCC7C4A00480DEC /* FilterEffect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FilterEffect.h; path = filters/FilterEffect.h; sourceTree = "<group>"; };
     6283                08CA3D4312894A3800FFF260 /* SVGStaticPropertyWithParentTearOff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGStaticPropertyWithParentTearOff.h; sourceTree = "<group>"; };
    62756284                08CD61B80ED3929C002DDF51 /* WMLTaskElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WMLTaskElement.cpp; sourceTree = "<group>"; };
    62766285                08CD61B90ED3929C002DDF51 /* WMLTaskElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WMLTaskElement.h; sourceTree = "<group>"; };
     
    1022910238                B255990C0D00D8B900BB825C /* SVGImage.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SVGImage.h; sourceTree = "<group>"; };
    1023010239                B255990D0D00D8B900BB825C /* EmptyClients.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = EmptyClients.h; sourceTree = "<group>"; };
    10231                 B25DFAAE0B2E2929000E6510 /* JSSVGMatrixCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSSVGMatrixCustom.cpp; sourceTree = "<group>"; };
    1023210240                B262B8030D1F32D000158F09 /* SVGFont.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SVGFont.cpp; sourceTree = "<group>"; };
    1023310241                B266CD4B0C3AEC6500EB08D2 /* JSSVGException.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSSVGException.cpp; sourceTree = "<group>"; };
     
    1180211810                                088A0DFF126EF1DB00978F7A /* SVGAnimatedPropertyTearOff.h */,
    1180311811                                08525E621278C00100A84778 /* SVGAnimatedStaticPropertyTearOff.h */,
     11812                                085A15921289A8DD002710E3 /* SVGAnimatedTransformListPropertyTearOff.h */,
    1180411813                                0810764312828556007C63BA /* SVGListProperty.h */,
    1180511814                                088A0E00126EF1DB00978F7A /* SVGListPropertyTearOff.h */,
     
    1180911818                                0880F70D1282B46D00948505 /* SVGStaticListPropertyTearOff.h */,
    1181011819                                0813A4E91284132600992511 /* SVGStaticPropertyTearOff.h */,
     11820                                08CA3D4312894A3800FFF260 /* SVGStaticPropertyWithParentTearOff.h */,
     11821                                08C7136D128956A3001B107E /* SVGTransformListPropertyTearOff.h */,
    1181111822                        );
    1181211823                        path = properties;
     
    1454614557                                4F1534DD11B532EC0021FD86 /* EditingBehavior.h */,
    1454714558                                4F1534DF11B533020021FD86 /* EditingBehaviorTypes.h */,
     14559                                9BAB6C6B12550631001626D4 /* EditingStyle.cpp */,
    1454814560                                9BAB6C6A12550631001626D4 /* EditingStyle.h */,
    14549                                 9BAB6C6B12550631001626D4 /* EditingStyle.cpp */,
    1455014561                                4B3043CA0AE0373B00A82647 /* Editor.cpp */,
    1455114562                                4B3043CB0AE0373B00A82647 /* Editor.h */,
     
    1613716148                                084DB59A128008CC002A6D64 /* SVGAnimatedString.h */,
    1613816149                                B22277F60D00BF1F0071B782 /* SVGAnimatedString.idl */,
     16150                                08250938128BD4D800E2ED8E /* SVGAnimatedTransformList.h */,
    1613916151                                B22277F80D00BF1F0071B782 /* SVGAnimatedTransformList.idl */,
    1614016152                                B22277F90D00BF1F0071B782 /* SVGAnimateElement.cpp */,
     
    1634516357                                B22278B10D00BF200071B782 /* SVGMaskElement.h */,
    1634616358                                B22278B20D00BF200071B782 /* SVGMaskElement.idl */,
     16359                                0806E57912893045007CED32 /* SVGMatrix.h */,
    1634716360                                B22278B30D00BF200071B782 /* SVGMatrix.idl */,
    1634816361                                B22278B40D00BF200071B782 /* SVGMetadataElement.cpp */,
     
    1713817151                                08A48A6D0E86CF6D00E225DD /* JSSVGElementInstanceCustom.cpp */,
    1713917152                                08E4FE450E2BD41400F4CAE0 /* JSSVGLengthCustom.cpp */,
    17140                                 B25DFAAE0B2E2929000E6510 /* JSSVGMatrixCustom.cpp */,
    1714117153                                B2C96D8C0B3AF2B7005E80EC /* JSSVGPathSegCustom.cpp */,
    1714217154                                B297BC6F0B3C14CF0045A590 /* JSSVGPathSegListCustom.cpp */,
     
    1728617298                        isa = PBXGroup;
    1728717299                        children = (
    17288                                 A8D2B2521287A56000AF4DDA /* cache */,
    1728917300                                1A8F6BB00DB55CDC001DB794 /* appcache */,
    1729017301                                512DD8E80D91E691000F89EE /* archive */,
     17302                                A8D2B2521287A56000AF4DDA /* cache */,
    1729117303                                5126E6B60A2E3AEF005C29FA /* icon */,
    1729217304                                93A1EAA20A5634D8006960A0 /* mac */,
     
    1858118593                                1A569CFC0D7E2B82007C3983 /* c_runtime.h in Headers */,
    1858218594                                1A569CFE0D7E2B82007C3983 /* c_utility.h in Headers */,
    18583                                 BCB16C180979C3BD00467741 /* MemoryCache.h in Headers */,
    1858418595                                BCB16C1A0979C3BD00467741 /* CachedCSSStyleSheet.h in Headers */,
    1858518596                                BC64B4CC0CB4295D005F2B62 /* CachedFont.h in Headers */,
     
    1963019641                                976D6C91122B8A3D001FD1F7 /* FileWriter.h in Headers */,
    1963119642                                893C47A81238908B002B3D86 /* FileWriterCallback.h in Headers */,
     19643                                46700ED1127B96CB00F5D5D6 /* FileWriterSync.h in Headers */,
    1963219644                                BC5EB69F0E81DAEB00B25965 /* FillLayer.h in Headers */,
    1963319645                                845E72F80FD261EE00A87D79 /* Filter.h in Headers */,
     
    2045720469                                4E19592C0A39DACC00220FE5 /* MediaQueryEvaluator.h in Headers */,
    2045820470                                4E19592E0A39DACC00220FE5 /* MediaQueryExp.h in Headers */,
     20471                                BCB16C180979C3BD00467741 /* MemoryCache.h in Headers */,
    2045920472                                9FFE3E7B11B59C5D0037874E /* MemoryInfo.h in Headers */,
    2046020473                                93309DFA099E64920056E581 /* MergeIdenticalElementsCommand.h in Headers */,
     
    2074820761                                5162C7F511F77EFB00612EFE /* SchemeRegistry.h in Headers */,
    2074920762                                BCEC01BE0C274DAC009F4EC9 /* Screen.h in Headers */,
     20763                                A84D82C111D3474800972990 /* ScriptableDocumentParser.h in Headers */,
    2075020764                                F39BE95C12673BF400E0A674 /* ScriptArguments.h in Headers */,
    20751                                 A84D82C111D3474800972990 /* ScriptableDocumentParser.h in Headers */,
    2075220765                                7AFD4A8B1131C2760035B883 /* ScriptBreakpoint.h in Headers */,
    2075320766                                41F1D21F0EF35C2A00DA8753 /* ScriptCachedFrameData.h in Headers */,
     
    2092720940                                08525E631278C00100A84778 /* SVGAnimatedStaticPropertyTearOff.h in Headers */,
    2092820941                                084DB59B128008CC002A6D64 /* SVGAnimatedString.h in Headers */,
     20942                                085A15931289A8DD002710E3 /* SVGAnimatedTransformListPropertyTearOff.h in Headers */,
    2092920943                                B22279900D00BF220071B782 /* SVGAnimateElement.h in Headers */,
    2093020944                                B22279930D00BF220071B782 /* SVGAnimateMotionElement.h in Headers */,
     
    2101221026                                08735FB910E91232006D6FAD /* SVGMarkerLayoutInfo.h in Headers */,
    2101321027                                B2227A470D00BF220071B782 /* SVGMaskElement.h in Headers */,
     21028                                0806E57A12893045007CED32 /* SVGMatrix.h in Headers */,
    2101421029                                B2227A4B0D00BF220071B782 /* SVGMetadataElement.h in Headers */,
    2101521030                                B2A1F2B10CEF0ABF00442F6A /* SVGMissingGlyphElement.h in Headers */,
     
    2107121086                                0880F70E1282B46D00948505 /* SVGStaticListPropertyTearOff.h in Headers */,
    2107221087                                0813A4EA1284132600992511 /* SVGStaticPropertyTearOff.h in Headers */,
     21088                                08CA3D4412894A3800FFF260 /* SVGStaticPropertyWithParentTearOff.h in Headers */,
    2107321089                                B2227AA90D00BF220071B782 /* SVGStopElement.h in Headers */,
    2107421090                                B2227AAC0D00BF220071B782 /* SVGStringList.h in Headers */,
     
    2110121117                                B2227ADD0D00BF220071B782 /* SVGTransformDistance.h in Headers */,
    2110221118                                B2227ADF0D00BF220071B782 /* SVGTransformList.h in Headers */,
     21119                                08C7136E128956A3001B107E /* SVGTransformListPropertyTearOff.h in Headers */,
    2110321120                                B2227AE20D00BF220071B782 /* SVGTRefElement.h in Headers */,
    2110421121                                B2227AE50D00BF220071B782 /* SVGTSpanElement.h in Headers */,
     
    2134521362                                E1BE512E0CF6C512002EA959 /* XSLTUnicodeSort.h in Headers */,
    2134621363                                97DD4D870FDF4D6E00ECF9A4 /* XSSAuditor.h in Headers */,
    21347                                 46700ED1127B96CB00F5D5D6 /* FileWriterSync.h in Headers */,
     21364                                08250939128BD4D800E2ED8E /* SVGAnimatedTransformList.h in Headers */,
    2134821365                        );
    2134921366                        runOnlyForDeploymentPostprocessing = 0;
     
    2140521422                        buildConfigurationList = 149C284308902B11008A9EFC /* Build configuration list for PBXProject "WebCore" */;
    2140621423                        compatibilityVersion = "Xcode 2.4";
    21407                         developmentRegion = English;
    2140821424                        hasScannedForEncodings = 1;
    2140921425                        knownRegions = (
     
    2173421750                                1A569CFB0D7E2B82007C3983 /* c_runtime.cpp in Sources */,
    2173521751                                1A569CFD0D7E2B82007C3983 /* c_utility.cpp in Sources */,
    21736                                 BCB16C170979C3BD00467741 /* MemoryCache.cpp in Sources */,
    2173721752                                BCB16C190979C3BD00467741 /* CachedCSSStyleSheet.cpp in Sources */,
    2173821753                                BC64B4CB0CB4295D005F2B62 /* CachedFont.cpp in Sources */,
     
    2226922284                                976D6C8D122B8A3D001FD1F7 /* FileThread.cpp in Sources */,
    2227022285                                976D6C90122B8A3D001FD1F7 /* FileWriter.cpp in Sources */,
     22286                                46700ED0127B96CB00F5D5D6 /* FileWriterSync.cpp in Sources */,
    2227122287                                BC5EB69E0E81DAEB00B25965 /* FillLayer.cpp in Sources */,
    2227222288                                08C925190FCC7C4A00480DEC /* FilterEffect.cpp in Sources */,
     
    2298423000                                B2FA3DAA0AB75A6F000E5AC4 /* JSSVGMaskElement.cpp in Sources */,
    2298523001                                B2FA3DAC0AB75A6F000E5AC4 /* JSSVGMatrix.cpp in Sources */,
    22986                                 B25DFAAF0B2E2929000E6510 /* JSSVGMatrixCustom.cpp in Sources */,
    2298723002                                B2FA3DAE0AB75A6F000E5AC4 /* JSSVGMetadataElement.cpp in Sources */,
    2298823003                                B27B28290CEF0C0700D39D54 /* JSSVGMissingGlyphElement.cpp in Sources */,
     
    2316123176                                4E19592B0A39DACC00220FE5 /* MediaQueryEvaluator.cpp in Sources */,
    2316223177                                4E19592D0A39DACC00220FE5 /* MediaQueryExp.cpp in Sources */,
     23178                                BCB16C170979C3BD00467741 /* MemoryCache.cpp in Sources */,
    2316323179                                9FFE3E7A11B59C5D0037874E /* MemoryInfo.cpp in Sources */,
    2316423180                                93309DF9099E64920056E581 /* MergeIdenticalElementsCommand.cpp in Sources */,
     
    2338523401                                51AA3F6F0BD5AA9E00892971 /* ResourceLoaderMac.mm in Sources */,
    2338623402                                973E325610883B7C005BC493 /* ResourceLoadNotifier.cpp in Sources */,
     23403                                D0CE58F8125E4CC200F3F199 /* ResourceLoadScheduler.cpp in Sources */,
    2338723404                                514C767C0CE923A1007EF3CD /* ResourceRequestBase.cpp in Sources */,
    2338823405                                514C76530CE9234E007EF3CD /* ResourceRequestMac.mm in Sources */,
     
    2391523932                                E1BE512D0CF6C512002EA959 /* XSLTUnicodeSort.cpp in Sources */,
    2391623933                                97DD4D860FDF4D6E00ECF9A4 /* XSSAuditor.cpp in Sources */,
    23917                                 46700ED0127B96CB00F5D5D6 /* FileWriterSync.cpp in Sources */,
    23918                                 D0CE58F8125E4CC200F3F199 /* ResourceLoadScheduler.cpp in Sources */,
    2391923934                        );
    2392023935                        runOnlyForDeploymentPostprocessing = 0;
  • trunk/WebCore/bindings/js/JSBindingsAllInOne.cpp

    r71515 r71802  
    117117#include "JSSVGElementInstanceCustom.cpp"
    118118#include "JSSVGLengthCustom.cpp"
    119 #include "JSSVGMatrixCustom.cpp"
    120119#include "JSSVGPathSegCustom.cpp"
    121120#include "JSSVGPathSegListCustom.cpp"
  • trunk/WebCore/bindings/scripts/CodeGenerator.pm

    r71512 r71802  
    5151my %primitiveTypeHash = ( "boolean" => 1, "void" => 1, "Date" => 1);
    5252
    53 my %podTypeHash = ("SVGTransform" => 1);
    54 my %podTypesWithWritablePropertiesHash = ("SVGMatrix" => 1);
    5553my %stringTypeHash = ("DOMString" => 1, "AtomicString" => 1);
    5654
    5755my %nonPointerTypeHash = ("DOMTimeStamp" => 1, "CompareHow" => 1, "SVGPaintType" => 1);
    58 
    59 my %svgNewStyleAnimatedTypeHash = ("SVGAnimatedAngle" => 1, "SVGAnimatedBoolean" => 1,
    60                                    "SVGAnimatedEnumeration" => 1, "SVGAnimatedInteger" => 1,
    61                                    "SVGAnimatedLength" => 1, "SVGAnimatedLengthList" => 1,
    62                                    "SVGAnimatedNumber" => 1, "SVGAnimatedNumberList" => 1,
    63                                    "SVGAnimatedPreserveAspectRatio" => 1, "SVGAnimatedRect" => 1,
    64                                    "SVGAnimatedString" => 1);
    6556
    6657my %svgAnimatedTypeHash = ("SVGAnimatedAngle" => 1, "SVGAnimatedBoolean" => 1,
     
    8273    "SVGLength" => "SVGPropertyTearOff<SVGLength>",
    8374    "SVGLengthList" => "SVGListPropertyTearOff<SVGLengthList>",
     75    "SVGMatrix" => "SVGPropertyTearOff<SVGMatrix>",
    8476    "SVGNumber" => "SVGPropertyTearOff<float>",
    8577    "SVGNumberList" => "SVGListPropertyTearOff<SVGNumberList>",
     
    8880    "SVGPreserveAspectRatio" => "SVGPropertyTearOff<SVGPreserveAspectRatio>",
    8981    "SVGRect" => "SVGPropertyTearOff<FloatRect>",
    90     "SVGStringList" => "SVGStaticListPropertyTearOff<SVGStringList>"
     82    "SVGStringList" => "SVGStaticListPropertyTearOff<SVGStringList>",
     83    "SVGTransform" => "SVGPropertyTearOff<SVGTransform>",
     84    "SVGTransformList" => "SVGTransformListPropertyTearOff"
    9185);
    9286
    9387my %svgTypeWithWritablePropertiesNeedingTearOff = (
    94     "SVGPoint" => 1
     88    "SVGPoint" => 1,
     89    "SVGMatrix" => 1
    9590);
    9691
     
    313308    my $type = shift;
    314309
    315     # Special case: SVGRect.h / SVGPoint.h / SVGNumber.h / SVGMatrix.h do not exist.
    316     return 1 if $type eq "SVGRect" or $type eq "SVGPoint" or $type eq "SVGNumber" or $type eq "SVGMatrix";
    317     return 0;
    318 }
    319 
    320 # FIXME: This method will go away once all SVG animated properties are converted to the new scheme.
    321 sub IsPodType
    322 {
    323     my $object = shift;
    324     my $type = shift;
    325 
    326     return 1 if $podTypeHash{$type};
    327     return 1 if $podTypesWithWritablePropertiesHash{$type};
    328     return 0;
    329 }
    330 
    331 sub IsPodTypeWithWriteableProperties
    332 {
    333     my $object = shift;
    334     my $type = shift;
    335 
    336     return 1 if $podTypesWithWritablePropertiesHash{$type};
     310    # Special case: SVGRect.h / SVGPoint.h / SVGNumber.h do not exist.
     311    return 1 if $type eq "SVGRect" or $type eq "SVGPoint" or $type eq "SVGNumber";
    337312    return 0;
    338313}
     
    416391    } elsif ($svgTypeNeedingTearOff =~ /SVGStaticListPropertyTearOff/) {
    417392        $svgTypeNeedingTearOff =~ s/SVGStaticListPropertyTearOff<//;
    418     }
     393    }  elsif ($svgTypeNeedingTearOff =~ /SVGTransformListPropertyTearOff/) {
     394        $svgTypeNeedingTearOff =~ s/SVGTransformListPropertyTearOff<//;
     395    }
    419396
    420397    $svgTypeNeedingTearOff =~ s/>//;
    421398    return $svgTypeNeedingTearOff;
    422 }
    423 
    424 # FIXME: This method will go away once all SVG animated properties are converted to the new scheme.
    425 sub IsSVGNewStyleAnimatedType
    426 {
    427     my $object = shift;
    428     my $type = shift;
    429 
    430     return 1 if $svgNewStyleAnimatedTypeHash{$type};
    431     return 0;
    432399}
    433400
  • trunk/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r71515 r71802  
    326326    return 0 unless $implClassName =~ /SVG/;
    327327    return 0 if $implClassName =~ /Element/;
    328     return 0 if $codeGenerator->IsSVGNewStyleAnimatedType($implClassName);
     328    return 0 if $codeGenerator->IsSVGAnimatedType($implClassName);
    329329    return 0 if $codeGenerator->IsSVGTypeNeedingTearOff($implClassName);
    330330
     
    673673    $implType = $svgNativeType if $svgNativeType;
    674674
    675     # FIXME: Old style SVG JS bindings, will vanish soon.
    676     my $podType = $dataNode->extendedAttributes->{"PODType"};
    677     if ($podType) {
    678         $implType = "JSSVGPODTypeWrapper<$podType> ";
    679         $headerIncludes{"$podType.h"} = 1 if $podType ne "float";
    680         $headerIncludes{"JSSVGPODTypeWrapper.h"} = 1;
    681     }
    682 
    683     my $svgPropertyOrPodType;
    684     $svgPropertyOrPodType = $podType if $podType;
    685     $svgPropertyOrPodType = $svgPropertyType if $svgPropertyType;
    686     $svgPropertyOrPodType = $svgListPropertyType if $svgListPropertyType;
     675    my $svgPropertyOrListPropertyType;
     676    $svgPropertyOrListPropertyType = $svgPropertyType if $svgPropertyType;
     677    $svgPropertyOrListPropertyType = $svgListPropertyType if $svgListPropertyType;
    687678
    688679    my $numConstants = @{$dataNode->constants};
     
    692683    push(@headerContent, "\nnamespace WebCore {\n\n");
    693684
    694     if ($codeGenerator->IsSVGNewStyleAnimatedType($implClassName)) {
     685    if ($codeGenerator->IsSVGAnimatedType($implClassName)) {
    695686        $headerIncludes{"$implClassName.h"} = 1;
    696687    } else {
    697688        # Implementation class forward declaration
    698         AddClassForwardIfNeeded($implClassName) unless $svgPropertyOrPodType;
     689        AddClassForwardIfNeeded($implClassName) unless $svgPropertyOrListPropertyType;
    699690    }
    700691
     
    945936
    946937    if (!$hasParent || $dataNode->extendedAttributes->{"GenerateToJS"} || $dataNode->extendedAttributes->{"CustomToJS"}) {
    947         if ($podType) {
    948             push(@headerContent, "JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, $implType*, SVGElement*);\n");
    949         } elsif ($svgPropertyType) {
     938        if ($svgPropertyType) {
    950939            push(@headerContent, "JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, $implType*);\n");
    951940        } elsif (IsSVGTypeNeedingContextParameter($implClassName)) {
     
    956945    }
    957946    if (!$hasParent || $dataNode->extendedAttributes->{"GenerateNativeConverter"}) {
    958 
    959         if ($podType) {
    960             push(@headerContent, "$podType to${interfaceName}(JSC::JSValue);\n");
    961         } elsif ($interfaceName eq "NodeFilter") {
     947        if ($interfaceName eq "NodeFilter") {
    962948            push(@headerContent, "PassRefPtr<NodeFilter> toNodeFilter(JSC::JSValue);\n");
    963949        } else {
     
    14311417    $implType = $svgNativeType if $svgNativeType;
    14321418
    1433     my $podType = $dataNode->extendedAttributes->{"PODType"};
    1434     if ($podType) {
    1435         $implType = "JSSVGPODTypeWrapper<$podType> ";
    1436     }
    1437 
    1438     my $svgPropertyOrPodType;
    1439     $svgPropertyOrPodType = $podType if $podType;
    1440     $svgPropertyOrPodType = $svgPropertyType if $svgPropertyType;
    1441     $svgPropertyOrPodType = $svgListPropertyType if $svgListPropertyType;
     1419    my $svgPropertyOrListPropertyType;
     1420    $svgPropertyOrListPropertyType = $svgPropertyType if $svgPropertyType;
     1421    $svgPropertyOrListPropertyType = $svgListPropertyType if $svgListPropertyType;
    14421422
    14431423    # Constructor
     
    15621542                push(@implContent, "    ${className}* castedThis = static_cast<$className*>(asObject(slotBase));\n");
    15631543
    1564                 my $implClassNameForValueConversion = "";
    1565                 if (!$svgPropertyOrPodType and ($codeGenerator->IsSVGAnimatedType($implClassName) or $attribute->type !~ /^readonly/)) {
    1566                     $implClassNameForValueConversion = $implClassName;
    1567                 }
    1568 
    15691544                if ($dataNode->extendedAttributes->{"CheckDomainSecurity"} &&
    15701545                        !$attribute->signature->extendedAttributes->{"DoNotCheckDomainSecurity"} &&
     
    15791554                    $implIncludes{"JSDOMBinding.h"} = 1;
    15801555                    push(@implContent, "    $implClassName* imp = static_cast<$implClassName*>(castedThis->impl());\n");
    1581                     push(@implContent, "    return checkNodeSecurity(exec, imp->$implGetterFunctionName()) ? " . NativeToJSValue($attribute->signature, 0, $implClassName, $implClassNameForValueConversion, "imp->$implGetterFunctionName()", "castedThis") . " : jsUndefined();\n");
     1556                    push(@implContent, "    return checkNodeSecurity(exec, imp->$implGetterFunctionName()) ? " . NativeToJSValue($attribute->signature, 0, $implClassName, "imp->$implGetterFunctionName()", "castedThis") . " : jsUndefined();\n");
    15821557                } elsif ($attribute->signature->extendedAttributes->{"CheckFrameSecurity"}) {
    15831558                    $implIncludes{"Document.h"} = 1;
    15841559                    $implIncludes{"JSDOMBinding.h"} = 1;
    15851560                    push(@implContent, "    $implClassName* imp = static_cast<$implClassName*>(castedThis->impl());\n");
    1586                     push(@implContent, "    return checkNodeSecurity(exec, imp->contentDocument()) ? " . NativeToJSValue($attribute->signature,  0, $implClassName, $implClassNameForValueConversion, "imp->$implGetterFunctionName()", "castedThis") . " : jsUndefined();\n");
     1561                    push(@implContent, "    return checkNodeSecurity(exec, imp->contentDocument()) ? " . NativeToJSValue($attribute->signature, 0, $implClassName, "imp->$implGetterFunctionName()", "castedThis") . " : jsUndefined();\n");
    15871562                } elsif ($type eq "EventListener") {
    15881563                    $implIncludes{"EventListener.h"} = 1;
     
    16171592
    16181593                    if ($svgListPropertyType) {
    1619                         push(@implContent, "    JSValue result =  " . NativeToJSValue($attribute->signature, 0, $implClassName, "", "castedThis->impl()->$implGetterFunctionName()", "castedThis") . ";\n");
    1620                     } elsif ($svgPropertyOrPodType) {
    1621                         push(@implContent, "    $svgPropertyOrPodType imp(*castedThis->impl());\n") if $podType;
    1622                         push(@implContent, "    $svgPropertyOrPodType& imp = castedThis->impl()->propertyReference();\n") if !$podType;
    1623                         if ($svgPropertyOrPodType eq "float") { # Special case for JSSVGNumber
    1624                             push(@implContent, "    JSValue result =  " . NativeToJSValue($attribute->signature, 0, $implClassName, "", "imp", "castedThis") . ";\n");
     1594                        push(@implContent, "    JSValue result =  " . NativeToJSValue($attribute->signature, 0, $implClassName, "castedThis->impl()->$implGetterFunctionName()", "castedThis") . ";\n");
     1595                    } elsif ($svgPropertyOrListPropertyType) {
     1596                        push(@implContent, "    $svgPropertyOrListPropertyType& imp = castedThis->impl()->propertyReference();\n");
     1597                        if ($svgPropertyOrListPropertyType eq "float") { # Special case for JSSVGNumber
     1598                            push(@implContent, "    JSValue result =  " . NativeToJSValue($attribute->signature, 0, $implClassName, "imp", "castedThis") . ";\n");
    16251599                        } else {
    1626                             push(@implContent, "    JSValue result =  " . NativeToJSValue($attribute->signature, 0, $implClassName, "", "imp.$implGetterFunctionName()", "castedThis") . ";\n");
     1600                            push(@implContent, "    JSValue result =  " . NativeToJSValue($attribute->signature, 0, $implClassName, "imp.$implGetterFunctionName()", "castedThis") . ";\n");
    16271601                        }
    16281602                    } else {
    16291603                        my $getterExpression = "imp->" . $codeGenerator->GetterExpressionPrefix(\%implIncludes, $interfaceName, $attribute) . ")";
    1630                         my $jsType = NativeToJSValue($attribute->signature, 0, $implClassName, $implClassNameForValueConversion, $getterExpression, "castedThis");
     1604                        my $jsType = NativeToJSValue($attribute->signature, 0, $implClassName, $getterExpression, "castedThis");
    16311605                        push(@implContent, "    $implClassName* imp = static_cast<$implClassName*>(castedThis->impl());\n");
    16321606                        if ($codeGenerator->IsSVGAnimatedType($type)) {
    16331607                            push(@implContent, "    RefPtr<$type> obj = $jsType;\n");
    1634 
    1635                             if ($codeGenerator->IsSVGNewStyleAnimatedType($type)) {
    1636                                 push(@implContent, "    JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());\n");
    1637                             } else {
    1638                                 push(@implContent, "    JSValue result =  toJS(exec, castedThis->globalObject(), obj.get(), imp);\n");
    1639                             }
     1608                            push(@implContent, "    JSValue result =  toJS(exec, castedThis->globalObject(), obj.get());\n");
    16401609                        } else {
    16411610                            push(@implContent, "    JSValue result = $jsType;\n");
     
    16481617                } else {
    16491618                    push(@implContent, "    ExceptionCode ec = 0;\n");                   
    1650                     if ($svgPropertyOrPodType) {
    1651                         push(@implContent, "    $svgPropertyOrPodType imp(*castedThis->impl());\n");
    1652                         push(@implContent, "    JSC::JSValue result = " . NativeToJSValue($attribute->signature, 0, $implClassName, "", "imp.$implGetterFunctionName(ec)", "castedThis") . ";\n");
     1619                    if ($svgPropertyOrListPropertyType) {
     1620                        push(@implContent, "    $svgPropertyOrListPropertyType imp(*castedThis->impl());\n");
     1621                        push(@implContent, "    JSC::JSValue result = " . NativeToJSValue($attribute->signature, 0, $implClassName, "imp.$implGetterFunctionName(ec)", "castedThis") . ";\n");
    16531622                    } else {
    16541623                        push(@implContent, "    $implClassName* imp = static_cast<$implClassName*>(castedThis->impl());\n");
    1655                         push(@implContent, "    JSC::JSValue result = " . NativeToJSValue($attribute->signature, 0, $implClassName, $implClassNameForValueConversion, "imp->$implGetterFunctionName(ec)", "castedThis") . ";\n");
     1624                        push(@implContent, "    JSC::JSValue result = " . NativeToJSValue($attribute->signature, 0, $implClassName, "imp->$implGetterFunctionName(ec)", "castedThis") . ";\n");
    16561625                    }
    16571626
     
    18131782
    18141783                            my $nativeValue = JSValueToNative($attribute->signature, "value");
    1815                             if ($svgPropertyOrPodType) {
    1816                                 push(@implContent, "    $svgPropertyOrPodType podImp(*imp);\n") if $podType;
    1817                                 push(@implContent, "    $svgPropertyOrPodType& podImp = imp->propertyReference();\n") if !$podType;
    1818                                 if ($svgPropertyOrPodType eq "float") { # Special case for JSSVGNumber
     1784                            if ($svgPropertyOrListPropertyType) {
     1785                                push(@implContent, "    $svgPropertyOrListPropertyType& podImp = imp->propertyReference();\n");
     1786                                if ($svgPropertyOrListPropertyType eq "float") { # Special case for JSSVGNumber
    18191787                                    push(@implContent, "    podImp = $nativeValue;\n");
    18201788                                } else {
     
    18241792                                    push(@implContent, "    setDOMException(exec, ec);\n") if @{$attribute->setterExceptions};
    18251793                                }
    1826                                 push(@implContent, "    imp->commitChange(podImp, castedThis);\n") if $podType;
    18271794                                if ($svgPropertyType) {
    18281795                                    if (@{$attribute->setterExceptions}) {
     
    19161883            }
    19171884
    1918             # Special case for JSSVGLengthList / JSSVGTransformList / JSSVGPointList / JSSVGNumberList
    1919             # Instead of having JSSVG*Custom.cpp implementations for the SVGList interface for all of these
    1920             # classes, we directly forward the calls to JSSVGPODListCustom, which centralizes the otherwise
    1921             # duplicated code for the JSSVG*List classes mentioned above.
    1922             my $svgPODListType;
    1923             if ($implClassName =~ /SVG.*List/ and !$svgListPropertyType) {
    1924                 $svgPODListType = $implClassName;
    1925                 $svgPODListType =~ s/List$//;
    1926                 $svgPODListType = "" unless $codeGenerator->IsPodType($svgPODListType);
    1927                
    1928                 # Ignore additional (non-SVGList) SVGTransformList methods, that are not handled through JSSVGPODListCustom
    1929                 $svgPODListType = "" if $functionImplementationName =~ /createSVGTransformFromMatrix/;
    1930                 $svgPODListType = "" if $functionImplementationName =~ /consolidate/;
    1931             }
    1932 
    19331885            if ($function->signature->extendedAttributes->{"Custom"} || $function->signature->extendedAttributes->{"JSCCustom"}) {
    19341886                push(@implContent, "    return JSValue::encode(castedThis->" . $functionImplementationName . "(exec));\n");
    1935             } elsif ($svgPODListType) {
    1936                 $implIncludes{"JS${svgPODListType}.h"} = 1;
    1937                 $implIncludes{"JSSVGPODListCustom.h"} = 1;
    1938                 push(@implContent, "    return JSValue::encode(JSSVGPODListCustom::$functionImplementationName<$className, " . GetNativeType($svgPODListType)
    1939                                  . ">(castedThis, exec, to" . $svgPODListType . "));\n");
    19401887            } else {
    19411888                push(@implContent, "    $implType* imp = static_cast<$implType*>(castedThis->impl());\n");
    1942                 push(@implContent, "    $svgPropertyOrPodType podImp(*imp);\n") if $podType;
    1943                 push(@implContent, "    $svgPropertyOrPodType& podImp = imp->propertyReference();\n") if !$podType and $svgPropertyType;
     1889                push(@implContent, "    $svgPropertyOrListPropertyType& podImp = imp->propertyReference();\n") if $svgPropertyType;
    19441890
    19451891                my $numParameters = @{$function->parameters};
     
    19801926                    my $argsIndex = 0;
    19811927                    my $paramIndex = 0;
    1982                     my $functionString = (($svgPropertyOrPodType and !$svgListPropertyType) ? "podImp." : "imp->") . $functionImplementationName . "(";
     1928                    my $functionString = (($svgPropertyOrListPropertyType and !$svgListPropertyType) ? "podImp." : "imp->") . $functionImplementationName . "(";
    19831929                    my $hasOptionalArguments = 0;
    19841930
     
    20251971                            }
    20261972                            push(@implContent, "    if (argsCount <= $argsIndex) {\n");
    2027                             GenerateImplementationFunctionCall($function, $functionString, $paramIndex, "    " x 2, $podType, $svgPropertyType, $implClassName);
     1973                            GenerateImplementationFunctionCall($function, $functionString, $paramIndex, "    " x 2, $svgPropertyType, $implClassName);
    20281974                            push(@implContent, "    }\n\n");
    20291975                        }
     
    21232069
    21242070                    push(@implContent, "\n");
    2125                     GenerateImplementationFunctionCall($function, $functionString, $paramIndex, "    ", $podType, $svgPropertyType, $implClassName);
     2071                    GenerateImplementationFunctionCall($function, $functionString, $paramIndex, "    ", $svgPropertyType, $implClassName);
    21262072                }
    21272073            }
     
    21932139        if ($svgPropertyType) {
    21942140            push(@implContent, "    return getDOMObjectWrapper<$className, $implType>(exec, globalObject, object);\n");
    2195         } elsif ($podType) {
    2196             push(@implContent, "    return getDOMObjectWrapper<$className, $implType>(exec, globalObject, object, context);\n");
    21972141        } elsif (IsSVGTypeNeedingContextParameter($implClassName)) {
    21982142            push(@implContent, "    return getDOMObjectWrapper<$className>(exec, globalObject, object, context);\n");
     
    22042148
    22052149    if ((!$hasParent or $dataNode->extendedAttributes->{"GenerateNativeConverter"}) and !$dataNode->extendedAttributes->{"CustomNativeConverter"}) {
    2206         if ($podType) {
    2207             push(@implContent, "$podType to${interfaceName}(JSC::JSValue value)\n");
    2208             push(@implContent, "{\n");
    2209             push(@implContent, "    return value.inherits(&${className}::s_info) ? ($podType) *static_cast<$className*>(asObject(value))->impl() : $podType()");
    2210         } else {
    2211             push(@implContent, "$implType* to${interfaceName}(JSC::JSValue value)\n");
    2212             push(@implContent, "{\n");
    2213             push(@implContent, "    return value.inherits(&${className}::s_info) ? static_cast<$className*>(asObject(value))->impl() : 0");
    2214         }
    2215 
     2150        push(@implContent, "$implType* to${interfaceName}(JSC::JSValue value)\n");
     2151        push(@implContent, "{\n");
     2152        push(@implContent, "    return value.inherits(&${className}::s_info) ? static_cast<$className*>(asObject(value))->impl() : 0");
    22162153        push(@implContent, ";\n}\n");
    22172154    }
     
    23882325    my $paramIndex = shift;
    23892326    my $indent = shift;
    2390     my $podType = shift;
    23912327    my $svgPropertyType = shift;
    23922328    my $implClassName = shift;
     
    24072343        push(@implContent, $indent . "$functionString;\n");
    24082344        push(@implContent, $indent . "setDOMException(exec, ec);\n") if @{$function->raisesExceptions};
    2409         push(@implContent, $indent . "imp->commitChange(podImp, castedThis);\n") if $podType;
    24102345
    24112346        if ($svgPropertyType) {
     
    24202355        push(@implContent, $indent . "return JSValue::encode(jsUndefined());\n");
    24212356    } else {
    2422         push(@implContent, "\n" . $indent . "JSC::JSValue result = " . NativeToJSValue($function->signature, 1, $implClassName, "", $functionString, "castedThis") . ";\n");
     2357        push(@implContent, "\n" . $indent . "JSC::JSValue result = " . NativeToJSValue($function->signature, 1, $implClassName, $functionString, "castedThis") . ";\n");
    24232358        push(@implContent, $indent . "setDOMException(exec, ec);\n") if @{$function->raisesExceptions};
    24242359
     
    24272362            push(@implContent, $indent . "if (exec->hadException())\n");
    24282363            push(@implContent, $indent . "    return JSValue::encode(jsUndefined());\n");
    2429         }
    2430 
    2431         if ($podType and not $function->signature->extendedAttributes->{"Immutable"}) {
    2432             # Immutable methods do not commit changes back to the instance, thus producing
    2433             # a new instance rather than mutating existing one.
    2434             push(@implContent, $indent . "imp->commitChange(podImp, castedThis);\n");
    24352364        }
    24362365
     
    24592388    "SerializedScriptValue" => "RefPtr<SerializedScriptValue>",
    24602389    "IDBKey" => "RefPtr<IDBKey>",
    2461     "SVGMatrix" => "AffineTransform",
    24622390    "SVGPaintType" => "SVGPaint::SVGPaintType",
    2463     "SVGTransform" => "SVGTransform",
    24642391    "boolean" => "bool",
    24652392    "double" => "double",
     
    25092436        $headerIncludes{"$svgWrappedNativeType.h"} = 1;
    25102437        $headerIncludes{"SVGAnimatedListPropertyTearOff.h"} = 1;
     2438    } elsif ($svgNativeType =~ /SVGTransformListPropertyTearOff/) {
     2439        $svgListPropertyType = $svgWrappedNativeType;
     2440        $headerIncludes{"$svgWrappedNativeType.h"} = 1;
     2441        $headerIncludes{"SVGAnimatedListPropertyTearOff.h"} = 1;
     2442        $headerIncludes{"SVGTransformListPropertyTearOff.h"} = 1;
    25112443    }
    25122444
     
    25732505    my $inFunctionCall = shift;
    25742506    my $implClassName = shift;
    2575     my $implClassNameForValueConversion = shift;
    25762507    my $value = shift;
    25772508    my $thisValue = shift;
     
    26072538   
    26082539    my $globalObject = "$thisValue->globalObject()";
    2609     if ($codeGenerator->IsPodType($type)) {
    2610         $implIncludes{"JS$type.h"} = 1;
    2611 
    2612         my $nativeType = GetNativeType($type);
    2613 
    2614         my $getter = $value;
    2615         $getter =~ s/imp->//;
    2616         $getter =~ s/\(\)//;
    2617 
    2618         my $setter = "set" . $codeGenerator->WK_ucfirst($getter);
    2619 
    2620         # Function calls will never return 'modifyable' POD types (ie. SVGRect getBBox()) - no need to keep track changes to the returned SVGRect
    2621         if ($inFunctionCall eq 0
    2622             and not $codeGenerator->IsSVGAnimatedType($implClassName)
    2623             and $codeGenerator->IsPodTypeWithWriteableProperties($type)
    2624             and not defined $signature->extendedAttributes->{"Immutable"}) {
    2625             if ($codeGenerator->IsPodType($implClassName)) {
    2626                 return "toJS(exec, $globalObject, JSSVGStaticPODTypeWrapperWithPODTypeParent<$nativeType, $implClassName>::create($value, $thisValue->impl()).get(), JSSVGContextCache::svgContextForDOMObject(castedThis))";
    2627             } else {
    2628                 return "toJS(exec, $globalObject, JSSVGStaticPODTypeWrapperWithParent<$nativeType, $implClassName>::create(imp, &${implClassName}::$getter, &${implClassName}::$setter).get(), imp)";
    2629             }
    2630         }
    2631 
    2632         if ($implClassNameForValueConversion eq "") {
    2633             return "toJS(exec, $globalObject, JSSVGStaticPODTypeWrapper<$nativeType>::create($value).get(), 0 /* no context on purpose */)";
    2634         } else {
    2635             return "toJS(exec, $globalObject, JSSVGDynamicPODTypeWrapperCache<$nativeType, $implClassNameForValueConversion>::lookupOrCreateWrapper(imp, &${implClassNameForValueConversion}::$getter, &${implClassNameForValueConversion}::$setter).get(), JSSVGContextCache::svgContextForDOMObject(castedThis));"
    2636         }
    2637     }
    26382540
    26392541    if ($type eq "CSSStyleDeclaration") {
     
    26762578    }
    26772579
    2678     if ($codeGenerator->IsSVGNewStyleAnimatedType($implClassName)) {
     2580    if ($codeGenerator->IsSVGAnimatedType($implClassName)) {
    26792581        # Convert from abstract SVGProperty to real type, so the right toJS() method can be invoked.
    26802582        $value = "static_cast<" . GetNativeType($type) . ">($value)";
     
    26822584        my $tearOffType = $codeGenerator->GetSVGTypeNeedingTearOff($type);
    26832585        if ($codeGenerator->IsSVGTypeWithWritablePropertiesNeedingTearOff($type) and $inFunctionCall eq 0 and not defined $signature->extendedAttributes->{"Immutable"}) {
    2684             $tearOffType =~ s/SVGPropertyTearOff</SVGStaticPropertyTearOff<$implClassName, /;
    2685             $implIncludes{"SVGStaticPropertyTearOff.h"} = 1;
    2686 
    26872586            my $getter = $value;
     2587            $getter =~ s/imp\.//;
    26882588            $getter =~ s/imp->//;
    26892589            $getter =~ s/\(\)//;
    2690             my $updater = "update" . $codeGenerator->WK_ucfirst($getter);
    2691             $value = "${tearOffType}::create(imp, $value, &${implClassName}::$updater)";
     2590            my $updateMethod = "&${implClassName}::update" . $codeGenerator->WK_ucfirst($getter);
     2591
     2592            my $selfIsTearOffType = $codeGenerator->IsSVGTypeNeedingTearOff($implClassName);
     2593            if ($selfIsTearOffType) {
     2594                $implIncludes{"SVGStaticPropertyWithParentTearOff.h"} = 1;
     2595                $tearOffType =~ s/SVGPropertyTearOff</SVGStaticPropertyWithParentTearOff<$implClassName, /;
     2596
     2597                if ($value =~ /matrix/ and $implClassName eq "SVGTransform") {
     2598                    # SVGTransform offers a matrix() method for internal usage that returns an AffineTransform
     2599                    # and a svgMatrix() method returning a SVGMatrix, used for the bindings.
     2600                    $value =~ s/matrix/svgMatrix/;
     2601                }
     2602
     2603                $value = "${tearOffType}::create(castedThis->impl(), $value, $updateMethod)";
     2604            } else {
     2605                $implIncludes{"SVGStaticPropertyTearOff.h"} = 1;
     2606                $tearOffType =~ s/SVGPropertyTearOff</SVGStaticPropertyTearOff<$implClassName, /;
     2607                $value = "${tearOffType}::create(imp, $value, $updateMethod)";
     2608            }
    26922609        } elsif ($tearOffType =~ /SVGStaticListPropertyTearOff/) {
    26932610            my $extraImp = "GetOwnerElementForType<$implClassName, IsDerivedFromSVGElement<$implClassName>::value>::ownerElement(imp), ";
  • trunk/WebCore/bindings/scripts/CodeGeneratorObjC.pm

    r71512 r71802  
    493493    if ($codeGenerator->IsStringType($type) || IsNativeObjCType($type)) {
    494494        push(@attributes, "copy");
    495     } elsif ($codeGenerator->IsPodType($type) || $codeGenerator->IsSVGAnimatedType($type)) {
     495    } elsif ($codeGenerator->IsSVGAnimatedType($type)) {
    496496        push(@attributes, "retain");
    497497    } elsif (!$codeGenerator->IsStringType($type) && !$codeGenerator->IsPrimitiveType($type) && $type ne "DOMTimeStamp" && $type ne "CompareHow" && $type ne "SVGPaintType") {
     
    588588    }
    589589
    590     if ($codeGenerator->IsSVGNewStyleAnimatedType($type)) {
     590    if ($codeGenerator->IsSVGAnimatedType($type)) {
    591591        $implIncludes{"${type}.h"} = 1;
    592592        $implIncludes{"DOM${type}Internal.h"} = 1;
    593         return;
    594     }
    595 
    596     if ($codeGenerator->IsSVGAnimatedType($type)) {
    597         $implIncludes{"DeprecatedSVGAnimatedTemplate.h"} = 1;
    598         $implIncludes{"DOM${type}Internal.h"} = 1;
    599         return;
    600     }
    601 
    602     if ($type eq "SVGMatrix") {
    603         $implIncludes{"AffineTransform.h"} = 1;
    604         $implIncludes{"DOMSVGMatrixInternal.h"} = 1;
    605         $implIncludes{"SVGException.h"} = 1;
    606593        return;
    607594    }
     
    682669        }
    683670    } elsif ($svgNativeType =~ /SVGListPropertyTearOff/ or $svgNativeType =~ /SVGStaticListPropertyTearOff/) {
     671        $svgListPropertyType = "WebCore::$svgWrappedNativeType";
     672        $svgListPropertyType =~ s/</\<WebCore::/;
     673    } elsif ($svgNativeType =~ /SVGTransformListPropertyTearOff/) {
    684674        $svgListPropertyType = "WebCore::$svgWrappedNativeType";
    685675        $svgListPropertyType =~ s/</\<WebCore::/;
     
    1000990    unless ($isProtocol) {
    1001991        # Generate internal interfaces
    1002         my $podType = $dataNode->extendedAttributes->{"PODType"};
    1003         my $podTypeWithNamespace;
    1004992        my $implClassName = GetImplClassName($interfaceName);
    1005993        my $implClassNameWithNamespace = "WebCore::" . $implClassName;
     
    1009997        $implType = $svgNativeType if $svgNativeType;
    1010998
    1011         if ($podType) {
    1012             $podTypeWithNamespace = ($podType eq "float") ? "$podType" : "WebCore::$podType";
    1013         }
    1014  
    1015999        # Generate interface definitions.
    10161000        @internalHeaderContent = split("\r", $implementationLicenseTemplate);
     
    10181002        push(@internalHeaderContent, "\n#import <WebCore/$className.h>\n\n");
    10191003        push(@internalHeaderContent, "#import <WebCore/SVGAnimatedPropertyTearOff.h>\n\n") if $svgPropertyType;
    1020         push(@internalHeaderContent, "#import <WebCore/SVGAnimatedListPropertyTearOff.h>\n\n") if $svgListPropertyType;
     1004        if ($svgListPropertyType) {
     1005            push(@internalHeaderContent, "#import <WebCore/SVGAnimatedListPropertyTearOff.h>\n\n");
     1006            push(@internalHeaderContent, "#import <WebCore/SVGTransformListPropertyTearOff.h>\n\n") if $svgListPropertyType =~ /SVGTransformList/;
     1007        }
    10211008        push(@internalHeaderContent, $interfaceAvailabilityVersionCheck) if length $interfaceAvailabilityVersion;
    10221009
     
    10271014        my $startedNamespace = 0;
    10281015
    1029         if ($codeGenerator->IsSVGNewStyleAnimatedType($interfaceName)) {
     1016        if ($codeGenerator->IsSVGAnimatedType($interfaceName)) {
    10301017            push(@internalHeaderContent, "#import <WebCore/$implClassName.h>\n\n");
    1031         } elsif ($codeGenerator->IsSVGAnimatedType($interfaceName)) {
    1032             push(@internalHeaderContent, "#import <WebCore/DeprecatedSVGAnimatedTemplate.h>\n\n");
    10331018        } else {
    10341019            push(@internalHeaderContent, "namespace WebCore {\n");
    10351020            $startedNamespace = 1;
    1036             if ($podType and $podType ne "float") {
    1037                 push(@internalHeaderContent, "    class $podType;\n");
    1038             } elsif ($interfaceName eq "Node") {
     1021            if ($interfaceName eq "Node") {
    10391022                push(@internalHeaderContent, "    class EventTarget;\n    class Node;\n");
    10401023            } else {
     
    10441027        }
    10451028
    1046         if ($podType) {
    1047             push(@internalHeaderContent, "$podTypeWithNamespace core($className *);\n");
    1048             push(@internalHeaderContent, "$className *kit($podTypeWithNamespace);\n");
    1049         } else {
    1050             push(@internalHeaderContent, "$implType* core($className *);\n");
    1051             push(@internalHeaderContent, "$className *kit($implType*);\n");
    1052         }
     1029        push(@internalHeaderContent, "$implType* core($className *);\n");
     1030        push(@internalHeaderContent, "$className *kit($implType*);\n");
    10531031
    10541032        if ($dataNode->extendedAttributes->{Polymorphic}) {
     
    10851063    my $numAttributes = @{$dataNode->attributes};
    10861064    my $numFunctions = @{$dataNode->functions};
    1087 
    1088     my $podType = $dataNode->extendedAttributes->{"PODType"};
    1089     my $podTypeWithNamespace;
    10901065    my $implType = $implClassNameWithNamespace;
    10911066
    10921067    my ($svgPropertyType, $svgListPropertyType, $svgNativeType) = GetSVGPropertyTypes($implClassName);
    10931068    $implType = $svgNativeType if $svgNativeType;
    1094 
    1095     if ($podType) {
    1096         $podTypeWithNamespace = ($podType eq "float") ? "$podType" : "WebCore::$podType";
    1097     }
    10981069
    10991070    # - Add default header template.
     
    11251096    $implIncludes{"DOMSVGPathSegInternal.h"} = 1 if $interfaceName =~ /^SVGPathSeg.+/;
    11261097
    1127     if ($codeGenerator->IsSVGAnimatedType($interfaceName) and !$codeGenerator->IsSVGNewStyleAnimatedType($interfaceName)) {
    1128         $implIncludes{"DeprecatedSVGAnimatedTemplate.h"} = 1;
    1129     } elsif ($interfaceName =~ /(\w+)(Abs|Rel)$/) {
     1098    if ($interfaceName =~ /(\w+)(Abs|Rel)$/) {
    11301099        $implIncludes{"$1.h"} = 1;
    11311100    } else {
    1132         if (!$podType) {
    1133             if (!$codeGenerator->AvoidInclusionOfType($implClassName)) {
    1134                 $implIncludes{"$implClassName.h"} = 1 ;
    1135             } elsif ($codeGenerator->IsSVGTypeNeedingTearOff($implClassName)) {
    1136                 my $includeType = $codeGenerator->GetSVGWrappedTypeNeedingTearOff($implClassName);
    1137                 $implIncludes{"${includeType}.h"} = 1;
    1138             }
    1139         } else {
    1140             $implIncludes{"$podType.h"} = 1 unless $podType eq "float";
     1101        if (!$codeGenerator->AvoidInclusionOfType($implClassName)) {
     1102            $implIncludes{"$implClassName.h"} = 1 ;
     1103        } elsif ($codeGenerator->IsSVGTypeNeedingTearOff($implClassName)) {
     1104            my $includeType = $codeGenerator->GetSVGWrappedTypeNeedingTearOff($implClassName);
     1105            $implIncludes{"${includeType}.h"} = 1;
    11411106        }
    11421107    }
     
    11471112
    11481113    # add implementation accessor
    1149     if ($podType) {
    1150         push(@implContent, "#define IMPL reinterpret_cast<$podTypeWithNamespace*>(_internal)\n\n");
    1151     } elsif ($parentImplClassName eq "Object") {
     1114    if ($parentImplClassName eq "Object") {
    11521115        push(@implContent, "#define IMPL reinterpret_cast<$implType*>(_internal)\n\n");
    11531116    } else {
     
    11721135            push(@implContent, "        IMPL->deref();\n");
    11731136            push(@implContent, "    };\n");
    1174         } elsif ($podType) {
    1175             push(@implContent, "    delete IMPL;\n");
    11761137        } else {
    11771138            push(@implContent, "    if (_internal)\n");
     
    11881149            push(@implContent, "        IMPL->deref();\n");
    11891150            push(@implContent, "    };\n");
    1190         } elsif ($podType) {
    1191             push(@implContent, "    delete IMPL;\n");
    11921151        } else {
    11931152            push(@implContent, "    if (_internal)\n");
     
    12861245                $getterContentHead = "WTF::String::number(" . $getterContentHead;
    12871246                $getterContentTail .= ")";
    1288             } elsif ($codeGenerator->IsPodType($idlType) or $idlType eq "Date") {
     1247            } elsif ($idlType eq "Date") {
    12891248                $getterContentHead = "kit($getterContentHead";
    12901249                $getterContentTail .= ")";
     
    12971256                    $getterContentHead = "IMPL->propertyReference().$getterContentHead";
    12981257                }
    1299             } elsif ($codeGenerator->IsSVGNewStyleAnimatedType($implClassName) and $codeGenerator->IsSVGTypeNeedingTearOff($idlType)) {
     1258
     1259                if ($codeGenerator->IsSVGTypeWithWritablePropertiesNeedingTearOff($idlType) and not defined $attribute->signature->extendedAttributes->{"Immutable"}) {
     1260                    my $getter = $getterContentHead;
     1261                    $getter =~ s/\(\)//;
     1262                   
     1263                    my $tearOffType = GetSVGTypeWithNamespace($idlType);
     1264                    my $selfIsTearOffType = $codeGenerator->IsSVGTypeNeedingTearOff($implClassName);
     1265                    if ($selfIsTearOffType) {
     1266                        $implIncludes{"SVGStaticPropertyWithParentTearOff.h"} = 1;
     1267                        $tearOffType =~ s/SVGPropertyTearOff</SVGStaticPropertyWithParentTearOff<$implClassNameWithNamespace, /;
     1268
     1269                        my $getter = $getterExpressionPrefix;
     1270                        $getter =~ s/IMPL->//;
     1271                        $getter =~ s/\(//;
     1272                        my $updateMethod = "&${implClassNameWithNamespace}::update" . $codeGenerator->WK_ucfirst($getter);
     1273
     1274                        if ($getterContentHead =~ /matrix/ and $implClassName eq "SVGTransform") {
     1275                            # SVGTransform offers a matrix() method for internal usage that returns an AffineTransform
     1276                            # and a svgMatrix() method returning a SVGMatrix, used for the bindings.
     1277                            $getterContentHead =~ s/matrix/svgMatrix/;
     1278                        }
     1279
     1280                        $getterContentHead = "${tearOffType}::create(IMPL, $getterContentHead$getterContentTail, $updateMethod)";
     1281
     1282                        $getterContentHead = "kit(WTF::getPtr($getterContentHead";
     1283                        $getterContentTail = "))";
     1284                    }
     1285                }
     1286            } elsif ($codeGenerator->IsSVGAnimatedType($implClassName) and $codeGenerator->IsSVGTypeNeedingTearOff($idlType)) {
    13001287                my $idlTypeWithNamespace = GetSVGTypeWithNamespace($idlType);
    13011288                $getterContentHead = "kit(static_cast<$idlTypeWithNamespace*>($getterContentHead)";
     
    13211308                        $getter =~ s/IMPL->//;
    13221309                        $getter =~ s/\(//;
    1323                         my $updater = "update" . $codeGenerator->WK_ucfirst($getter);
    1324                         $getterContentHead = "kit(WTF::getPtr(${idlTypeWithNamespace}::create(IMPL, $getterContentHead$getterContentTail, &${implClassNameWithNamespace}::$updater";
     1310                        my $updateMethod = "&${implClassNameWithNamespace}::update" . $codeGenerator->WK_ucfirst($getter);
     1311                        $getterContentHead = "kit(WTF::getPtr(${idlTypeWithNamespace}::create(IMPL, $getterContentHead$getterContentTail, $updateMethod";
    13251312                        $getterContentTail .= "))";
    13261313                    } elsif ($idlTypeWithNamespace =~ /SVGStaticListPropertyTearOff/) {
     
    14301417                    $getterContentHead = "$getterExpressionPrefix";
    14311418                    push(@implContent, "    IMPL->$coreSetterName($arg);\n");
    1432                 } elsif ($podType) {
    1433                     push(@implContent, "    IMPL->$coreSetterName($arg);\n");
    14341419                } else {
    14351420                    my $setterExpressionPrefix = $codeGenerator->SetterExpressionPrefix(\%implIncludes, $interfaceName, $attribute);
     
    15481533
    15491534            # FIXME! We need [Custom] support for ObjC, to move these hacks into DOMSVGLength/MatrixCustom.mm
    1550             my $svgMatrixRotateFromVector = ($podType and $podType eq "AffineTransform" and $functionName eq "rotateFromVector");
    1551             my $svgMatrixInverse = ($podType and $podType eq "AffineTransform" and $functionName eq "inverse");
    15521535            my $svgLengthConvertToSpecifiedUnits = ($svgPropertyType and $svgPropertyType eq "WebCore::SVGLength" and $functionName eq "convertToSpecifiedUnits");
    15531536
    15541537            push(@parameterNames, "IMPL->contextElement()") if $svgLengthConvertToSpecifiedUnits;
    1555             push(@parameterNames, "ec") if $raisesExceptions and !($svgMatrixRotateFromVector || $svgMatrixInverse);
     1538            push(@parameterNames, "ec") if $raisesExceptions;
    15561539
    15571540            # Handle arguments that are 'SVGProperty' based (SVGAngle/SVGLength). We need to convert from SVGPropertyTearOff<Type>* to Type,
     
    15621545
    15631546                my $paramName = $param->name;
     1547
     1548                # make a new parameter name if the original conflicts with a property name
     1549                $paramName = "in" . ucfirst($paramName) if $attributeNames{$paramName};
     1550
    15641551                my $idlType = $codeGenerator->StripModule($param->type);
    15651552                next if not $codeGenerator->IsSVGTypeNeedingTearOff($idlType) or $implClassName =~ /List$/;
     
    15921579            }
    15931580
    1594             if ($svgMatrixRotateFromVector) {
    1595                 # Special case with rotateFromVector & SVGMatrix       
    1596                 push(@functionContent, "    $exceptionInit\n");
    1597                 push(@functionContent, "    if (x == 0.0 || y == 0.0)\n");
    1598                 push(@functionContent, "        ec = WebCore::SVGException::SVG_INVALID_VALUE_ERR;\n");
    1599                 push(@functionContent, "    $exceptionRaiseOnError\n");
    1600                 push(@functionContent, "    return kit($content);\n");
    1601             } elsif ($svgMatrixInverse) {
    1602                 # Special case with inverse & SVGMatrix
    1603                 push(@functionContent, "    $exceptionInit\n");
    1604                 push(@functionContent, "    if (!$caller->isInvertible())\n");
    1605                 push(@functionContent, "        ec = WebCore::SVGException::SVG_MATRIX_NOT_INVERTABLE;\n");
    1606                 push(@functionContent, "    $exceptionRaiseOnError\n");
    1607                 push(@functionContent, "    return kit($content);\n");
    1608             } elsif ($returnType eq "void") {
     1581            if ($returnType eq "void") {
    16091582                # Special case 'void' return type.
    16101583                if ($raisesExceptions) {
     
    16181591                } else {
    16191592                    push(@functionContent, "    $content;\n");
    1620                     push(@functionContent, "    IMPL->commitChange()\n") if $svgPropertyType;
     1593                    push(@functionContent, "    IMPL->commitChange();\n") if $svgPropertyType;
    16211594                }
    16221595            } elsif (defined $needsCustom{"NodeToReturn"}) {
     
    16421615                        my $idlTypeWithNamespace = GetSVGTypeWithNamespace($function->signature->type);
    16431616                        $content = "kit(WTF::getPtr(${idlTypeWithNamespace}::create($content)))";
    1644                     } elsif ($codeGenerator->IsPodType($function->signature->type)) {
    1645                         $content = "kit($content)";
    16461617                    } else {
    16471618                        $content = "kit(WTF::getPtr($content))";
     
    16941665
    16951666    # Generate internal interfaces
    1696     if ($podType) {
    1697         push(@implContent, "\n$podTypeWithNamespace core($className *wrapper)\n");
    1698         push(@implContent, "{\n");
    1699         push(@implContent, "    return wrapper ? *reinterpret_cast<$podTypeWithNamespace*>(wrapper->_internal) : $podTypeWithNamespace();\n");
    1700         push(@implContent, "}\n\n");
    1701     } else {
    1702         push(@implContent, "\n$implType* core($className *wrapper)\n");
    1703         push(@implContent, "{\n");
    1704         push(@implContent, "    return wrapper ? reinterpret_cast<$implType*>(wrapper->_internal) : 0;\n");
    1705         push(@implContent, "}\n\n");
    1706     }
    1707 
    1708     if ($podType) {
    1709         # FIXME: Implement caching.
    1710         push(@implContent, "$className *kit($podTypeWithNamespace value)\n");
    1711         push(@implContent, "{\n");
    1712         push(@implContent, "    $assertMainThread;\n");
    1713         push(@implContent, "    $className *wrapper = [[$className alloc] _init];\n");
    1714         push(@implContent, "    wrapper->_internal = reinterpret_cast<DOMObjectInternal*>(new $podTypeWithNamespace(value));\n");
    1715         push(@implContent, "    return [wrapper autorelease];\n");
    1716         push(@implContent, "}\n");
    1717     } elsif ($parentImplClassName eq "Object") {       
     1667    push(@implContent, "\n$implType* core($className *wrapper)\n");
     1668    push(@implContent, "{\n");
     1669    push(@implContent, "    return wrapper ? reinterpret_cast<$implType*>(wrapper->_internal) : 0;\n");
     1670    push(@implContent, "}\n\n");
     1671
     1672    if ($parentImplClassName eq "Object") {       
    17181673        push(@implContent, "$className *kit($implType* value)\n");
    17191674        push(@implContent, "{\n");
  • trunk/WebCore/bindings/scripts/CodeGeneratorV8.pm

    r71711 r71802  
    8888}
    8989
    90 # Workaround for V8 bindings difference where RGBColor is not a POD type.
    91 # FIXME: This method will go away once all SVG animated properties are converted to the new scheme.
    92 sub IsPodType
    93 {
    94     my $type = shift;
    95     return $codeGenerator->IsPodType($type);
    96 }
    97 
    9890# Params: 'domClass' struct
    9991sub GenerateInterface
     
    168160        $implIncludes{"wtf/text/AtomicString.h"} = 1;
    169161    }
    170 }
    171 
    172 sub AddIncludesForSVGAnimatedType
    173 {
    174     my $type = shift;
    175     return if $codeGenerator->IsSVGNewStyleAnimatedType($type);
    176 
    177     $type =~ s/SVGAnimated//;
    178 
    179     if ($type eq "Point" or $type eq "Rect") {
    180         $implIncludes{"Float$type.h"} = 1;
    181     } elsif ($type eq "String") {
    182         $implIncludes{"PlatformString.h"} = 1;
    183     }
    184 
    185     $implIncludes{"DeprecatedSVGAnimatedTemplate.h"} = 1;
    186162}
    187163
     
    227203        $svgListPropertyType = $svgWrappedNativeType;
    228204        $implIncludes{"SVGAnimatedListPropertyTearOff.h"} = 1;
    229     }
    230 
    231     $svgPropertyType = "SVGPoint" if $svgPropertyType eq "FloatPoint";
     205    } elsif ($svgNativeType =~ /SVGTransformListPropertyTearOff/) {
     206        $svgListPropertyType = $svgWrappedNativeType;
     207        $implIncludes{"SVGAnimatedListPropertyTearOff.h"} = 1;
     208        $implIncludes{"SVGTransformListPropertyTearOff.h"} = 1;
     209    }
     210
     211    if ($svgPropertyType) {
     212        $svgPropertyType = "SVGPoint" if $svgPropertyType eq "FloatPoint";
     213    }
     214
    232215    return ($svgPropertyType, $svgListPropertyType, $svgNativeType);
    233216}
     
    250233    # - Add default header template
    251234    push(@headerContent, GenerateHeaderContentHeader($dataNode));
    252     my $podType = $dataNode->extendedAttributes->{"PODType"};
    253235
    254236    my %headerInclues = ();
    255     $headerIncludes{"$podType.h"} = 1 if $podType and ($podType ne "double" and $podType ne "float" and $podType ne "RGBA32");
    256237    $headerIncludes{"wtf/text/StringHash.h"} = 1;
    257238    $headerIncludes{"WrapperTypeInfo.h"} = 1;
     
    271252   
    272253    push(@headerContent, "\nnamespace WebCore {\n");
    273     push(@headerContent, "\ntemplate<typename PODType> class V8SVGPODTypeWrapper;\n") if $podType;
    274254    push(@headerContent, "\ntemplate<typename PropertyType> class SVGPropertyTearOff;\n") if $svgPropertyType;
    275255    if ($svgListPropertyType) {
     
    479459    }
    480460    return "" if ($codeGenerator->AvoidInclusionOfType($className));
    481     return "DeprecatedSVGAnimatedTemplate.h" if $codeGenerator->IsSVGAnimatedType($className) and !$codeGenerator->IsSVGNewStyleAnimatedType($className);
    482461    return "${className}.h";
    483462}
     
    705684
    706685    my $attrType = GetTypeFromSignature($attribute->signature);
    707     my $attrIsPodType = IsPodType($attrType);
    708686
    709687    my $nativeType = GetNativeTypeFromSignature($attribute->signature, -1);
    710     my $isPodType = IsPodType($implClassName);
    711688    my $skipContext = 0;
    712 
    713     if ($isPodType) {
    714         $implClassName = GetNativeType($implClassName);
    715         $implIncludes{"V8SVGPODTypeWrapper.h"} = 1;
    716     }
    717689
    718690    # Special case: SVGZoomEvent's attributes are all read-only
    719691    if ($implClassName eq "SVGZoomEvent") {
    720         $attrIsPodType = 0;
    721692        $skipContext = 1;
    722     }
    723 
    724     # Special case for SVGColor
    725     if (($implClassName eq "SVGColor") and ($attrName eq "rgbColor")) {
    726         $attrIsPodType = 0;
    727693    }
    728694
     
    740706END
    741707
    742     if ($isPodType) {
    743         push(@implContentDecls, <<END);
    744     V8SVGPODTypeWrapper<$implClassName>* impWrapper = V8SVGPODTypeWrapper<$implClassName>::toNative(info.Holder());
    745     $implClassName impInstance = *impWrapper;
    746 END
    747         if ($getterStringUsesImp) {
    748             push(@implContentDecls, <<END);
    749     $implClassName* imp = &impInstance;
    750 END
    751         }
    752     } elsif ($svgNativeType) {
     708    if ($svgNativeType) {
    753709        my $svgWrappedNativeType = $codeGenerator->GetSVGWrappedTypeNeedingTearOff($implClassName);
    754         if ($svgWrappedNativeType =~ /List$/) {
     710        if ($svgWrappedNativeType =~ /List/) {
    755711            push(@implContentDecls, <<END);
    756712    $svgNativeType* imp = V8${implClassName}::toNative(info.Holder());
     
    809765    }
    810766
    811     my $useExceptions = 1 if @{$attribute->getterExceptions} and !($isPodType);
     767    my $useExceptions = 1 if @{$attribute->getterExceptions};
    812768    if ($useExceptions) {
    813769        $implIncludes{"ExceptionCode.h"} = 1;
     
    833789    my $wrapper;
    834790
    835     if ($attrIsPodType) {
    836         $implIncludes{"V8SVGPODTypeWrapper.h"} = 1;
    837 
    838         my $getter = $getterString;
    839         $getter =~ s/imp->//;
    840         $getter =~ s/\(\)//;
    841         my $setter = "set" . $codeGenerator->WK_ucfirst($getter);
    842 
    843         my $implClassIsAnimatedType = $codeGenerator->IsSVGAnimatedType($implClassName);
    844         if (not $implClassIsAnimatedType and $codeGenerator->IsPodTypeWithWriteableProperties($attrType) and not defined $attribute->signature->extendedAttributes->{"Immutable"}) {
    845             if (IsPodType($implClassName)) {
    846                 my $wrapper = "V8SVGStaticPODTypeWrapperWithPODTypeParent<$nativeType, $implClassName>::create($getterString, impWrapper)";
    847                 push(@implContentDecls, "    RefPtr<V8SVGStaticPODTypeWrapperWithPODTypeParent<$nativeType, $implClassName> > wrapper = $wrapper;\n");
    848             } else {
    849                 my $wrapper = "V8SVGStaticPODTypeWrapperWithParent<$nativeType, $implClassName>::create(imp, &${implClassName}::$getter, &${implClassName}::$setter)";
    850                 push(@implContentDecls, "    RefPtr<V8SVGStaticPODTypeWrapperWithParent<$nativeType, $implClassName> > wrapper = $wrapper;\n");
    851             }
     791        if ($attribute->signature->type eq "EventListener" && $dataNode->name eq "DOMWindow") {
     792        push(@implContentDecls, "    if (!imp->document())\n");
     793        push(@implContentDecls, "        return v8::Handle<v8::Value>();\n");
     794    }
     795
     796    if ($useExceptions) {
     797        if ($nativeType =~ /^V8Parameter/) {
     798          push(@implContentDecls, "    " . ConvertToV8Parameter($attribute->signature, $nativeType, "v", $getterString) . ";\n");
    852799        } else {
    853             if ($implClassIsAnimatedType) {
    854                 # We can't hash member function pointers, so instead generate
    855                 # some hashing material based on the names of the methods.
    856                 my $hashhex = substr(Digest::MD5::md5_hex("${implClassName}::$getter ${implClassName}::$setter)"), 0, 8);
    857                 my $wrapper = "V8SVGDynamicPODTypeWrapperCache<$nativeType, $implClassName>::lookupOrCreateWrapper(imp, &${implClassName}::$getter, &${implClassName}::$setter, 0x$hashhex)";
    858                 push(@implContentDecls, "    RefPtr<V8SVGPODTypeWrapper<" . $nativeType . "> > wrapper = $wrapper;\n");
    859             } else {
    860                 my $wrapper = GenerateSVGStaticPodTypeWrapper($returnType, $getterString);
    861                 push(@implContentDecls, "    RefPtr<V8SVGStaticPODTypeWrapper<" . $nativeType . "> > wrapper = $wrapper;\n");
    862             }
    863         }
    864 
     800          push(@implContentDecls, "    $nativeType v = $getterString;\n");
     801        }
     802        push(@implContentDecls, GenerateSetDOMException("    "));
     803        $result = "v";
     804        $result .= ".release()" if (IsRefPtrType($returnType));
    865805    } else {
    866         if ($attribute->signature->type eq "EventListener" && $dataNode->name eq "DOMWindow") {
    867             push(@implContentDecls, "    if (!imp->document())\n");
    868             push(@implContentDecls, "        return v8::Handle<v8::Value>();\n");
    869         }
    870 
    871         if ($useExceptions) {
    872             if ($nativeType =~ /^V8Parameter/) {
    873               push(@implContentDecls, "    " . ConvertToV8Parameter($attribute->signature, $nativeType, "v", $getterString) . ";\n");
    874             } else {
    875               push(@implContentDecls, "    $nativeType v = $getterString;\n");
    876             }
    877             push(@implContentDecls, GenerateSetDOMException("    "));
    878             $result = "v";
    879             $result .= ".release()" if (IsRefPtrType($returnType));
     806        # Can inline the function call into the return statement to avoid overhead of using a Ref<> temporary
     807        $result = $getterString;
     808    }
     809 
     810    # Special case for readonly or Replaceable attributes (with a few exceptions). This attempts to ensure that JS wrappers don't get
     811    # garbage-collected prematurely when their lifetime is strongly tied to their owner. We accomplish this by inserting a reference to
     812    # the newly created wrapper into an internal field of the holder object.
     813    if (!IsNodeSubType($dataNode) && $attrName ne "self" && (IsWrapperType($returnType) && ($attribute->type =~ /^readonly/ || $attribute->signature->extendedAttributes->{"Replaceable"})
     814        && $returnType ne "EventTarget" && $returnType ne "SerializedScriptValue" && $returnType ne "DOMWindow"
     815        && $returnType !~ /SVG/ && $returnType !~ /HTML/ && !IsDOMNodeType($returnType))) {
     816        AddIncludesForType($returnType);
     817        my $domMapFunction = GetDomMapFunction(0, $returnType);
     818        # Check for a wrapper in the wrapper cache. If there is one, we know that a hidden reference has already
     819        # been created. If we don't find a wrapper, we create both a wrapper and a hidden reference.
     820        push(@implContentDecls, "    RefPtr<$returnType> result = ${getterString};\n");
     821        push(@implContentDecls, "    v8::Handle<v8::Value> wrapper = result.get() ? ${domMapFunction}.get(result.get()) : v8::Handle<v8::Value>();\n");
     822        push(@implContentDecls, "    if (wrapper.IsEmpty()) {\n");
     823        push(@implContentDecls, "        wrapper = toV8(result.get());\n");
     824        push(@implContentDecls, "        if (!wrapper.IsEmpty())\n");
     825        if ($dataNode->name eq "DOMWindow") {
     826            push(@implContentDecls, "            V8DOMWrapper::setHiddenWindowReference(imp->frame(), wrapper);\n");
    880827        } else {
    881             # Can inline the function call into the return statement to avoid overhead of using a Ref<> temporary
    882             $result = $getterString;
    883         }
    884  
    885         # Special case for readonly or Replaceable attributes (with a few exceptions). This attempts to ensure that JS wrappers don't get
    886         # garbage-collected prematurely when their lifetime is strongly tied to their owner. We accomplish this by inserting a reference to
    887         # the newly created wrapper into an internal field of the holder object.
    888         if (!IsNodeSubType($dataNode) && $attrName ne "self" && (IsWrapperType($returnType) && ($attribute->type =~ /^readonly/ || $attribute->signature->extendedAttributes->{"Replaceable"})
    889             && $returnType ne "EventTarget" && $returnType ne "SerializedScriptValue" && $returnType ne "DOMWindow"
    890             && $returnType !~ /SVG/ && $returnType !~ /HTML/ && !IsDOMNodeType($returnType))) {
    891             AddIncludesForType($returnType);
    892             my $domMapFunction = GetDomMapFunction(0, $returnType);
    893             # Check for a wrapper in the wrapper cache. If there is one, we know that a hidden reference has already
    894             # been created. If we don't find a wrapper, we create both a wrapper and a hidden reference.
    895             push(@implContentDecls, "    RefPtr<$returnType> result = ${getterString};\n");
    896             push(@implContentDecls, "    v8::Handle<v8::Value> wrapper = result.get() ? ${domMapFunction}.get(result.get()) : v8::Handle<v8::Value>();\n");
    897             push(@implContentDecls, "    if (wrapper.IsEmpty()) {\n");
    898             push(@implContentDecls, "        wrapper = toV8(result.get());\n");
    899             push(@implContentDecls, "        if (!wrapper.IsEmpty())\n");
    900             if ($dataNode->name eq "DOMWindow") {
    901                 push(@implContentDecls, "            V8DOMWrapper::setHiddenWindowReference(imp->frame(), wrapper);\n");
    902             } else {
    903                 push(@implContentDecls, "            V8DOMWrapper::setHiddenReference(info.Holder(), wrapper);\n");
    904             }
    905             push(@implContentDecls, "    }\n");
    906             push(@implContentDecls, "    return wrapper;\n");
    907             push(@implContentDecls, "}\n\n");
    908             push(@implContentDecls, "#endif // ${conditionalString}\n\n") if $conditionalString;
    909             return;
    910         }
     828            push(@implContentDecls, "            V8DOMWrapper::setHiddenReference(info.Holder(), wrapper);\n");
     829        }
     830        push(@implContentDecls, "    }\n");
     831        push(@implContentDecls, "    return wrapper;\n");
     832        push(@implContentDecls, "}\n\n");
     833        push(@implContentDecls, "#endif // ${conditionalString}\n\n") if $conditionalString;
     834        return;
    911835    }
    912836
    913837    if (IsSVGTypeNeedingContextParameter($attrType) && !$skipContext) {
    914         if ($attrIsPodType) {
    915             push(@implContentDecls, GenerateSVGContextAssignment($implClassName, "wrapper.get()", "    "));
    916         } else {
    917             push(@implContentDecls, GenerateSVGContextRetrieval($implClassName, "    "));
    918             # The templating associated with passing withSVGContext()'s return value directly into toV8 can get compilers confused,
    919             # so just manually set the return value to a PassRefPtr of the expected type.
    920             push(@implContentDecls, "    PassRefPtr<$attrType> resultAsPassRefPtr = V8Proxy::withSVGContext($result, context);\n");
    921             $result = "resultAsPassRefPtr";
    922         }
    923     }
    924 
    925     if ($codeGenerator->IsSVGNewStyleAnimatedType($implClassName) and $codeGenerator->IsSVGTypeNeedingTearOff($attrType)) {
     838        push(@implContentDecls, GenerateSVGContextRetrieval($implClassName, "    "));
     839        # The templating associated with passing withSVGContext()'s return value directly into toV8 can get compilers confused,
     840        # so just manually set the return value to a PassRefPtr of the expected type.
     841        push(@implContentDecls, "    PassRefPtr<$attrType> resultAsPassRefPtr = V8Proxy::withSVGContext($result, context);\n");
     842        $result = "resultAsPassRefPtr";
     843    }
     844
     845    if ($codeGenerator->IsSVGAnimatedType($implClassName) and $codeGenerator->IsSVGTypeNeedingTearOff($attrType)) {
    926846        $implIncludes{"V8$attrType.h"} = 1;
    927847        my $svgNativeType = $codeGenerator->GetSVGTypeNeedingTearOff($attrType);
     
    933853        my $tearOffType = $codeGenerator->GetSVGTypeNeedingTearOff($attrType);
    934854        if ($codeGenerator->IsSVGTypeWithWritablePropertiesNeedingTearOff($attrType) and not defined $attribute->signature->extendedAttributes->{"Immutable"}) {
    935             $tearOffType =~ s/SVGPropertyTearOff</SVGStaticPropertyTearOff<$implClassName, /;
    936             $implIncludes{"SVGStaticPropertyTearOff.h"} = 1;
    937 
    938855            my $getter = $result;
    939856            $getter =~ s/imp->//;
    940857            $getter =~ s/\(\)//;
    941             my $updater = "update" . $codeGenerator->WK_ucfirst($getter);
    942             push(@implContentDecls, "    return toV8(WTF::getPtr(${tearOffType}::create(imp, $result, &${implClassName}::$updater)));\n");
     858
     859            my $updateMethod = "&${implClassName}::update" . $codeGenerator->WK_ucfirst($getter);
     860
     861            my $selfIsTearOffType = $codeGenerator->IsSVGTypeNeedingTearOff($implClassName);
     862            if ($selfIsTearOffType) {
     863                $implIncludes{"SVGStaticPropertyWithParentTearOff.h"} = 1;
     864                $tearOffType =~ s/SVGPropertyTearOff</SVGStaticPropertyWithParentTearOff<$implClassName, /;
     865
     866                if ($result =~ /matrix/ and $implClassName eq "SVGTransform") {
     867                    # SVGTransform offers a matrix() method for internal usage that returns an AffineTransform
     868                    # and a svgMatrix() method returning a SVGMatrix, used for the bindings.
     869                    $result =~ s/matrix/svgMatrix/;
     870                }
     871
     872                push(@implContentDecls, "    return toV8(WTF::getPtr(${tearOffType}::create(wrapper, $result, $updateMethod)));\n");
     873            } else {
     874                $implIncludes{"SVGStaticPropertyTearOff.h"} = 1;
     875                $tearOffType =~ s/SVGPropertyTearOff</SVGStaticPropertyTearOff<$implClassName, /;
     876
     877                push(@implContentDecls, "    return toV8(WTF::getPtr(${tearOffType}::create(imp, $result, $updateMethod)));\n");
     878            }
    943879        } elsif ($tearOffType =~ /SVGStaticListPropertyTearOff/) {
    944880            my $extraImp = "GetOwnerElementForType<$implClassName, IsDerivedFromSVGElement<$implClassName>::value>::ownerElement(imp), ";
     
    949885            push(@implContentDecls, "    return toV8(WTF::getPtr(${tearOffType}::create($result)));\n");
    950886        }
    951     } elsif ($attrIsPodType) {
    952         $implIncludes{"V8${attrType}.h"} = 1;
    953         push(@implContentDecls, "    return toV8(wrapper.release().get());\n");
    954887    } else {
    955888        push(@implContentDecls, "    " . ReturnNativeToJSValue($attribute->signature, $result, "    ").";\n");
     
    1004937    }
    1005938
    1006     my $isPodType = IsPodType($implClassName);
    1007939    my $svgNativeType = $codeGenerator->GetSVGTypeNeedingTearOff($implClassName);
    1008 
    1009     if ($isPodType) {
    1010         $implClassName = GetNativeType($implClassName);
    1011         $implIncludes{"V8SVGPODTypeWrapper.h"} = 1;
    1012         push(@implContentDecls, "    V8SVGPODTypeWrapper<$implClassName>* wrapper = V8SVGPODTypeWrapper<$implClassName>::toNative(info.Holder());\n");
    1013         push(@implContentDecls, "    $implClassName impInstance = *wrapper;\n");
    1014         push(@implContentDecls, "    $implClassName* imp = &impInstance;\n");
    1015     } elsif ($svgNativeType) {
     940    if ($svgNativeType) {
    1016941        my $svgWrappedNativeType = $codeGenerator->GetSVGWrappedTypeNeedingTearOff($implClassName);
    1017942        if ($svgWrappedNativeType =~ /List$/) {
     
    10831008    }
    10841009
    1085     my $useExceptions = 1 if @{$attribute->setterExceptions} and !($isPodType);
     1010    my $useExceptions = 1 if @{$attribute->setterExceptions};
    10861011
    10871012    if ($useExceptions) {
     
    11171042    }
    11181043
    1119     if ($isPodType) {
    1120         push(@implContentDecls, "    wrapper->commitChange(*imp, V8Proxy::svgContext(wrapper));\n");
    1121     } elsif ($svgNativeType) {
     1044    if ($svgNativeType) {
    11221045        if ($useExceptions) {
    11231046            push(@implContentDecls, "    if (!ec)\n");
     
    11281051    } elsif (IsSVGTypeNeedingContextParameter($implClassName)) {
    11291052        $implIncludes{"SVGElement.h"} = 1;
    1130 
    1131         my $currentObject = "imp";
    1132         if ($isPodType) {
    1133             $currentObject = "wrapper";
    1134         }
    1135 
    1136         push(@implContentDecls, "    if (SVGElement* context = V8Proxy::svgContext($currentObject))\n");
     1053        push(@implContentDecls, "    if (SVGElement* context = V8Proxy::svgContext(imp))\n");
    11371054        push(@implContentDecls, "        context->svgAttributeChanged(imp->associatedAttributeName());\n");
    11381055    }
    1139    
     1056
    11401057    push(@implContentDecls, "    return;\n");
    11411058    push(@implContentDecls, "}\n\n");  # end of setter
     
    13281245    my ($svgPropertyType, $svgListPropertyType, $svgNativeType) = GetSVGPropertyTypes($implClassName);
    13291246
    1330     if (IsPodType($implClassName)) {
    1331         my $nativeClassName = GetNativeType($implClassName);
    1332         push(@implContentDecls, "    V8SVGPODTypeWrapper<$nativeClassName>* impWrapper = V8SVGPODTypeWrapper<$nativeClassName>::toNative(args.Holder());\n");
    1333         push(@implContentDecls, "    $nativeClassName impInstance = *impWrapper;\n");
    1334         push(@implContentDecls, "    $nativeClassName* imp = &impInstance;\n");
    1335     } elsif ($svgNativeType) {
     1247    if ($svgNativeType) {
    13361248        my $nativeClassName = GetNativeType($implClassName);
    13371249        if ($implClassName =~ /List$/) {
    1338             push(@implContentDecls, "    $nativeClassName imp = V8${svgListPropertyType}::toNative(args.Holder());\n");
     1250            push(@implContentDecls, "    $nativeClassName imp = V8${implClassName}::toNative(args.Holder());\n");
    13391251        } else {
    13401252            my $svgWrappedNativeType = $codeGenerator->GetSVGWrappedTypeNeedingTearOff($implClassName);
    1341             push(@implContentDecls, "    $nativeClassName wrapper = V8${svgPropertyType}::toNative(args.Holder());\n");
     1253            push(@implContentDecls, "    $nativeClassName wrapper = V8${implClassName}::toNative(args.Holder());\n");
    13421254            push(@implContentDecls, "    $svgWrappedNativeType& impInstance = wrapper->propertyReference();\n");
    13431255            push(@implContentDecls, "    $svgWrappedNativeType* imp = &impInstance;\n");
     
    14111323            push(@implContentDecls, $functionCall);
    14121324            push(@implContentDecls, "    }\n");
    1413         }
    1414 
    1415         if (BasicTypeCanFailConversion($parameter)) {
    1416             push(@implContentDecls, "    bool ${parameterName}Ok;\n");
    14171325        }
    14181326
     
    14421350        } elsif (TypeCanFailConversion($parameter)) {
    14431351            push(@implContentDecls, "    $nativeType $parameterName = " .
    1444                  JSValueToNative($parameter, "args[$paramIndex]", BasicTypeCanFailConversion($parameter) ?  "${parameterName}Ok" : undef) . ";\n");
    1445             push(@implContentDecls, "    if (UNLIKELY(!$parameterName" . (BasicTypeCanFailConversion($parameter) ? "Ok" : "") . ")) {\n");
     1352                 JSValueToNative($parameter, "args[$paramIndex]") . ";\n");
     1353            push(@implContentDecls, "    if (UNLIKELY(!$parameterName)) {\n");
    14461354            push(@implContentDecls, "        ec = TYPE_MISMATCH_ERR;\n");
    14471355            push(@implContentDecls, "        goto fail;\n");
    14481356            push(@implContentDecls, "    }\n");
    14491357        } elsif ($nativeType =~ /^V8Parameter/) {
    1450             my $value = JSValueToNative($parameter, "args[$paramIndex]", BasicTypeCanFailConversion($parameter) ?  "${parameterName}Ok" : undef);
     1358            my $value = JSValueToNative($parameter, "args[$paramIndex]");
    14511359            push(@implContentDecls, "    " . ConvertToV8Parameter($parameter, $nativeType, $parameterName, $value) . "\n");
    14521360        } else {
     
    14751383            }
    14761384            push(@implContentDecls, "    EXCEPTION_BLOCK($nativeType, $parameterName, " .
    1477                  JSValueToNative($parameter, "args[$paramIndex]", BasicTypeCanFailConversion($parameter) ?  "${parameterName}Ok" : undef) . ");\n");
     1385                 JSValueToNative($parameter, "args[$paramIndex]") . ");\n");
    14781386        }
    14791387
     
    18151723    my $className = "V8$interfaceName";
    18161724    my $implClassName = $interfaceName;
    1817 
    18181725    my $hasLegacyParent = $dataNode->extendedAttributes->{"LegacyParent"};
    18191726
     
    18271734    $implIncludes{"V8DOMWrapper.h"} = 1;
    18281735    $implIncludes{"V8IsolatedContext.h"} = 1;
    1829 
    1830     if ($className =~ /^V8SVGAnimated/) {
    1831         AddIncludesForSVGAnimatedType($interfaceName);
    1832     }
    18331736
    18341737    AddIncludesForType($interfaceName);
     
    26692572    return "getDOMNodeMap()" if ($dataNode && IsNodeSubType($dataNode));
    26702573    # Only use getDOMSVGObjectWithContextMap() for non-node svg objects
    2671     return "getDOMSVGObjectWithContextMap()" if $type =~ /SVG/ and $type ne "SVGLength" and $type ne "SVGLengthList" and not $codeGenerator->IsSVGNewStyleAnimatedType($type);
     2574    return "getDOMSVGObjectWithContextMap()" if $type =~ /SVG/ and not $codeGenerator->IsSVGTypeNeedingTearOff($type) and not $codeGenerator->IsSVGAnimatedType($type);
    26722575    return "" if $type eq "DOMImplementation";
    26732576    return "getActiveDOMObjectMap()" if IsActiveDomType($type);
     
    26972600    my $type = shift;
    26982601
    2699     $type = "AffineTransform" if $type eq "SVGMatrix";
    2700     $type = "V8SVGPODTypeWrapper<$type>" if $dataNode->extendedAttributes->{"PODType"};
    27012602    $type = $codeGenerator->GetSVGTypeNeedingTearOff($type) if $codeGenerator->IsSVGTypeNeedingTearOff($type);
    27022603    return $type;
     
    27112612
    27122613    my $name = $function->signature->name;
    2713     my $isPodType = IsPodType($implClassName);
    27142614    my $returnType = GetTypeFromSignature($function->signature);
    2715     my $returnsPodType = IsPodType($returnType);
    27162615    my $nativeReturnType = GetNativeType($returnType, 0);
    27172616    my $result = "";
     
    27202619    $nativeReturnType = $codeGenerator->GetSVGWrappedTypeNeedingTearOff($returnType) if $isSVGTearOffType;
    27212620
    2722     # Special case: SVG matrix transform methods should not mutate
    2723     # the matrix but return a copy
    2724     my $copyFirst = 0;
    2725     if ($implClassName eq "SVGMatrix" && $function->signature->type eq "SVGMatrix") {
    2726         $copyFirst = 1;
    2727     }
    2728 
    27292621    if ($function->signature->extendedAttributes->{"v8implname"}) {
    27302622        $name = $function->signature->extendedAttributes->{"v8implname"};
     
    27362628
    27372629    my $functionString = "imp->${name}(";
    2738 
    2739     if ($copyFirst) {
    2740         $functionString = "result.${name}(";
    2741     }
    2742 
    27432630    if ($function->signature->extendedAttributes->{"ClassMethod"}) {
    27442631        $functionString = "${implClassName}::${name}(";
    2745     }
    2746 
    2747     my $returnsListItemPodType = 0;
    2748     # SVG lists functions that return POD types require special handling
    2749     if (IsSVGListTypeNeedingSpecialHandling($implClassName) && IsSVGListMethod($name) && $returnsPodType) {
    2750         $returnsListItemPodType = 1;
    2751         $result .= $indent . "SVGList<RefPtr<SVGPODListItem<$nativeReturnType> > >* listImp = imp;\n";
    2752         $functionString = "listImp->${name}(";
    27532632    }
    27542633
     
    27882667        my $paramType = $parameter->type;
    27892668
    2790         # This is a bit of a hack... we need to convert parameters to methods on SVG lists
    2791         # of POD types which are items in the list to appropriate SVGList<> instances
    2792         if ($returnsListItemPodType && $paramType . "List" eq $implClassName) {
    2793             $paramName = "SVGPODListItem<" . GetNativeType($paramType, 1) . ">::copy($paramName)";
    2794         }
    2795 
    27962669        if ($parameter->type eq "NodeFilter" || $parameter->type eq "XPathNSResolver") {
    27972670            $functionString .= "$paramName.get()";
     
    28022675            $result .= $indent . "    return v8::Handle<v8::Value>();\n";
    28032676            $result .= $indent . "}\n";
     2677        } elsif ($parameter->type eq "SVGMatrix" and $implClassName eq "SVGTransformList") {
     2678            $functionString .= "$paramName.get()";
    28042679        } else {
    28052680            $functionString .= $paramName;
     
    28342709    if ($returnType eq "void") {
    28352710        $result .= $indent . "$functionString;\n";
    2836     } elsif ($copyFirst) {
    2837         $result .= $indent . GetNativeType($returnType, 0) . " result = *imp;\n" . $indent . "$functionString;\n";
    2838     } elsif ($returnsListItemPodType) {
    2839         $result .= $indent . "RefPtr<SVGPODListItem<$nativeReturnType> > result = $functionString;\n";
    2840     } elsif ($hasScriptState or @{$function->raisesExceptions} or $returnsPodType or $isPodType or IsSVGTypeNeedingContextParameter($returnType)) {
     2711    } elsif ($hasScriptState or @{$function->raisesExceptions}) {
    28412712        $result .= $indent . $nativeReturnType . " result = $functionString;\n";
    28422713    } else {
     
    28442715        $return = $functionString;
    28452716        $returnIsRef = 0;
     2717   
     2718        if ($implClassName eq "SVGTransformList" and IsRefPtrType($returnType)) {
     2719            $return = "WTF::getPtr(" . $return . ")";
     2720        }
    28462721    }
    28472722
     
    28542729        $result .= $indent . "if (state.hadException())\n";
    28552730        $result .= $indent . "    return throwError(state.exception());\n"
    2856     }
    2857 
    2858     # If the return type is a POD type, separate out the wrapper generation
    2859     if ($returnsListItemPodType) {
    2860         $result .= $indent . "RefPtr<V8SVGPODTypeWrapper<" . $nativeReturnType . "> > wrapper = ";
    2861         $result .= "V8SVGPODTypeWrapperCreatorForList<" . $nativeReturnType . ">::create($return, imp->associatedAttributeName());\n";
    2862         $return = "wrapper";
    2863     } elsif ($returnsPodType) {
    2864         $result .= $indent . "RefPtr<V8SVGPODTypeWrapper<" . $nativeReturnType . "> > wrapper = ";
    2865         $result .= GenerateSVGStaticPodTypeWrapper($returnType, $return) . ";\n";
    2866         $return = "wrapper";
    28672731    }
    28682732
     
    28932757
    28942758    # If the implementing class is a POD type, commit changes
    2895     if ($isPodType) {
    2896         if (!$generatedSVGContextRetrieval) {
    2897             $result .= GenerateSVGContextRetrieval($implClassName, $indent);
    2898             $generatedSVGContextRetrieval = 1;
    2899         }
    2900 
    2901         $result .= $indent . "impWrapper->commitChange(impInstance, context);\n";
    2902     } elsif ($codeGenerator->IsSVGTypeNeedingTearOff($implClassName) and not $implClassName =~ /List$/) {
     2759    if ($codeGenerator->IsSVGTypeNeedingTearOff($implClassName) and not $implClassName =~ /List$/) {
    29032760        $result .= $indent . "wrapper->commitChange();\n";
    29042761    }
    29052762
    2906     if ($returnsPodType) {
    2907         $implIncludes{"V8${returnType}.h"} = 1;
    2908         $result .= $indent . "return toV8(wrapper.release());\n";
    2909     } else {
    2910         $return .= ".release()" if ($returnIsRef);
    2911         $result .= $indent . ReturnNativeToJSValue($function->signature, $return, $indent) . ";\n";
    2912     }
     2763    $return .= ".release()" if ($returnIsRef);
     2764    $result .= $indent . ReturnNativeToJSValue($function->signature, $return, $indent) . ";\n";
    29132765
    29142766    return $result;
     
    29982850    return "String" if $type eq "DOMString";
    29992851    return "Range::CompareHow" if $type eq "CompareHow";
    3000     return "AffineTransform" if $type eq "SVGMatrix";
    3001     return "SVGTransform" if $type eq "SVGTransform";
    30022852    return "SVGPaint::SVGPaintType" if $type eq "SVGPaintType";
    30032853    return "DOMTimeStamp" if $type eq "DOMTimeStamp";
     
    30442894}
    30452895
    3046 sub BasicTypeCanFailConversion
    3047 {
    3048     my $signature = shift;
    3049     my $type = GetTypeFromSignature($signature);
    3050 
    3051     return 1 if $type eq "SVGMatrix";
    3052     return 1 if $type eq "SVGTransform";
    3053     return 0;
    3054 }
    3055 
    30562896sub TypeCanFailConversion
    30572897{
     
    30642904    return 1 if $type eq "VoidCallback";
    30652905    return 1 if $type eq "IDBKey";
    3066     return BasicTypeCanFailConversion($signature);
     2906    return 0;
    30672907}
    30682908
     
    30712911    my $signature = shift;
    30722912    my $value = shift;
    3073     my $okParam = shift;
    3074     my $maybeOkParam = $okParam ? ", ${okParam}" : "";
    30752913
    30762914    my $type = GetTypeFromSignature($signature);
     
    30802918    return "static_cast<$type>($value->NumberValue())" if $type eq "float" or $type eq "double";
    30812919
    3082     return "toInt32($value${maybeOkParam})" if $type eq "long";
    3083     return "toUInt32($value${maybeOkParam})" if $type eq "unsigned long" or $type eq "unsigned short";
     2920    return "toInt32($value)" if $type eq "long";
     2921    return "toUInt32($value)" if $type eq "unsigned long" or $type eq "unsigned short";
    30842922    return "toInt64($value)" if $type eq "unsigned long long" or $type eq "long long";
    30852923    return "static_cast<Range::CompareHow>($value->Int32Value())" if $type eq "CompareHow";
     
    31342972    } else {
    31352973        $implIncludes{"V8$type.h"} = 1;
    3136 
    3137         if (IsPodType($type)) {
    3138             my $nativeType = GetNativeType($type);
    3139             $implIncludes{"V8SVGPODTypeWrapper.h"} = 1;
    3140 
    3141             return "V8SVGPODTypeUtil::toSVGPODType<${nativeType}>(&V8${type}::info, $value${maybeOkParam})"
    3142         }
    3143 
    3144         $implIncludes{"V8${type}.h"} = 1;
    31452974
    31462975        # Perform type checks on the parameter, if it is expected Node type,
     
    32403069    'CompareHow' => 1,
    32413070    'SerializedScriptValue' => 1,
    3242     'SVGAngle' => 1,
    3243     'SVGRect' => 1,
    3244     'SVGPoint' => 1,
    3245     'SVGPreserveAspectRatio' => 1,
    3246     'SVGMatrix' => 1,
    3247     'SVGTransform' => 1,
    3248     'SVGLength' => 1,
    3249     'SVGNumber' => 1,
    32503071    'SVGPaintType' => 1,
    32513072    'DOMTimeStamp' => 1,
     
    33583179    $implIncludes{"wtf/GetPtr.h"} = 1;
    33593180
    3360     if (IsPodType($type)) {
    3361         $value = GenerateSVGStaticPodTypeWrapper($type, $value) . ".get()";
    3362     }
    3363 
    33643181    return "return toV8($value)";
    3365 }
    3366 
    3367 # FIXME: This method will go away once all SVG animated properties are converted to the new scheme.
    3368 sub GenerateSVGStaticPodTypeWrapper {
    3369     my $type = shift;
    3370     my $value = shift;
    3371 
    3372     $implIncludes{"V8$type.h"}=1;
    3373     $implIncludes{"V8SVGPODTypeWrapper.h"} = 1;
    3374 
    3375     my $nativeType = GetNativeType($type);
    3376     return "V8SVGStaticPODTypeWrapper<$nativeType>::create($value)";
    33773182}
    33783183
     
    34273232    return 0 unless $implClassName =~ /SVG/;
    34283233    return 0 if $implClassName =~ /Element/;
    3429     return 0 if $codeGenerator->IsSVGNewStyleAnimatedType($implClassName);
     3234    return 0 if $codeGenerator->IsSVGAnimatedType($implClassName);
    34303235    return 0 if $codeGenerator->IsSVGTypeNeedingTearOff($implClassName);
    34313236
     
    34563261    my $indent = shift;
    34573262
    3458     my $srcIsPodType = IsPodType($srcType);
    3459 
    3460     my $srcObject = "imp";
    3461     if ($srcIsPodType) {
    3462         $srcObject = "impWrapper";
    3463     }
    3464 
    3465     my $contextDecl;
    3466 
     3263    my $contextDecl = "imp";
    34673264    if (IsSVGTypeNeedingContextParameter($srcType)) {
    3468         $contextDecl = "V8Proxy::svgContext($srcObject)";
    3469     } else {
    3470         $contextDecl = $srcObject;
     3265        $contextDecl = "V8Proxy::svgContext($contextDecl)";
    34713266    }
    34723267
     
    34843279    return 1 if $functionName eq "removeItem";
    34853280    return 1 if $functionName eq "appendItem";
    3486 
    3487     return 0;
    3488 }
    3489 
    3490 sub IsSVGListMethod
    3491 {
    3492     my $functionName = shift;
    3493 
    3494     return 1 if $functionName eq "getFirst";
    3495     return 1 if $functionName eq "getLast";
    3496     return 1 if $functionName eq "getItem";
    3497 
    3498     return IsSVGListMutator($functionName);
    3499 }
    3500 
    3501 sub IsSVGListTypeNeedingSpecialHandling
    3502 {
    3503     my $className = shift;
    3504 
    3505     return 1 if $className eq "SVGTransformList";
    35063281
    35073282    return 0;
  • trunk/WebCore/svg/DeprecatedSVGAnimatedPropertyTraits.h

    r71227 r71802  
    2323
    2424#if ENABLE(SVG)
    25 #include "PlatformString.h"
    26 #include "SVGTransformList.h"
    2725
     26// FIXME: Remove this file!
    2827namespace WebCore {
    2928
     
    3130struct DeprecatedSVGAnimatedPropertyTraits : public Noncopyable { };
    3231
    33 // SVGAnimatedTransformList
    34 template<>
    35 struct DeprecatedSVGAnimatedPropertyTraits<SVGTransformList*> : public Noncopyable {
    36     typedef SVGTransformList* PassType;
    37     typedef SVGTransformList* ReturnType;
    38     typedef RefPtr<SVGTransformList> StoredType;
    39 
    40     static ReturnType null() { return 0; }
    41     static ReturnType toReturnType(const StoredType& type) { return type.get(); }
    42     static String toString(PassType type) { return type ? type->valueAsString() : String(); }
    43 };
    44 
    4532}
    4633
  • trunk/WebCore/svg/DeprecatedSVGAnimatedTemplate.h

    r71227 r71802  
    2828#include <wtf/HashMap.h>
    2929
     30// FIXME: Remove this file!
    3031namespace WebCore {
    3132   
    3233    class SVGElement;
    33     class SVGTransformList;
    3434
    3535    struct DeprecatedSVGAnimatedTypeWrapperKey {           
     
    152152    }
    153153
    154     // Common type definitions, to ease IDL generation.
    155     typedef DeprecatedSVGAnimatedTemplate<SVGTransformList*> SVGAnimatedTransformList;
    156 
    157154}
    158155
  • trunk/WebCore/svg/SVGAnimateTransformElement.cpp

    r66498 r71802  
    8787
    8888   
    89 static PassRefPtr<SVGTransformList> transformListFor(SVGElement* element)
     89static SVGTransformList* transformListFor(SVGElement* element)
    9090{
    9191    ASSERT(element);
    9292    if (element->isStyledTransformable())
    93         return static_cast<SVGStyledTransformableElement*>(element)->transform();
     93        return &static_cast<SVGStyledTransformableElement*>(element)->transform();
    9494    if (element->hasTagName(SVGNames::textTag))
    95         return static_cast<SVGTextElement*>(element)->transform();
     95        return &static_cast<SVGTextElement*>(element)->transform();
    9696    if (element->hasTagName(SVGNames::linearGradientTag) || element->hasTagName(SVGNames::radialGradientTag))
    97         return static_cast<SVGGradientElement*>(element)->gradientTransform();
     97        return &static_cast<SVGGradientElement*>(element)->gradientTransform();
     98    // FIXME: Handle patternTransform, which is obviously missing!
    9899    return 0;
    99100}
     
    110111
    111112    if (baseValue.isEmpty()) {
    112         ExceptionCode ec;
    113         RefPtr<SVGTransformList> list = transformListFor(targetElement());
    114         list->clear(ec);
     113        if (SVGTransformList* list = transformListFor(targetElement()))
     114            list->clear();
    115115    } else
    116116        targetElement()->setAttribute(SVGNames::transformAttr, baseValue);
     
    122122        return;
    123123    SVGElement* targetElement = resultElement->targetElement();
    124     RefPtr<SVGTransformList> transformList = transformListFor(targetElement);
     124    SVGTransformList* transformList = transformListFor(targetElement);
    125125    ASSERT(transformList);
    126126
    127     ExceptionCode ec;
    128127    if (!isAdditive())
    129         transformList->clear(ec);
     128        transformList->clear();
    130129    if (isAccumulated() && repeat) {
    131130        SVGTransform accumulatedTransform = SVGTransformDistance(m_fromTransform, m_toTransform).scaledDistance(repeat).addToSVGTransform(SVGTransform());
    132         transformList->appendItem(accumulatedTransform, ec);
     131        transformList->append(accumulatedTransform);
    133132    }
    134133    SVGTransform transform = SVGTransformDistance(m_fromTransform, m_toTransform).scaledDistance(percentage).addToSVGTransform(m_fromTransform);
    135     transformList->appendItem(transform, ec);
     134    transformList->append(transform);
    136135}
    137136   
     
    182181
    183182    // ...except in case where we have additional instances in <use> trees.
     183    SVGTransformList* transformList = transformListFor(targetElement);
     184    if (!transformList)
     185        return;
     186
    184187    const HashSet<SVGElementInstance*>& instances = targetElement->instancesForElement();
    185     RefPtr<SVGTransformList> transformList = transformListFor(targetElement);
    186188    const HashSet<SVGElementInstance*>::const_iterator end = instances.end();
    187189    for (HashSet<SVGElementInstance*>::const_iterator it = instances.begin(); it != end; ++it) {
     
    189191        ASSERT(shadowTreeElement);
    190192        if (shadowTreeElement->isStyledTransformable())
    191             static_cast<SVGStyledTransformableElement*>(shadowTreeElement)->setTransformBaseValue(transformList.get());
     193            static_cast<SVGStyledTransformableElement*>(shadowTreeElement)->setTransformBaseValue(*transformList);
    192194        else if (shadowTreeElement->hasTagName(SVGNames::textTag))
    193             static_cast<SVGTextElement*>(shadowTreeElement)->setTransformBaseValue(transformList.get());
     195            static_cast<SVGTextElement*>(shadowTreeElement)->setTransformBaseValue(*transformList);
    194196        else if (shadowTreeElement->hasTagName(SVGNames::linearGradientTag) || shadowTreeElement->hasTagName(SVGNames::radialGradientTag))
    195             static_cast<SVGGradientElement*>(shadowTreeElement)->setGradientTransformBaseValue(transformList.get());
     197            static_cast<SVGGradientElement*>(shadowTreeElement)->setGradientTransformBaseValue(*transformList);
     198        // FIXME: Handle patternTransform, obviously missing!
    196199        if (RenderObject* renderer = shadowTreeElement->renderer()) {
    197200            renderer->setNeedsTransformUpdate();
  • trunk/WebCore/svg/SVGGradientElement.cpp

    r69279 r71802  
    4242    : SVGStyledElement(tagName, document)
    4343    , m_gradientUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
    44     , m_gradientTransform(SVGTransformList::create(SVGNames::gradientTransformAttr))
    4544{
    4645}
     
    5453            setGradientUnitsBaseValue(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
    5554    } else if (attr->name() == SVGNames::gradientTransformAttr) {
    56         SVGTransformList* gradientTransforms = gradientTransformBaseValue();
    57         if (!SVGTransformable::parseTransformAttribute(gradientTransforms, attr->value())) {
    58             ExceptionCode ec = 0;
    59             gradientTransforms->clear(ec);
    60         }
     55        SVGTransformList newList;
     56        if (!SVGTransformable::parseTransformAttribute(newList, attr->value()))
     57            newList.clear();
     58
     59        detachAnimatedGradientTransformListWrappers(newList.size());
     60        gradientTransformBaseValue() = newList;
    6161    } else if (attr->name() == SVGNames::spreadMethodAttr) {
    6262        if (attr->value() == "reflect")
  • trunk/WebCore/svg/SVGGradientElement.h

    r71227 r71802  
    2525#include "Gradient.h"
    2626#include "SVGAnimatedPropertyMacros.h"
     27#include "SVGAnimatedTransformList.h"
    2728#include "SVGExternalResourcesRequired.h"
    2829#include "SVGStyledElement.h"
     
    5253        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGGradientElement, SVGNames::spreadMethodAttr, int, SpreadMethod, spreadMethod)
    5354        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGGradientElement, SVGNames::gradientUnitsAttr, int, GradientUnits, gradientUnits)
    54         DECLARE_ANIMATED_PROPERTY(SVGGradientElement, SVGNames::gradientTransformAttr, SVGTransformList*, GradientTransform, gradientTransform)
     55        DECLARE_ANIMATED_TRANSFORM_LIST_PROPERTY_NEW(SVGGradientElement, SVGNames::gradientTransformAttr, SVGTransformList, GradientTransform, gradientTransform)
    5556
    5657        // SVGURIReference
  • trunk/WebCore/svg/SVGLinearGradientElement.cpp

    r69413 r71802  
    128128            attributes.setBoundingBoxMode(current->gradientUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
    129129
    130         if (!attributes.hasGradientTransform() && current->hasAttribute(SVGNames::gradientTransformAttr))
    131             attributes.setGradientTransform(current->gradientTransform()->consolidate().matrix());
     130        if (!attributes.hasGradientTransform() && current->hasAttribute(SVGNames::gradientTransformAttr)) {
     131            AffineTransform transform;
     132            current->gradientTransform().concatenate(transform);
     133            attributes.setGradientTransform(transform);
     134        }
    132135
    133136        if (!attributes.hasStops()) {
  • trunk/WebCore/svg/SVGMatrix.idl

    r64579 r71802  
    2323module svg {
    2424
    25     interface [Conditional=SVG, PODType=AffineTransform] SVGMatrix {
     25    interface [Conditional=SVG] SVGMatrix {
    2626        // FIXME: these attributes should all be floats but since we implement
    2727        // AffineTransform with doubles setting these as doubles makes more sense.
    28         attribute double a;
    29         attribute double b;
    30         attribute double c;
    31         attribute double d;
    32         attribute double e;
    33         attribute double f;
     28        attribute [StrictTypeChecking] double a;
     29        attribute [StrictTypeChecking] double b;
     30        attribute [StrictTypeChecking] double c;
     31        attribute [StrictTypeChecking] double d;
     32        attribute [StrictTypeChecking] double e;
     33        attribute [StrictTypeChecking] double f;
    3434
    35         [Custom] SVGMatrix multiply(in SVGMatrix secondMatrix);
    36         [Custom] SVGMatrix inverse()
     35        [StrictTypeChecking, RequiresAllArguments=Raise] SVGMatrix multiply(in SVGMatrix secondMatrix);
     36        SVGMatrix inverse()
    3737            raises(SVGException);
    38         [Immutable] SVGMatrix translate(in float x, in float y);
    39         [Immutable] SVGMatrix scale(in float scaleFactor);
    40         [Immutable] SVGMatrix scaleNonUniform(in float scaleFactorX, in float scaleFactorY);
    41         [Immutable] SVGMatrix rotate(in float angle);
    42         [Custom] SVGMatrix rotateFromVector(in float x, in float y)
     38        [Immutable, StrictTypeChecking, RequiresAllArguments=Raise] SVGMatrix translate(in float x, in float y);
     39        [Immutable, StrictTypeChecking, RequiresAllArguments=Raise] SVGMatrix scale(in float scaleFactor);
     40        [Immutable, StrictTypeChecking, RequiresAllArguments=Raise] SVGMatrix scaleNonUniform(in float scaleFactorX, in float scaleFactorY);
     41        [Immutable, StrictTypeChecking, RequiresAllArguments=Raise] SVGMatrix rotate(in float angle);
     42        [StrictTypeChecking, RequiresAllArguments=Raise] SVGMatrix rotateFromVector(in float x, in float y)
    4343            raises(SVGException);
    4444        [Immutable] SVGMatrix flipX();
    4545        [Immutable] SVGMatrix flipY();
    46         [Immutable] SVGMatrix skewX(in float angle);
    47         [Immutable] SVGMatrix skewY(in float angle);
     46        [Immutable, StrictTypeChecking, RequiresAllArguments=Raise] SVGMatrix skewX(in float angle);
     47        [Immutable, StrictTypeChecking, RequiresAllArguments=Raise] SVGMatrix skewY(in float angle);
    4848    };
    4949
  • trunk/WebCore/svg/SVGPatternElement.cpp

    r69413 r71802  
    5858    , m_patternUnits(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX)
    5959    , m_patternContentUnits(SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE)
    60     , m_patternTransform(SVGTransformList::create(SVGNames::patternTransformAttr))
    6160{
    6261}
     
    8079            setPatternContentUnitsBaseValue(SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
    8180    } else if (attr->name() == SVGNames::patternTransformAttr) {
    82         SVGTransformList* patternTransforms = patternTransformBaseValue();
    83         if (!SVGTransformable::parseTransformAttribute(patternTransforms, attr->value())) {
    84             ExceptionCode ec = 0;
    85             patternTransforms->clear(ec);
    86         }
     81        SVGTransformList newList;
     82        if (!SVGTransformable::parseTransformAttribute(newList, attr->value()))
     83            newList.clear();
     84
     85        detachAnimatedPatternTransformListWrappers(newList.size());
     86        patternTransformBaseValue() = newList;
    8787    } else if (attr->name() == SVGNames::xAttr)
    8888        setXBaseValue(SVGLength(LengthModeWidth, attr->value()));
     
    225225            attributes.setBoundingBoxModeContent(current->patternContentUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
    226226
    227         if (!attributes.hasPatternTransform() && current->hasAttribute(SVGNames::patternTransformAttr))
    228             attributes.setPatternTransform(current->patternTransform()->consolidate().matrix());
     227        if (!attributes.hasPatternTransform() && current->hasAttribute(SVGNames::patternTransformAttr)) {
     228            AffineTransform transform;
     229            current->patternTransform().concatenate(transform);
     230            attributes.setPatternTransform(transform);
     231        }
    229232
    230233        if (!attributes.hasPatternContentElement() && current->hasChildNodes())
  • trunk/WebCore/svg/SVGPatternElement.h

    r71227 r71802  
    2525#include "SVGAnimatedLength.h"
    2626#include "SVGAnimatedPropertyMacros.h"
     27#include "SVGAnimatedTransformList.h"
    2728#include "SVGExternalResourcesRequired.h"
    2829#include "SVGFitToViewBox.h"
     
    7172        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGPatternElement, SVGNames::patternUnitsAttr, int, PatternUnits, patternUnits)
    7273        DECLARE_ANIMATED_STATIC_PROPERTY_NEW(SVGPatternElement, SVGNames::patternContentUnitsAttr, int, PatternContentUnits, patternContentUnits)
    73         DECLARE_ANIMATED_PROPERTY(SVGPatternElement, SVGNames::patternTransformAttr, SVGTransformList*, PatternTransform, patternTransform)
     74        DECLARE_ANIMATED_TRANSFORM_LIST_PROPERTY_NEW(SVGPatternElement, SVGNames::patternTransformAttr, SVGTransformList, PatternTransform, patternTransform)
    7475
    7576        // SVGURIReference
  • trunk/WebCore/svg/SVGPoint.idl

    r71512 r71802  
    2727        attribute [StrictTypeChecking] float y;
    2828
    29         SVGPoint matrixTransform(in SVGMatrix matrix);
     29        [StrictTypeChecking, RequiresAllArguments=Raise] SVGPoint matrixTransform(in SVGMatrix matrix);
    3030    };
    3131
  • trunk/WebCore/svg/SVGRadialGradientElement.cpp

    r69413 r71802  
    138138            attributes.setBoundingBoxMode(current->gradientUnits() == SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX);
    139139
    140         if (!attributes.hasGradientTransform() && current->hasAttribute(SVGNames::gradientTransformAttr))
    141             attributes.setGradientTransform(current->gradientTransform()->consolidate().matrix());
     140        if (!attributes.hasGradientTransform() && current->hasAttribute(SVGNames::gradientTransformAttr)) {
     141            AffineTransform transform;
     142            current->gradientTransform().concatenate(transform);
     143            attributes.setGradientTransform(transform);
     144        }
    142145
    143146        if (!attributes.hasStops()) {
  • trunk/WebCore/svg/SVGSVGElement.cpp

    r71772 r71802  
    450450}
    451451
    452 AffineTransform SVGSVGElement::createSVGMatrix()
    453 {
    454     return AffineTransform();
     452SVGMatrix SVGSVGElement::createSVGMatrix()
     453{
     454    return SVGMatrix();
    455455}
    456456
     
    465465}
    466466
    467 SVGTransform SVGSVGElement::createSVGTransformFromMatrix(const AffineTransform& matrix)
    468 {
    469     return SVGTransform(matrix);
     467SVGTransform SVGSVGElement::createSVGTransformFromMatrix(const SVGMatrix& matrix)
     468{
     469    return SVGTransform(static_cast<const AffineTransform&>(matrix));
    470470}
    471471
     
    583583
    584584    AffineTransform ctm = SVGFitToViewBox::viewBoxToViewTransform(viewBoxRect, preserveAspectRatio(), viewWidth, viewHeight);
    585     if (useCurrentView() && currentView())
    586         return currentView()->transform()->concatenate().matrix() * ctm;
     585    if (useCurrentView() && currentView()) {
     586        AffineTransform transform;
     587        if (!currentView()->transform().concatenate(transform))
     588            return ctm;
     589
     590        return transform * ctm;
     591    }
    587592
    588593    return ctm;
  • trunk/WebCore/svg/SVGSVGElement.h

    r71772 r71802  
    3636    class SVGAngle;
    3737    class SVGLength;
     38    class SVGMatrix;
    3839    class SVGTransform;
    3940    class SVGViewSpec;
     
    109110        static SVGAngle createSVGAngle();
    110111        static FloatPoint createSVGPoint();
    111         static AffineTransform createSVGMatrix();
     112        static SVGMatrix createSVGMatrix();
    112113        static FloatRect createSVGRect();
    113114        static SVGTransform createSVGTransform();
    114         static SVGTransform createSVGTransformFromMatrix(const AffineTransform&);
     115        static SVGTransform createSVGTransformFromMatrix(const SVGMatrix&);
    115116
    116117        AffineTransform viewBoxToViewTransform(float viewWidth, float viewHeight) const;
  • trunk/WebCore/svg/SVGStyledTransformableElement.cpp

    r71314 r71802  
    3535SVGStyledTransformableElement::SVGStyledTransformableElement(const QualifiedName& tagName, Document* document)
    3636    : SVGStyledLocatableElement(tagName, document)
    37     , m_transform(SVGTransformList::create(SVGNames::transformAttr))
    3837{
    3938}
     
    5554AffineTransform SVGStyledTransformableElement::animatedLocalTransform() const
    5655{
    57     return m_supplementalTransform ? *m_supplementalTransform * transform()->concatenate().matrix() : transform()->concatenate().matrix();
     56    AffineTransform matrix;
     57    transform().concatenate(matrix);
     58    return m_supplementalTransform ? *m_supplementalTransform * matrix : matrix;
    5859}
    59    
     60
    6061AffineTransform* SVGStyledTransformableElement::supplementalTransform()
    6162{
     
    6869{
    6970    if (SVGTransformable::isKnownAttribute(attr->name())) {
    70         SVGTransformList* localTransforms = transformBaseValue();
    71         if (!SVGTransformable::parseTransformAttribute(localTransforms, attr->value())) {
    72             ExceptionCode ec = 0;
    73             localTransforms->clear(ec);
    74         }
     71        SVGTransformList newList;
     72        if (!SVGTransformable::parseTransformAttribute(newList, attr->value()))
     73            newList.clear();
     74        detachAnimatedTransformListWrappers(newList.size());
     75        transformBaseValue() = newList;
    7576    } else
    7677        SVGStyledLocatableElement::parseMappedAttribute(attr);
  • trunk/WebCore/svg/SVGStyledTransformableElement.h

    r71103 r71802  
    6161    virtual void synchronizeProperty(const QualifiedName&);
    6262
    63     DECLARE_ANIMATED_PROPERTY(SVGStyledTransformableElement, SVGNames::transformAttr, SVGTransformList*, Transform, transform)
     63    DECLARE_ANIMATED_TRANSFORM_LIST_PROPERTY_NEW(SVGStyledTransformableElement, SVGNames::transformAttr, SVGTransformList, Transform, transform)
    6464
    6565private:
  • trunk/WebCore/svg/SVGTextElement.cpp

    r71726 r71802  
    3939    : SVGTextPositioningElement(tagName, doc)
    4040    , SVGTransformable()
    41     , m_transform(SVGTransformList::create(SVGNames::transformAttr))
    4241{
    4342}
     
    5150{
    5251    if (SVGTransformable::isKnownAttribute(attr->name())) {
    53         SVGTransformList* localTransforms = transformBaseValue();
    54         if (!SVGTransformable::parseTransformAttribute(localTransforms, attr->value())) {
    55             ExceptionCode ec = 0;
    56             localTransforms->clear(ec);
    57         }
     52        SVGTransformList newList;
     53        if (!SVGTransformable::parseTransformAttribute(newList, attr->value()))
     54            newList.clear();
     55
     56        detachAnimatedTransformListWrappers(newList.size());
     57        transformBaseValue() = newList;
    5858    } else
    5959        SVGTextPositioningElement::parseMappedAttribute(attr);
     
    8787AffineTransform SVGTextElement::animatedLocalTransform() const
    8888{
    89     return m_supplementalTransform ? *m_supplementalTransform * transform()->concatenate().matrix() : transform()->concatenate().matrix();
     89    AffineTransform matrix;
     90    transform().concatenate(matrix);
     91    return m_supplementalTransform ? *m_supplementalTransform * matrix : matrix;
    9092}
    9193
  • trunk/WebCore/svg/SVGTextElement.h

    r66397 r71802  
    2323
    2424#if ENABLE(SVG)
     25#include "SVGAnimatedTransformList.h"
    2526#include "SVGTextPositioningElement.h"
    2627#include "SVGTransformable.h"
     
    5556        virtual void synchronizeProperty(const QualifiedName&);
    5657
    57         DECLARE_ANIMATED_PROPERTY(SVGTextElement, SVGNames::transformAttr, SVGTransformList*, Transform, transform)
     58        DECLARE_ANIMATED_TRANSFORM_LIST_PROPERTY_NEW(SVGTextElement, SVGNames::transformAttr, SVGTransformList, Transform, transform)
    5859       
    5960        // Used by <animateMotion>
  • trunk/WebCore/svg/SVGTransform.cpp

    r66397 r71802  
    2020
    2121#include "config.h"
     22
    2223#if ENABLE(SVG)
    23 
    2424#include "FloatPoint.h"
    2525#include "FloatSize.h"
     
    2828#include "SVGTransform.h"
    2929
    30 #include <math.h>
     30#include <wtf/MathExtras.h>
    3131
    32 using namespace WebCore;
     32namespace WebCore {
    3333
    3434SVGTransform::SVGTransform()
     
    4141    : m_type(type)
    4242    , m_angle(0)
    43     , m_center(FloatPoint())
    44     , m_matrix(AffineTransform())
    4543{
    4644}
     
    5351}
    5452
    55 bool SVGTransform::isValid()
    56 {
    57     return (m_type != SVG_TRANSFORM_UNKNOWN);
    58 }
    59 
    60 SVGTransform::SVGTransformType SVGTransform::type() const
    61 {
    62     return m_type;
    63 }
    64 
    65 AffineTransform SVGTransform::matrix() const
    66 {
    67     return m_matrix;
    68 }
    69 
    70 float SVGTransform::angle() const
    71 {
    72     return m_angle;
    73 }
    74 
    75 FloatPoint SVGTransform::rotationCenter() const
    76 {
    77     return m_center;
    78 }
    79 
    80 void SVGTransform::setMatrix(AffineTransform matrix)
     53void SVGTransform::setMatrix(const AffineTransform& matrix)
    8154{
    8255    m_type = SVG_TRANSFORM_MATRIX;
    8356    m_angle = 0;
     57    m_matrix = matrix;
     58}
    8459
    85     m_matrix = matrix;
     60void SVGTransform::updateMatrix()
     61{
     62    // The underlying matrix has been changed, alter the transformation type.
     63    // Spec: In case the matrix object is changed directly (i.e., without using the methods on the SVGTransform interface itself)
     64    // then the type of the SVGTransform changes to SVG_TRANSFORM_MATRIX.
     65    m_type = SVG_TRANSFORM_MATRIX;
     66    m_angle = 0;
    8667}
    8768
     
    146127}
    147128
     129} // namespace WebCore
     130
    148131#endif // ENABLE(SVG)
    149 
  • trunk/WebCore/svg/SVGTransform.h

    r66397 r71802  
    2323
    2424#if ENABLE(SVG)
    25 #include "AffineTransform.h"
    2625#include "FloatPoint.h"
     26#include "SVGMatrix.h"
    2727
    2828namespace WebCore {
     29
     30class FloatSize;
     31
     32class SVGTransform {
     33public:
     34    enum SVGTransformType {
     35        SVG_TRANSFORM_UNKNOWN = 0,
     36        SVG_TRANSFORM_MATRIX = 1,
     37        SVG_TRANSFORM_TRANSLATE = 2,
     38        SVG_TRANSFORM_SCALE = 3,
     39        SVG_TRANSFORM_ROTATE = 4,
     40        SVG_TRANSFORM_SKEWX = 5,
     41        SVG_TRANSFORM_SKEWY = 6
     42    };
     43 
     44    SVGTransform();
     45    SVGTransform(SVGTransformType);
     46    explicit SVGTransform(const AffineTransform&);
     47
     48    SVGTransformType type() const { return m_type; }
     49
     50    SVGMatrix& svgMatrix() { return static_cast<SVGMatrix&>(m_matrix); }
     51    AffineTransform matrix() const { return m_matrix; }
     52    void updateMatrix();
     53
     54    float angle() const { return m_angle; }
     55    FloatPoint rotationCenter() const { return m_center; }
     56
     57    void setMatrix(const AffineTransform&);
     58    void setTranslate(float tx, float ty);
     59    void setScale(float sx, float sy);
     60    void setRotate(float angle, float cx, float cy);
     61    void setSkewX(float angle);
     62    void setSkewY(float angle);
    2963   
    30     class FloatSize;
     64    // Internal use only (animation system)
     65    FloatPoint translate() const;
     66    FloatSize scale() const;
    3167
    32     class SVGTransform {
    33     public:
    34         enum SVGTransformType {
    35             SVG_TRANSFORM_UNKNOWN           = 0,
    36             SVG_TRANSFORM_MATRIX            = 1,
    37             SVG_TRANSFORM_TRANSLATE         = 2,
    38             SVG_TRANSFORM_SCALE             = 3,
    39             SVG_TRANSFORM_ROTATE            = 4,
    40             SVG_TRANSFORM_SKEWX             = 5,
    41             SVG_TRANSFORM_SKEWY             = 6
    42         };
    43  
    44         SVGTransform();
    45         SVGTransform(SVGTransformType);
    46         explicit SVGTransform(const AffineTransform&);
     68    bool isValid() const { return m_type != SVG_TRANSFORM_UNKNOWN; }
    4769
    48         SVGTransformType type() const;
     70private:
     71    friend bool operator==(const SVGTransform& a, const SVGTransform& b);
    4972
    50         AffineTransform matrix() const;
    51    
    52         float angle() const;
    53         FloatPoint rotationCenter() const;
     73    SVGTransformType m_type;
     74    float m_angle;
     75    FloatPoint m_center;
     76    AffineTransform m_matrix;
     77};
    5478
    55         void setMatrix(AffineTransform);
     79inline bool operator==(const SVGTransform& a, const SVGTransform& b)
     80{
     81    return a.m_type == b.m_type && a.m_angle == b.m_angle && a.m_matrix == b.m_matrix;
     82}
    5683
    57         void setTranslate(float tx, float ty);
    58         void setScale(float sx, float sy);
    59         void setRotate(float angle, float cx, float cy);
    60         void setSkewX(float angle);
    61         void setSkewY(float angle);
    62        
    63         // Internal use only (animation system)
    64         FloatPoint translate() const;
    65         FloatSize scale() const;
    66        
    67         bool isValid();
     84inline bool operator!=(const SVGTransform& a, const SVGTransform& b)
     85{
     86    return !(a == b);
     87}
    6888
    69     private:
    70         SVGTransformType m_type;
    71         float m_angle;
    72         FloatPoint m_center;
    73         AffineTransform m_matrix;
    74     };
    75 
    76     inline bool operator==(const SVGTransform& a, const SVGTransform& b)
    77     {
    78         return a.type() == b.type() && a.angle() == b.angle() && a.matrix() == b.matrix();
    79     }
    80    
    81     inline bool operator!=(const SVGTransform& a, const SVGTransform& b)
    82     {
    83         return !(a == b);
    84     }
    85    
    8689} // namespace WebCore
    8790
  • trunk/WebCore/svg/SVGTransform.idl

    r64579 r71802  
    2222module svg {
    2323
    24     interface [Conditional=SVG, PODType=SVGTransform] SVGTransform {
     24    interface [Conditional=SVG] SVGTransform {
    2525        // Transform Types
    26         const unsigned short SVG_TRANSFORM_UNKNOWN   = 0;
    27         const unsigned short SVG_TRANSFORM_MATRIX    = 1;
     26        const unsigned short SVG_TRANSFORM_UNKNOWN = 0;
     27        const unsigned short SVG_TRANSFORM_MATRIX = 1;
    2828        const unsigned short SVG_TRANSFORM_TRANSLATE = 2;
    29         const unsigned short SVG_TRANSFORM_SCALE     = 3;
    30         const unsigned short SVG_TRANSFORM_ROTATE    = 4;
    31         const unsigned short SVG_TRANSFORM_SKEWX     = 5;
    32         const unsigned short SVG_TRANSFORM_SKEWY     = 6;
     29        const unsigned short SVG_TRANSFORM_SCALE = 3;
     30        const unsigned short SVG_TRANSFORM_ROTATE = 4;
     31        const unsigned short SVG_TRANSFORM_SKEWX = 5;
     32        const unsigned short SVG_TRANSFORM_SKEWY = 6;
    3333
    3434        readonly attribute unsigned short type;
     
    3636        readonly attribute float angle;
    3737
    38         void setMatrix(in SVGMatrix matrix);
    39         void setTranslate(in float tx, in float ty);
    40         void setScale(in float sx, in float sy);
    41         void setRotate(in float angle, in float cx, in float cy);
    42         void setSkewX(in float angle);
    43         void setSkewY(in float angle);
     38        [StrictTypeChecking, RequiresAllArguments=Raise] void setMatrix(in SVGMatrix matrix);
     39        [StrictTypeChecking, RequiresAllArguments=Raise] void setTranslate(in float tx, in float ty);
     40        [StrictTypeChecking, RequiresAllArguments=Raise] void setScale(in float sx, in float sy);
     41        [StrictTypeChecking, RequiresAllArguments=Raise] void setRotate(in float angle, in float cx, in float cy);
     42        [StrictTypeChecking, RequiresAllArguments=Raise] void setSkewX(in float angle);
     43        [StrictTypeChecking, RequiresAllArguments=Raise] void setSkewY(in float angle);
    4444    };
    4545
  • trunk/WebCore/svg/SVGTransformList.cpp

    r64579 r71802  
    2727#include "SVGSVGElement.h"
    2828#include "SVGTransform.h"
     29#include <wtf/text/StringConcatenate.h>
     30#include <wtf/text/StringBuilder.h>
    2931
    30 using namespace WebCore;
     32namespace WebCore {
    3133
    32 SVGTransformList::SVGTransformList(const QualifiedName& attributeName)
    33     : SVGPODList<SVGTransform>(attributeName)
    34 {
    35 }
    36 
    37 SVGTransformList::~SVGTransformList()
    38 {
    39 }
    40 
    41 SVGTransform SVGTransformList::createSVGTransformFromMatrix(const AffineTransform& matrix) const
     34SVGTransform SVGTransformList::createSVGTransformFromMatrix(const SVGMatrix& matrix) const
    4235{
    4336    return SVGSVGElement::createSVGTransformFromMatrix(matrix);
     
    4639SVGTransform SVGTransformList::consolidate()
    4740{
    48     ExceptionCode ec = 0;
    49     return initialize(concatenate(), ec);
     41    AffineTransform matrix;
     42    if (!concatenate(matrix))
     43        return SVGTransform();
     44
     45    SVGTransform transform(matrix);
     46    clear();
     47    append(transform);
     48    return transform;
    5049}
    5150
    52 SVGTransform SVGTransformList::concatenate() const
     51bool SVGTransformList::concatenate(AffineTransform& result) const
    5352{
    54     unsigned int length = numberOfItems();
    55     if (!length)
    56         return SVGTransform();
    57        
    58     AffineTransform matrix;
    59     ExceptionCode ec = 0;
    60     for (unsigned int i = 0; i < length; i++)
    61         matrix = getItem(i, ec).matrix() * matrix;
     53    unsigned size = this->size();
     54    if (!size)
     55        return false;
    6256
    63     return SVGTransform(matrix);
     57    for (unsigned i = 0; i < size; ++i)
     58        result = at(i).matrix() * result;
     59
     60    return true;
    6461}
    6562
     
    6764{
    6865    // TODO: We may want to build a real transform string, instead of concatting to a matrix(...).
    69     SVGTransform transform = concatenate();
    70     if (transform.type() == SVGTransform::SVG_TRANSFORM_MATRIX) {
    71         AffineTransform matrix = transform.matrix();
    72         return String::format("matrix(%f %f %f %f %f %f)", matrix.a(), matrix.b(), matrix.c(), matrix.d(), matrix.e(), matrix.f());
    73     }
     66    AffineTransform matrix;
     67    concatenate(matrix);
    7468
    75     return String();
     69    StringBuilder builder;
     70    builder.append(makeString("matrix(", String::number(matrix.a()), ' ', String::number(matrix.b()), ' ', String::number(matrix.c()), ' '));
     71    builder.append(makeString(String::number(matrix.d()), ' ', String::number(matrix.e()), ' ', String::number(matrix.f()), ')'));
     72    return builder.toString();
    7673}
    7774
     75} // namespace WebCore
     76
    7877#endif // ENABLE(SVG)
  • trunk/WebCore/svg/SVGTransformList.h

    r65021 r71802  
    2323
    2424#if ENABLE(SVG)
    25 #include "SVGList.h"
    2625#include "SVGTransform.h"
    27 #include <wtf/Forward.h>
    28 #include <wtf/PassRefPtr.h>
     26#include <wtf/Vector.h>
     27#include <wtf/text/WTFString.h>
    2928
    3029namespace WebCore {
    3130
    32     class SVGTransformList : public SVGPODList<SVGTransform> {
    33     public:
    34         static PassRefPtr<SVGTransformList> create(const QualifiedName& attributeName) { return adoptRef(new SVGTransformList(attributeName)); }
    35         virtual ~SVGTransformList();
     31class SVGTransformList : public Vector<SVGTransform> {
     32public:
     33    SVGTransformList() { }
    3634
    37         SVGTransform createSVGTransformFromMatrix(const AffineTransform&) const;
    38         SVGTransform consolidate();
     35    SVGTransform createSVGTransformFromMatrix(const SVGMatrix&) const;
     36    SVGTransform consolidate();
    3937
    40         // Internal use only
    41         SVGTransform concatenate() const;
     38    // Internal use only
     39    bool concatenate(AffineTransform& result) const;
    4240 
    43         String valueAsString() const;
    44 
    45     private:
    46         SVGTransformList(const QualifiedName&);
    47     };
     41    String valueAsString() const;
     42};
    4843
    4944} // namespace WebCore
  • trunk/WebCore/svg/SVGTransformList.idl

    r64579 r71802  
    3232        void clear()
    3333            raises(DOMException);
    34         SVGTransform initialize(in SVGTransform item)
     34        [StrictTypeChecking, RequiresAllArguments=Raise] SVGTransform initialize(in SVGTransform item)
    3535            raises(DOMException, SVGException);
    36         SVGTransform getItem(in unsigned long index)
     36        [StrictTypeChecking, RequiresAllArguments=Raise] SVGTransform getItem(in unsigned long index)
    3737            raises(DOMException);
    38         SVGTransform insertItemBefore(in SVGTransform item, in unsigned long index)
     38        [StrictTypeChecking, RequiresAllArguments=Raise] SVGTransform insertItemBefore(in SVGTransform item, in unsigned long index)
    3939            raises(DOMException, SVGException);
    40         SVGTransform replaceItem(in SVGTransform item, in unsigned long index)
     40        [StrictTypeChecking, RequiresAllArguments=Raise] SVGTransform replaceItem(in SVGTransform item, in unsigned long index)
    4141            raises(DOMException, SVGException);
    42         SVGTransform removeItem(in unsigned long index)
     42        [StrictTypeChecking, RequiresAllArguments=Raise] SVGTransform removeItem(in unsigned long index)
    4343            raises(DOMException);
    44         SVGTransform appendItem(in SVGTransform item)
     44        [StrictTypeChecking, RequiresAllArguments=Raise] SVGTransform appendItem(in SVGTransform item)
    4545            raises(DOMException, SVGException);
    46         SVGTransform createSVGTransformFromMatrix(in SVGMatrix matrix);
    47         SVGTransform consolidate();
     46
     47        [StrictTypeChecking, RequiresAllArguments=Raise] SVGTransform createSVGTransformFromMatrix(in SVGMatrix matrix);
     48        SVGTransform consolidate()
     49            raises(DOMException);
    4850    };
    4951
  • trunk/WebCore/svg/SVGTransformable.cpp

    r66397 r71802  
    9090static const int optionalValuesForType[] =  {0, 0, 1, 1, 2, 0, 0};
    9191
    92 bool SVGTransformable::parseTransformValue(unsigned type, const UChar*& ptr, const UChar* end, SVGTransform& t)
     92bool SVGTransformable::parseTransformValue(unsigned type, const UChar*& ptr, const UChar* end, SVGTransform& transform)
    9393{
    9494    if (type == SVGTransform::SVG_TRANSFORM_UNKNOWN)
     
    101101
    102102    switch (type) {
    103         case SVGTransform::SVG_TRANSFORM_SKEWX:
    104            t.setSkewX(values[0]);
    105             break;
    106         case SVGTransform::SVG_TRANSFORM_SKEWY:
    107                t.setSkewY(values[0]);
    108             break;
    109         case SVGTransform::SVG_TRANSFORM_SCALE:
    110               if (valueCount == 1) // Spec: if only one param given, assume uniform scaling
    111                   t.setScale(values[0], values[0]);
    112               else
    113                   t.setScale(values[0], values[1]);
    114             break;
    115         case SVGTransform::SVG_TRANSFORM_TRANSLATE:
    116               if (valueCount == 1) // Spec: if only one param given, assume 2nd param to be 0
    117                   t.setTranslate(values[0], 0);
    118               else
    119                   t.setTranslate(values[0], values[1]);
    120             break;
    121         case SVGTransform::SVG_TRANSFORM_ROTATE:
    122               if (valueCount == 1)
    123                   t.setRotate(values[0], 0, 0);
    124               else
    125                   t.setRotate(values[0], values[1], values[2]);
    126             break;
    127         case SVGTransform::SVG_TRANSFORM_MATRIX:
    128             t.setMatrix(AffineTransform(values[0], values[1], values[2], values[3], values[4], values[5]));
    129             break;
     103    case SVGTransform::SVG_TRANSFORM_SKEWX:
     104        transform.setSkewX(values[0]);
     105        break;
     106    case SVGTransform::SVG_TRANSFORM_SKEWY:
     107        transform.setSkewY(values[0]);
     108        break;
     109    case SVGTransform::SVG_TRANSFORM_SCALE:
     110        if (valueCount == 1) // Spec: if only one param given, assume uniform scaling
     111            transform.setScale(values[0], values[0]);
     112        else
     113            transform.setScale(values[0], values[1]);
     114        break;
     115    case SVGTransform::SVG_TRANSFORM_TRANSLATE:
     116        if (valueCount == 1) // Spec: if only one param given, assume 2nd param to be 0
     117            transform.setTranslate(values[0], 0);
     118        else
     119            transform.setTranslate(values[0], values[1]);
     120        break;
     121    case SVGTransform::SVG_TRANSFORM_ROTATE:
     122        if (valueCount == 1)
     123            transform.setRotate(values[0], 0, 0);
     124        else
     125            transform.setRotate(values[0], values[1], values[2]);
     126        break;
     127    case SVGTransform::SVG_TRANSFORM_MATRIX:
     128        transform.setMatrix(AffineTransform(values[0], values[1], values[2], values[3], values[4], values[5]));
     129        break;
    130130    }
    131131
     
    166166}
    167167
    168 bool SVGTransformable::parseTransformAttribute(SVGTransformList* list, const AtomicString& transform)
     168bool SVGTransformable::parseTransformAttribute(SVGTransformList& list, const AtomicString& transform)
    169169{
    170170    const UChar* start = transform.characters();
     
    172172}
    173173
    174 bool SVGTransformable::parseTransformAttribute(SVGTransformList* list, const UChar*& currTransform, const UChar* end, TransformParsingMode mode)
    175 {
    176     ExceptionCode ec = 0;
    177     if (mode == ClearList) {
    178         list->clear(ec);
    179         ASSERT(!ec);
    180     }
     174bool SVGTransformable::parseTransformAttribute(SVGTransformList& list, const UChar*& currTransform, const UChar* end, TransformParsingMode mode)
     175{
     176    if (mode == ClearList)
     177        list.clear();
    181178
    182179    bool delimParsed = false;
     
    189186            return false;
    190187
    191         SVGTransform t;
    192         if (!parseTransformValue(type, currTransform, end, t))
     188        SVGTransform transform;
     189        if (!parseTransformValue(type, currTransform, end, transform))
    193190            return false;
    194191
    195         list->appendItem(t, ec);
     192        list.append(transform);
    196193        skipOptionalSpaces(currTransform, end);
    197194        if (currTransform < end && *currTransform == ',') {
  • trunk/WebCore/svg/SVGTransformable.h

    r66397 r71802  
    4141    };
    4242
    43     static bool parseTransformAttribute(SVGTransformList*, const AtomicString& transform);
    44     static bool parseTransformAttribute(SVGTransformList*, const UChar*& ptr, const UChar* end, TransformParsingMode mode = ClearList);
     43    static bool parseTransformAttribute(SVGTransformList&, const AtomicString& transform);
     44    static bool parseTransformAttribute(SVGTransformList&, const UChar*& ptr, const UChar* end, TransformParsingMode mode = ClearList);
    4545    static bool parseTransformValue(unsigned type, const UChar*& ptr, const UChar* end, SVGTransform&);
    4646
  • trunk/WebCore/svg/SVGViewSpec.cpp

    r70631 r71802  
    3434SVGViewSpec::SVGViewSpec(SVGElement* contextElement)
    3535    : m_contextElement(contextElement)
    36     , m_transform(SVGTransformList::create(SVGNames::transformAttr))
    3736{
    3837}
     
    4039void SVGViewSpec::setTransform(const String& transform)
    4140{
    42     SVGTransformable::parseTransformAttribute(m_transform.get(), transform);
     41    SVGTransformable::parseTransformAttribute(m_transform, transform);
    4342}
    4443
     
    145144                return false;
    146145            currViewSpec++;
    147             SVGTransformable::parseTransformAttribute(m_transform.get(), currViewSpec, end, SVGTransformable::DoNotClearList);
     146            SVGTransformable::parseTransformAttribute(m_transform, currViewSpec, end, SVGTransformable::DoNotClearList);
    148147            if (currViewSpec >= end || *currViewSpec != ')')
    149148                return false;
  • trunk/WebCore/svg/SVGViewSpec.h

    r71103 r71802  
    4343
    4444        void setTransform(const String&);
    45         SVGTransformList* transform() const { return m_transform.get(); }
     45        SVGTransformList transform() const { return m_transform; }
    4646
    4747        void setViewBoxString(const String&);
     
    6262        DECLARE_ANIMATED_PROPERTY_NEW(SVGViewSpec, SVGNames::preserveAspectRatioAttr, SVGPreserveAspectRatio, PreserveAspectRatio, preserveAspectRatio)
    6363
    64         mutable RefPtr<SVGTransformList> m_transform;
     64        SVGTransformList m_transform;
    6565        String m_viewTargetString;
    6666    };
  • trunk/WebCore/svg/properties/SVGAnimatedListPropertyTearOff.h

    r71329 r71802  
    9292    }
    9393
     94protected:
    9495    SVGAnimatedListPropertyTearOff(SVGElement* contextElement, const QualifiedName& attributeName, PropertyType& values)
    9596        : SVGAnimatedProperty(contextElement, attributeName)
     
    100101    }
    101102
    102 private:
    103103    PropertyType& m_values;
    104104
  • trunk/WebCore/svg/properties/SVGAnimatedPropertyMacros.h

    r71227 r71802  
    2828#include "SVGAnimatedPropertySynchronizer.h"
    2929#include "SVGAnimatedPropertyTearOff.h"
     30#include "SVGAnimatedTransformListPropertyTearOff.h"
    3031#include "SVGNames.h" // FIXME: Temporary hack, until we expand the macros in all files, so we don't need a global SVGNames.h include
    3132#include "SVGPropertyTraits.h"
     
    157158}
    158159
     160#define DECLARE_ANIMATED_TRANSFORM_LIST_PROPERTY_NEW(OwnerType, DOMAttribute, PropertyType, UpperProperty, LowerProperty) \
     161DECLARE_ANIMATED_PROPERTY_NEW_SHARED(OwnerType, DOMAttribute, DOMAttribute.localName(), SVGAnimatedTransformListPropertyTearOff, PropertyType, UpperProperty, LowerProperty) \
     162\
     163void detachAnimated##UpperProperty##ListWrappers(unsigned newListSize) \
     164{ \
     165    SVGElement* contextElement = GetOwnerElementForType<OwnerType, IsDerivedFromSVGElement<OwnerType>::value>::ownerElement(this); \
     166    SVGAnimatedProperty* wrapper = SVGAnimatedProperty::lookupWrapper<SVGAnimatedTransformListPropertyTearOff>(contextElement, DOMAttribute.localName()); \
     167    if (!wrapper) \
     168        return; \
     169    static_cast<SVGAnimatedTransformListPropertyTearOff*>(wrapper)->detachListWrappers(newListSize); \
     170}
     171
     172
    159173}
    160174
  • trunk/WebCore/svg/properties/SVGListPropertyTearOff.h

    r71329 r71802  
    110110    }
    111111
    112 private:
     112protected:
    113113    SVGListPropertyTearOff(AnimatedListPropertyTearOff* animatedProperty, SVGPropertyRole role)
    114114        : SVGListProperty<PropertyType>(role)
     
    180180    }
    181181
    182 private:
    183182    // Back pointer to the animated property that created us
    184183    // For example (text.x.baseVal): m_animatedProperty points to the 'x' SVGAnimatedLengthList object
  • trunk/WebCore/svg/properties/SVGProperty.h

    r70223 r71802  
    3535public:
    3636    virtual ~SVGProperty() { }
     37
     38    virtual void commitChange() = 0;
    3739};
    3840
  • trunk/WebCore/svg/properties/SVGPropertyTearOff.h

    r71512 r71802  
    7070    void detachWrapper()
    7171    {
     72        if (m_valueIsCopy)
     73            return;
     74
    7275        // Switch from a live value, to a non-live value.
    7376        // For example: <text x="50"/>
     
    7780        // w/o changing the "new item" (with x=100) in the text element.
    7881        // Whenever the XML DOM modifies the "x" attribute, all existing wrappers are detached, using this function.
    79         ASSERT(!m_valueIsCopy);
    8082        m_value = new PropertyType(*m_value);
    8183        m_valueIsCopy = true;
  • trunk/WebCore/svg/properties/SVGPropertyTraits.h

    r71512 r71802  
    3131#include "SVGPreserveAspectRatio.h"
    3232#include "SVGStringList.h"
     33#include "SVGTransformList.h"
    3334#include <wtf/text/StringBuilder.h>
    3435
     
    131132};
    132133
     134template<>
     135struct SVGPropertyTraits<SVGTransformList> {
     136    static SVGTransformList initialValue() { return SVGTransformList(); }
     137    static String toString(const SVGTransformList& type) { return type.valueAsString(); }
     138    typedef SVGTransform ListItemType;
     139};
     140
    133141}
    134142
Note: See TracChangeset for help on using the changeset viewer.