1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
|
// META: timeout=long
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js
// https://svgwg.org/svg2-draft/
'use strict';
let objects = {};
const elements = [
'svg',
'g',
'defs',
'desc',
'title',
'symbol',
'use',
'image',
'switch',
'style',
'path',
'rect',
'circle',
'ellipse',
'line',
'polyline',
'polygon',
'text',
'tspan',
'textPath',
'marker',
'linearGradient',
'radialGradient',
'meshGradient',
'stop',
'pattern',
'clipPath',
'mask',
'a',
'view',
'script',
'animate',
'set',
'animateMotion',
'mpath',
'animateColor',
'animateTransform',
'metadata',
'foreignObject',
'filter',
'feBlend',
'feColorMatrix',
'feComponentTransfer',
'feFuncR',
'feFuncG',
'feFuncB',
'feFuncA',
'feComposite',
'feConvolveMatrix',
'feDiffuseLighting',
'fePointLight',
'feSpotLight',
'feDisplacementMap',
'feDropShadow',
'feFlood',
'feGaussianBlur',
'feDisplacementMap',
'feDropShadow',
'feImage',
'feMerge',
'feMergeNode',
'feMorphology',
'feSpecularLighting',
'feTile',
'feTurbulence',
];
idl_test(
['SVG', 'svg-animations'],
['cssom', 'web-animations', 'html', 'dom'],
idlArray => {
const svgUrl = 'http://www.w3.org/2000/svg';
for (const element of elements) {
try {
objects[element] = document.createElementNS(svgUrl, element);
} catch (e) {
// Will be surfaced by idlharess.js's test_object below.
}
}
idlArray.add_untested_idls('interface CSSPseudoElement {};')
idlArray.add_objects({
SVGAnimatedBoolean: ['objects.feConvolveMatrix.preserveAlpha'],
SVGAnimatedString: ['objects.a.target'],
SVGStringList: ['objects.a.requiredExtensions'],
SVGAnimatedEnumeration: ['objects.text.lengthAdjust'],
SVGAnimatedInteger: ['objects.feConvolveMatrix.orderX'],
SVGNumber: ['objects.svg.createSVGNumber()'],
SVGAnimatedNumber: ['objects.stop.offset'],
SVGNumberList: ['objects.text.rotate.baseVal'],
SVGAnimatedNumberList: ['objects.text.rotate'],
SVGLength: ['objects.svg.createSVGLength()'],
SVGAnimatedLength: ['objects.svg.x'],
SVGAnimatedLengthList: ['objects.text.x'],
SVGAngle: ['objects.svg.createSVGAngle()'],
SVGAnimatedAngle: ['objects.marker.orientAngle'],
SVGRect: ['objects.svg.createSVGRect()'],
SVGAnimatedRect: ['objects.svg.viewBox'],
SVGSVGElement: ['objects.svg'],
SVGGElement: ['objects.g'],
SVGDefsElement: ['objects.defs'],
SVGDescElement: ['objects.desc'],
SVGTitleElement: ['objects.title'],
SVGSymbolElement: ['objects.symbol'],
SVGUseElement: ['objects.use'],
SVGImageElement: ['objects.image'],
SVGSwitchElement: ['objects.switch'],
SVGStyleElement: ['objects.style'],
SVGPoint: ['objects.svg.createSVGPoint()'],
SVGPointList: ['objects.polygon.points'],
SVGMatrix: ['objects.svg.createSVGMatrix()'],
SVGTransform: ['objects.svg.createSVGTransform()'],
SVGTransformList: ['objects.pattern.patternTransform.baseVal'],
SVGAnimatedTransformList: ['objects.pattern.patternTransform'],
SVGPreserveAspectRatio: ['objects.image.preserveAspectRatio.baseVal'],
SVGAnimatedPreserveAspectRatio: ['objects.image.preserveAspectRatio'],
SVGPathSegClosePath: ['objects.path.createSVGPathSegClosePath()'],
SVGPathSegMovetoAbs: ['objects.path.createSVGPathSegMovetoAbs(0,0)'],
SVGPathSegMovetoRel: ['objects.path.createSVGPathSegMovetoRel(0,0)'],
SVGPathSegLinetoAbs: ['objects.path.createSVGPathSegLinetoAbs(0,0)'],
SVGPathSegLinetoRel: ['objects.path.createSVGPathSegLinetoRel(0,0)'],
SVGPathSegCurvetoCubicAbs: ['objects.path.createSVGPathSegCurvetoCubicAbs(0,0,0,0,0,0)'],
SVGPathSegCurvetoCubicRel: ['objects.path.createSVGPathSegCurvetoCubicRel(0,0,0,0,0,0)'],
SVGPathSegCurvetoQuadraticAbs: ['objects.path.createSVGPathSegCurvetoQuadraticAbs(0,0,0,0)'],
SVGPathSegCurvetoQuadraticRel: ['objects.path.createSVGPathSegCurvetoQuadraticRel(0,0,0,0)'],
SVGPathSegArcAbs: ['objects.path.createSVGPathSegArcAbs(0,0,0,0,0,true,true)'],
SVGPathSegArcRel: ['objects.path.createSVGPathSegArcRel(0,0,0,0,0,true,true)'],
SVGPathSegLinetoHorizontalAbs: ['objects.path.createSVGPathSegLinetoHorizontalAbs(0)'],
SVGPathSegLinetoHorizontalRel: ['objects.path.createSVGPathSegLinetoHorizontalRel(0)'],
SVGPathSegLinetoVerticalAbs: ['objects.path.createSVGPathSegLinetoVerticalAbs(0)'],
SVGPathSegLinetoVerticalRel: ['objects.path.createSVGPathSegLinetoVerticalRel(0)'],
SVGPathSegCurvetoCubicSmoothAbs: ['objects.path.createSVGPathSegCurvetoCubicSmoothAbs(0,0,0,0)'],
SVGPathSegCurvetoCubicSmoothRel: ['objects.path.createSVGPathSegCurvetoCubicSmoothRel(0,0,0,0)'],
SVGPathSegCurvetoQuadraticSmoothAbs: ['objects.path.createSVGPathSegCurvetoQuadraticSmoothAbs(0,0)'],
SVGPathSegCurvetoQuadraticSmoothRel: ['objects.path.createSVGPathSegCurvetoQuadraticSmoothRel(0,0)'],
SVGPathSegList: ['objects.path.pathSegList'],
SVGPathElement: ['objects.path'],
SVGRectElement: ['objects.rect'],
SVGCircleElement: ['objects.circle'],
SVGEllipseElement: ['objects.ellipse'],
SVGLineElement: ['objects.line'],
SVGPolylineElement: ['objects.polyline'],
SVGPolygonElement: ['objects.polygon'],
SVGTextElement: ['objects.text'],
SVGTSpanElement: ['objects.tspan'],
SVGTextPathElement: ['objects.textPath'],
SVGMarkerElement: ['objects.marker'],
SVGLinearGradientElement: ['objects.linearGradient'],
SVGRadialGradientElement: ['objects.radialGradient'],
SVGMeshGradientElement: ['objects.meshGradient'],
SVGStopElement: ['objects.stop'],
SVGPatternElement: ['objects.pattern'],
SVGClipPathElement: ['objects.clipPath'],
SVGMaskElement: ['objects.mask'],
SVGAElement: ['objects.a'],
SVGViewElement: ['objects.view'],
SVGScriptElement: ['objects.script'],
SVGAnimateElement: ['objects.animate'],
SVGSetElement: ['objects.set'],
SVGAnimateMotionElement: ['objects.animateMotion'],
SVGMPathElement: ['objects.mpath'],
SVGAnimateColorElement: ['objects.animateColor'],
SVGAnimateTransformElement: ['objects.animateTransform'],
SVGMetadataElement: ['objects.metadata'],
SVGForeignObjectElement: ['objects.foreignObject'],
SVGFilterElement: ['objects.filter'],
SVGFEBlendElement: ['objects.feBlend'],
SVGFEColorMatrixElement: ['objects.feColorMatrix'],
SVGFEComponentTransferElement: ['objects.feComponentTransfer'],
SVGFEFuncRElement: ['objects.feFuncR'],
SVGFEFuncGElement: ['objects.feFuncG'],
SVGFEFuncBElement: ['objects.feFuncB'],
SVGFEFuncAElement: ['objects.feFuncA'],
SVGFECompositeElement: ['objects.feComposite'],
SVGFEConvolveMatrixElement: ['objects.feConvolveMatrix'],
SVGFEDiffuseLightingElement: ['objects.feDiffuseLighting'],
SVGFEPointLightElement: ['objects.fePointLight'],
SVGFESpotLightElement: ['objects.feSpotLight'],
SVGFEDisplacementMapElement: ['objects.feDisplacementMap'],
SVGFEDropShadowElement: ['objects.feDropShadow'],
SVGFEFloodElement: ['objects.feFlood'],
SVGFEGaussianBlurElement: ['objects.feGaussianBlur'],
SVGFEImageElement: ['objects.feImage'],
SVGFEMergeElement: ['objects.feMerge'],
SVGFEMergeNodeElement: ['objects.feMergeNode'],
SVGFEMorphologyElement: ['objects.feMorphology'],
SVGFESpecularLightingElement: ['objects.feSpecularLighting'],
SVGFETileElement: ['objects.feTile'],
SVGFETurbulenceElement: ['objects.feTurbulence']
});
}
);
|