Changeset 249191 in webkit
- Timestamp:
- Aug 28, 2019, 12:10:44 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 15 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/svg/custom/polyline-points-crash-expected.txt (modified) (1 diff)
-
LayoutTests/svg/dom/SVGLengthList-basics-expected.txt (modified) (4 diffs)
-
LayoutTests/svg/dom/SVGLengthList-length-indexed-access-expected.txt (added)
-
LayoutTests/svg/dom/SVGLengthList-length-indexed-access.xhtml (added)
-
LayoutTests/svg/dom/SVGNumberList-basics-expected.txt (modified) (4 diffs)
-
LayoutTests/svg/dom/SVGPathSegList-length-indexed-access-expected.txt (added)
-
LayoutTests/svg/dom/SVGPathSegList-length-indexed-access.xhtml (added)
-
LayoutTests/svg/dom/SVGPointList-basics-expected.txt (modified) (4 diffs)
-
LayoutTests/svg/dom/SVGTransformList-basics-expected.txt (modified) (4 diffs)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/svg/SVGLengthList.idl (modified) (1 diff)
-
Source/WebCore/svg/SVGNumberList.idl (modified) (1 diff)
-
Source/WebCore/svg/SVGPathSegList.h (modified) (2 diffs)
-
Source/WebCore/svg/SVGPathSegList.idl (modified) (1 diff)
-
Source/WebCore/svg/SVGPointList.idl (modified) (1 diff)
-
Source/WebCore/svg/SVGStringList.idl (modified) (1 diff)
-
Source/WebCore/svg/SVGTransformList.idl (modified) (1 diff)
-
Source/WebCore/svg/properties/SVGList.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r249188 r249191 1 2019-08-28 Said Abou-Hallawa <sabouhallawa@apple.com> 2 3 SVG2: Add length, item getter and item setter to all SVG lists 4 https://bugs.webkit.org/show_bug.cgi?id=199526 5 6 Reviewed by Simon Fraser. 7 8 * svg/custom/polyline-points-crash-expected.txt: 9 * svg/dom/SVGLengthList-basics-expected.txt: 10 * svg/dom/SVGLengthList-length-indexed-access-expected.txt: Added. 11 * svg/dom/SVGLengthList-length-indexed-access.xhtml: Added. 12 * svg/dom/SVGNumberList-basics-expected.txt: 13 * svg/dom/SVGPathSegList-length-indexed-access-expected.txt: Added. 14 * svg/dom/SVGPathSegList-length-indexed-access.xhtml: Added. 15 * svg/dom/SVGPointList-basics-expected.txt: 16 * svg/dom/SVGTransformList-basics-expected.txt: 17 1 18 2019-08-27 Fujii Hironori <Hironori.Fujii@sony.com> 2 19 -
trunk/LayoutTests/svg/custom/polyline-points-crash-expected.txt
r208308 r249191 1 Caught exception: TypeError: Argument 1 (' item') to SVGPointList.appendItem must be an instance of SVGPoint1 Caught exception: TypeError: Argument 1 ('newItem') to SVGPointList.appendItem must be an instance of SVGPoint 2 2 PASSED -- WebKit did not crash! -
trunk/LayoutTests/svg/dom/SVGLengthList-basics-expected.txt
r243515 r249191 13 13 14 14 Test uncommon arguments for initialize() 15 PASS text1.x.baseVal.initialize(30) threw exception TypeError: Argument 1 (' item') to SVGLengthList.initialize must be an instance of SVGLength.16 PASS text1.x.baseVal.initialize('aString') threw exception TypeError: Argument 1 (' item') to SVGLengthList.initialize must be an instance of SVGLength.17 PASS text1.x.baseVal.initialize(text1) threw exception TypeError: Argument 1 (' item') to SVGLengthList.initialize must be an instance of SVGLength.18 PASS text1.x.baseVal.initialize(null) threw exception TypeError: Argument 1 (' item') to SVGLengthList.initialize must be an instance of SVGLength.15 PASS text1.x.baseVal.initialize(30) threw exception TypeError: Argument 1 ('newItem') to SVGLengthList.initialize must be an instance of SVGLength. 16 PASS text1.x.baseVal.initialize('aString') threw exception TypeError: Argument 1 ('newItem') to SVGLengthList.initialize must be an instance of SVGLength. 17 PASS text1.x.baseVal.initialize(text1) threw exception TypeError: Argument 1 ('newItem') to SVGLengthList.initialize must be an instance of SVGLength. 18 PASS text1.x.baseVal.initialize(null) threw exception TypeError: Argument 1 ('newItem') to SVGLengthList.initialize must be an instance of SVGLength. 19 19 20 20 Test uncommon arguments for getItem() … … 57 57 PASS text1.x.baseVal.getItem(2).value is 1500 58 58 PASS text1.getAttribute('x') is "500 1000 1500" 59 PASS text1.x.baseVal.insertItemBefore(30, 0) threw exception TypeError: Argument 1 (' item') to SVGLengthList.insertItemBefore must be an instance of SVGLength.60 PASS text1.x.baseVal.insertItemBefore('aString', 0) threw exception TypeError: Argument 1 (' item') to SVGLengthList.insertItemBefore must be an instance of SVGLength.61 PASS text1.x.baseVal.insertItemBefore(text1, 0) threw exception TypeError: Argument 1 (' item') to SVGLengthList.insertItemBefore must be an instance of SVGLength.62 PASS text1.x.baseVal.insertItemBefore(null, 0) threw exception TypeError: Argument 1 (' item') to SVGLengthList.insertItemBefore must be an instance of SVGLength.59 PASS text1.x.baseVal.insertItemBefore(30, 0) threw exception TypeError: Argument 1 ('newItem') to SVGLengthList.insertItemBefore must be an instance of SVGLength. 60 PASS text1.x.baseVal.insertItemBefore('aString', 0) threw exception TypeError: Argument 1 ('newItem') to SVGLengthList.insertItemBefore must be an instance of SVGLength. 61 PASS text1.x.baseVal.insertItemBefore(text1, 0) threw exception TypeError: Argument 1 ('newItem') to SVGLengthList.insertItemBefore must be an instance of SVGLength. 62 PASS text1.x.baseVal.insertItemBefore(null, 0) threw exception TypeError: Argument 1 ('newItem') to SVGLengthList.insertItemBefore must be an instance of SVGLength. 63 63 64 64 Set x='1 2 3 4' for text1 … … 90 90 PASS text1.x.baseVal.replaceItem(text1) threw exception TypeError: Not enough arguments. 91 91 PASS text1.x.baseVal.replaceItem(null) threw exception TypeError: Not enough arguments. 92 PASS text1.x.baseVal.replaceItem(30, 0) threw exception TypeError: Argument 1 (' item') to SVGLengthList.replaceItem must be an instance of SVGLength.93 PASS text1.x.baseVal.replaceItem('aString', 0) threw exception TypeError: Argument 1 (' item') to SVGLengthList.replaceItem must be an instance of SVGLength.94 PASS text1.x.baseVal.replaceItem(text1, 0) threw exception TypeError: Argument 1 (' item') to SVGLengthList.replaceItem must be an instance of SVGLength.95 PASS text1.x.baseVal.replaceItem(null, 0) threw exception TypeError: Argument 1 (' item') to SVGLengthList.replaceItem must be an instance of SVGLength.92 PASS text1.x.baseVal.replaceItem(30, 0) threw exception TypeError: Argument 1 ('newItem') to SVGLengthList.replaceItem must be an instance of SVGLength. 93 PASS text1.x.baseVal.replaceItem('aString', 0) threw exception TypeError: Argument 1 ('newItem') to SVGLengthList.replaceItem must be an instance of SVGLength. 94 PASS text1.x.baseVal.replaceItem(text1, 0) threw exception TypeError: Argument 1 ('newItem') to SVGLengthList.replaceItem must be an instance of SVGLength. 95 PASS text1.x.baseVal.replaceItem(null, 0) threw exception TypeError: Argument 1 ('newItem') to SVGLengthList.replaceItem must be an instance of SVGLength. 96 96 PASS text1.x.baseVal.replaceItem(text1.x.baseVal.getItem(0), 0) is text1.x.baseVal.getItem(0) 97 97 PASS text1.x.baseVal.numberOfItems is 4 … … 162 162 163 163 Test uncommon arguments for appendItem() 164 PASS text1.x.baseVal.appendItem(30) threw exception TypeError: Argument 1 (' item') to SVGLengthList.appendItem must be an instance of SVGLength.165 PASS text1.x.baseVal.appendItem('aString') threw exception TypeError: Argument 1 (' item') to SVGLengthList.appendItem must be an instance of SVGLength.166 PASS text1.x.baseVal.appendItem(text1) threw exception TypeError: Argument 1 (' item') to SVGLengthList.appendItem must be an instance of SVGLength.167 PASS text1.x.baseVal.appendItem(null) threw exception TypeError: Argument 1 (' item') to SVGLengthList.appendItem must be an instance of SVGLength.164 PASS text1.x.baseVal.appendItem(30) threw exception TypeError: Argument 1 ('newItem') to SVGLengthList.appendItem must be an instance of SVGLength. 165 PASS text1.x.baseVal.appendItem('aString') threw exception TypeError: Argument 1 ('newItem') to SVGLengthList.appendItem must be an instance of SVGLength. 166 PASS text1.x.baseVal.appendItem(text1) threw exception TypeError: Argument 1 ('newItem') to SVGLengthList.appendItem must be an instance of SVGLength. 167 PASS text1.x.baseVal.appendItem(null) threw exception TypeError: Argument 1 ('newItem') to SVGLengthList.appendItem must be an instance of SVGLength. 168 168 169 169 Testing animVal clear throws -
trunk/LayoutTests/svg/dom/SVGNumberList-basics-expected.txt
r243362 r249191 10 10 11 11 Test uncommon arguments for initialize() 12 PASS text1.rotate.baseVal.initialize(30) threw exception TypeError: Argument 1 (' item') to SVGNumberList.initialize must be an instance of SVGNumber.13 PASS text1.rotate.baseVal.initialize('aString') threw exception TypeError: Argument 1 (' item') to SVGNumberList.initialize must be an instance of SVGNumber.14 PASS text1.rotate.baseVal.initialize(text1) threw exception TypeError: Argument 1 (' item') to SVGNumberList.initialize must be an instance of SVGNumber.15 PASS text1.rotate.baseVal.initialize(null) threw exception TypeError: Argument 1 (' item') to SVGNumberList.initialize must be an instance of SVGNumber.12 PASS text1.rotate.baseVal.initialize(30) threw exception TypeError: Argument 1 ('newItem') to SVGNumberList.initialize must be an instance of SVGNumber. 13 PASS text1.rotate.baseVal.initialize('aString') threw exception TypeError: Argument 1 ('newItem') to SVGNumberList.initialize must be an instance of SVGNumber. 14 PASS text1.rotate.baseVal.initialize(text1) threw exception TypeError: Argument 1 ('newItem') to SVGNumberList.initialize must be an instance of SVGNumber. 15 PASS text1.rotate.baseVal.initialize(null) threw exception TypeError: Argument 1 ('newItem') to SVGNumberList.initialize must be an instance of SVGNumber. 16 16 17 17 Test uncommon arguments for getItem() … … 54 54 PASS text1.rotate.baseVal.getItem(2).value is 270 55 55 PASS text1.getAttribute('rotate') is "90 180 270" 56 PASS text1.rotate.baseVal.insertItemBefore(30, 0) threw exception TypeError: Argument 1 (' item') to SVGNumberList.insertItemBefore must be an instance of SVGNumber.57 PASS text1.rotate.baseVal.insertItemBefore('aString', 0) threw exception TypeError: Argument 1 (' item') to SVGNumberList.insertItemBefore must be an instance of SVGNumber.58 PASS text1.rotate.baseVal.insertItemBefore(text1, 0) threw exception TypeError: Argument 1 (' item') to SVGNumberList.insertItemBefore must be an instance of SVGNumber.59 PASS text1.rotate.baseVal.insertItemBefore(null, 0) threw exception TypeError: Argument 1 (' item') to SVGNumberList.insertItemBefore must be an instance of SVGNumber.56 PASS text1.rotate.baseVal.insertItemBefore(30, 0) threw exception TypeError: Argument 1 ('newItem') to SVGNumberList.insertItemBefore must be an instance of SVGNumber. 57 PASS text1.rotate.baseVal.insertItemBefore('aString', 0) threw exception TypeError: Argument 1 ('newItem') to SVGNumberList.insertItemBefore must be an instance of SVGNumber. 58 PASS text1.rotate.baseVal.insertItemBefore(text1, 0) threw exception TypeError: Argument 1 ('newItem') to SVGNumberList.insertItemBefore must be an instance of SVGNumber. 59 PASS text1.rotate.baseVal.insertItemBefore(null, 0) threw exception TypeError: Argument 1 ('newItem') to SVGNumberList.insertItemBefore must be an instance of SVGNumber. 60 60 61 61 Set rotate='1 2 3 4' for text1 … … 73 73 PASS text1.rotate.baseVal.replaceItem(text1) threw exception TypeError: Not enough arguments. 74 74 PASS text1.rotate.baseVal.replaceItem(null) threw exception TypeError: Not enough arguments. 75 PASS text1.rotate.baseVal.replaceItem(30, 0) threw exception TypeError: Argument 1 (' item') to SVGNumberList.replaceItem must be an instance of SVGNumber.76 PASS text1.rotate.baseVal.replaceItem('aString', 0) threw exception TypeError: Argument 1 (' item') to SVGNumberList.replaceItem must be an instance of SVGNumber.77 PASS text1.rotate.baseVal.replaceItem(text1, 0) threw exception TypeError: Argument 1 (' item') to SVGNumberList.replaceItem must be an instance of SVGNumber.78 PASS text1.rotate.baseVal.replaceItem(null, 0) threw exception TypeError: Argument 1 (' item') to SVGNumberList.replaceItem must be an instance of SVGNumber.75 PASS text1.rotate.baseVal.replaceItem(30, 0) threw exception TypeError: Argument 1 ('newItem') to SVGNumberList.replaceItem must be an instance of SVGNumber. 76 PASS text1.rotate.baseVal.replaceItem('aString', 0) threw exception TypeError: Argument 1 ('newItem') to SVGNumberList.replaceItem must be an instance of SVGNumber. 77 PASS text1.rotate.baseVal.replaceItem(text1, 0) threw exception TypeError: Argument 1 ('newItem') to SVGNumberList.replaceItem must be an instance of SVGNumber. 78 PASS text1.rotate.baseVal.replaceItem(null, 0) threw exception TypeError: Argument 1 ('newItem') to SVGNumberList.replaceItem must be an instance of SVGNumber. 79 79 PASS text1.rotate.baseVal.replaceItem(text1.rotate.baseVal.getItem(0), 0) is text1.rotate.baseVal.getItem(0) 80 80 PASS text1.rotate.baseVal.numberOfItems is 4 … … 120 120 121 121 Test uncommon arguments for appendItem() 122 PASS text1.rotate.baseVal.appendItem(30) threw exception TypeError: Argument 1 (' item') to SVGNumberList.appendItem must be an instance of SVGNumber.123 PASS text1.rotate.baseVal.appendItem('aString') threw exception TypeError: Argument 1 (' item') to SVGNumberList.appendItem must be an instance of SVGNumber.124 PASS text1.rotate.baseVal.appendItem(text1) threw exception TypeError: Argument 1 (' item') to SVGNumberList.appendItem must be an instance of SVGNumber.125 PASS text1.rotate.baseVal.appendItem(null) threw exception TypeError: Argument 1 (' item') to SVGNumberList.appendItem must be an instance of SVGNumber.122 PASS text1.rotate.baseVal.appendItem(30) threw exception TypeError: Argument 1 ('newItem') to SVGNumberList.appendItem must be an instance of SVGNumber. 123 PASS text1.rotate.baseVal.appendItem('aString') threw exception TypeError: Argument 1 ('newItem') to SVGNumberList.appendItem must be an instance of SVGNumber. 124 PASS text1.rotate.baseVal.appendItem(text1) threw exception TypeError: Argument 1 ('newItem') to SVGNumberList.appendItem must be an instance of SVGNumber. 125 PASS text1.rotate.baseVal.appendItem(null) threw exception TypeError: Argument 1 ('newItem') to SVGNumberList.appendItem must be an instance of SVGNumber. 126 126 127 127 Testing animVal clear throws -
trunk/LayoutTests/svg/dom/SVGPointList-basics-expected.txt
r243336 r249191 21 21 PASS dumpPoint(poly1.points.getItem(0)) is "x=200 y=100" 22 22 PASS poly1.getAttribute('points').formatPointsAttribute() is "200 100" 23 PASS poly1.points.initialize(poly1) threw exception TypeError: Argument 1 (' item') to SVGPointList.initialize must be an instance of SVGPoint.24 PASS poly1.points.initialize(0) threw exception TypeError: Argument 1 (' item') to SVGPointList.initialize must be an instance of SVGPoint.25 PASS poly1.points.initialize('aString') threw exception TypeError: Argument 1 (' item') to SVGPointList.initialize must be an instance of SVGPoint.23 PASS poly1.points.initialize(poly1) threw exception TypeError: Argument 1 ('newItem') to SVGPointList.initialize must be an instance of SVGPoint. 24 PASS poly1.points.initialize(0) threw exception TypeError: Argument 1 ('newItem') to SVGPointList.initialize must be an instance of SVGPoint. 25 PASS poly1.points.initialize('aString') threw exception TypeError: Argument 1 ('newItem') to SVGPointList.initialize must be an instance of SVGPoint. 26 26 27 27 Reset points attribute to 0 0 100 0 100 100 0 100 … … 76 76 PASS dumpPoint(poly1.points.getItem(3)) is "x=0 y=100" 77 77 PASS poly1.getAttribute('points').formatPointsAttribute() is "0 0 100 0 100 100 0 100" 78 PASS poly1.points.insertItemBefore(30, 0) threw exception TypeError: Argument 1 (' item') to SVGPointList.insertItemBefore must be an instance of SVGPoint.79 PASS poly1.points.insertItemBefore('aString', 0) threw exception TypeError: Argument 1 (' item') to SVGPointList.insertItemBefore must be an instance of SVGPoint.80 PASS poly1.points.insertItemBefore(poly1, 0) threw exception TypeError: Argument 1 (' item') to SVGPointList.insertItemBefore must be an instance of SVGPoint.81 PASS poly1.points.insertItemBefore(null, 0) threw exception TypeError: Argument 1 (' item') to SVGPointList.insertItemBefore must be an instance of SVGPoint.78 PASS poly1.points.insertItemBefore(30, 0) threw exception TypeError: Argument 1 ('newItem') to SVGPointList.insertItemBefore must be an instance of SVGPoint. 79 PASS poly1.points.insertItemBefore('aString', 0) threw exception TypeError: Argument 1 ('newItem') to SVGPointList.insertItemBefore must be an instance of SVGPoint. 80 PASS poly1.points.insertItemBefore(poly1, 0) threw exception TypeError: Argument 1 ('newItem') to SVGPointList.insertItemBefore must be an instance of SVGPoint. 81 PASS poly1.points.insertItemBefore(null, 0) threw exception TypeError: Argument 1 ('newItem') to SVGPointList.insertItemBefore must be an instance of SVGPoint. 82 82 83 83 Test uncommon arguments for replaceItem() … … 85 85 PASS poly1.points.replaceItem('aString') threw exception TypeError: Not enough arguments. 86 86 PASS poly1.points.replaceItem(poly1) threw exception TypeError: Not enough arguments. 87 PASS poly1.points.replaceItem(null, 0) threw exception TypeError: Argument 1 (' item') to SVGPointList.replaceItem must be an instance of SVGPoint.88 PASS poly1.points.replaceItem('aString', 0) threw exception TypeError: Argument 1 (' item') to SVGPointList.replaceItem must be an instance of SVGPoint.89 PASS poly1.points.replaceItem(poly1, 0) threw exception TypeError: Argument 1 (' item') to SVGPointList.replaceItem must be an instance of SVGPoint.90 PASS poly1.points.replaceItem(1, 0) threw exception TypeError: Argument 1 (' item') to SVGPointList.replaceItem must be an instance of SVGPoint.87 PASS poly1.points.replaceItem(null, 0) threw exception TypeError: Argument 1 ('newItem') to SVGPointList.replaceItem must be an instance of SVGPoint. 88 PASS poly1.points.replaceItem('aString', 0) threw exception TypeError: Argument 1 ('newItem') to SVGPointList.replaceItem must be an instance of SVGPoint. 89 PASS poly1.points.replaceItem(poly1, 0) threw exception TypeError: Argument 1 ('newItem') to SVGPointList.replaceItem must be an instance of SVGPoint. 90 PASS poly1.points.replaceItem(1, 0) threw exception TypeError: Argument 1 ('newItem') to SVGPointList.replaceItem must be an instance of SVGPoint. 91 91 92 92 Test uncommon arguments for replaceItem() and xml-dom synchronization … … 144 144 145 145 Test uncommon arguments for appendItem() 146 PASS poly1.points.appendItem(30) threw exception TypeError: Argument 1 (' item') to SVGPointList.appendItem must be an instance of SVGPoint.147 PASS poly1.points.appendItem('aString') threw exception TypeError: Argument 1 (' item') to SVGPointList.appendItem must be an instance of SVGPoint.148 PASS poly1.points.appendItem(poly1) threw exception TypeError: Argument 1 (' item') to SVGPointList.appendItem must be an instance of SVGPoint.149 PASS poly1.points.appendItem(null) threw exception TypeError: Argument 1 (' item') to SVGPointList.appendItem must be an instance of SVGPoint.146 PASS poly1.points.appendItem(30) threw exception TypeError: Argument 1 ('newItem') to SVGPointList.appendItem must be an instance of SVGPoint. 147 PASS poly1.points.appendItem('aString') threw exception TypeError: Argument 1 ('newItem') to SVGPointList.appendItem must be an instance of SVGPoint. 148 PASS poly1.points.appendItem(poly1) threw exception TypeError: Argument 1 ('newItem') to SVGPointList.appendItem must be an instance of SVGPoint. 149 PASS poly1.points.appendItem(null) threw exception TypeError: Argument 1 ('newItem') to SVGPointList.appendItem must be an instance of SVGPoint. 150 150 PASS dumpPoint(poly1.points.appendItem(point)) is "x=200 y=100" 151 151 PASS poly1.points.numberOfItems is 2 -
trunk/LayoutTests/svg/dom/SVGTransformList-basics-expected.txt
r243730 r249191 11 11 12 12 Test uncommon arguments for initialize() 13 PASS circle1.transform.baseVal.initialize(30) threw exception TypeError: Argument 1 (' item') to SVGTransformList.initialize must be an instance of SVGTransform.14 PASS circle1.transform.baseVal.initialize('aString') threw exception TypeError: Argument 1 (' item') to SVGTransformList.initialize must be an instance of SVGTransform.15 PASS circle1.transform.baseVal.initialize(circle1) threw exception TypeError: Argument 1 (' item') to SVGTransformList.initialize must be an instance of SVGTransform.16 PASS circle1.transform.baseVal.initialize(null) threw exception TypeError: Argument 1 (' item') to SVGTransformList.initialize must be an instance of SVGTransform.13 PASS circle1.transform.baseVal.initialize(30) threw exception TypeError: Argument 1 ('newItem') to SVGTransformList.initialize must be an instance of SVGTransform. 14 PASS circle1.transform.baseVal.initialize('aString') threw exception TypeError: Argument 1 ('newItem') to SVGTransformList.initialize must be an instance of SVGTransform. 15 PASS circle1.transform.baseVal.initialize(circle1) threw exception TypeError: Argument 1 ('newItem') to SVGTransformList.initialize must be an instance of SVGTransform. 16 PASS circle1.transform.baseVal.initialize(null) threw exception TypeError: Argument 1 ('newItem') to SVGTransformList.initialize must be an instance of SVGTransform. 17 17 18 18 Test uncommon arguments for getItem() … … 51 51 PASS dumpTransform(circle1.transform.baseVal.getItem(1)) is "type=SVG_TRANSFORM_TRANSLATE matrix=[1.0 0.0 0.0 1.0 10.0 10.0]" 52 52 PASS circle1.getAttribute('transform') is "scale(2 2) translate(10 10)" 53 PASS circle1.transform.baseVal.insertItemBefore(30, 0) threw exception TypeError: Argument 1 (' item') to SVGTransformList.insertItemBefore must be an instance of SVGTransform.54 PASS circle1.transform.baseVal.insertItemBefore('aString', 0) threw exception TypeError: Argument 1 (' item') to SVGTransformList.insertItemBefore must be an instance of SVGTransform.55 PASS circle1.transform.baseVal.insertItemBefore(circle1, 0) threw exception TypeError: Argument 1 (' item') to SVGTransformList.insertItemBefore must be an instance of SVGTransform.56 PASS circle1.transform.baseVal.insertItemBefore(null, 0) threw exception TypeError: Argument 1 (' item') to SVGTransformList.insertItemBefore must be an instance of SVGTransform.53 PASS circle1.transform.baseVal.insertItemBefore(30, 0) threw exception TypeError: Argument 1 ('newItem') to SVGTransformList.insertItemBefore must be an instance of SVGTransform. 54 PASS circle1.transform.baseVal.insertItemBefore('aString', 0) threw exception TypeError: Argument 1 ('newItem') to SVGTransformList.insertItemBefore must be an instance of SVGTransform. 55 PASS circle1.transform.baseVal.insertItemBefore(circle1, 0) threw exception TypeError: Argument 1 ('newItem') to SVGTransformList.insertItemBefore must be an instance of SVGTransform. 56 PASS circle1.transform.baseVal.insertItemBefore(null, 0) threw exception TypeError: Argument 1 ('newItem') to SVGTransformList.insertItemBefore must be an instance of SVGTransform. 57 57 58 58 Test overlapping edge cases for removeItem() … … 77 77 PASS circle1.transform.baseVal.replaceItem(circle1) threw exception TypeError: Not enough arguments. 78 78 PASS circle1.transform.baseVal.replaceItem(null) threw exception TypeError: Not enough arguments. 79 PASS circle1.transform.baseVal.replaceItem(30, 0) threw exception TypeError: Argument 1 (' item') to SVGTransformList.replaceItem must be an instance of SVGTransform.80 PASS circle1.transform.baseVal.replaceItem('aString', 0) threw exception TypeError: Argument 1 (' item') to SVGTransformList.replaceItem must be an instance of SVGTransform.81 PASS circle1.transform.baseVal.replaceItem(circle1, 0) threw exception TypeError: Argument 1 (' item') to SVGTransformList.replaceItem must be an instance of SVGTransform.82 PASS circle1.transform.baseVal.replaceItem(null, 0) threw exception TypeError: Argument 1 (' item') to SVGTransformList.replaceItem must be an instance of SVGTransform.79 PASS circle1.transform.baseVal.replaceItem(30, 0) threw exception TypeError: Argument 1 ('newItem') to SVGTransformList.replaceItem must be an instance of SVGTransform. 80 PASS circle1.transform.baseVal.replaceItem('aString', 0) threw exception TypeError: Argument 1 ('newItem') to SVGTransformList.replaceItem must be an instance of SVGTransform. 81 PASS circle1.transform.baseVal.replaceItem(circle1, 0) threw exception TypeError: Argument 1 ('newItem') to SVGTransformList.replaceItem must be an instance of SVGTransform. 82 PASS circle1.transform.baseVal.replaceItem(null, 0) threw exception TypeError: Argument 1 ('newItem') to SVGTransformList.replaceItem must be an instance of SVGTransform. 83 83 PASS circle1.transform.baseVal.replaceItem(circle1.transform.baseVal.getItem(0), 0) is circle1.transform.baseVal.getItem(0) 84 84 PASS circle1.transform.baseVal.numberOfItems is 4 … … 128 128 129 129 Test uncommon arguments for appendItem() 130 PASS circle1.transform.baseVal.appendItem(30) threw exception TypeError: Argument 1 (' item') to SVGTransformList.appendItem must be an instance of SVGTransform.131 PASS circle1.transform.baseVal.appendItem('aString') threw exception TypeError: Argument 1 (' item') to SVGTransformList.appendItem must be an instance of SVGTransform.132 PASS circle1.transform.baseVal.appendItem(circle1) threw exception TypeError: Argument 1 (' item') to SVGTransformList.appendItem must be an instance of SVGTransform.133 PASS circle1.transform.baseVal.appendItem(null) threw exception TypeError: Argument 1 (' item') to SVGTransformList.appendItem must be an instance of SVGTransform.130 PASS circle1.transform.baseVal.appendItem(30) threw exception TypeError: Argument 1 ('newItem') to SVGTransformList.appendItem must be an instance of SVGTransform. 131 PASS circle1.transform.baseVal.appendItem('aString') threw exception TypeError: Argument 1 ('newItem') to SVGTransformList.appendItem must be an instance of SVGTransform. 132 PASS circle1.transform.baseVal.appendItem(circle1) threw exception TypeError: Argument 1 ('newItem') to SVGTransformList.appendItem must be an instance of SVGTransform. 133 PASS circle1.transform.baseVal.appendItem(null) threw exception TypeError: Argument 1 ('newItem') to SVGTransformList.appendItem must be an instance of SVGTransform. 134 134 135 135 Testing animVal clear throws -
trunk/Source/WebCore/ChangeLog
r249188 r249191 1 2019-08-28 Said Abou-Hallawa <sabouhallawa@apple.com> 2 3 SVG2: Add length, item getter and item setter to all SVG lists 4 https://bugs.webkit.org/show_bug.cgi?id=199526 5 6 Reviewed by Simon Fraser. 7 8 -- Implement the SVG2 specs for SVG lists: 9 https://svgwg.org/svg2-draft/types.html#TermListInterface. 10 11 -- Match the arguments' names in the IDL files with the specs. 12 13 Tests: svg/dom/SVGLengthList-length-indexed-access.xhtml 14 svg/dom/SVGPathSegList-length-indexed-access.xhtml 15 16 * svg/SVGLengthList.idl: 17 * svg/SVGNumberList.idl: 18 * svg/SVGPathSegList.h: 19 * svg/SVGPathSegList.idl: 20 * svg/SVGPointList.idl: 21 * svg/SVGStringList.idl: 22 * svg/SVGTransformList.idl: 23 * svg/properties/SVGList.h: 24 (WebCore::SVGList::length const): 25 (WebCore::SVGList::setItem): 26 1 27 2019-08-27 John Wilander <wilander@apple.com> and Fujii Hironori <Hironori.Fujii@sony.com> 2 28 -
trunk/Source/WebCore/svg/SVGLengthList.idl
r208863 r249191 28 28 SkipVTableValidation 29 29 ] interface SVGLengthList { 30 readonly attribute unsigned long length; 30 31 readonly attribute unsigned long numberOfItems; 31 32 32 33 [MayThrowException] void clear(); 33 [MayThrowException] SVGLength initialize(SVGLength item);34 [MayThrowException] SVGLength getItem(unsigned long index);35 [MayThrowException] SVGLength insertItemBefore(SVGLength item, unsigned long index);36 [MayThrowException] SVGLength replaceItem(SVGLength item, unsigned long index);34 [MayThrowException] SVGLength initialize(SVGLength newItem); 35 [MayThrowException] getter SVGLength getItem(unsigned long index); 36 [MayThrowException] SVGLength insertItemBefore(SVGLength newItem, unsigned long index); 37 [MayThrowException] SVGLength replaceItem(SVGLength newItem, unsigned long index); 37 38 [MayThrowException] SVGLength removeItem(unsigned long index); 38 [MayThrowException] SVGLength appendItem(SVGLength item); 39 [MayThrowException] SVGLength appendItem(SVGLength newItem); 40 [MayThrowException] setter void (unsigned long index, SVGLength newItem); 39 41 }; -
trunk/Source/WebCore/svg/SVGNumberList.idl
r207716 r249191 26 26 27 27 interface SVGNumberList { 28 readonly attribute unsigned long length; 28 29 readonly attribute unsigned long numberOfItems; 29 30 30 31 [MayThrowException] void clear(); 31 [MayThrowException] SVGNumber initialize(SVGNumber item);32 [MayThrowException] SVGNumber getItem(unsigned long index);33 [MayThrowException] SVGNumber insertItemBefore(SVGNumber item, unsigned long index);34 [MayThrowException] SVGNumber replaceItem(SVGNumber item, unsigned long index);32 [MayThrowException] SVGNumber initialize(SVGNumber newItem); 33 [MayThrowException] getter SVGNumber getItem(unsigned long index); 34 [MayThrowException] SVGNumber insertItemBefore(SVGNumber newItem, unsigned long index); 35 [MayThrowException] SVGNumber replaceItem(SVGNumber newItem, unsigned long index); 35 36 [MayThrowException] SVGNumber removeItem(unsigned long index); 36 [MayThrowException] SVGNumber appendItem(SVGNumber item); 37 [MayThrowException] SVGNumber appendItem(SVGNumber newItem); 38 [MayThrowException] setter void (unsigned long index, SVGNumber newItem); 37 39 }; -
trunk/Source/WebCore/svg/SVGPathSegList.h
r243555 r249191 59 59 } 60 60 61 // Override SVGList::length() because numberOfItems() isn't virtual. 62 unsigned length() const { return numberOfItems(); } 63 61 64 unsigned numberOfItems() const 62 65 { … … 110 113 clearPath(); 111 114 return Base::appendItem(WTFMove(newItem)); 115 } 116 117 // Override SVGList::setItem() because replaceItem() isn't virtual. 118 ExceptionOr<void> setItem(unsigned index, Ref<SVGPathSeg>&& newItem) 119 { 120 auto result = replaceItem(WTFMove(newItem), index); 121 if (result.hasException()) 122 return result.releaseException(); 123 return { }; 112 124 } 113 125 -
trunk/Source/WebCore/svg/SVGPathSegList.idl
r219712 r249191 26 26 27 27 interface SVGPathSegList { 28 readonly attribute unsigned long length; 28 29 readonly attribute unsigned long numberOfItems; 29 30 30 31 [MayThrowException] void clear(); 31 32 [MayThrowException] SVGPathSeg initialize(SVGPathSeg newItem); 32 [MayThrowException] SVGPathSeg getItem(unsigned long index);33 [MayThrowException] getter SVGPathSeg getItem(unsigned long index); 33 34 [MayThrowException] SVGPathSeg insertItemBefore(SVGPathSeg newItem, unsigned long index); 34 35 [MayThrowException] SVGPathSeg replaceItem(SVGPathSeg newItem, unsigned long index); 35 36 [MayThrowException] SVGPathSeg removeItem(unsigned long index); 36 37 [MayThrowException] SVGPathSeg appendItem(SVGPathSeg newItem); 38 [MayThrowException] setter void (unsigned long index, SVGPathSeg newItem); 37 39 }; -
trunk/Source/WebCore/svg/SVGPointList.idl
r207716 r249191 25 25 26 26 interface SVGPointList { 27 readonly attribute unsigned long length; 27 28 readonly attribute unsigned long numberOfItems; 28 29 29 30 [MayThrowException] void clear(); 30 [MayThrowException] SVGPoint initialize(SVGPoint item);31 [MayThrowException] SVGPoint getItem(unsigned long index);32 [MayThrowException] SVGPoint insertItemBefore(SVGPoint item, unsigned long index);33 [MayThrowException] SVGPoint replaceItem(SVGPoint item, unsigned long index);31 [MayThrowException] SVGPoint initialize(SVGPoint newItem); 32 [MayThrowException] getter SVGPoint getItem(unsigned long index); 33 [MayThrowException] SVGPoint insertItemBefore(SVGPoint newItem, unsigned long index); 34 [MayThrowException] SVGPoint replaceItem(SVGPoint newItem, unsigned long index); 34 35 [MayThrowException] SVGPoint removeItem(unsigned long index); 35 [MayThrowException] SVGPoint appendItem(SVGPoint item); 36 [MayThrowException] SVGPoint appendItem(SVGPoint newItem); 37 [MayThrowException] setter void (unsigned long index, SVGPoint newItem); 36 38 }; -
trunk/Source/WebCore/svg/SVGStringList.idl
r207716 r249191 25 25 26 26 interface SVGStringList { 27 readonly attribute unsigned long length; 27 28 readonly attribute unsigned long numberOfItems; 28 29 29 30 [MayThrowException] void clear(); 30 [MayThrowException] DOMString initialize(DOMString item);31 [MayThrowException] DOMString getItem(unsigned long index);32 [MayThrowException] DOMString insertItemBefore(DOMString item, unsigned long index);33 [MayThrowException] DOMString replaceItem(DOMString item, unsigned long index);31 [MayThrowException] DOMString initialize(DOMString newItem); 32 [MayThrowException] getter DOMString getItem(unsigned long index); 33 [MayThrowException] DOMString insertItemBefore(DOMString newItem, unsigned long index); 34 [MayThrowException] DOMString replaceItem(DOMString newItem, unsigned long index); 34 35 [MayThrowException] DOMString removeItem(unsigned long index); 35 [MayThrowException] DOMString appendItem(DOMString item); 36 [MayThrowException] DOMString appendItem(DOMString newItem); 37 [MayThrowException] setter void (unsigned long index, DOMString newItem); 36 38 }; -
trunk/Source/WebCore/svg/SVGTransformList.idl
r243730 r249191 26 26 27 27 interface SVGTransformList { 28 readonly attribute unsigned long length; 28 29 readonly attribute unsigned long numberOfItems; 29 30 30 31 [MayThrowException] void clear(); 31 [MayThrowException] SVGTransform initialize(SVGTransform item);32 [MayThrowException] SVGTransform getItem(unsigned long index);33 [MayThrowException] SVGTransform insertItemBefore(SVGTransform item, unsigned long index);34 [MayThrowException] SVGTransform replaceItem(SVGTransform item, unsigned long index);32 [MayThrowException] SVGTransform initialize(SVGTransform newItem); 33 [MayThrowException] getter SVGTransform getItem(unsigned long index); 34 [MayThrowException] SVGTransform insertItemBefore(SVGTransform newItem, unsigned long index); 35 [MayThrowException] SVGTransform replaceItem(SVGTransform newItem, unsigned long index); 35 36 [MayThrowException] SVGTransform removeItem(unsigned long index); 36 [MayThrowException] SVGTransform appendItem(SVGTransform item); 37 [MayThrowException] SVGTransform appendItem(SVGTransform newItem); 38 [MayThrowException] setter void (unsigned long index, SVGTransform newItem); 37 39 38 40 [MayThrowException, NewObject] SVGTransform createSVGTransformFromMatrix(SVGMatrix matrix); -
trunk/Source/WebCore/svg/properties/SVGList.h
r243163 r249191 34 34 class SVGList : public SVGProperty { 35 35 public: 36 unsigned length() const { return numberOfItems(); } 37 36 38 unsigned numberOfItems() const 37 39 { … … 126 128 commitChange(); 127 129 return item; 130 } 131 132 ExceptionOr<void> setItem(unsigned index, ItemType&& newItem) 133 { 134 auto result = replaceItem(WTFMove(newItem), index); 135 if (result.hasException()) 136 return result.releaseException(); 137 return { }; 128 138 } 129 139
Note:
See TracChangeset
for help on using the changeset viewer.