Changeset 243730 in webkit


Ignore:
Timestamp:
Apr 1, 2019 6:31:54 PM (5 years ago)
Author:
commit-queue@webkit.org
Message:

Remove the SVG tear off objects for SVGMatrix, SVGTransfrom, SVGTransformList and SVGAnimatedTransformList
https://bugs.webkit.org/show_bug.cgi?id=196086

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2019-04-01
Reviewed by Simon Fraser.

Source/WebCore:

The IDL changes:

SVGTransform.idl:

Remove the NewObject qualifier from matrix attribute. This matches
the specs: https://www.w3.org/TR/SVG11/coords.html#InterfaceSVGTransform.
SVGTransform will internally hold an SVGMatrix. A change in this
SVGMatrix will affect the container SVGTransform.

SVGTransformList.idl:

Remove the NewObject qualifier from consolidate() method. This matches
the specs:
https://www.w3.org/TR/SVG11/coords.html#__svg__SVGTransformList__consolidate
The method consolidate() should return a reference to the first item
in the list after consolidating it.

Code changes:

-- SVGMatrix is now a superclass of SVGValueProperty<AffineTransform>.

No need for SVGMatrixValue since it was wrapper of AffineTransform.

-- SVGTransformValue now holds a Ref<SVGMatrix> member in addition to the

angle and the rotationCenter. Ref<SVGMatrix> is what SVGTransform.matrix
will return. So a change in this matrix will change the owner SVGTransform.

-- SVGTransform is now the owner of SVGMatrix via its SVGTransformValue.

-- SVGTransformList is now a superclass of SVGValuePropertyList<SVGTransform>.

It is responsible for parsing a String to items of SVGTransform.

-- SVGAnimatedTransformList is now defined as SVGAnimatedPropertyList<

SVGTransformList>.

Note the ownership chain of these objects is the following:

-- SVGAnimatedTransformList owns the SVGTransformList via its baseVal

and animVal members.

-- SVGTransformList owns SVGTransform via its list of items

-- SVGTransform owns SVGMatrix via its SVGTransformValue.

So a change in SVGMatrix will propagate to the owner SVGElement through
the following ownership chain:

SVGMatrix

|_ SVGTransfrom

|_ SVGTransformList

|_ SVGAmimatedTransformList

|_ SVGElement

To get the mechanics of this change right, a new accessor, a new animator
and animation functions are added for the SVGAnimatedTransformList.

-- SVGViewSpec used to hold an SVGAnimatedTransformListAttribute for the
member m_transform although this member should not be animated. See the
comment in the old SVGViewSpec::transform(). This has been changed in this
patch. SVGViewSpec now holds Ref<SVGTransformList> which matches the specs:
https://www.w3.org/TR/SVG11/types.html#InterfaceSVGViewSpec.

  • Sources.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • svg/SVGAnimateElementBase.cpp:

(WebCore::SVGAnimateElementBase::attributeAnimationController):
(WebCore::SVGAnimateElementBase::hasValidAttributeType const):
(WebCore::SVGAnimateElementBase::calculateToAtEndOfDurationValue):
(WebCore::SVGAnimateElementBase::calculateFromAndToValues):
(WebCore::SVGAnimateElementBase::calculateFromAndByValues):

  • svg/SVGAnimateElementBase.h:

(WebCore::SVGAnimateElementBase::animateRangeString const):

  • svg/SVGAnimateTransformElement.cpp:

(WebCore::SVGAnimateTransformElement::animateRangeString const):

  • svg/SVGAnimateTransformElement.h:

This change is needed because animating the transform attribute can be

written as

<animate ... from="translate(100)" to="translate(200)"/>

or

<animateTransform type="translate" from="100" to="200"/>"

So we need to surround the animation range string with the type qualifier
for animateTransform.

  • svg/SVGAnimatedTransformList.cpp: Removed.
  • svg/SVGAnimatedTransformList.h: Removed.
  • svg/SVGAnimatedType.h: Removed.
  • svg/SVGAnimatedTypeAnimator.cpp: Removed.
  • svg/SVGAnimatedTypeAnimator.h: Removed.
  • svg/SVGAnimationElement.cpp:

(WebCore::SVGAnimationElement::adjustForInheritance): Deleted.

  • svg/SVGAnimationElement.h:

(WebCore::SVGAnimationElement::adjustForInheritance): Deleted.
(WebCore::SVGAnimationElement::adjustFromToListValues): Deleted.
(WebCore::SVGAnimationElement::animateDiscreteType): Deleted.
These functions were used by SVGLegacyAttributeAnimationController.

  • svg/SVGAnimatorFactory.h: Removed.
  • svg/SVGExternalResourcesRequired.h:

(WebCore::SVGExternalResourcesRequired::isKnownAttribute):

  • svg/SVGFEImageElement.h:
  • svg/SVGFEMorphologyElement.h:
  • svg/SVGFETileElement.h:
  • svg/SVGFitToViewBox.h:

(WebCore::SVGFitToViewBox::isKnownAttribute):

  • svg/SVGGradientElement.cpp:

(WebCore::SVGGradientElement::SVGGradientElement):
(WebCore::SVGGradientElement::parseAttribute):
(WebCore::SVGGradientElement::registerAttributes): Deleted.

  • svg/SVGGradientElement.h:

(WebCore::SVGGradientElement::gradientTransform const):
(WebCore::SVGGradientElement::gradientTransformAnimated):
(WebCore::SVGGradientElement::isKnownAttribute):

  • svg/SVGGraphicsElement.cpp:

(WebCore::SVGGraphicsElement::SVGGraphicsElement):
(WebCore::SVGGraphicsElement::animatedLocalTransform const):
(WebCore::SVGGraphicsElement::parseAttribute):
(WebCore::SVGGraphicsElement::svgAttributeChanged):
There is one attribute for this element which is "SVGNames::transformAttr"
So there is no need to check for it twice.

(WebCore::SVGGraphicsElement::registerAttributes): Deleted.

  • svg/SVGGraphicsElement.h:

(WebCore::SVGGraphicsElement::transform const):
(WebCore::SVGGraphicsElement::transformAnimated):
(WebCore::SVGGraphicsElement::isKnownAttribute): Deleted.

  • svg/SVGLangSpace.cpp:

(WebCore::SVGLangSpace::SVGLangSpace):
(WebCore::SVGLangSpace::xmlspace const):
(WebCore::SVGLangSpace::isKnownAttribute):
(WebCore::SVGLangSpace::svgAttributeChanged):
(WebCore::SVGLangSpace::registerAttributes): Deleted.

  • svg/SVGLangSpace.h:

(WebCore::SVGLangSpace::xmllang const):
(WebCore::SVGLangSpace::setXmllang):
(WebCore::SVGLangSpace::setXmlspace):
(WebCore::SVGLangSpace::attributeRegistry): Deleted.
(WebCore::SVGLangSpace::isKnownAttribute): Deleted.

  • svg/SVGLegacyAttributeAnimationController.cpp: Removed.
  • svg/SVGLegacyAttributeAnimationController.h: Removed.
  • svg/SVGLinearGradientElement.cpp:

(WebCore::setGradientAttributes):

  • svg/SVGMaskElement.h:
  • svg/SVGMatrix.h:

(WebCore::SVGMatrix::create):
(WebCore::SVGMatrix::a const):
(WebCore::SVGMatrix::setA):
(WebCore::SVGMatrix::b const):
(WebCore::SVGMatrix::setB):
(WebCore::SVGMatrix::c const):
(WebCore::SVGMatrix::setC):
(WebCore::SVGMatrix::d const):
(WebCore::SVGMatrix::setD):
(WebCore::SVGMatrix::e const):
(WebCore::SVGMatrix::setE):
(WebCore::SVGMatrix::f const):
(WebCore::SVGMatrix::setF):
(WebCore::SVGMatrix::multiply const):
(WebCore::SVGMatrix::inverse const):
(WebCore::SVGMatrix::translate const):
(WebCore::SVGMatrix::scale const):
(WebCore::SVGMatrix::scaleNonUniform const):
(WebCore::SVGMatrix::rotate const):
(WebCore::SVGMatrix::rotateFromVector const):
(WebCore::SVGMatrix::flipX const):
(WebCore::SVGMatrix::flipY const):
(WebCore::SVGMatrix::skewX const):
(WebCore::SVGMatrix::skewY const):

  • svg/SVGPatternElement.cpp:

(WebCore::SVGPatternElement::SVGPatternElement):
(WebCore::SVGPatternElement::parseAttribute):
(WebCore::SVGPatternElement::svgAttributeChanged):
(WebCore::SVGPatternElement::collectPatternAttributes const):
(WebCore::SVGPatternElement::localCoordinateSpaceTransform const):
(WebCore::SVGPatternElement::registerAttributes): Deleted.

  • svg/SVGPatternElement.h:
  • svg/SVGPoint.h:

(WebCore::SVGPoint::matrixTransform const):

  • svg/SVGPolyElement.h:

(WebCore::SVGPolyElement::isKnownAttribute): Deleted.

  • svg/SVGRadialGradientElement.cpp:

(WebCore::setGradientAttributes):

  • svg/SVGSVGElement.cpp:

(WebCore::SVGSVGElement::createSVGTransform):
(WebCore::SVGSVGElement::createSVGTransformFromMatrix):
(WebCore::SVGSVGElement::viewBoxToViewTransform const):

  • svg/SVGTextElement.cpp:

(WebCore::SVGTextElement::animatedLocalTransform const):

  • svg/SVGTransform.cpp: Removed.
  • svg/SVGTransform.h:

(WebCore::SVGTransform::create):
(WebCore::SVGTransform::~SVGTransform):
(WebCore::SVGTransform::clone const):
(WebCore::SVGTransform::type):
(WebCore::SVGTransform::angle):
(WebCore::SVGTransform::matrix):
(WebCore::SVGTransform::setMatrix):
(WebCore::SVGTransform::setTranslate):
(WebCore::SVGTransform::setScale):
(WebCore::SVGTransform::setRotate):
(WebCore::SVGTransform::setSkewX):
(WebCore::SVGTransform::setSkewY):
(WebCore::SVGTransform::SVGTransform):

  • svg/SVGTransform.idl:
  • svg/SVGTransformList.h:
  • svg/SVGTransformList.idl:
  • svg/SVGTransformListValues.cpp: Removed.
  • svg/SVGTransformListValues.h: Removed.
  • svg/SVGTransformValue.cpp: Removed.
  • svg/SVGTransformValue.h:

(WebCore::SVGTransformValue::SVGTransformValue):
(WebCore::SVGTransformValue::operator=):
(WebCore::SVGTransformValue::matrix const):
(WebCore::SVGTransformValue::rotationCenter const):
(WebCore::SVGTransformValue::isValid const):
(WebCore::SVGTransformValue::setMatrix):
(WebCore::SVGTransformValue::matrixDidChange):
(WebCore::SVGTransformValue::translate const):
(WebCore::SVGTransformValue::setTranslate):
(WebCore::SVGTransformValue::scale const):
(WebCore::SVGTransformValue::setScale):
(WebCore::SVGTransformValue::setRotate):
(WebCore::SVGTransformValue::setSkewX):
(WebCore::SVGTransformValue::setSkewY):
(WebCore::SVGTransformValue::valueAsString const):
(WebCore::SVGTransformValue::prefixForTransfromType):
(WebCore::SVGTransformValue::appendNumbers const):
(WebCore::SVGTransformValue::appendMatrix const):
(WebCore::SVGTransformValue::appendTranslate const):
(WebCore::SVGTransformValue::appendScale const):
(WebCore::SVGTransformValue::appendRotate const):
(WebCore::SVGTransformValue::appendSkewX const):
(WebCore::SVGTransformValue::appendSkewY const):
(WebCore::SVGTransformValue::matrix): Deleted.

  • svg/SVGTransformable.cpp:

(WebCore::SVGTransformable::parseAndSkipType):
(WebCore::parseAndSkipType): Deleted.
(WebCore::SVGTransformable::parseTransformAttribute): Deleted.
The code of this function was moved to SVGTransformList::parse().

  • svg/SVGTransformable.h:

There is no need for enum TransformParsingMode. It was used by
SVGViewSpec::parseViewSpec() to tell SVGTransformable::parseTransformAttribute()
not to clear the list. SVGTransfromList now has two parse() functions:
one public and the second is private. The public one clear the list
before parsing the input String. The private one just does the parsing.
SVGViewSpec::parseViewSpec() calls the private once since it is a friend
of SVGTransfromList.

  • svg/SVGValue.h: Removed.
  • svg/SVGViewSpec.cpp:

(WebCore::SVGViewSpec::SVGViewSpec):
(WebCore::SVGViewSpec::reset):
(WebCore::SVGViewSpec::parseViewSpec):
(WebCore::SVGViewSpec::registerAttributes): Deleted.
(WebCore::SVGViewSpec::transform): Deleted.

  • svg/SVGViewSpec.h:
  • svg/properties/SVGAnimatedPropertyAccessorImpl.h:
  • svg/properties/SVGAnimatedPropertyAnimatorImpl.h:
  • svg/properties/SVGAnimatedPropertyImpl.h:
  • svg/properties/SVGAnimatedTransformListPropertyTearOff.h: Removed.
  • svg/properties/SVGAnimationAdditiveListFunctionImpl.h:

(WebCore::SVGAnimationTransformListFunction::progress):

  • svg/properties/SVGAnimationAdditiveValueFunctionImpl.h:
  • svg/properties/SVGAttributeRegistry.h:
  • svg/properties/SVGMatrixTearOff.h: Removed.
  • svg/properties/SVGPropertyAccessorImpl.h:
  • svg/properties/SVGPropertyOwnerRegistry.h:

(WebCore::SVGPropertyOwnerRegistry::registerProperty):

LayoutTests:

  • svg/dom/SVGTransformList-basics-expected.txt:
  • svg/dom/SVGTransformList-basics.xhtml:

These changes are required because SVGTransfromList will be following the
SVG2 specs regarding adding new items to the list.

See https://www.w3.org/TR/SVG/types.html#TermListInterface.

