Remove the SVG tear off objects for SVGNumber, SVGNumberList and SVGAnimatedNumberList
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Mar 2019 04:45:26 +0000 (04:45 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Mar 2019 04:45:26 +0000 (04:45 +0000)
https://bugs.webkit.org/show_bug.cgi?id=196084

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

Source/WebCore:

To remove the tear off objects for these interfaces, we need to do the
following:

-- SVGNumber will be a superclass of SVGValueProperty<float>. It provides
   the DOM interface functions.

-- SVGNumberList will be a superclass of SVGValuePropertyList<SVGNumber>.
   It provides creation, parsing and converting to string functions.

-- SVGAnimatedNumberList will be defined as SVGAnimatedPropertyList<SVGNumberList>.

To make things work as expected:

-- Properties of type SVGAnimatedNumberList have to be registered with
   SVGPropertyOwnerRegistry.
-- An accessor, an animator and an animation function should be defined
   for SVGAnimatedNumberList.

* Sources.txt:
* WebCore.xcodeproj/project.pbxproj:
* rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
(WebCore::updateCharacterData):
(WebCore::SVGTextLayoutAttributesBuilder::fillCharacterDataMap):
* svg/SVGAnimatedNumberList.cpp: Removed.
* svg/SVGAnimatedNumberList.h: Removed.
* svg/SVGAnimatedPointList.cpp: Removed.
* svg/SVGAnimatedPointList.h: Removed.
* svg/SVGAnimatedType.h:
(WebCore::SVGAnimatedType::type const):
* svg/SVGAnimatorFactory.h:
(WebCore::SVGAnimatorFactory::create):
* svg/SVGComponentTransferFunctionElement.cpp:
(WebCore::SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement):
(WebCore::SVGComponentTransferFunctionElement::registerAttributes):
(WebCore::SVGComponentTransferFunctionElement::parseAttribute):
* svg/SVGComponentTransferFunctionElement.h:
(WebCore::SVGComponentTransferFunctionElement::tableValues const):
(WebCore::SVGComponentTransferFunctionElement::tableValuesAnimated):
* svg/SVGFEColorMatrixElement.cpp:
(WebCore::SVGFEColorMatrixElement::SVGFEColorMatrixElement):
(WebCore::SVGFEColorMatrixElement::registerAttributes):
(WebCore::SVGFEColorMatrixElement::parseAttribute):
(WebCore::SVGFEColorMatrixElement::build const):
* svg/SVGFEColorMatrixElement.h:
* svg/SVGFEConvolveMatrixElement.cpp:
(WebCore::SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement):
(WebCore::SVGFEConvolveMatrixElement::registerAttributes):
(WebCore::SVGFEConvolveMatrixElement::parseAttribute):
(WebCore::SVGFEConvolveMatrixElement::build const):
* svg/SVGFEConvolveMatrixElement.h:
* svg/SVGNumber.h:
(WebCore::SVGNumber::create):
(WebCore::SVGNumber::clone const):
(WebCore::SVGNumber::valueForBindings):
(WebCore::SVGNumber::setValueForBindings):
(WebCore::SVGNumber::SVGNumber): Deleted.
* svg/SVGNumberList.h:
(WebCore::SVGNumberList::create):
(WebCore::SVGNumberList::parse):
(WebCore::SVGNumberList::SVGNumberList): Deleted.
* svg/SVGNumberListValues.cpp: Removed.
* svg/SVGNumberListValues.h: Removed.
* svg/SVGTextPositioningElement.cpp:
(WebCore::SVGTextPositioningElement::SVGTextPositioningElement):
(WebCore::SVGTextPositioningElement::registerAttributes):
(WebCore::SVGTextPositioningElement::parseAttribute):
* svg/SVGTextPositioningElement.h:
(WebCore::SVGTextPositioningElement::rotate const):
(WebCore::SVGTextPositioningElement::rotateAnimated):
* svg/SVGValue.h:
* svg/properties/SVGAnimatedPropertyAccessorImpl.h:
* svg/properties/SVGAnimatedPropertyAnimatorImpl.h:
* svg/properties/SVGAnimatedPropertyImpl.h:
* svg/properties/SVGAnimationAdditiveListFunctionImpl.h:
(WebCore::SVGAnimationNumberListFunction::progress):
* svg/properties/SVGAttributeRegistry.h:
* svg/properties/SVGPropertyOwnerRegistry.h:
(WebCore::SVGPropertyOwnerRegistry::registerProperty):

LayoutTests:

* svg/dom/SVGNumberList-basics-expected.txt:
* svg/dom/SVGNumberList-basics.xhtml:
This change is required because SVGNumberList will be following the SVG2
specs regarding adding new items to the list.

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

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

30 files changed:
LayoutTests/ChangeLog
LayoutTests/svg/dom/SVGNumberList-basics-expected.txt
LayoutTests/svg/dom/SVGNumberList-basics.xhtml
Source/WebCore/ChangeLog
Source/WebCore/Sources.txt
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/rendering/svg/SVGTextLayoutAttributesBuilder.cpp
Source/WebCore/svg/SVGAnimatedNumberList.cpp [deleted file]
Source/WebCore/svg/SVGAnimatedNumberList.h [deleted file]
Source/WebCore/svg/SVGAnimatedType.h
Source/WebCore/svg/SVGAnimatorFactory.h
Source/WebCore/svg/SVGComponentTransferFunctionElement.cpp
Source/WebCore/svg/SVGComponentTransferFunctionElement.h
Source/WebCore/svg/SVGFEColorMatrixElement.cpp
Source/WebCore/svg/SVGFEColorMatrixElement.h
Source/WebCore/svg/SVGFEConvolveMatrixElement.cpp
Source/WebCore/svg/SVGFEConvolveMatrixElement.h
Source/WebCore/svg/SVGNumber.h
Source/WebCore/svg/SVGNumberList.h
Source/WebCore/svg/SVGNumberListValues.cpp [deleted file]
Source/WebCore/svg/SVGNumberListValues.h [deleted file]
Source/WebCore/svg/SVGTextPositioningElement.cpp
Source/WebCore/svg/SVGTextPositioningElement.h
Source/WebCore/svg/SVGValue.h
Source/WebCore/svg/properties/SVGAnimatedPropertyAccessorImpl.h
Source/WebCore/svg/properties/SVGAnimatedPropertyAnimatorImpl.h
Source/WebCore/svg/properties/SVGAnimatedPropertyImpl.h
Source/WebCore/svg/properties/SVGAnimationAdditiveListFunctionImpl.h
Source/WebCore/svg/properties/SVGAttributeRegistry.h
Source/WebCore/svg/properties/SVGPropertyOwnerRegistry.h

index 4dde87d..0a1ac18 100644 (file)
@@ -1,3 +1,17 @@
+2019-03-21  Said Abou-Hallawa  <sabouhallawa@apple.com>
+
+        Remove the SVG tear off objects for SVGNumber, SVGNumberList and SVGAnimatedNumberList
+        https://bugs.webkit.org/show_bug.cgi?id=196084
+
+        Reviewed by Simon Fraser.
+
+        * svg/dom/SVGNumberList-basics-expected.txt:
+        * svg/dom/SVGNumberList-basics.xhtml:
+        This change is required because SVGNumberList will be following the SVG2
+        specs regarding adding new items to the list. 
+
+        See https://www.w3.org/TR/SVG/types.html#TermListInterface.
+
 2019-03-21  Simon Fraser  <simon.fraser@apple.com>
 
         WebKit1 test gardening.
index 9414957..6098ae2 100644 (file)
@@ -26,24 +26,28 @@ PASS text1.rotate.baseVal.insertItemBefore('aString') threw exception TypeError:
 PASS text1.rotate.baseVal.insertItemBefore(text1) threw exception TypeError: Not enough arguments.
 PASS text1.rotate.baseVal.insertItemBefore(null) threw exception TypeError: Not enough arguments.
 PASS text1.rotate.baseVal.insertItemBefore(text1.rotate.baseVal.getItem(1), 'aString') is text1.rotate.baseVal.getItem(0)
+PASS text1.rotate.baseVal.removeItem(2).toString() is "[object SVGNumber]"
 PASS text1.rotate.baseVal.numberOfItems is 3
 PASS text1.rotate.baseVal.getItem(0).value is 180
 PASS text1.rotate.baseVal.getItem(1).value is 90
 PASS text1.rotate.baseVal.getItem(2).value is 270
 PASS text1.getAttribute('rotate') is "180 90 270"
 PASS text1.rotate.baseVal.insertItemBefore(text1.rotate.baseVal.getItem(1), text1) is text1.rotate.baseVal.getItem(0)
+PASS text1.rotate.baseVal.removeItem(2).toString() is "[object SVGNumber]"
 PASS text1.rotate.baseVal.numberOfItems is 3
 PASS text1.rotate.baseVal.getItem(0).value is 90
 PASS text1.rotate.baseVal.getItem(1).value is 180
 PASS text1.rotate.baseVal.getItem(2).value is 270
 PASS text1.getAttribute('rotate') is "90 180 270"
 PASS text1.rotate.baseVal.insertItemBefore(text1.rotate.baseVal.getItem(1), null) is text1.rotate.baseVal.getItem(0)
+PASS text1.rotate.baseVal.removeItem(2).toString() is "[object SVGNumber]"
 PASS text1.rotate.baseVal.numberOfItems is 3
 PASS text1.rotate.baseVal.getItem(0).value is 180
 PASS text1.rotate.baseVal.getItem(1).value is 90
 PASS text1.rotate.baseVal.getItem(2).value is 270
 PASS text1.getAttribute('rotate') is "180 90 270"
 PASS text1.rotate.baseVal.insertItemBefore(text1.rotate.baseVal.getItem(1), 0) is text1.rotate.baseVal.getItem(0)
+PASS text1.rotate.baseVal.removeItem(2).toString() is "[object SVGNumber]"
 PASS text1.rotate.baseVal.numberOfItems is 3
 PASS text1.rotate.baseVal.getItem(0).value is 90
 PASS text1.rotate.baseVal.getItem(1).value is 180
index cc4a96e..d91a342 100644 (file)
@@ -47,6 +47,7 @@
     shouldThrow("text1.rotate.baseVal.insertItemBefore(null)");
 
     shouldBe("text1.rotate.baseVal.insertItemBefore(text1.rotate.baseVal.getItem(1), 'aString')", "text1.rotate.baseVal.getItem(0)");
+    shouldBeEqualToString("text1.rotate.baseVal.removeItem(2).toString()", "[object SVGNumber]");
     shouldBe("text1.rotate.baseVal.numberOfItems", "3");
     shouldBe("text1.rotate.baseVal.getItem(0).value", "180");
     shouldBe("text1.rotate.baseVal.getItem(1).value", "90");
@@ -54,6 +55,7 @@
     shouldBeEqualToString("text1.getAttribute('rotate')", "180 90 270");
 
     shouldBe("text1.rotate.baseVal.insertItemBefore(text1.rotate.baseVal.getItem(1), text1)", "text1.rotate.baseVal.getItem(0)");
+    shouldBeEqualToString("text1.rotate.baseVal.removeItem(2).toString()", "[object SVGNumber]");
     shouldBe("text1.rotate.baseVal.numberOfItems", "3");
     shouldBe("text1.rotate.baseVal.getItem(0).value", "90");
     shouldBe("text1.rotate.baseVal.getItem(1).value", "180");
@@ -61,6 +63,7 @@
     shouldBeEqualToString("text1.getAttribute('rotate')", "90 180 270");
 
     shouldBe("text1.rotate.baseVal.insertItemBefore(text1.rotate.baseVal.getItem(1), null)", "text1.rotate.baseVal.getItem(0)");
+    shouldBeEqualToString("text1.rotate.baseVal.removeItem(2).toString()", "[object SVGNumber]");
     shouldBe("text1.rotate.baseVal.numberOfItems", "3");
     shouldBe("text1.rotate.baseVal.getItem(0).value", "180");
     shouldBe("text1.rotate.baseVal.getItem(1).value", "90");
@@ -68,6 +71,7 @@
     shouldBeEqualToString("text1.getAttribute('rotate')", "180 90 270");
 
     shouldBe("text1.rotate.baseVal.insertItemBefore(text1.rotate.baseVal.getItem(1), 0)", "text1.rotate.baseVal.getItem(0)");
+    shouldBeEqualToString("text1.rotate.baseVal.removeItem(2).toString()", "[object SVGNumber]");
     shouldBe("text1.rotate.baseVal.numberOfItems", "3");
     shouldBe("text1.rotate.baseVal.getItem(0).value", "90");
     shouldBe("text1.rotate.baseVal.getItem(1).value", "180");
index 5635df8..06e949e 100644 (file)
@@ -1,3 +1,89 @@
+2019-03-21  Said Abou-Hallawa  <sabouhallawa@apple.com>
+
+        Remove the SVG tear off objects for SVGNumber, SVGNumberList and SVGAnimatedNumberList
+        https://bugs.webkit.org/show_bug.cgi?id=196084
+
+        Reviewed by Simon Fraser.
+
+        To remove the tear off objects for these interfaces, we need to do the
+        following:
+
+        -- SVGNumber will be a superclass of SVGValueProperty<float>. It provides
+           the DOM interface functions.
+
+        -- SVGNumberList will be a superclass of SVGValuePropertyList<SVGNumber>.
+           It provides creation, parsing and converting to string functions.
+
+        -- SVGAnimatedNumberList will be defined as SVGAnimatedPropertyList<SVGNumberList>.
+
+        To make things work as expected:
+
+        -- Properties of type SVGAnimatedNumberList have to be registered with
+           SVGPropertyOwnerRegistry.
+        -- An accessor, an animator and an animation function should be defined
+           for SVGAnimatedNumberList.
+
+        * Sources.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+        * rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
+        (WebCore::updateCharacterData):
+        (WebCore::SVGTextLayoutAttributesBuilder::fillCharacterDataMap):
+        * svg/SVGAnimatedNumberList.cpp: Removed.
+        * svg/SVGAnimatedNumberList.h: Removed.
+        * svg/SVGAnimatedPointList.cpp: Removed.
+        * svg/SVGAnimatedPointList.h: Removed.
+        * svg/SVGAnimatedType.h:
+        (WebCore::SVGAnimatedType::type const):
+        * svg/SVGAnimatorFactory.h:
+        (WebCore::SVGAnimatorFactory::create):
+        * svg/SVGComponentTransferFunctionElement.cpp:
+        (WebCore::SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement):
+        (WebCore::SVGComponentTransferFunctionElement::registerAttributes):
+        (WebCore::SVGComponentTransferFunctionElement::parseAttribute):
+        * svg/SVGComponentTransferFunctionElement.h:
+        (WebCore::SVGComponentTransferFunctionElement::tableValues const):
+        (WebCore::SVGComponentTransferFunctionElement::tableValuesAnimated):
+        * svg/SVGFEColorMatrixElement.cpp:
+        (WebCore::SVGFEColorMatrixElement::SVGFEColorMatrixElement):
+        (WebCore::SVGFEColorMatrixElement::registerAttributes):
+        (WebCore::SVGFEColorMatrixElement::parseAttribute):
+        (WebCore::SVGFEColorMatrixElement::build const):
+        * svg/SVGFEColorMatrixElement.h:
+        * svg/SVGFEConvolveMatrixElement.cpp:
+        (WebCore::SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement):
+        (WebCore::SVGFEConvolveMatrixElement::registerAttributes):
+        (WebCore::SVGFEConvolveMatrixElement::parseAttribute):
+        (WebCore::SVGFEConvolveMatrixElement::build const):
+        * svg/SVGFEConvolveMatrixElement.h:
+        * svg/SVGNumber.h:
+        (WebCore::SVGNumber::create):
+        (WebCore::SVGNumber::clone const):
+        (WebCore::SVGNumber::valueForBindings):
+        (WebCore::SVGNumber::setValueForBindings):
+        (WebCore::SVGNumber::SVGNumber): Deleted.
+        * svg/SVGNumberList.h:
+        (WebCore::SVGNumberList::create):
+        (WebCore::SVGNumberList::parse):
+        (WebCore::SVGNumberList::SVGNumberList): Deleted.
+        * svg/SVGNumberListValues.cpp: Removed.
+        * svg/SVGNumberListValues.h: Removed.
+        * svg/SVGTextPositioningElement.cpp:
+        (WebCore::SVGTextPositioningElement::SVGTextPositioningElement):
+        (WebCore::SVGTextPositioningElement::registerAttributes):
+        (WebCore::SVGTextPositioningElement::parseAttribute):
+        * svg/SVGTextPositioningElement.h:
+        (WebCore::SVGTextPositioningElement::rotate const):
+        (WebCore::SVGTextPositioningElement::rotateAnimated):
+        * svg/SVGValue.h:
+        * svg/properties/SVGAnimatedPropertyAccessorImpl.h:
+        * svg/properties/SVGAnimatedPropertyAnimatorImpl.h:
+        * svg/properties/SVGAnimatedPropertyImpl.h:
+        * svg/properties/SVGAnimationAdditiveListFunctionImpl.h:
+        (WebCore::SVGAnimationNumberListFunction::progress):
+        * svg/properties/SVGAttributeRegistry.h:
+        * svg/properties/SVGPropertyOwnerRegistry.h:
+        (WebCore::SVGPropertyOwnerRegistry::registerProperty):
+
 2019-03-21  Devin Rousso  <drousso@apple.com>
 
         Web Inspector: Safari Canvas Inspector seems to show the canvas being rendered twice per frame.
index a4c5b5a..b6423b3 100644 (file)
@@ -2273,7 +2273,6 @@ svg/SVGAnimatedAngle.cpp
 svg/SVGAnimatedEnumeration.cpp
 svg/SVGAnimatedLength.cpp
 svg/SVGAnimatedLengthList.cpp
-svg/SVGAnimatedNumberList.cpp
 svg/SVGAnimatedPath.cpp
 svg/SVGAnimatedTransformList.cpp
 svg/SVGAnimatedTypeAnimator.cpp
@@ -2349,7 +2348,6 @@ svg/SVGMarkerElement.cpp
 svg/SVGMaskElement.cpp
 svg/SVGMetadataElement.cpp
 svg/SVGMissingGlyphElement.cpp
-svg/SVGNumberListValues.cpp
 svg/SVGParserUtilities.cpp
 svg/SVGPathBlender.cpp
 svg/SVGPathBuilder.cpp
index aaa6ea0..217e500 100644 (file)
                089582560E857A7E00F82C83 /* ImageLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 089582540E857A7E00F82C83 /* ImageLoader.h */; settings = {ATTRIBUTES = (Private, ); }; };
                089A8E07128D8B3D00E7A534 /* SVGAnimatedPathSegListPropertyTearOff.h in Headers */ = {isa = PBXBuildFile; fileRef = 089A8E06128D8B3D00E7A534 /* SVGAnimatedPathSegListPropertyTearOff.h */; };
                08A484780E5272C500C3FE76 /* ScriptElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 08A484760E5272C500C3FE76 /* ScriptElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               08B35B17127B6A88005314DD /* SVGAnimatedNumberList.h in Headers */ = {isa = PBXBuildFile; fileRef = 08B35B16127B6A88005314DD /* SVGAnimatedNumberList.h */; };
                08C7A2C710DC7462002D368B /* SVGNames.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 656581E909D1508D000E61D7 /* SVGNames.h */; };
                08C9251A0FCC7C4A00480DEC /* FilterEffect.h in Headers */ = {isa = PBXBuildFile; fileRef = 08C925180FCC7C4A00480DEC /* FilterEffect.h */; settings = {ATTRIBUTES = (Private, ); }; };
                08CA3D4412894A3800FFF260 /* SVGMatrixTearOff.h in Headers */ = {isa = PBXBuildFile; fileRef = 08CA3D4312894A3800FFF260 /* SVGMatrixTearOff.h */; };
                089A8E06128D8B3D00E7A534 /* SVGAnimatedPathSegListPropertyTearOff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedPathSegListPropertyTearOff.h; sourceTree = "<group>"; };
                08A484750E5272C500C3FE76 /* ScriptElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptElement.cpp; sourceTree = "<group>"; };
                08A484760E5272C500C3FE76 /* ScriptElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptElement.h; sourceTree = "<group>"; };
-               08B35B16127B6A88005314DD /* SVGAnimatedNumberList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGAnimatedNumberList.h; sourceTree = "<group>"; };
                08C925170FCC7C4A00480DEC /* FilterEffect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FilterEffect.cpp; sourceTree = "<group>"; };
                08C925180FCC7C4A00480DEC /* FilterEffect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FilterEffect.h; sourceTree = "<group>"; };
                08CA3D4312894A3800FFF260 /* SVGMatrixTearOff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVGMatrixTearOff.h; sourceTree = "<group>"; };
                43107BE118CC19DE00CC18E8 /* SelectorPseudoTypeMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SelectorPseudoTypeMap.h; sourceTree = "<group>"; };
                431A2FD613B7707A007791E4 /* SVGAnimatedLengthList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimatedLengthList.cpp; sourceTree = "<group>"; };
                432D3FE718A8658400D7DC03 /* SelectorCheckerTestFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SelectorCheckerTestFunctions.h; sourceTree = "<group>"; };
-               4331AC7713B6870000A9E5AE /* SVGAnimatedNumberList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SVGAnimatedNumberList.cpp; sourceTree = "<group>"; };
                4358E87A1360A2EE00E4748C /* JSSVGFEDropShadowElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSVGFEDropShadowElement.cpp; sourceTree = "<group>"; };
                4358E87B1360A2EE00E4748C /* JSSVGFEDropShadowElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSSVGFEDropShadowElement.h; sourceTree = "<group>"; };
                4358E87E1360A31700E4748C /* FEDropShadow.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FEDropShadow.cpp; sourceTree = "<group>"; };
                                B22278B90D00BF200071B782 /* SVGNumber.idl */,
                                B22278BB0D00BF200071B782 /* SVGNumberList.h */,
                                B22278BC0D00BF200071B782 /* SVGNumberList.idl */,
