Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: LayoutTests/svg/dom/resources/svgtags.js

Issue 1006863002: Some minor touch-ups to the SVG content-model test framework (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add text element classes. Drop some dead containers. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « LayoutTests/svg/dom/content-model-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // A list of all SVG tags plus optional properties: 1 // A list of all SVG tags plus optional properties:
2 // * needParent (string) - parent element required for a valid co ntext 2 // * needParent (string) - parent element required for a valid co ntext
3 // * needChld (string list) - child element(s) required for a valid context 3 // * needChild (string list) - child element(s) required for a valid context
4 // * needAttr (string map) - attribute(s) required for a valid cont ext 4 // * needAttr (string map) - attribute(s) required for a valid cont ext
5 // * noRenderer (bool) - true if the element doesn't have an as sociated renderer 5 // * noRenderer (bool) - true if the element doesn't have an as sociated renderer
6 6
7 var SvgTags = { 7 var SvgTags = {
8 a: { }, 8 a: { },
9 altGlyph: { }, 9 // audio: { },
10 altGlyphDef: { },
11 altGlyphItem: { },
12 animate: { noRenderer: true }, 10 animate: { noRenderer: true },
13 animateColor: { }, 11 animateMotion: { noRenderer: true },
14 animateMotion: { }, 12 animateTransform: { noRenderer: true },
15 animateTransform: { }, 13 // canvas: { },
16 circle: { }, 14 circle: { },
17 clipPath: { }, 15 clipPath: { },
18 color_profile: { }, 16 cursor: { noRenderer: true },
19 cursor: { },
20 defs: { }, 17 defs: { },
21 desc: { noRenderer: true }, 18 desc: { noRenderer: true },
19 discard: { noRenderer: true },
22 ellipse: { }, 20 ellipse: { },
23 feBlend: { needParent: 'filter' }, 21 feBlend: { needParent: 'filter' },
24 feColorMatrix: { needParent: 'filter' }, 22 feColorMatrix: { needParent: 'filter' },
25 feComponentTransfer: { needParent: 'filter' }, 23 feComponentTransfer: { needParent: 'filter' },
26 feComposite: { needParent: 'filter' }, 24 feComposite: { needParent: 'filter' },
27 feConvolveMatrix: { needParent: 'filter', needAttr: { kernelMatrix: '0 0 0 0 0 0 0 0 0' } }, 25 feConvolveMatrix: { needParent: 'filter', needAttr: { kernelMatrix: '0 0 0 0 0 0 0 0 0' } },
28 feDiffuseLighting: { needParent: 'filter', needChld: [ 'fePointLight' ] } , 26 feDiffuseLighting: { needParent: 'filter', needChild: [ 'fePointLight' ] },
29 feDisplacementMap: { needParent: 'filter' }, 27 feDisplacementMap: { needParent: 'filter' },
30 feDistantLight: { needParent: 'feSpecularLighting' }, 28 feDistantLight: { needParent: 'feSpecularLighting' },
31 feDropShadow: { }, 29 feDropShadow: { needParent: 'filter' },
32 feFlood: { needParent: 'filter' }, 30 feFlood: { needParent: 'filter' },
33 feFuncA: { }, 31 feFuncA: { needParent: 'feComponentTransfer' },
34 feFuncB: { }, 32 feFuncB: { needParent: 'feComponentTransfer' },
35 feFuncG: { }, 33 feFuncG: { needParent: 'feComponentTransfer' },
36 feFuncR: { }, 34 feFuncR: { needParent: 'feComponentTransfer' },
37 feGaussianBlur: { needParent: 'filter' }, 35 feGaussianBlur: { needParent: 'filter' },
38 feImage: { needParent: 'filter' }, 36 feImage: { needParent: 'filter' },
39 feMerge: { needParent: 'filter', needChld: [ 'feMergeNode' ] }, 37 feMerge: { needParent: 'filter', needChild: [ 'feMergeNode' ] } ,
40 feMergeNode: { needParent: 'feMerge' }, 38 feMergeNode: { needParent: 'feMerge' },
41 feMorphology: { needParent: 'filter' }, 39 feMorphology: { needParent: 'filter' },
42 feOffset: { needParent: 'filter' }, 40 feOffset: { needParent: 'filter' },
43 fePointLight: { needParent: 'feSpecularLighting' }, 41 fePointLight: { needParent: 'feSpecularLighting' },
44 feSpecularLighting: { needParent: 'filter', needChld: [ 'fePointLight' ] } , 42 feSpecularLighting: { needParent: 'filter', needChild: [ 'fePointLight' ] },
45 feSpotLight: { needParent: 'feSpecularLighting' }, 43 feSpotLight: { needParent: 'feSpecularLighting' },
46 feTile: { needParent: 'filter' }, 44 feTile: { needParent: 'filter' },
47 feTurbulence: { needParent: 'filter' }, 45 feTurbulence: { needParent: 'filter' },
48 filter: { }, 46 filter: { },
49 font: { },
50 font_face: { },
51 font_face_format: { },
52 font_face_name: { },
53 font_face_src: { },
54 font_face_uri: { },
55 foreignObject: { }, 47 foreignObject: { },
56 g: { }, 48 g: { },
57 glyph: { }, 49 // hatch: { },
58 glyphRef: { }, 50 // hatchPath: { },
59 hkern: { }, 51 // iframe: { },
60 image: { }, 52 image: { },
61 line: { }, 53 line: { },
62 linearGradient: { }, 54 linearGradient: { },
63 marker: { }, 55 marker: { },
64 mask: { }, 56 mask: { },
57 // meshGradient: { },
58 // meshPatch: { },
59 // meshRow: { },
65 metadata: { noRenderer: true }, 60 metadata: { noRenderer: true },
66 missing_glyph: { },
67 mpath: { }, 61 mpath: { },
68 path: { }, 62 path: { },
69 pattern: { }, 63 pattern: { },
70 polygon: { }, 64 polygon: { },
71 polyline: { }, 65 polyline: { },
72 radialGradient: { }, 66 radialGradient: { },
73 rect: { }, 67 rect: { },
74 script: { }, 68 script: { noRenderer: true },
75 set: { noRenderer: true }, 69 set: { noRenderer: true },
70 // solidColor: { },
71 // source: { },
76 stop: { }, 72 stop: { },
77 style: { }, 73 style: { noRenderer: true },
78 svg: { }, 74 svg: { },
79 switch: { }, 75 switch: { },
80 symbol: { }, 76 symbol: { },
81 text: { }, 77 text: { },
82 textPath: { }, 78 textPath: { },
79 // track: { },
83 title: { noRenderer: true }, 80 title: { noRenderer: true },
84 tref: { },
85 tspan: { }, 81 tspan: { },
86 use: { }, 82 use: { },
87 view: { }, 83 // video: { },
88 vkern: { }, 84 view: { noRenderer: true },
89 } 85 }
90 86
91 // SVG element class shorthands as defined by the spec. 87 // SVG element class shorthands as defined by the spec.
92 var SvgTagClasses = { 88 var SvgTagClasses = {
93 CLASS_ANIMATION: [ 89 CLASS_ANIMATION: [
94 // http://www.w3.org/TR/SVG/intro.html#TermAnimationElement 90 // https://svgwg.org/svg2-draft/animate.html#TermAnimationElement
95 'animate', 'animateColor', 'animateMotion', 'animateTransform', 'set' 91 'animate', 'animateMotion', 'animateTransform', 'discard', 'set'
96 ],
97
98 CLASS_BASIC_SHAPE: [
99 // http://www.w3.org/TR/SVG/intro.html#TermBasicShapeElement
100 'circle', 'ellipse', 'line', 'polygon', 'polyline', 'rect'
101 ], 92 ],
102 93
103 CLASS_CONTAINER: [ 94 CLASS_CONTAINER: [
104 // http://www.w3.org/TR/SVG/intro.html#TermContainerElement 95 // https://svgwg.org/svg2-draft/struct.html#TermContainerElement
105 'a', 'defs', 'glyph', 'g', 'marker', 'mask', 'missing-glyph', 'pattern', 'svg', 'switch', 96 'a', 'defs', 'g', 'marker', 'mask', 'pattern', 'svg', 'switch', 'symbol'
106 'symbol'
107 ], 97 ],
108 98
109 CLASS_DESCRIPTIVE: [ 99 CLASS_DESCRIPTIVE: [
110 // http://www.w3.org/TR/SVG/intro.html#TermDescriptiveElement 100 // https://svgwg.org/svg2-draft/struct.html#TermDescriptiveElement
111 'desc', 'metadata', 'title' 101 'desc', 'metadata', 'title'
112 ], 102 ],
113 103
114 CLASS_FILTER_PRIMITIVE: [ 104 CLASS_FILTER_PRIMITIVE: [
115 // http://www.w3.org/TR/SVG/intro.html#TermFilterPrimitiveElement 105 // http://dev.w3.org/fxtf/filters/#elementdef-filter-primitive
116 'feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feCon volveMatrix', 106 'feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feCon volveMatrix',
117 'feDiffuseLighting', 'feDisplacementMap', 'feFlood', 'feGaussianBlur', ' feImage', 107 'feDiffuseLighting', 'feDisplacementMap', 'feDropShadow', 'feFlood', 'fe GaussianBlur',
118 'feMerge', 'feMorphology', 'feOffset', 'feSpecularLighting', 'feTile', ' feTurbulence' 108 'feImage', 'feMerge', 'feMorphology', 'feOffset', 'feSpecularLighting', 'feTile',
119 ], 109 'feTurbulence'
120
121 CLASS_GRADIENT: [
122 // http://www.w3.org/TR/SVG/intro.html#TermGradientElement
123 'linearGradient', 'radialGradient'
124 ], 110 ],
125 111
126 CLASS_GRAPHICS: [ 112 CLASS_GRAPHICS: [
127 // http://www.w3.org/TR/SVG/intro.html#TermGraphicsElement 113 // https://svgwg.org/svg2-draft/struct.html#TermGraphicsElement
128 'circle', 'ellipse', 'image', 'line', 'path', 'polygon', 'polyline', 're ct', 'text', 'use' 114 'audio', 'canvas', 'circle', 'ellipse', 'foreignObject', 'iframe', 'imag e', 'line', 'path',
115 'polygon', 'polyline', 'rect', 'text', 'use', 'video'
116 ],
117
118 CLASS_GRAPHICS_REFERENCING_ELEMENT: [
119 // https://svgwg.org/svg2-draft/struct.html#TermGraphicsReferencingEleme nt
120 'audio', 'iframe', 'image', 'use', 'video'
129 ], 121 ],
130 122
131 CLASS_LIGHT_SOURCE: [ 123 CLASS_LIGHT_SOURCE: [
132 // http://www.w3.org/TR/SVG/intro.html#TermLightSourceElement 124 // http://dev.w3.org/fxtf/filters/#light-source
133 'feDistantLight', 'fePointLight', 'feSpotLight' 125 'feDistantLight', 'fePointLight', 'feSpotLight'
134 ], 126 ],
135 127
128 CLASS_PAINT_SERVER: [
129 // https://svgwg.org/svg2-draft/intro.html#TermPaintServerElement
130 'solidColor', 'linearGradient', 'radialGradient', 'meshGradient', 'patte rn', 'hatch'
131 ],
132
136 CLASS_SHAPE: [ 133 CLASS_SHAPE: [
137 // http://www.w3.org/TR/SVG/intro.html#TermShapeElement 134 // https://svgwg.org/svg2-draft/shapes.html#TermShapeElement
138 'circle', 'ellipse', 'line', 'path', 'polygon', 'polyline', 'rect' 135 'circle', 'ellipse', 'line', 'path', 'polygon', 'polyline', 'rect'
139 ], 136 ],
140 137
141 CLASS_STRUCTURAL: [ 138 CLASS_STRUCTURAL: [
142 // http://www.w3.org/TR/SVG/intro.html#TermStructuralElement 139 // https://svgwg.org/svg2-draft/intro.html#TermStructuralElement
143 'defs', 'g', 'svg', 'symbol', 'use' 140 'defs', 'g', 'svg', 'symbol', 'use'
144 ], 141 ],
142
143 CLASS_STRUCTURALLY_EXTERNAL_ELEMENTS: [
144 // https://svgwg.org/svg2-draft/intro.html#TermStructurallyExternalEleme nt
145 'audio', 'foreignObject', 'iframe', 'image', 'script', 'use', 'video'
146 ],
147
148 CLASS_TEXT_CONTENT_ELEMENTS: [
149 // https://svgwg.org/svg2-draft/text.html#TermTextContentElement
150 'text', 'textPath', 'tspan'
151 ],
152
153 CLASS_TEXT_CONTENT_BLOCK_ELEMENTS: [
154 // https://svgwg.org/svg2-draft/text.html#TermTextContentBlockElement
155 'text'
156 ],
157
158 CLASS_TEXT_CONTENT_CHILD_ELEMENTS: [
159 // https://svgwg.org/svg2-draft/text.html#TermTextContentChildElement
160 'textPath', 'tspan'
161 ],
145 }; 162 };
OLDNEW
« no previous file with comments | « LayoutTests/svg/dom/content-model-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698