Location:
trunk
Files:
15 deleted
51 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r243719 r243730  
     12019-04-01  Said Abou-Hallawa  <sabouhallawa@apple.com>
     2
     3        Remove the SVG tear off objects for SVGMatrix, SVGTransfrom, SVGTransformList and SVGAnimatedTransformList
     4        https://bugs.webkit.org/show_bug.cgi?id=196086
     5
     6        Reviewed by Simon Fraser.
     7
     8        * svg/dom/SVGTransformList-basics-expected.txt:
     9        * svg/dom/SVGTransformList-basics.xhtml:
     10        These changes are required because SVGTransfromList will be following the
     11        SVG2 specs regarding adding new items to the list.
     12
     13        See https://www.w3.org/TR/SVG/types.html#TermListInterface.
     14
    1152019-04-01  Devin Rousso  <drousso@apple.com>
    216
  • trunk/LayoutTests/svg/dom/SVGTransformList-basics-expected.txt

    r219663 r243730  
    2828PASS circle1.transform.baseVal.insertItemBefore(null) threw exception TypeError: Not enough arguments.
    2929PASS circle1.transform.baseVal.insertItemBefore(circle1.transform.baseVal.getItem(1), 'aString') is circle1.transform.baseVal.getItem(0)
     30PASS dumpTransform(circle1.transform.baseVal.removeItem(2)) is "type=SVG_TRANSFORM_TRANSLATE matrix=[1.0 0.0 0.0 1.0 10.0 10.0]"
    3031PASS circle1.transform.baseVal.numberOfItems is 2
    3132PASS dumpTransform(circle1.transform.baseVal.getItem(0)) is "type=SVG_TRANSFORM_TRANSLATE matrix=[1.0 0.0 0.0 1.0 10.0 10.0]"
     
    3334PASS circle1.getAttribute('transform') is "translate(10 10) scale(2 2)"
    3435PASS circle1.transform.baseVal.insertItemBefore(circle1.transform.baseVal.getItem(1), circle1) is circle1.transform.baseVal.getItem(0)
     36PASS dumpTransform(circle1.transform.baseVal.removeItem(2)) is "type=SVG_TRANSFORM_SCALE matrix=[2.0 0.0 0.0 2.0 0.0 0.0]"
    3537PASS circle1.transform.baseVal.numberOfItems is 2
    3638PASS dumpTransform(circle1.transform.baseVal.getItem(0)) is "type=SVG_TRANSFORM_SCALE matrix=[2.0 0.0 0.0 2.0 0.0 0.0]"
     
    3840PASS circle1.getAttribute('transform') is "scale(2 2) translate(10 10)"
    3941PASS circle1.transform.baseVal.insertItemBefore(circle1.transform.baseVal.getItem(1), null) is circle1.transform.baseVal.getItem(0)
     42PASS dumpTransform(circle1.transform.baseVal.removeItem(2)) is "type=SVG_TRANSFORM_TRANSLATE matrix=[1.0 0.0 0.0 1.0 10.0 10.0]"
    4043PASS circle1.transform.baseVal.numberOfItems is 2
    4144PASS dumpTransform(circle1.transform.baseVal.getItem(0)) is "type=SVG_TRANSFORM_TRANSLATE matrix=[1.0 0.0 0.0 1.0 10.0 10.0]"
     
    4346PASS circle1.getAttribute('transform') is "translate(10 10) scale(2 2)"
    4447PASS circle1.transform.baseVal.insertItemBefore(circle1.transform.baseVal.getItem(1), 0) is circle1.transform.baseVal.getItem(0)
     48PASS dumpTransform(circle1.transform.baseVal.removeItem(2)) is "type=SVG_TRANSFORM_SCALE matrix=[2.0 0.0 0.0 2.0 0.0 0.0]"
    4549PASS circle1.transform.baseVal.numberOfItems is 2
    4650PASS dumpTransform(circle1.transform.baseVal.getItem(0)) is "type=SVG_TRANSFORM_SCALE matrix=[2.0 0.0 0.0 2.0 0.0 0.0]"
  • trunk/LayoutTests/svg/dom/SVGTransformList-basics.xhtml

    r180129 r243730  
    7575 
    7676    shouldBe("circle1.transform.baseVal.insertItemBefore(circle1.transform.baseVal.getItem(1), 'aString')", "circle1.transform.baseVal.getItem(0)");
     77    shouldBeEqualToString("dumpTransform(circle1.transform.baseVal.removeItem(2))", "type=SVG_TRANSFORM_TRANSLATE matrix=[1.0 0.0 0.0 1.0 10.0 10.0]");
    7778    shouldBe("circle1.transform.baseVal.numberOfItems", "2");
    7879    shouldBeEqualToString("dumpTransform(circle1.transform.baseVal.getItem(0))", "type=SVG_TRANSFORM_TRANSLATE matrix=[1.0 0.0 0.0 1.0 10.0 10.0]");
     
    8182
    8283    shouldBe("circle1.transform.baseVal.insertItemBefore(circle1.transform.baseVal.getItem(1), circle1)", "circle1.transform.baseVal.getItem(0)");
     84    shouldBeEqualToString("dumpTransform(circle1.transform.baseVal.removeItem(2))", "type=SVG_TRANSFORM_SCALE matrix=[2.0 0.0 0.0 2.0 0.0 0.0]");
    8385    shouldBe("circle1.transform.baseVal.numberOfItems", "2");
    8486    shouldBeEqualToString("dumpTransform(circle1.transform.baseVal.getItem(0))", "type=SVG_TRANSFORM_SCALE matrix=[2.0 0.0 0.0 2.0 0.0 0.0]");
     
    8789
    8890    shouldBe("circle1.transform.baseVal.insertItemBefore(circle1.transform.baseVal.getItem(1), null)", "circle1.transform.baseVal.getItem(0)");
     91    shouldBeEqualToString("dumpTransform(circle1.transform.baseVal.removeItem(2))", "type=SVG_TRANSFORM_TRANSLATE matrix=[1.0 0.0 0.0 1.0 10.0 10.0]");
    8992    shouldBe("circle1.transform.baseVal.numberOfItems", "2");
    9093    shouldBeEqualToString("dumpTransform(circle1.transform.baseVal.getItem(0))", "type=SVG_TRANSFORM_TRANSLATE matrix=[1.0 0.0 0.0 1.0 10.0 10.0]");
     
    9396
    9497    shouldBe("circle1.transform.baseVal.insertItemBefore(circle1.transform.baseVal.getItem(1), 0)", "circle1.transform.baseVal.getItem(0)");
     98    shouldBeEqualToString("dumpTransform(circle1.transform.baseVal.removeItem(2))", "type=SVG_TRANSFORM_SCALE matrix=[2.0 0.0 0.0 2.0 0.0 0.0]");
    9599    shouldBe("circle1.transform.baseVal.numberOfItems", "2");
    96100    shouldBeEqualToString("dumpTransform(circle1.transform.baseVal.getItem(0))", "type=SVG_TRANSFORM_SCALE matrix=[2.0 0.0 0.0 2.0 0.0 0.0]");
  • trunk/Source/WebCore/ChangeLog

    r243719 r243730  
     12019-04-01  Said Abou-Hallawa  <sabouhallawa@apple.com>
     2
     3        Remove the SVG tear off objects for SVGMatrix, SVGTransfrom, SVGTransformList and SVGAnimatedTransformList
     4        https://bugs.webkit.org/show_bug.cgi?id=196086
     5
     6        Reviewed by Simon Fraser.
     7
     8        The IDL changes:
     9
     10        SVGTransform.idl:
     11            Remove the NewObject qualifier from matrix attribute. This matches
     12            the specs: https://www.w3.org/TR/SVG11/coords.html#InterfaceSVGTransform.
     13            SVGTransform will internally hold an SVGMatrix. A change in this
     14            SVGMatrix will affect the container SVGTransform.
     15
     16        SVGTransformList.idl:
     17            Remove the NewObject qualifier from consolidate() method. This matches
     18            the specs:
     19            https://www.w3.org/TR/SVG11/coords.html#__svg__SVGTransformList__consolidate
     20            The method consolidate() should return a reference to the first item
     21            in the list after consolidating it.
     22
     23        Code changes:
     24
     25        -- SVGMatrix is now a superclass of SVGValueProperty<AffineTransform>.
     26           No need for SVGMatrixValue since it was wrapper of AffineTransform.
     27
     28        -- SVGTransformValue now holds a Ref<SVGMatrix> member in addition to the
     29           angle and the rotationCenter. Ref<SVGMatrix> is what SVGTransform.matrix
     30           will return. So a change in this matrix will change the owner SVGTransform.
     31
     32        -- SVGTransform is now the owner of SVGMatrix via its SVGTransformValue.
     33
     34        -- SVGTransformList is now a superclass of SVGValuePropertyList<SVGTransform>.
     35           It is responsible for parsing a String to items of SVGTransform.
     36
     37        -- SVGAnimatedTransformList is now defined as SVGAnimatedPropertyList<
     38           SVGTransformList>.
     39
     40        Note the ownership chain of these objects is the following:
     41
     42        -- SVGAnimatedTransformList owns the SVGTransformList via its baseVal
     43           and animVal members.
     44
     45        -- SVGTransformList owns SVGTransform via its list of items
     46
     47        -- SVGTransform owns SVGMatrix via its SVGTransformValue.
     48
     49           So a change in SVGMatrix will propagate to the owner SVGElement through
     50           the following ownership chain:
     51
     52           SVGMatrix
     53             |_ SVGTransfrom
     54                  |_ SVGTransformList
     55                       |_ SVGAmimatedTransformList
     56                            |_ SVGElement
     57
     58        To get the mechanics of this change right, a new accessor, a new animator
     59        and animation functions are added for the SVGAnimatedTransformList.
     60
     61        -- SVGViewSpec used to hold an SVGAnimatedTransformListAttribute for the
     62        member m_transform although this member should not be animated. See the
     63        comment in the old SVGViewSpec::transform(). This has been changed in this
     64        patch. SVGViewSpec now holds Ref<SVGTransformList> which matches the specs:
     65        https://www.w3.org/TR/SVG11/types.html#InterfaceSVGViewSpec.
     66
     67        * Sources.txt:
     68        * WebCore.xcodeproj/project.pbxproj:
     69        * svg/SVGAnimateElementBase.cpp:
     70        (WebCore::SVGAnimateElementBase::attributeAnimationController):
     71        (WebCore::SVGAnimateElementBase::hasValidAttributeType const):
     72        (WebCore::SVGAnimateElementBase::calculateToAtEndOfDurationValue):
     73        (WebCore::SVGAnimateElementBase::calculateFromAndToValues):
     74        (WebCore::SVGAnimateElementBase::calculateFromAndByValues):
     75        * svg/SVGAnimateElementBase.h:
     76        (WebCore::SVGAnimateElementBase::animateRangeString const):
     77        * svg/SVGAnimateTransformElement.cpp:
     78        (WebCore::SVGAnimateTransformElement::animateRangeString const):
     79        * svg/SVGAnimateTransformElement.h:
     80                This change is needed because animating the transform attribute can be
     81        written as
     82            <animate ... from="translate(100)" to="translate(200)"/>
     83        or
     84            <animateTransform type="translate" from="100" to="200"/>"
     85        So we need to surround the animation range string with the type qualifier
     86        for animateTransform.
     87
     88        * svg/SVGAnimatedTransformList.cpp: Removed.
     89        * svg/SVGAnimatedTransformList.h: Removed.
     90        * svg/SVGAnimatedType.h: Removed.
     91        * svg/SVGAnimatedTypeAnimator.cpp: Removed.
     92        * svg/SVGAnimatedTypeAnimator.h: Removed.
     93        * svg/SVGAnimationElement.cpp:
     94        (WebCore::SVGAnimationElement::adjustForInheritance): Deleted.
     95        * svg/SVGAnimationElement.h:
     96        (WebCore::SVGAnimationElement::adjustForInheritance): Deleted.
     97        (WebCore::SVGAnimationElement::adjustFromToListValues): Deleted.
     98        (WebCore::SVGAnimationElement::animateDiscreteType): Deleted.
     99        These functions were used by SVGLegacyAttributeAnimationController.
     100
     101        * svg/SVGAnimatorFactory.h: Removed.
     102        * svg/SVGExternalResourcesRequired.h:
     103        (WebCore::SVGExternalResourcesRequired::isKnownAttribute):
     104        * svg/SVGFEImageElement.h:
     105        * svg/SVGFEMorphologyElement.h:
     106        * svg/SVGFETileElement.h:
     107        * svg/SVGFitToViewBox.h:
     108        (WebCore::SVGFitToViewBox::isKnownAttribute):
     109        * svg/SVGGradientElement.cpp:
     110        (WebCore::SVGGradientElement::SVGGradientElement):
     111        (WebCore::SVGGradientElement::parseAttribute):
     112        (WebCore::SVGGradientElement::registerAttributes): Deleted.
     113        * svg/SVGGradientElement.h:
     114        (WebCore::SVGGradientElement::gradientTransform const):
     115        (WebCore::SVGGradientElement::gradientTransformAnimated):
     116        (WebCore::SVGGradientElement::isKnownAttribute):
     117        * svg/SVGGraphicsElement.cpp:
     118        (WebCore::SVGGraphicsElement::SVGGraphicsElement):
     119        (WebCore::SVGGraphicsElement::animatedLocalTransform const):
     120        (WebCore::SVGGraphicsElement::parseAttribute):
     121        (WebCore::SVGGraphicsElement::svgAttributeChanged):
     122        There is one attribute for this element which is "SVGNames::transformAttr"
     123        So there is no need to check for it twice.
     124
     125        (WebCore::SVGGraphicsElement::registerAttributes): Deleted.
     126        * svg/SVGGraphicsElement.h:
     127        (WebCore::SVGGraphicsElement::transform const):
     128        (WebCore::SVGGraphicsElement::transformAnimated):
     129        (WebCore::SVGGraphicsElement::isKnownAttribute): Deleted.
     130        * svg/SVGLangSpace.cpp:
     131        (WebCore::SVGLangSpace::SVGLangSpace):
     132        (WebCore::SVGLangSpace::xmlspace const):
     133        (WebCore::SVGLangSpace::isKnownAttribute):
     134        (WebCore::SVGLangSpace::svgAttributeChanged):
     135        (WebCore::SVGLangSpace::registerAttributes): Deleted.
     136        * svg/SVGLangSpace.h:
     137        (WebCore::SVGLangSpace::xmllang const):
     138        (WebCore::SVGLangSpace::setXmllang):
     139        (WebCore::SVGLangSpace::setXmlspace):
     140        (WebCore::SVGLangSpace::attributeRegistry): Deleted.
     141        (WebCore::SVGLangSpace::isKnownAttribute): Deleted.
     142        * svg/SVGLegacyAttributeAnimationController.cpp: Removed.
     143        * svg/SVGLegacyAttributeAnimationController.h: Removed.
     144        * svg/SVGLinearGradientElement.cpp:
     145        (WebCore::setGradientAttributes):
     146        * svg/SVGMaskElement.h:
     147        * svg/SVGMatrix.h:
     148        (WebCore::SVGMatrix::create):
     149        (WebCore::SVGMatrix::a const):
     150        (WebCore::SVGMatrix::setA):
     151        (WebCore::SVGMatrix::b const):
     152        (WebCore::SVGMatrix::setB):
     153        (WebCore::SVGMatrix::c const):
     154        (WebCore::SVGMatrix::setC):
     155        (WebCore::SVGMatrix::d const):
     156        (WebCore::SVGMatrix::setD):
     157        (WebCore::SVGMatrix::e const):
     158        (WebCore::SVGMatrix::setE):
     159        (WebCore::SVGMatrix::f const):
     160        (WebCore::SVGMatrix::setF):
     161        (WebCore::SVGMatrix::multiply const):
     162        (WebCore::SVGMatrix::inverse const):
     163        (WebCore::SVGMatrix::translate const):
     164        (WebCore::SVGMatrix::scale const):
     165        (WebCore::SVGMatrix::scaleNonUniform const):
     166        (WebCore::SVGMatrix::rotate const):
     167        (WebCore::SVGMatrix::rotateFromVector const):
     168        (WebCore::SVGMatrix::flipX const):
     169        (WebCore::SVGMatrix::flipY const):
     170        (WebCore::SVGMatrix::skewX const):
     171        (WebCore::SVGMatrix::skewY const):
     172        * svg/SVGPatternElement.cpp:
     173        (WebCore::SVGPatternElement::SVGPatternElement):
     174        (WebCore::SVGPatternElement::parseAttribute):
     175        (WebCore::SVGPatternElement::svgAttributeChanged):
     176        (WebCore::SVGPatternElement::collectPatternAttributes const):
     177        (WebCore::SVGPatternElement::localCoordinateSpaceTransform const):
     178        (WebCore::SVGPatternElement::registerAttributes): Deleted.
     179        * svg/SVGPatternElement.h:
     180        * svg/SVGPoint.h:
     181        (WebCore::SVGPoint::matrixTransform const):
     182        * svg/SVGPolyElement.h:
     183        (WebCore::SVGPolyElement::isKnownAttribute): Deleted.
     184        * svg/SVGRadialGradientElement.cpp:
     185        (WebCore::setGradientAttributes):
     186        * svg/SVGSVGElement.cpp:
     187        (WebCore::SVGSVGElement::createSVGTransform):
     188        (WebCore::SVGSVGElement::createSVGTransformFromMatrix):
     189        (WebCore::SVGSVGElement::viewBoxToViewTransform const):
     190        * svg/SVGTextElement.cpp:
     191        (WebCore::SVGTextElement::animatedLocalTransform const):
     192        * svg/SVGTransform.cpp: Removed.
     193        * svg/SVGTransform.h:
     194        (WebCore::SVGTransform::create):
     195        (WebCore::SVGTransform::~SVGTransform):
     196        (WebCore::SVGTransform::clone const):
     197        (WebCore::SVGTransform::type):
     198        (WebCore::SVGTransform::angle):
     199        (WebCore::SVGTransform::matrix):
     200        (WebCore::SVGTransform::setMatrix):
     201        (WebCore::SVGTransform::setTranslate):
     202        (WebCore::SVGTransform::setScale):
     203        (WebCore::SVGTransform::setRotate):
     204        (WebCore::SVGTransform::setSkewX):
     205        (WebCore::SVGTransform::setSkewY):
     206        (WebCore::SVGTransform::SVGTransform):
     207        * svg/SVGTransform.idl:
     208        * svg/SVGTransformList.h:
     209        * svg/SVGTransformList.idl:
     210        * svg/SVGTransformListValues.cpp: Removed.
     211        * svg/SVGTransformListValues.h: Removed.
     212        * svg/SVGTransformValue.cpp: Removed.
     213        * svg/SVGTransformValue.h:
     214        (WebCore::SVGTransformValue::SVGTransformValue):
     215        (WebCore::SVGTransformValue::operator=):
     216        (WebCore::SVGTransformValue::matrix const):
     217        (WebCore::SVGTransformValue::rotationCenter const):
     218        (WebCore::SVGTransformValue::isValid const):
     219        (WebCore::SVGTransformValue::setMatrix):
     220        (WebCore::SVGTransformValue::matrixDidChange):
     221        (WebCore::SVGTransformValue::translate const):
     222        (WebCore::SVGTransformValue::setTranslate):
     223        (WebCore::SVGTransformValue::scale const):
     224        (WebCore::SVGTransformValue::setScale):
     225        (WebCore::SVGTransformValue::setRotate):
     226        (WebCore::SVGTransformValue::setSkewX):
     227        (WebCore::SVGTransformValue::setSkewY):
     228        (WebCore::SVGTransformValue::valueAsString const):
     229        (WebCore::SVGTransformValue::prefixForTransfromType):
     230        (WebCore::SVGTransformValue::appendNumbers const):
     231        (WebCore::SVGTransformValue::appendMatrix const):
     232        (WebCore::SVGTransformValue::appendTranslate const):
     233        (WebCore::SVGTransformValue::appendScale const):
     234        (WebCore::SVGTransformValue::appendRotate const):
     235        (WebCore::SVGTransformValue::appendSkewX const):
     236        (WebCore::SVGTransformValue::appendSkewY const):
     237        (WebCore::SVGTransformValue::matrix): Deleted.
     238        * svg/SVGTransformable.cpp:
     239        (WebCore::SVGTransformable::parseAndSkipType):
     240        (WebCore::parseAndSkipType): Deleted.
     241        (WebCore::SVGTransformable::parseTransformAttribute): Deleted.
     242        The code of this function was moved to SVGTransformList::parse().
     243
     244        * svg/SVGTransformable.h:
     245        There is no need for enum TransformParsingMode. It was used by
     246        SVGViewSpec::parseViewSpec() to tell SVGTransformable::parseTransformAttribute()
     247        not to clear the list. SVGTransfromList now has two parse() functions:
     248        one public and the second is private. The public one clear the list
     249        before parsing the input String. The private one just does the parsing.
     250        SVGViewSpec::parseViewSpec() calls the private once since it is a friend
     251        of SVGTransfromList.
     252
     253        * svg/SVGValue.h: Removed.
     254        * svg/SVGViewSpec.cpp:
     255        (WebCore::SVGViewSpec::SVGViewSpec):
     256        (WebCore::SVGViewSpec::reset):
     257        (WebCore::SVGViewSpec::parseViewSpec):
     258        (WebCore::SVGViewSpec::registerAttributes): Deleted.
     259        (WebCore::SVGViewSpec::transform): Deleted.
     260        * svg/SVGViewSpec.h:
     261        * svg/properties/SVGAnimatedPropertyAccessorImpl.h:
     262        * svg/properties/SVGAnimatedPropertyAnimatorImpl.h:
     263        * svg/properties/SVGAnimatedPropertyImpl.h:
     264        * svg/properties/SVGAnimatedTransformListPropertyTearOff.h: Removed.
     265        * svg/properties/SVGAnimationAdditiveListFunctionImpl.h:
     266        (WebCore::SVGAnimationTransformListFunction::progress):
     267        * svg/properties/SVGAnimationAdditiveValueFunctionImpl.h:
     268        * svg/properties/SVGAttributeRegistry.h:
     269        * svg/properties/SVGMatrixTearOff.h: Removed.
     270        * svg/properties/SVGPropertyAccessorImpl.h:
     271        * svg/properties/SVGPropertyOwnerRegistry.h:
     272        (WebCore::SVGPropertyOwnerRegistry::registerProperty):
     273
    12742019-04-01  Devin Rousso  <drousso@apple.com>
    2275
  • trunk/Source/WebCore/Sources.txt

    r243666 r243730  
    22302230svg/SVGAnimateMotionElement.cpp
    22312231svg/SVGAnimateTransformElement.cpp
    2232 svg/SVGAnimatedTransformList.cpp
    2233 svg/SVGAnimatedTypeAnimator.cpp
    22342232svg/SVGAnimationElement.cpp
    22352233svg/SVGAttributeAnimationController.cpp
     
    22922290svg/SVGImageLoader.cpp
    22932291svg/SVGLangSpace.cpp
    2294 svg/SVGLegacyAttributeAnimationController.cpp
    22952292svg/SVGLengthContext.cpp
    22962293svg/SVGLengthValue.cpp
     
    23392336svg/SVGTitleElement.cpp
    23402337svg/SVGToOTFFontConversion.cpp
    2341 svg/SVGTransform.cpp
    23422338svg/SVGTransformDistance.cpp
    2343 svg/SVGTransformListValues.cpp
    2344 svg/SVGTransformValue.cpp
    23452339svg/SVGTransformable.cpp
    23462340svg/SVGURIReference.cpp
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r243703 r243730  
    242242                081AA8DA1111237E002AB06E /* SVGElementRareData.h in Headers */ = {isa = PBXBuildFile; fileRef = 081AA8D91111237E002AB06E /* SVGElementRareData.h */; };
    243243                081EBF3B0FD34F4100DA7559 /* SVGFilterBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 081EBF390FD34F4100DA7559 /* SVGFilterBuilder.h */; };
    244                 08250939128BD4D800E2ED8E /* SVGAnimatedTransformList.h in Headers */ = {isa = PBXBuildFile; fileRef = 08250938128BD4D800E2ED8E /* SVGAnimatedTransformList.h */; };
    245244                083DAEA70F01A7FB00342754 /* RenderTextControlMultiLine.h in Headers */ = {isa = PBXBuildFile; fileRef = 083DAEA30F01A7FB00342754 /* RenderTextControlMultiLine.h */; };
    246245                083DAEA90F01A7FB00342754 /* RenderTextControlSingleLine.h in Headers */ = {isa = PBXBuildFile; fileRef = 083DAEA50F01A7FB00342754 /* RenderTextControlSingleLine.h */; };
     
    255254                0854B0231255E4E600B9CDD0 /* SVGRootInlineBox.h in Headers */ = {isa = PBXBuildFile; fileRef = 0854B0111255E4E600B9CDD0 /* SVGRootInlineBox.h */; };
    256255                0854B0251255E4E600B9CDD0 /* SVGTextQuery.h in Headers */ = {isa = PBXBuildFile; fileRef = 0854B0131255E4E600B9CDD0 /* SVGTextQuery.h */; };
    257                 085A15931289A8DD002710E3 /* SVGAnimatedTransformListPropertyTearOff.h in Headers */ = {isa = PBXBuildFile; fileRef = 085A15921289A8DD002710E3 /* SVGAnimatedTransformListPropertyTearOff.h */; };
    258256                085B92BB0EFDE73D00E6123C /* FormDataBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 085B92B90EFDE73D00E6123C /* FormDataBuilder.h */; settings = {ATTRIBUTES = (); }; };
    259257                08641D4812142F7D008DE9F6 /* RenderImageResourceStyleImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 08641D4612142F7D008DE9F6 /* RenderImageResourceStyleImage.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    274272                08C7A2C710DC7462002D368B /* SVGNames.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 656581E909D1508D000E61D7 /* SVGNames.h */; };
    275273                08C9251A0FCC7C4A00480DEC /* FilterEffect.h in Headers */ = {isa = PBXBuildFile; fileRef = 08C925180FCC7C4A00480DEC /* FilterEffect.h */; settings = {ATTRIBUTES = (Private, ); }; };
    276                 08CA3D4412894A3800FFF260 /* SVGMatrixTearOff.h in Headers */ = {isa = PBXBuildFile; fileRef = 08CA3D4312894A3800FFF260 /* SVGMatrixTearOff.h */; };
    277274                08EDE19F12A50B8E00B95797 /* SVGRect.h in Headers */ = {isa = PBXBuildFile; fileRef = 08EDE19E12A50B8E00B95797 /* SVGRect.h */; };
    278275                08F0BFC31255C53C00075185 /* SVGTextChunk.h in Headers */ = {isa = PBXBuildFile; fileRef = 08F0BFBE1255C53C00075185 /* SVGTextChunk.h */; };
     
    11861183                439046EC12DA25E800AF80A9 /* RenderMathMLToken.h in Headers */ = {isa = PBXBuildFile; fileRef = 439046D812DA25E800AF80A9 /* RenderMathMLToken.h */; };
    11871184                439176E012DA25E17BAF80A2 /* MathMLStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 439176CC12DA25E17BAF80A2 /* MathMLStyle.h */; };
    1188                 439D334313A6911C00C20F4F /* SVGAnimatedType.h in Headers */ = {isa = PBXBuildFile; fileRef = 439D334013A6911C00C20F4F /* SVGAnimatedType.h */; };
    1189                 439D334413A6911C00C20F4F /* SVGAnimatedTypeAnimator.h in Headers */ = {isa = PBXBuildFile; fileRef = 439D334113A6911C00C20F4F /* SVGAnimatedTypeAnimator.h */; };
    1190                 439D334513A6911C00C20F4F /* SVGAnimatorFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 439D334213A6911C00C20F4F /* SVGAnimatorFactory.h */; };
    11911185                43B85ED418CBEC5200E31AF4 /* SelectorPseudoClassAndCompatibilityElementMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 43B85ED218CBEC5200E31AF4 /* SelectorPseudoClassAndCompatibilityElementMap.cpp */; };
    11921186                43C092BC12D9E4EE00A989C3 /* RenderSVGForeignObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 43C092BA12D9E4EE00A989C3 /* RenderSVGForeignObject.h */; };
     
    55485542                081EBF380FD34F4100DA7559 /* SVGFilterBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGFilterBuilder.cpp; sourceTree = "<group>"; };
    55495543                081EBF390FD34F4100DA7559 /* SVGFilterBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGFilterBuilder.h; sourceTree = "<group>"; };
    5550                 08250938128BD4D800E2ED8E /* SVGAnimatedTransformList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedTransformList.h; sourceTree = "<group>"; };
    55515544                083DAEA20F01A7FB00342754 /* RenderTextControlMultiLine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderTextControlMultiLine.cpp; sourceTree = "<group>"; };
    55525545                083DAEA30F01A7FB00342754 /* RenderTextControlMultiLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderTextControlMultiLine.h; sourceTree = "<group>"; };
     
    55715564                0854B0121255E4E600B9CDD0 /* SVGTextQuery.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGTextQuery.cpp; sourceTree = "<group>"; };
    55725565                0854B0131255E4E600B9CDD0 /* SVGTextQuery.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTextQuery.h; sourceTree = "<group>"; };
    5573                 085A15921289A8DD002710E3 /* SVGAnimatedTransformListPropertyTearOff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedTransformListPropertyTearOff.h; sourceTree = "<group>"; };
    55745566                085B92B80EFDE73D00E6123C /* FormDataBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FormDataBuilder.cpp; sourceTree = "<group>"; };
    55755567                085B92B90EFDE73D00E6123C /* FormDataBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FormDataBuilder.h; sourceTree = "<group>"; };
     
    55965588                08C925170FCC7C4A00480DEC /* FilterEffect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FilterEffect.cpp; sourceTree = "<group>"; };
    55975589                08C925180FCC7C4A00480DEC /* FilterEffect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FilterEffect.h; sourceTree = "<group>"; };
    5598                 08CA3D4312894A3800FFF260 /* SVGMatrixTearOff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGMatrixTearOff.h; sourceTree = "<group>"; };
    55995590                08EDE19E12A50B8E00B95797 /* SVGRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGRect.h; sourceTree = "<group>"; };
    56005591                08F0BFBD1255C53C00075185 /* SVGTextChunk.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGTextChunk.cpp; sourceTree = "<group>"; };
     
    75267517                439176CB12DA25E17BAF80A2 /* MathMLStyle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MathMLStyle.cpp; sourceTree = "<group>"; };
    75277518                439176CC12DA25E17BAF80A2 /* MathMLStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MathMLStyle.h; sourceTree = "<group>"; };
    7528                 439D334013A6911C00C20F4F /* SVGAnimatedType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedType.h; sourceTree = "<group>"; };
    7529                 439D334113A6911C00C20F4F /* SVGAnimatedTypeAnimator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedTypeAnimator.h; sourceTree = "<group>"; };
    7530                 439D334213A6911C00C20F4F /* SVGAnimatorFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatorFactory.h; sourceTree = "<group>"; };
    75317519                43B85ED018CBEACE00E31AF4 /* makeSelectorPseudoClassAndCompatibilityElementMap.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = makeSelectorPseudoClassAndCompatibilityElementMap.py; sourceTree = "<group>"; };
    75327520                43B85ED218CBEC5200E31AF4 /* SelectorPseudoClassAndCompatibilityElementMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SelectorPseudoClassAndCompatibilityElementMap.cpp; path = DerivedSources/WebCore/SelectorPseudoClassAndCompatibilityElementMap.cpp; sourceTree = BUILT_PRODUCTS_DIR; };
     
    85018489                550A0BC8085F6039007353D6 /* QualifiedName.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = QualifiedName.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
    85028490                55137B2C20379E550001004B /* SVGMarkerTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGMarkerTypes.h; sourceTree = "<group>"; };
    8503                 55137B34203CEB710001004B /* SVGValue.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SVGValue.h; sourceTree = "<group>"; };
    85048491                55346AF021150FAF0059BCDD /* SVGAttributeOwnerProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SVGAttributeOwnerProxy.h; sourceTree = "<group>"; };
    85058492                55346AFA2117FFAF0059BCDD /* SVGAttributeOwnerProxyImpl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SVGAttributeOwnerProxyImpl.h; sourceTree = "<group>"; };
     
    92849271                7156BC9F21CA350600534397 /* BasicEffectTiming.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BasicEffectTiming.h; sourceTree = "<group>"; };
    92859272                7157E3D11DC1EE4B0094550E /* scrubbing-support.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = "scrubbing-support.js"; sourceTree = "<group>"; };
    9286                 7157F061150B6564006EAABD /* SVGAnimatedTransformList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimatedTransformList.cpp; sourceTree = "<group>"; };
    92879273                715AD71D2050512400D592DC /* DeclarativeAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeclarativeAnimation.h; sourceTree = "<group>"; };
    92889274                715AD71F2050512400D592DC /* DeclarativeAnimation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DeclarativeAnimation.cpp; sourceTree = "<group>"; };
     
    93869372                723F97BC2238EE08007F079C /* SVGAttributeAnimationController.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAttributeAnimationController.cpp; sourceTree = "<group>"; };
    93879373                723F97BD2238EE08007F079C /* SVGAttributeAnimationController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SVGAttributeAnimationController.h; sourceTree = "<group>"; };
    9388                 723F97BE2239512D007F079C /* SVGLegacyAttributeAnimationController.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SVGLegacyAttributeAnimationController.cpp; sourceTree = "<group>"; };
    9389                 723F97BF2239512D007F079C /* SVGLegacyAttributeAnimationController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SVGLegacyAttributeAnimationController.h; sourceTree = "<group>"; };
    93909374                723F97C022396B88007F079C /* SVGAttributeAnimationControllerBase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SVGAttributeAnimationControllerBase.h; sourceTree = "<group>"; };
    93919375                723F97C122397725007F079C /* SVGAttributeAnimationControllerBase.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAttributeAnimationControllerBase.cpp; sourceTree = "<group>"; };
     
    96229606                7C330A061DF9F95100D3395C /* JSPositionOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPositionOptions.h; sourceTree = "<group>"; };
    96239607                7C33F3601B4A050400502CAF /* JSDocumentFragmentCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDocumentFragmentCustom.cpp; sourceTree = "<group>"; };
    9624                 7C39C36C1DDB8BB000FEFB29 /* SVGTransformListValues.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGTransformListValues.cpp; sourceTree = "<group>"; };
    9625                 7C39C36D1DDB8BB000FEFB29 /* SVGTransformListValues.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTransformListValues.h; sourceTree = "<group>"; };
    96269608                7C3A91E51C963B8800D1A7E3 /* ClipboardAccessPolicy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClipboardAccessPolicy.h; sourceTree = "<group>"; };
    96279609                7C3B796F1908757B00B47A2D /* UserMessageHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UserMessageHandler.cpp; sourceTree = "<group>"; };
     
    98729854                7CE58D521DD7B09300128552 /* SVGLengthValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGLengthValue.cpp; sourceTree = "<group>"; };
    98739855                7CE58D531DD7B09300128552 /* SVGLengthValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGLengthValue.h; sourceTree = "<group>"; };
    9874                 7CE58D551DD7D96D00128552 /* SVGTransformValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGTransformValue.cpp; sourceTree = "<group>"; };
    98759856                7CE58D561DD7D96D00128552 /* SVGTransformValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGTransformValue.h; sourceTree = "<group>"; };
    9876                 7CE58D591DD7DE5200128552 /* SVGTransform.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGTransform.cpp; sourceTree = "<group>"; };
    98779857                7CE68342192143A800F4D928 /* UserMessageHandlerDescriptor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UserMessageHandlerDescriptor.cpp; sourceTree = "<group>"; };
    98789858                7CE68343192143A800F4D928 /* UserMessageHandlerDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserMessageHandlerDescriptor.h; sourceTree = "<group>"; };
     
    1004510025                836D032E1DA8A13200FFD96B /* JSClipboardEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSClipboardEvent.h; sourceTree = "<group>"; };
    1004610026                836DAA051CEAB7CD00A2B707 /* RenderDescendantIterator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderDescendantIterator.h; sourceTree = "<group>"; };
    10047                 836FBCE9178C113200B21A15 /* SVGAnimatedTypeAnimator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimatedTypeAnimator.cpp; sourceTree = "<group>"; };
    1004810027                837056881F50915000D93425 /* JSFileCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSFileCallback.cpp; sourceTree = "<group>"; };
    1004910028                837056891F50915000D93425 /* JSFileSystemEntryCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSFileSystemEntryCallback.h; sourceTree = "<group>"; };
     
    1386713846                D00D77FE2242ED450043F12C /* WebGPUComputePassEncoder.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebGPUComputePassEncoder.cpp; sourceTree = "<group>"; };
    1386813847                D00D77FF2242ED450043F12C /* WebGPUComputePassEncoder.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = WebGPUComputePassEncoder.idl; sourceTree = "<group>"; };
    13869                 D00F5940216ECC7A000D71DB /* DOMWindowWebGPU.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DOMWindowWebGPU.h; sourceTree = "<group>"; };
     13848                D00F5940216ECC7A000D71DB /* DOMWindowWebGPU.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DOMWindowWebGPU.h; sourceTree = "<group>"; };
    1387013849                D00F5941216ECC7A000D71DB /* DOMWindowWebGPU.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = DOMWindowWebGPU.cpp; sourceTree = "<group>"; };
    1387113850                D00F5942216ECC7A000D71DB /* DOMWindowWebGPU.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = DOMWindowWebGPU.idl; sourceTree = "<group>"; };
     
    1602416003                                088A0DFF126EF1DB00978F7A /* SVGAnimatedPropertyTearOff.h */,
    1602516004                                55FA7FFE21110E6E005AEFE7 /* SVGAnimatedPropertyType.h */,
    16026                                 085A15921289A8DD002710E3 /* SVGAnimatedTransformListPropertyTearOff.h */,
    1602716005                                721443452240C8BA00F12FF7 /* SVGAnimatedValueProperty.h */,
    1602816006                                55BE025F223B29C50032F08A /* SVGAnimationAdditiveFunction.h */,
     
    1605216030                                0810764312828556007C63BA /* SVGListProperty.h */,
    1605316031                                088A0E00126EF1DB00978F7A /* SVGListPropertyTearOff.h */,
    16054                                 08CA3D4312894A3800FFF260 /* SVGMatrixTearOff.h */,
    1605516032                                55EE5354223B29E900FBA944 /* SVGMemberAccessor.h */,
    1605616033                                55BE025A223B29C20032F08A /* SVGPointerMemberAccessor.h */,
     
    2380823785                                B22277F50D00BF1F0071B782 /* SVGAnimatedRect.idl */,
    2380923786                                B22277F60D00BF1F0071B782 /* SVGAnimatedString.idl */,
    23810                                 7157F061150B6564006EAABD /* SVGAnimatedTransformList.cpp */,
    23811                                 08250938128BD4D800E2ED8E /* SVGAnimatedTransformList.h */,
    2381223787                                B22277F80D00BF1F0071B782 /* SVGAnimatedTransformList.idl */,
    23813                                 439D334013A6911C00C20F4F /* SVGAnimatedType.h */,
    23814                                 836FBCE9178C113200B21A15 /* SVGAnimatedTypeAnimator.cpp */,
    23815                                 439D334113A6911C00C20F4F /* SVGAnimatedTypeAnimator.h */,
    2381623788                                B22277F90D00BF1F0071B782 /* SVGAnimateElement.cpp */,
    2381723789                                B22277FA0D00BF1F0071B782 /* SVGAnimateElement.h */,
     
    2382823800                                B22278020D00BF1F0071B782 /* SVGAnimationElement.h */,
    2382923801                                B22278030D00BF1F0071B782 /* SVGAnimationElement.idl */,
    23830                                 439D334213A6911C00C20F4F /* SVGAnimatorFactory.h */,
    2383123802                                723F97BC2238EE08007F079C /* SVGAttributeAnimationController.cpp */,
    2383223803                                723F97BD2238EE08007F079C /* SVGAttributeAnimationController.h */,
     
    2400223973                                B22278990D00BF200071B782 /* SVGLangSpace.cpp */,
    2400323974                                B222789A0D00BF200071B782 /* SVGLangSpace.h */,
    24004                                 723F97BE2239512D007F079C /* SVGLegacyAttributeAnimationController.cpp */,
    24005                                 723F97BF2239512D007F079C /* SVGLegacyAttributeAnimationController.h */,
    2400623975                                7CE58D511DD7B09300128552 /* SVGLength.h */,
    2400723976                                B222789E0D00BF200071B782 /* SVGLength.idl */,
     
    2417024139                                1CCDF5BB1990332400BCEBAD /* SVGToOTFFontConversion.cpp */,
    2417124140                                1CCDF5BC1990332400BCEBAD /* SVGToOTFFontConversion.h */,
    24172                                 7CE58D591DD7DE5200128552 /* SVGTransform.cpp */,
    2417324141                                B22279410D00BF210071B782 /* SVGTransform.h */,
    2417424142                                B22279420D00BF210071B782 /* SVGTransform.idl */,
     
    2417924147                                B22279490D00BF210071B782 /* SVGTransformList.h */,
    2418024148                                B222794A0D00BF210071B782 /* SVGTransformList.idl */,
    24181                                 7C39C36C1DDB8BB000FEFB29 /* SVGTransformListValues.cpp */,
    24182                                 7C39C36D1DDB8BB000FEFB29 /* SVGTransformListValues.h */,
    24183                                 7CE58D551DD7D96D00128552 /* SVGTransformValue.cpp */,
    2418424149                                7CE58D561DD7D96D00128552 /* SVGTransformValue.h */,
    2418524150                                B222794B0D00BF210071B782 /* SVGTRefElement.cpp */,
     
    2419924164                                B22279570D00BF210071B782 /* SVGUseElement.h */,
    2420024165                                B22279580D00BF210071B782 /* SVGUseElement.idl */,
    24201                                 55137B34203CEB710001004B /* SVGValue.h */,
    2420224166                                B22279590D00BF210071B782 /* SVGViewElement.cpp */,
    2420324167                                B222795A0D00BF210071B782 /* SVGViewElement.h */,
     
    2588625850                                D05A99E421C9BF2C00032B75 /* WebGPUPipelineLayout.h */,
    2588725851                                D05A99E621C9BF2C00032B75 /* WebGPUPipelineLayout.idl */,
    25888                                 D00487D222457BEA00EED7D9 /* WebGPUPipelineLayoutDescriptor.cpp */,
    2588925852                                D00487D222457BEA00EED7D9 /* WebGPUPipelineLayoutDescriptor.cpp */,
    2589025853                                D05A99E121C9B50F00032B75 /* WebGPUPipelineLayoutDescriptor.h */,
     
    3154131504                                088A0E08126EF1DB00978F7A /* SVGAnimatedPropertyTearOff.h in Headers */,
    3154231505                                55FA7FFF21110E6E005AEFE7 /* SVGAnimatedPropertyType.h in Headers */,
    31543                                 08250939128BD4D800E2ED8E /* SVGAnimatedTransformList.h in Headers */,
    31544                                 085A15931289A8DD002710E3 /* SVGAnimatedTransformListPropertyTearOff.h in Headers */,
    31545                                 439D334313A6911C00C20F4F /* SVGAnimatedType.h in Headers */,
    31546                                 439D334413A6911C00C20F4F /* SVGAnimatedTypeAnimator.h in Headers */,
    3154731506                                B22279900D00BF220071B782 /* SVGAnimateElement.h in Headers */,
    3154831507                                832B843419D8E55100B26055 /* SVGAnimateElementBase.h in Headers */,
     
    3155031509                                B22279950D00BF220071B782 /* SVGAnimateTransformElement.h in Headers */,
    3155131510                                B22279980D00BF220071B782 /* SVGAnimationElement.h in Headers */,
    31552                                 439D334513A6911C00C20F4F /* SVGAnimatorFactory.h in Headers */,
    3155331511                                55FA7FF0210FA386005AEFE7 /* SVGAttribute.h in Headers */,
    3155431512                                55FA7FF5210FB6B1005AEFE7 /* SVGAttributeAccessor.h in Headers */,
     
    3163731595                                B2227A470D00BF220071B782 /* SVGMaskElement.h in Headers */,
    3163831596                                0806E57A12893045007CED32 /* SVGMatrix.h in Headers */,
    31639                                 08CA3D4412894A3800FFF260 /* SVGMatrixTearOff.h in Headers */,
    3164031597                                B2227A4B0D00BF220071B782 /* SVGMetadataElement.h in Headers */,
    3164131598                                B2A1F2B10CEF0ABF00442F6A /* SVGMissingGlyphElement.h in Headers */,
  • trunk/Source/WebCore/svg/SVGAnimateElementBase.cpp

    r243515 r243730  
    2626
    2727#include "QualifiedName.h"
    28 #include "SVGAnimatorFactory.h"
    2928#include "SVGAttributeAnimationController.h"
    3029#include "SVGElement.h"
    31 #include "SVGLegacyAttributeAnimationController.h"
    3230#include "SVGNames.h"
    3331#include <wtf/IsoMallocInlines.h>
     
    5048    ASSERT(!hasInvalidCSSAttributeType());
    5149
    52     if (!m_attributeAnimationController) {
    53         if (targetElement()->isAnimatedAttribute(attributeName()))
    54             m_attributeAnimationController = std::make_unique<SVGAttributeAnimationController>(*this, *targetElement());
    55         else
    56             m_attributeAnimationController = std::make_unique<SVGLegacyAttributeAnimationController>(*this, *targetElement());
    57     }
     50    if (!m_attributeAnimationController)
     51        m_attributeAnimationController = std::make_unique<SVGAttributeAnimationController>(*this, *targetElement());
    5852
    5953    return *m_attributeAnimationController;
     
    6458    if (!targetElement() || hasInvalidCSSAttributeType())
    6559        return false;
    66 
    67     if (SVGAnimatorFactory::isSupportedAttributeType(determineAnimatedPropertyType(*targetElement())))
    68         return true;
    6960
    7061    return targetElement()->isAnimatedAttribute(attributeName());
     
    9283    if (!targetElement())
    9384        return false;
    94     return attributeAnimationController().calculateToAtEndOfDurationValue(toAtEndOfDurationString);
     85    return attributeAnimationController().calculateToAtEndOfDurationValue(animateRangeString(toAtEndOfDurationString));
    9586}
    9687
     
    9990    if (!targetElement())
    10091        return false;
    101     return attributeAnimationController().calculateFromAndToValues(fromString, toString);
     92    return attributeAnimationController().calculateFromAndToValues(animateRangeString(fromString), animateRangeString(toString));
    10293}
    10394
     
    10697    if (!this->targetElement())
    10798        return false;
    108     return attributeAnimationController().calculateFromAndByValues(fromString, byString);
     99    return attributeAnimationController().calculateFromAndByValues(animateRangeString(fromString), animateRangeString(byString));
    109100}
    110101
  • trunk/Source/WebCore/svg/SVGAnimateElementBase.h

    r243333 r243730  
    6262    void resetAnimation() override;
    6363
     64    virtual String animateRangeString(const String& string) const { return string; }
     65
    6466private:
    6567    bool hasInvalidCSSAttributeType() const;
  • trunk/Source/WebCore/svg/SVGAnimateTransformElement.cpp

    r243036 r243730  
    6767}
    6868
     69String SVGAnimateTransformElement::animateRangeString(const String& string) const
     70{
     71    return SVGTransformValue::prefixForTransfromType(m_type) + string + ')';
    6972}
     73
     74}
  • trunk/Source/WebCore/svg/SVGAnimateTransformElement.h

    r243036 r243730  
    4242    bool hasValidAttributeType() const final;
    4343    void parseAttribute(const QualifiedName&, const AtomicString&) final;
     44    String animateRangeString(const String&) const final;
    4445
    4546    SVGTransformValue::SVGTransformType m_type;
  • trunk/Source/WebCore/svg/SVGAnimationElement.cpp

    r243515 r243730  
    628628}
    629629
    630 void SVGAnimationElement::adjustForInheritance(SVGElement* targetElement, const QualifiedName& attributeName, String& value)
    631 {
    632     // FIXME: At the moment the computed style gets returned as a String and needs to get parsed again.
    633     // In the future we might want to work with the value type directly to avoid the String parsing.
    634     ASSERT(targetElement);
    635 
    636     auto parent = makeRefPtr(targetElement->parentElement());
    637     if (!parent || !parent->isSVGElement())
    638         return;
    639 
    640     SVGElement& svgParent = downcast<SVGElement>(*parent);
    641     computeCSSPropertyValue(&svgParent, cssPropertyID(attributeName.localName()), value);
    642 }
    643 
    644630static bool inheritsFromProperty(SVGElement* targetElement, const QualifiedName& attributeName, const String& value)
    645631{
  • trunk/Source/WebCore/svg/SVGAnimationElement.h

    r243121 r243730  
    3333
    3434class ConditionEventListener;
    35 class SVGAnimatedType;
    3635class TimeContainer;
    3736
     
    7069    AnimatedPropertyValueType fromPropertyValueType() const { return m_fromPropertyValueType; }
    7170    AnimatedPropertyValueType toPropertyValueType() const { return m_toPropertyValueType; }
    72 
    73     template<typename AnimatedType> void adjustForInheritance(AnimatedType (*parseTypeFromString)(SVGAnimationElement*, const String&), AnimatedPropertyValueType valueType, AnimatedType& animatedType, SVGElement* contextElement)
    74     {
    75         if (valueType != InheritValue)
    76             return;
    77         // Replace 'inherit' by its computed property value.
    78         ASSERT(parseTypeFromString);
    79         String typeString;
    80         adjustForInheritance(contextElement, attributeName(), typeString);
    81         animatedType = (*parseTypeFromString)(this, typeString);
    82     }
    83 
    84     template<typename AnimatedType> bool adjustFromToListValues(const AnimatedType& fromList, const AnimatedType& toList, AnimatedType& animatedList, float percentage, bool resizeAnimatedListIfNeeded = true)
    85     {
    86         // If no 'to' value is given, nothing to animate.
    87         unsigned toListSize = toList.size();
    88         if (!toListSize)
    89             return false;
    90 
    91         // If the 'from' value is given and it's length doesn't match the 'to' value list length, fallback to a discrete animation.
    92         unsigned fromListSize = fromList.size();
    93         if (fromListSize != toListSize && fromListSize) {
    94             if (percentage < 0.5) {
    95                 if (animationMode() != AnimationMode::To)
    96                     animatedList = AnimatedType(fromList);
    97             } else
    98                 animatedList = AnimatedType(toList);
    99 
    100             return false;
    101         }
    102 
    103         ASSERT(!fromListSize || fromListSize == toListSize);
    104         if (resizeAnimatedListIfNeeded && animatedList.size() < toListSize)
    105             animatedList.resize(toListSize);
    106 
    107         return true;
    108     }
    109 
    110     template<typename AnimatedType> void animateDiscreteType(float percentage, const AnimatedType& fromType, const AnimatedType& toType, AnimatedType& animatedType)
    111     {
    112         if ((animationMode() == AnimationMode::FromTo && percentage > 0.5) || animationMode() == AnimationMode::To || percentage == 1) {
    113             animatedType = AnimatedType(toType);
    114             return;
    115         }
    116         animatedType = AnimatedType(fromType);
    117     }
    11871
    11972    void animateAdditiveNumber(float percentage, unsigned repeatCount, float fromNumber, float toNumber, float toAtEndOfDurationNumber, float& animatedNumber)
     
    193146    unsigned calculateKeyTimesIndex(float percent) const;
    194147
    195     void applyAnimatedValue(ShouldApplyAnimation, SVGElement* targetElement, const QualifiedName& attributeName, SVGAnimatedType*);
    196     void adjustForInheritance(SVGElement* targetElement, const QualifiedName& attributeName, String&);
    197 
    198148    void setCalcMode(const AtomicString&);
    199149
  • trunk/Source/WebCore/svg/SVGElement.h

    r243515 r243730  
    2525#include "SVGAnimatedPropertyImpl.h"
    2626#include "SVGAttributeOwnerProxy.h"
     27#include "SVGAttributeOwnerProxyImpl.h"
    2728#include "SVGLangSpace.h"
    2829#include "SVGLocatable.h"
     
    136137
    137138    // The definition of the owner proxy has to match the class inheritance but we are interested in the SVG objects only.
    138     using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGElement, SVGLangSpace>;
     139    using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGElement>;
    139140
    140141    // A super class will override this function to return its owner proxy. The attributes of the super class will
    141142    // be accessible through the registry of the owner proxy.
    142143    virtual const SVGAttributeOwnerProxy& attributeOwnerProxy() const { return m_attributeOwnerProxy; }
     144    static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
    143145
    144146    // Helper functions which return info for the super class' attributes.
  • trunk/Source/WebCore/svg/SVGExternalResourcesRequired.h

    r243121 r243730  
    5757    SVGExternalResourcesRequired(SVGElement* contextElement);
    5858
    59     static bool isKnownAttribute(const QualifiedName& attributeName)
    60     {
    61         return AttributeOwnerProxy::isKnownAttribute(attributeName) || PropertyRegistry::isKnownAttribute(attributeName);
    62     }
     59    static bool isKnownAttribute(const QualifiedName& attributeName) { return PropertyRegistry::isKnownAttribute(attributeName); }
    6360
    6461    virtual void setHaveFiredLoadEvent(bool) { }
  • trunk/Source/WebCore/svg/SVGFEImageElement.h

    r243185 r243730  
    5252    const SVGPropertyRegistry& propertyRegistry() const final { return m_propertyRegistry; }
    5353
    54     static bool isKnownAttribute(const QualifiedName& attributeName)
    55     {
    56         return AttributeOwnerProxy::isKnownAttribute(attributeName) || PropertyRegistry::isKnownAttribute(attributeName);
    57     }
    58 
    5954    void parseAttribute(const QualifiedName&, const AtomicString&) override;
    6055    void svgAttributeChanged(const QualifiedName&) override;
  • trunk/Source/WebCore/svg/SVGFEMorphologyElement.h

    r243478 r243730  
    7676
    7777    using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGFEMorphologyElement, SVGFilterPrimitiveStandardAttributes>;
    78     static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
    79     static void registerAttributes();
    8078    const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
    8179
    8280    using PropertyRegistry = SVGPropertyOwnerRegistry<SVGFEMorphologyElement, SVGFilterPrimitiveStandardAttributes>;
    8381    const SVGPropertyRegistry& propertyRegistry() const final { return m_propertyRegistry; }
    84 
    85     static bool isKnownAttribute(const QualifiedName& attributeName)
    86     {
    87         return AttributeOwnerProxy::isKnownAttribute(attributeName) || PropertyRegistry::isKnownAttribute(attributeName);
    88     }
    8982
    9083    void parseAttribute(const QualifiedName&, const AtomicString&) override;
  • trunk/Source/WebCore/svg/SVGFETileElement.h

    r243333 r243730  
    4343    const SVGPropertyRegistry& propertyRegistry() const final { return m_propertyRegistry; }
    4444
    45     static bool isKnownAttribute(const QualifiedName& attributeName)
    46     {
    47         return AttributeOwnerProxy::isKnownAttribute(attributeName) || PropertyRegistry::isKnownAttribute(attributeName);
    48     }
    49 
    5045    void parseAttribute(const QualifiedName&, const AtomicString&) override;
    5146    void svgAttributeChanged(const QualifiedName&) override;
  • trunk/Source/WebCore/svg/SVGFitToViewBox.h

    r243259 r243730  
    6767    SVGFitToViewBox(SVGElement* contextElement, SVGPropertyAccess = SVGPropertyAccess::ReadWrite);
    6868
    69     static bool isKnownAttribute(const QualifiedName& attributeName)
    70     {
    71         return AttributeOwnerProxy::isKnownAttribute(attributeName) || PropertyRegistry::isKnownAttribute(attributeName);
    72     }
     69    static bool isKnownAttribute(const QualifiedName& attributeName) { return PropertyRegistry::isKnownAttribute(attributeName); }
    7370
    7471    void reset();
  • trunk/Source/WebCore/svg/SVGGradientElement.cpp

    r243478 r243730  
    33 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org>
    44 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
    5  * Copyright (C) 2018 Apple Inc. All rights reserved.
     5 * Copyright (C) 2018-2019 Apple Inc. All rights reserved.
    66 *
    77 * This library is free software; you can redistribute it and/or
     
    3030#include "SVGNames.h"
    3131#include "SVGStopElement.h"
    32 #include "SVGTransformListValues.h"
    3332#include "SVGTransformable.h"
    3433#include "StyleResolver.h"
     
    4544    , SVGURIReference(this)
    4645{
    47     registerAttributes();
    48 
    4946    static std::once_flag onceFlag;
    5047    std::call_once(onceFlag, [] {
    5148        PropertyRegistry::registerProperty<SVGNames::spreadMethodAttr, SVGSpreadMethodType, &SVGGradientElement::m_spreadMethod>();
    5249        PropertyRegistry::registerProperty<SVGNames::gradientUnitsAttr, SVGUnitTypes::SVGUnitType, &SVGGradientElement::m_gradientUnits>();
     50        PropertyRegistry::registerProperty<SVGNames::gradientTransformAttr, &SVGGradientElement::m_gradientTransform>();
    5351    });
    54 }
    55 
    56 void SVGGradientElement::registerAttributes()
    57 {
    58     auto& registry = attributeRegistry();
    59     if (!registry.isEmpty())
    60         return;
    61     registry.registerAttribute<SVGNames::gradientTransformAttr, &SVGGradientElement::m_gradientTransform>();
    6252}
    6353
     
    7262
    7363    if (name == SVGNames::gradientTransformAttr) {
    74         SVGTransformListValues newList;
    75         newList.parse(value);
    76         m_gradientTransform.detachAnimatedListWrappers(attributeOwnerProxy(), newList.size());
    77         m_gradientTransform.setValue(WTFMove(newList));
     64        m_gradientTransform->baseVal()->parse(value);
    7865        return;
    7966    }
  • trunk/Source/WebCore/svg/SVGGradientElement.h

    r243478 r243730  
    2323
    2424#include "Gradient.h"
    25 #include "SVGAnimatedTransformList.h"
    2625#include "SVGElement.h"
    2726#include "SVGExternalResourcesRequired.h"
     
    9190    SVGSpreadMethodType spreadMethod() const { return m_spreadMethod->currentValue<SVGSpreadMethodType>(); }
    9291    SVGUnitTypes::SVGUnitType gradientUnits() const { return m_gradientUnits->currentValue<SVGUnitTypes::SVGUnitType>(); }
    93     const SVGTransformListValues& gradientTransform() const { return m_gradientTransform.currentValue(attributeOwnerProxy()); }
     92    const SVGTransformList& gradientTransform() const { return m_gradientTransform->currentValue(); }
    9493
    9594    SVGAnimatedEnumeration& spreadMethodAnimated() { return m_spreadMethod; }
    9695    SVGAnimatedEnumeration& gradientUnitsAnimated() { return m_gradientUnits; }
    97     RefPtr<SVGAnimatedTransformList> gradientTransformAnimated() { return m_gradientTransform.animatedProperty(attributeOwnerProxy()); }
     96    SVGAnimatedTransformList& gradientTransformAnimated() { return m_gradientTransform; }
    9897
    9998protected:
    10099    SVGGradientElement(const QualifiedName&, Document&);
    101100
    102     static bool isKnownAttribute(const QualifiedName& attributeName)
    103     {
    104         return AttributeOwnerProxy::isKnownAttribute(attributeName) || PropertyRegistry::isKnownAttribute(attributeName);
    105     }
     101    static bool isKnownAttribute(const QualifiedName& attributeName) { return PropertyRegistry::isKnownAttribute(attributeName); }
    106102
    107103    void parseAttribute(const QualifiedName&, const AtomicString&) override;
     
    113109
    114110    const SVGAttributeOwnerProxy& attributeOwnerProxy() const override { return m_attributeOwnerProxy; }
    115     static void registerAttributes();
    116 
    117111    const SVGPropertyRegistry& propertyRegistry() const override { return m_propertyRegistry; }
    118112
     
    121115    Ref<SVGAnimatedEnumeration> m_spreadMethod { SVGAnimatedEnumeration::create(this, SVGSpreadMethodPad) };
    122116    Ref<SVGAnimatedEnumeration> m_gradientUnits { SVGAnimatedEnumeration::create(this, SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) };
    123     SVGAnimatedTransformListAttribute m_gradientTransform;
     117    Ref<SVGAnimatedTransformList> m_gradientTransform { SVGAnimatedTransformList::create(this) };
    124118};
    125119
  • trunk/Source/WebCore/svg/SVGGraphicsElement.cpp

    r234620 r243730  
    4343    , m_shouldIsolateBlending(false)
    4444{
    45     registerAttributes();
     45    static std::once_flag onceFlag;
     46    std::call_once(onceFlag, [] {
     47        PropertyRegistry::registerProperty<SVGNames::transformAttr, &SVGGraphicsElement::m_transform>();
     48    });
    4649}
    4750
     
    107110
    108111    } else
    109         transform().concatenate(matrix);
     112        matrix = transform().concatenate();
    110113
    111114    if (m_supplementalTransform)
     
    121124}
    122125
    123 void SVGGraphicsElement::registerAttributes()
    124 {
    125     auto& registry = attributeRegistry();
    126     if (!registry.isEmpty())
    127         return;
    128     registry.registerAttribute<SVGNames::transformAttr, &SVGGraphicsElement::m_transform>();
    129 }
    130 
    131126void SVGGraphicsElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
    132127{
    133128    if (name == SVGNames::transformAttr) {
    134         SVGTransformListValues newList;
    135         newList.parse(value);
    136         m_transform.detachAnimatedListWrappers(attributeOwnerProxy(), newList.size());
    137         m_transform.setValue(newList);
     129        m_transform->baseVal()->parse(value);
    138130        return;
    139131    }
     
    145137void SVGGraphicsElement::svgAttributeChanged(const QualifiedName& attrName)
    146138{
    147     if (isKnownAttribute(attrName)) {
     139    if (attrName == SVGNames::transformAttr) {
    148140        InstanceInvalidationGuard guard(*this);
    149141
    150         auto renderer = this->renderer();
    151         if (!renderer)
    152             return;
    153 
    154         if (attrName == SVGNames::transformAttr) {
     142        if (auto renderer = this->renderer()) {
    155143            renderer->setNeedsTransformUpdate();
    156144            RenderSVGResource::markForLayoutAndParentResourceInvalidation(*renderer);
    157             return;
    158145        }
     146
     147        return;
    159148    }
    160149
  • trunk/Source/WebCore/svg/SVGGraphicsElement.h

    r243114 r243730  
    2222#pragma once
    2323
    24 #include "SVGAnimatedTransformList.h"
    2524#include "SVGElement.h"
    2625#include "SVGTests.h"
     
    6968    using PropertyRegistry = SVGPropertyOwnerRegistry<SVGGraphicsElement, SVGElement, SVGTests>;
    7069
    71     const auto& transform() const { return m_transform.currentValue(attributeOwnerProxy()); }
    72     auto transformAnimated() { return m_transform.animatedProperty(attributeOwnerProxy()); }
     70    const SVGTransformList& transform() const { return m_transform->currentValue(); }
     71    SVGAnimatedTransformList& transformAnimated() { return m_transform; }
    7372
    7473protected:
     
    8483
    8584    const SVGAttributeOwnerProxy& attributeOwnerProxy() const override { return m_attributeOwnerProxy; }
    86     static void registerAttributes();
    87 
    8885    const SVGPropertyRegistry& propertyRegistry() const override { return m_propertyRegistry; }
    89 
    90     static bool isKnownAttribute(const QualifiedName& attributeName)
    91     {
    92         return AttributeOwnerProxy::isKnownAttribute(attributeName) || PropertyRegistry::isKnownAttribute(attributeName);
    93     }
    9486
    9587    // Used by <animateMotion>
     
    10193    AttributeOwnerProxy m_attributeOwnerProxy { *this };
    10294    PropertyRegistry m_propertyRegistry { *this };
    103     SVGAnimatedTransformListAttribute m_transform;
     95    Ref<SVGAnimatedTransformList> m_transform { SVGAnimatedTransformList::create(this) };
    10496};
    10597
  • trunk/Source/WebCore/svg/SVGLangSpace.cpp

    r236991 r243730  
    22 * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
    33 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
    4  * Copyright (C) 2018 Apple Inc. All rights reserved.
     4 * Copyright (C) 2018-2019 Apple Inc. All rights reserved.
    55 *
    66 * This library is free software; you can redistribute it and/or
     
    3434    : m_contextElement(*contextElement)
    3535{
    36     registerAttributes();
    3736}
    3837
    39 void SVGLangSpace::registerAttributes()
     38const AtomicString& SVGLangSpace::xmlspace() const
    4039{
    41     auto& registry = attributeRegistry();
    42     if (!registry.isEmpty())
    43         return;
    44     registry.registerAttribute(SVGStringAttributeAccessor::singleton<XMLNames::langAttr, &SVGLangSpace::m_lang>());
    45     registry.registerAttribute(SVGStringAttributeAccessor::singleton<XMLNames::spaceAttr, &SVGLangSpace::m_space>());
    46 }
    47 
    48 const String& SVGLangSpace::xmlspace() const
    49 {
    50     if (!m_space.value()) {
    51         static NeverDestroyed<String> defaultString("default");
     40    if (!m_space) {
     41        static NeverDestroyed<const AtomicString> defaultString("default", AtomicString::ConstructFromLiteral);
    5242        return defaultString;
    5343    }
    54     return m_space.value();
     44    return m_space;
     45}
     46   
     47bool SVGLangSpace::isKnownAttribute(const QualifiedName& attributeName)
     48{
     49    return attributeName.matches(XMLNames::langAttr) || attributeName.matches(XMLNames::spaceAttr);
    5550}
    5651
     
    6358}
    6459
    65 void SVGLangSpace::svgAttributeChanged(const QualifiedName& attrName)
     60void SVGLangSpace::svgAttributeChanged(const QualifiedName& attributeName)
    6661{
    67     if (!isKnownAttribute(attrName))
     62    if (!isKnownAttribute(attributeName))
    6863        return;
    6964
  • trunk/Source/WebCore/svg/SVGLangSpace.h

    r234620 r243730  
    22 * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
    33 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
    4  * Copyright (C) 2018 Apple Inc. All rights reserved.
     4 * Copyright (C) 2018-2019 Apple Inc. All rights reserved.
    55 *
    66 * This library is free software; you can redistribute it and/or
     
    2323
    2424#include "QualifiedName.h"
    25 #include "SVGAttributeOwnerProxyImpl.h"
    2625#include <wtf/HashSet.h>
    2726
     
    3231class SVGLangSpace {
    3332public:
    34     const String& xmllang() const { return m_lang.value(); }
    35     void setXmllang(const AtomicString& xmlLang) { m_lang.setValue(xmlLang); }
     33    const AtomicString& xmllang() const { return m_lang; }
     34    void setXmllang(const AtomicString& xmlLang) { m_lang = xmlLang; }
    3635
    37     const String& xmlspace() const;
    38     void setXmlspace(const AtomicString& xmlSpace) { m_space.setValue(xmlSpace); }
     36    const AtomicString& xmlspace() const;
     37    void setXmlspace(const AtomicString& xmlSpace) { m_space = xmlSpace; }
    3938
    4039    void parseAttribute(const QualifiedName&, const AtomicString&);
     
    4241    void svgAttributeChanged(const QualifiedName&);
    4342
    44     using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGLangSpace>;
    45     using AttributeRegistry = SVGAttributeRegistry<SVGLangSpace>;
    46     static auto& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
    47     static bool isKnownAttribute(const QualifiedName& attributeName) { return attributeRegistry().isKnownAttribute(attributeName); }
     43    static bool isKnownAttribute(const QualifiedName&);
    4844
    4945protected:
     
    5147
    5248private:
    53     using SVGStringAttribute = SVGPropertyAttribute<String>;
    54     using SVGStringAttributeAccessor = SVGPropertyAttributeAccessor<SVGLangSpace, SVGStringAttribute>;
    55     static void registerAttributes();
    56 
    5749    SVGElement& m_contextElement;
    58     SVGStringAttribute m_lang;
    59     SVGStringAttribute m_space;
     50    AtomicString m_lang;
     51    AtomicString m_space;
    6052};
    6153
  • trunk/Source/WebCore/svg/SVGLinearGradientElement.cpp

    r243515 r243730  
    104104        attributes.setGradientUnits(element.gradientUnits());
    105105
    106     if (!attributes.hasGradientTransform() && element.hasAttribute(SVGNames::gradientTransformAttr)) {
    107         AffineTransform transform;
    108         element.gradientTransform().concatenate(transform);
    109         attributes.setGradientTransform(transform);
    110     }
     106    if (!attributes.hasGradientTransform() && element.hasAttribute(SVGNames::gradientTransformAttr))
     107        attributes.setGradientTransform(element.gradientTransform().concatenate());
    111108
    112109    if (!attributes.hasStops()) {
  • trunk/Source/WebCore/svg/SVGMaskElement.h

    r243515 r243730  
    5252
    5353    using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGMaskElement, SVGElement, SVGExternalResourcesRequired, SVGTests>;
    54     static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
    55     static void registerAttributes();
    5654    const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
    5755
    5856    using PropertyRegistry = SVGPropertyOwnerRegistry<SVGMaskElement, SVGElement, SVGExternalResourcesRequired, SVGTests>;
    5957    const SVGPropertyRegistry& propertyRegistry() const final { return m_propertyRegistry; }
    60 
    61     static bool isKnownAttribute(const QualifiedName& attributeName)
    62     {
    63         return AttributeOwnerProxy::isKnownAttribute(attributeName) || PropertyRegistry::isKnownAttribute(attributeName);
    64     }
    6558
    6659    void parseAttribute(const QualifiedName&, const AtomicString&) final;
  • trunk/Source/WebCore/svg/SVGMatrix.h

    r243703 r243730  
    2727
    2828#include "AffineTransform.h"
    29 #include "SVGPropertyTearOff.h"
     29#include "SVGValueProperty.h"
    3030
    3131namespace WebCore {
    3232
    3333// FIXME: Remove this class once SVGMatrix becomes an alias to DOMMatrix.
    34 class SVGMatrix : public SVGPropertyTearOff<AffineTransform> {
    35     using Base = SVGPropertyTearOff<AffineTransform>;
     34class SVGMatrix : public SVGValueProperty<AffineTransform> {
     35    using Base = SVGValueProperty<AffineTransform>;
    3636    using Base::Base;
    3737
    3838public:
    39     static Ref<SVGMatrix> create(SVGLegacyAnimatedProperty& animatedProperty, SVGPropertyRole role, AffineTransform& value)
    40     {
    41         return adoptRef(*new SVGMatrix(&animatedProperty, role, value));
    42     }
    43 
    44     static Ref<SVGMatrix> create(const AffineTransform& initialValue = { })
    45     {
    46         return adoptRef(*new SVGMatrix(initialValue));
    47     }
    48 
    49     template<typename T> static ExceptionOr<Ref<SVGMatrix>> create(ExceptionOr<T>&& initialValue)
    50     {
    51         if (initialValue.hasException())
    52             return initialValue.releaseException();
    53         return create(initialValue.releaseReturnValue());
     39    static Ref<SVGMatrix> create(const AffineTransform& value = { })
     40    {
     41        return adoptRef(*new SVGMatrix(value));
     42    }
     43
     44    static Ref<SVGMatrix> create(SVGPropertyOwner* owner, SVGPropertyAccess access, const AffineTransform& value = { })
     45    {
     46        return adoptRef(*new SVGMatrix(owner, access, value));
     47    }
     48
     49    template<typename T>
     50    static ExceptionOr<Ref<SVGMatrix>> create(ExceptionOr<T>&& value)
     51    {
     52        if (value.hasException())
     53            return value.releaseException();
     54        return create(value.releaseReturnValue());
    5455    }
    5556
    5657    double a() const
    5758    {
    58         return propertyReference().a();
     59        return m_value.a();
    5960    }
    6061
     
    6465            return Exception { NoModificationAllowedError };
    6566
    66         propertyReference().setA(value);
    67         commitChange();
    68 
     67        m_value.setA(value);
     68        commitChange();
    6969        return { };
    7070    }
     
    7272    double b() const
    7373    {
    74         return propertyReference().b();
     74        return m_value.b();
    7575    }
    7676
     
    8080            return Exception { NoModificationAllowedError };
    8181
    82         propertyReference().setB(value);
    83         commitChange();
    84 
     82        m_value.setB(value);
     83        commitChange();
    8584        return { };
    8685    }
     
    8887    double c() const
    8988    {
    90         return propertyReference().c();
     89        return m_value.c();
    9190    }
    9291
     
    9695            return Exception { NoModificationAllowedError };
    9796
    98         propertyReference().setC(value);
    99         commitChange();
    100 
     97        m_value.setC(value);
     98        commitChange();
    10199        return { };
    102100    }
     
    104102    double d() const
    105103    {
    106         return propertyReference().d();
     104        return m_value.d();
    107105    }
    108106
     
    112110            return Exception { NoModificationAllowedError };
    113111
    114         propertyReference().setD(value);
    115         commitChange();
    116 
     112        m_value.setD(value);
     113        commitChange();
    117114        return { };
    118115    }
     
    120117    double e() const
    121118    {
    122         return propertyReference().e();
     119        return m_value.e();
    123120    }
    124121
     
    128125            return Exception { NoModificationAllowedError };
    129126
    130         propertyReference().setE(value);
    131         commitChange();
    132 
     127        m_value.setE(value);
     128        commitChange();
    133129        return { };
    134130    }
     
    136132    double f() const
    137133    {
    138         return propertyReference().f();
     134        return m_value.f();
    139135    }
    140136
     
    144140            return Exception { NoModificationAllowedError };
    145141
    146         propertyReference().setF(value);
    147         commitChange();
    148 
     142        m_value.setF(value);
     143        commitChange();
    149144        return { };
    150145    }
     
    152147    Ref<SVGMatrix> multiply(SVGMatrix& secondMatrix) const
    153148    {
    154         auto copy = propertyReference();
    155         copy.multiply(secondMatrix.propertyReference());
     149        auto copy = m_value;
     150        copy.multiply(secondMatrix.value());
    156151        return SVGMatrix::create(copy);
    157152    }
     
    159154    ExceptionOr<Ref<SVGMatrix>> inverse() const
    160155    {
    161         auto inverse = propertyReference().inverse();
     156        auto inverse = m_value.inverse();
    162157        if (!inverse)
    163158            return Exception { InvalidStateError, "Matrix is not invertible"_s };
    164 
    165159        return SVGMatrix::create(*inverse);
    166160    }
     
    168162    Ref<SVGMatrix> translate(float x, float y) const
    169163    {
    170         auto copy = propertyReference();
     164        auto copy = m_value;
    171165        copy.translate(x, y);
    172166        return SVGMatrix::create(copy);
     
    175169    Ref<SVGMatrix> scale(float scaleFactor) const
    176170    {
    177         auto copy = propertyReference();
     171        auto copy = m_value;
    178172        copy.scale(scaleFactor);
    179173        return SVGMatrix::create(copy);
     
    182176    Ref<SVGMatrix> scaleNonUniform(float scaleFactorX, float scaleFactorY) const
    183177    {
    184         auto copy = propertyReference();
     178        auto copy = m_value;
    185179        copy.scaleNonUniform(scaleFactorX, scaleFactorY);
    186180        return SVGMatrix::create(copy);
     
    189183    Ref<SVGMatrix> rotate(float angle) const
    190184    {
    191         auto copy = propertyReference();
     185        auto copy = m_value;
    192186        copy.rotate(angle);
    193187        return SVGMatrix::create(copy);
     
    199193            return Exception { TypeError };
    200194
    201         auto copy = propertyReference();
     195        auto copy = m_value;
    202196        copy.rotateFromVector(x, y);
    203197        return SVGMatrix::create(copy);
     
    206200    Ref<SVGMatrix> flipX() const
    207201    {
    208         auto copy = propertyReference();
     202        auto copy = m_value;
    209203        copy.flipX();
    210204        return SVGMatrix::create(copy);
     
    213207    Ref<SVGMatrix> flipY() const
    214208    {
    215         auto copy = propertyReference();
     209        auto copy = m_value;
    216210        copy.flipY();
    217211        return SVGMatrix::create(copy);
     
    220214    Ref<SVGMatrix> skewX(float angle) const
    221215    {
    222         auto copy = propertyReference();
     216        auto copy = m_value;
    223217        copy.skewX(angle);
    224218        return SVGMatrix::create(copy);
     
    227221    Ref<SVGMatrix> skewY(float angle) const
    228222    {
    229         auto copy = propertyReference();
     223        auto copy = m_value;
    230224        copy.skewY(angle);
    231225        return SVGMatrix::create(copy);
  • trunk/Source/WebCore/svg/SVGPatternElement.cpp

    r243515 r243730  
    5454{
    5555    ASSERT(hasTagName(SVGNames::patternTag));
    56     registerAttributes();
    5756
    5857    static std::once_flag onceFlag;
     
    6463        PropertyRegistry::registerProperty<SVGNames::patternUnitsAttr, SVGUnitTypes::SVGUnitType, &SVGPatternElement::m_patternUnits>();
    6564        PropertyRegistry::registerProperty<SVGNames::patternContentUnitsAttr, SVGUnitTypes::SVGUnitType, &SVGPatternElement::m_patternContentUnits>();
     65        PropertyRegistry::registerProperty<SVGNames::patternTransformAttr, &SVGPatternElement::m_patternTransform>();
    6666    });
    6767}
     
    7070{
    7171    return adoptRef(*new SVGPatternElement(tagName, document));
    72 }
    73 
    74 void SVGPatternElement::registerAttributes()
    75 {
    76     auto& registry = attributeRegistry();
    77     if (!registry.isEmpty())
    78         return;
    79     registry.registerAttribute<SVGNames::patternTransformAttr, &SVGPatternElement::m_patternTransform>();
    8072}
    8173
     
    9587    }
    9688    if (name == SVGNames::patternTransformAttr) {
    97         SVGTransformListValues newList;
    98         newList.parse(value);
    99         m_patternTransform.detachAnimatedListWrappers(attributeOwnerProxy(), newList.size());
    100         m_patternTransform.setValue(WTFMove(newList));
     89        m_patternTransform->baseVal()->parse(value);
    10190        return;
    10291    }
     
    130119    }
    131120
    132     if (isKnownAttribute(attrName) || SVGFitToViewBox::isKnownAttribute(attrName) || SVGURIReference::isKnownAttribute(attrName)) {
     121    if (PropertyRegistry::isKnownAttribute(attrName) || SVGFitToViewBox::isKnownAttribute(attrName) || SVGURIReference::isKnownAttribute(attrName)) {
    133122        if (RenderObject* object = renderer())
    134123            object->setNeedsLayout();
     
    182171        attributes.setPatternContentUnits(patternContentUnits());
    183172
    184     if (!attributes.hasPatternTransform() && hasAttribute(SVGNames::patternTransformAttr)) {
    185         AffineTransform transform;
    186         patternTransform().concatenate(transform);
    187         attributes.setPatternTransform(transform);
    188     }
     173    if (!attributes.hasPatternTransform() && hasAttribute(SVGNames::patternTransformAttr))
     174        attributes.setPatternTransform(patternTransform().concatenate());
    189175
    190176    if (!attributes.hasPatternContentElement() && childElementCount())
     
    194180AffineTransform SVGPatternElement::localCoordinateSpaceTransform(SVGLocatable::CTMScope) const
    195181{
    196     AffineTransform matrix;
    197     patternTransform().concatenate(matrix);
    198     return matrix;
     182    return patternTransform().concatenate();
    199183}
    200184
  • trunk/Source/WebCore/svg/SVGPatternElement.h

    r243515 r243730  
    2222#pragma once
    2323
    24 #include "SVGAnimatedTransformList.h"
    2524#include "SVGElement.h"
    2625#include "SVGExternalResourcesRequired.h"
     
    5049    SVGUnitTypes::SVGUnitType patternUnits() const { return m_patternUnits->currentValue<SVGUnitTypes::SVGUnitType>(); }
    5150    SVGUnitTypes::SVGUnitType patternContentUnits() const { return m_patternContentUnits->currentValue<SVGUnitTypes::SVGUnitType>(); }
    52     const SVGTransformListValues& patternTransform() const { return m_patternTransform.currentValue(attributeOwnerProxy()); }
     51    const SVGTransformList& patternTransform() const { return m_patternTransform->currentValue(); }
    5352
    5453    SVGAnimatedLength& xAnimated() { return m_x; }
     
    5857    SVGAnimatedEnumeration& patternUnitsAnimated() { return m_patternUnits; }
    5958    SVGAnimatedEnumeration& patternContentUnitsAnimated() { return m_patternContentUnits; }
    60     RefPtr<SVGAnimatedTransformList> patternTransformAnimated() { return m_patternTransform.animatedProperty(attributeOwnerProxy()); }
     59    SVGAnimatedTransformList& patternTransformAnimated() { return m_patternTransform; }
    6160
    6261private:
     
    6463
    6564    using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGPatternElement, SVGElement, SVGExternalResourcesRequired, SVGFitToViewBox, SVGTests, SVGURIReference>;
    66     static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
    67     static void registerAttributes();
    6865    const SVGAttributeOwnerProxy& attributeOwnerProxy() const final { return m_attributeOwnerProxy; }
    6966
    7067    using PropertyRegistry = SVGPropertyOwnerRegistry<SVGPatternElement, SVGElement, SVGExternalResourcesRequired, SVGFitToViewBox, SVGTests, SVGURIReference>;
    7168    const SVGPropertyRegistry& propertyRegistry() const final { return m_propertyRegistry; }
    72 
    73     static bool isKnownAttribute(const QualifiedName& attributeName)
    74     {
    75         return AttributeOwnerProxy::isKnownAttribute(attributeName) || PropertyRegistry::isKnownAttribute(attributeName);
    76     }
    7769
    7870    void parseAttribute(const QualifiedName&, const AtomicString&) final;
     
    9486    Ref<SVGAnimatedEnumeration> m_patternUnits { SVGAnimatedEnumeration::create(this, SVGUnitTypes::SVG_UNIT_TYPE_OBJECTBOUNDINGBOX) };
    9587    Ref<SVGAnimatedEnumeration> m_patternContentUnits { SVGAnimatedEnumeration::create(this, SVGUnitTypes::SVG_UNIT_TYPE_USERSPACEONUSE) };
    96     SVGAnimatedTransformListAttribute m_patternTransform;
     88    Ref<SVGAnimatedTransformList> m_patternTransform { SVGAnimatedTransformList::create(this) };
    9789};
    9890
  • trunk/Source/WebCore/svg/SVGPoint.h

    r243515 r243730  
    8585    Ref<SVGPoint> matrixTransform(SVGMatrix& matrix) const
    8686    {
    87         auto newPoint = m_value.matrixTransform(matrix.propertyReference());
     87        auto newPoint = m_value.matrixTransform(matrix.value());
    8888        return adoptRef(*new SVGPoint(newPoint));
    8989    }
  • trunk/Source/WebCore/svg/SVGPolyElement.h

    r243336 r243730  
    4848    const SVGPropertyRegistry& propertyRegistry() const final { return m_propertyRegistry; }
    4949
    50     static bool isKnownAttribute(const QualifiedName& attributeName)
    51     {
    52         return AttributeOwnerProxy::isKnownAttribute(attributeName) || PropertyRegistry::isKnownAttribute(attributeName);
    53     }
    54 
    5550    void parseAttribute(const QualifiedName&, const AtomicString&) override;
    5651    void svgAttributeChanged(const QualifiedName&) override;
  • trunk/Source/WebCore/svg/SVGRadialGradientElement.cpp

    r243515 r243730  
    110110        attributes.setGradientUnits(element.gradientUnits());
    111111
    112     if (!attributes.hasGradientTransform() && element.hasAttribute(SVGNames::gradientTransformAttr)) {
    113         AffineTransform transform;
    114         element.gradientTransform().concatenate(transform);
    115         attributes.setGradientTransform(transform);
    116     }
     112    if (!attributes.hasGradientTransform() && element.hasAttribute(SVGNames::gradientTransformAttr))
     113        attributes.setGradientTransform(element.gradientTransform().concatenate());
    117114
    118115    if (!attributes.hasStops()) {
  • trunk/Source/WebCore/svg/SVGSVGElement.cpp

    r243515 r243730  
    387387Ref<SVGTransform> SVGSVGElement::createSVGTransform()
    388388{
    389     return SVGTransform::create(SVGTransformValue { SVGTransformValue::SVG_TRANSFORM_MATRIX });
     389    return SVGTransform::create(SVGTransformValue::SVG_TRANSFORM_MATRIX);
    390390}
    391391
    392392Ref<SVGTransform> SVGSVGElement::createSVGTransformFromMatrix(SVGMatrix& matrix)
    393393{
    394     return SVGTransform::create(SVGTransformValue { matrix.propertyReference() });
     394    return SVGTransform::create(matrix.value());
    395395}
    396396
     
    609609
    610610    AffineTransform transform = SVGFitToViewBox::viewBoxToViewTransform(currentViewBoxRect(), m_viewSpec->preserveAspectRatio(), viewWidth, viewHeight);
    611     m_viewSpec->transformValue().concatenate(transform);
     611    transform *= m_viewSpec->transform()->concatenate();
    612612    return transform;
    613613}
  • trunk/Source/WebCore/svg/SVGTextElement.cpp

    r229694 r243730  
    6060        matrix = t.toAffineTransform();
    6161    } else
    62         transform().concatenate(matrix);
     62        matrix = transform().concatenate();
    6363
    6464    const AffineTransform* transform = const_cast<SVGTextElement*>(this)->supplementalTransform();
  • trunk/Source/WebCore/svg/SVGTransform.h

    r242978 r243730  
    11/*
    2  * Copyright (C) 2016-2018 Apple Inc. All rights reserved.
     2 * Copyright (C) 2016-2019 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2727
    2828#include "SVGMatrix.h"
    29 #include "SVGPropertyTearOff.h"
    3029#include "SVGTransformValue.h"
     30#include "SVGValueProperty.h"
    3131
    3232namespace WebCore {
    3333
    34 class SVGTransform : public SVGPropertyTearOff<SVGTransformValue> {
     34class SVGTransform : public SVGValueProperty<SVGTransformValue>, public SVGPropertyOwner {
    3535public:
    36     static Ref<SVGTransform> create(SVGLegacyAnimatedProperty& animatedProperty, SVGPropertyRole role, SVGTransformValue& value)
     36    static Ref<SVGTransform> create(SVGTransformValue::SVGTransformType type)
    3737    {
    38         return adoptRef(*new SVGTransform(animatedProperty, role, value));
     38        return adoptRef(*new SVGTransform(type));
    3939    }
    4040
    41     static Ref<SVGTransform> create(const SVGTransformValue& initialValue = { })
     41    static Ref<SVGTransform> create(const AffineTransform& transform = { })
    4242    {
    43         return adoptRef(*new SVGTransform(initialValue));
     43        return adoptRef(*new SVGTransform(SVGTransformValue::SVG_TRANSFORM_MATRIX, transform));
    4444    }
    4545
    46     template<typename T> static ExceptionOr<Ref<SVGTransform>> create(ExceptionOr<T>&& initialValue)
     46    static Ref<SVGTransform> create(const SVGTransformValue& value)
    4747    {
    48         if (initialValue.hasException())
    49             return initialValue.releaseException();
    50         return create(initialValue.releaseReturnValue());
     48        return adoptRef(*new SVGTransform(value.type(), value.matrix()->value(), value.angle(), value.rotationCenter()));
    5149    }
    5250
    53     unsigned short type()
     51    template<typename T>
     52    static ExceptionOr<Ref<SVGTransform>> create(ExceptionOr<T>&& value)
    5453    {
    55         return propertyReference().type();
     54        if (value.hasException())
     55            return value.releaseException();
     56        return create(value.releaseReturnValue());
    5657    }
    5758
    58     Ref<SVGMatrix> matrix();
     59    ~SVGTransform()
     60    {
     61        m_value.matrix()->detach();
     62    }
    5963
    60     float angle()
     64    Ref<SVGTransform> clone() const
    6165    {
    62         return propertyReference().angle();
     66        return SVGTransform::create(m_value);
    6367    }
     68
     69    unsigned short type() { return m_value.type(); }
     70    float angle() { return m_value.angle(); }
     71    const Ref<SVGMatrix>& matrix() { return m_value.matrix(); }
    6472
    6573    ExceptionOr<void> setMatrix(SVGMatrix& matrix)
     
    6876            return Exception { NoModificationAllowedError };
    6977
    70         propertyReference().setMatrix(matrix.propertyReference());
     78        m_value.setMatrix(matrix.value());
    7179        commitChange();
    72 
    7380        return { };
    7481    }
     
    7986            return Exception { NoModificationAllowedError };
    8087
    81         propertyReference().setTranslate(tx, ty);
     88        m_value.setTranslate(tx, ty);
    8289        commitChange();
    83 
    8490        return { };
    8591    }
     
    9096            return Exception { NoModificationAllowedError };
    9197
    92         propertyReference().setScale(sx, sy);
     98        m_value.setScale(sx, sy);
    9399        commitChange();
    94 
    95100        return { };
    96101    }
     
    101106            return Exception { NoModificationAllowedError };
    102107
    103         propertyReference().setRotate(angle, cx, cy);
     108        m_value.setRotate(angle, cx, cy);
    104109        commitChange();
    105 
    106110        return { };
    107111    }
     
    112116            return Exception { NoModificationAllowedError };
    113117
    114         propertyReference().setSkewX(angle);
     118        m_value.setSkewX(angle);
    115119        commitChange();
    116 
    117120        return { };
    118121    }
     
    123126            return Exception { NoModificationAllowedError };
    124127
    125         propertyReference().setSkewY(angle);
     128        m_value.setSkewY(angle);
    126129        commitChange();
    127 
    128130        return { };
    129131    }
    130132
    131133private:
    132     SVGTransform(SVGLegacyAnimatedProperty& animatedProperty, SVGPropertyRole role, SVGTransformValue& value)
    133         : SVGPropertyTearOff<SVGTransformValue>(&animatedProperty, role, value)
     134    using Base = SVGValueProperty<SVGTransformValue>;
     135
     136    SVGTransform(SVGTransformValue::SVGTransformType type, const AffineTransform& transform = { }, float angle = 0, const FloatPoint& rotationCenter = { })
     137        : Base(SVGTransformValue(type, SVGMatrix::create(this, SVGPropertyAccess::ReadWrite, transform), angle, rotationCenter))
    134138    {
    135139    }
    136140
    137     explicit SVGTransform(const SVGTransformValue& initialValue)
    138         : SVGPropertyTearOff<SVGTransformValue>(initialValue)
     141    SVGPropertyOwner* owner() const override { return m_owner; }
     142
     143    void commitPropertyChange(SVGProperty* property) override
    139144    {
     145        ASSERT_UNUSED(property, property == m_value.matrix().ptr());
     146        if (owner())
     147            owner()->commitPropertyChange(this);
     148        m_value.matrixDidChange();
     149    }
     150
     151    String valueAsString() const override
     152    {
     153        return m_value.valueAsString();
    140154    }
    141155};
  • trunk/Source/WebCore/svg/SVGTransform.idl

    r208705 r243730  
    3333
    3434    readonly attribute unsigned short type;
    35     [NewObject] readonly attribute SVGMatrix matrix;
     35    readonly attribute SVGMatrix matrix;
    3636    readonly attribute unrestricted float angle;
    3737
  • trunk/Source/WebCore/svg/SVGTransformList.h

    r243163 r243730  
    22 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org>
    33 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org>
     4 * Copyright (C) 2019 Apple Inc. All rights reserved.
    45 *
    56 * This library is free software; you can redistribute it and/or
     
    2122#pragma once
    2223
    23 #include "SVGAnimatedListPropertyTearOff.h"
    24 #include "SVGListPropertyTearOff.h"
    25 #include "SVGTransformListValues.h"
     24#include "SVGTransform.h"
     25#include "SVGTransformable.h"
     26#include "SVGValuePropertyList.h"
    2627
    2728namespace WebCore {
    2829
    29 class SVGTransformList final : public SVGListPropertyTearOff<SVGTransformListValues> {
     30class SVGTransformList final : public SVGValuePropertyList<SVGTransform> {
     31    friend class SVGViewSpec;
     32    using Base = SVGValuePropertyList<SVGTransform>;
     33    using Base::Base;
     34
    3035public:
    31     using AnimatedListPropertyTearOff = SVGAnimatedListPropertyTearOff<SVGTransformListValues>;
    32     using ListWrapperCache = AnimatedListPropertyTearOff::ListWrapperCache;
    33 
    34     static Ref<SVGTransformList> create(AnimatedListPropertyTearOff& animatedProperty, SVGPropertyRole role, SVGTransformListValues& values, ListWrapperCache& wrappers)
     36    static Ref<SVGTransformList> create()
    3537    {
    36         return adoptRef(*new SVGTransformList(animatedProperty, role, values, wrappers));
     38        return adoptRef(*new SVGTransformList());
    3739    }
    3840
    39     ExceptionOr<Ref<SVGTransform>> createSVGTransformFromMatrix(SVGMatrix& matrix)
     41    static Ref<SVGTransformList> create(SVGPropertyOwner* owner, SVGPropertyAccess access)
    4042    {
    41         ASSERT(m_values);
    42         return m_values->createSVGTransformFromMatrix(matrix);
     43        return adoptRef(*new SVGTransformList(owner, access));
     44    }
     45
     46    static Ref<SVGTransformList> create(const SVGTransformList& other, SVGPropertyAccess access)
     47    {
     48        return adoptRef(*new SVGTransformList(other, access));
     49    }
     50
     51    ExceptionOr<Ref<SVGTransform>> createSVGTransformFromMatrix(const Ref<SVGMatrix>& matrix)
     52    {
     53        return SVGTransform::create(matrix->value());
    4354    }
    4455
    4556    ExceptionOr<RefPtr<SVGTransform>> consolidate()
    4657    {
    47         ASSERT(m_values);
    48         ASSERT(m_wrappers);
    49 
    5058        auto result = canAlterList();
    5159        if (result.hasException())
     
    5361        ASSERT(result.releaseReturnValue());
    5462
    55         ASSERT(m_values->size() == m_wrappers->size());
    56 
    5763        // Spec: If the list was empty, then a value of null is returned.
    58         if (m_values->isEmpty())
     64        if (m_items.isEmpty())
    5965            return nullptr;
    6066
    61         detachListWrappers(0);
    62        
    63         RefPtr<SVGTransform> wrapper = m_values->consolidate();
    64         m_wrappers->append(makeWeakPtr(*wrapper));
     67        if (m_items.size() == 1)
     68            return makeRefPtr(at(0).get());
    6569
    66         ASSERT(m_values->size() == m_wrappers->size());
    67         return wrapper;
     70        auto newItem = SVGTransform::create(concatenate());
     71        clearItems();
     72
     73        auto item = append(WTFMove(newItem));
     74        commitChange();
     75        return makeRefPtr(item.get());
     76    }
     77
     78    void parse(const String& value)
     79    {
     80        clearItems();
     81
     82        auto upconvertedCharacters = StringView(value).upconvertedCharacters();
     83        const UChar* start = upconvertedCharacters;
     84        if (!parse(start, start + value.length()))
     85            clearItems();
     86    }
     87
     88    AffineTransform concatenate() const
     89    {
     90        AffineTransform result;
     91        for (const auto& transform : m_items)
     92            result *= transform->matrix()->value();
     93        return result;
     94    }
     95
     96    String valueAsString() const override
     97    {
     98        StringBuilder builder;
     99        for (const auto& transfrom : m_items) {
     100            if (builder.length())
     101                builder.append(' ');
     102
     103            builder.append(transfrom->value().valueAsString());
     104        }
     105        return builder.toString();
    68106    }
    69107
    70108private:
    71     SVGTransformList(AnimatedListPropertyTearOff& animatedProperty, SVGPropertyRole role, SVGTransformListValues& values, ListWrapperCache& wrappers)
    72         : SVGListPropertyTearOff<SVGTransformListValues>(animatedProperty, role, values, wrappers)
     109    bool parse(const UChar*& start, const UChar* end)
    73110    {
     111        bool delimParsed = false;
     112        while (start < end) {
     113            delimParsed = false;
     114            SVGTransformValue::SVGTransformType type = SVGTransformValue::SVG_TRANSFORM_UNKNOWN;
     115            skipOptionalSVGSpaces(start, end);
     116
     117            if (!SVGTransformable::parseAndSkipType(start, end, type))
     118                return false;
     119
     120            Ref<SVGTransform> transform = SVGTransform::create(type);
     121            if (!SVGTransformable::parseTransformValue(type, start, end, transform->value()))
     122                return false;
     123
     124            append(WTFMove(transform));
     125            skipOptionalSVGSpaces(start, end);
     126            if (start < end && *start == ',') {
     127                delimParsed = true;
     128                ++start;
     129            }
     130
     131            skipOptionalSVGSpaces(start, end);
     132        }
     133        return !delimParsed;
    74134    }
    75135};
  • trunk/Source/WebCore/svg/SVGTransformList.idl

    r208705 r243730  
    3737
    3838    [MayThrowException, NewObject] SVGTransform createSVGTransformFromMatrix(SVGMatrix matrix);
    39     [MayThrowException, NewObject] SVGTransform consolidate();
     39    [MayThrowException] SVGTransform consolidate();
    4040};
  • trunk/Source/WebCore/svg/SVGTransformValue.h

    r243703 r243730  
    2222#pragma once
    2323
    24 #include "AffineTransform.h"
     24#include "FloatConversion.h"
    2525#include "FloatPoint.h"
     26#include "FloatSize.h"
     27#include "SVGMatrix.h"
     28#include <wtf/HashMap.h>
     29#include <wtf/NeverDestroyed.h>
     30#include <wtf/text/StringBuilder.h>
    2631
    2732namespace WebCore {
     
    4651    };
    4752
    48     SVGTransformValue();
    49     SVGTransformValue(SVGTransformType, ConstructionMode = ConstructIdentityTransform);
    50     explicit SVGTransformValue(const AffineTransform&);
     53    SVGTransformValue(SVGTransformType type = SVG_TRANSFORM_MATRIX, const AffineTransform& transform = { })
     54        : m_type(type)
     55        , m_matrix(SVGMatrix::create(transform))
     56    {
     57    }
     58
     59    SVGTransformValue(const SVGTransformValue& other)
     60        : m_type(other.m_type)
     61        , m_matrix(SVGMatrix::create(other.matrix()->value()))
     62        , m_angle(other.m_angle)
     63        , m_rotationCenter(other.m_rotationCenter)
     64    {
     65    }
     66
     67    SVGTransformValue(SVGTransformType type, Ref<SVGMatrix>&& matrix, float angle, const FloatPoint& rotationCenter)
     68        : m_type(type)
     69        , m_matrix(WTFMove(matrix))
     70        , m_angle(angle)
     71        , m_rotationCenter(rotationCenter)
     72    {
     73    }
     74
     75    SVGTransformValue(SVGTransformValue&& other)
     76        : m_type(other.m_type)
     77        , m_matrix(other.m_matrix.copyRef())
     78        , m_angle(other.m_angle)
     79        , m_rotationCenter(other.m_rotationCenter)
     80    {
     81    }
     82
     83    SVGTransformValue& operator=(const SVGTransformValue& other)
     84    {
     85        m_type = other.m_type;
     86        m_matrix->setValue(other.m_matrix->value());
     87        m_angle = other.m_angle;
     88        m_rotationCenter = other.m_rotationCenter;
     89        return *this;
     90    }
    5191
    5292    SVGTransformType type() const { return m_type; }
    53 
    54     const AffineTransform& matrix() const { return m_matrix; }
    55     AffineTransform& matrix() { return m_matrix; }
    56     void updateSVGMatrix();
    57 
     93    const Ref<SVGMatrix>& matrix() const { return m_matrix; }
    5894    float angle() const { return m_angle; }
    59     FloatPoint rotationCenter() const { return m_center; }
    60 
    61     void setMatrix(const AffineTransform&);
    62     void setTranslate(float tx, float ty);
    63     void setScale(float sx, float sy);
    64     void setRotate(float angle, float cx, float cy);
    65     void setSkewX(float angle);
    66     void setSkewY(float angle);
    67    
    68     FloatPoint translate() const;
    69     FloatSize scale() const;
     95    FloatPoint rotationCenter() const { return m_rotationCenter; }
    7096
    7197    bool isValid() const { return m_type != SVG_TRANSFORM_UNKNOWN; }
    72     String valueAsString() const;
    73 
    74     static const String& transformTypePrefixForParsing(SVGTransformType);
     98
     99    void setMatrix(const AffineTransform& matrix)
     100    {
     101        m_type = SVG_TRANSFORM_MATRIX;
     102        m_angle = 0;
     103        m_rotationCenter = FloatPoint();
     104        m_matrix->setValue(matrix);
     105    }
     106
     107    void matrixDidChange()
     108    {
     109        // The underlying matrix has been changed, alter the transformation type.
     110        // Spec: In case the matrix object is changed directly (i.e., without using the methods on the SVGTransform interface itself)
     111        // then the type of the SVGTransform changes to SVG_TRANSFORM_MATRIX.
     112        m_type = SVG_TRANSFORM_MATRIX;
     113        m_angle = 0;
     114        m_rotationCenter = FloatPoint();
     115    }
     116
     117    FloatPoint translate() const
     118    {
     119        return FloatPoint::narrowPrecision(m_matrix->e(), m_matrix->f());
     120    }
     121
     122    void setTranslate(float tx, float ty)
     123    {
     124        m_type = SVG_TRANSFORM_TRANSLATE;
     125        m_angle = 0;
     126        m_rotationCenter = FloatPoint();
     127       
     128        m_matrix->value().makeIdentity();
     129        m_matrix->value().translate(tx, ty);
     130    }
     131
     132    FloatSize scale() const
     133    {
     134        return FloatSize::narrowPrecision(m_matrix->a(), m_matrix->d());
     135    }
     136
     137    void setScale(float sx, float sy)
     138    {
     139        m_type = SVG_TRANSFORM_SCALE;
     140        m_angle = 0;
     141        m_rotationCenter = FloatPoint();
     142       
     143        m_matrix->value().makeIdentity();
     144        m_matrix->value().scaleNonUniform(sx, sy);
     145    }
     146
     147    void setRotate(float angle, float cx, float cy)
     148    {
     149        m_type = SVG_TRANSFORM_ROTATE;
     150        m_angle = angle;
     151        m_rotationCenter = FloatPoint(cx, cy);
     152
     153        // TODO: toString() implementation, which can show cx, cy (need to be stored?)
     154        m_matrix->value().makeIdentity();
     155        m_matrix->value().translate(cx, cy);
     156        m_matrix->value().rotate(angle);
     157        m_matrix->value().translate(-cx, -cy);
     158    }
     159
     160    void setSkewX(float angle)
     161    {
     162        m_type = SVG_TRANSFORM_SKEWX;
     163        m_angle = angle;
     164        m_rotationCenter = FloatPoint();
     165       
     166        m_matrix->value().makeIdentity();
     167        m_matrix->value().skewX(angle);
     168    }
     169
     170    void setSkewY(float angle)
     171    {
     172        m_type = SVG_TRANSFORM_SKEWY;
     173        m_angle = angle;
     174        m_rotationCenter = FloatPoint();
     175       
     176        m_matrix->value().makeIdentity();
     177        m_matrix->value().skewY(angle);
     178    }
     179
     180    String valueAsString() const
     181    {
     182        StringBuilder builder;
     183        builder.append(prefixForTransfromType(m_type));
     184        switch (m_type) {
     185        case SVG_TRANSFORM_UNKNOWN:
     186            break;
     187        case SVG_TRANSFORM_MATRIX:
     188            appendMatrix(builder);
     189            break;
     190        case SVG_TRANSFORM_TRANSLATE:
     191            appendTranslate(builder);
     192            break;
     193        case SVG_TRANSFORM_SCALE:
     194            appendScale(builder);
     195            break;
     196        case SVG_TRANSFORM_ROTATE:
     197            appendRotate(builder);
     198            break;
     199        case SVG_TRANSFORM_SKEWX:
     200            appendSkewX(builder);
     201            break;
     202        case SVG_TRANSFORM_SKEWY:
     203            appendSkewY(builder);
     204            break;
     205        }
     206        return builder.toString();
     207    }
     208
     209    static String prefixForTransfromType(SVGTransformType type)
     210    {
     211        switch (type) {
     212        case SVG_TRANSFORM_UNKNOWN:
     213            return emptyString();
     214        case SVG_TRANSFORM_MATRIX:
     215            return "matrix("_s;
     216        case SVG_TRANSFORM_TRANSLATE:
     217            return "translate("_s;
     218        case SVG_TRANSFORM_SCALE:
     219            return "scale("_s;
     220        case SVG_TRANSFORM_ROTATE:
     221            return "rotate("_s;
     222        case SVG_TRANSFORM_SKEWX:
     223            return "skewX("_s;
     224        case SVG_TRANSFORM_SKEWY:
     225            return "skewY("_s;
     226        }
     227        ASSERT_NOT_REACHED();
     228        return emptyString();
     229    }
    75230
    76231private:
     232    static void appendNumbers(StringBuilder& builder)
     233    {
     234        builder.append(')');
     235    }
     236
     237    template<typename Number, typename... Numbers>
     238    static void appendNumbers(StringBuilder& builder, Number number, Numbers... numbers)
     239    {
     240        if (builder.length() && builder[builder.length() - 1] != '(')
     241            builder.append(' ');
     242        builder.appendNumber(number);
     243        appendNumbers(builder, numbers...);
     244    }
     245
     246    void appendMatrix(StringBuilder& builder) const
     247    {
     248        appendNumbers(builder, m_matrix->a(), m_matrix->b(), m_matrix->c(), m_matrix->d(), m_matrix->e(), m_matrix->f());
     249    }
     250
     251    void appendTranslate(StringBuilder& builder) const
     252    {
     253        appendNumbers(builder, m_matrix->e(), m_matrix->f());
     254    }
     255
     256    void appendScale(StringBuilder& builder) const
     257    {
     258        appendNumbers(builder, m_matrix->value().xScale(), m_matrix->value().yScale());
     259    }
     260
     261    void appendRotate(StringBuilder& builder) const
     262    {
     263        double angleInRad = deg2rad(m_angle);
     264        double cosAngle = std::cos(angleInRad);
     265        double sinAngle = std::sin(angleInRad);
     266
     267        float cx = narrowPrecisionToFloat(cosAngle != 1 ? (m_matrix->e() * (1 - cosAngle) - m_matrix->f() * sinAngle) / (1 - cosAngle) / 2 : 0);
     268        float cy = narrowPrecisionToFloat(cosAngle != 1 ? (m_matrix->e() * sinAngle / (1 - cosAngle) + m_matrix->f()) / 2 : 0);
     269
     270        if (cx || cy)
     271            appendNumbers(builder, m_angle, cx, cy);
     272        else
     273            appendNumbers(builder, m_angle);
     274    }
     275
     276    void appendSkewX(StringBuilder& builder) const
     277    {
     278        appendNumbers(builder, m_angle);
     279    }
     280
     281    void appendSkewY(StringBuilder& builder) const
     282    {
     283        appendNumbers(builder, m_angle);
     284    }
     285
    77286    SVGTransformType m_type { SVG_TRANSFORM_UNKNOWN };
     287    Ref<SVGMatrix> m_matrix;
    78288    float m_angle { 0 };
    79     FloatPoint m_center;
    80     AffineTransform m_matrix;
     289    FloatPoint m_rotationCenter;
    81290};
    82291
  • trunk/Source/WebCore/svg/SVGTransformable.cpp

    r223728 r243730  
    2828#include "SVGNames.h"
    2929#include "SVGParserUtilities.h"
    30 #include "SVGTransformListValues.h"
    3130#include <wtf/text/StringView.h>
    3231
     
    145144static const UChar matrixDesc[] =  {'m', 'a', 't', 'r', 'i', 'x'};
    146145
    147 static inline bool parseAndSkipType(const UChar*& currTransform, const UChar* end, SVGTransformValue::SVGTransformType& type)
     146bool SVGTransformable::parseAndSkipType(const UChar*& currTransform, const UChar* end, SVGTransformValue::SVGTransformType& type)
    148147{
    149148    if (currTransform >= end)
     
    180179}
    181180
    182 bool SVGTransformable::parseTransformAttribute(SVGTransformListValues& list, const UChar*& currTransform, const UChar* end, TransformParsingMode mode)
    183 {
    184     if (mode == ClearList)
    185         list.clear();
    186 
    187     bool delimParsed = false;
    188     while (currTransform < end) {
    189         delimParsed = false;
    190         SVGTransformValue::SVGTransformType type = SVGTransformValue::SVG_TRANSFORM_UNKNOWN;
    191         skipOptionalSVGSpaces(currTransform, end);
    192 
    193         if (!parseAndSkipType(currTransform, end, type))
    194             return false;
    195 
    196         SVGTransformValue transform;
    197         if (!parseTransformValue(type, currTransform, end, transform))
    198             return false;
    199 
    200         list.append(transform);
    201         skipOptionalSVGSpaces(currTransform, end);
    202         if (currTransform < end && *currTransform == ',') {
    203             delimParsed = true;
    204             ++currTransform;
    205         }
    206         skipOptionalSVGSpaces(currTransform, end);
    207     }
    208 
    209     return !delimParsed;
    210181}
    211 
    212 }
  • trunk/Source/WebCore/svg/SVGTransformable.h

    r208863 r243730  
    2828   
    2929class AffineTransform;
    30 class SVGTransformListValues;
    3130
    3231class SVGTransformable : public SVGLocatable {
    3332public:
    34     enum TransformParsingMode {
    35         ClearList,
    36         DoNotClearList
    37     };
    38 
    3933    virtual ~SVGTransformable();
    4034
    41     static bool parseTransformAttribute(SVGTransformListValues&, const UChar*& ptr, const UChar* end, TransformParsingMode = ClearList);
    4235    static bool parseTransformValue(SVGTransformValue::SVGTransformType, const UChar*& ptr, const UChar* end, SVGTransformValue&);
    4336    static SVGTransformValue::SVGTransformType parseTransformType(const String&);
     37    static bool parseAndSkipType(const UChar*& currTransform, const UChar* end, SVGTransformValue::SVGTransformType&);
    4438
    4539    AffineTransform localCoordinateSpaceTransform(SVGLocatable::CTMScope) const override { return animatedLocalTransform(); }
  • trunk/Source/WebCore/svg/SVGViewSpec.cpp

    r243183 r243730  
    2323
    2424#include "Document.h"
    25 #include "SVGAnimatedTransformList.h"
    2625#include "SVGElement.h"
    2726#include "SVGFitToViewBox.h"
     
    3736    , m_contextElement(makeWeakPtr(contextElement))
    3837    , m_attributeOwnerProxy(*this, contextElement)
     38    , m_transform(SVGTransformList::create(&contextElement, SVGPropertyAccess::ReadOnly))
    3939{
    40     registerAttributes();
    41 }
    42 
    43 void SVGViewSpec::registerAttributes()
    44 {
    45     auto& registry = attributeRegistry();
    46     if (!registry.isEmpty())
    47         return;
    48     registry.registerAttribute<SVGNames::transformAttr, &SVGViewSpec::m_transform>();
     40    static std::once_flag onceFlag;
     41    std::call_once(onceFlag, [] {
     42        PropertyRegistry::registerProperty<SVGNames::transformAttr, &SVGViewSpec::m_transform>();
     43    });
    4944}
    5045
     
    5954}
    6055
    61 RefPtr<SVGTransformList> SVGViewSpec::transform()
    62 {
    63     if (!m_contextElement)
    64         return nullptr;
    65     // Return the animVal here, as its readonly by default - which is exactly what we want here.
    66     return m_transform.animatedProperty(m_attributeOwnerProxy)->animVal();
    67 }
    68 
    6956void SVGViewSpec::reset()
    7057{
    7158    m_viewTargetString = emptyString();
    72     m_transform.resetValue();
     59    m_transform->clearItems();
    7360    SVGFitToViewBox::reset();
    7461    SVGZoomAndPan::reset();
     
    153140                return false;
    154141            currViewSpec++;
    155             SVGTransformable::parseTransformAttribute(m_transform.value(), currViewSpec, end, SVGTransformable::DoNotClearList);
     142            m_transform->parse(currViewSpec, end);
    156143            if (currViewSpec >= end || *currViewSpec != ')')
    157144                return false;
  • trunk/Source/WebCore/svg/SVGViewSpec.h

    r243185 r243730  
    2222
    2323#include "SVGFitToViewBox.h"
    24 #include "SVGTransformListValues.h"
    2524#include "SVGZoomAndPan.h"
    2625
     
    4443    const String& viewTargetString() const { return m_viewTargetString; }
    4544
    46     String transformString() const { return m_transform.toString(); }
    47     RefPtr<SVGTransformList> transform();
    48     SVGTransformListValues transformValue() const { return m_transform.value(); }
     45    String transformString() const { return m_transform->valueAsString(); }
     46    Ref<SVGTransformList>& transform() { return m_transform; }
    4947
    5048    const WeakPtr<SVGElement>& contextElementConcurrently() const { return m_contextElement; }
     
    5452
    5553    using AttributeOwnerProxy = SVGAttributeOwnerProxyImpl<SVGViewSpec, SVGFitToViewBox>;
    56     static void registerAttributes();
    57 
    58     static AttributeOwnerProxy::AttributeRegistry& attributeRegistry() { return AttributeOwnerProxy::attributeRegistry(); }
    59     static bool isKnownAttribute(const QualifiedName& attributeName) { return AttributeOwnerProxy::isKnownAttribute(attributeName); }
    60 
    6154    using PropertyRegistry = SVGPropertyOwnerRegistry<SVGViewSpec, SVGFitToViewBox>;
    6255
     
    6457    String m_viewTargetString;
    6558    AttributeOwnerProxy m_attributeOwnerProxy;
    66     SVGAnimatedTransformListAttribute m_transform;
     59    Ref<SVGTransformList> m_transform;
    6760};
    6861
  • trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyAccessorImpl.h

    r243555 r243730  
    320320};
    321321
     322template<typename OwnerType>
     323class SVGAnimatedTransformListAccessor final : public SVGAnimatedPropertyAccessor<OwnerType, SVGAnimatedTransformList> {
     324    using Base = SVGAnimatedPropertyAccessor<OwnerType, SVGAnimatedTransformList>;
     325    using Base::property;
     326
     327public:
     328    using Base::Base;
     329    template<Ref<SVGAnimatedTransformList> OwnerType::*property>
     330    constexpr static const SVGMemberAccessor<OwnerType>& singleton() { return Base::template singleton<SVGAnimatedTransformListAccessor, property>(); }
     331
     332private:
     333    std::unique_ptr<SVGAttributeAnimator> createAnimator(OwnerType& owner, const QualifiedName& attributeName, AnimationMode animationMode, CalcMode calcMode, bool isAccumulated, bool isAdditive) const final
     334    {
     335        return SVGAnimatedTransformListAnimator::create(attributeName, property(owner), animationMode, calcMode, isAccumulated, isAdditive);
     336    }
     337
     338    void appendAnimatedInstance(OwnerType& owner, SVGAttributeAnimator& animator) const final
     339    {
     340        static_cast<SVGAnimatedTransformListAnimator&>(animator).appendAnimatedInstance(property(owner));
     341    }
     342};
     343
    322344}
  • trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyAnimatorImpl.h

    r243555 r243730  
    309309};
    310310
     311class SVGAnimatedTransformListAnimator final : public SVGAnimatedPropertyAnimator<SVGAnimatedTransformList, SVGAnimationTransformListFunction> {
     312    using Base = SVGAnimatedPropertyAnimator<SVGAnimatedTransformList, SVGAnimationTransformListFunction>;
     313    using Base::Base;
     314
     315public:
     316    static auto create(const QualifiedName& attributeName, Ref<SVGAnimatedTransformList>& animated, AnimationMode animationMode, CalcMode calcMode, bool isAccumulated, bool isAdditive)
     317    {
     318        return std::make_unique<SVGAnimatedTransformListAnimator>(attributeName, animated, animationMode, calcMode, isAccumulated, isAdditive);
     319    }
     320
     321private:
     322    void progress(SVGElement* targetElement, float percentage, unsigned repeatCount) final
     323    {
     324        m_function.progress(targetElement, percentage, repeatCount, m_animated->animVal());
     325    }
     326};
     327
    311328}
  • trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyImpl.h

    r243555 r243730  
    3030#include "SVGAnimatedPrimitiveProperty.h"
    3131#include "SVGAnimatedPropertyList.h"
    32 #include "SVGAnimatedTransformList.h"
    3332#include "SVGAnimatedValueProperty.h"
    3433#include "SVGDecoratedEnumeration.h"
     
    4140#include "SVGPreserveAspectRatio.h"
    4241#include "SVGRect.h"
     42#include "SVGTransformList.h"
    4343
    4444namespace WebCore {
     
    5959using SVGAnimatedNumberList = SVGAnimatedPropertyList<SVGNumberList>;
    6060using SVGAnimatedPointList = SVGAnimatedPropertyList<SVGPointList>;
     61using SVGAnimatedTransformList = SVGAnimatedPropertyList<SVGTransformList>;
    6162
    6263class SVGAnimatedOrientType : public SVGAnimatedEnumeration {
  • trunk/Source/WebCore/svg/properties/SVGAnimationAdditiveListFunctionImpl.h

    r243515 r243730  
    2828#include "SVGAnimationAdditiveListFunction.h"
    2929#include "SVGLengthList.h"
     30#include "SVGNumberList.h"
    3031#include "SVGPointList.h"
     32#include "SVGTransformDistance.h"
     33#include "SVGTransformList.h"
    3134
    3235namespace WebCore {
     
    200203};
    201204
     205class SVGAnimationTransformListFunction : public SVGAnimationAdditiveListFunction<SVGTransformList> {
     206public:
     207    using Base = SVGAnimationAdditiveListFunction<SVGTransformList>;
     208    using Base::Base;
     209
     210    void setFromAndToValues(SVGElement*, const String& from, const String& to) override
     211    {
     212        m_from->parse(from);
     213        m_to->parse(to);
     214    }
     215
     216    void setToAtEndOfDurationValue(const String& toAtEndOfDuration) override
     217    {
     218        m_toAtEndOfDuration->parse(toAtEndOfDuration);
     219    }
     220
     221    void progress(SVGElement*, float percentage, unsigned repeatCount, RefPtr<SVGTransformList>& animated)
     222    {
     223        // Pass false to 'resizeAnimatedIfNeeded', as the special post-multiplication behavior of <animateTransform> needs to be respected below.
     224        if (!adjustAnimatedList(m_animationMode, percentage, animated, false))
     225            return;
     226
     227        // Spec: To animations provide specific functionality to get a smooth change from the underlying
     228        // value to the ‘to’ attribute value, which conflicts mathematically with the requirement for
     229        // additive transform animations to be post-multiplied. As a consequence, in SVG 1.1 the behavior
     230        // of to animations for ‘animateTransform’ is undefined.
     231        const Vector<Ref<SVGTransform>>& fromItems = m_from->items();
     232        const Vector<Ref<SVGTransform>>& toItems = m_to->items();
     233        const Vector<Ref<SVGTransform>>& toAtEndOfDurationItems = toAtEndOfDuration()->items();
     234        Vector<Ref<SVGTransform>>& animatedItems = animated->items();
     235
     236        // Never resize the animatedList to the m_to size, instead either clear the list
     237        // or append to it.
     238        if (!animatedItems.isEmpty() && (!m_isAdditive || m_animationMode == AnimationMode::To))
     239            animatedItems.clear();
     240
     241        auto fromItemsSize = fromItems.size();
     242
     243        static const AffineTransform zerosAffineTransform = { 0, 0, 0, 0, 0, 0 };
     244        const SVGTransformValue& to = toItems[0]->value();
     245        const SVGTransformValue zerosTransform = SVGTransformValue(to.type(), zerosAffineTransform);
     246
     247        const SVGTransformValue& from = fromItemsSize ? fromItems[0]->value() : zerosTransform;
     248        SVGTransformValue current = SVGTransformDistance(from, to).scaledDistance(percentage).addToSVGTransform(from);
     249
     250        if (m_isAccumulated && repeatCount) {
     251            const SVGTransformValue& toAtEndOfDuration = toAtEndOfDurationItems.size() ? toAtEndOfDurationItems[0]->value() : zerosTransform;
     252            animatedItems.append(SVGTransform::create(SVGTransformDistance::addSVGTransforms(current, toAtEndOfDuration, repeatCount)));
     253        } else
     254            animatedItems.append(SVGTransform::create(current));
     255    }
     256
     257private:
     258    void addFromAndToValues(SVGElement*) override
     259    {
     260        const Vector<Ref<SVGTransform>>& fromItems = m_from->items();
     261        Vector<Ref<SVGTransform>>& toItems = m_to->items();
     262
     263        if (!fromItems.size() || fromItems.size() != toItems.size())
     264            return;
     265
     266        ASSERT(fromItems.size() == 1);
     267        const Ref<SVGTransform>& from = fromItems[0];
     268        Ref<SVGTransform>& to = toItems[0];
     269
     270        to->setValue(SVGTransformDistance::addSVGTransforms(from->value(), to->value()));
     271    }
     272};
     273
    202274}
  • trunk/Source/WebCore/svg/properties/SVGAnimationAdditiveValueFunctionImpl.h

    r243555 r243730  
    2626#pragma once
    2727
     28#include "Color.h"
     29#include "FloatRect.h"
     30#include "SVGAngleValue.h"
    2831#include "SVGAnimationAdditiveValueFunction.h"
     32#include "SVGLengthValue.h"
    2933#include "SVGPathByteStream.h"
    3034#include "SVGPropertyTraits.h"
  • trunk/Source/WebCore/svg/properties/SVGAttributeRegistry.h

    r243515 r243730  
    2626#pragma once
    2727
    28 #include "SVGAnimatedTransformList.h"
    2928#include "SVGAttributeAccessor.h"
    3029#include "SVGLegacyAnimatedProperty.h"
     
    4140        static NeverDestroyed<SVGAttributeRegistry<OwnerType, BaseTypes...>> map;
    4241        return map;
    43     }
    44 
    45     template<const LazyNeverDestroyed<const QualifiedName>& attributeName, SVGZoomAndPanTypeAttribute OwnerType::*attribute>
    46     void registerAttribute()
    47     {
    48         registerAttribute(SVGZoomAndPanTypeAttributeAccessor<OwnerType>::template singleton<attributeName, attribute>());
    49     }
    50 
    51     // Animatable attributes
    52     template<const LazyNeverDestroyed<const QualifiedName>& attributeName, SVGAnimatedTransformListAttribute OwnerType::*attribute>
    53     void registerAttribute()
    54     {
    55         registerAttribute(SVGAnimatedTransformListAttributeAccessor<OwnerType>::template singleton<attributeName, attribute>());
    5642    }
    5743
  • trunk/Source/WebCore/svg/properties/SVGPropertyAccessorImpl.h

    r243130 r243730  
    4141};
    4242
     43template<typename OwnerType>
     44class SVGTransformListAccessor final : public SVGPropertyAccessor<OwnerType, SVGTransformList> {
     45    using Base = SVGPropertyAccessor<OwnerType, SVGTransformList>;
     46
     47public:
     48    using Base::Base;
     49    template<Ref<SVGTransformList> OwnerType::*property>
     50    constexpr static const SVGMemberAccessor<OwnerType>& singleton() { return Base::template singleton<SVGTransformListAccessor, property>(); }
     51};
     52
    4353}
  • trunk/Source/WebCore/svg/properties/SVGPropertyOwnerRegistry.h

    r243555 r243730  
    5050    }
    5151
     52    template<const LazyNeverDestroyed<const QualifiedName>& attributeName, Ref<SVGTransformList> OwnerType::*property>
     53    static void registerProperty()
     54    {
     55        registerProperty(attributeName, SVGTransformListAccessor<OwnerType>::template singleton<property>());
     56    }
     57
    5258    template<const LazyNeverDestroyed<const QualifiedName>& attributeName, Ref<SVGAnimatedBoolean> OwnerType::*property>
    5359    static void registerProperty()
     
    127133        registerProperty(attributeName, SVGAnimatedStringAccessor<OwnerType>::template singleton<property>());
    128134    }
    129    
     135
     136    template<const LazyNeverDestroyed<const QualifiedName>& attributeName, Ref<SVGAnimatedTransformList> OwnerType::*property>
     137    static void registerProperty()
     138    {
     139        registerProperty(attributeName, SVGAnimatedTransformListAccessor<OwnerType>::template singleton<property>());
     140    }
     141
    130142    template<const LazyNeverDestroyed<const QualifiedName>& attributeName, Ref<SVGAnimatedInteger> OwnerType::*property1, Ref<SVGAnimatedInteger> OwnerType::*property2>
    131143    static void registerProperty()
Note: See TracChangeset for help on using the changeset viewer.