-                               7C39C3681DDB86D300FEFB29 /* SVGNumberListValues.cpp */,
-                               7C39C3691DDB86D300FEFB29 /* SVGNumberListValues.h */,
                                B22278C00D00BF200071B782 /* SVGParserUtilities.cpp */,
                                B22278C10D00BF200071B782 /* SVGParserUtilities.h */,
                                2D3A0E3513A7D76100E85AF0 /* SVGParsingError.h */,
index 6ffefd1..8a57185 100644 (file)
@@ -160,7 +160,7 @@ void SVGTextLayoutAttributesBuilder::buildCharacterDataMap(RenderSVGText& textRo
         fillCharacterDataMap(m_textPositions[i]);
 }
 
-static inline void updateCharacterData(unsigned i, float& lastRotation, SVGCharacterData& data, const SVGLengthContext& lengthContext, const SVGLengthListValues* xList, const SVGLengthListValues* yList, const SVGLengthListValues* dxList, const SVGLengthListValues* dyList, const SVGNumberListValues* rotateList)
+static inline void updateCharacterData(unsigned i, float& lastRotation, SVGCharacterData& data, const SVGLengthContext& lengthContext, const SVGLengthListValues* xList, const SVGLengthListValues* yList, const SVGLengthListValues* dxList, const SVGLengthListValues* dyList, const SVGNumberList* rotateList)
 {
     if (xList)
         data.x = xList->at(i).value(lengthContext);
@@ -171,7 +171,7 @@ static inline void updateCharacterData(unsigned i, float& lastRotation, SVGChara
     if (dyList)
         data.dy = dyList->at(i).value(lengthContext);
     if (rotateList) {
-        data.rotate = rotateList->at(i);
+        data.rotate = rotateList->items()[i]->value();
         lastRotation = data.rotate;
     }
 }
@@ -188,7 +188,7 @@ void SVGTextLayoutAttributesBuilder::fillCharacterDataMap(const TextPosition& po
     unsigned yListSize = yList.size();
     unsigned dxListSize = dxList.size();
     unsigned dyListSize = dyList.size();
-    unsigned rotateListSize = rotateList.size();
+    unsigned rotateListSize = rotateList.items().size();
     if (!xListSize && !yListSize && !dxListSize && !dyListSize && !rotateListSize)
         return;
 
@@ -199,7 +199,7 @@ void SVGTextLayoutAttributesBuilder::fillCharacterDataMap(const TextPosition& po
         const SVGLengthListValues* yListPtr = i < yListSize ? &yList : 0;
         const SVGLengthListValues* dxListPtr = i < dxListSize ? &dxList : 0;
         const SVGLengthListValues* dyListPtr = i < dyListSize ? &dyList : 0;
-        const SVGNumberListValues* rotateListPtr = i < rotateListSize ? &rotateList : 0;
+        const SVGNumberList* rotateListPtr = i < rotateListSize ? &rotateList : nullptr;
         if (!xListPtr && !yListPtr && !dxListPtr && !dyListPtr && !rotateListPtr)
             break;
 
@@ -218,7 +218,7 @@ void SVGTextLayoutAttributesBuilder::fillCharacterDataMap(const TextPosition& po
     if (lastRotation == SVGTextLayoutAttributes::emptyValue())
         return;
 
-    for (unsigned i = rotateList.size(); i < position.length; ++i) {
+    for (unsigned i = rotateList.items().size(); i < position.length; ++i) {
         SVGCharacterDataMap::iterator it = m_characterDataMap.find(position.start + i + 1);
         if (it == m_characterDataMap.end()) {
             SVGCharacterData data;
diff --git a/Source/WebCore/svg/SVGAnimatedNumberList.cpp b/Source/WebCore/svg/SVGAnimatedNumberList.cpp
deleted file mode 100644 (file)
index 02e0108..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (C) Research In Motion Limited 2011. All rights reserved.
- * Copyright (C) 2018 Apple Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-#include "SVGAnimatedNumberList.h"
-
-#include "SVGAnimateElementBase.h"
-
-namespace WebCore {
-
-SVGAnimatedNumberListAnimator::SVGAnimatedNumberListAnimator(SVGAnimationElement* animationElement, SVGElement* contextElement)
-    : SVGAnimatedTypeAnimator(AnimatedNumberList, animationElement, contextElement)
-{
-}
-
-std::unique_ptr<SVGAnimatedType> SVGAnimatedNumberListAnimator::constructFromString(const String& string)
-{
-    return SVGAnimatedType::create(SVGPropertyTraits<SVGNumberListValues>::fromString(string));
-}
-
-std::unique_ptr<SVGAnimatedType> SVGAnimatedNumberListAnimator::startAnimValAnimation(const SVGElementAnimatedPropertyList& animatedTypes)
-{
-    return constructFromBaseValue<SVGAnimatedNumberList>(animatedTypes);
-}
-
-void SVGAnimatedNumberListAnimator::stopAnimValAnimation(const SVGElementAnimatedPropertyList& animatedTypes)
-{
-    stopAnimValAnimationForType<SVGAnimatedNumberList>(animatedTypes);
-}
-
-void SVGAnimatedNumberListAnimator::resetAnimValToBaseVal(const SVGElementAnimatedPropertyList& animatedTypes, SVGAnimatedType& type)
-{
-    resetFromBaseValue<SVGAnimatedNumberList>(animatedTypes, type);
-}
-
-void SVGAnimatedNumberListAnimator::animValWillChange(const SVGElementAnimatedPropertyList& animatedTypes)
-{
-    animValWillChangeForType<SVGAnimatedNumberList>(animatedTypes);
-}
-
-void SVGAnimatedNumberListAnimator::animValDidChange(const SVGElementAnimatedPropertyList& animatedTypes)
-{
-    animValDidChangeForType<SVGAnimatedNumberList>(animatedTypes);
-}
-
-void SVGAnimatedNumberListAnimator::addAnimatedTypes(SVGAnimatedType* from, SVGAnimatedType* to)
-{
-    ASSERT(from->type() == AnimatedNumberList);
-    ASSERT(from->type() == to->type());
-
-    const auto& fromNumberList = from->as<SVGNumberListValues>();
-    auto& toNumberList = to->as<SVGNumberListValues>();
-
-    unsigned fromNumberListSize = fromNumberList.size();
-    if (!fromNumberListSize || fromNumberListSize != toNumberList.size())
-        return;
-
-    for (unsigned i = 0; i < fromNumberListSize; ++i)
-        toNumberList[i] += fromNumberList[i];
-}
-
-void SVGAnimatedNumberListAnimator::calculateAnimatedValue(float percentage, unsigned repeatCount, SVGAnimatedType* from, SVGAnimatedType* to, SVGAnimatedType* toAtEndOfDuration, SVGAnimatedType* animated)
-{
-    ASSERT(m_animationElement);
-
-    const auto& fromNumberList = (m_animationElement->animationMode() == AnimationMode::To ? animated : from)->as<SVGNumberListValues>();
-    const auto& toNumberList = to->as<SVGNumberListValues>();
-    const auto& toAtEndOfDurationNumberList = toAtEndOfDuration->as<SVGNumberListValues>();
-    auto& animatedNumberList = animated->as<SVGNumberListValues>();
-    if (!m_animationElement->adjustFromToListValues<SVGNumberListValues>(fromNumberList, toNumberList, animatedNumberList, percentage))
-        return;
-
-    unsigned fromNumberListSize = fromNumberList.size();
-    unsigned toNumberListSize = toNumberList.size();
-    unsigned toAtEndOfDurationSize = toAtEndOfDurationNumberList.size();
-
-    for (unsigned i = 0; i < toNumberListSize; ++i) {
-        float effectiveFrom = fromNumberListSize ? fromNumberList[i] : 0;
-        float effectiveToAtEnd = i < toAtEndOfDurationSize ? toAtEndOfDurationNumberList[i] : 0;
-        m_animationElement->animateAdditiveNumber(percentage, repeatCount, effectiveFrom, toNumberList[i], effectiveToAtEnd, animatedNumberList[i]);
-    }
-}
-
-float SVGAnimatedNumberListAnimator::calculateDistance(const String&, const String&)
-{
-    // FIXME: Distance calculation is not possible for SVGNumberListValues right now. We need the distance for every single value.
-    return -1;
-}
-
-}
diff --git a/Source/WebCore/svg/SVGAnimatedNumberList.h b/Source/WebCore/svg/SVGAnimatedNumberList.h
deleted file mode 100644 (file)
index bf7c1fe..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) Research In Motion Limited 2010. All rights reserved.
- * Copyright (C) 2018 Apple Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#pragma once
-
-#include "SVGAnimatedListPropertyTearOff.h"
-#include "SVGAnimatedTypeAnimator.h"
-#include "SVGAttributeAccessor.h"
-#include "SVGNumber.h"
-#include "SVGNumberList.h"
-
-namespace WebCore {
-
-class SVGAnimationElement;
-
-using SVGAnimatedNumberList = SVGAnimatedListPropertyTearOff<SVGNumberListValues>;
-using SVGAnimatedNumberListAttribute = SVGAnimatedAttributeList<SVGAnimatedNumberList>;
-
-template<typename OwnerType>
-using SVGAnimatedNumberListAttributeAccessor = SVGAnimatedAttributeAccessor<OwnerType, SVGAnimatedNumberListAttribute, AnimatedNumberList>;
-
-class SVGAnimatedNumberListAnimator final : public SVGAnimatedTypeAnimator {
-public:
-    SVGAnimatedNumberListAnimator(SVGAnimationElement*, SVGElement*);
-
-    std::unique_ptr<SVGAnimatedType> constructFromString(const String&) override;
-    std::unique_ptr<SVGAnimatedType> startAnimValAnimation(const SVGElementAnimatedPropertyList&) override;
-    void stopAnimValAnimation(const SVGElementAnimatedPropertyList&) override;
-    void resetAnimValToBaseVal(const SVGElementAnimatedPropertyList&, SVGAnimatedType&) override;
-    void animValWillChange(const SVGElementAnimatedPropertyList&) override;
-    void animValDidChange(const SVGElementAnimatedPropertyList&) override;
-
-    void addAnimatedTypes(SVGAnimatedType*, SVGAnimatedType*) override;
-    void calculateAnimatedValue(float percentage, unsigned repeatCount, SVGAnimatedType*, SVGAnimatedType*, SVGAnimatedType*, SVGAnimatedType*) override;
-    float calculateDistance(const String& fromString, const String& toString) override;
-};
-
-} // namespace WebCore
index 4129a12..69e86f5 100644 (file)
@@ -115,7 +115,6 @@ public:
             AnimatedEnumeration,
             AnimatedLength,
             AnimatedLengthList,
-            AnimatedNumberList,
             AnimatedPath,
             AnimatedTransformList
         };
index 7813a27..c94457d 100644 (file)
@@ -23,7 +23,6 @@
 #include "SVGAnimatedEnumeration.h"
 #include "SVGAnimatedLength.h"
 #include "SVGAnimatedLengthList.h"
-#include "SVGAnimatedNumberList.h"
 #include "SVGAnimatedPath.h"
 #include "SVGAnimatedTransformList.h"
 
@@ -44,6 +43,7 @@ public:
         case AnimatedInteger:
         case AnimatedIntegerOptionalInteger:
         case AnimatedNumber:
+        case AnimatedNumberList:
         case AnimatedNumberOptionalNumber:
         case AnimatedPoints:
         case AnimatedPreserveAspectRatio:
@@ -59,8 +59,6 @@ public:
             return std::make_unique<SVGAnimatedLengthAnimator>(animationElement, contextElement);
         case AnimatedLengthList:
             return std::make_unique<SVGAnimatedLengthListAnimator>(animationElement, contextElement);
-        case AnimatedNumberList:
-            return std::make_unique<SVGAnimatedNumberListAnimator>(animationElement, contextElement);
         case AnimatedPath:
             return std::make_unique<SVGAnimatedPathAnimator>(animationElement, contextElement);
         case AnimatedTransformList:
index 140519c..531a2c2 100644 (file)
@@ -24,7 +24,6 @@
 
 #include "SVGFEComponentTransferElement.h"
 #include "SVGNames.h"
-#include "SVGNumberListValues.h"
 #include <wtf/IsoMallocInlines.h>
 #include <wtf/NeverDestroyed.h>
 
@@ -39,6 +38,7 @@ SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement(const Q
     
     static std::once_flag onceFlag;
     std::call_once(onceFlag, [] {
+        PropertyRegistry::registerProperty<SVGNames::tableValuesAttr, &SVGComponentTransferFunctionElement::m_tableValues>();
         PropertyRegistry::registerProperty<SVGNames::slopeAttr, &SVGComponentTransferFunctionElement::m_slope>();
         PropertyRegistry::registerProperty<SVGNames::interceptAttr, &SVGComponentTransferFunctionElement::m_intercept>();
         PropertyRegistry::registerProperty<SVGNames::amplitudeAttr, &SVGComponentTransferFunctionElement::m_amplitude>();
@@ -53,7 +53,6 @@ void SVGComponentTransferFunctionElement::registerAttributes()
     if (!registry.isEmpty())
         return;
     registry.registerAttribute<SVGNames::typeAttr, ComponentTransferType, &SVGComponentTransferFunctionElement::m_type>();
-    registry.registerAttribute<SVGNames::tableValuesAttr, &SVGComponentTransferFunctionElement::m_tableValues>();
 }
 
 void SVGComponentTransferFunctionElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
@@ -66,10 +65,7 @@ void SVGComponentTransferFunctionElement::parseAttribute(const QualifiedName& na
     }
 
     if (name == SVGNames::tableValuesAttr) {
-        SVGNumberListValues newList;
-        newList.parse(value);
-        m_tableValues.detachAnimatedListWrappers(attributeOwnerProxy(), newList.size());
-        m_tableValues.setValue(WTFMove(newList));
+        m_tableValues->baseVal()->parse(value);
         return;
     }
 
index 89e6d0c..5bfad18 100644 (file)
@@ -23,7 +23,6 @@
 
 #include "FEComponentTransfer.h"
 #include "SVGAnimatedEnumeration.h"
-#include "SVGAnimatedNumberList.h"
 #include "SVGElement.h"
 
 namespace WebCore {
@@ -75,7 +74,7 @@ public:
     ComponentTransferFunction transferFunction() const;
 
     ComponentTransferType type() const { return m_type.currentValue(attributeOwnerProxy()); }
-    const SVGNumberListValues& tableValues() const { return m_tableValues.currentValue(attributeOwnerProxy()); }
+    const SVGNumberList& tableValues() const { return m_tableValues->currentValue(); }
     float slope() const { return m_slope->currentValue(); }
     float intercept() const { return m_intercept->currentValue(); }
     float amplitude() const { return m_amplitude->currentValue(); }
@@ -83,7 +82,7 @@ public:
     float offset() const { return m_offset->currentValue(); }
 
     RefPtr<SVGAnimatedEnumeration> typeAnimated() { return m_type.animatedProperty(attributeOwnerProxy()); }
-    RefPtr<SVGAnimatedNumberList> tableValuesAnimated() { return m_tableValues.animatedProperty(attributeOwnerProxy()); }
+    SVGAnimatedNumberList& tableValuesAnimated() { return m_tableValues; }
     SVGAnimatedNumber& slopeAnimated() { return m_slope; }
     SVGAnimatedNumber& interceptAnimated() { return m_intercept; }
     SVGAnimatedNumber& amplitudeAnimated() { return m_amplitude; }
@@ -115,7 +114,7 @@ private:
     AttributeOwnerProxy m_attributeOwnerProxy { *this };
     PropertyRegistry m_propertyRegistry { *this };
     SVGAnimatedEnumerationAttribute<ComponentTransferType> m_type { FECOMPONENTTRANSFER_TYPE_IDENTITY };
-    SVGAnimatedNumberListAttribute m_tableValues;
+    Ref<SVGAnimatedNumberList> m_tableValues { SVGAnimatedNumberList::create(this) };
     Ref<SVGAnimatedNumber> m_slope { SVGAnimatedNumber::create(this, 1) };
     Ref<SVGAnimatedNumber> m_intercept { SVGAnimatedNumber::create(this) };
     Ref<SVGAnimatedNumber> m_amplitude { SVGAnimatedNumber::create(this, 1) };
index e3d07e0..8afcbde 100644 (file)
@@ -40,6 +40,7 @@ inline SVGFEColorMatrixElement::SVGFEColorMatrixElement(const QualifiedName& tag
     static std::once_flag onceFlag;
     std::call_once(onceFlag, [] {
         PropertyRegistry::registerProperty<SVGNames::inAttr, &SVGFEColorMatrixElement::m_in1>();
+        PropertyRegistry::registerProperty<SVGNames::valuesAttr, &SVGFEColorMatrixElement::m_values>();
     });
 }
 
@@ -54,7 +55,6 @@ void SVGFEColorMatrixElement::registerAttributes()
     if (!registry.isEmpty())
         return;
     registry.registerAttribute<SVGNames::typeAttr, ColorMatrixType, &SVGFEColorMatrixElement::m_type>();
-    registry.registerAttribute<SVGNames::valuesAttr, &SVGFEColorMatrixElement::m_values>();
 }
 
 void SVGFEColorMatrixElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
@@ -72,10 +72,7 @@ void SVGFEColorMatrixElement::parseAttribute(const QualifiedName& name, const At
     }
 
     if (name == SVGNames::valuesAttr) {
-        SVGNumberListValues newList;
-        newList.parse(value);
-        m_values.detachAnimatedListWrappers(attributeOwnerProxy(), newList.size());
-        m_values.setValue(WTFMove(newList));
+        m_values->baseVal()->parse(value);
         return;
     }
 
@@ -138,13 +135,14 @@ RefPtr<FilterEffect> SVGFEColorMatrixElement::build(SVGFilterBuilder* filterBuil
             break;
         }
     } else {
-        filterValues = values();
-        unsigned size = filterValues.size();
+        unsigned size = values().size();
 
         if ((filterType == FECOLORMATRIX_TYPE_MATRIX && size != 20)
             || (filterType == FECOLORMATRIX_TYPE_HUEROTATE && size != 1)
             || (filterType == FECOLORMATRIX_TYPE_SATURATE && size != 1))
             return nullptr;
+        
+        filterValues = values();
     }
 
     auto effect = FEColorMatrix::create(filter, filterType, filterValues);
index 68a268a..4a153c1 100644 (file)
@@ -23,7 +23,6 @@
 
 #include "FEColorMatrix.h"
 #include "SVGAnimatedEnumeration.h"
-#include "SVGAnimatedNumberList.h"
 #include "SVGFilterPrimitiveStandardAttributes.h"
 
 namespace WebCore {
@@ -72,11 +71,11 @@ public:
 
     String in1() const { return m_in1->currentValue(); }
     ColorMatrixType type() const { return m_type.currentValue(attributeOwnerProxy()); }
-    const SVGNumberListValues& values() const { return m_values.currentValue(attributeOwnerProxy()); }
+    const SVGNumberList& values() const { return m_values->currentValue(); }
 
     SVGAnimatedString& in1Animated() { return m_in1; }
     RefPtr<SVGAnimatedEnumeration> typeAnimated() { return m_type.animatedProperty(attributeOwnerProxy()); }
-    RefPtr<SVGAnimatedNumberList> valuesAnimated() { return m_values.animatedProperty(attributeOwnerProxy()); }
+    SVGAnimatedNumberList& valuesAnimated() { return m_values; }
 
 private:
     SVGFEColorMatrixElement(const QualifiedName&, Document&);
@@ -104,7 +103,7 @@ private:
     PropertyRegistry m_propertyRegistry { *this };
     Ref<SVGAnimatedString> m_in1 { SVGAnimatedString::create(this) };
     SVGAnimatedEnumerationAttribute<ColorMatrixType> m_type { FECOLORMATRIX_TYPE_MATRIX };
-    SVGAnimatedNumberListAttribute m_values;
+    Ref<SVGAnimatedNumberList> m_values { SVGAnimatedNumberList::create(this) };
 };
 
 } // namespace WebCore
index 8ce5a03..800c740 100644 (file)
@@ -27,7 +27,6 @@
 #include "IntSize.h"
 #include "SVGFilterBuilder.h"
 #include "SVGNames.h"
-#include "SVGNumberListValues.h"
 #include "SVGParserUtilities.h"
 #include <wtf/IsoMallocInlines.h>
 
@@ -45,6 +44,7 @@ inline SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement(const QualifiedNam
     std::call_once(onceFlag, [] {
         PropertyRegistry::registerProperty<SVGNames::inAttr, &SVGFEConvolveMatrixElement::m_in1>();
         PropertyRegistry::registerProperty<SVGNames::orderAttr, &SVGFEConvolveMatrixElement::m_orderX, &SVGFEConvolveMatrixElement::m_orderY>();
+        PropertyRegistry::registerProperty<SVGNames::kernelMatrixAttr, &SVGFEConvolveMatrixElement::m_kernelMatrix>();
         PropertyRegistry::registerProperty<SVGNames::divisorAttr, &SVGFEConvolveMatrixElement::m_divisor>();
         PropertyRegistry::registerProperty<SVGNames::biasAttr, &SVGFEConvolveMatrixElement::m_bias>();
         PropertyRegistry::registerProperty<SVGNames::targetXAttr, &SVGFEConvolveMatrixElement::m_targetX>();
@@ -64,7 +64,6 @@ void SVGFEConvolveMatrixElement::registerAttributes()
     auto& registry = attributeRegistry();
     if (!registry.isEmpty())
         return;
-    registry.registerAttribute<SVGNames::kernelMatrixAttr, &SVGFEConvolveMatrixElement::m_kernelMatrix>();
     registry.registerAttribute<SVGNames::edgeModeAttr, EdgeModeType, &SVGFEConvolveMatrixElement::m_edgeMode>();
 }
 
@@ -95,10 +94,7 @@ void SVGFEConvolveMatrixElement::parseAttribute(const QualifiedName& name, const
     }
 
     if (name == SVGNames::kernelMatrixAttr) {
-        SVGNumberListValues newList;
-        newList.parse(value);
-        m_kernelMatrix.detachAnimatedListWrappers(attributeOwnerProxy(), newList.size());
-        m_kernelMatrix.setValue(WTFMove(newList));
+        m_kernelMatrix->baseVal()->parse(value);
         return;
     }
 
@@ -219,7 +215,7 @@ RefPtr<FilterEffect> SVGFEConvolveMatrixElement::build(SVGFilterBuilder* filterB
     if (orderXValue < 1 || orderYValue < 1)
         return nullptr;
     auto& kernelMatrix = this->kernelMatrix();
-    int kernelMatrixSize = kernelMatrix.size();
+    int kernelMatrixSize = kernelMatrix.items().size();
     // The spec says this is a requirement, and should bail out if fails
     if (orderXValue * orderYValue != kernelMatrixSize)
         return nullptr;
@@ -252,7 +248,7 @@ RefPtr<FilterEffect> SVGFEConvolveMatrixElement::build(SVGFilterBuilder* filterB
         return nullptr;
     if (!hasAttribute(SVGNames::divisorAttr)) {
         for (int i = 0; i < kernelMatrixSize; ++i)
-            divisorValue += kernelMatrix.at(i);
+            divisorValue += kernelMatrix.items()[i]->value();
         if (!divisorValue)
             divisorValue = 1;
     }
index f4ce89e..5cc801f 100644 (file)
@@ -70,7 +70,7 @@ public:
     String in1() const { return m_in1->currentValue(); }
     int orderX() const { return m_orderX->currentValue(); }
     int orderY() const { return m_orderY->currentValue(); }
-    const SVGNumberListValues& kernelMatrix() const { return m_kernelMatrix.currentValue(attributeOwnerProxy()); }
+    const SVGNumberList& kernelMatrix() const { return m_kernelMatrix->currentValue(); }
     float divisor() const { return m_divisor->currentValue(); }
     float bias() const { return m_bias->currentValue(); }
     int targetX() const { return m_targetX->currentValue(); }
@@ -83,7 +83,7 @@ public:
     SVGAnimatedString& in1Animated() { return m_in1; }
     SVGAnimatedInteger& orderXAnimated() { return m_orderX; }
     SVGAnimatedInteger& orderYAnimated() { return m_orderY; }
-    RefPtr<SVGAnimatedNumberList> kernelMatrixAnimated() { return m_kernelMatrix.animatedProperty(attributeOwnerProxy()); }
+    SVGAnimatedNumberList& kernelMatrixAnimated() { return m_kernelMatrix; }
     SVGAnimatedNumber& divisorAnimated() { return m_divisor; }
     SVGAnimatedNumber& biasAnimated() { return m_bias; }
     SVGAnimatedInteger& targetXAnimated() { return m_targetX; }
@@ -120,7 +120,7 @@ private:
     Ref<SVGAnimatedString> m_in1 { SVGAnimatedString::create(this) };
     Ref<SVGAnimatedInteger> m_orderX { SVGAnimatedInteger::create(this) };
     Ref<SVGAnimatedInteger> m_orderY { SVGAnimatedInteger::create(this) };
-    SVGAnimatedNumberListAttribute m_kernelMatrix;
+    Ref<SVGAnimatedNumberList> m_kernelMatrix { SVGAnimatedNumberList::create(this) };
     Ref<SVGAnimatedNumber> m_divisor { SVGAnimatedNumber::create(this) };
     Ref<SVGAnimatedNumber> m_bias { SVGAnimatedNumber::create(this) };
     Ref<SVGAnimatedInteger> m_targetX { SVGAnimatedInteger::create(this) };
index db1f645..23c82e4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2016-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 
 #pragma once
 
-#include "SVGPropertyTearOff.h"
+#include "SVGValueProperty.h"
 
 namespace WebCore {
 
-class SVGNumber : public SVGPropertyTearOff<float> {
+class SVGNumber : public SVGValueProperty<float> {
+    using Base = SVGValueProperty<float>;
+    using Base::Base;
+    using Base::m_value;
+        
 public:
-    static Ref<SVGNumber> create(SVGLegacyAnimatedProperty& animatedProperty, SVGPropertyRole role, float& value)
+    static Ref<SVGNumber> create(float value = 0)
     {
-        return adoptRef(*new SVGNumber(animatedProperty, role, value));
+        return adoptRef(*new SVGNumber(value));
     }
 
-    static Ref<SVGNumber> create(const float& initialValue = { })
+    static Ref<SVGNumber> create(SVGPropertyOwner* owner, SVGPropertyAccess access, float value = 0)
     {
-        return adoptRef(*new SVGNumber(initialValue));
+        return adoptRef(*new SVGNumber(owner, access, value));
     }
 
-    template<typename T> static ExceptionOr<Ref<SVGNumber>> create(ExceptionOr<T>&& initialValue)
+    template<typename T>
+    static ExceptionOr<Ref<SVGNumber>> create(ExceptionOr<T>&& value)
     {
-        if (initialValue.hasException())
-            return initialValue.releaseException();
-        return create(initialValue.releaseReturnValue());
+        if (value.hasException())
+            return value.releaseException();
+        return adoptRef(*new SVGNumber(value.releaseReturnValue()));
+    }
+
+    Ref<SVGNumber> clone() const
+    {
+        return SVGNumber::create(m_value);
     }
 
     float valueForBindings()
     {
-        return propertyReference();
+        return m_value;
     }
 
     ExceptionOr<void> setValueForBindings(float value)
@@ -58,21 +68,14 @@ public:
         if (isReadOnly())
             return Exception { NoModificationAllowedError };
 
-        propertyReference() = value;
+        m_value = value;
         commitChange();
-
         return { };
     }
 
-private:
-    SVGNumber(SVGLegacyAnimatedProperty& animatedProperty, SVGPropertyRole role, float& value)
-        : SVGPropertyTearOff<float>(&animatedProperty, role, value)
-    {
-    }
-
-    explicit SVGNumber(const float& initialValue)
-        : SVGPropertyTearOff<float>(initialValue)
+    String valueAsString() const override
     {
+        return SVGPropertyTraits<float>::toString(m_value);
     }
 };
 
index 1e5cf8b..5e2c114 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2016-2019 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 
 #pragma once
 
-#include "SVGAnimatedListPropertyTearOff.h"
-#include "SVGListPropertyTearOff.h"
-#include "SVGNumberListValues.h"
+#include "SVGNumber.h"
+#include "SVGValuePropertyList.h"
 
 namespace WebCore {
 
-class SVGNumberList : public SVGListPropertyTearOff<SVGNumberListValues> {
+class SVGNumberList : public SVGValuePropertyList<SVGNumber> {
+    using Base = SVGValuePropertyList<SVGNumber>;
+    using Base::Base;
+
 public:
-    using AnimatedListPropertyTearOff = SVGAnimatedListPropertyTearOff<SVGNumberListValues>;
-    using ListWrapperCache = AnimatedListPropertyTearOff::ListWrapperCache;
+    static Ref<SVGNumberList> create()
+    {
+        return adoptRef(*new SVGNumberList());
+    }
+
+    static Ref<SVGNumberList> create(SVGPropertyOwner* owner, SVGPropertyAccess access)
+    {
+        return adoptRef(*new SVGNumberList(owner, access));
+    }
 
-    static Ref<SVGNumberList> create(AnimatedListPropertyTearOff& animatedProperty, SVGPropertyRole role, SVGNumberListValues& values, ListWrapperCache& wrappers)
+    static Ref<SVGNumberList> create(const SVGNumberList& other, SVGPropertyAccess access)
     {
-        return adoptRef(*new SVGNumberList(animatedProperty, role, values, wrappers));
+        return adoptRef(*new SVGNumberList(other, access));
     }
 
-private:
-    SVGNumberList(AnimatedListPropertyTearOff& animatedProperty, SVGPropertyRole role, SVGNumberListValues& values, ListWrapperCache& wrappers)
-        : SVGListPropertyTearOff<SVGNumberListValues>(animatedProperty, role, values, wrappers)
+    bool parse(const String& value)
     {
+        clearItems();
+
+        float number = 0;
+        auto upconvertedCharacters = StringView(value).upconvertedCharacters();
+        const UChar* ptr = upconvertedCharacters;
+        const UChar* end = ptr + value.length();
+
+        // The spec (section 4.1) strangely doesn't allow leading whitespace.
+        // We might choose to violate that intentionally.
+        while (ptr < end) {
+            if (!parseNumber(ptr, end, number))
+                break;
+            append(SVGNumber::create(number));
+        }
+
+        return ptr == end;
+    }
+
+    String valueAsString() const override
+    {
+        StringBuilder builder;
+
+        for (const auto& number : m_items) {
+            if (builder.length())
+                builder.append(' ');
+
+            builder.appendNumber(number->value());
+        }
+
+        return builder.toString();
     }
 };
 
diff --git a/Source/WebCore/svg/SVGNumberListValues.cpp b/Source/WebCore/svg/SVGNumberListValues.cpp
deleted file mode 100644 (file)
index c97368b..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org>
- * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "config.h"
-#include "SVGNumberListValues.h"
-
-#include "SVGParserUtilities.h"
-#include <wtf/text/StringBuilder.h>
-
-namespace WebCore {
-
-void SVGNumberListValues::parse(const String& value)
-{
-    clear();
-
-    float number = 0;
-    auto upconvertedCharacters = StringView(value).upconvertedCharacters();
-    const UChar* ptr = upconvertedCharacters;
-    const UChar* end = ptr + value.length();
-
-    // The spec (section 4.1) strangely doesn't allow leading whitespace. We might choose to violate that intentionally.
-    while (ptr < end) {
-        if (!parseNumber(ptr, end, number))
-            return;
-        append(number);
-    }
-}
-
-String SVGNumberListValues::valueAsString() const
-{
-    StringBuilder builder;
-
-    unsigned size = this->size();
-    for (unsigned i = 0; i < size; ++i) {
-        if (i > 0)
-            builder.append(' ');
-
-        builder.appendFixedPrecisionNumber(at(i));
-    }
-
-    return builder.toString();
-}
-
-}
diff --git a/Source/WebCore/svg/SVGNumberListValues.h b/Source/WebCore/svg/SVGNumberListValues.h
deleted file mode 100644 (file)
index 6e45e0c..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org>
- * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#pragma once
-
-#include "SVGPropertyTraits.h"
-#include <wtf/Vector.h>
-
-namespace WebCore {
-
-class SVGNumber;
-class SVGNumberList;
-
-class SVGNumberListValues final : public Vector<float> {
-public:
-    void parse(const String&);
-    String valueAsString() const;
-};
-
-template<> struct SVGPropertyTraits<SVGNumberListValues> {
-    static SVGNumberListValues initialValue() { return { }; }
-    static SVGNumberListValues fromString(const String& string)
-    {
-        SVGNumberListValues list;
-        list.parse(string);
-        return list;
-    }
-    static Optional<SVGNumberListValues> parse(const QualifiedName&, const String&) { ASSERT_NOT_REACHED(); return initialValue(); }
-    static String toString(const SVGNumberListValues& list) { return list.valueAsString(); }
-
-    using ListItemType = float;
-    using ListItemTearOff = SVGNumber;
-    using ListPropertyTearOff = SVGNumberList;
-};
-
-} // namespace WebCore
index 75c4bfe..4496466 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org>
  * Copyright (C) 2004, 2005, 2006, 2007, 2008 Rob Buis <buis@kde.org>
  * Copyright (C) 2014 Adobe Systems Incorporated. All rights reserved.
- * Copyright (C) 2018 Apple Inc. All rights reserved.
+ * Copyright (C) 2018-2019 Apple Inc. All rights reserved.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -29,7 +29,6 @@
 #include "SVGAltGlyphElement.h"
 #include "SVGLengthListValues.h"
 #include "SVGNames.h"
-#include "SVGNumberListValues.h"
 #include "SVGTRefElement.h"
 #include "SVGTSpanElement.h"
 #include "SVGTextElement.h"
@@ -43,6 +42,11 @@ SVGTextPositioningElement::SVGTextPositioningElement(const QualifiedName& tagNam
     : SVGTextContentElement(tagName, document)
 {
     registerAttributes();
+    
+    static std::once_flag onceFlag;
+    std::call_once(onceFlag, [] {
+        PropertyRegistry::registerProperty<SVGNames::rotateAttr, &SVGTextPositioningElement::m_rotate>();
+    });
 }
 
 void SVGTextPositioningElement::registerAttributes()
@@ -54,7 +58,6 @@ void SVGTextPositioningElement::registerAttributes()
     registry.registerAttribute<SVGNames::yAttr, &SVGTextPositioningElement::m_y>();
     registry.registerAttribute<SVGNames::dxAttr, &SVGTextPositioningElement::m_dx>();
     registry.registerAttribute<SVGNames::dyAttr, &SVGTextPositioningElement::m_dy>();
-    registry.registerAttribute<SVGNames::rotateAttr, &SVGTextPositioningElement::m_rotate>();
 }
 
 void SVGTextPositioningElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
@@ -92,10 +95,7 @@ void SVGTextPositioningElement::parseAttribute(const QualifiedName& name, const
     }
 
     if (name == SVGNames::rotateAttr) {
-        SVGNumberListValues newList;
-        newList.parse(value);
-        m_rotate.detachAnimatedListWrappers(attributeOwnerProxy(), newList.size());
-        m_rotate.setValue(WTFMove(newList));
+        m_rotate->baseVal()->parse(value);
         return;
     }
 
index d3ec458..38ba4c0 100644 (file)
@@ -22,7 +22,6 @@
 #pragma once
 
 #include "SVGAnimatedLengthList.h"
-#include "SVGAnimatedNumberList.h"
 #include "SVGTextContentElement.h"
 
 namespace WebCore {
@@ -41,13 +40,13 @@ public:
     const SVGLengthListValues& y() const { return m_y.currentValue(attributeOwnerProxy()); }
     const SVGLengthListValues& dx() const { return m_dx.currentValue(attributeOwnerProxy()); }
     const SVGLengthListValues& dy() const { return m_dy.currentValue(attributeOwnerProxy()); }
-    const SVGNumberListValues& rotate() const { return m_rotate.currentValue(attributeOwnerProxy()); }
+    const SVGNumberList& rotate() const { return m_rotate->currentValue(); }
 
     RefPtr<SVGAnimatedLengthList> xAnimated() { return m_x.animatedProperty(attributeOwnerProxy()); }
     RefPtr<SVGAnimatedLengthList> yAnimated() { return m_y.animatedProperty(attributeOwnerProxy()); }
     RefPtr<SVGAnimatedLengthList> dxAnimated() { return m_dx.animatedProperty(attributeOwnerProxy()); }
     RefPtr<SVGAnimatedLengthList> dyAnimated() { return m_dy.animatedProperty(attributeOwnerProxy()); }
-    RefPtr<SVGAnimatedNumberList> rotateAnimated() { return m_rotate.animatedProperty(attributeOwnerProxy()); }
+    SVGAnimatedNumberList& rotateAnimated() { return m_rotate; }
 
 protected:
     SVGTextPositioningElement(const QualifiedName&, Document&);
@@ -75,7 +74,7 @@ private:
     SVGAnimatedLengthListAttribute m_y;
     SVGAnimatedLengthListAttribute m_dx;
     SVGAnimatedLengthListAttribute m_dy;
-    SVGAnimatedNumberListAttribute m_rotate;
+    Ref<SVGAnimatedNumberList> m_rotate { SVGAnimatedNumberList::create(this) };
 };
 
 } // namespace WebCore
index d4b4ade..7d0d98e 100644 (file)
@@ -31,7 +31,6 @@
 #include "SVGLengthListValues.h"
 #include "SVGLengthValue.h"
 #include "SVGMarkerTypes.h"
-#include "SVGNumberListValues.h"
 #include "SVGPathByteStream.h"
 #include "SVGPreserveAspectRatioValue.h"
 #include "SVGPropertyTraits.h"
@@ -46,7 +45,6 @@ using SVGValueVariant = Variant<
     unsigned*,
     SVGLengthValue*,
     SVGLengthListValues*,
-    SVGNumberListValues*,
     SVGPathByteStream*,
     SVGTransformListValues*
 >;
index b95b3c7..a48503c 100644 (file)
@@ -99,6 +99,28 @@ private:
 };
 
 template<typename OwnerType>
+class SVGAnimatedNumberListAccessor final : public SVGAnimatedPropertyAccessor<OwnerType, SVGAnimatedNumberList> {
+    using Base = SVGAnimatedPropertyAccessor<OwnerType, SVGAnimatedNumberList>;
+    using Base::property;
+
+public:
+    using Base::Base;
+    template<Ref<SVGAnimatedNumberList> OwnerType::*property>
+    constexpr static const SVGMemberAccessor<OwnerType>& singleton() { return Base::template singleton<SVGAnimatedNumberListAccessor, property>(); }
+
+private:
+    std::unique_ptr<SVGAttributeAnimator> createAnimator(OwnerType& owner, const QualifiedName& attributeName, AnimationMode animationMode, CalcMode calcMode, bool isAccumulated, bool isAdditive) const final
+    {
+        return SVGAnimatedNumberListAnimator::create(attributeName, property(owner), animationMode, calcMode, isAccumulated, isAdditive);
+    }
+
+    void appendAnimatedInstance(OwnerType& owner, SVGAttributeAnimator& animator) const final
+    {
+        static_cast<SVGAnimatedNumberListAnimator&>(animator).appendAnimatedInstance(property(owner));
+    }
+};
+
+template<typename OwnerType>
 class SVGAnimatedPointListAccessor final : public SVGAnimatedPropertyAccessor<OwnerType, SVGAnimatedPointList> {
     using Base = SVGAnimatedPropertyAccessor<OwnerType, SVGAnimatedPointList>;
     using Base::property;
index 03d9b9d..5d9125f 100644 (file)
@@ -96,6 +96,23 @@ private:
     }
 };
 
+class SVGAnimatedNumberListAnimator final : public SVGAnimatedPropertyAnimator<SVGAnimatedNumberList, SVGAnimationNumberListFunction> {
+    using Base = SVGAnimatedPropertyAnimator<SVGAnimatedNumberList, SVGAnimationNumberListFunction>;
+    using Base::Base;
+    
+public:
+    static auto create(const QualifiedName& attributeName, Ref<SVGAnimatedNumberList>& animated, AnimationMode animationMode, CalcMode calcMode, bool isAccumulated, bool isAdditive)
+    {
+        return std::unique_ptr<SVGAnimatedNumberListAnimator>(new SVGAnimatedNumberListAnimator(attributeName, animated, animationMode, calcMode, isAccumulated, isAdditive));
+    }
+    
+private:
+    void progress(SVGElement* targetElement, float percentage, unsigned repeatCount) final
+    {
+        m_function.progress(targetElement, percentage, repeatCount, m_animated->animVal());
+    }
+};
+    
 class SVGAnimatedPointListAnimator final : public SVGAnimatedPropertyAnimator<SVGAnimatedPointList, SVGAnimationPointListFunction> {
     using Base = SVGAnimatedPropertyAnimator<SVGAnimatedPointList, SVGAnimationPointListFunction>;
     using Base::Base;
index 240aa9c..3a67622 100644 (file)
 #include "SVGAnimatedEnumeration.h"
 #include "SVGAnimatedLength.h"
 #include "SVGAnimatedLengthList.h"
-#include "SVGAnimatedNumberList.h"
 #include "SVGAnimatedPrimitiveProperty.h"
 #include "SVGAnimatedPropertyList.h"
 #include "SVGAnimatedTransformList.h"
 #include "SVGAnimatedValueProperty.h"
+#include "SVGNumberList.h"
 #include "SVGPointList.h"
 #include "SVGPreserveAspectRatio.h"
 #include "SVGRect.h"
@@ -48,6 +48,7 @@ using SVGAnimatedString = SVGAnimatedPrimitiveProperty<String>;
 using SVGAnimatedRect = SVGAnimatedValueProperty<SVGRect>;
 using SVGAnimatedPreserveAspectRatio = SVGAnimatedValueProperty<SVGPreserveAspectRatio>;
 
+using SVGAnimatedNumberList = SVGAnimatedPropertyList<SVGNumberList>;
 using SVGAnimatedPointList = SVGAnimatedPropertyList<SVGPointList>;
 
 }
index 1b8ec67..48ffa87 100644 (file)
@@ -32,6 +32,56 @@ namespace WebCore {
 
 class SVGElement;
 
+class SVGAnimationNumberListFunction : public SVGAnimationAdditiveListFunction<SVGNumberList> {
+public:
+    using Base = SVGAnimationAdditiveListFunction<SVGNumberList>;
+    using Base::Base;
+
+    void setFromAndToValues(SVGElement*, const String& from, const String& to) override
+    {
+        m_from->parse(from);
+        m_to->parse(to);
+    }
+
+    void setToAtEndOfDurationValue(const String& toAtEndOfDuration) override
+    {
+        m_toAtEndOfDuration->parse(toAtEndOfDuration);
+    }
+
+    void progress(SVGElement*, float percentage, unsigned repeatCount, RefPtr<SVGNumberList>& animated)
+    {
+        if (!adjustAnimatedList(m_animationMode, percentage, animated))
+            return;
+
+        auto& fromItems = m_animationMode == AnimationMode::To ? animated->items() : m_from->items();
+        auto& toItems = m_to->items();
+        auto& toAtEndOfDurationItems = toAtEndOfDuration()->items();
+        auto& animatedItems = animated->items();
+
+        for (unsigned i = 0; i < toItems.size(); ++i) {
+            float from = i < fromItems.size() ? fromItems[i]->value() : 0;
+            float to = toItems[i]->value();
+            float toAtEndOfDuration = i < toAtEndOfDurationItems.size() ? toAtEndOfDurationItems[i]->value() : 0;
+
+            float& value = animatedItems[i]->value();
+            value = Base::progress(percentage, repeatCount, from, to, toAtEndOfDuration, value);
+        }
+    }
+
+private:
+    void addFromAndToValues(SVGElement*) override
+    {
+        const Vector<Ref<SVGNumber>>& fromItems = m_from->items();
+        Vector<Ref<SVGNumber>>& toItems = m_to->items();
+
+        if (!fromItems.size() || fromItems.size() != toItems.size())
+            return;
+
+        for (unsigned i = 0; i < fromItems.size(); ++i)
+            toItems[i]->setValue(fromItems[i]->value() + toItems[i]->value());
+    }
+};
+
 class SVGAnimationPointListFunction : public SVGAnimationAdditiveListFunction<SVGPointList> {
 public:
     using Base = SVGAnimationAdditiveListFunction<SVGPointList>;
@@ -53,10 +103,10 @@ public:
         if (!adjustAnimatedList(m_animationMode, percentage, animated))
             return;
 
-        const Vector<Ref<SVGPoint>>& fromItems = m_animationMode == AnimationMode::To ? animated->items() : m_from->items();
-        const Vector<Ref<SVGPoint>>& toItems = m_to->items();
-        const Vector<Ref<SVGPoint>>& toAtEndOfDurationItems = toAtEndOfDuration()->items();
-        Vector<Ref<SVGPoint>>& animatedItems = animated->items();
+        auto& fromItems = m_animationMode == AnimationMode::To ? animated->items() : m_from->items();
+        auto& toItems = m_to->items();
+        auto& toAtEndOfDurationItems = toAtEndOfDuration()->items();
+        auto& animatedItems = animated->items();
 
         for (unsigned i = 0; i < toItems.size(); ++i) {
             FloatPoint from = i < fromItems.size() ? fromItems[i]->value() : FloatPoint();
index 7e70ed6..042891c 100644 (file)
@@ -28,7 +28,6 @@
 #include "SVGAnimatedEnumeration.h"
 #include "SVGAnimatedLength.h"
 #include "SVGAnimatedLengthList.h"
-#include "SVGAnimatedNumberList.h"
 #include "SVGAnimatedTransformList.h"
 #include "SVGAttributeAccessor.h"
 #include "SVGLegacyAnimatedProperty.h"
@@ -71,12 +70,6 @@ public:
         registerAttribute(SVGAnimatedLengthListAttributeAccessor<OwnerType>::template singleton<attributeName, attribute>());
     }
 
-    template<const LazyNeverDestroyed<const QualifiedName>& attributeName, SVGAnimatedNumberListAttribute OwnerType::*attribute>
-    void registerAttribute()
-    {
-        registerAttribute(SVGAnimatedNumberListAttributeAccessor<OwnerType>::template singleton<attributeName, attribute>());
-    }
-
     template<const LazyNeverDestroyed<const QualifiedName>& attributeName, SVGAnimatedTransformListAttribute OwnerType::*attribute>
     void registerAttribute()
     {
index 216258f..074c652 100644 (file)
@@ -67,6 +67,12 @@ public:
         registerProperty(attributeName, SVGAnimatedNumberAccessor<OwnerType>::template singleton<property>());
     }
 
+    template<const LazyNeverDestroyed<const QualifiedName>& attributeName, Ref<SVGAnimatedNumberList> OwnerType::*property>
+    static void registerProperty()
+    {
+        registerProperty(attributeName, SVGAnimatedNumberListAccessor<OwnerType>::template singleton<property>());
+    }
+
     template<const LazyNeverDestroyed<const QualifiedName>& attributeName, Ref<SVGAnimatedPointList> OwnerType::*property>
     static void registerProperty()
     {