layout/style/test/property_database.js

branch
TOR_BUG_9701
changeset 11
deefc01c0e14
equal deleted inserted replaced
-1:000000000000 0:a551a9a62a1a
1 /* -*- Mode: Java; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /* vim: set shiftwidth=4 tabstop=4 autoindent cindent noexpandtab: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7 // True longhand properties.
8 const CSS_TYPE_LONGHAND = 0;
9
10 // True shorthand properties.
11 const CSS_TYPE_TRUE_SHORTHAND = 1;
12
13 // Properties that we handle as shorthands but were longhands either in
14 // the current spec or earlier versions of the spec.
15 const CSS_TYPE_SHORTHAND_AND_LONGHAND = 2;
16
17 // Each property has the following fields:
18 // domProp: The name of the relevant member of nsIDOM[NS]CSS2Properties
19 // inherited: Whether the property is inherited by default (stated as
20 // yes or no in the property header in all CSS specs)
21 // type: see above
22 // alias_for: optional, indicates that the property is an alias for
23 // some other property that is the preferred serialization. (Type
24 // must not be CSS_TYPE_LONGHAND.)
25 // get_computed: if present, the property's computed value shows up on
26 // another property, and this is a function used to get it
27 // initial_values: Values whose computed value should be the same as the
28 // computed value for the property's initial value.
29 // other_values: Values whose computed value should be different from the
30 // computed value for the property's initial value.
31 // XXX Should have a third field for values whose computed value may or
32 // may not be the same as for the property's initial value.
33 // invalid_values: Things that are not values for the property and
34 // should be rejected, but which are balanced and should not absorb
35 // what follows
36 // quirks_values: Values that should be accepted in quirks mode only,
37 // mapped to the values they are equivalent to.
38 // unbalanced_values: Things that are not values for the property and
39 // should be rejected, and which also contain unbalanced constructs
40 // that should absorb what follows
41
42 // Helper functions used to construct gCSSProperties.
43
44 function initial_font_family_is_sans_serif()
45 {
46 // The initial value of 'font-family' might be 'serif' or
47 // 'sans-serif'.
48 var div = document.createElement("div");
49 div.setAttribute("style", "font: initial");
50 return getComputedStyle(div, "").fontFamily == "sans-serif";
51 }
52 var gInitialFontFamilyIsSansSerif = initial_font_family_is_sans_serif();
53
54 // shared by background-image and border-image-source
55 var validGradientAndElementValues = [
56 "-moz-element(#a)",
57 "-moz-element( #a )",
58 "-moz-element(#a-1)",
59 "-moz-element(#a\\:1)",
60 /* gradient torture test */
61 "linear-gradient(red, blue)",
62 "linear-gradient(red, yellow, blue)",
63 "linear-gradient(red 1px, yellow 20%, blue 24em, green)",
64 "linear-gradient(red, yellow, green, blue 50%)",
65 "linear-gradient(red -50%, yellow -25%, green, blue)",
66 "linear-gradient(red -99px, yellow, green, blue 120%)",
67 "linear-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))",
68 "linear-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)",
69
70 "linear-gradient(to top, red, blue)",
71 "linear-gradient(to bottom, red, blue)",
72 "linear-gradient(to left, red, blue)",
73 "linear-gradient(to right, red, blue)",
74 "linear-gradient(to top left, red, blue)",
75 "linear-gradient(to top right, red, blue)",
76 "linear-gradient(to bottom left, red, blue)",
77 "linear-gradient(to bottom right, red, blue)",
78 "linear-gradient(to left top, red, blue)",
79 "linear-gradient(to left bottom, red, blue)",
80 "linear-gradient(to right top, red, blue)",
81 "linear-gradient(to right bottom, red, blue)",
82
83 "linear-gradient(-33deg, red, blue)",
84 "linear-gradient(30grad, red, blue)",
85 "linear-gradient(10deg, red, blue)",
86 "linear-gradient(1turn, red, blue)",
87 "linear-gradient(.414rad, red, blue)",
88
89 "-moz-linear-gradient(red, blue)",
90 "-moz-linear-gradient(red, yellow, blue)",
91 "-moz-linear-gradient(red 1px, yellow 20%, blue 24em, green)",
92 "-moz-linear-gradient(red, yellow, green, blue 50%)",
93 "-moz-linear-gradient(red -50%, yellow -25%, green, blue)",
94 "-moz-linear-gradient(red -99px, yellow, green, blue 120%)",
95 "-moz-linear-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))",
96 "-moz-linear-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)",
97
98 "-moz-linear-gradient(to top, red, blue)",
99 "-moz-linear-gradient(to bottom, red, blue)",
100 "-moz-linear-gradient(to left, red, blue)",
101 "-moz-linear-gradient(to right, red, blue)",
102 "-moz-linear-gradient(to top left, red, blue)",
103 "-moz-linear-gradient(to top right, red, blue)",
104 "-moz-linear-gradient(to bottom left, red, blue)",
105 "-moz-linear-gradient(to bottom right, red, blue)",
106 "-moz-linear-gradient(to left top, red, blue)",
107 "-moz-linear-gradient(to left bottom, red, blue)",
108 "-moz-linear-gradient(to right top, red, blue)",
109 "-moz-linear-gradient(to right bottom, red, blue)",
110
111 "-moz-linear-gradient(top left, red, blue)",
112 "-moz-linear-gradient(0 0, red, blue)",
113 "-moz-linear-gradient(20% bottom, red, blue)",
114 "-moz-linear-gradient(center 20%, red, blue)",
115 "-moz-linear-gradient(left 35px, red, blue)",
116 "-moz-linear-gradient(10% 10em, red, blue)",
117 "-moz-linear-gradient(44px top, red, blue)",
118
119 "-moz-linear-gradient(top left 45deg, red, blue)",
120 "-moz-linear-gradient(20% bottom -300deg, red, blue)",
121 "-moz-linear-gradient(center 20% 1.95929rad, red, blue)",
122 "-moz-linear-gradient(left 35px 30grad, red, blue)",
123 "-moz-linear-gradient(left 35px 0.1turn, red, blue)",
124 "-moz-linear-gradient(10% 10em 99999deg, red, blue)",
125 "-moz-linear-gradient(44px top -33deg, red, blue)",
126
127 "-moz-linear-gradient(-33deg, red, blue)",
128 "-moz-linear-gradient(30grad left 35px, red, blue)",
129 "-moz-linear-gradient(10deg 20px, red, blue)",
130 "-moz-linear-gradient(1turn 20px, red, blue)",
131 "-moz-linear-gradient(.414rad bottom, red, blue)",
132
133 "-moz-linear-gradient(blue calc(0px) ,green calc(25%) ,red calc(40px) ,blue calc(60px) , yellow calc(100px))",
134 "-moz-linear-gradient(-33deg, blue calc(-25%) ,red 40px)",
135 "-moz-linear-gradient(10deg, blue calc(100px + -25%),red calc(40px))",
136 "-moz-linear-gradient(10deg, blue calc(-25px),red calc(100%))",
137 "-moz-linear-gradient(.414rad, blue calc(100px + -25px) ,green calc(100px + -25px) ,red calc(100px + -25%) ,blue calc(-25px) , yellow calc(-25px))",
138 "-moz-linear-gradient(1turn, blue calc(-25%) ,green calc(25px) ,red calc(25%),blue calc(0px),white 50px, yellow calc(-25px))",
139
140 "radial-gradient(red, blue)",
141 "radial-gradient(red, yellow, blue)",
142 "radial-gradient(red 1px, yellow 20%, blue 24em, green)",
143 "radial-gradient(red, yellow, green, blue 50%)",
144 "radial-gradient(red -50%, yellow -25%, green, blue)",
145 "radial-gradient(red -99px, yellow, green, blue 120%)",
146 "radial-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))",
147
148 "radial-gradient(0 0, red, blue)",
149 "radial-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)",
150
151 "radial-gradient(at top left, red, blue)",
152 "radial-gradient(at 20% bottom, red, blue)",
153 "radial-gradient(at center 20%, red, blue)",
154 "radial-gradient(at left 35px, red, blue)",
155 "radial-gradient(at 10% 10em, red, blue)",
156 "radial-gradient(at 44px top, red, blue)",
157 "radial-gradient(at 0 0, red, blue)",
158
159 "radial-gradient(farthest-corner, red, blue)",
160 "radial-gradient(circle, red, blue)",
161 "radial-gradient(ellipse closest-corner, red, blue)",
162 "radial-gradient(closest-corner ellipse, red, blue)",
163
164 "radial-gradient(43px, red, blue)",
165 "radial-gradient(43px 43px, red, blue)",
166 "radial-gradient(50% 50%, red, blue)",
167 "radial-gradient(43px 50%, red, blue)",
168 "radial-gradient(50% 43px, red, blue)",
169 "radial-gradient(circle 43px, red, blue)",
170 "radial-gradient(43px circle, red, blue)",
171 "radial-gradient(ellipse 43px 43px, red, blue)",
172 "radial-gradient(ellipse 50% 50%, red, blue)",
173 "radial-gradient(ellipse 43px 50%, red, blue)",
174 "radial-gradient(ellipse 50% 43px, red, blue)",
175 "radial-gradient(50% 43px ellipse, red, blue)",
176
177 "radial-gradient(farthest-corner at top left, red, blue)",
178 "radial-gradient(ellipse closest-corner at 45px, red, blue)",
179 "radial-gradient(circle farthest-side at 45px, red, blue)",
180 "radial-gradient(closest-side ellipse at 50%, red, blue)",
181 "radial-gradient(farthest-corner circle at 4em, red, blue)",
182
183 "radial-gradient(30% 40% at top left, red, blue)",
184 "radial-gradient(50px 60px at 15% 20%, red, blue)",
185 "radial-gradient(7em 8em at 45px, red, blue)",
186
187 "-moz-radial-gradient(red, blue)",
188 "-moz-radial-gradient(red, yellow, blue)",
189 "-moz-radial-gradient(red 1px, yellow 20%, blue 24em, green)",
190 "-moz-radial-gradient(red, yellow, green, blue 50%)",
191 "-moz-radial-gradient(red -50%, yellow -25%, green, blue)",
192 "-moz-radial-gradient(red -99px, yellow, green, blue 120%)",
193 "-moz-radial-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))",
194
195 "-moz-radial-gradient(top left, red, blue)",
196 "-moz-radial-gradient(20% bottom, red, blue)",
197 "-moz-radial-gradient(center 20%, red, blue)",
198 "-moz-radial-gradient(left 35px, red, blue)",
199 "-moz-radial-gradient(10% 10em, red, blue)",
200 "-moz-radial-gradient(44px top, red, blue)",
201
202 "-moz-radial-gradient(top left 45deg, red, blue)",
203 "-moz-radial-gradient(0 0, red, blue)",
204 "-moz-radial-gradient(20% bottom -300deg, red, blue)",
205 "-moz-radial-gradient(center 20% 1.95929rad, red, blue)",
206 "-moz-radial-gradient(left 35px 30grad, red, blue)",
207 "-moz-radial-gradient(10% 10em 99999deg, red, blue)",
208 "-moz-radial-gradient(44px top -33deg, red, blue)",
209 "-moz-radial-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)",
210
211 "-moz-radial-gradient(-33deg, red, blue)",
212 "-moz-radial-gradient(30grad left 35px, red, blue)",
213 "-moz-radial-gradient(10deg 20px, red, blue)",
214 "-moz-radial-gradient(.414rad bottom, red, blue)",
215
216 "-moz-radial-gradient(cover, red, blue)",
217 "-moz-radial-gradient(circle, red, blue)",
218 "-moz-radial-gradient(ellipse closest-corner, red, blue)",
219 "-moz-radial-gradient(farthest-side circle, red, blue)",
220
221 "-moz-radial-gradient(top left, cover, red, blue)",
222 "-moz-radial-gradient(15% 20%, circle, red, blue)",
223 "-moz-radial-gradient(45px, ellipse closest-corner, red, blue)",
224 "-moz-radial-gradient(45px, farthest-side circle, red, blue)",
225
226 "-moz-radial-gradient(99deg, cover, red, blue)",
227 "-moz-radial-gradient(-1.2345rad, circle, red, blue)",
228 "-moz-radial-gradient(399grad, ellipse closest-corner, red, blue)",
229 "-moz-radial-gradient(399grad, farthest-side circle, red, blue)",
230
231 "-moz-radial-gradient(top left 99deg, cover, red, blue)",
232 "-moz-radial-gradient(15% 20% -1.2345rad, circle, red, blue)",
233 "-moz-radial-gradient(45px 399grad, ellipse closest-corner, red, blue)",
234 "-moz-radial-gradient(45px 399grad, farthest-side circle, red, blue)",
235
236 "-moz-repeating-linear-gradient(red, blue)",
237 "-moz-repeating-linear-gradient(red, yellow, blue)",
238 "-moz-repeating-linear-gradient(red 1px, yellow 20%, blue 24em, green)",
239 "-moz-repeating-linear-gradient(red, yellow, green, blue 50%)",
240 "-moz-repeating-linear-gradient(red -50%, yellow -25%, green, blue)",
241 "-moz-repeating-linear-gradient(red -99px, yellow, green, blue 120%)",
242 "-moz-repeating-linear-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))",
243 "-moz-repeating-linear-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)",
244
245 "-moz-repeating-linear-gradient(to top, red, blue)",
246 "-moz-repeating-linear-gradient(to bottom, red, blue)",
247 "-moz-repeating-linear-gradient(to left, red, blue)",
248 "-moz-repeating-linear-gradient(to right, red, blue)",
249 "-moz-repeating-linear-gradient(to top left, red, blue)",
250 "-moz-repeating-linear-gradient(to top right, red, blue)",
251 "-moz-repeating-linear-gradient(to bottom left, red, blue)",
252 "-moz-repeating-linear-gradient(to bottom right, red, blue)",
253 "-moz-repeating-linear-gradient(to left top, red, blue)",
254 "-moz-repeating-linear-gradient(to left bottom, red, blue)",
255 "-moz-repeating-linear-gradient(to right top, red, blue)",
256 "-moz-repeating-linear-gradient(to right bottom, red, blue)",
257
258 "-moz-repeating-linear-gradient(top left, red, blue)",
259 "-moz-repeating-linear-gradient(0 0, red, blue)",
260 "-moz-repeating-linear-gradient(20% bottom, red, blue)",
261 "-moz-repeating-linear-gradient(center 20%, red, blue)",
262 "-moz-repeating-linear-gradient(left 35px, red, blue)",
263 "-moz-repeating-linear-gradient(10% 10em, red, blue)",
264 "-moz-repeating-linear-gradient(44px top, red, blue)",
265
266 "-moz-repeating-linear-gradient(top left 45deg, red, blue)",
267 "-moz-repeating-linear-gradient(20% bottom -300deg, red, blue)",
268 "-moz-repeating-linear-gradient(center 20% 1.95929rad, red, blue)",
269 "-moz-repeating-linear-gradient(left 35px 30grad, red, blue)",
270 "-moz-repeating-linear-gradient(10% 10em 99999deg, red, blue)",
271 "-moz-repeating-linear-gradient(44px top -33deg, red, blue)",
272
273 "-moz-repeating-linear-gradient(-33deg, red, blue)",
274 "-moz-repeating-linear-gradient(30grad left 35px, red, blue)",
275 "-moz-repeating-linear-gradient(10deg 20px, red, blue)",
276 "-moz-repeating-linear-gradient(.414rad bottom, red, blue)",
277
278 "-moz-repeating-radial-gradient(red, blue)",
279 "-moz-repeating-radial-gradient(red, yellow, blue)",
280 "-moz-repeating-radial-gradient(red 1px, yellow 20%, blue 24em, green)",
281 "-moz-repeating-radial-gradient(red, yellow, green, blue 50%)",
282 "-moz-repeating-radial-gradient(red -50%, yellow -25%, green, blue)",
283 "-moz-repeating-radial-gradient(red -99px, yellow, green, blue 120%)",
284 "-moz-repeating-radial-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))",
285 "-moz-repeating-radial-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)",
286
287 "repeating-radial-gradient(at top left, red, blue)",
288 "repeating-radial-gradient(at 0 0, red, blue)",
289 "repeating-radial-gradient(at 20% bottom, red, blue)",
290 "repeating-radial-gradient(at center 20%, red, blue)",
291 "repeating-radial-gradient(at left 35px, red, blue)",
292 "repeating-radial-gradient(at 10% 10em, red, blue)",
293 "repeating-radial-gradient(at 44px top, red, blue)",
294
295 "-moz-repeating-radial-gradient(farthest-corner, red, blue)",
296 "-moz-repeating-radial-gradient(circle, red, blue)",
297 "-moz-repeating-radial-gradient(ellipse closest-corner, red, blue)",
298
299 "repeating-radial-gradient(farthest-corner at top left, red, blue)",
300 "repeating-radial-gradient(closest-corner ellipse at 45px, red, blue)",
301 "repeating-radial-gradient(farthest-side circle at 45px, red, blue)",
302 "repeating-radial-gradient(ellipse closest-side at 50%, red, blue)",
303 "repeating-radial-gradient(circle farthest-corner at 4em, red, blue)",
304
305 "repeating-radial-gradient(30% 40% at top left, red, blue)",
306 "repeating-radial-gradient(50px 60px at 15% 20%, red, blue)",
307 "repeating-radial-gradient(7em 8em at 45px, red, blue)",
308
309 "-moz-image-rect(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), 2, 10, 10, 2)",
310 "-moz-image-rect(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), 10%, 50%, 30%, 0%)",
311 "-moz-image-rect(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), 10, 50%, 30%, 0)",
312
313 "-moz-radial-gradient(calc(25%) top, red, blue)",
314 "-moz-radial-gradient(left calc(25%), red, blue)",
315 "-moz-radial-gradient(calc(25px) top, red, blue)",
316 "-moz-radial-gradient(left calc(25px), red, blue)",
317 "-moz-radial-gradient(calc(-25%) top, red, blue)",
318 "-moz-radial-gradient(left calc(-25%), red, blue)",
319 "-moz-radial-gradient(calc(-25px) top, red, blue)",
320 "-moz-radial-gradient(left calc(-25px), red, blue)",
321 "-moz-radial-gradient(calc(100px + -25%) top, red, blue)",
322 "-moz-radial-gradient(left calc(100px + -25%), red, blue)",
323 "-moz-radial-gradient(calc(100px + -25px) top, red, blue)",
324 "-moz-radial-gradient(left calc(100px + -25px), red, blue)"
325 ];
326 var invalidGradientAndElementValues = [
327 "-moz-element(#a:1)",
328 "-moz-element(a#a)",
329 "-moz-element(#a a)",
330 "-moz-element(#a+a)",
331 "-moz-element(#a())",
332 /* no quirks mode colors */
333 "linear-gradient(red, ff00ff)",
334 /* no quirks mode colors */
335 "-moz-radial-gradient(10% bottom, ffffff, black) scroll no-repeat",
336 /* no quirks mode lengths */
337 "-moz-linear-gradient(10 10px -45deg, red, blue) repeat",
338 "-moz-linear-gradient(10px 10 -45deg, red, blue) repeat",
339 "linear-gradient(red -99, yellow, green, blue 120%)",
340 /* Old syntax */
341 "-moz-linear-gradient(10px 10px, 20px, 30px 30px, 40px, from(blue), to(red))",
342 "-moz-radial-gradient(20px 20px, 10px 10px, from(green), to(#ff00ff))",
343 "-moz-radial-gradient(10px 10px, 20%, 40px 40px, 10px, from(green), to(#ff00ff))",
344 "-moz-linear-gradient(10px, 20px, 30px, 40px, color-stop(0.5, #00ccff))",
345 "-moz-linear-gradient(20px 20px, from(blue), to(red))",
346 "-moz-linear-gradient(40px 40px, 10px 10px, from(blue) to(red) color-stop(10%, fuchsia))",
347 "-moz-linear-gradient(20px 20px 30px, 10px 10px, from(red), to(#ff0000))",
348 "-moz-radial-gradient(left top, center, 20px 20px, 10px, from(blue), to(red))",
349 "-moz-linear-gradient(left left, top top, from(blue))",
350 "-moz-linear-gradient(inherit, 10px 10px, from(blue))",
351 /* New syntax */
352 "-moz-linear-gradient(10px 10px, 20px, 30px 30px, 40px, blue 0, red 100%)",
353 "-moz-radial-gradient(20px 20px, 10px 10px, from(green), to(#ff00ff))",
354 "-moz-radial-gradient(10px 10px, 20%, 40px 40px, 10px, from(green), to(#ff00ff))",
355 "-moz-linear-gradient(10px, 20px, 30px, 40px, #00ccff 50%)",
356 "-moz-linear-gradient(40px 40px, 10px 10px, blue 0 fuchsia 10% red 100%)",
357 "-moz-linear-gradient(20px 20px 30px, 10px 10px, red 0, #ff0000 100%)",
358 "-moz-radial-gradient(left top, center, 20px 20px, 10px, from(blue), to(red))",
359 "-moz-linear-gradient(left left, top top, blue 0)",
360 "-moz-linear-gradient(inherit, 10px 10px, blue 0)",
361 "-moz-linear-gradient(left left blue red)",
362 "-moz-linear-gradient(left left blue, red)",
363 "-moz-linear-gradient()",
364 "-moz-linear-gradient(cover, red, blue)",
365 "-moz-linear-gradient(auto, red, blue)",
366 "-moz-linear-gradient(22 top, red, blue)",
367 "-moz-linear-gradient(10% red blue)",
368 "-moz-linear-gradient(10%, red blue)",
369 "-moz-linear-gradient(10%,, red, blue)",
370 "-moz-linear-gradient(45px, center, red, blue)",
371 "-moz-linear-gradient(45px, center red, blue)",
372 "-moz-radial-gradient(contain, ellipse, red, blue)",
373 "-moz-radial-gradient(10deg contain, red, blue)",
374 "-moz-radial-gradient(10deg, contain,, red, blue)",
375 "-moz-radial-gradient(contain contain, red, blue)",
376 "-moz-radial-gradient(ellipse circle, red, blue)",
377 "-moz-radial-gradient(to top left, red, blue)",
378 "-moz-radial-gradient(center, 10%, red, blue)",
379 "-moz-radial-gradient(5rad, 20px, red, blue)",
380 "-moz-radial-gradient(40%, -100px -10%, red, blue)",
381
382 "-moz-radial-gradient(at top left to cover, red, blue)",
383 "-moz-radial-gradient(at 15% 20% circle, red, blue)",
384
385 "-moz-radial-gradient(to cover, red, blue)",
386 "-moz-radial-gradient(to contain, red, blue)",
387 "-moz-radial-gradient(to closest-side circle, red, blue)",
388 "-moz-radial-gradient(to farthest-corner ellipse, red, blue)",
389
390 "-moz-radial-gradient(ellipse at 45px closest-corner, red, blue)",
391 "-moz-radial-gradient(circle at 45px farthest-side, red, blue)",
392 "-moz-radial-gradient(ellipse 45px, closest-side, red, blue)",
393 "-moz-radial-gradient(circle 45px, farthest-corner, red, blue)",
394 "-moz-radial-gradient(ellipse, ellipse closest-side, red, blue)",
395 "-moz-radial-gradient(circle, circle farthest-corner, red, blue)",
396
397 "-moz-radial-gradient(99deg to farthest-corner, red, blue)",
398 "-moz-radial-gradient(-1.2345rad circle, red, blue)",
399 "-moz-radial-gradient(ellipse 399grad to closest-corner, red, blue)",
400 "-moz-radial-gradient(circle 399grad to farthest-side, red, blue)",
401
402 "-moz-radial-gradient(at top left 99deg, to farthest-corner, red, blue)",
403 "-moz-radial-gradient(circle at 15% 20% -1.2345rad, red, blue)",
404 "-moz-radial-gradient(to top left at 30% 40%, red, blue)",
405 "-moz-radial-gradient(ellipse at 45px 399grad, to closest-corner, red, blue)",
406 "-moz-radial-gradient(at 45px 399grad to farthest-side circle, red, blue)",
407
408 "-moz-radial-gradient(to 50%, red, blue)",
409 "-moz-radial-gradient(circle to 50%, red, blue)",
410 "-moz-radial-gradient(circle to 43px 43px, red, blue)",
411 "-moz-radial-gradient(circle to 50% 50%, red, blue)",
412 "-moz-radial-gradient(circle to 43px 50%, red, blue)",
413 "-moz-radial-gradient(circle to 50% 43px, red, blue)",
414 "-moz-radial-gradient(ellipse to 43px, red, blue)",
415 "-moz-radial-gradient(ellipse to 50%, red, blue)",
416
417 "-moz-linear-gradient(to 0 0, red, blue)",
418 "-moz-linear-gradient(to 20% bottom, red, blue)",
419 "-moz-linear-gradient(to center 20%, red, blue)",
420 "-moz-linear-gradient(to left 35px, red, blue)",
421 "-moz-linear-gradient(to 10% 10em, red, blue)",
422 "-moz-linear-gradient(to 44px top, red, blue)",
423 "-moz-linear-gradient(to top left 45deg, red, blue)",
424 "-moz-linear-gradient(to 20% bottom -300deg, red, blue)",
425 "-moz-linear-gradient(to center 20% 1.95929rad, red, blue)",
426 "-moz-linear-gradient(to left 35px 30grad, red, blue)",
427 "-moz-linear-gradient(to 10% 10em 99999deg, red, blue)",
428 "-moz-linear-gradient(to 44px top -33deg, red, blue)",
429 "-moz-linear-gradient(to -33deg, red, blue)",
430 "-moz-linear-gradient(to 30grad left 35px, red, blue)",
431 "-moz-linear-gradient(to 10deg 20px, red, blue)",
432 "-moz-linear-gradient(to .414rad bottom, red, blue)",
433
434 "-moz-linear-gradient(to top top, red, blue)",
435 "-moz-linear-gradient(to bottom bottom, red, blue)",
436 "-moz-linear-gradient(to left left, red, blue)",
437 "-moz-linear-gradient(to right right, red, blue)",
438
439 "-moz-repeating-linear-gradient(10px 10px, 20px, 30px 30px, 40px, blue 0, red 100%)",
440 "-moz-repeating-radial-gradient(20px 20px, 10px 10px, from(green), to(#ff00ff))",
441 "-moz-repeating-radial-gradient(10px 10px, 20%, 40px 40px, 10px, from(green), to(#ff00ff))",
442 "-moz-repeating-linear-gradient(10px, 20px, 30px, 40px, #00ccff 50%)",
443 "-moz-repeating-linear-gradient(40px 40px, 10px 10px, blue 0 fuchsia 10% red 100%)",
444 "-moz-repeating-linear-gradient(20px 20px 30px, 10px 10px, red 0, #ff0000 100%)",
445 "-moz-repeating-radial-gradient(left top, center, 20px 20px, 10px, from(blue), to(red))",
446 "-moz-repeating-linear-gradient(left left, top top, blue 0)",
447 "-moz-repeating-linear-gradient(inherit, 10px 10px, blue 0)",
448 "-moz-repeating-linear-gradient(left left blue red)",
449 "-moz-repeating-linear-gradient()",
450
451 "-moz-repeating-linear-gradient(to 0 0, red, blue)",
452 "-moz-repeating-linear-gradient(to 20% bottom, red, blue)",
453 "-moz-repeating-linear-gradient(to center 20%, red, blue)",
454 "-moz-repeating-linear-gradient(to left 35px, red, blue)",
455 "-moz-repeating-linear-gradient(to 10% 10em, red, blue)",
456 "-moz-repeating-linear-gradient(to 44px top, red, blue)",
457 "-moz-repeating-linear-gradient(to top left 45deg, red, blue)",
458 "-moz-repeating-linear-gradient(to 20% bottom -300deg, red, blue)",
459 "-moz-repeating-linear-gradient(to center 20% 1.95929rad, red, blue)",
460 "-moz-repeating-linear-gradient(to left 35px 30grad, red, blue)",
461 "-moz-repeating-linear-gradient(to 10% 10em 99999deg, red, blue)",
462 "-moz-repeating-linear-gradient(to 44px top -33deg, red, blue)",
463 "-moz-repeating-linear-gradient(to -33deg, red, blue)",
464 "-moz-repeating-linear-gradient(to 30grad left 35px, red, blue)",
465 "-moz-repeating-linear-gradient(to 10deg 20px, red, blue)",
466 "-moz-repeating-linear-gradient(to .414rad bottom, red, blue)",
467
468 "-moz-repeating-linear-gradient(to top top, red, blue)",
469 "-moz-repeating-linear-gradient(to bottom bottom, red, blue)",
470 "-moz-repeating-linear-gradient(to left left, red, blue)",
471 "-moz-repeating-linear-gradient(to right right, red, blue)",
472
473 "-moz-repeating-radial-gradient(to top left at 30% 40%, red, blue)",
474 "-moz-repeating-radial-gradient(ellipse at 45px closest-corner, red, blue)",
475 "-moz-repeating-radial-gradient(circle at 45px farthest-side, red, blue)",
476
477 "radial-gradient(circle 175px 20px, black, white)",
478 "radial-gradient(175px 20px circle, black, white)",
479 "radial-gradient(ellipse 175px, black, white)",
480 "radial-gradient(175px ellipse, black, white)",
481 "radial-gradient(50%, red, blue)",
482 "radial-gradient(circle 50%, red, blue)",
483 "radial-gradient(50% circle, red, blue)",
484
485 /* Valid only when prefixed */
486 "linear-gradient(top left, red, blue)",
487 "linear-gradient(0 0, red, blue)",
488 "linear-gradient(20% bottom, red, blue)",
489 "linear-gradient(center 20%, red, blue)",
490 "linear-gradient(left 35px, red, blue)",
491 "linear-gradient(10% 10em, red, blue)",
492 "linear-gradient(44px top, red, blue)",
493
494 "linear-gradient(top left 45deg, red, blue)",
495 "linear-gradient(20% bottom -300deg, red, blue)",
496 "linear-gradient(center 20% 1.95929rad, red, blue)",
497 "linear-gradient(left 35px 30grad, red, blue)",
498 "linear-gradient(left 35px 0.1turn, red, blue)",
499 "linear-gradient(10% 10em 99999deg, red, blue)",
500 "linear-gradient(44px top -33deg, red, blue)",
501
502 "linear-gradient(30grad left 35px, red, blue)",
503 "linear-gradient(10deg 20px, red, blue)",
504 "linear-gradient(1turn 20px, red, blue)",
505 "linear-gradient(.414rad bottom, red, blue)",
506
507 "radial-gradient(top left 45deg, red, blue)",
508 "radial-gradient(20% bottom -300deg, red, blue)",
509 "radial-gradient(center 20% 1.95929rad, red, blue)",
510 "radial-gradient(left 35px 30grad, red, blue)",
511 "radial-gradient(10% 10em 99999deg, red, blue)",
512 "radial-gradient(44px top -33deg, red, blue)",
513
514 "radial-gradient(-33deg, red, blue)",
515 "radial-gradient(30grad left 35px, red, blue)",
516 "radial-gradient(10deg 20px, red, blue)",
517 "radial-gradient(.414rad bottom, red, blue)",
518
519 "radial-gradient(cover, red, blue)",
520 "radial-gradient(ellipse contain, red, blue)",
521 "radial-gradient(cover circle, red, blue)",
522
523 "radial-gradient(top left, cover, red, blue)",
524 "radial-gradient(15% 20%, circle, red, blue)",
525 "radial-gradient(45px, ellipse closest-corner, red, blue)",
526 "radial-gradient(45px, farthest-side circle, red, blue)",
527
528 "radial-gradient(99deg, cover, red, blue)",
529 "radial-gradient(-1.2345rad, circle, red, blue)",
530 "radial-gradient(399grad, ellipse closest-corner, red, blue)",
531 "radial-gradient(399grad, farthest-side circle, red, blue)",
532
533 "radial-gradient(top left 99deg, cover, red, blue)",
534 "radial-gradient(15% 20% -1.2345rad, circle, red, blue)",
535 "radial-gradient(45px 399grad, ellipse closest-corner, red, blue)",
536 "radial-gradient(45px 399grad, farthest-side circle, red, blue)",
537
538 /* Valid only when unprefixed */
539 "-moz-radial-gradient(at top left, red, blue)",
540 "-moz-radial-gradient(at 20% bottom, red, blue)",
541 "-moz-radial-gradient(at center 20%, red, blue)",
542 "-moz-radial-gradient(at left 35px, red, blue)",
543 "-moz-radial-gradient(at 10% 10em, red, blue)",
544 "-moz-radial-gradient(at 44px top, red, blue)",
545 "-moz-radial-gradient(at 0 0, red, blue)",
546
547 "-moz-radial-gradient(circle 43px, red, blue)",
548 "-moz-radial-gradient(ellipse 43px 43px, red, blue)",
549 "-moz-radial-gradient(ellipse 50% 50%, red, blue)",
550 "-moz-radial-gradient(ellipse 43px 50%, red, blue)",
551 "-moz-radial-gradient(ellipse 50% 43px, red, blue)",
552
553 "-moz-radial-gradient(farthest-corner at top left, red, blue)",
554 "-moz-radial-gradient(ellipse closest-corner at 45px, red, blue)",
555 "-moz-radial-gradient(circle farthest-side at 45px, red, blue)",
556 "-moz-radial-gradient(closest-side ellipse at 50%, red, blue)",
557 "-moz-radial-gradient(farthest-corner circle at 4em, red, blue)",
558
559 "-moz-radial-gradient(30% 40% at top left, red, blue)",
560 "-moz-radial-gradient(50px 60px at 15% 20%, red, blue)",
561 "-moz-radial-gradient(7em 8em at 45px, red, blue)"
562 ];
563 var unbalancedGradientAndElementValues = [
564 "-moz-element(#a()",
565 ];
566
567 var gCSSProperties = {
568 "animation": {
569 domProp: "animation",
570 inherited: false,
571 type: CSS_TYPE_TRUE_SHORTHAND,
572 subproperties: [ "animation-name", "animation-duration", "animation-timing-function", "animation-delay", "animation-direction", "animation-fill-mode", "animation-iteration-count" ],
573 initial_values: [ "none none 0s 0s ease normal 1.0", "none", "0s", "ease", "normal", "1.0" ],
574 other_values: [ "bounce 1s linear 2s", "bounce 1s 2s linear", "bounce linear 1s 2s", "linear bounce 1s 2s", "linear 1s bounce 2s", "linear 1s 2s bounce", "1s bounce linear 2s", "1s bounce 2s linear", "1s 2s bounce linear", "1s linear bounce 2s", "1s linear 2s bounce", "1s 2s linear bounce", "bounce linear 1s", "bounce 1s linear", "linear bounce 1s", "linear 1s bounce", "1s bounce linear", "1s linear bounce", "1s 2s bounce", "1s bounce 2s", "bounce 1s 2s", "1s 2s linear", "1s linear 2s", "linear 1s 2s", "bounce 1s", "1s bounce", "linear 1s", "1s linear", "1s 2s", "2s 1s", "bounce", "linear", "1s", "height", "2s", "ease-in-out", "2s ease-in", "opacity linear", "ease-out 2s", "2s color, 1s bounce, 500ms height linear, 1s opacity 4s cubic-bezier(0.0, 0.1, 1.0, 1.0)", "1s \\32bounce linear 2s", "1s -bounce linear 2s", "1s -\\32bounce linear 2s", "1s \\32 0bounce linear 2s", "1s -\\32 0bounce linear 2s", "1s \\2bounce linear 2s", "1s -\\2bounce linear 2s", "2s, 1s bounce", "1s bounce, 2s", "2s all, 1s bounce", "1s bounce, 2s all", "1s bounce, 2s none", "2s none, 1s bounce", "2s bounce, 1s all", "2s all, 1s bounce" ],
575 invalid_values: [ "2s inherit", "inherit 2s", "2s bounce, 1s inherit", "2s inherit, 1s bounce", "2s initial", "2s all,, 1s bounce", "2s all, , 1s bounce" ]
576 },
577 "animation-delay": {
578 domProp: "animationDelay",
579 inherited: false,
580 type: CSS_TYPE_LONGHAND,
581 initial_values: [ "0s", "0ms" ],
582 other_values: [ "1s", "250ms", "-100ms", "-1s", "1s, 250ms, 2.3s"],
583 invalid_values: [ "0", "0px" ]
584 },
585 "animation-direction": {
586 domProp: "animationDirection",
587 inherited: false,
588 type: CSS_TYPE_LONGHAND,
589 initial_values: [ "normal" ],
590 other_values: [ "alternate", "normal, alternate", "alternate, normal", "normal, normal", "normal, normal, normal", "reverse", "alternate-reverse", "normal, reverse, alternate-reverse, alternate" ],
591 invalid_values: [ "normal normal", "inherit, normal", "reverse-alternate" ]
592 },
593 "animation-duration": {
594 domProp: "animationDuration",
595 inherited: false,
596 type: CSS_TYPE_LONGHAND,
597 initial_values: [ "0s", "0ms" ],
598 other_values: [ "1s", "250ms", "1s, 250ms, 2.3s"],
599 invalid_values: [ "0", "0px", "-1ms", "-2s" ]
600 },
601 "animation-fill-mode": {
602 domProp: "animationFillMode",
603 inherited: false,
604 type: CSS_TYPE_LONGHAND,
605 initial_values: [ "none" ],
606 other_values: [ "forwards", "backwards", "both", "none, none", "forwards, backwards", "forwards, none", "none, both" ],
607 invalid_values: [ "all"]
608 },
609 "animation-iteration-count": {
610 domProp: "animationIterationCount",
611 inherited: false,
612 type: CSS_TYPE_LONGHAND,
613 initial_values: [ "1" ],
614 other_values: [ "infinite", "0", "0.5", "7.75", "-0.0", "1, 2, 3", "infinite, 2", "1, infinite" ],
615 // negatives forbidden per
616 // http://lists.w3.org/Archives/Public/www-style/2011Mar/0355.html
617 invalid_values: [ "none", "-1", "-0.5", "-1, infinite", "infinite, -3" ]
618 },
619 "animation-name": {
620 domProp: "animationName",
621 inherited: false,
622 type: CSS_TYPE_LONGHAND,
623 initial_values: [ "none" ],
624 other_values: [ "all", "ball", "mall", "color", "bounce, bubble, opacity", "foobar", "auto", "\\32bounce", "-bounce", "-\\32bounce", "\\32 0bounce", "-\\32 0bounce", "\\2bounce", "-\\2bounce" ],
625 invalid_values: [ "bounce, initial", "initial, bounce", "bounce, inherit", "inherit, bounce" ]
626 },
627 "animation-play-state": {
628 domProp: "animationPlayState",
629 inherited: false,
630 type: CSS_TYPE_LONGHAND,
631 initial_values: [ "running" ],
632 other_values: [ "paused", "running, running", "paused, running", "paused, paused", "running, paused", "paused, running, running, running, paused, running" ],
633 invalid_values: [ "0" ]
634 },
635 "animation-timing-function": {
636 domProp: "animationTimingFunction",
637 inherited: false,
638 type: CSS_TYPE_LONGHAND,
639 initial_values: [ "ease", "cubic-bezier(0.25, 0.1, 0.25, 1.0)" ],
640 other_values: [ "linear", "ease-in", "ease-out", "ease-in-out", "linear, ease-in, cubic-bezier(0.1, 0.2, 0.8, 0.9)", "cubic-bezier(0.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.25, 1.5, 0.75, -0.5)", "step-start", "step-end", "steps(1)", "steps(2, start)", "steps(386)", "steps(3, end)" ],
641 invalid_values: [ "none", "auto", "cubic-bezier(0.25, 0.1, 0.25)", "cubic-bezier(0.25, 0.1, 0.25, 0.25, 1.0)", "cubic-bezier(-0.5, 0.5, 0.5, 0.5)", "cubic-bezier(1.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.5, 0.5, -0.5, 0.5)", "cubic-bezier(0.5, 0.5, 1.5, 0.5)", "steps(2, step-end)", "steps(0)", "steps(-2)", "steps(0, step-end, 1)" ]
642 },
643 "-moz-appearance": {
644 domProp: "MozAppearance",
645 inherited: false,
646 type: CSS_TYPE_LONGHAND,
647 initial_values: [ "none" ],
648 other_values: [ "radio", "menulist" ],
649 invalid_values: []
650 },
651 "-moz-background-inline-policy": {
652 domProp: "MozBackgroundInlinePolicy",
653 inherited: false,
654 type: CSS_TYPE_LONGHAND,
655 initial_values: [ "continuous" ],
656 other_values: ["bounding-box", "each-box" ],
657 invalid_values: []
658 },
659 "-moz-binding": {
660 domProp: "MozBinding",
661 inherited: false,
662 type: CSS_TYPE_LONGHAND,
663 initial_values: [ "none" ],
664 other_values: [ "url(foo.xml)" ],
665 invalid_values: []
666 },
667 "-moz-border-bottom-colors": {
668 domProp: "MozBorderBottomColors",
669 inherited: false,
670 type: CSS_TYPE_LONGHAND,
671 initial_values: [ "none" ],
672 other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ],
673 invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ]
674 },
675 "-moz-border-end": {
676 domProp: "MozBorderEnd",
677 inherited: false,
678 type: CSS_TYPE_TRUE_SHORTHAND,
679 subproperties: [ "-moz-border-end-color", "-moz-border-end-style", "-moz-border-end-width" ],
680 initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ],
681 other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ],
682 invalid_values: [ "5%", "5", "5 green none" ]
683 },
684 "-moz-border-end-color": {
685 domProp: "MozBorderEndColor",
686 inherited: false,
687 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
688 get_computed: logical_box_prop_get_computed,
689 initial_values: [ "currentColor" ],
690 other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ],
691 invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000", "000000" ]
692 },
693 "-moz-border-end-style": {
694 domProp: "MozBorderEndStyle",
695 inherited: false,
696 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
697 get_computed: logical_box_prop_get_computed,
698 /* XXX hidden is sometimes the same as initial */
699 initial_values: [ "none" ],
700 other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ],
701 invalid_values: []
702 },
703 "-moz-border-end-width": {
704 domProp: "MozBorderEndWidth",
705 inherited: false,
706 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
707 get_computed: logical_box_prop_get_computed,
708 prerequisites: { "-moz-border-end-style": "solid" },
709 initial_values: [ "medium", "3px", "calc(4px - 1px)" ],
710 other_values: [ "thin", "thick", "1px", "2em",
711 "calc(2px)",
712 "calc(-2px)",
713 "calc(0em)",
714 "calc(0px)",
715 "calc(5em)",
716 "calc(3*25px)",
717 "calc(25px*3)",
718 "calc(3*25px + 5em)",
719 ],
720 invalid_values: [ "5%", "5" ]
721 },
722 "border-image": {
723 domProp: "borderImage",
724 inherited: false,
725 type: CSS_TYPE_TRUE_SHORTHAND,
726 subproperties: [ "border-image-source", "border-image-slice", "border-image-width", "border-image-outset", "border-image-repeat" ],
727 initial_values: [ "none" ],
728 other_values: [ "url('border.png') 27 27 27 27",
729 "url('border.png') 27",
730 "stretch url('border.png')",
731 "url('border.png') 27 fill",
732 "url('border.png') 27 27 27 27 repeat",
733 "repeat url('border.png') 27 27 27 27",
734 "url('border.png') repeat 27 27 27 27",
735 "url('border.png') fill 27 27 27 27 repeat",
736 "url('border.png') 27 27 27 27 / 1em",
737 "27 27 27 27 / 1em url('border.png') ",
738 "url('border.png') 27 27 27 27 / 10 10 10 / 10 10 repeat",
739 "repeat 27 27 27 27 / 10 10 10 / 10 10 url('border.png')",
740 "url('border.png') 27 27 27 27 / / 10 10 1em",
741 "fill 27 27 27 27 / / 10 10 1em url('border.png')",
742 "url('border.png') 27 27 27 27 / 1em 1em 1em 1em repeat",
743 "url('border.png') 27 27 27 27 / 1em 1em 1em 1em stretch round" ],
744 invalid_values: [ "url('border.png') 27 27 27 27 27",
745 "url('border.png') 27 27 27 27 / 1em 1em 1em 1em 1em",
746 "url('border.png') 27 27 27 27 /",
747 "url('border.png') fill",
748 "url('border.png') fill repeat",
749 "fill repeat",
750 "url('border.png') fill / 1em",
751 "url('border.png') / repeat",
752 "url('border.png') 1 /",
753 "url('border.png') 1 / /",
754 "1 / url('border.png')",
755 "url('border.png') / 1",
756 "url('border.png') / / 1"]
757 },
758 "border-image-source": {
759 domProp: "borderImageSource",
760 inherited: false,
761 type: CSS_TYPE_LONGHAND,
762 initial_values: [ "none" ],
763 other_values: [
764 "url('border.png')"
765 ].concat(validGradientAndElementValues),
766 invalid_values: [
767 "url('border.png') url('border.png')",
768 ].concat(invalidGradientAndElementValues),
769 unbalanced_values: [
770 ].concat(unbalancedGradientAndElementValues)
771 },
772 "border-image-slice": {
773 domProp: "borderImageSlice",
774 inherited: false,
775 type: CSS_TYPE_LONGHAND,
776 initial_values: [ "100%", "100% 100% 100% 100%" ],
777 other_values: [ "0%", "10", "10 100% 0 2", "0 0 0 0", "fill 10 10", "10 10 fill" ],
778 invalid_values: [ "-10%", "-10", "10 10 10 10 10", "10 10 10 10 -10", "10px", "-10px", "fill", "fill fill 10px", "10px fill fill" ]
779 },
780 "border-image-width": {
781 domProp: "borderImageWidth",
782 inherited: false,
783 type: CSS_TYPE_LONGHAND,
784 initial_values: [ "1", "1 1 1 1" ],
785 other_values: [ "0", "0%", "0px", "auto auto auto auto", "10 10% auto 15px", "10px 10px 10px 10px", "10", "10 10", "10 10 10" ],
786 invalid_values: [ "-10", "-10px", "-10%", "10 10 10 10 10", "10 10 10 10 auto", "auto auto auto auto auto" ]
787 },
788 "border-image-outset": {
789 domProp: "borderImageOutset",
790 inherited: false,
791 type: CSS_TYPE_LONGHAND,
792 initial_values: [ "0", "0 0 0 0" ],
793 other_values: [ "10px", "10", "10 10", "10 10 10", "10 10 10 10", "10px 10 10 10px" ],
794 invalid_values: [ "-10", "-10px", "-10%", "10%", "10 10 10 10 10" ]
795 },
796 "border-image-repeat": {
797 domProp: "borderImageRepeat",
798 inherited: false,
799 type: CSS_TYPE_LONGHAND,
800 initial_values: [ "stretch", "stretch stretch" ],
801 other_values: [ "round", "repeat", "stretch round", "repeat round", "stretch repeat", "round round", "repeat repeat" ],
802 invalid_values: [ "none", "stretch stretch stretch", "0", "10", "0%", "0px" ]
803 },
804 "-moz-border-left-colors": {
805 domProp: "MozBorderLeftColors",
806 inherited: false,
807 type: CSS_TYPE_LONGHAND,
808 initial_values: [ "none" ],
809 other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ],
810 invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ]
811 },
812 "border-radius": {
813 domProp: "borderRadius",
814 inherited: false,
815 type: CSS_TYPE_TRUE_SHORTHAND,
816 prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"},
817 subproperties: [ "border-bottom-left-radius", "border-bottom-right-radius", "border-top-left-radius", "border-top-right-radius" ],
818 initial_values: [ "0", "0px", "0%", "0px 0 0 0px", "calc(-2px)", "calc(-1%)", "calc(0px) calc(0pt) calc(0%) calc(0em)" ],
819 other_values: [ "3%", "1px", "2em", "3em 2px", "2pt 3% 4em", "2px 2px 2px 2px", // circular
820 "3% / 2%", "1px / 4px", "2em / 1em", "3em 2px / 2px 3em", "2pt 3% 4em / 4pt 1% 5em", "2px 2px 2px 2px / 4px 4px 4px 4px", "1pt / 2pt 3pt", "4pt 5pt / 3pt", // elliptical
821 "calc(2px)",
822 "calc(50%)",
823 "calc(3*25px)",
824 "calc(3*25px) 5px",
825 "5px calc(3*25px)",
826 "calc(20%) calc(3*25px)",
827 "calc(25px*3)",
828 "calc(3*25px + 50%)",
829 "2px 2px calc(2px + 1%) 2px",
830 "1px 2px 2px 2px / 2px 2px calc(2px + 1%) 2px",
831 ],
832 invalid_values: [ "2px -2px", "inherit 2px", "inherit / 2px", "2px inherit", "2px / inherit", "2px 2px 2px 2px 2px", "1px / 2px 2px 2px 2px 2px", "2", "2 2", "2px 2px 2px 2px / 2px 2px 2 2px" ]
833 },
834 "border-bottom-left-radius": {
835 domProp: "borderBottomLeftRadius",
836 inherited: false,
837 type: CSS_TYPE_LONGHAND,
838 prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"},
839 initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)" ],
840 other_values: [ "3%", "1px", "2em", // circular
841 "3% 2%", "1px 4px", "2em 2pt", // elliptical
842 "calc(2px)",
843 "calc(50%)",
844 "calc(3*25px)",
845 "calc(3*25px) 5px",
846 "5px calc(3*25px)",
847 "calc(20%) calc(3*25px)",
848 "calc(25px*3)",
849 "calc(3*25px + 50%)",
850 ],
851 invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ]
852 },
853 "border-bottom-right-radius": {
854 domProp: "borderBottomRightRadius",
855 inherited: false,
856 type: CSS_TYPE_LONGHAND,
857 prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"},
858 initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)" ],
859 other_values: [ "3%", "1px", "2em", // circular
860 "3% 2%", "1px 4px", "2em 2pt", // elliptical
861 "calc(2px)",
862 "calc(50%)",
863 "calc(3*25px)",
864 "calc(3*25px) 5px",
865 "5px calc(3*25px)",
866 "calc(20%) calc(3*25px)",
867 "calc(25px*3)",
868 "calc(3*25px + 50%)",
869 ],
870 invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ]
871 },
872 "border-top-left-radius": {
873 domProp: "borderTopLeftRadius",
874 inherited: false,
875 type: CSS_TYPE_LONGHAND,
876 prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"},
877 initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)" ],
878 other_values: [ "3%", "1px", "2em", // circular
879 "3% 2%", "1px 4px", "2em 2pt", // elliptical
880 "calc(2px)",
881 "calc(50%)",
882 "calc(3*25px)",
883 "calc(3*25px) 5px",
884 "5px calc(3*25px)",
885 "calc(20%) calc(3*25px)",
886 "calc(25px*3)",
887 "calc(3*25px + 50%)",
888 ],
889 invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ]
890 },
891 "border-top-right-radius": {
892 domProp: "borderTopRightRadius",
893 inherited: false,
894 type: CSS_TYPE_LONGHAND,
895 prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"},
896 initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)" ],
897 other_values: [ "3%", "1px", "2em", // circular
898 "3% 2%", "1px 4px", "2em 2pt", // elliptical
899 "calc(2px)",
900 "calc(50%)",
901 "calc(3*25px)",
902 "calc(3*25px) 5px",
903 "5px calc(3*25px)",
904 "calc(20%) calc(3*25px)",
905 "calc(25px*3)",
906 "calc(3*25px + 50%)",
907 ],
908 invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ]
909 },
910 "-moz-border-right-colors": {
911 domProp: "MozBorderRightColors",
912 inherited: false,
913 type: CSS_TYPE_LONGHAND,
914 initial_values: [ "none" ],
915 other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ],
916 invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ]
917 },
918 "-moz-border-start": {
919 domProp: "MozBorderStart",
920 inherited: false,
921 type: CSS_TYPE_TRUE_SHORTHAND,
922 subproperties: [ "-moz-border-start-color", "-moz-border-start-style", "-moz-border-start-width" ],
923 initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ],
924 other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ],
925 invalid_values: [ "5%", "5", "5 green solid" ]
926 },
927 "-moz-border-start-color": {
928 domProp: "MozBorderStartColor",
929 inherited: false,
930 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
931 get_computed: logical_box_prop_get_computed,
932 initial_values: [ "currentColor" ],
933 other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ],
934 invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000", "000000" ]
935 },
936 "-moz-border-start-style": {
937 domProp: "MozBorderStartStyle",
938 inherited: false,
939 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
940 get_computed: logical_box_prop_get_computed,
941 /* XXX hidden is sometimes the same as initial */
942 initial_values: [ "none" ],
943 other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ],
944 invalid_values: []
945 },
946 "-moz-border-start-width": {
947 domProp: "MozBorderStartWidth",
948 inherited: false,
949 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
950 get_computed: logical_box_prop_get_computed,
951 prerequisites: { "-moz-border-start-style": "solid" },
952 initial_values: [ "medium", "3px", "calc(4px - 1px)" ],
953 other_values: [ "thin", "thick", "1px", "2em",
954 "calc(2px)",
955 "calc(-2px)",
956 "calc(0em)",
957 "calc(0px)",
958 "calc(5em)",
959 "calc(3*25px)",
960 "calc(25px*3)",
961 "calc(3*25px + 5em)",
962 ],
963 invalid_values: [ "5%", "5" ]
964 },
965 "-moz-border-top-colors": {
966 domProp: "MozBorderTopColors",
967 inherited: false,
968 type: CSS_TYPE_LONGHAND,
969 initial_values: [ "none" ],
970 other_values: [ "red green", "red #fc3", "#ff00cc", "currentColor", "blue currentColor orange currentColor" ],
971 invalid_values: [ "red none", "red inherit", "red, green", "none red", "inherit red", "ff00cc" ]
972 },
973 "-moz-box-align": {
974 domProp: "MozBoxAlign",
975 inherited: false,
976 type: CSS_TYPE_LONGHAND,
977 initial_values: [ "stretch" ],
978 other_values: [ "start", "center", "baseline", "end" ],
979 invalid_values: []
980 },
981 "-moz-box-direction": {
982 domProp: "MozBoxDirection",
983 inherited: false,
984 type: CSS_TYPE_LONGHAND,
985 initial_values: [ "normal" ],
986 other_values: [ "reverse" ],
987 invalid_values: []
988 },
989 "-moz-box-flex": {
990 domProp: "MozBoxFlex",
991 inherited: false,
992 type: CSS_TYPE_LONGHAND,
993 initial_values: [ "0", "0.0", "-0.0" ],
994 other_values: [ "1", "100", "0.1" ],
995 invalid_values: [ "10px", "-1" ]
996 },
997 "-moz-box-ordinal-group": {
998 domProp: "MozBoxOrdinalGroup",
999 inherited: false,
1000 type: CSS_TYPE_LONGHAND,
1001 initial_values: [ "1" ],
1002 other_values: [ "2", "100", "0" ],
1003 invalid_values: [ "1.0", "-1", "-1000" ]
1004 },
1005 "-moz-box-orient": {
1006 domProp: "MozBoxOrient",
1007 inherited: false,
1008 type: CSS_TYPE_LONGHAND,
1009 initial_values: [ "horizontal", "inline-axis" ],
1010 other_values: [ "vertical", "block-axis" ],
1011 invalid_values: []
1012 },
1013 "-moz-box-pack": {
1014 domProp: "MozBoxPack",
1015 inherited: false,
1016 type: CSS_TYPE_LONGHAND,
1017 initial_values: [ "start" ],
1018 other_values: [ "center", "end", "justify" ],
1019 invalid_values: []
1020 },
1021 "box-sizing": {
1022 domProp: "boxSizing",
1023 inherited: false,
1024 type: CSS_TYPE_LONGHAND,
1025 initial_values: [ "content-box" ],
1026 other_values: [ "border-box", "padding-box" ],
1027 invalid_values: [ "margin-box", "content", "padding", "border", "margin" ]
1028 },
1029 "-moz-box-sizing": {
1030 domProp: "MozBoxSizing",
1031 inherited: false,
1032 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
1033 alias_for: "box-sizing",
1034 subproperties: [ "box-sizing" ],
1035 initial_values: [ "content-box" ],
1036 other_values: [ "border-box", "padding-box" ],
1037 invalid_values: [ "margin-box", "content", "padding", "border", "margin" ]
1038 },
1039 "-moz-columns": {
1040 domProp: "MozColumns",
1041 inherited: false,
1042 type: CSS_TYPE_TRUE_SHORTHAND,
1043 subproperties: [ "-moz-column-count", "-moz-column-width" ],
1044 initial_values: [ "auto", "auto auto" ],
1045 other_values: [ "3", "20px", "2 10px", "10px 2", "2 auto", "auto 2", "auto 50px", "50px auto" ],
1046 invalid_values: [ "5%", "-1px", "-1", "3 5", "10px 4px", "10 2px 5in", "30px -1",
1047 "auto 3 5px", "5 auto 20px", "auto auto auto" ]
1048 },
1049 "-moz-column-count": {
1050 domProp: "MozColumnCount",
1051 inherited: false,
1052 type: CSS_TYPE_LONGHAND,
1053 initial_values: [ "auto" ],
1054 other_values: [ "1", "17" ],
1055 // negative and zero invalid per editor's draft
1056 invalid_values: [ "-1", "0", "3px" ]
1057 },
1058 "-moz-column-fill": {
1059 domProp: "MozColumnFill",
1060 inherited: false,
1061 type: CSS_TYPE_LONGHAND,
1062 initial_values: [ "balance" ],
1063 other_values: [ "auto" ],
1064 invalid_values: [ "2px", "dotted", "5em" ]
1065 },
1066 "-moz-column-gap": {
1067 domProp: "MozColumnGap",
1068 inherited: false,
1069 type: CSS_TYPE_LONGHAND,
1070 initial_values: [ "normal", "1em", "calc(-2em + 3em)" ],
1071 other_values: [ "2px", "4em",
1072 "calc(2px)",
1073 "calc(-2px)",
1074 "calc(0px)",
1075 "calc(0pt)",
1076 "calc(5em)",
1077 "calc(3*25px)",
1078 "calc(25px*3)",
1079 "calc(3*25px + 5em)",
1080 ],
1081 invalid_values: [ "3%", "-1px", "4" ]
1082 },
1083 "-moz-column-rule": {
1084 domProp: "MozColumnRule",
1085 inherited: false,
1086 type: CSS_TYPE_TRUE_SHORTHAND,
1087 prerequisites: { "color": "green" },
1088 subproperties: [ "-moz-column-rule-width", "-moz-column-rule-style", "-moz-column-rule-color" ],
1089 initial_values: [ "medium none currentColor", "none", "medium", "currentColor" ],
1090 other_values: [ "2px blue solid", "red dotted 1px", "ridge 4px orange", "5px solid" ],
1091 invalid_values: [ "2px 3px 4px red", "dotted dashed", "5px dashed green 3px", "5 solid", "5 green solid" ]
1092 },
1093 "-moz-column-rule-width": {
1094 domProp: "MozColumnRuleWidth",
1095 inherited: false,
1096 type: CSS_TYPE_LONGHAND,
1097 prerequisites: { "-moz-column-rule-style": "solid" },
1098 initial_values: [
1099 "medium",
1100 "3px",
1101 "-moz-calc(3px)",
1102 "-moz-calc(5em + 3px - 5em)",
1103 "calc(3px)",
1104 "calc(5em + 3px - 5em)",
1105 ],
1106 other_values: [ "thin", "15px",
1107 /* valid -moz-calc() values */
1108 "-moz-calc(-2px)",
1109 "-moz-calc(2px)",
1110 "-moz-calc(3em)",
1111 "-moz-calc(3em + 2px)",
1112 "-moz-calc( 3em + 2px)",
1113 "-moz-calc(3em + 2px )",
1114 "-moz-calc( 3em + 2px )",
1115 "-moz-calc(3*25px)",
1116 "-moz-calc(3 *25px)",
1117 "-moz-calc(3 * 25px)",
1118 "-moz-calc(3* 25px)",
1119 "-moz-calc(25px*3)",
1120 "-moz-calc(25px *3)",
1121 "-moz-calc(25px* 3)",
1122 "-moz-calc(25px * 3)",
1123 "-moz-calc(25px * 3 / 4)",
1124 "-moz-calc((25px * 3) / 4)",
1125 "-moz-calc(25px * (3 / 4))",
1126 "-moz-calc(3 * 25px / 4)",
1127 "-moz-calc((3 * 25px) / 4)",
1128 "-moz-calc(3 * (25px / 4))",
1129 "-moz-calc(3em + 25px * 3 / 4)",
1130 "-moz-calc(3em + (25px * 3) / 4)",
1131 "-moz-calc(3em + 25px * (3 / 4))",
1132 "-moz-calc(25px * 3 / 4 + 3em)",
1133 "-moz-calc((25px * 3) / 4 + 3em)",
1134 "-moz-calc(25px * (3 / 4) + 3em)",
1135 "-moz-calc(3em + (25px * 3 / 4))",
1136 "-moz-calc(3em + ((25px * 3) / 4))",
1137 "-moz-calc(3em + (25px * (3 / 4)))",
1138 "-moz-calc((25px * 3 / 4) + 3em)",
1139 "-moz-calc(((25px * 3) / 4) + 3em)",
1140 "-moz-calc((25px * (3 / 4)) + 3em)",
1141 "-moz-calc(3*25px + 1in)",
1142 "-moz-calc(1in - 3em + 2px)",
1143 "-moz-calc(1in - (3em + 2px))",
1144 "-moz-calc((1in - 3em) + 2px)",
1145 "-moz-calc(50px/2)",
1146 "-moz-calc(50px/(2 - 1))",
1147 "-moz-calc(-3px)",
1148 /* numeric reduction cases */
1149 "-moz-calc(5 * 3 * 2em)",
1150 "-moz-calc(2em * 5 * 3)",
1151 "-moz-calc((5 * 3) * 2em)",
1152 "-moz-calc(2em * (5 * 3))",
1153 "-moz-calc((5 + 3) * 2em)",
1154 "-moz-calc(2em * (5 + 3))",
1155 "-moz-calc(2em / (5 + 3))",
1156 "-moz-calc(2em * (5*2 + 3))",
1157 "-moz-calc(2em * ((5*2) + 3))",
1158 "-moz-calc(2em * (5*(2 + 3)))",
1159
1160 "-moz-calc((5 + 7) * 3em)",
1161 "-moz-calc((5em + 3em) - 2em)",
1162 "-moz-calc((5em - 3em) + 2em)",
1163 "-moz-calc(2em - (5em - 3em))",
1164 "-moz-calc(2em + (5em - 3em))",
1165 "-moz-calc(2em - (5em + 3em))",
1166 "-moz-calc(2em + (5em + 3em))",
1167 "-moz-calc(2em + 5em - 3em)",
1168 "-moz-calc(2em - 5em - 3em)",
1169 "-moz-calc(2em + 5em + 3em)",
1170 "-moz-calc(2em - 5em + 3em)",
1171
1172 "-moz-calc(2em / 4 * 3)",
1173 "-moz-calc(2em * 4 / 3)",
1174 "-moz-calc(2em * 4 * 3)",
1175 "-moz-calc(2em / 4 / 3)",
1176 "-moz-calc(4 * 2em / 3)",
1177 "-moz-calc(4 / 3 * 2em)",
1178
1179 "-moz-calc((2em / 4) * 3)",
1180 "-moz-calc((2em * 4) / 3)",
1181 "-moz-calc((2em * 4) * 3)",
1182 "-moz-calc((2em / 4) / 3)",
1183 "-moz-calc((4 * 2em) / 3)",
1184 "-moz-calc((4 / 3) * 2em)",
1185
1186 "-moz-calc(2em / (4 * 3))",
1187 "-moz-calc(2em * (4 / 3))",
1188 "-moz-calc(2em * (4 * 3))",
1189 "-moz-calc(2em / (4 / 3))",
1190 "-moz-calc(4 * (2em / 3))",
1191
1192 // Valid cases with unitless zero (which is never
1193 // a length).
1194 "-moz-calc(0 * 2em)",
1195 "-moz-calc(2em * 0)",
1196 "-moz-calc(3em + 0 * 2em)",
1197 "-moz-calc(3em + 2em * 0)",
1198 "-moz-calc((0 + 2) * 2em)",
1199 "-moz-calc((2 + 0) * 2em)",
1200 // And test zero lengths while we're here.
1201 "-moz-calc(2 * 0px)",
1202 "-moz-calc(0 * 0px)",
1203 "-moz-calc(2 * 0em)",
1204 "-moz-calc(0 * 0em)",
1205 "-moz-calc(0px * 0)",
1206 "-moz-calc(0px * 2)",
1207
1208 /* valid calc() values */
1209 "calc(-2px)",
1210 "calc(2px)",
1211 "calc(3em)",
1212 "calc(3em + 2px)",
1213 "calc( 3em + 2px)",
1214 "calc(3em + 2px )",
1215 "calc( 3em + 2px )",
1216 "calc(3*25px)",
1217 "calc(3 *25px)",
1218 "calc(3 * 25px)",
1219 "calc(3* 25px)",
1220 "calc(25px*3)",
1221 "calc(25px *3)",
1222 "calc(25px* 3)",
1223 "calc(25px * 3)",
1224 "calc(25px * 3 / 4)",
1225 "calc((25px * 3) / 4)",
1226 "calc(25px * (3 / 4))",
1227 "calc(3 * 25px / 4)",
1228 "calc((3 * 25px) / 4)",
1229 "calc(3 * (25px / 4))",
1230 "calc(3em + 25px * 3 / 4)",
1231 "calc(3em + (25px * 3) / 4)",
1232 "calc(3em + 25px * (3 / 4))",
1233 "calc(25px * 3 / 4 + 3em)",
1234 "calc((25px * 3) / 4 + 3em)",
1235 "calc(25px * (3 / 4) + 3em)",
1236 "calc(3em + (25px * 3 / 4))",
1237 "calc(3em + ((25px * 3) / 4))",
1238 "calc(3em + (25px * (3 / 4)))",
1239 "calc((25px * 3 / 4) + 3em)",
1240 "calc(((25px * 3) / 4) + 3em)",
1241 "calc((25px * (3 / 4)) + 3em)",
1242 "calc(3*25px + 1in)",
1243 "calc(1in - 3em + 2px)",
1244 "calc(1in - (3em + 2px))",
1245 "calc((1in - 3em) + 2px)",
1246 "calc(50px/2)",
1247 "calc(50px/(2 - 1))",
1248 "calc(-3px)",
1249 /* numeric reduction cases */
1250 "calc(5 * 3 * 2em)",
1251 "calc(2em * 5 * 3)",
1252 "calc((5 * 3) * 2em)",
1253 "calc(2em * (5 * 3))",
1254 "calc((5 + 3) * 2em)",
1255 "calc(2em * (5 + 3))",
1256 "calc(2em / (5 + 3))",
1257 "calc(2em * (5*2 + 3))",
1258 "calc(2em * ((5*2) + 3))",
1259 "calc(2em * (5*(2 + 3)))",
1260
1261 "calc((5 + 7) * 3em)",
1262 "calc((5em + 3em) - 2em)",
1263 "calc((5em - 3em) + 2em)",
1264 "calc(2em - (5em - 3em))",
1265 "calc(2em + (5em - 3em))",
1266 "calc(2em - (5em + 3em))",
1267 "calc(2em + (5em + 3em))",
1268 "calc(2em + 5em - 3em)",
1269 "calc(2em - 5em - 3em)",
1270 "calc(2em + 5em + 3em)",
1271 "calc(2em - 5em + 3em)",
1272
1273 "calc(2em / 4 * 3)",
1274 "calc(2em * 4 / 3)",
1275 "calc(2em * 4 * 3)",
1276 "calc(2em / 4 / 3)",
1277 "calc(4 * 2em / 3)",
1278 "calc(4 / 3 * 2em)",
1279
1280 "calc((2em / 4) * 3)",
1281 "calc((2em * 4) / 3)",
1282 "calc((2em * 4) * 3)",
1283 "calc((2em / 4) / 3)",
1284 "calc((4 * 2em) / 3)",
1285 "calc((4 / 3) * 2em)",
1286
1287 "calc(2em / (4 * 3))",
1288 "calc(2em * (4 / 3))",
1289 "calc(2em * (4 * 3))",
1290 "calc(2em / (4 / 3))",
1291 "calc(4 * (2em / 3))",
1292
1293 // Valid cases with unitless zero (which is never
1294 // a length).
1295 "calc(0 * 2em)",
1296 "calc(2em * 0)",
1297 "calc(3em + 0 * 2em)",
1298 "calc(3em + 2em * 0)",
1299 "calc((0 + 2) * 2em)",
1300 "calc((2 + 0) * 2em)",
1301 // And test zero lengths while we're here.
1302 "calc(2 * 0px)",
1303 "calc(0 * 0px)",
1304 "calc(2 * 0em)",
1305 "calc(0 * 0em)",
1306 "calc(0px * 0)",
1307 "calc(0px * 2)",
1308
1309 ],
1310 invalid_values: [ "20", "-1px", "red", "50%",
1311 /* invalid -moz-calc() values */
1312 "-moz-calc(2em+ 2px)",
1313 "-moz-calc(2em +2px)",
1314 "-moz-calc(2em+2px)",
1315 "-moz-calc(2em- 2px)",
1316 "-moz-calc(2em -2px)",
1317 "-moz-calc(2em-2px)",
1318 /* invalid calc() values */
1319 "calc(2em+ 2px)",
1320 "calc(2em +2px)",
1321 "calc(2em+2px)",
1322 "calc(2em- 2px)",
1323 "calc(2em -2px)",
1324 "calc(2em-2px)",
1325 "-moz-min()",
1326 "calc(min())",
1327 "-moz-max()",
1328 "calc(max())",
1329 "-moz-min(5px)",
1330 "calc(min(5px))",
1331 "-moz-max(5px)",
1332 "calc(max(5px))",
1333 "-moz-min(5px,2em)",
1334 "calc(min(5px,2em))",
1335 "-moz-max(5px,2em)",
1336 "calc(max(5px,2em))",
1337 "calc(50px/(2 - 2))",
1338 "calc(5 + 5)",
1339 "calc(5 * 5)",
1340 "calc(5em * 5em)",
1341 "calc(5em / 5em * 5em)",
1342
1343 "calc(4 * 3 / 2em)",
1344 "calc((4 * 3) / 2em)",
1345 "calc(4 * (3 / 2em))",
1346 "calc(4 / (3 * 2em))",
1347
1348 // Tests for handling of unitless zero, which cannot
1349 // be a length inside calc().
1350 "calc(0)",
1351 "calc(0 + 2em)",
1352 "calc(2em + 0)",
1353 "calc(0 * 2)",
1354 "calc(2 * 0)",
1355 "calc(1 * (2em + 0))",
1356 "calc((2em + 0))",
1357 "calc((2em + 0) * 1)",
1358 "calc(1 * (0 + 2em))",
1359 "calc((0 + 2em))",
1360 "calc((0 + 2em) * 1)",
1361 ]
1362 },
1363 "-moz-column-rule-style": {
1364 domProp: "MozColumnRuleStyle",
1365 inherited: false,
1366 type: CSS_TYPE_LONGHAND,
1367 initial_values: [ "none" ],
1368 other_values: [ "solid", "hidden", "ridge", "groove", "inset", "outset", "double", "dotted", "dashed" ],
1369 invalid_values: [ "20", "foo" ]
1370 },
1371 "-moz-column-rule-color": {
1372 domProp: "MozColumnRuleColor",
1373 inherited: false,
1374 type: CSS_TYPE_LONGHAND,
1375 prerequisites: { "color": "green" },
1376 initial_values: [ "currentColor", "-moz-use-text-color" ],
1377 other_values: [ "red", "blue", "#ffff00" ],
1378 invalid_values: [ "ffff00" ]
1379 },
1380 "-moz-column-width": {
1381 domProp: "MozColumnWidth",
1382 inherited: false,
1383 type: CSS_TYPE_LONGHAND,
1384 initial_values: [ "auto" ],
1385 other_values: [
1386 "15px",
1387 "calc(15px)",
1388 "calc(30px - 3em)",
1389 "calc(-15px)",
1390 "0px",
1391 "calc(0px)"
1392 ],
1393 invalid_values: [ "20", "-1px", "50%" ]
1394 },
1395 "-moz-float-edge": {
1396 domProp: "MozFloatEdge",
1397 inherited: false,
1398 type: CSS_TYPE_LONGHAND,
1399 initial_values: [ "content-box" ],
1400 other_values: [ "margin-box" ],
1401 invalid_values: [ "content", "padding", "border", "margin" ]
1402 },
1403 "-moz-force-broken-image-icon": {
1404 domProp: "MozForceBrokenImageIcon",
1405 inherited: false,
1406 type: CSS_TYPE_LONGHAND,
1407 initial_values: [ "0" ],
1408 other_values: [ "1" ],
1409 invalid_values: []
1410 },
1411 "-moz-image-region": {
1412 domProp: "MozImageRegion",
1413 inherited: true,
1414 type: CSS_TYPE_LONGHAND,
1415 initial_values: [ "auto" ],
1416 other_values: [ "rect(3px 20px 15px 4px)", "rect(17px, 21px, 33px, 2px)" ],
1417 invalid_values: [ "rect(17px, 21px, 33, 2px)" ]
1418 },
1419 "-moz-margin-end": {
1420 domProp: "MozMarginEnd",
1421 inherited: false,
1422 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
1423 get_computed: logical_box_prop_get_computed,
1424 /* no subproperties */
1425 /* auto may or may not be initial */
1426 initial_values: [ "0", "0px", "0%", "0em", "0ex", "calc(0pt)", "calc(0% + 0px)" ],
1427 other_values: [ "1px", "3em",
1428 "calc(2px)",
1429 "calc(-2px)",
1430 "calc(50%)",
1431 "calc(3*25px)",
1432 "calc(25px*3)",
1433 "calc(3*25px + 50%)",
1434 ],
1435 invalid_values: [ "5" ]
1436 },
1437 "-moz-margin-start": {
1438 domProp: "MozMarginStart",
1439 inherited: false,
1440 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
1441 get_computed: logical_box_prop_get_computed,
1442 /* no subproperties */
1443 /* auto may or may not be initial */
1444 initial_values: [ "0", "0px", "0%", "0em", "0ex", "calc(0pt)", "calc(0% + 0px)" ],
1445 other_values: [ "1px", "3em",
1446 "calc(2px)",
1447 "calc(-2px)",
1448 "calc(50%)",
1449 "calc(3*25px)",
1450 "calc(25px*3)",
1451 "calc(3*25px + 50%)",
1452 ],
1453 invalid_values: [ "5" ]
1454 },
1455 "-moz-outline-radius": {
1456 domProp: "MozOutlineRadius",
1457 inherited: false,
1458 type: CSS_TYPE_TRUE_SHORTHAND,
1459 prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"},
1460 subproperties: [ "-moz-outline-radius-bottomleft", "-moz-outline-radius-bottomright", "-moz-outline-radius-topleft", "-moz-outline-radius-topright" ],
1461 initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)", "calc(0px) calc(0pt) calc(0%) calc(0em)" ],
1462 other_values: [ "3%", "1px", "2em", "3em 2px", "2pt 3% 4em", "2px 2px 2px 2px", // circular
1463 "3% / 2%", "1px / 4px", "2em / 1em", "3em 2px / 2px 3em", "2pt 3% 4em / 4pt 1% 5em", "2px 2px 2px 2px / 4px 4px 4px 4px", "1pt / 2pt 3pt", "4pt 5pt / 3pt", // elliptical
1464 "calc(2px)",
1465 "calc(50%)",
1466 "calc(3*25px)",
1467 "calc(3*25px) 5px",
1468 "5px calc(3*25px)",
1469 "calc(20%) calc(3*25px)",
1470 "calc(25px*3)",
1471 "calc(3*25px + 50%)",
1472 "2px 2px calc(2px + 1%) 2px",
1473 "1px 2px 2px 2px / 2px 2px calc(2px + 1%) 2px",
1474 ],
1475 invalid_values: [ "2px -2px", "inherit 2px", "inherit / 2px", "2px inherit", "2px / inherit", "2px 2px 2px 2px 2px", "1px / 2px 2px 2px 2px 2px", "2", "2 2", "2px 2px 2px 2px / 2px 2px 2 2px" ]
1476 },
1477 "-moz-outline-radius-bottomleft": {
1478 domProp: "MozOutlineRadiusBottomleft",
1479 inherited: false,
1480 type: CSS_TYPE_LONGHAND,
1481 prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"},
1482 initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)", "calc(0px)" ],
1483 other_values: [ "3%", "1px", "2em", // circular
1484 "3% 2%", "1px 4px", "2em 2pt", // elliptical
1485 "calc(2px)",
1486 "calc(50%)",
1487 "calc(3*25px)",
1488 "calc(3*25px) 5px",
1489 "5px calc(3*25px)",
1490 "calc(20%) calc(3*25px)",
1491 "calc(25px*3)",
1492 "calc(3*25px + 50%)",
1493 ],
1494 invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ]
1495 },
1496 "-moz-outline-radius-bottomright": {
1497 domProp: "MozOutlineRadiusBottomright",
1498 inherited: false,
1499 type: CSS_TYPE_LONGHAND,
1500 prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"},
1501 initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)", "calc(0px)" ],
1502 other_values: [ "3%", "1px", "2em", // circular
1503 "3% 2%", "1px 4px", "2em 2pt", // elliptical
1504 "calc(2px)",
1505 "calc(50%)",
1506 "calc(3*25px)",
1507 "calc(3*25px) 5px",
1508 "5px calc(3*25px)",
1509 "calc(20%) calc(3*25px)",
1510 "calc(25px*3)",
1511 "calc(3*25px + 50%)",
1512 ],
1513 invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ]
1514 },
1515 "-moz-outline-radius-topleft": {
1516 domProp: "MozOutlineRadiusTopleft",
1517 inherited: false,
1518 type: CSS_TYPE_LONGHAND,
1519 prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"},
1520 initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)", "calc(0px)" ],
1521 other_values: [ "3%", "1px", "2em", // circular
1522 "3% 2%", "1px 4px", "2em 2pt", // elliptical
1523 "calc(2px)",
1524 "calc(50%)",
1525 "calc(3*25px)",
1526 "calc(3*25px) 5px",
1527 "5px calc(3*25px)",
1528 "calc(20%) calc(3*25px)",
1529 "calc(25px*3)",
1530 "calc(3*25px + 50%)",
1531 ],
1532 invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ]
1533 },
1534 "-moz-outline-radius-topright": {
1535 domProp: "MozOutlineRadiusTopright",
1536 inherited: false,
1537 type: CSS_TYPE_LONGHAND,
1538 prerequisites: { "width": "200px", "height": "100px", "display": "inline-block"},
1539 initial_values: [ "0", "0px", "0%", "calc(-2px)", "calc(-1%)", "calc(0px)" ],
1540 other_values: [ "3%", "1px", "2em", // circular
1541 "3% 2%", "1px 4px", "2em 2pt", // elliptical
1542 "calc(2px)",
1543 "calc(50%)",
1544 "calc(3*25px)",
1545 "calc(3*25px) 5px",
1546 "5px calc(3*25px)",
1547 "calc(20%) calc(3*25px)",
1548 "calc(25px*3)",
1549 "calc(3*25px + 50%)",
1550 ],
1551 invalid_values: [ "-1px", "4px -2px", "inherit 2px", "2px inherit", "2", "2px 2", "2 2px" ]
1552 },
1553 "-moz-padding-end": {
1554 domProp: "MozPaddingEnd",
1555 inherited: false,
1556 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
1557 get_computed: logical_box_prop_get_computed,
1558 /* no subproperties */
1559 initial_values: [ "0", "0px", "0%", "0em", "0ex", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ],
1560 other_values: [ "1px", "3em",
1561 "calc(2px)",
1562 "calc(50%)",
1563 "calc(3*25px)",
1564 "calc(25px*3)",
1565 "calc(3*25px + 50%)",
1566 ],
1567 invalid_values: [ "5" ]
1568 },
1569 "-moz-padding-start": {
1570 domProp: "MozPaddingStart",
1571 inherited: false,
1572 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
1573 get_computed: logical_box_prop_get_computed,
1574 /* no subproperties */
1575 initial_values: [ "0", "0px", "0%", "0em", "0ex", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ],
1576 other_values: [ "1px", "3em",
1577 "calc(2px)",
1578 "calc(50%)",
1579 "calc(3*25px)",
1580 "calc(25px*3)",
1581 "calc(3*25px + 50%)",
1582 ],
1583 invalid_values: [ "5" ]
1584 },
1585 "resize": {
1586 domProp: "resize",
1587 inherited: false,
1588 type: CSS_TYPE_LONGHAND,
1589 prerequisites: { "display": "block", "overflow": "auto" },
1590 initial_values: [ "none" ],
1591 other_values: [ "both", "horizontal", "vertical" ],
1592 invalid_values: []
1593 },
1594 "-moz-stack-sizing": {
1595 domProp: "MozStackSizing",
1596 inherited: false,
1597 type: CSS_TYPE_LONGHAND,
1598 initial_values: [ "stretch-to-fit" ],
1599 other_values: [ "ignore" ],
1600 invalid_values: []
1601 },
1602 "-moz-tab-size": {
1603 domProp: "MozTabSize",
1604 inherited: true,
1605 type: CSS_TYPE_LONGHAND,
1606 initial_values: [ "8" ],
1607 other_values: [ "0", "3", "99", "12000" ],
1608 invalid_values: [ "-1", "-808", "3.0", "17.5" ]
1609 },
1610 "-moz-text-size-adjust": {
1611 domProp: "MozTextSizeAdjust",
1612 inherited: true,
1613 type: CSS_TYPE_LONGHAND,
1614 initial_values: [ "auto" ],
1615 other_values: [ "none" ],
1616 invalid_values: [ "-5%", "0", "100", "0%", "50%", "100%", "220.3%" ]
1617 },
1618 "transform": {
1619 domProp: "transform",
1620 inherited: false,
1621 type: CSS_TYPE_LONGHAND,
1622 prerequisites: { "width": "300px", "height": "50px" },
1623 initial_values: [ "none" ],
1624 other_values: [ "translatex(1px)", "translatex(4em)",
1625 "translatex(-4px)", "translatex(3px)",
1626 "translatex(0px) translatex(1px) translatex(2px) translatex(3px) translatex(4px)",
1627 "translatey(4em)", "translate(3px)", "translate(10px, -3px)",
1628 "rotate(45deg)", "rotate(45grad)", "rotate(45rad)",
1629 "rotate(0.25turn)", "rotate(0)", "scalex(10)", "scaley(10)",
1630 "scale(10)", "scale(10, 20)", "skewx(30deg)", "skewx(0)",
1631 "skewy(0)", "skewx(30grad)", "skewx(30rad)", "skewx(0.08turn)",
1632 "skewy(30deg)", "skewy(30grad)", "skewy(30rad)", "skewy(0.08turn)",
1633 "rotate(45deg) scale(2, 1)", "skewx(45deg) skewx(-50grad)",
1634 "translate(0, 0) scale(1, 1) skewx(0) skewy(0) matrix(1, 0, 0, 1, 0, 0)",
1635 "translatex(50%)", "translatey(50%)", "translate(50%)",
1636 "translate(3%, 5px)", "translate(5px, 3%)",
1637 "matrix(1, 2, 3, 4, 5, 6)",
1638 /* valid calc() values */
1639 "translatex(calc(5px + 10%))",
1640 "translatey(calc(0.25 * 5px + 10% / 3))",
1641 "translate(calc(5px - 10% * 3))",
1642 "translate(calc(5px - 3 * 10%), 50px)",
1643 "translate(-50px, calc(5px - 10% * 3))",
1644 "translatez(1px)", "translatez(4em)", "translatez(-4px)",
1645 "translatez(0px)", "translatez(2px) translatez(5px)",
1646 "translate3d(3px, 4px, 5px)", "translate3d(2em, 3px, 1em)",
1647 "translatex(2px) translate3d(4px, 5px, 6px) translatey(1px)",
1648 "scale3d(4, 4, 4)", "scale3d(-2, 3, -7)", "scalez(4)",
1649 "scalez(-6)", "rotate3d(2, 3, 4, 45deg)",
1650 "rotate3d(-3, 7, 0, 12rad)", "rotatex(15deg)", "rotatey(-12grad)",
1651 "rotatez(72rad)", "rotatex(0.125turn)", "perspective(1000px)",
1652 "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)",
1653 ],
1654 invalid_values: ["1px", "#0000ff", "red", "auto",
1655 "translatex(1)", "translatey(1)", "translate(2)",
1656 "translate(-3, -4)",
1657 "translatex(1px 1px)", "translatex(translatex(1px))",
1658 "translatex(#0000ff)", "translatex(red)", "translatey()",
1659 "matrix(1px, 2px, 3px, 4px, 5px, 6px)", "scale(150%)",
1660 "skewx(red)", "matrix(1%, 0, 0, 0, 0px, 0px)",
1661 "matrix(0, 1%, 2, 3, 4px,5px)", "matrix(0, 1, 2%, 3, 4px, 5px)",
1662 "matrix(0, 1, 2, 3%, 4%, 5%)", "matrix(1, 2, 3, 4, 5px, 6%)",
1663 "matrix(1, 2, 3, 4, 5%, 6px)", "matrix(1, 2, 3, 4, 5%, 6%)",
1664 "matrix(1, 2, 3, 4, 5px, 6em)",
1665 /* invalid calc() values */
1666 "translatey(-moz-min(5px,10%))",
1667 "translatex(-moz-max(5px,10%))",
1668 "translate(10px, calc(min(5px,10%)))",
1669 "translate(calc(max(5px,10%)), 10%)",
1670 "matrix(1, 0, 0, 1, max(5px * 3), calc(10% - 3px))",
1671 "perspective(0px)", "perspective(-10px)", "matrix3d(dinosaur)",
1672 "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)",
1673 "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)",
1674 "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15%, 16)",
1675 "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16px)",
1676 "rotatey(words)", "rotatex(7)", "translate3d(3px, 4px, 1px, 7px)",
1677 "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13px, 14em, 15px, 16)",
1678 "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 20%, 10%, 15, 16)"
1679 ],
1680 },
1681 "transform-origin": {
1682 domProp: "transformOrigin",
1683 inherited: false,
1684 type: CSS_TYPE_LONGHAND,
1685 /* no subproperties */
1686 prerequisites: { "width": "10px", "height": "10px", "display": "block"},
1687 initial_values: [ "50% 50%", "center", "center center" ],
1688 other_values: [ "25% 25%", "6px 5px", "20% 3em", "0 0", "0in 1in",
1689 "top", "bottom","top left", "top right",
1690 "top center", "center left", "center right",
1691 "bottom left", "bottom right", "bottom center",
1692 "20% center", "6px center", "13in bottom",
1693 "left 50px", "right 13%", "center 40px",
1694 "calc(20px)",
1695 "calc(20px) 10px",
1696 "10px calc(20px)",
1697 "calc(20px) 25%",
1698 "25% calc(20px)",
1699 "calc(20px) calc(20px)",
1700 "calc(20px + 1em) calc(20px / 2)",
1701 "calc(20px + 50%) calc(50% - 10px)",
1702 "calc(-20px) calc(-50%)",
1703 "calc(-20%) calc(-50%)",
1704 "6px 5px 5px",
1705 "top center 10px"
1706 ],
1707 invalid_values: ["red", "auto", "none", "0.5 0.5", "40px #0000ff",
1708 "border", "center red", "right diagonal",
1709 "#00ffff bottom"]
1710 },
1711 "perspective-origin": {
1712 domProp: "perspectiveOrigin",
1713 inherited: false,
1714 type: CSS_TYPE_LONGHAND,
1715 /* no subproperties */
1716 prerequisites: { "width": "10px", "height": "10px", "display": "block"},
1717 initial_values: [ "50% 50%", "center", "center center" ],
1718 other_values: [ "25% 25%", "6px 5px", "20% 3em", "0 0", "0in 1in",
1719 "top", "bottom","top left", "top right",
1720 "top center", "center left", "center right",
1721 "bottom left", "bottom right", "bottom center",
1722 "20% center", "6px center", "13in bottom",
1723 "left 50px", "right 13%", "center 40px",
1724 "calc(20px)",
1725 "calc(20px) 10px",
1726 "10px calc(20px)",
1727 "calc(20px) 25%",
1728 "25% calc(20px)",
1729 "calc(20px) calc(20px)",
1730 "calc(20px + 1em) calc(20px / 2)",
1731 "calc(20px + 50%) calc(50% - 10px)",
1732 "calc(-20px) calc(-50%)",
1733 "calc(-20%) calc(-50%)" ],
1734 invalid_values: [ "red", "auto", "none", "0.5 0.5", "40px #0000ff",
1735 "border", "center red", "right diagonal",
1736 "#00ffff bottom"]
1737 },
1738 "perspective": {
1739 domProp: "perspective",
1740 inherited: false,
1741 type: CSS_TYPE_LONGHAND,
1742 initial_values: [ "none" ],
1743 other_values: [ "1000px", "500.2px" ],
1744 invalid_values: [ "pants", "200", "0", "-100px", "-27.2em", "0px" ]
1745 },
1746 "backface-visibility": {
1747 domProp: "backfaceVisibility",
1748 inherited: false,
1749 type: CSS_TYPE_LONGHAND,
1750 initial_values: [ "visible" ],
1751 other_values: [ "hidden" ],
1752 invalid_values: [ "collapse" ]
1753 },
1754 "transform-style": {
1755 domProp: "transformStyle",
1756 inherited: false,
1757 type: CSS_TYPE_LONGHAND,
1758 initial_values: [ "flat" ],
1759 other_values: [ "preserve-3d" ],
1760 invalid_values: []
1761 },
1762 "-moz-user-focus": {
1763 domProp: "MozUserFocus",
1764 inherited: true,
1765 type: CSS_TYPE_LONGHAND,
1766 initial_values: [ "none" ],
1767 other_values: [ "normal", "ignore", "select-all", "select-before", "select-after", "select-same", "select-menu" ],
1768 invalid_values: []
1769 },
1770 "-moz-user-input": {
1771 domProp: "MozUserInput",
1772 inherited: true,
1773 type: CSS_TYPE_LONGHAND,
1774 initial_values: [ "auto" ],
1775 other_values: [ "none", "enabled", "disabled" ],
1776 invalid_values: []
1777 },
1778 "-moz-user-modify": {
1779 domProp: "MozUserModify",
1780 inherited: true,
1781 type: CSS_TYPE_LONGHAND,
1782 initial_values: [ "read-only" ],
1783 other_values: [ "read-write", "write-only" ],
1784 invalid_values: []
1785 },
1786 "-moz-user-select": {
1787 domProp: "MozUserSelect",
1788 inherited: false,
1789 type: CSS_TYPE_LONGHAND,
1790 initial_values: [ "auto" ],
1791 other_values: [ "none", "text", "element", "elements", "all", "toggle", "tri-state", "-moz-all", "-moz-none" ],
1792 invalid_values: []
1793 },
1794 "-moz-window-shadow": {
1795 domProp: "MozWindowShadow",
1796 inherited: false,
1797 type: CSS_TYPE_LONGHAND,
1798 initial_values: [ "default" ],
1799 other_values: [ "none", "menu", "tooltip", "sheet" ],
1800 invalid_values: []
1801 },
1802 "background": {
1803 domProp: "background",
1804 inherited: false,
1805 type: CSS_TYPE_TRUE_SHORTHAND,
1806 subproperties: [ "background-attachment", "background-color", "background-image", "background-position", "background-repeat", "background-clip", "background-origin", "background-size" ],
1807 initial_values: [ "transparent", "none", "repeat", "scroll", "0% 0%", "top left", "left top", "0% 0% / auto", "top left / auto", "left top / auto", "0% 0% / auto auto",
1808 "transparent none", "top left none", "left top none", "none left top", "none top left", "none 0% 0%", "left top / auto none", "left top / auto auto none",
1809 "transparent none repeat scroll top left", "left top repeat none scroll transparent", "transparent none repeat scroll top left / auto", "left top / auto repeat none scroll transparent", "none repeat scroll 0% 0% / auto auto transparent" ],
1810 other_values: [
1811 /* without multiple backgrounds */
1812 "green",
1813 "none green repeat scroll left top",
1814 "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)",
1815 "repeat url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==') transparent left top scroll",
1816 "repeat-x",
1817 "repeat-y",
1818 "no-repeat",
1819 "none repeat-y transparent scroll 0% 0%",
1820 "fixed",
1821 "0% top transparent fixed repeat none",
1822 "top",
1823 "left",
1824 "50% 50%",
1825 "center",
1826 "top / 100px",
1827 "left / contain",
1828 "left / cover",
1829 "10px / 10%",
1830 "10em / calc(20px)",
1831 "top left / 100px 100px",
1832 "top left / 100px auto",
1833 "top left / 100px 10%",
1834 "top left / 100px calc(20px)",
1835 "bottom right scroll none transparent repeat",
1836 "50% transparent",
1837 "transparent 50%",
1838 "50%",
1839 "-moz-radial-gradient(10% bottom, #ffffff, black) scroll no-repeat",
1840 "-moz-linear-gradient(10px 10px -45deg, red, blue) repeat",
1841 "-moz-linear-gradient(10px 10px -0.125turn, red, blue) repeat",
1842 "-moz-repeating-radial-gradient(10% bottom, #ffffff, black) scroll no-repeat",
1843 "-moz-repeating-linear-gradient(10px 10px -45deg, red, blue) repeat",
1844 "-moz-element(#test) lime",
1845 /* multiple backgrounds */
1846 "url(404.png), url(404.png)",
1847 "url(404.png), url(404.png) transparent",
1848 "url(404.png), url(404.png) red",
1849 "repeat-x, fixed, none",
1850 "0% top url(404.png), url(404.png) 0% top",
1851 "fixed repeat-y top left url(404.png), repeat-x green",
1852 "url(404.png), -moz-linear-gradient(20px 20px -45deg, blue, green), -moz-element(#a) black",
1853 "top left / contain, bottom right / cover",
1854 /* test cases with clip+origin in the shorthand */
1855 "url(404.png) green padding-box",
1856 "url(404.png) border-box transparent",
1857 "content-box url(404.png) blue",
1858 "url(404.png) green padding-box padding-box",
1859 "url(404.png) green padding-box border-box",
1860 "content-box border-box url(404.png) blue",
1861 ],
1862 invalid_values: [
1863 /* mixes with keywords have to be in correct order */
1864 "50% left", "top 50%",
1865 /* no quirks mode colors */
1866 "-moz-radial-gradient(10% bottom, ffffff, black) scroll no-repeat",
1867 /* no quirks mode lengths */
1868 "-moz-linear-gradient(10 10px -45deg, red, blue) repeat",
1869 "-moz-linear-gradient(10px 10 -45deg, red, blue) repeat",
1870 "linear-gradient(red -99, yellow, green, blue 120%)",
1871 /* bug 258080: don't accept background-position separated */
1872 "left url(404.png) top", "top url(404.png) left",
1873 /* not allowed to have color in non-bottom layer */
1874 "url(404.png) transparent, url(404.png)",
1875 "url(404.png) red, url(404.png)",
1876 "url(404.png) transparent, url(404.png) transparent",
1877 "url(404.png) transparent red, url(404.png) transparent red",
1878 "url(404.png) red, url(404.png) red",
1879 "url(404.png) rgba(0, 0, 0, 0), url(404.png)",
1880 "url(404.png) rgb(255, 0, 0), url(404.png)",
1881 "url(404.png) rgba(0, 0, 0, 0), url(404.png) rgba(0, 0, 0, 0)",
1882 "url(404.png) rgba(0, 0, 0, 0) rgb(255, 0, 0), url(404.png) rgba(0, 0, 0, 0) rgb(255, 0, 0)",
1883 "url(404.png) rgb(255, 0, 0), url(404.png) rgb(255, 0, 0)",
1884 /* bug 513395: old syntax for gradients */
1885 "-moz-radial-gradient(10% bottom, 30px, 20px 20px, 10px, from(#ffffff), to(black)) scroll no-repeat",
1886 "-moz-linear-gradient(10px 10px, 20px 20px, from(red), to(blue)) repeat",
1887 /* clip and origin separated in the shorthand */
1888 "url(404.png) padding-box green border-box",
1889 "url(404.png) padding-box green padding-box",
1890 "transparent padding-box url(404.png) border-box",
1891 "transparent padding-box url(404.png) padding-box",
1892 ]
1893 },
1894 "background-attachment": {
1895 domProp: "backgroundAttachment",
1896 inherited: false,
1897 type: CSS_TYPE_LONGHAND,
1898 initial_values: [ "scroll" ],
1899 other_values: [ "fixed", "local", "scroll,scroll", "fixed, scroll", "scroll, fixed, local, scroll", "fixed, fixed" ],
1900 invalid_values: []
1901 },
1902 "background-clip": {
1903 /*
1904 * When we rename this to 'background-clip', we also
1905 * need to rename the values to match the spec.
1906 */
1907 domProp: "backgroundClip",
1908 inherited: false,
1909 type: CSS_TYPE_LONGHAND,
1910 initial_values: [ "border-box" ],
1911 other_values: [ "content-box", "padding-box", "border-box, padding-box", "padding-box, padding-box, padding-box", "border-box, border-box" ],
1912 invalid_values: [ "margin-box", "border-box border-box" ]
1913 },
1914 "background-color": {
1915 domProp: "backgroundColor",
1916 inherited: false,
1917 type: CSS_TYPE_LONGHAND,
1918 initial_values: [ "transparent", "rgba(255, 127, 15, 0)", "hsla(240, 97%, 50%, 0.0)", "rgba(0, 0, 0, 0)", "rgba(255,255,255,-3.7)" ],
1919 other_values: [ "green", "rgb(255, 0, 128)", "#fc2", "#96ed2a", "black", "rgba(255,255,0,3)", "hsl(240, 50%, 50%)", "rgb(50%, 50%, 50%)", "-moz-default-background-color" ],
1920 invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000", "rgb(100, 100.0, 100)" ],
1921 quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" },
1922 },
1923 "background-image": {
1924 domProp: "backgroundImage",
1925 inherited: false,
1926 type: CSS_TYPE_LONGHAND,
1927 initial_values: [ "none" ],
1928 other_values: [
1929 "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)", "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==')", 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
1930 "none, none",
1931 "none, none, none, none, none",
1932 "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), none",
1933 "none, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), none",
1934 "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)",
1935 ].concat(validGradientAndElementValues),
1936 invalid_values: [
1937 ].concat(invalidGradientAndElementValues),
1938 unbalanced_values: [
1939 ].concat(unbalancedGradientAndElementValues)
1940 },
1941 "background-origin": {
1942 domProp: "backgroundOrigin",
1943 inherited: false,
1944 type: CSS_TYPE_LONGHAND,
1945 initial_values: [ "padding-box" ],
1946 other_values: [ "border-box", "content-box", "border-box, padding-box", "padding-box, padding-box, padding-box", "border-box, border-box" ],
1947 invalid_values: [ "margin-box", "padding-box padding-box" ]
1948 },
1949 "background-position": {
1950 domProp: "backgroundPosition",
1951 inherited: false,
1952 type: CSS_TYPE_LONGHAND,
1953 initial_values: [ "top 0% left 0%", "top 0% left", "top left", "left top", "0% 0%", "0% top", "left 0%" ],
1954 other_values: [ "top", "left", "right", "bottom", "center", "center bottom", "bottom center", "center right", "right center", "center top", "top center", "center left", "left center", "right bottom", "bottom right", "50%", "top left, top left", "top left, top right", "top right, top left", "left top, 0% 0%", "10% 20%, 30%, 40%", "top left, bottom right", "right bottom, left top", "0%", "0px", "30px", "0%, 10%, 20%, 30%", "top, top, top, top, top",
1955 "calc(20px)",
1956 "calc(20px) 10px",
1957 "10px calc(20px)",
1958 "calc(20px) 25%",
1959 "25% calc(20px)",
1960 "calc(20px) calc(20px)",
1961 "calc(20px + 1em) calc(20px / 2)",
1962 "calc(20px + 50%) calc(50% - 10px)",
1963 "calc(-20px) calc(-50%)",
1964 "calc(-20%) calc(-50%)",
1965 "0px 0px",
1966 "right 20px top 60px",
1967 "right 20px bottom 60px",
1968 "left 20px top 60px",
1969 "left 20px bottom 60px",
1970 "right -50px top -50px",
1971 "left -50px bottom -50px",
1972 "right 20px top -50px",
1973 "right -20px top 50px",
1974 "right 3em bottom 10px",
1975 "bottom 3em right 10px",
1976 "top 3em right 10px",
1977 "left 15px",
1978 "10px top",
1979 "left top 15px",
1980 "left 10px top",
1981 "left 20%",
1982 "right 20%"
1983 ],
1984 invalid_values: [ "center 10px center 4px", "center 10px center",
1985 "top 20%", "bottom 20%", "50% left", "top 50%",
1986 "50% bottom 10%", "right 10% 50%", "left right",
1987 "top bottom", "left 10% right",
1988 "top 20px bottom 20px", "left left", "20 20" ]
1989 },
1990 "background-repeat": {
1991 domProp: "backgroundRepeat",
1992 inherited: false,
1993 type: CSS_TYPE_LONGHAND,
1994 initial_values: [ "repeat", "repeat repeat" ],
1995 other_values: [ "repeat-x", "repeat-y", "no-repeat",
1996 "repeat-x, repeat-x",
1997 "repeat, no-repeat",
1998 "repeat-y, no-repeat, repeat-y",
1999 "repeat, repeat, repeat",
2000 "repeat no-repeat",
2001 "no-repeat repeat",
2002 "no-repeat no-repeat",
2003 "repeat repeat, repeat repeat",
2004 ],
2005 invalid_values: [ "repeat repeat repeat",
2006 "repeat-x repeat-y",
2007 "repeat repeat-x",
2008 "repeat repeat-y",
2009 "repeat-x repeat",
2010 "repeat-y repeat" ]
2011 },
2012 "background-size": {
2013 domProp: "backgroundSize",
2014 inherited: false,
2015 type: CSS_TYPE_LONGHAND,
2016 initial_values: [ "auto", "auto auto" ],
2017 other_values: [ "contain", "cover", "100px auto", "auto 100px", "100% auto", "auto 100%", "25% 50px", "3em 40%",
2018 "calc(20px)",
2019 "calc(20px) 10px",
2020 "10px calc(20px)",
2021 "calc(20px) 25%",
2022 "25% calc(20px)",
2023 "calc(20px) calc(20px)",
2024 "calc(20px + 1em) calc(20px / 2)",
2025 "calc(20px + 50%) calc(50% - 10px)",
2026 "calc(-20px) calc(-50%)",
2027 "calc(-20%) calc(-50%)"
2028 ],
2029 invalid_values: [ "contain contain", "cover cover", "cover auto", "auto cover", "contain cover", "cover contain", "-5px 3px", "3px -5px", "auto -5px", "-5px auto", "5 3" ]
2030 },
2031 "border": {
2032 domProp: "border",
2033 inherited: false,
2034 type: CSS_TYPE_TRUE_SHORTHAND,
2035 subproperties: [ "border-bottom-color", "border-bottom-style", "border-bottom-width", "border-left-color", "border-left-style", "border-left-width", "border-right-color", "border-right-style", "border-right-width", "border-top-color", "border-top-style", "border-top-width", "-moz-border-top-colors", "-moz-border-right-colors", "-moz-border-bottom-colors", "-moz-border-left-colors", "border-image-source", "border-image-slice", "border-image-width", "border-image-outset", "border-image-repeat" ],
2036 initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor", "calc(4px - 1px) none" ],
2037 other_values: [ "solid", "medium solid", "green solid", "10px solid", "thick solid", "calc(2px) solid blue" ],
2038 invalid_values: [ "5%", "medium solid ff00ff", "5 solid green" ]
2039 },
2040 "border-bottom": {
2041 domProp: "borderBottom",
2042 inherited: false,
2043 type: CSS_TYPE_TRUE_SHORTHAND,
2044 subproperties: [ "border-bottom-color", "border-bottom-style", "border-bottom-width" ],
2045 initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ],
2046 other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ],
2047 invalid_values: [ "5%", "5", "5 solid green" ]
2048 },
2049 "border-bottom-color": {
2050 domProp: "borderBottomColor",
2051 inherited: false,
2052 type: CSS_TYPE_LONGHAND,
2053 prerequisites: { "color": "black" },
2054 initial_values: [ "currentColor", "-moz-use-text-color" ],
2055 other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ],
2056 invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000" ],
2057 quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" },
2058 },
2059 "border-bottom-style": {
2060 domProp: "borderBottomStyle",
2061 inherited: false,
2062 type: CSS_TYPE_LONGHAND,
2063 /* XXX hidden is sometimes the same as initial */
2064 initial_values: [ "none" ],
2065 other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ],
2066 invalid_values: []
2067 },
2068 "border-bottom-width": {
2069 domProp: "borderBottomWidth",
2070 inherited: false,
2071 type: CSS_TYPE_LONGHAND,
2072 prerequisites: { "border-bottom-style": "solid" },
2073 initial_values: [ "medium", "3px", "calc(4px - 1px)" ],
2074 other_values: [ "thin", "thick", "1px", "2em",
2075 "calc(2px)",
2076 "calc(-2px)",
2077 "calc(0em)",
2078 "calc(0px)",
2079 "calc(5em)",
2080 "calc(3*25px)",
2081 "calc(25px*3)",
2082 "calc(3*25px + 5em)",
2083 ],
2084 invalid_values: [ "5%" ],
2085 quirks_values: { "5": "5px" },
2086 },
2087 "border-collapse": {
2088 domProp: "borderCollapse",
2089 inherited: true,
2090 type: CSS_TYPE_LONGHAND,
2091 initial_values: [ "separate" ],
2092 other_values: [ "collapse" ],
2093 invalid_values: []
2094 },
2095 "border-color": {
2096 domProp: "borderColor",
2097 inherited: false,
2098 type: CSS_TYPE_TRUE_SHORTHAND,
2099 subproperties: [ "border-top-color", "border-right-color", "border-bottom-color", "border-left-color" ],
2100 initial_values: [ "currentColor", "currentColor currentColor", "currentColor currentColor currentColor", "currentColor currentColor currentcolor CURRENTcolor" ],
2101 other_values: [ "green", "currentColor green", "currentColor currentColor green", "currentColor currentColor currentColor green", "rgba(255,128,0,0.5)", "transparent" ],
2102 invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000" ],
2103 quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" },
2104 },
2105 "border-left": {
2106 domProp: "borderLeft",
2107 inherited: false,
2108 type: CSS_TYPE_TRUE_SHORTHAND,
2109 subproperties: [ "border-left-color", "border-left-style", "border-left-width" ],
2110 initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ],
2111 other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ],
2112 invalid_values: [ "5%", "5", "5 solid green" ]
2113 },
2114 "border-left-color": {
2115 domProp: "borderLeftColor",
2116 inherited: false,
2117 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
2118 prerequisites: { "color": "black" },
2119 initial_values: [ "currentColor", "-moz-use-text-color" ],
2120 other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ],
2121 invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000" ],
2122 quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" },
2123 },
2124 "border-left-style": {
2125 domProp: "borderLeftStyle",
2126 inherited: false,
2127 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
2128 /* XXX hidden is sometimes the same as initial */
2129 initial_values: [ "none" ],
2130 other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ],
2131 invalid_values: []
2132 },
2133 "border-left-width": {
2134 domProp: "borderLeftWidth",
2135 inherited: false,
2136 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
2137 prerequisites: { "border-left-style": "solid" },
2138 initial_values: [ "medium", "3px", "calc(4px - 1px)" ],
2139 other_values: [ "thin", "thick", "1px", "2em",
2140 "calc(2px)",
2141 "calc(-2px)",
2142 "calc(0em)",
2143 "calc(0px)",
2144 "calc(5em)",
2145 "calc(3*25px)",
2146 "calc(25px*3)",
2147 "calc(3*25px + 5em)",
2148 ],
2149 invalid_values: [ "5%" ],
2150 quirks_values: { "5": "5px" },
2151 },
2152 "border-right": {
2153 domProp: "borderRight",
2154 inherited: false,
2155 type: CSS_TYPE_TRUE_SHORTHAND,
2156 subproperties: [ "border-right-color", "border-right-style", "border-right-width" ],
2157 initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ],
2158 other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ],
2159 invalid_values: [ "5%", "5", "5 solid green" ]
2160 },
2161 "border-right-color": {
2162 domProp: "borderRightColor",
2163 inherited: false,
2164 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
2165 prerequisites: { "color": "black" },
2166 initial_values: [ "currentColor", "-moz-use-text-color" ],
2167 other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ],
2168 invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000" ],
2169 quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" },
2170 },
2171 "border-right-style": {
2172 domProp: "borderRightStyle",
2173 inherited: false,
2174 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
2175 /* XXX hidden is sometimes the same as initial */
2176 initial_values: [ "none" ],
2177 other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ],
2178 invalid_values: []
2179 },
2180 "border-right-width": {
2181 domProp: "borderRightWidth",
2182 inherited: false,
2183 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
2184 prerequisites: { "border-right-style": "solid" },
2185 initial_values: [ "medium", "3px", "calc(4px - 1px)" ],
2186 other_values: [ "thin", "thick", "1px", "2em",
2187 "calc(2px)",
2188 "calc(-2px)",
2189 "calc(0em)",
2190 "calc(0px)",
2191 "calc(5em)",
2192 "calc(3*25px)",
2193 "calc(25px*3)",
2194 "calc(3*25px + 5em)",
2195 ],
2196 invalid_values: [ "5%" ],
2197 quirks_values: { "5": "5px" },
2198 },
2199 "border-spacing": {
2200 domProp: "borderSpacing",
2201 inherited: true,
2202 type: CSS_TYPE_LONGHAND,
2203 initial_values: [ "0", "0 0", "0px", "0 0px", "calc(0px)", "calc(0px) calc(0em)", "calc(2em - 2em) calc(3px + 7px - 10px)", "calc(-5px)", "calc(-5px) calc(-5px)" ],
2204 other_values: [ "3px", "4em 2px", "4em 0", "0px 2px", "calc(7px)", "0 calc(7px)", "calc(7px) 0", "calc(0px) calc(7px)", "calc(7px) calc(0px)", "7px calc(0px)", "calc(0px) 7px", "7px calc(0px)", "3px calc(2em)" ],
2205 invalid_values: [ "0%", "0 0%", "-5px", "-5px -5px", "0 -5px", "-5px 0" ]
2206 },
2207 "border-style": {
2208 domProp: "borderStyle",
2209 inherited: false,
2210 type: CSS_TYPE_TRUE_SHORTHAND,
2211 subproperties: [ "border-top-style", "border-right-style", "border-bottom-style", "border-left-style" ],
2212 /* XXX hidden is sometimes the same as initial */
2213 initial_values: [ "none", "none none", "none none none", "none none none none" ],
2214 other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge", "none solid", "none none solid", "none none none solid", "groove none none none", "none ridge none none", "none none double none", "none none none dotted" ],
2215 invalid_values: []
2216 },
2217 "border-top": {
2218 domProp: "borderTop",
2219 inherited: false,
2220 type: CSS_TYPE_TRUE_SHORTHAND,
2221 subproperties: [ "border-top-color", "border-top-style", "border-top-width" ],
2222 initial_values: [ "none", "medium", "currentColor", "thin", "none medium currentcolor" ],
2223 other_values: [ "solid", "green", "medium solid", "green solid", "10px solid", "thick solid", "5px green none" ],
2224 invalid_values: [ "5%", "5", "5 solid green" ]
2225 },
2226 "border-top-color": {
2227 domProp: "borderTopColor",
2228 inherited: false,
2229 type: CSS_TYPE_LONGHAND,
2230 prerequisites: { "color": "black" },
2231 initial_values: [ "currentColor", "-moz-use-text-color" ],
2232 other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ],
2233 invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000" ],
2234 quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" },
2235 },
2236 "border-top-style": {
2237 domProp: "borderTopStyle",
2238 inherited: false,
2239 type: CSS_TYPE_LONGHAND,
2240 /* XXX hidden is sometimes the same as initial */
2241 initial_values: [ "none" ],
2242 other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ],
2243 invalid_values: []
2244 },
2245 "border-top-width": {
2246 domProp: "borderTopWidth",
2247 inherited: false,
2248 type: CSS_TYPE_LONGHAND,
2249 prerequisites: { "border-top-style": "solid" },
2250 initial_values: [ "medium", "3px", "calc(4px - 1px)" ],
2251 other_values: [ "thin", "thick", "1px", "2em",
2252 "calc(2px)",
2253 "calc(-2px)",
2254 "calc(0em)",
2255 "calc(0px)",
2256 "calc(5em)",
2257 "calc(3*25px)",
2258 "calc(25px*3)",
2259 "calc(3*25px + 5em)",
2260 ],
2261 invalid_values: [ "5%" ],
2262 quirks_values: { "5": "5px" },
2263 },
2264 "border-width": {
2265 domProp: "borderWidth",
2266 inherited: false,
2267 type: CSS_TYPE_TRUE_SHORTHAND,
2268 subproperties: [ "border-top-width", "border-right-width", "border-bottom-width", "border-left-width" ],
2269 prerequisites: { "border-style": "solid" },
2270 initial_values: [ "medium", "3px", "medium medium", "3px medium medium", "medium 3px medium medium", "calc(3px) 3px calc(5px - 2px) calc(2px - -1px)" ],
2271 other_values: [ "thin", "thick", "1px", "2em", "2px 0 0px 1em", "calc(2em)" ],
2272 invalid_values: [ "5%" ],
2273 quirks_values: { "5": "5px" },
2274 },
2275 "bottom": {
2276 domProp: "bottom",
2277 inherited: false,
2278 type: CSS_TYPE_LONGHAND,
2279 /* FIXME: run tests with multiple prerequisites */
2280 prerequisites: { "position": "relative" },
2281 /* XXX 0 may or may not be equal to auto */
2282 initial_values: [ "auto" ],
2283 other_values: [ "32px", "-3em", "12%",
2284 "calc(2px)",
2285 "calc(-2px)",
2286 "calc(50%)",
2287 "calc(3*25px)",
2288 "calc(25px*3)",
2289 "calc(3*25px + 50%)",
2290 ],
2291 invalid_values: [],
2292 quirks_values: { "5": "5px" },
2293 },
2294 "box-shadow": {
2295 domProp: "boxShadow",
2296 inherited: false,
2297 type: CSS_TYPE_LONGHAND,
2298 initial_values: [ "none" ],
2299 prerequisites: { "color": "blue" },
2300 other_values: [ "2px 2px", "2px 2px 1px", "2px 2px 2px 2px", "blue 3px 2px", "2px 2px 1px 5px green", "2px 2px red", "green 2px 2px 1px", "green 2px 2px, blue 1px 3px 4px", "currentColor 3px 3px", "blue 2px 2px, currentColor 1px 2px, 1px 2px 3px 2px orange", "3px 0 0 0", "inset 2px 2px 3px 4px black", "2px -2px green inset, 4px 4px 3px blue, inset 2px 2px",
2301 /* calc() values */
2302 "2px 2px calc(-5px)", /* clamped */
2303 "calc(3em - 2px) 2px green",
2304 "green calc(3em - 2px) 2px",
2305 "2px calc(2px + 0.2em)",
2306 "blue 2px calc(2px + 0.2em)",
2307 "2px calc(2px + 0.2em) blue",
2308 "calc(-2px) calc(-2px)",
2309 "-2px -2px",
2310 "calc(2px) calc(2px)",
2311 "calc(2px) calc(2px) calc(2px)",
2312 "calc(2px) calc(2px) calc(2px) calc(2px)"
2313 ],
2314 invalid_values: [ "3% 3%", "1px 1px 1px 1px 1px", "2px 2px, none", "red 2px 2px blue", "inherit, 2px 2px", "2px 2px, inherit", "2px 2px -5px", "inset 4px 4px black inset", "inset inherit", "inset none", "3 3", "3px 3", "3 3px", "3px 3px 3", "3px 3px 3px 3" ]
2315 },
2316 "caption-side": {
2317 domProp: "captionSide",
2318 inherited: true,
2319 type: CSS_TYPE_LONGHAND,
2320 initial_values: [ "top" ],
2321 other_values: [ "right", "left", "bottom", "top-outside", "bottom-outside" ],
2322 invalid_values: []
2323 },
2324 "clear": {
2325 domProp: "clear",
2326 inherited: false,
2327 type: CSS_TYPE_LONGHAND,
2328 initial_values: [ "none" ],
2329 other_values: [ "left", "right", "both" ],
2330 invalid_values: []
2331 },
2332 "clip": {
2333 domProp: "clip",
2334 inherited: false,
2335 type: CSS_TYPE_LONGHAND,
2336 initial_values: [ "auto" ],
2337 other_values: [ "rect(0 0 0 0)", "rect(auto,auto,auto,auto)", "rect(3px, 4px, 4em, 0)", "rect(auto, 3em, 4pt, 2px)", "rect(2px 3px 4px 5px)" ],
2338 invalid_values: [ "rect(auto, 3em, 2%, 5px)" ],
2339 quirks_values: { "rect(1, 2, 3, 4)": "rect(1px, 2px, 3px, 4px)" },
2340 },
2341 "color": {
2342 domProp: "color",
2343 inherited: true,
2344 type: CSS_TYPE_LONGHAND,
2345 /* XXX should test currentColor, but may or may not be initial */
2346 initial_values: [ "black", "#000", "-moz-default-color" ],
2347 other_values: [ "green", "#f3c", "#fed292", "rgba(45,300,12,2)", "transparent", "-moz-nativehyperlinktext", "rgba(255,128,0,0.5)" ],
2348 invalid_values: [ "#f", "#ff", "#ffff", "#fffff", "#fffffff", "#ffffffff", "#fffffffff" ],
2349 quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a", "fff": "#ffffff", "ffffff": "#ffffff", },
2350 },
2351 "content": {
2352 domProp: "content",
2353 inherited: false,
2354 type: CSS_TYPE_LONGHAND,
2355 /* XXX needs to be on pseudo-elements */
2356 initial_values: [ "normal", "none" ],
2357 other_values: [ '""', "''", '"hello"', "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)", "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==')", 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")', 'counter(foo)', 'counter(bar, upper-roman)', 'counters(foo, ".")', "counters(bar, '-', lower-greek)", "'-' counter(foo) '.'", "attr(title)", "open-quote", "close-quote", "no-open-quote", "no-close-quote", "close-quote attr(title) counters(foo, '.', upper-alpha)", "counter(foo, none)", "counters(bar, '.', none)", "attr(\\32)", "attr(\\2)", "attr(-\\2)", "attr(-\\32)", "counter(\\2)", "counters(\\32, '.')", "counter(-\\32, upper-roman)", "counters(-\\2, '-', lower-greek)", "counter(\\()", "counters(a\\+b, '.')", "counter(\\}, upper-alpha)", "-moz-alt-content" ],
2358 invalid_values: [ 'counters(foo)', 'counter(foo, ".")', 'attr("title")', "attr('title')", "attr(2)", "attr(-2)", "counter(2)", "counters(-2, '.')", "-moz-alt-content 'foo'", "'foo' -moz-alt-content" ]
2359 },
2360 "counter-increment": {
2361 domProp: "counterIncrement",
2362 inherited: false,
2363 type: CSS_TYPE_LONGHAND,
2364 initial_values: [ "none" ],
2365 other_values: [ "foo 1", "bar", "foo 3 bar baz 2", "\\32 1", "-\\32 1", "-c 1", "\\32 1", "-\\32 1", "\\2 1", "-\\2 1", "-c 1", "\\2 1", "-\\2 1", "-\\7f \\9e 1" ],
2366 invalid_values: [ "none foo", "none foo 3", "foo none", "foo 3 none" ],
2367 unbalanced_values: [ "foo 1 (" ]
2368 },
2369 "counter-reset": {
2370 domProp: "counterReset",
2371 inherited: false,
2372 type: CSS_TYPE_LONGHAND,
2373 initial_values: [ "none" ],
2374 other_values: [ "foo 1", "bar", "foo 3 bar baz 2", "\\32 1", "-\\32 1", "-c 1", "\\32 1", "-\\32 1", "\\2 1", "-\\2 1", "-c 1", "\\2 1", "-\\2 1", "-\\7f \\9e 1" ],
2375 invalid_values: [ "none foo", "none foo 3", "foo none", "foo 3 none" ]
2376 },
2377 "cursor": {
2378 domProp: "cursor",
2379 inherited: true,
2380 type: CSS_TYPE_LONGHAND,
2381 initial_values: [ "auto" ],
2382 other_values: [ "crosshair", "default", "pointer", "move", "e-resize", "ne-resize", "nw-resize", "n-resize", "se-resize", "sw-resize", "s-resize", "w-resize", "text", "wait", "help", "progress", "copy", "alias", "context-menu", "cell", "not-allowed", "col-resize", "row-resize", "no-drop", "vertical-text", "all-scroll", "nesw-resize", "nwse-resize", "ns-resize", "ew-resize", "none", "grab", "grabbing", "zoom-in", "zoom-out", "-moz-grab", "-moz-grabbing", "-moz-zoom-in", "-moz-zoom-out", "url(foo.png), move", "url(foo.png) 5 7, move", "url(foo.png) 12 3, url(bar.png), no-drop", "url(foo.png), url(bar.png) 7 2, wait", "url(foo.png) 3 2, url(bar.png) 7 9, pointer" ],
2383 invalid_values: [ "url(foo.png)", "url(foo.png) 5 5" ]
2384 },
2385 "direction": {
2386 domProp: "direction",
2387 inherited: true,
2388 type: CSS_TYPE_LONGHAND,
2389 initial_values: [ "ltr" ],
2390 other_values: [ "rtl" ],
2391 invalid_values: []
2392 },
2393 "display": {
2394 domProp: "display",
2395 inherited: false,
2396 type: CSS_TYPE_LONGHAND,
2397 initial_values: [ "inline" ],
2398 /* XXX none will really mess with other properties */
2399 prerequisites: { "float": "none", "position": "static" },
2400 other_values: [
2401 "block",
2402 "flex",
2403 "inline-flex",
2404 "list-item",
2405 "inline-block",
2406 "table",
2407 "inline-table",
2408 "table-row-group",
2409 "table-header-group",
2410 "table-footer-group",
2411 "table-row",
2412 "table-column-group",
2413 "table-column",
2414 "table-cell",
2415 "table-caption",
2416 "none"
2417 ],
2418 invalid_values: []
2419 },
2420 "empty-cells": {
2421 domProp: "emptyCells",
2422 inherited: true,
2423 type: CSS_TYPE_LONGHAND,
2424 initial_values: [ "show" ],
2425 other_values: [ "hide", "-moz-show-background" ],
2426 invalid_values: []
2427 },
2428 "float": {
2429 domProp: "cssFloat",
2430 inherited: false,
2431 type: CSS_TYPE_LONGHAND,
2432 initial_values: [ "none" ],
2433 other_values: [ "left", "right" ],
2434 invalid_values: []
2435 },
2436 "font": {
2437 domProp: "font",
2438 inherited: true,
2439 type: CSS_TYPE_TRUE_SHORTHAND,
2440 subproperties: [ "font-style", "font-variant", "font-weight", "font-size", "line-height", "font-family", "font-stretch", "font-size-adjust", "-moz-font-feature-settings", "-moz-font-language-override" ],
2441 initial_values: [ (gInitialFontFamilyIsSansSerif ? "medium sans-serif" : "medium serif") ],
2442 other_values: [ "large serif", "9px fantasy", "bold italic small-caps 24px/1.4 Times New Roman, serif", "small inherit roman", "small roman inherit",
2443 // system fonts
2444 "caption", "icon", "menu", "message-box", "small-caption", "status-bar",
2445 // Gecko-specific system fonts
2446 "-moz-window", "-moz-document", "-moz-desktop", "-moz-info", "-moz-dialog", "-moz-button", "-moz-pull-down-menu", "-moz-list", "-moz-field", "-moz-workspace",
2447 ],
2448 invalid_values: [ "9 fantasy", "-2px fantasy" ]
2449 },
2450 "font-family": {
2451 domProp: "fontFamily",
2452 inherited: true,
2453 type: CSS_TYPE_LONGHAND,
2454 initial_values: [ (gInitialFontFamilyIsSansSerif ? "sans-serif" : "serif") ],
2455 other_values: [ (gInitialFontFamilyIsSansSerif ? "serif" : "sans-serif"), "Times New Roman, serif", "'Times New Roman', serif", "cursive", "fantasy", "\\\"Times New Roman", "\"Times New Roman\"", "Times, \\\"Times New Roman", "Times, \"Times New Roman\"", "-no-such-font-installed", "inherit roman", "roman inherit", "Times, inherit roman", "inherit roman, Times", "roman inherit, Times", "Times, roman inherit" ],
2456 invalid_values: [ "\"Times New\" Roman", "\"Times New Roman\n", "Times, \"Times New Roman\n" ]
2457 },
2458 "-moz-font-feature-settings": {
2459 domProp: "MozFontFeatureSettings",
2460 inherited: true,
2461 type: CSS_TYPE_LONGHAND,
2462 initial_values: [ "normal" ],
2463 other_values: [
2464 "'liga' on", "'liga'", "\"liga\" 1", "'liga', 'clig' 1",
2465 "\"liga\" off", "\"liga\" 0", '"cv01" 3, "cv02" 4',
2466 '"cswh", "smcp" off, "salt" 4', '"cswh" 1, "smcp" off, "salt" 4',
2467 '"cswh" 0, \'blah\', "liga", "smcp" off, "salt" 4',
2468 '"liga" ,"smcp" 0 , "blah"'
2469 ],
2470 invalid_values: [
2471 'liga', 'liga 1', 'liga normal', '"liga" normal', 'normal liga',
2472 'normal "liga"', 'normal, "liga"', '"liga=1"', "'foobar' on",
2473 '"blahblah" 0', '"liga" 3.14', '"liga" 1 3.14', '"liga" 1 normal',
2474 '"liga" 1 off', '"liga" on off', '"liga" , 0 "smcp"', '"liga" "smcp"'
2475 ]
2476 },
2477 "-moz-font-language-override": {
2478 domProp: "MozFontLanguageOverride",
2479 inherited: true,
2480 type: CSS_TYPE_LONGHAND,
2481 initial_values: [ "normal" ],
2482 other_values: [ "'ENG'", "'TRK'", "\"TRK\"", "'N\\'Ko'" ],
2483 invalid_values: [ "TRK", "ja" ]
2484 },
2485 "font-size": {
2486 domProp: "fontSize",
2487 inherited: true,
2488 type: CSS_TYPE_LONGHAND,
2489 initial_values: [ "medium",
2490 "1rem",
2491 "calc(1rem)",
2492 "calc(0.75rem + 200% - 125% + 0.25rem - 75%)"
2493 ],
2494 other_values: [ "large", "2em", "50%", "xx-small", "36pt", "8px", "larger", "smaller",
2495 "0px",
2496 "0%",
2497 "calc(2em)",
2498 "calc(36pt + 75% + (30% + 2em + 2px))",
2499 "calc(-2em)",
2500 "calc(-50%)",
2501 "calc(-1px)"
2502 ],
2503 invalid_values: [ "-2em", "-50%", "-1px" ],
2504 quirks_values: { "5": "5px" },
2505 },
2506 "font-size-adjust": {
2507 domProp: "fontSizeAdjust",
2508 inherited: true,
2509 type: CSS_TYPE_LONGHAND,
2510 initial_values: [ "none" ],
2511 other_values: [ "0.3", "0.5", "0.7" ],
2512 invalid_values: []
2513 },
2514 "font-stretch": {
2515 domProp: "fontStretch",
2516 inherited: true,
2517 type: CSS_TYPE_LONGHAND,
2518 initial_values: [ "normal" ],
2519 other_values: [ "ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded" ],
2520 invalid_values: [ "narrower", "wider" ]
2521 },
2522 "font-style": {
2523 domProp: "fontStyle",
2524 inherited: true,
2525 type: CSS_TYPE_LONGHAND,
2526 initial_values: [ "normal" ],
2527 other_values: [ "italic", "oblique" ],
2528 invalid_values: []
2529 },
2530 "font-variant": {
2531 domProp: "fontVariant",
2532 inherited: true,
2533 type: CSS_TYPE_LONGHAND,
2534 initial_values: [ "normal" ],
2535 other_values: [ "small-caps" ],
2536 invalid_values: [ "small-caps normal" ]
2537 },
2538 "font-weight": {
2539 domProp: "fontWeight",
2540 inherited: true,
2541 type: CSS_TYPE_LONGHAND,
2542 initial_values: [ "normal", "400" ],
2543 other_values: [ "bold", "100", "200", "300", "500", "600", "700", "800", "900", "bolder", "lighter" ],
2544 invalid_values: [ "0", "100.0", "107", "399", "401", "699", "710", "1000" ]
2545 },
2546 "height": {
2547 domProp: "height",
2548 inherited: false,
2549 type: CSS_TYPE_LONGHAND,
2550 /* FIXME: test zero, and test calc clamping */
2551 initial_values: [ " auto" ],
2552 /* computed value tests for height test more with display:block */
2553 prerequisites: { "display": "block" },
2554 other_values: [ "15px", "3em", "15%",
2555 "calc(2px)",
2556 "calc(50%)",
2557 "calc(3*25px)",
2558 "calc(25px*3)",
2559 "calc(3*25px + 50%)",
2560 ],
2561 invalid_values: [ "none", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available" ],
2562 quirks_values: { "5": "5px" },
2563 },
2564 "ime-mode": {
2565 domProp: "imeMode",
2566 inherited: false,
2567 type: CSS_TYPE_LONGHAND,
2568 initial_values: [ "auto" ],
2569 other_values: [ "normal", "disabled", "active", "inactive" ],
2570 invalid_values: [ "none", "enabled", "1px" ]
2571 },
2572 "left": {
2573 domProp: "left",
2574 inherited: false,
2575 type: CSS_TYPE_LONGHAND,
2576 /* FIXME: run tests with multiple prerequisites */
2577 prerequisites: { "position": "relative" },
2578 /* XXX 0 may or may not be equal to auto */
2579 initial_values: [ "auto" ],
2580 other_values: [ "32px", "-3em", "12%",
2581 "calc(2px)",
2582 "calc(-2px)",
2583 "calc(50%)",
2584 "calc(3*25px)",
2585 "calc(25px*3)",
2586 "calc(3*25px + 50%)",
2587 ],
2588 invalid_values: [],
2589 quirks_values: { "5": "5px" },
2590 },
2591 "letter-spacing": {
2592 domProp: "letterSpacing",
2593 inherited: true,
2594 type: CSS_TYPE_LONGHAND,
2595 initial_values: [ "normal" ],
2596 other_values: [ "0", "0px", "1em", "2px", "-3px",
2597 "calc(0px)", "calc(1em)", "calc(1em + 3px)",
2598 "calc(15px / 2)", "calc(15px/2)", "calc(-3px)"
2599 ],
2600 invalid_values: [],
2601 quirks_values: { "5": "5px" },
2602 },
2603 "line-height": {
2604 domProp: "lineHeight",
2605 inherited: true,
2606 type: CSS_TYPE_LONGHAND,
2607 /*
2608 * Inheritance tests require consistent font size, since
2609 * getComputedStyle (which uses the CSS2 computed value, or
2610 * CSS2.1 used value) doesn't match what the CSS2.1 computed
2611 * value is. And they even require consistent font metrics for
2612 * computation of 'normal'. -moz-block-height requires height
2613 * on a block.
2614 */
2615 prerequisites: { "font-size": "19px", "font-size-adjust": "none", "font-family": "serif", "font-weight": "normal", "font-style": "normal", "height": "18px", "display": "block"},
2616 initial_values: [ "normal" ],
2617 other_values: [ "1.0", "1", "1em", "47px", "-moz-block-height" ],
2618 invalid_values: []
2619 },
2620 "list-style": {
2621 domProp: "listStyle",
2622 inherited: true,
2623 type: CSS_TYPE_TRUE_SHORTHAND,
2624 subproperties: [ "list-style-type", "list-style-position", "list-style-image" ],
2625 initial_values: [ "outside", "disc", "disc outside", "outside disc", "disc none", "none disc", "none disc outside", "none outside disc", "disc none outside", "disc outside none", "outside none disc", "outside disc none" ],
2626 other_values: [ "inside none", "none inside", "none none inside", "square", "none", "none none", "outside none none", "none outside none", "none none outside", "none outside", "outside none",
2627 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
2628 'none url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
2629 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") none',
2630 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") outside',
2631 'outside url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
2632 'outside none url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
2633 'outside url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") none',
2634 'none url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") outside',
2635 'none outside url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
2636 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") outside none',
2637 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") none outside'
2638 ],
2639 invalid_values: [ "outside outside", "disc disc", "unknown value", "none none none", "none disc url(404.png)", "none url(404.png) disc", "disc none url(404.png)", "disc url(404.png) none", "url(404.png) none disc", "url(404.png) disc none", "none disc outside url(404.png)" ]
2640 },
2641 "list-style-image": {
2642 domProp: "listStyleImage",
2643 inherited: true,
2644 type: CSS_TYPE_LONGHAND,
2645 initial_values: [ "none" ],
2646 other_values: [ 'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
2647 // Add some tests for interesting url() values here to test serialization, etc.
2648 "url(\'data:text/plain,\"\')",
2649 "url(\"data:text/plain,\'\")",
2650 "url(\'data:text/plain,\\\'\')",
2651 "url(\"data:text/plain,\\\"\")",
2652 "url(\'data:text/plain,\\\"\')",
2653 "url(\"data:text/plain,\\\'\")",
2654 "url(data:text/plain,\\\\)",
2655 ],
2656 invalid_values: []
2657 },
2658 "list-style-position": {
2659 domProp: "listStylePosition",
2660 inherited: true,
2661 type: CSS_TYPE_LONGHAND,
2662 initial_values: [ "outside" ],
2663 other_values: [ "inside" ],
2664 invalid_values: []
2665 },
2666 "list-style-type": {
2667 domProp: "listStyleType",
2668 inherited: true,
2669 type: CSS_TYPE_LONGHAND,
2670 initial_values: [ "disc" ],
2671 other_values: [ "none", "circle", "square",
2672 "decimal", "decimal-leading-zero",
2673 "lower-roman", "upper-roman", "lower-greek",
2674 "lower-alpha", "lower-latin", "upper-alpha", "upper-latin",
2675 "hebrew", "armenian", "georgian",
2676 "cjk-decimal", "cjk-ideographic",
2677 "hiragana", "katakana", "hiragana-iroha", "katakana-iroha",
2678 "japanese-informal", "japanese-formal", "korean-hangul-formal",
2679 "korean-hanja-informal", "korean-hanja-formal",
2680 "simp-chinese-informal", "simp-chinese-formal",
2681 "trad-chinese-informal", "trad-chinese-formal",
2682 "-moz-cjk-heavenly-stem", "-moz-cjk-earthly-branch",
2683 "-moz-trad-chinese-informal", "-moz-trad-chinese-formal",
2684 "-moz-simp-chinese-informal", "-moz-simp-chinese-formal",
2685 "-moz-japanese-informal", "-moz-japanese-formal",
2686 "-moz-arabic-indic", "-moz-persian", "-moz-urdu",
2687 "-moz-devanagari", "-moz-gurmukhi", "-moz-gujarati",
2688 "-moz-oriya", "-moz-kannada", "-moz-malayalam", "-moz-bengali",
2689 "-moz-tamil", "-moz-telugu", "-moz-thai", "-moz-lao",
2690 "-moz-myanmar", "-moz-khmer",
2691 "-moz-hangul", "-moz-hangul-consonant",
2692 "-moz-ethiopic-halehame", "-moz-ethiopic-numeric",
2693 "-moz-ethiopic-halehame-am",
2694 "-moz-ethiopic-halehame-ti-er", "-moz-ethiopic-halehame-ti-et"
2695 ],
2696 invalid_values: []
2697 },
2698 "margin": {
2699 domProp: "margin",
2700 inherited: false,
2701 type: CSS_TYPE_TRUE_SHORTHAND,
2702 subproperties: [ "margin-top", "margin-right", "margin-bottom", "margin-left" ],
2703 initial_values: [ "0", "0px 0 0em", "0% 0px 0em 0pt" ],
2704 other_values: [ "3px 0", "2em 4px 2pt", "1em 2em 3px 4px" ],
2705 invalid_values: [],
2706 quirks_values: { "5": "5px", "3px 6px 2 5px": "3px 6px 2px 5px" },
2707 },
2708 "margin-bottom": {
2709 domProp: "marginBottom",
2710 inherited: false,
2711 type: CSS_TYPE_LONGHAND,
2712 /* XXX testing auto has prerequisites */
2713 initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)" ],
2714 other_values: [ "1px", "2em", "5%",
2715 "calc(2px)",
2716 "calc(-2px)",
2717 "calc(50%)",
2718 "calc(3*25px)",
2719 "calc(25px*3)",
2720 "calc(3*25px + 50%)",
2721 ],
2722 invalid_values: [ ],
2723 quirks_values: { "5": "5px" },
2724 },
2725 "margin-left": {
2726 domProp: "marginLeft",
2727 inherited: false,
2728 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
2729 /* no subproperties */
2730 /* XXX testing auto has prerequisites */
2731 initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)" ],
2732 other_values: [ "1px", "2em", "5%", ".5px", "+32px", "+.789px", "-.328px", "+0.56px", "-0.974px", "237px", "-289px", "-056px", "1987.45px", "-84.32px",
2733 "calc(2px)",
2734 "calc(-2px)",
2735 "calc(50%)",
2736 "calc(3*25px)",
2737 "calc(25px*3)",
2738 "calc(3*25px + 50%)",
2739 ],
2740 invalid_values: [ "..25px", ".+5px", ".px", "-.px", "++5px", "-+4px", "+-3px", "--7px", "+-.6px", "-+.5px", "++.7px", "--.4px" ],
2741 quirks_values: { "5": "5px" },
2742 },
2743 "margin-right": {
2744 domProp: "marginRight",
2745 inherited: false,
2746 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
2747 /* no subproperties */
2748 /* XXX testing auto has prerequisites */
2749 initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)" ],
2750 other_values: [ "1px", "2em", "5%",
2751 "calc(2px)",
2752 "calc(-2px)",
2753 "calc(50%)",
2754 "calc(3*25px)",
2755 "calc(25px*3)",
2756 "calc(3*25px + 50%)",
2757 ],
2758 invalid_values: [ ],
2759 quirks_values: { "5": "5px" },
2760 },
2761 "margin-top": {
2762 domProp: "marginTop",
2763 inherited: false,
2764 type: CSS_TYPE_LONGHAND,
2765 /* XXX testing auto has prerequisites */
2766 initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)" ],
2767 other_values: [ "1px", "2em", "5%",
2768 "calc(2px)",
2769 "calc(-2px)",
2770 "calc(50%)",
2771 "calc(3*25px)",
2772 "calc(25px*3)",
2773 "calc(3*25px + 50%)",
2774 ],
2775 invalid_values: [ ],
2776 quirks_values: { "5": "5px" },
2777 },
2778 "marker-offset": {
2779 domProp: "markerOffset",
2780 inherited: false,
2781 type: CSS_TYPE_LONGHAND,
2782 initial_values: [ "auto" ],
2783 other_values: [ "6em", "-1px", "calc(0px)", "calc(3em + 2px - 4px)", "calc(-2em)" ],
2784 invalid_values: []
2785 },
2786 "marks": {
2787 /* XXX not a real property; applies only to page context */
2788 domProp: "marks",
2789 inherited: false,
2790 backend_only: true,
2791 type: CSS_TYPE_LONGHAND,
2792 initial_values: [ "none" ],
2793 other_values: [ "crop", "cross", "crop cross", "cross crop" ],
2794 invalid_values: [ "none none", "crop none", "none crop", "cross none", "none cross" ]
2795 },
2796 "max-height": {
2797 domProp: "maxHeight",
2798 inherited: false,
2799 type: CSS_TYPE_LONGHAND,
2800 prerequisites: { "display": "block" },
2801 initial_values: [ "none" ],
2802 other_values: [ "30px", "50%", "0",
2803 "calc(2px)",
2804 "calc(-2px)",
2805 "calc(0px)",
2806 "calc(50%)",
2807 "calc(3*25px)",
2808 "calc(25px*3)",
2809 "calc(3*25px + 50%)",
2810 ],
2811 invalid_values: [ "auto", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available", "5" ]
2812 },
2813 "max-width": {
2814 domProp: "maxWidth",
2815 inherited: false,
2816 type: CSS_TYPE_LONGHAND,
2817 prerequisites: { "display": "block" },
2818 initial_values: [ "none" ],
2819 other_values: [ "30px", "50%", "0", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available",
2820 "calc(2px)",
2821 "calc(-2px)",
2822 "calc(0px)",
2823 "calc(50%)",
2824 "calc(3*25px)",
2825 "calc(25px*3)",
2826 "calc(3*25px + 50%)",
2827 ],
2828 invalid_values: [ "auto", "5" ]
2829 },
2830 "min-height": {
2831 domProp: "minHeight",
2832 inherited: false,
2833 type: CSS_TYPE_LONGHAND,
2834 prerequisites: { "display": "block" },
2835 initial_values: [ "0", "calc(0em)", "calc(-2px)", "calc(-1%)" ],
2836 other_values: [ "30px", "50%",
2837 "calc(2px)",
2838 "calc(50%)",
2839 "calc(3*25px)",
2840 "calc(25px*3)",
2841 "calc(3*25px + 50%)",
2842 ],
2843 invalid_values: [ "auto", "none", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available", "5" ]
2844 },
2845 "min-width": {
2846 domProp: "minWidth",
2847 inherited: false,
2848 type: CSS_TYPE_LONGHAND,
2849 prerequisites: { "display": "block" },
2850 initial_values: [ "0", "calc(0em)", "calc(-2px)", "calc(-1%)" ],
2851 other_values: [ "30px", "50%", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available",
2852 "calc(2px)",
2853 "calc(50%)",
2854 "calc(3*25px)",
2855 "calc(25px*3)",
2856 "calc(3*25px + 50%)",
2857 ],
2858 invalid_values: [ "auto", "none", "5" ]
2859 },
2860
2861 "opacity": {
2862 domProp: "opacity",
2863 inherited: false,
2864 type: CSS_TYPE_LONGHAND,
2865 initial_values: [ "1", "17", "397.376", "3e1", "3e+1", "3e0", "3e+0", "3e-0" ],
2866 other_values: [ "0", "0.4", "0.0000", "-3", "3e-1" ],
2867 invalid_values: [ "0px", "1px" ]
2868 },
2869 "-moz-orient": {
2870 domProp: "MozOrient",
2871 inherited: false,
2872 type: CSS_TYPE_LONGHAND,
2873 initial_values: [ "auto" ],
2874 other_values: [ "horizontal", "vertical" ],
2875 invalid_values: [ "none" ]
2876 },
2877 "orphans": {
2878 domProp: "orphans",
2879 inherited: true,
2880 backend_only: true,
2881 type: CSS_TYPE_LONGHAND,
2882 // XXX requires display:block
2883 initial_values: [ "2" ],
2884 other_values: [ "1", "7" ],
2885 invalid_values: [ "0", "-1", "0px", "3px", "3e1" ]
2886 },
2887 "outline": {
2888 domProp: "outline",
2889 inherited: false,
2890 type: CSS_TYPE_TRUE_SHORTHAND,
2891 subproperties: [ "outline-color", "outline-style", "outline-width" ],
2892 initial_values: [
2893 "none", "medium", "thin",
2894 // XXX Should be invert, but currently currentcolor.
2895 //"invert", "none medium invert"
2896 "currentColor", "none medium currentcolor"
2897 ],
2898 other_values: [ "solid", "medium solid", "green solid", "10px solid", "thick solid" ],
2899 invalid_values: [ "5%", "5", "5 solid green" ]
2900 },
2901 "outline-color": {
2902 domProp: "outlineColor",
2903 inherited: false,
2904 type: CSS_TYPE_LONGHAND,
2905 prerequisites: { "color": "black" },
2906 initial_values: [ "currentColor", "-moz-use-text-color" ], // XXX should be invert
2907 other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ],
2908 invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000", "000000", "cc00ff" ]
2909 },
2910 "outline-offset": {
2911 domProp: "outlineOffset",
2912 inherited: false,
2913 type: CSS_TYPE_LONGHAND,
2914 initial_values: [ "0", "0px", "-0", "calc(0px)", "calc(3em + 2px - 2px - 3em)", "calc(-0em)" ],
2915 other_values: [ "-3px", "1em", "calc(3em)", "calc(7pt + 3 * 2em)", "calc(-3px)" ],
2916 invalid_values: [ "5%" ]
2917 },
2918 "outline-style": {
2919 domProp: "outlineStyle",
2920 inherited: false,
2921 type: CSS_TYPE_LONGHAND,
2922 // XXX Should 'hidden' be the same as initial?
2923 initial_values: [ "none" ],
2924 other_values: [ "solid", "dashed", "dotted", "double", "outset", "inset", "groove", "ridge" ],
2925 invalid_values: []
2926 },
2927 "outline-width": {
2928 domProp: "outlineWidth",
2929 inherited: false,
2930 type: CSS_TYPE_LONGHAND,
2931 prerequisites: { "outline-style": "solid" },
2932 initial_values: [ "medium", "3px", "calc(4px - 1px)" ],
2933 other_values: [ "thin", "thick", "1px", "2em",
2934 "calc(2px)",
2935 "calc(-2px)",
2936 "calc(0px)",
2937 "calc(0px)",
2938 "calc(5em)",
2939 "calc(3*25px)",
2940 "calc(25px*3)",
2941 "calc(3*25px + 5em)",
2942 ],
2943 invalid_values: [ "5%", "5" ]
2944 },
2945 "overflow": {
2946 domProp: "overflow",
2947 inherited: false,
2948 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
2949 prerequisites: { "display": "block" },
2950 subproperties: [ "overflow-x", "overflow-y" ],
2951 initial_values: [ "visible" ],
2952 other_values: [ "auto", "scroll", "hidden", "-moz-hidden-unscrollable", "-moz-scrollbars-none" ],
2953 invalid_values: []
2954 },
2955 "overflow-x": {
2956 domProp: "overflowX",
2957 inherited: false,
2958 type: CSS_TYPE_LONGHAND,
2959 prerequisites: { "display": "block", "overflow-y": "visible" },
2960 initial_values: [ "visible" ],
2961 other_values: [ "auto", "scroll", "hidden", "-moz-hidden-unscrollable" ],
2962 invalid_values: []
2963 },
2964 "overflow-y": {
2965 domProp: "overflowY",
2966 inherited: false,
2967 type: CSS_TYPE_LONGHAND,
2968 prerequisites: { "display": "block", "overflow-x": "visible" },
2969 initial_values: [ "visible" ],
2970 other_values: [ "auto", "scroll", "hidden", "-moz-hidden-unscrollable" ],
2971 invalid_values: []
2972 },
2973 "padding": {
2974 domProp: "padding",
2975 inherited: false,
2976 type: CSS_TYPE_TRUE_SHORTHAND,
2977 subproperties: [ "padding-top", "padding-right", "padding-bottom", "padding-left" ],
2978 initial_values: [ "0", "0px 0 0em", "0% 0px 0em 0pt", "calc(0px) calc(0em) calc(-2px) calc(-1%)" ],
2979 other_values: [ "3px 0", "2em 4px 2pt", "1em 2em 3px 4px" ],
2980 invalid_values: [],
2981 quirks_values: { "5": "5px", "3px 6px 2 5px": "3px 6px 2px 5px" },
2982 },
2983 "padding-bottom": {
2984 domProp: "paddingBottom",
2985 inherited: false,
2986 type: CSS_TYPE_LONGHAND,
2987 initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ],
2988 other_values: [ "1px", "2em", "5%",
2989 "calc(2px)",
2990 "calc(50%)",
2991 "calc(3*25px)",
2992 "calc(25px*3)",
2993 "calc(3*25px + 50%)",
2994 ],
2995 invalid_values: [ ],
2996 quirks_values: { "5": "5px" },
2997 },
2998 "padding-left": {
2999 domProp: "paddingLeft",
3000 inherited: false,
3001 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
3002 /* no subproperties */
3003 initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ],
3004 other_values: [ "1px", "2em", "5%",
3005 "calc(2px)",
3006 "calc(50%)",
3007 "calc(3*25px)",
3008 "calc(25px*3)",
3009 "calc(3*25px + 50%)",
3010 ],
3011 invalid_values: [ ],
3012 quirks_values: { "5": "5px" },
3013 },
3014 "padding-right": {
3015 domProp: "paddingRight",
3016 inherited: false,
3017 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
3018 /* no subproperties */
3019 initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ],
3020 other_values: [ "1px", "2em", "5%",
3021 "calc(2px)",
3022 "calc(50%)",
3023 "calc(3*25px)",
3024 "calc(25px*3)",
3025 "calc(3*25px + 50%)",
3026 ],
3027 invalid_values: [ ],
3028 quirks_values: { "5": "5px" },
3029 },
3030 "padding-top": {
3031 domProp: "paddingTop",
3032 inherited: false,
3033 type: CSS_TYPE_LONGHAND,
3034 initial_values: [ "0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)", "calc(-3px)", "calc(-1%)" ],
3035 other_values: [ "1px", "2em", "5%",
3036 "calc(2px)",
3037 "calc(50%)",
3038 "calc(3*25px)",
3039 "calc(25px*3)",
3040 "calc(3*25px + 50%)",
3041 ],
3042 invalid_values: [ ],
3043 quirks_values: { "5": "5px" },
3044 },
3045 "page": {
3046 domProp: "page",
3047 inherited: true,
3048 backend_only: true,
3049 type: CSS_TYPE_LONGHAND,
3050 initial_values: [ "auto" ],
3051 other_values: [ "foo", "bar" ],
3052 invalid_values: [ "3px" ]
3053 },
3054 "page-break-after": {
3055 domProp: "pageBreakAfter",
3056 inherited: false,
3057 type: CSS_TYPE_LONGHAND,
3058 initial_values: [ "auto" ],
3059 other_values: [ "always", "avoid", "left", "right" ],
3060 invalid_values: []
3061 },
3062 "page-break-before": {
3063 domProp: "pageBreakBefore",
3064 inherited: false,
3065 type: CSS_TYPE_LONGHAND,
3066 initial_values: [ "auto" ],
3067 other_values: [ "always", "avoid", "left", "right" ],
3068 invalid_values: []
3069 },
3070 "page-break-inside": {
3071 domProp: "pageBreakInside",
3072 inherited: false,
3073 type: CSS_TYPE_LONGHAND,
3074 initial_values: [ "auto" ],
3075 other_values: [ "avoid" ],
3076 invalid_values: [ "left", "right" ]
3077 },
3078 "pointer-events": {
3079 domProp: "pointerEvents",
3080 inherited: true,
3081 type: CSS_TYPE_LONGHAND,
3082 initial_values: [ "auto" ],
3083 other_values: [ "visiblePainted", "visibleFill", "visibleStroke", "visible",
3084 "painted", "fill", "stroke", "all", "none" ],
3085 invalid_values: []
3086 },
3087 "position": {
3088 domProp: "position",
3089 inherited: false,
3090 type: CSS_TYPE_LONGHAND,
3091 initial_values: [ "static" ],
3092 other_values: [ "relative", "absolute", "fixed" ],
3093 invalid_values: []
3094 },
3095 "quotes": {
3096 domProp: "quotes",
3097 inherited: true,
3098 type: CSS_TYPE_LONGHAND,
3099 initial_values: [ '"\u201C" "\u201D" "\u2018" "\u2019"',
3100 '"\\201C" "\\201D" "\\2018" "\\2019"' ],
3101 other_values: [ "none", "'\"' '\"'" ],
3102 invalid_values: []
3103 },
3104 "right": {
3105 domProp: "right",
3106 inherited: false,
3107 type: CSS_TYPE_LONGHAND,
3108 /* FIXME: run tests with multiple prerequisites */
3109 prerequisites: { "position": "relative" },
3110 /* XXX 0 may or may not be equal to auto */
3111 initial_values: [ "auto" ],
3112 other_values: [ "32px", "-3em", "12%",
3113 "calc(2px)",
3114 "calc(-2px)",
3115 "calc(50%)",
3116 "calc(3*25px)",
3117 "calc(25px*3)",
3118 "calc(3*25px + 50%)",
3119 ],
3120 invalid_values: [],
3121 quirks_values: { "5": "5px" },
3122 },
3123 "size": {
3124 /* XXX not a real property; applies only to page context */
3125 domProp: "size",
3126 inherited: false,
3127 backend_only: true,
3128 type: CSS_TYPE_LONGHAND,
3129 initial_values: [ "auto" ],
3130 other_values: [ "landscape", "portrait", "8.5in 11in", "14in 11in", "297mm 210mm", "21cm 29.7cm", "100mm" ],
3131 invalid_values: [
3132 // XXX spec unclear on 0s and negatives
3133 "100mm 100mm 100mm"
3134 ]
3135 },
3136 "table-layout": {
3137 domProp: "tableLayout",
3138 inherited: false,
3139 type: CSS_TYPE_LONGHAND,
3140 initial_values: [ "auto" ],
3141 other_values: [ "fixed" ],
3142 invalid_values: []
3143 },
3144 "text-align": {
3145 domProp: "textAlign",
3146 inherited: true,
3147 type: CSS_TYPE_LONGHAND,
3148 // don't know whether left and right are same as start
3149 initial_values: [ "start" ],
3150 other_values: [ "center", "justify", "end" ],
3151 invalid_values: [ "true", "true true" ]
3152 },
3153 "-moz-text-align-last": {
3154 domProp: "MozTextAlignLast",
3155 inherited: true,
3156 type: CSS_TYPE_LONGHAND,
3157 initial_values: [ "auto" ],
3158 other_values: [ "center", "justify", "start", "end", "left", "right" ],
3159 invalid_values: []
3160 },
3161 "text-decoration": {
3162 domProp: "textDecoration",
3163 inherited: false,
3164 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
3165 subproperties: [ "-moz-text-decoration-color", "-moz-text-decoration-line", "-moz-text-decoration-style" ],
3166 initial_values: [ "none" ],
3167 other_values: [ "underline", "overline", "line-through", "blink", "blink line-through underline", "underline overline line-through blink", "-moz-anchor-decoration", "blink -moz-anchor-decoration" ],
3168 invalid_values: [ "none none", "underline none", "none underline", "blink none", "none blink", "line-through blink line-through", "underline overline line-through blink none", "underline overline line-throuh blink blink",
3169 "underline red solid", "underline #ff0000", "solid underline", "red underline", "#ff0000 underline" ]
3170 },
3171 "-moz-text-decoration-color": {
3172 domProp: "MozTextDecorationColor",
3173 inherited: false,
3174 type: CSS_TYPE_LONGHAND,
3175 prerequisites: { "color": "black" },
3176 initial_values: [ "currentColor", "-moz-use-text-color" ],
3177 other_values: [ "green", "rgba(255,128,0,0.5)", "transparent" ],
3178 invalid_values: [ "#0", "#00", "#0000", "#00000", "#0000000", "#00000000", "#000000000", "000000", "ff00ff" ]
3179 },
3180 "-moz-text-decoration-line": {
3181 domProp: "MozTextDecorationLine",
3182 inherited: false,
3183 type: CSS_TYPE_LONGHAND,
3184 initial_values: [ "none" ],
3185 other_values: [ "underline", "overline", "line-through", "blink", "blink line-through underline", "underline overline line-through blink", "-moz-anchor-decoration", "blink -moz-anchor-decoration" ],
3186 invalid_values: [ "none none", "underline none", "none underline", "line-through blink line-through", "underline overline line-through blink none", "underline overline line-throuh blink blink" ]
3187 },
3188 "-moz-text-decoration-style": {
3189 domProp: "MozTextDecorationStyle",
3190 inherited: false,
3191 type: CSS_TYPE_LONGHAND,
3192 initial_values: [ "solid" ],
3193 other_values: [ "double", "dotted", "dashed", "wavy", "-moz-none" ],
3194 invalid_values: [ "none", "groove", "ridge", "inset", "outset", "solid dashed", "wave" ]
3195 },
3196 "text-indent": {
3197 domProp: "textIndent",
3198 inherited: true,
3199 type: CSS_TYPE_LONGHAND,
3200 initial_values: [ "0", "calc(3em - 5em + 2px + 2em - 2px)" ],
3201 other_values: [ "2em", "5%", "-10px",
3202 "calc(2px)",
3203 "calc(-2px)",
3204 "calc(50%)",
3205 "calc(3*25px)",
3206 "calc(25px*3)",
3207 "calc(3*25px + 50%)",
3208 ],
3209 invalid_values: [ "5" ]
3210 },
3211 "text-overflow": {
3212 domProp: "textOverflow",
3213 inherited: false,
3214 type: CSS_TYPE_LONGHAND,
3215 initial_values: [ "clip" ],
3216 other_values: [ "ellipsis", '""', "''", '"hello"', 'clip clip', 'ellipsis ellipsis', 'clip ellipsis', 'clip ""', '"hello" ""', '"" ellipsis' ],
3217 invalid_values: [ "none", "auto", '"hello" inherit', 'inherit "hello"', 'clip initial', 'initial clip', 'initial inherit', 'inherit initial', 'inherit none']
3218 },
3219 "text-shadow": {
3220 domProp: "textShadow",
3221 inherited: true,
3222 type: CSS_TYPE_LONGHAND,
3223 prerequisites: { "color": "blue" },
3224 initial_values: [ "none" ],
3225 other_values: [ "2px 2px", "2px 2px 1px", "2px 2px green", "2px 2px 1px green", "green 2px 2px", "green 2px 2px 1px", "green 2px 2px, blue 1px 3px 4px", "currentColor 3px 3px", "blue 2px 2px, currentColor 1px 2px",
3226 /* calc() values */
3227 "2px 2px calc(-5px)", /* clamped */
3228 "calc(3em - 2px) 2px green",
3229 "green calc(3em - 2px) 2px",
3230 "2px calc(2px + 0.2em)",
3231 "blue 2px calc(2px + 0.2em)",
3232 "2px calc(2px + 0.2em) blue",
3233 "calc(-2px) calc(-2px)",
3234 "-2px -2px",
3235 "calc(2px) calc(2px)",
3236 "calc(2px) calc(2px) calc(2px)",
3237 ],
3238 invalid_values: [ "3% 3%", "2px 2px -5px", "2px 2px 2px 2px", "2px 2px, none", "none, 2px 2px", "inherit, 2px 2px", "2px 2px, inherit", "2 2px", "2px 2", "2px 2px 2", "2px 2px 2px 2",
3239 "calc(2px) calc(2px) calc(2px) calc(2px)"
3240 ]
3241 },
3242 "text-transform": {
3243 domProp: "textTransform",
3244 inherited: true,
3245 type: CSS_TYPE_LONGHAND,
3246 initial_values: [ "none" ],
3247 other_values: [ "capitalize", "uppercase", "lowercase", "full-width" ],
3248 invalid_values: []
3249 },
3250 "top": {
3251 domProp: "top",
3252 inherited: false,
3253 type: CSS_TYPE_LONGHAND,
3254 /* FIXME: run tests with multiple prerequisites */
3255 prerequisites: { "position": "relative" },
3256 /* XXX 0 may or may not be equal to auto */
3257 initial_values: [ "auto" ],
3258 other_values: [ "32px", "-3em", "12%",
3259 "calc(2px)",
3260 "calc(-2px)",
3261 "calc(50%)",
3262 "calc(3*25px)",
3263 "calc(25px*3)",
3264 "calc(3*25px + 50%)",
3265 ],
3266 invalid_values: [],
3267 quirks_values: { "5": "5px" },
3268 },
3269 "transition": {
3270 domProp: "transition",
3271 inherited: false,
3272 type: CSS_TYPE_TRUE_SHORTHAND,
3273 subproperties: [ "transition-property", "transition-duration", "transition-timing-function", "transition-delay" ],
3274 initial_values: [ "all 0s ease 0s", "all", "0s", "0s 0s", "ease" ],
3275 other_values: [ "width 1s linear 2s", "width 1s 2s linear", "width linear 1s 2s", "linear width 1s 2s", "linear 1s width 2s", "linear 1s 2s width", "1s width linear 2s", "1s width 2s linear", "1s 2s width linear", "1s linear width 2s", "1s linear 2s width", "1s 2s linear width", "width linear 1s", "width 1s linear", "linear width 1s", "linear 1s width", "1s width linear", "1s linear width", "1s 2s width", "1s width 2s", "width 1s 2s", "1s 2s linear", "1s linear 2s", "linear 1s 2s", "width 1s", "1s width", "linear 1s", "1s linear", "1s 2s", "2s 1s", "width", "linear", "1s", "height", "2s", "ease-in-out", "2s ease-in", "opacity linear", "ease-out 2s", "2s color, 1s width, 500ms height linear, 1s opacity 4s cubic-bezier(0.0, 0.1, 1.0, 1.0)", "1s \\32width linear 2s", "1s -width linear 2s", "1s -\\32width linear 2s", "1s \\32 0width linear 2s", "1s -\\32 0width linear 2s", "1s \\2width linear 2s", "1s -\\2width linear 2s", "2s, 1s width", "1s width, 2s", "2s all, 1s width", "1s width, 2s all", "2s all, 1s width", "2s width, 1s all" ],
3276 invalid_values: [ "1s width, 2s none", "2s none, 1s width", "2s inherit", "inherit 2s", "2s width, 1s inherit", "2s inherit, 1s width", "2s initial", "1s width,,2s color", "1s width, ,2s color" ]
3277 },
3278 "transition-delay": {
3279 domProp: "transitionDelay",
3280 inherited: false,
3281 type: CSS_TYPE_LONGHAND,
3282 initial_values: [ "0s", "0ms" ],
3283 other_values: [ "1s", "250ms", "-100ms", "-1s", "1s, 250ms, 2.3s"],
3284 invalid_values: [ "0", "0px" ]
3285 },
3286 "transition-duration": {
3287 domProp: "transitionDuration",
3288 inherited: false,
3289 type: CSS_TYPE_LONGHAND,
3290 initial_values: [ "0s", "0ms" ],
3291 other_values: [ "1s", "250ms", "1s, 250ms, 2.3s"],
3292 invalid_values: [ "0", "0px", "-1ms", "-2s" ]
3293 },
3294 "transition-property": {
3295 domProp: "transitionProperty",
3296 inherited: false,
3297 type: CSS_TYPE_LONGHAND,
3298 initial_values: [ "all" ],
3299 other_values: [ "none", "left", "top", "color", "width, height, opacity", "foobar", "auto", "\\32width", "-width", "-\\32width", "\\32 0width", "-\\32 0width", "\\2width", "-\\2width", "all, all", "all, color", "color, all" ],
3300 invalid_values: [ "none, none", "color, none", "none, color", "inherit, color", "color, inherit", "initial, color", "color, initial", "none, color", "color, none" ]
3301 },
3302 "transition-timing-function": {
3303 domProp: "transitionTimingFunction",
3304 inherited: false,
3305 type: CSS_TYPE_LONGHAND,
3306 initial_values: [ "ease", "cubic-bezier(0.25, 0.1, 0.25, 1.0)" ],
3307 other_values: [ "linear", "ease-in", "ease-out", "ease-in-out", "linear, ease-in, cubic-bezier(0.1, 0.2, 0.8, 0.9)", "cubic-bezier(0.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.25, 1.5, 0.75, -0.5)", "step-start", "step-end", "steps(1)", "steps(2, start)", "steps(386)", "steps(3, end)" ],
3308 invalid_values: [ "none", "auto", "cubic-bezier(0.25, 0.1, 0.25)", "cubic-bezier(0.25, 0.1, 0.25, 0.25, 1.0)", "cubic-bezier(-0.5, 0.5, 0.5, 0.5)", "cubic-bezier(1.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.5, 0.5, -0.5, 0.5)", "cubic-bezier(0.5, 0.5, 1.5, 0.5)", "steps(2, step-end)", "steps(0)", "steps(-2)", "steps(0, step-end, 1)" ]
3309 },
3310 "unicode-bidi": {
3311 domProp: "unicodeBidi",
3312 inherited: false,
3313 type: CSS_TYPE_LONGHAND,
3314 initial_values: [ "normal" ],
3315 other_values: [ "embed", "bidi-override", "-moz-isolate", "-moz-plaintext", "-moz-isolate-override" ],
3316 invalid_values: [ "auto", "none" ]
3317 },
3318 "vertical-align": {
3319 domProp: "verticalAlign",
3320 inherited: false,
3321 type: CSS_TYPE_LONGHAND,
3322 initial_values: [ "baseline" ],
3323 other_values: [ "sub", "super", "top", "text-top", "middle", "bottom", "text-bottom", "-moz-middle-with-baseline", "15%", "3px", "0.2em", "-5px", "-3%",
3324 "calc(2px)",
3325 "calc(-2px)",
3326 "calc(50%)",
3327 "calc(3*25px)",
3328 "calc(25px*3)",
3329 "calc(3*25px + 50%)",
3330 ],
3331 invalid_values: [ "5" ]
3332 },
3333 "visibility": {
3334 domProp: "visibility",
3335 inherited: true,
3336 type: CSS_TYPE_LONGHAND,
3337 initial_values: [ "visible" ],
3338 other_values: [ "hidden", "collapse" ],
3339 invalid_values: []
3340 },
3341 "white-space": {
3342 domProp: "whiteSpace",
3343 inherited: true,
3344 type: CSS_TYPE_LONGHAND,
3345 initial_values: [ "normal" ],
3346 other_values: [ "pre", "nowrap", "pre-wrap", "pre-line", "-moz-pre-discard-newlines" ],
3347 invalid_values: []
3348 },
3349 "widows": {
3350 domProp: "widows",
3351 inherited: true,
3352 backend_only: true,
3353 type: CSS_TYPE_LONGHAND,
3354 // XXX requires display:block
3355 initial_values: [ "2" ],
3356 other_values: [ "1", "7" ],
3357 invalid_values: [ "0", "-1", "0px", "3px", "3e1" ]
3358 },
3359 "width": {
3360 domProp: "width",
3361 inherited: false,
3362 type: CSS_TYPE_LONGHAND,
3363 /* computed value tests for width test more with display:block */
3364 prerequisites: { "display": "block" },
3365 initial_values: [ " auto" ],
3366 /* XXX these have prerequisites */
3367 other_values: [ "15px", "3em", "15%", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available",
3368 "3e1px", "3e+1px", "3e0px", "3e+0px", "3e-0px", "3e-1px",
3369 "3.2e1px", "3.2e+1px", "3.2e0px", "3.2e+0px", "3.2e-0px", "3.2e-1px",
3370 "3e1%", "3e+1%", "3e0%", "3e+0%", "3e-0%", "3e-1%",
3371 "3.2e1%", "3.2e+1%", "3.2e0%", "3.2e+0%", "3.2e-0%", "3.2e-1%",
3372 /* valid -moz-calc() values */
3373 "-moz-calc(-2px)",
3374 "-moz-calc(2px)",
3375 "-moz-calc(50%)",
3376 "-moz-calc(50% + 2px)",
3377 "-moz-calc( 50% + 2px)",
3378 "-moz-calc(50% + 2px )",
3379 "-moz-calc( 50% + 2px )",
3380 "-moz-calc(50% - -2px)",
3381 "-moz-calc(2px - -50%)",
3382 "-moz-calc(3*25px)",
3383 "-moz-calc(3 *25px)",
3384 "-moz-calc(3 * 25px)",
3385 "-moz-calc(3* 25px)",
3386 "-moz-calc(25px*3)",
3387 "-moz-calc(25px *3)",
3388 "-moz-calc(25px* 3)",
3389 "-moz-calc(25px * 3)",
3390 "-moz-calc(3*25px + 50%)",
3391 "-moz-calc(50% - 3em + 2px)",
3392 "-moz-calc(50% - (3em + 2px))",
3393 "-moz-calc((50% - 3em) + 2px)",
3394 "-moz-calc(2em)",
3395 "-moz-calc(50%)",
3396 "-moz-calc(50px/2)",
3397 "-moz-calc(50px/(2 - 1))",
3398 /* valid calc() values */
3399 "calc(-2px)",
3400 "calc(2px)",
3401 "calc(50%)",
3402 "calc(50% + 2px)",
3403 "calc( 50% + 2px)",
3404 "calc(50% + 2px )",
3405 "calc( 50% + 2px )",
3406 "calc(50% - -2px)",
3407 "calc(2px - -50%)",
3408 "calc(3*25px)",
3409 "calc(3 *25px)",
3410 "calc(3 * 25px)",
3411 "calc(3* 25px)",
3412 "calc(25px*3)",
3413 "calc(25px *3)",
3414 "calc(25px* 3)",
3415 "calc(25px * 3)",
3416 "calc(3*25px + 50%)",
3417 "calc(50% - 3em + 2px)",
3418 "calc(50% - (3em + 2px))",
3419 "calc((50% - 3em) + 2px)",
3420 "calc(2em)",
3421 "calc(50%)",
3422 "calc(50px/2)",
3423 "calc(50px/(2 - 1))",
3424 ],
3425 invalid_values: [ "none", "-2px",
3426 /* invalid -moz-calc() values */
3427 "-moz-calc(50%+ 2px)",
3428 "-moz-calc(50% +2px)",
3429 "-moz-calc(50%+2px)",
3430 /* invalid calc() values */
3431 "calc(50%+ 2px)",
3432 "calc(50% +2px)",
3433 "calc(50%+2px)",
3434 "-moz-min()",
3435 "calc(min())",
3436 "-moz-max()",
3437 "calc(max())",
3438 "-moz-min(5px)",
3439 "calc(min(5px))",
3440 "-moz-max(5px)",
3441 "calc(max(5px))",
3442 "-moz-min(5px,2em)",
3443 "calc(min(5px,2em))",
3444 "-moz-max(5px,2em)",
3445 "calc(max(5px,2em))",
3446 "calc(50px/(2 - 2))",
3447 /* If we ever support division by values, which is
3448 * complicated for the reasons described in
3449 * http://lists.w3.org/Archives/Public/www-style/2010Jan/0007.html
3450 * , we should support all 4 of these as described in
3451 * http://lists.w3.org/Archives/Public/www-style/2009Dec/0296.html
3452 */
3453 "calc((3em / 100%) * 3em)",
3454 "calc(3em / 100% * 3em)",
3455 "calc(3em * (3em / 100%))",
3456 "calc(3em * 3em / 100%)",
3457 ],
3458 quirks_values: { "5": "5px" },
3459 },
3460 "word-break": {
3461 domProp: "wordBreak",
3462 inherited: true,
3463 type: CSS_TYPE_LONGHAND,
3464 initial_values: [ "normal" ],
3465 other_values: [ "break-all", "keep-all" ],
3466 invalid_values: []
3467 },
3468 "word-spacing": {
3469 domProp: "wordSpacing",
3470 inherited: true,
3471 type: CSS_TYPE_LONGHAND,
3472 initial_values: [ "normal", "0", "0px", "-0em",
3473 "calc(-0px)", "calc(0em)"
3474 ],
3475 other_values: [ "1em", "2px", "-3px",
3476 "calc(1em)", "calc(1em + 3px)",
3477 "calc(15px / 2)", "calc(15px/2)",
3478 "calc(-2em)"
3479 ],
3480 invalid_values: [],
3481 quirks_values: { "5": "5px" },
3482 },
3483 "word-wrap": {
3484 domProp: "wordWrap",
3485 inherited: true,
3486 type: CSS_TYPE_LONGHAND,
3487 initial_values: [ "normal" ],
3488 other_values: [ "break-word" ],
3489 invalid_values: []
3490 },
3491 "-moz-hyphens": {
3492 domProp: "MozHyphens",
3493 inherited: true,
3494 type: CSS_TYPE_LONGHAND,
3495 initial_values: [ "manual" ],
3496 other_values: [ "none", "auto" ],
3497 invalid_values: []
3498 },
3499 "z-index": {
3500 domProp: "zIndex",
3501 inherited: false,
3502 type: CSS_TYPE_LONGHAND,
3503 /* XXX requires position */
3504 initial_values: [ "auto" ],
3505 other_values: [ "0", "3", "-7000", "12000" ],
3506 invalid_values: [ "3.0", "17.5", "3e1" ]
3507 }
3508 ,
3509 "clip-path": {
3510 domProp: "clipPath",
3511 inherited: false,
3512 type: CSS_TYPE_LONGHAND,
3513 initial_values: [ "none" ],
3514 other_values: [ "url(#mypath)", "url('404.svg#mypath')" ],
3515 invalid_values: []
3516 },
3517 "clip-rule": {
3518 domProp: "clipRule",
3519 inherited: true,
3520 type: CSS_TYPE_LONGHAND,
3521 initial_values: [ "nonzero" ],
3522 other_values: [ "evenodd" ],
3523 invalid_values: []
3524 },
3525 "color-interpolation": {
3526 domProp: "colorInterpolation",
3527 inherited: true,
3528 type: CSS_TYPE_LONGHAND,
3529 initial_values: [ "sRGB" ],
3530 other_values: [ "auto", "linearRGB" ],
3531 invalid_values: []
3532 },
3533 "color-interpolation-filters": {
3534 domProp: "colorInterpolationFilters",
3535 inherited: true,
3536 type: CSS_TYPE_LONGHAND,
3537 initial_values: [ "linearRGB" ],
3538 other_values: [ "sRGB", "auto" ],
3539 invalid_values: []
3540 },
3541 "dominant-baseline": {
3542 domProp: "dominantBaseline",
3543 inherited: false,
3544 type: CSS_TYPE_LONGHAND,
3545 initial_values: [ "auto" ],
3546 other_values: [ "use-script", "no-change", "reset-size", "ideographic", "alphabetic", "hanging", "mathematical", "central", "middle", "text-after-edge", "text-before-edge" ],
3547 invalid_values: []
3548 },
3549 "fill": {
3550 domProp: "fill",
3551 inherited: true,
3552 type: CSS_TYPE_LONGHAND,
3553 prerequisites: { "color": "blue" },
3554 initial_values: [ "black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)" ],
3555 other_values: [ "green", "#fc3", "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green', "none", "currentColor", "context-fill", "context-stroke" ],
3556 invalid_values: [ "000000", "ff00ff" ]
3557 },
3558 "fill-opacity": {
3559 domProp: "fillOpacity",
3560 inherited: true,
3561 type: CSS_TYPE_LONGHAND,
3562 initial_values: [ "1", "2.8", "1.000", "context-fill-opacity", "context-stroke-opacity" ],
3563 other_values: [ "0", "0.3", "-7.3" ],
3564 invalid_values: []
3565 },
3566 "fill-rule": {
3567 domProp: "fillRule",
3568 inherited: true,
3569 type: CSS_TYPE_LONGHAND,
3570 initial_values: [ "nonzero" ],
3571 other_values: [ "evenodd" ],
3572 invalid_values: []
3573 },
3574 "filter": {
3575 domProp: "filter",
3576 inherited: false,
3577 type: CSS_TYPE_LONGHAND,
3578 initial_values: [ "none" ],
3579 other_values: [ "url(#myfilt)" ],
3580 invalid_values: [ "url(#myfilt) none" ]
3581 },
3582 "flood-color": {
3583 domProp: "floodColor",
3584 inherited: false,
3585 type: CSS_TYPE_LONGHAND,
3586 prerequisites: { "color": "blue" },
3587 initial_values: [ "black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)" ],
3588 other_values: [ "green", "#fc3", "currentColor" ],
3589 invalid_values: [ "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green', "000000", "ff00ff" ]
3590 },
3591 "flood-opacity": {
3592 domProp: "floodOpacity",
3593 inherited: false,
3594 type: CSS_TYPE_LONGHAND,
3595 initial_values: [ "1", "2.8", "1.000" ],
3596 other_values: [ "0", "0.3", "-7.3" ],
3597 invalid_values: []
3598 },
3599 "image-rendering": {
3600 domProp: "imageRendering",
3601 inherited: true,
3602 type: CSS_TYPE_LONGHAND,
3603 initial_values: [ "auto" ],
3604 other_values: [ "optimizeSpeed", "optimizeQuality", "-moz-crisp-edges" ],
3605 invalid_values: []
3606 },
3607 "lighting-color": {
3608 domProp: "lightingColor",
3609 inherited: false,
3610 type: CSS_TYPE_LONGHAND,
3611 prerequisites: { "color": "blue" },
3612 initial_values: [ "white", "#fff", "#ffffff", "rgb(255,255,255)", "rgba(255,255,255,1.0)", "rgba(255,255,255,42.0)" ],
3613 other_values: [ "green", "#fc3", "currentColor" ],
3614 invalid_values: [ "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green', "000000", "ff00ff" ]
3615 },
3616 "marker": {
3617 domProp: "marker",
3618 inherited: true,
3619 type: CSS_TYPE_TRUE_SHORTHAND,
3620 subproperties: [ "marker-start", "marker-mid", "marker-end" ],
3621 initial_values: [ "none" ],
3622 other_values: [ "url(#mysym)" ],
3623 invalid_values: [ "none none", "url(#mysym) url(#mysym)", "none url(#mysym)", "url(#mysym) none" ]
3624 },
3625 "marker-end": {
3626 domProp: "markerEnd",
3627 inherited: true,
3628 type: CSS_TYPE_LONGHAND,
3629 initial_values: [ "none" ],
3630 other_values: [ "url(#mysym)" ],
3631 invalid_values: []
3632 },
3633 "marker-mid": {
3634 domProp: "markerMid",
3635 inherited: true,
3636 type: CSS_TYPE_LONGHAND,
3637 initial_values: [ "none" ],
3638 other_values: [ "url(#mysym)" ],
3639 invalid_values: []
3640 },
3641 "marker-start": {
3642 domProp: "markerStart",
3643 inherited: true,
3644 type: CSS_TYPE_LONGHAND,
3645 initial_values: [ "none" ],
3646 other_values: [ "url(#mysym)" ],
3647 invalid_values: []
3648 },
3649 "mask": {
3650 domProp: "mask",
3651 inherited: false,
3652 type: CSS_TYPE_LONGHAND,
3653 initial_values: [ "none" ],
3654 other_values: [ "url(#mymask)" ],
3655 invalid_values: []
3656 },
3657 "shape-rendering": {
3658 domProp: "shapeRendering",
3659 inherited: true,
3660 type: CSS_TYPE_LONGHAND,
3661 initial_values: [ "auto" ],
3662 other_values: [ "optimizeSpeed", "crispEdges", "geometricPrecision" ],
3663 invalid_values: []
3664 },
3665 "stop-color": {
3666 domProp: "stopColor",
3667 inherited: false,
3668 type: CSS_TYPE_LONGHAND,
3669 prerequisites: { "color": "blue" },
3670 initial_values: [ "black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)" ],
3671 other_values: [ "green", "#fc3", "currentColor" ],
3672 invalid_values: [ "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green', "000000", "ff00ff" ]
3673 },
3674 "stop-opacity": {
3675 domProp: "stopOpacity",
3676 inherited: false,
3677 type: CSS_TYPE_LONGHAND,
3678 initial_values: [ "1", "2.8", "1.000" ],
3679 other_values: [ "0", "0.3", "-7.3" ],
3680 invalid_values: []
3681 },
3682 "stroke": {
3683 domProp: "stroke",
3684 inherited: true,
3685 type: CSS_TYPE_LONGHAND,
3686 initial_values: [ "none" ],
3687 other_values: [ "black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)", "green", "#fc3", "url('#myserver')", "url(foo.svg#myserver)", 'url("#myserver") green', "currentColor", "context-fill", "context-stroke" ],
3688 invalid_values: [ "000000", "ff00ff" ]
3689 },
3690 "stroke-dasharray": {
3691 domProp: "strokeDasharray",
3692 inherited: true,
3693 type: CSS_TYPE_LONGHAND,
3694 initial_values: [ "none", "context-value" ],
3695 other_values: [ "5px,3px,2px", "5px 3px 2px", " 5px ,3px , 2px ", "1px", "5%", "3em" ],
3696 invalid_values: [ "-5px,3px,2px", "5px,3px,-2px" ]
3697 },
3698 "stroke-dashoffset": {
3699 domProp: "strokeDashoffset",
3700 inherited: true,
3701 type: CSS_TYPE_LONGHAND,
3702 initial_values: [ "0", "-0px", "0em", "context-value" ],
3703 other_values: [ "3px", "3%", "1em" ],
3704 invalid_values: []
3705 },
3706 "stroke-linecap": {
3707 domProp: "strokeLinecap",
3708 inherited: true,
3709 type: CSS_TYPE_LONGHAND,
3710 initial_values: [ "butt" ],
3711 other_values: [ "round", "square" ],
3712 invalid_values: []
3713 },
3714 "stroke-linejoin": {
3715 domProp: "strokeLinejoin",
3716 inherited: true,
3717 type: CSS_TYPE_LONGHAND,
3718 initial_values: [ "miter" ],
3719 other_values: [ "round", "bevel" ],
3720 invalid_values: []
3721 },
3722 "stroke-miterlimit": {
3723 domProp: "strokeMiterlimit",
3724 inherited: true,
3725 type: CSS_TYPE_LONGHAND,
3726 initial_values: [ "4" ],
3727 other_values: [ "1", "7", "5000", "1.1" ],
3728 invalid_values: [ "0.9", "0", "-1", "3px", "-0.3" ]
3729 },
3730 "stroke-opacity": {
3731 domProp: "strokeOpacity",
3732 inherited: true,
3733 type: CSS_TYPE_LONGHAND,
3734 initial_values: [ "1", "2.8", "1.000", "context-fill-opacity", "context-stroke-opacity" ],
3735 other_values: [ "0", "0.3", "-7.3" ],
3736 invalid_values: []
3737 },
3738 "stroke-width": {
3739 domProp: "strokeWidth",
3740 inherited: true,
3741 type: CSS_TYPE_LONGHAND,
3742 initial_values: [ "1px", "context-value" ],
3743 other_values: [ "0", "0px", "-0em", "17px", "0.2em" ],
3744 invalid_values: [ "-0.1px", "-3px" ]
3745 },
3746 "text-anchor": {
3747 domProp: "textAnchor",
3748 inherited: true,
3749 type: CSS_TYPE_LONGHAND,
3750 initial_values: [ "start" ],
3751 other_values: [ "middle", "end" ],
3752 invalid_values: []
3753 },
3754 "text-rendering": {
3755 domProp: "textRendering",
3756 inherited: true,
3757 type: CSS_TYPE_LONGHAND,
3758 initial_values: [ "auto" ],
3759 other_values: [ "optimizeSpeed", "optimizeLegibility", "geometricPrecision" ],
3760 invalid_values: []
3761 },
3762 "vector-effect": {
3763 domProp: "vectorEffect",
3764 inherited: false,
3765 type: CSS_TYPE_LONGHAND,
3766 initial_values: [ "none" ],
3767 other_values: [ "non-scaling-stroke" ],
3768 invalid_values: []
3769 },
3770 "align-content": {
3771 domProp: "alignContent",
3772 inherited: false,
3773 type: CSS_TYPE_LONGHAND,
3774 initial_values: [ "stretch" ],
3775 other_values: [
3776 "flex-start",
3777 "flex-end",
3778 "center",
3779 "space-between",
3780 "space-around"
3781 ],
3782 invalid_values: [ "abc", "30px", "0", "auto" ]
3783 },
3784 "align-items": {
3785 domProp: "alignItems",
3786 inherited: false,
3787 type: CSS_TYPE_LONGHAND,
3788 initial_values: [ "stretch" ],
3789 other_values: [ "flex-start", "flex-end", "center", "baseline" ],
3790 invalid_values: [ "space-between", "abc", "30px" ]
3791 },
3792 "align-self": {
3793 domProp: "alignSelf",
3794 inherited: false,
3795 type: CSS_TYPE_LONGHAND,
3796 // (Assuming defaults on the parent, 'auto' will compute to 'stretch'.)
3797 initial_values: [ "auto", "stretch" ],
3798 other_values: [ "flex-start", "flex-end", "center", "baseline" ],
3799 invalid_values: [ "space-between", "abc", "30px" ]
3800 },
3801 "flex": {
3802 domProp: "flex",
3803 inherited: false,
3804 type: CSS_TYPE_TRUE_SHORTHAND,
3805 subproperties: [
3806 "flex-grow",
3807 "flex-shrink",
3808 "flex-basis"
3809 ],
3810 initial_values: [ "0 1 auto", "auto 0 1", "0 auto", "auto 0" ],
3811 other_values: [
3812 "none",
3813 "1",
3814 "0",
3815 "0 1",
3816 "0.5",
3817 "1.2 3.4",
3818 "0 0 0",
3819 "0 0 0px",
3820 "0px 0 0",
3821 "5px 0 0",
3822 "2 auto",
3823 "auto 4",
3824 "auto 5.6 7.8",
3825 "-moz-max-content",
3826 "1 -moz-max-content",
3827 "1 2 -moz-max-content",
3828 "-moz-max-content 1",
3829 "-moz-max-content 1 2",
3830 "-0"
3831 ],
3832 invalid_values: [
3833 "1 2px 3",
3834 "1 auto 3",
3835 "1px 2 3px",
3836 "1px 2 3 4px",
3837 "-1",
3838 "1 -1"
3839 ]
3840 },
3841 "flex-basis": {
3842 domProp: "flexBasis",
3843 inherited: false,
3844 type: CSS_TYPE_LONGHAND,
3845 initial_values: [ " auto" ],
3846 // NOTE: This is cribbed directly from the "width" chunk, since this
3847 // property takes the exact same values as width (albeit with
3848 // different semantics on 'auto').
3849 // XXXdholbert (Maybe these should get separated out into
3850 // a reusable array defined at the top of this file?)
3851 other_values: [ "15px", "3em", "15%", "-moz-max-content", "-moz-min-content", "-moz-fit-content", "-moz-available",
3852 // valid calc() values
3853 "calc(-2px)",
3854 "calc(2px)",
3855 "calc(50%)",
3856 "calc(50% + 2px)",
3857 "calc( 50% + 2px)",
3858 "calc(50% + 2px )",
3859 "calc( 50% + 2px )",
3860 "calc(50% - -2px)",
3861 "calc(2px - -50%)",
3862 "calc(3*25px)",
3863 "calc(3 *25px)",
3864 "calc(3 * 25px)",
3865 "calc(3* 25px)",
3866 "calc(25px*3)",
3867 "calc(25px *3)",
3868 "calc(25px* 3)",
3869 "calc(25px * 3)",
3870 "calc(3*25px + 50%)",
3871 "calc(50% - 3em + 2px)",
3872 "calc(50% - (3em + 2px))",
3873 "calc((50% - 3em) + 2px)",
3874 "calc(2em)",
3875 "calc(50%)",
3876 "calc(50px/2)",
3877 "calc(50px/(2 - 1))"
3878 ],
3879 invalid_values: [ "none", "-2px",
3880 // invalid calc() values
3881 "calc(50%+ 2px)",
3882 "calc(50% +2px)",
3883 "calc(50%+2px)",
3884 "-moz-min()",
3885 "calc(min())",
3886 "-moz-max()",
3887 "calc(max())",
3888 "-moz-min(5px)",
3889 "calc(min(5px))",
3890 "-moz-max(5px)",
3891 "calc(max(5px))",
3892 "-moz-min(5px,2em)",
3893 "calc(min(5px,2em))",
3894 "-moz-max(5px,2em)",
3895 "calc(max(5px,2em))",
3896 "calc(50px/(2 - 2))",
3897 // If we ever support division by values, which is
3898 // complicated for the reasons described in
3899 // http://lists.w3.org/Archives/Public/www-style/2010Jan/0007.html
3900 // , we should support all 4 of these as described in
3901 // http://lists.w3.org/Archives/Public/www-style/2009Dec/0296.html
3902 "calc((3em / 100%) * 3em)",
3903 "calc(3em / 100% * 3em)",
3904 "calc(3em * (3em / 100%))",
3905 "calc(3em * 3em / 100%)"
3906 ]
3907 },
3908 "flex-direction": {
3909 domProp: "flexDirection",
3910 inherited: false,
3911 type: CSS_TYPE_LONGHAND,
3912 initial_values: [ "row" ],
3913 other_values: [ "row-reverse", "column", "column-reverse" ],
3914 invalid_values: [ "10px", "30%", "justify", "column wrap" ]
3915 },
3916 "flex-flow": {
3917 domProp: "flexFlow",
3918 inherited: false,
3919 type: CSS_TYPE_TRUE_SHORTHAND,
3920 subproperties: [
3921 "flex-direction",
3922 "flex-wrap"
3923 ],
3924 initial_values: [ "row nowrap", "nowrap row", "row", "nowrap" ],
3925 other_values: [
3926 // only specifying one property:
3927 "column",
3928 "wrap",
3929 "wrap-reverse",
3930 // specifying both properties, 'flex-direction' first:
3931 "row wrap",
3932 "row wrap-reverse",
3933 "column wrap",
3934 "column wrap-reverse",
3935 // specifying both properties, 'flex-wrap' first:
3936 "wrap row",
3937 "wrap column",
3938 "wrap-reverse row",
3939 "wrap-reverse column",
3940 ],
3941 invalid_values: [
3942 // specifying flex-direction twice (invalid):
3943 "row column",
3944 "row column nowrap",
3945 "row nowrap column",
3946 "nowrap row column",
3947 // specifying flex-wrap twice (invalid):
3948 "nowrap wrap-reverse",
3949 "nowrap wrap-reverse row",
3950 "nowrap row wrap-reverse",
3951 "row nowrap wrap-reverse",
3952 // Invalid data-type / invalid keyword type:
3953 "1px", "5%", "justify", "none"
3954 ]
3955 },
3956 "flex-grow": {
3957 domProp: "flexGrow",
3958 inherited: false,
3959 type: CSS_TYPE_LONGHAND,
3960 initial_values: [ "0" ],
3961 other_values: [ "3", "1", "1.0", "2.5", "123" ],
3962 invalid_values: [ "0px", "-5", "1%", "3em", "stretch", "auto" ]
3963 },
3964 "flex-shrink": {
3965 domProp: "flexShrink",
3966 inherited: false,
3967 type: CSS_TYPE_LONGHAND,
3968 initial_values: [ "1" ],
3969 other_values: [ "3", "0", "0.0", "2.5", "123" ],
3970 invalid_values: [ "0px", "-5", "1%", "3em", "stretch", "auto" ]
3971 },
3972 "flex-wrap": {
3973 domProp: "flexWrap",
3974 inherited: false,
3975 type: CSS_TYPE_LONGHAND,
3976 initial_values: [ "nowrap" ],
3977 other_values: [ "wrap", "wrap-reverse" ],
3978 invalid_values: [ "10px", "30%", "justify", "column wrap", "auto" ]
3979 },
3980 "order": {
3981 domProp: "order",
3982 inherited: false,
3983 type: CSS_TYPE_LONGHAND,
3984 initial_values: [ "0" ],
3985 other_values: [ "1", "99999", "-1", "-50" ],
3986 invalid_values: [ "0px", "1.0", "1.", "1%", "0.2", "3em", "stretch" ]
3987 },
3988 "justify-content": {
3989 domProp: "justifyContent",
3990 inherited: false,
3991 type: CSS_TYPE_LONGHAND,
3992 initial_values: [ "flex-start" ],
3993 other_values: [ "flex-end", "center", "space-between", "space-around" ],
3994 invalid_values: [ "baseline", "stretch", "30px", "5%" ]
3995 },
3996
3997 // Aliases
3998 "-moz-transform": {
3999 domProp: "MozTransform",
4000 inherited: false,
4001 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
4002 alias_for: "transform",
4003 subproperties: [ "transform" ],
4004 prerequisites: { "width": "300px", "height": "50px" },
4005 initial_values: [ "none" ],
4006 other_values: [ "translatex(1px)", "translatex(4em)",
4007 "translatex(-4px)", "translatex(3px)",
4008 "translatex(0px) translatex(1px) translatex(2px) translatex(3px) translatex(4px)",
4009 "translatey(4em)", "translate(3px)", "translate(10px, -3px)",
4010 "rotate(45deg)", "rotate(45grad)", "rotate(45rad)",
4011 "rotate(0.25turn)", "rotate(0)", "scalex(10)", "scaley(10)",
4012 "scale(10)", "scale(10, 20)", "skewx(30deg)", "skewx(0)",
4013 "skewy(0)", "skewx(30grad)", "skewx(30rad)", "skewx(0.08turn)",
4014 "skewy(30deg)", "skewy(30grad)", "skewy(30rad)", "skewy(0.08turn)",
4015 "rotate(45deg) scale(2, 1)", "skewx(45deg) skewx(-50grad)",
4016 "translate(0, 0) scale(1, 1) skewx(0) skewy(0) matrix(1, 0, 0, 1, 0, 0)",
4017 "translatex(50%)", "translatey(50%)", "translate(50%)",
4018 "translate(3%, 5px)", "translate(5px, 3%)",
4019 "matrix(1, 2, 3, 4, 5, 6)",
4020 /* valid calc() values */
4021 "translatex(calc(5px + 10%))",
4022 "translatey(calc(0.25 * 5px + 10% / 3))",
4023 "translate(calc(5px - 10% * 3))",
4024 "translate(calc(5px - 3 * 10%), 50px)",
4025 "translate(-50px, calc(5px - 10% * 3))",
4026 /* valid only when prefixed */
4027 "matrix(1, 2, 3, 4, 5px, 6%)",
4028 "matrix(1, 2, 3, 4, 5%, 6px)",
4029 "matrix(1, 2, 3, 4, 5%, 6%)",
4030 "matrix(1, 2, 3, 4, 5px, 6em)",
4031 "matrix(1, 0, 0, 1, calc(5px * 3), calc(10% - 3px))",
4032 "translatez(1px)", "translatez(4em)", "translatez(-4px)",
4033 "translatez(0px)", "translatez(2px) translatez(5px)",
4034 "translate3d(3px, 4px, 5px)", "translate3d(2em, 3px, 1em)",
4035 "translatex(2px) translate3d(4px, 5px, 6px) translatey(1px)",
4036 "scale3d(4, 4, 4)", "scale3d(-2, 3, -7)", "scalez(4)",
4037 "scalez(-6)", "rotate3d(2, 3, 4, 45deg)",
4038 "rotate3d(-3, 7, 0, 12rad)", "rotatex(15deg)", "rotatey(-12grad)",
4039 "rotatez(72rad)", "rotatex(0.125turn)", "perspective(1000px)",
4040 "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)",
4041 /* valid only when prefixed */
4042 "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13px, 14em, 15px, 16)",
4043 "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 20%, 10%, 15, 16)",
4044 ],
4045 invalid_values: ["1px", "#0000ff", "red", "auto",
4046 "translatex(1)", "translatey(1)", "translate(2)",
4047 "translate(-3, -4)",
4048 "translatex(1px 1px)", "translatex(translatex(1px))",
4049 "translatex(#0000ff)", "translatex(red)", "translatey()",
4050 "matrix(1px, 2px, 3px, 4px, 5px, 6px)", "scale(150%)",
4051 "skewx(red)", "matrix(1%, 0, 0, 0, 0px, 0px)",
4052 "matrix(0, 1%, 2, 3, 4px,5px)", "matrix(0, 1, 2%, 3, 4px, 5px)",
4053 "matrix(0, 1, 2, 3%, 4%, 5%)",
4054 /* invalid calc() values */
4055 "translatey(-moz-min(5px,10%))",
4056 "translatex(-moz-max(5px,10%))",
4057 "translate(10px, calc(min(5px,10%)))",
4058 "translate(calc(max(5px,10%)), 10%)",
4059 "matrix(1, 0, 0, 1, max(5px * 3), calc(10% - 3px))",
4060 "perspective(0px)", "perspective(-10px)", "matrix3d(dinosaur)",
4061 "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)",
4062 "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)",
4063 "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15%, 16)",
4064 "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16px)",
4065 "rotatey(words)", "rotatex(7)", "translate3d(3px, 4px, 1px, 7px)",
4066 ],
4067 },
4068 "-moz-transform-origin": {
4069 domProp: "MozTransformOrigin",
4070 inherited: false,
4071 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
4072 alias_for: "transform-origin",
4073 subproperties: [ "transform-origin" ],
4074 prerequisites: { "width": "10px", "height": "10px", "display": "block"},
4075 initial_values: [ "50% 50%", "center", "center center" ],
4076 other_values: [ "25% 25%", "6px 5px", "20% 3em", "0 0", "0in 1in",
4077 "top", "bottom","top left", "top right",
4078 "top center", "center left", "center right",
4079 "bottom left", "bottom right", "bottom center",
4080 "20% center", "6px center", "13in bottom",
4081 "left 50px", "right 13%", "center 40px",
4082 "calc(20px)",
4083 "calc(20px) 10px",
4084 "10px calc(20px)",
4085 "calc(20px) 25%",
4086 "25% calc(20px)",
4087 "calc(20px) calc(20px)",
4088 "calc(20px + 1em) calc(20px / 2)",
4089 "calc(20px + 50%) calc(50% - 10px)",
4090 "calc(-20px) calc(-50%)",
4091 "calc(-20%) calc(-50%)",
4092 "6px 5px 5px",
4093 "top center 10px"
4094 ],
4095 invalid_values: ["red", "auto", "none", "0.5 0.5", "40px #0000ff",
4096 "border", "center red", "right diagonal",
4097 "#00ffff bottom"]
4098 },
4099 "-moz-perspective-origin": {
4100 domProp: "MozPerspectiveOrigin",
4101 inherited: false,
4102 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
4103 alias_for: "perspective-origin",
4104 subproperties: [ "perspective-origin" ],
4105 prerequisites: { "width": "10px", "height": "10px", "display": "block"},
4106 initial_values: [ "50% 50%", "center", "center center" ],
4107 other_values: [ "25% 25%", "6px 5px", "20% 3em", "0 0", "0in 1in",
4108 "top", "bottom","top left", "top right",
4109 "top center", "center left", "center right",
4110 "bottom left", "bottom right", "bottom center",
4111 "20% center", "6px center", "13in bottom",
4112 "left 50px", "right 13%", "center 40px",
4113 "calc(20px)",
4114 "calc(20px) 10px",
4115 "10px calc(20px)",
4116 "calc(20px) 25%",
4117 "25% calc(20px)",
4118 "calc(20px) calc(20px)",
4119 "calc(20px + 1em) calc(20px / 2)",
4120 "calc(20px + 50%) calc(50% - 10px)",
4121 "calc(-20px) calc(-50%)",
4122 "calc(-20%) calc(-50%)" ],
4123 invalid_values: [ "red", "auto", "none", "0.5 0.5", "40px #0000ff",
4124 "border", "center red", "right diagonal",
4125 "#00ffff bottom"]
4126 },
4127 "-moz-perspective": {
4128 domProp: "MozPerspective",
4129 inherited: false,
4130 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
4131 alias_for: "perspective",
4132 subproperties: [ "perspective" ],
4133 initial_values: [ "none" ],
4134 other_values: [ "1000px", "500.2px" ],
4135 invalid_values: [ "pants", "200", "0", "-100px", "-27.2em" ]
4136 },
4137 "-moz-backface-visibility": {
4138 domProp: "MozBackfaceVisibility",
4139 inherited: false,
4140 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
4141 alias_for: "backface-visibility",
4142 subproperties: [ "backface-visibility" ],
4143 initial_values: [ "visible" ],
4144 other_values: [ "hidden" ],
4145 invalid_values: [ "collapse" ]
4146 },
4147 "-moz-transform-style": {
4148 domProp: "MozTransformStyle",
4149 inherited: false,
4150 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
4151 alias_for: "transform-style",
4152 subproperties: [ "transform-style" ],
4153 initial_values: [ "flat" ],
4154 other_values: [ "preserve-3d" ],
4155 invalid_values: []
4156 },
4157 "-moz-border-image": {
4158 domProp: "MozBorderImage",
4159 inherited: false,
4160 type: CSS_TYPE_TRUE_SHORTHAND,
4161 alias_for: "border-image",
4162 subproperties: [ "border-image-source", "border-image-slice", "border-image-width", "border-image-outset", "border-image-repeat" ],
4163 initial_values: [ "none" ],
4164 other_values: [ "url('border.png') 27 27 27 27",
4165 "url('border.png') 27",
4166 "stretch url('border.png')",
4167 "url('border.png') 27 fill",
4168 "url('border.png') 27 27 27 27 repeat",
4169 "repeat url('border.png') 27 27 27 27",
4170 "url('border.png') repeat 27 27 27 27",
4171 "url('border.png') fill 27 27 27 27 repeat",
4172 "url('border.png') 27 27 27 27 / 1em",
4173 "27 27 27 27 / 1em url('border.png') ",
4174 "url('border.png') 27 27 27 27 / 10 10 10 / 10 10 repeat",
4175 "repeat 27 27 27 27 / 10 10 10 / 10 10 url('border.png')",
4176 "url('border.png') 27 27 27 27 / / 10 10 1em",
4177 "fill 27 27 27 27 / / 10 10 1em url('border.png')",
4178 "url('border.png') 27 27 27 27 / 1em 1em 1em 1em repeat",
4179 "url('border.png') 27 27 27 27 / 1em 1em 1em 1em stretch round" ],
4180 invalid_values: [ "url('border.png') 27 27 27 27 27",
4181 "url('border.png') 27 27 27 27 / 1em 1em 1em 1em 1em",
4182 "url('border.png') 27 27 27 27 /",
4183 "url('border.png') fill",
4184 "url('border.png') fill repeat",
4185 "fill repeat",
4186 "url('border.png') fill / 1em",
4187 "url('border.png') / repeat",
4188 "url('border.png') 1 /",
4189 "url('border.png') 1 / /",
4190 "1 / url('border.png')",
4191 "url('border.png') / 1",
4192 "url('border.png') / / 1"]
4193 },
4194 "-moz-transition": {
4195 domProp: "MozTransition",
4196 inherited: false,
4197 type: CSS_TYPE_TRUE_SHORTHAND,
4198 alias_for: "transition",
4199 subproperties: [ "transition-property", "transition-duration", "transition-timing-function", "transition-delay" ],
4200 initial_values: [ "all 0s ease 0s", "all", "0s", "0s 0s", "ease" ],
4201 other_values: [ "width 1s linear 2s", "width 1s 2s linear", "width linear 1s 2s", "linear width 1s 2s", "linear 1s width 2s", "linear 1s 2s width", "1s width linear 2s", "1s width 2s linear", "1s 2s width linear", "1s linear width 2s", "1s linear 2s width", "1s 2s linear width", "width linear 1s", "width 1s linear", "linear width 1s", "linear 1s width", "1s width linear", "1s linear width", "1s 2s width", "1s width 2s", "width 1s 2s", "1s 2s linear", "1s linear 2s", "linear 1s 2s", "width 1s", "1s width", "linear 1s", "1s linear", "1s 2s", "2s 1s", "width", "linear", "1s", "height", "2s", "ease-in-out", "2s ease-in", "opacity linear", "ease-out 2s", "2s color, 1s width, 500ms height linear, 1s opacity 4s cubic-bezier(0.0, 0.1, 1.0, 1.0)", "1s \\32width linear 2s", "1s -width linear 2s", "1s -\\32width linear 2s", "1s \\32 0width linear 2s", "1s -\\32 0width linear 2s", "1s \\2width linear 2s", "1s -\\2width linear 2s", "2s, 1s width", "1s width, 2s", "2s all, 1s width", "1s width, 2s all", "2s all, 1s width", "2s width, 1s all" ],
4202 invalid_values: [ "1s width, 2s none", "2s none, 1s width", "2s inherit", "inherit 2s", "2s width, 1s inherit", "2s inherit, 1s width", "2s initial" ]
4203 },
4204 "-moz-transition-delay": {
4205 domProp: "MozTransitionDelay",
4206 inherited: false,
4207 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
4208 alias_for: "transition-delay",
4209 subproperties: [ "transition-delay" ],
4210 initial_values: [ "0s", "0ms" ],
4211 other_values: [ "1s", "250ms", "-100ms", "-1s", "1s, 250ms, 2.3s"],
4212 invalid_values: [ "0", "0px" ]
4213 },
4214 "-moz-transition-duration": {
4215 domProp: "MozTransitionDuration",
4216 inherited: false,
4217 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
4218 alias_for: "transition-duration",
4219 subproperties: [ "transition-duration" ],
4220 initial_values: [ "0s", "0ms" ],
4221 other_values: [ "1s", "250ms", "1s, 250ms, 2.3s"],
4222 invalid_values: [ "0", "0px", "-1ms", "-2s" ]
4223 },
4224 "-moz-transition-property": {
4225 domProp: "MozTransitionProperty",
4226 inherited: false,
4227 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
4228 alias_for: "transition-property",
4229 subproperties: [ "transition-property" ],
4230 initial_values: [ "all" ],
4231 other_values: [ "none", "left", "top", "color", "width, height, opacity", "foobar", "auto", "\\32width", "-width", "-\\32width", "\\32 0width", "-\\32 0width", "\\2width", "-\\2width", "all, all", "all, color", "color, all" ],
4232 invalid_values: [ "none, none", "color, none", "none, color", "inherit, color", "color, inherit", "initial, color", "color, initial", "none, color", "color, none" ]
4233 },
4234 "-moz-transition-timing-function": {
4235 domProp: "MozTransitionTimingFunction",
4236 inherited: false,
4237 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
4238 alias_for: "transition-timing-function",
4239 subproperties: [ "transition-timing-function" ],
4240 initial_values: [ "ease", "cubic-bezier(0.25, 0.1, 0.25, 1.0)" ],
4241 other_values: [ "linear", "ease-in", "ease-out", "ease-in-out", "linear, ease-in, cubic-bezier(0.1, 0.2, 0.8, 0.9)", "cubic-bezier(0.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.25, 1.5, 0.75, -0.5)", "step-start", "step-end", "steps(1)", "steps(2, start)", "steps(386)", "steps(3, end)" ],
4242 invalid_values: [ "none", "auto", "cubic-bezier(0.25, 0.1, 0.25)", "cubic-bezier(0.25, 0.1, 0.25, 0.25, 1.0)", "cubic-bezier(-0.5, 0.5, 0.5, 0.5)", "cubic-bezier(1.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.5, 0.5, -0.5, 0.5)", "cubic-bezier(0.5, 0.5, 1.5, 0.5)", "steps(2, step-end)", "steps(0)", "steps(-2)", "steps(0, step-end, 1)" ]
4243 },
4244 "-moz-animation": {
4245 domProp: "MozAnimation",
4246 inherited: false,
4247 type: CSS_TYPE_TRUE_SHORTHAND,
4248 alias_for: "animation",
4249 subproperties: [ "animation-name", "animation-duration", "animation-timing-function", "animation-delay", "animation-direction", "animation-fill-mode", "animation-iteration-count" ],
4250 initial_values: [ "none none 0s 0s ease normal 1.0", "none", "0s", "ease", "normal", "1.0" ],
4251 other_values: [ "bounce 1s linear 2s", "bounce 1s 2s linear", "bounce linear 1s 2s", "linear bounce 1s 2s", "linear 1s bounce 2s", "linear 1s 2s bounce", "1s bounce linear 2s", "1s bounce 2s linear", "1s 2s bounce linear", "1s linear bounce 2s", "1s linear 2s bounce", "1s 2s linear bounce", "bounce linear 1s", "bounce 1s linear", "linear bounce 1s", "linear 1s bounce", "1s bounce linear", "1s linear bounce", "1s 2s bounce", "1s bounce 2s", "bounce 1s 2s", "1s 2s linear", "1s linear 2s", "linear 1s 2s", "bounce 1s", "1s bounce", "linear 1s", "1s linear", "1s 2s", "2s 1s", "bounce", "linear", "1s", "height", "2s", "ease-in-out", "2s ease-in", "opacity linear", "ease-out 2s", "2s color, 1s bounce, 500ms height linear, 1s opacity 4s cubic-bezier(0.0, 0.1, 1.0, 1.0)", "1s \\32bounce linear 2s", "1s -bounce linear 2s", "1s -\\32bounce linear 2s", "1s \\32 0bounce linear 2s", "1s -\\32 0bounce linear 2s", "1s \\2bounce linear 2s", "1s -\\2bounce linear 2s", "2s, 1s bounce", "1s bounce, 2s", "2s all, 1s bounce", "1s bounce, 2s all", "1s bounce, 2s none", "2s none, 1s bounce", "2s bounce, 1s all", "2s all, 1s bounce" ],
4252 invalid_values: [ "2s inherit", "inherit 2s", "2s bounce, 1s inherit", "2s inherit, 1s bounce", "2s initial" ]
4253 },
4254 "-moz-animation-delay": {
4255 domProp: "MozAnimationDelay",
4256 inherited: false,
4257 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
4258 alias_for: "animation-delay",
4259 subproperties: [ "animation-delay" ],
4260 initial_values: [ "0s", "0ms" ],
4261 other_values: [ "1s", "250ms", "-100ms", "-1s", "1s, 250ms, 2.3s"],
4262 invalid_values: [ "0", "0px" ]
4263 },
4264 "-moz-animation-direction": {
4265 domProp: "MozAnimationDirection",
4266 inherited: false,
4267 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
4268 alias_for: "animation-direction",
4269 subproperties: [ "animation-direction" ],
4270 initial_values: [ "normal" ],
4271 other_values: [ "alternate", "normal, alternate", "alternate, normal", "normal, normal", "normal, normal, normal", "reverse", "alternate-reverse", "normal, reverse, alternate-reverse, alternate" ],
4272 invalid_values: [ "normal normal", "inherit, normal", "reverse-alternate" ]
4273 },
4274 "-moz-animation-duration": {
4275 domProp: "MozAnimationDuration",
4276 inherited: false,
4277 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
4278 alias_for: "animation-duration",
4279 subproperties: [ "animation-duration" ],
4280 initial_values: [ "0s", "0ms" ],
4281 other_values: [ "1s", "250ms", "1s, 250ms, 2.3s"],
4282 invalid_values: [ "0", "0px", "-1ms", "-2s" ]
4283 },
4284 "-moz-animation-fill-mode": {
4285 domProp: "MozAnimationFillMode",
4286 inherited: false,
4287 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
4288 alias_for: "animation-fill-mode",
4289 subproperties: [ "animation-fill-mode" ],
4290 initial_values: [ "none" ],
4291 other_values: [ "forwards", "backwards", "both", "none, none", "forwards, backwards", "forwards, none", "none, both" ],
4292 invalid_values: [ "all"]
4293 },
4294 "-moz-animation-iteration-count": {
4295 domProp: "MozAnimationIterationCount",
4296 inherited: false,
4297 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
4298 alias_for: "animation-iteration-count",
4299 subproperties: [ "animation-iteration-count" ],
4300 initial_values: [ "1" ],
4301 other_values: [ "infinite", "0", "0.5", "7.75", "-0.0", "1, 2, 3", "infinite, 2", "1, infinite" ],
4302 // negatives forbidden per
4303 // http://lists.w3.org/Archives/Public/www-style/2011Mar/0355.html
4304 invalid_values: [ "none", "-1", "-0.5", "-1, infinite", "infinite, -3" ]
4305 },
4306 "-moz-animation-name": {
4307 domProp: "MozAnimationName",
4308 inherited: false,
4309 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
4310 alias_for: "animation-name",
4311 subproperties: [ "animation-name" ],
4312 initial_values: [ "none" ],
4313 other_values: [ "all", "ball", "mall", "color", "bounce, bubble, opacity", "foobar", "auto", "\\32bounce", "-bounce", "-\\32bounce", "\\32 0bounce", "-\\32 0bounce", "\\2bounce", "-\\2bounce" ],
4314 invalid_values: [ "bounce, initial", "initial, bounce", "bounce, inherit", "inherit, bounce" ]
4315 },
4316 "-moz-animation-play-state": {
4317 domProp: "MozAnimationPlayState",
4318 inherited: false,
4319 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
4320 alias_for: "animation-play-state",
4321 subproperties: [ "animation-play-state" ],
4322 initial_values: [ "running" ],
4323 other_values: [ "paused", "running, running", "paused, running", "paused, paused", "running, paused", "paused, running, running, running, paused, running" ],
4324 invalid_values: [ "0" ]
4325 },
4326 "-moz-animation-timing-function": {
4327 domProp: "MozAnimationTimingFunction",
4328 inherited: false,
4329 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
4330 alias_for: "animation-timing-function",
4331 subproperties: [ "animation-timing-function" ],
4332 initial_values: [ "ease", "cubic-bezier(0.25, 0.1, 0.25, 1.0)" ],
4333 other_values: [ "linear", "ease-in", "ease-out", "ease-in-out", "linear, ease-in, cubic-bezier(0.1, 0.2, 0.8, 0.9)", "cubic-bezier(0.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.25, 1.5, 0.75, -0.5)", "step-start", "step-end", "steps(1)", "steps(2, start)", "steps(386)", "steps(3, end)" ],
4334 invalid_values: [ "none", "auto", "cubic-bezier(0.25, 0.1, 0.25)", "cubic-bezier(0.25, 0.1, 0.25, 0.25, 1.0)", "cubic-bezier(-0.5, 0.5, 0.5, 0.5)", "cubic-bezier(1.5, 0.5, 0.5, 0.5)", "cubic-bezier(0.5, 0.5, -0.5, 0.5)", "cubic-bezier(0.5, 0.5, 1.5, 0.5)", "steps(2, step-end)", "steps(0)", "steps(-2)", "steps(0, step-end, 1)" ]
4335 }
4336 }
4337
4338 function logical_box_prop_get_computed(cs, property)
4339 {
4340 if (! /^-moz-/.test(property))
4341 throw "Unexpected property";
4342 property = property.substring(5);
4343 if (cs.getPropertyValue("direction") == "ltr")
4344 property = property.replace("-start", "-left").replace("-end", "-right");
4345 else
4346 property = property.replace("-start", "-right").replace("-end", "-left");
4347 return cs.getPropertyValue(property);
4348 }
4349
4350 // Get the computed value for a property. For shorthands, return the
4351 // computed values of all the subproperties, delimited by " ; ".
4352 function get_computed_value(cs, property)
4353 {
4354 var info = gCSSProperties[property];
4355 if (info.type == CSS_TYPE_TRUE_SHORTHAND ||
4356 (info.type == CSS_TYPE_SHORTHAND_AND_LONGHAND &&
4357 property == "text-decoration")) {
4358 var results = [];
4359 for (var idx in info.subproperties) {
4360 var subprop = info.subproperties[idx];
4361 results.push(get_computed_value(cs, subprop));
4362 }
4363 return results.join(" ; ");
4364 }
4365 if (info.get_computed)
4366 return info.get_computed(cs, property);
4367 return cs.getPropertyValue(property);
4368 }
4369
4370 if (SpecialPowers.getBoolPref("layout.css.touch_action.enabled")) {
4371 gCSSProperties["touch-action"] = {
4372 domProp: "touchAction",
4373 inherited: false,
4374 type: CSS_TYPE_LONGHAND,
4375 initial_values: ["auto"],
4376 other_values: ["none", "pan-x", "pan-y", "pan-x pan-y", "pan-y pan-x", "manipulation"],
4377 invalid_values: ["zoom", "pinch", "tap", "10px", "2", "auto pan-x", "pan-x auto", "none pan-x", "pan-x none",
4378 "auto pan-y", "pan-y auto", "none pan-y", "pan-y none", "pan-x pan-x", "pan-y pan-y",
4379 "pan-x pan-y none", "pan-x none pan-y", "none pan-x pan-y", "pan-y pan-x none", "pan-y none pan-x", "none pan-y pan-x",
4380 "pan-x pan-y auto", "pan-x auto pan-y", "auto pan-x pan-y", "pan-y pan-x auto", "pan-y auto pan-x", "auto pan-y pan-x",
4381 "pan-x pan-y zoom", "pan-x zoom pan-y", "zoom pan-x pan-y", "pan-y pan-x zoom", "pan-y zoom pan-x", "zoom pan-y pan-x",
4382 "pan-x pan-y pan-x", "pan-x pan-x pan-y", "pan-y pan-x pan-x", "pan-y pan-x pan-y", "pan-y pan-y pan-x", "pan-x pan-y pan-y",
4383 "manipulation none", "none manipulation", "manipulation auto", "auto manipulation", "manipulation zoom", "zoom manipulation",
4384 "manipulation manipulation", "manipulation pan-x", "pan-x manipulation", "manipulation pan-y", "pan-y manipulation",
4385 "manipulation pan-x pan-y", "pan-x manipulation pan-y", "pan-x pan-y manipulation",
4386 "manipulation pan-y pan-x", "pan-y manipulation pan-x", "pan-y pan-x manipulation"]
4387 };
4388 }
4389
4390 if (SpecialPowers.getBoolPref("layout.css.vertical-text.enabled")) {
4391 var verticalTextProperties = {
4392 "writing-mode": {
4393 domProp: "writingMode",
4394 inherited: true,
4395 type: CSS_TYPE_LONGHAND,
4396 initial_values: [ "horizontal-tb" ],
4397 other_values: [ "vertical-lr", "vertical-rl" ],
4398 invalid_values: [ "10px", "30%", "justify", "auto", "1em" ]
4399 },
4400 "text-orientation": {
4401 domProp: "textOrientation",
4402 inherited: true,
4403 type: CSS_TYPE_LONGHAND,
4404 initial_values: [ "auto" ],
4405 other_values: [ "upright", "sideways" ],
4406 invalid_values: [ "none", "3em" ]
4407 },
4408 "text-combine-upright": {
4409 domProp: "textCombineUpright",
4410 inherited: true,
4411 type: CSS_TYPE_LONGHAND,
4412 initial_values: [ "none" ],
4413 other_values: [ "all", "digits", "digits 2", "digits 3", "digits 4", "digits 3" ],
4414 invalid_values: [ "auto", "all 2", "none all", "digits -3", "digits 0",
4415 "digits 12", "none 3", "digits 3.1415", "digits3", "digits 1",
4416 "digits 3 all", "digits foo", "digits all", "digits 3.0" ]
4417 }
4418 };
4419 for (var prop in verticalTextProperties) {
4420 gCSSProperties[prop] = verticalTextProperties[prop];
4421 }
4422 }
4423
4424 if (SpecialPowers.getBoolPref("layout.css.font-features.enabled")) {
4425 var fontFeatureProperties = {
4426 "font-kerning": {
4427 domProp: "fontKerning",
4428 inherited: true,
4429 type: CSS_TYPE_LONGHAND,
4430 initial_values: [ "auto" ],
4431 other_values: [ "normal", "none" ],
4432 invalid_values: [ "on" ]
4433 },
4434 "font-variant-alternates": {
4435 domProp: "fontVariantAlternates",
4436 inherited: true,
4437 type: CSS_TYPE_LONGHAND,
4438 initial_values: [ "normal" ],
4439 other_values: [ "historical-forms",
4440 "styleset(alt-a, alt-b)", "character-variant(a, b, c)", "annotation(circled)",
4441 "swash(squishy)", "styleset(complex\\ blob, a)", "annotation(\\62 lah)" ],
4442 invalid_values: [ "historical-forms normal", "historical-forms historical-forms",
4443 "swash", "swash(3)", "annotation(a, b)", "ornaments(a,b)",
4444 "styleset(1234blah)", "annotation(a), annotation(b)", "annotation(a) normal" ]
4445 },
4446 "font-variant-caps": {
4447 domProp: "fontVariantCaps",
4448 inherited: true,
4449 type: CSS_TYPE_LONGHAND,
4450 initial_values: [ "normal" ],
4451 other_values: [ "small-caps", "all-small-caps", "petite-caps", "all-petite-caps", "titling-caps", "unicase" ],
4452 invalid_values: [ "normal small-caps", "petite-caps normal", "unicase unicase" ]
4453 },
4454 "font-variant-east-asian": {
4455 domProp: "fontVariantEastAsian",
4456 inherited: true,
4457 type: CSS_TYPE_LONGHAND,
4458 initial_values: [ "normal" ],
4459 other_values: [ "jis78", "jis83", "jis90", "jis04", "simplified", "traditional", "full-width", "proportional-width", "ruby",
4460 "jis78 full-width", "jis78 full-width ruby", "simplified proportional-width", "ruby simplified" ],
4461 invalid_values: [ "jis78 normal", "jis90 jis04", "simplified traditional", "full-width proportional-width",
4462 "ruby simplified ruby", "jis78 ruby simplified" ]
4463 },
4464 "font-variant-ligatures": {
4465 domProp: "fontVariantLigatures",
4466 inherited: true,
4467 type: CSS_TYPE_LONGHAND,
4468 initial_values: [ "normal" ],
4469 other_values: [ "none", "common-ligatures", "no-common-ligatures", "discretionary-ligatures", "no-discretionary-ligatures",
4470 "historical-ligatures", "no-historical-ligatures", "contextual", "no-contextual",
4471 "common-ligatures no-discretionary-ligatures", "contextual no-discretionary-ligatures",
4472 "historical-ligatures no-common-ligatures", "no-historical-ligatures discretionary-ligatures",
4473 "common-ligatures no-discretionary-ligatures historical-ligatures no-contextual" ],
4474 invalid_values: [ "common-ligatures normal", "common-ligatures no-common-ligatures", "common-ligatures common-ligatures",
4475 "no-historical-ligatures historical-ligatures", "no-discretionary-ligatures discretionary-ligatures",
4476 "no-contextual contextual", "common-ligatures no-discretionary-ligatures no-common-ligatures",
4477 "common-ligatures none", "no-discretionary-ligatures none", "none common-ligatures" ]
4478 },
4479 "font-variant-numeric": {
4480 domProp: "fontVariantNumeric",
4481 inherited: true,
4482 type: CSS_TYPE_LONGHAND,
4483 initial_values: [ "normal" ],
4484 other_values: [ "lining-nums", "oldstyle-nums", "proportional-nums", "tabular-nums", "diagonal-fractions",
4485 "stacked-fractions", "slashed-zero", "ordinal", "lining-nums diagonal-fractions",
4486 "tabular-nums stacked-fractions", "tabular-nums slashed-zero stacked-fractions",
4487 "proportional-nums slashed-zero diagonal-fractions oldstyle-nums ordinal" ],
4488 invalid_values: [ "lining-nums normal", "lining-nums oldstyle-nums", "lining-nums normal slashed-zero ordinal",
4489 "proportional-nums tabular-nums", "diagonal-fractions stacked-fractions", "slashed-zero diagonal-fractions slashed-zero",
4490 "lining-nums slashed-zero diagonal-fractions oldstyle-nums", "diagonal-fractions diagonal-fractions" ]
4491 },
4492 "font-variant-position": {
4493 domProp: "fontVariantPosition",
4494 inherited: true,
4495 type: CSS_TYPE_LONGHAND,
4496 initial_values: [ "normal" ],
4497 other_values: [ "super", "sub" ],
4498 invalid_values: [ "normal sub", "super sub" ]
4499 },
4500 "font-synthesis": {
4501 domProp: "fontSynthesis",
4502 inherited: true,
4503 type: CSS_TYPE_LONGHAND,
4504 initial_values: [ "weight style" ],
4505 other_values: [ "none", "weight", "style" ],
4506 invalid_values: [ "weight none", "style none", "none style", "weight 10px", "weight weight", "style style" ]
4507 },
4508 // aliases for prefixed properties
4509 "font-feature-settings": {
4510 domProp: "fontFeatureSettings",
4511 inherited: true,
4512 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
4513 alias_for: "-moz-font-feature-settings",
4514 subproperties: [ "-moz-font-feature-settings" ],
4515 initial_values: [ "normal" ],
4516 other_values: [
4517 "'liga' on", "'liga'", "\"liga\" 1", "'liga', 'clig' 1",
4518 "\"liga\" off", "\"liga\" 0", '"cv01" 3, "cv02" 4',
4519 '"cswh", "smcp" off, "salt" 4', '"cswh" 1, "smcp" off, "salt" 4',
4520 '"cswh" 0, \'blah\', "liga", "smcp" off, "salt" 4',
4521 '"liga" ,"smcp" 0 , "blah"'
4522 ],
4523 invalid_values: [
4524 'liga', 'liga 1', 'liga normal', '"liga" normal', 'normal liga',
4525 'normal "liga"', 'normal, "liga"', '"liga=1"', "'foobar' on",
4526 '"blahblah" 0', '"liga" 3.14', '"liga" 1 3.14', '"liga" 1 normal',
4527 '"liga" 1 off', '"liga" on off', '"liga" , 0 "smcp"', '"liga" "smcp"'
4528 ]
4529 },
4530 "font-language-override": {
4531 domProp: "fontLanguageOverride",
4532 inherited: true,
4533 type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
4534 alias_for: "-moz-font-language-override",
4535 subproperties: [ "-moz-font-language-override" ],
4536 initial_values: [ "normal" ],
4537 other_values: [ "'ENG'", "'TRK'", "\"TRK\"", "'N\\'Ko'" ],
4538 invalid_values: [ "TRK", "ja" ]
4539 }
4540 };
4541 for (var prop in fontFeatureProperties) {
4542 gCSSProperties[prop] = fontFeatureProperties[prop];
4543 }
4544 var fontAdditions = [ "font-kerning", "font-synthesis", "font-variant-alternates", "font-variant-caps", "font-variant-east-asian", "font-variant-ligatures", "font-variant-numeric", "font-variant-position" ];
4545 gCSSProperties["font"].subproperties = gCSSProperties["font"].subproperties.concat(fontAdditions);
4546 }
4547
4548 if (SpecialPowers.getBoolPref("layout.css.masking.enabled")) {
4549 gCSSProperties["mask-type"] = {
4550 domProp: "maskType",
4551 inherited: false,
4552 type: CSS_TYPE_LONGHAND,
4553 initial_values: [ "luminance" ],
4554 other_values: [ "alpha" ],
4555 invalid_values: []
4556 };
4557 }
4558
4559 if (SpecialPowers.getBoolPref("svg.paint-order.enabled")) {
4560 gCSSProperties["paint-order"] = {
4561 domProp: "paintOrder",
4562 inherited: true,
4563 type: CSS_TYPE_LONGHAND,
4564 initial_values: [ "normal" ],
4565 other_values: [ "fill", "fill stroke", "fill stroke markers", "stroke markers fill" ],
4566 invalid_values: [ "fill stroke markers fill", "fill normal" ]
4567 };
4568 }
4569
4570 if (SpecialPowers.getBoolPref("layout.css.filters.enabled")) {
4571 gCSSProperties["filter"] = {
4572 domProp: "filter",
4573 inherited: false,
4574 type: CSS_TYPE_LONGHAND,
4575 initial_values: [ "none" ],
4576 other_values: [
4577 // SVG reference filters
4578 "url(#my-filter)",
4579 "url(#my-filter-1) url(#my-filter-2)",
4580
4581 // Filter functions
4582 "opacity(50%) saturate(1.0)",
4583 "invert(50%) sepia(0.1) brightness(90%)",
4584
4585 // Mixed SVG reference filters and filter functions
4586 "grayscale(1) url(#my-filter-1)",
4587 "url(#my-filter-1) brightness(50%) contrast(0.9)",
4588
4589 // The CSS parser will accept these weird URLs. However, we'll fail
4590 // to resolve them when computing style, so we'll fall back to the
4591 // initial value ("none").
4592 "url('feed:javascript:5')",
4593 "blur(3px) url('feed:javascript:5') grayscale(50%)",
4594
4595 "blur(0)",
4596 "blur(0px)",
4597 "blur(0.5px)",
4598 "blur(3px)",
4599 "blur(100px)",
4600 "blur(0.1em)",
4601 "blur(calc(-1px))", // Parses and becomes blur(0px).
4602 "blur(calc(0px))",
4603 "blur(calc(5px))",
4604 "blur(calc(2 * 5px))",
4605
4606 "brightness(0)",
4607 "brightness(50%)",
4608 "brightness(1)",
4609 "brightness(1.0)",
4610 "brightness(2)",
4611 "brightness(350%)",
4612 "brightness(4.567)",
4613
4614 "contrast(0)",
4615 "contrast(50%)",
4616 "contrast(1)",
4617 "contrast(1.0)",
4618 "contrast(2)",
4619 "contrast(350%)",
4620 "contrast(4.567)",
4621
4622 "drop-shadow(2px 2px)",
4623 "drop-shadow(2px 2px 1px)",
4624 "drop-shadow(2px 2px green)",
4625 "drop-shadow(2px 2px 1px green)",
4626 "drop-shadow(green 2px 2px)",
4627 "drop-shadow(green 2px 2px 1px)",
4628 "drop-shadow(currentColor 3px 3px)",
4629 "drop-shadow(2px 2px calc(-5px))", /* clamped */
4630 "drop-shadow(calc(3em - 2px) 2px green)",
4631 "drop-shadow(green calc(3em - 2px) 2px)",
4632 "drop-shadow(2px calc(2px + 0.2em))",
4633 "drop-shadow(blue 2px calc(2px + 0.2em))",
4634 "drop-shadow(2px calc(2px + 0.2em) blue)",
4635 "drop-shadow(calc(-2px) calc(-2px))",
4636 "drop-shadow(-2px -2px)",
4637 "drop-shadow(calc(2px) calc(2px))",
4638 "drop-shadow(calc(2px) calc(2px) calc(2px))",
4639
4640 "grayscale(0)",
4641 "grayscale(50%)",
4642 "grayscale(1)",
4643 "grayscale(1.0)",
4644 "grayscale(2)",
4645 "grayscale(350%)",
4646 "grayscale(4.567)",
4647
4648 "hue-rotate(0deg)",
4649 "hue-rotate(90deg)",
4650 "hue-rotate(540deg)",
4651 "hue-rotate(-90deg)",
4652 "hue-rotate(10grad)",
4653 "hue-rotate(1.6rad)",
4654 "hue-rotate(-1.6rad)",
4655 "hue-rotate(0.5turn)",
4656 "hue-rotate(-2turn)",
4657
4658 "invert(0)",
4659 "invert(50%)",
4660 "invert(1)",
4661 "invert(1.0)",
4662 "invert(2)",
4663 "invert(350%)",
4664 "invert(4.567)",
4665
4666 "opacity(0)",
4667 "opacity(50%)",
4668 "opacity(1)",
4669 "opacity(1.0)",
4670 "opacity(2)",
4671 "opacity(350%)",
4672 "opacity(4.567)",
4673
4674 "saturate(0)",
4675 "saturate(50%)",
4676 "saturate(1)",
4677 "saturate(1.0)",
4678 "saturate(2)",
4679 "saturate(350%)",
4680 "saturate(4.567)",
4681
4682 "sepia(0)",
4683 "sepia(50%)",
4684 "sepia(1)",
4685 "sepia(1.0)",
4686 "sepia(2)",
4687 "sepia(350%)",
4688 "sepia(4.567)",
4689 ],
4690 invalid_values: [
4691 // none
4692 "none none",
4693 "url(#my-filter) none",
4694 "none url(#my-filter)",
4695 "blur(2px) none url(#my-filter)",
4696
4697 // Nested filters
4698 "grayscale(invert(1.0))",
4699
4700 // Comma delimited filters
4701 "url(#my-filter),",
4702 "invert(50%), url(#my-filter), brightness(90%)",
4703
4704 // Test the following situations for each filter function:
4705 // - Invalid number of arguments
4706 // - Comma delimited arguments
4707 // - Wrong argument type
4708 // - Argument value out of range
4709 "blur()",
4710 "blur(3px 5px)",
4711 "blur(3px,)",
4712 "blur(3px, 5px)",
4713 "blur(#my-filter)",
4714 "blur(0.5)",
4715 "blur(50%)",
4716 "blur(calc(0))", // Unitless zero in calc is not a valid length.
4717 "blur(calc(0.1))",
4718 "blur(calc(10%))",
4719 "blur(calc(20px - 5%))",
4720 "blur(-3px)",
4721
4722 "brightness()",
4723 "brightness(0.5 0.5)",
4724 "brightness(0.5,)",
4725 "brightness(0.5, 0.5)",
4726 "brightness(#my-filter)",
4727 "brightness(10px)",
4728 "brightness(-1)",
4729
4730 "contrast()",
4731 "contrast(0.5 0.5)",
4732 "contrast(0.5,)",
4733 "contrast(0.5, 0.5)",
4734 "contrast(#my-filter)",
4735 "contrast(10px)",
4736 "contrast(-1)",
4737
4738 "drop-shadow()",
4739 "drop-shadow(3% 3%)",
4740 "drop-shadow(2px 2px -5px)",
4741 "drop-shadow(2px 2px 2px 2px)",
4742 "drop-shadow(2px 2px, none)",
4743 "drop-shadow(none, 2px 2px)",
4744 "drop-shadow(inherit, 2px 2px)",
4745 "drop-shadow(2px 2px, inherit)",
4746 "drop-shadow(2 2px)",
4747 "drop-shadow(2px 2)",
4748 "drop-shadow(2px 2px 2)",
4749 "drop-shadow(2px 2px 2px 2)",
4750 "drop-shadow(calc(2px) calc(2px) calc(2px) calc(2px))",
4751 "drop-shadow(green 2px 2px, blue 1px 3px 4px)",
4752 "drop-shadow(blue 2px 2px, currentColor 1px 2px)",
4753
4754 "grayscale()",
4755 "grayscale(0.5 0.5)",
4756 "grayscale(0.5,)",
4757 "grayscale(0.5, 0.5)",
4758 "grayscale(#my-filter)",
4759 "grayscale(10px)",
4760 "grayscale(-1)",
4761
4762 "hue-rotate()",
4763 "hue-rotate(0)",
4764 "hue-rotate(0.5 0.5)",
4765 "hue-rotate(0.5,)",
4766 "hue-rotate(0.5, 0.5)",
4767 "hue-rotate(#my-filter)",
4768 "hue-rotate(10px)",
4769 "hue-rotate(-1)",
4770 "hue-rotate(45deg,)",
4771
4772 "invert()",
4773 "invert(0.5 0.5)",
4774 "invert(0.5,)",
4775 "invert(0.5, 0.5)",
4776 "invert(#my-filter)",
4777 "invert(10px)",
4778 "invert(-1)",
4779
4780 "opacity()",
4781 "opacity(0.5 0.5)",
4782 "opacity(0.5,)",
4783 "opacity(0.5, 0.5)",
4784 "opacity(#my-filter)",
4785 "opacity(10px)",
4786 "opacity(-1)",
4787
4788 "saturate()",
4789 "saturate(0.5 0.5)",
4790 "saturate(0.5,)",
4791 "saturate(0.5, 0.5)",
4792 "saturate(#my-filter)",
4793 "saturate(10px)",
4794 "saturate(-1)",
4795
4796 "sepia()",
4797 "sepia(0.5 0.5)",
4798 "sepia(0.5,)",
4799 "sepia(0.5, 0.5)",
4800 "sepia(#my-filter)",
4801 "sepia(10px)",
4802 "sepia(-1)",
4803 ]
4804 };
4805 }
4806
4807 if (SpecialPowers.getBoolPref("layout.css.grid.enabled")) {
4808 gCSSProperties["display"].other_values.push("grid", "inline-grid");
4809 gCSSProperties["grid-auto-flow"] = {
4810 domProp: "gridAutoFlow",
4811 inherited: false,
4812 type: CSS_TYPE_LONGHAND,
4813 initial_values: [ "none" ],
4814 other_values: [
4815 "column",
4816 "row",
4817 "column dense",
4818 "row dense",
4819 "dense column",
4820 "dense row",
4821 ],
4822 invalid_values: [
4823 "",
4824 "auto",
4825 "10px",
4826 "dense",
4827 "none row",
4828 "none dense",
4829 "column row",
4830 "dense row dense",
4831 ]
4832 };
4833
4834 gCSSProperties["grid-auto-columns"] = {
4835 domProp: "gridAutoColumns",
4836 inherited: false,
4837 type: CSS_TYPE_LONGHAND,
4838 initial_values: [ "auto" ],
4839 other_values: [
4840 "40px",
4841 "2em",
4842 "2.5fr",
4843 "12%",
4844 "min-content",
4845 "max-content",
4846 "calc(20px + 10%)",
4847 "minmax(20px, max-content)",
4848 "m\\69nmax(20px, 4Fr)",
4849 "MinMax(min-content, calc(20px + 10%))",
4850 ],
4851 invalid_values: [
4852 "",
4853 "normal",
4854 "40ms",
4855 "-40px",
4856 "-12%",
4857 "-2em",
4858 "-2.5fr",
4859 "minmax()",
4860 "minmax(20px)",
4861 "mİnmax(20px, 100px)",
4862 "minmax(20px, 100px, 200px)",
4863 "maxmin(100px, 20px)",
4864 "minmax(min-content, auto)",
4865 "minmax(min-content, minmax(30px, max-content))",
4866 ]
4867 };
4868 gCSSProperties["grid-auto-rows"] = {
4869 domProp: "gridAutoRows",
4870 inherited: false,
4871 type: CSS_TYPE_LONGHAND,
4872 initial_values: gCSSProperties["grid-auto-columns"].initial_values,
4873 other_values: gCSSProperties["grid-auto-columns"].other_values,
4874 invalid_values: gCSSProperties["grid-auto-columns"].invalid_values
4875 };
4876
4877 gCSSProperties["grid-template-columns"] = {
4878 domProp: "gridTemplateColumns",
4879 inherited: false,
4880 type: CSS_TYPE_LONGHAND,
4881 initial_values: [ "none" ],
4882 other_values: [
4883 "auto",
4884 "40px",
4885 "2.5fr",
4886 "(normal) 40px () auto ( ) 12%",
4887 "(foo) 40px min-content ( bar ) calc(20px + 10%) max-content",
4888 "40px min-content calc(20px + 10%) max-content",
4889 "m\\69nmax(20px, 4Fr)",
4890 "40px MinMax(min-content, calc(20px + 10%)) max-content",
4891 "40px 2em",
4892 "() 40px (-foo) 2em (bar baz This\ is\ one\ ident)",
4893 // TODO bug 978478: "(a) repeat(3, (b) 20px (c) 40px (d)) (e)",
4894 "repeat(1, 20px)",
4895 "repeat(1, (a) 20px)",
4896 "(a) Repeat(4, (a) 20px () auto (b c)) (d)",
4897 "(a) 2.5fr Repeat(4, (a) 20px () auto (b c)) (d)",
4898 "(a) 2.5fr (z) Repeat(4, (a) 20px () auto (b c)) (d)",
4899 "(a) 2.5fr (z) Repeat(4, (a) 20px () auto) (d)",
4900 "(a) 2.5fr (z) Repeat(4, 20px (b c) auto (b c)) (d)",
4901 "(a) 2.5fr (z) Repeat(4, 20px auto) (d)",
4902
4903 // See https://bugzilla.mozilla.org/show_bug.cgi?id=981300
4904 "(none auto subgrid min-content max-content foo) 40px",
4905
4906 "subgrid",
4907 "subgrid () (foo bar)",
4908 "subgrid repeat(1, ())",
4909 "subgrid Repeat(4, (a) (b c) () (d))",
4910 ],
4911 invalid_values: [
4912 "",
4913 "normal",
4914 "40ms",
4915 "-40px",
4916 "-12%",
4917 "-2fr",
4918 "(foo)",
4919 "(inherit) 40px",
4920 "(initial) 40px",
4921 "(unset) 40px",
4922 "(default) 40px",
4923 "(6%) 40px",
4924 "(5th) 40px",
4925 "(foo() bar) 40px",
4926 "(foo)) 40px",
4927 "[foo] 40px",
4928 "(foo) (bar) 40px",
4929 "40px (foo) (bar)",
4930 "minmax()",
4931 "minmax(20px)",
4932 "mİnmax(20px, 100px)",
4933 "minmax(20px, 100px, 200px)",
4934 "maxmin(100px, 20px)",
4935 "minmax(min-content, auto)",
4936 "minmax(min-content, minmax(30px, max-content))",
4937 "repeat(0, 20px)",
4938 "repeat(-3, 20px)",
4939 "rêpeat(1, 20px)",
4940 "repeat(1)",
4941 "repeat(1, )",
4942 "repeat(3px, 20px)",
4943 "repeat(2.0, 20px)",
4944 "repeat(2.5, 20px)",
4945 "repeat(2, (foo))",
4946 "repeat(2, foo)",
4947 "subgrid (foo) 40px",
4948 "subgrid (foo 40px)",
4949 "(foo) subgrid",
4950 "subgrid rêpeat(1, ())",
4951 "subgrid repeat(0, ())",
4952 "subgrid repeat(-3, ())",
4953 "subgrid repeat(2.0, ())",
4954 "subgrid repeat(2.5, ())",
4955 "subgrid repeat(3px, ())",
4956 "subgrid repeat(1)",
4957 "subgrid repeat(1, )",
4958 "subgrid repeat(2, (40px))",
4959 "subgrid repeat(2, foo)",
4960 ],
4961 unbalanced_values: [
4962 "(foo] 40px",
4963 ]
4964 };
4965 gCSSProperties["grid-template-rows"] = {
4966 domProp: "gridTemplateRows",
4967 inherited: false,
4968 type: CSS_TYPE_LONGHAND,
4969 initial_values: gCSSProperties["grid-template-columns"].initial_values,
4970 other_values: gCSSProperties["grid-template-columns"].other_values,
4971 invalid_values: gCSSProperties["grid-template-columns"].invalid_values
4972 };
4973 gCSSProperties["grid-template-areas"] = {
4974 domProp: "gridTemplateAreas",
4975 inherited: false,
4976 type: CSS_TYPE_LONGHAND,
4977 initial_values: [ "none" ],
4978 other_values: [
4979 "''",
4980 "'' ''",
4981 "'1a-é_ .' \"b .\"",
4982 "' Z\t\\aZ' 'Z Z'",
4983 " '. . a b' '..a b' ",
4984 ],
4985 invalid_values: [
4986 "'a b' 'a/b'",
4987 "'a . a'",
4988 "'. a a' 'a a a'",
4989 "'a a .' 'a a a'",
4990 "'a a' 'a .'",
4991 "'a a'\n'..'\n'a a'",
4992 ]
4993 };
4994
4995 gCSSProperties["grid-template"] = {
4996 domProp: "gridTemplate",
4997 inherited: false,
4998 type: CSS_TYPE_TRUE_SHORTHAND,
4999 subproperties: [
5000 "grid-template-areas",
5001 "grid-template-columns",
5002 "grid-template-rows",
5003 ],
5004 initial_values: [
5005 "none",
5006 "none / none",
5007 ],
5008 other_values: [
5009 "subgrid",
5010 // <'grid-template-columns'> / <'grid-template-rows'>
5011 "40px / 100px",
5012 "(foo) 40px (bar) / (baz) 100px (fizz)",
5013 " none/100px",
5014 "40px/none",
5015 "subgrid/40px 20px",
5016 "subgrid (foo) () (bar baz) / 40px 20px",
5017 "40px 20px/subgrid",
5018 "40px 20px/subgrid (foo) () repeat(3, (a) (b)) (bar baz)",
5019 "subgrid/subgrid",
5020 "subgrid (foo) () (bar baz)/subgrid (foo) () (bar baz)",
5021 // [ <track-list> / ]? [ <line-names>? <string> <track-size>? <line-names>? ]+
5022 "'fizz'",
5023 "(bar) 'fizz'",
5024 "(foo) 40px / 'fizz'",
5025 "(foo) 40px / (bar) 'fizz'",
5026 "(foo) 40px / 'fizz' 100px",
5027 "(foo) 40px / (bar) 'fizz' 100px",
5028 "(foo) 40px / (bar) 'fizz' 100px (buzz)",
5029 "(foo) 40px / (bar) 'fizz' 100px (buzz) \n (a) '.' 200px (b)",
5030 ],
5031 invalid_values: [
5032 "subgrid ()",
5033 "subgrid () / 'fizz'",
5034 "subgrid / 'fizz'",
5035 "(foo) (bar) 40px / 100px",
5036 "40px / (fizz) (buzz) 100px",
5037 "40px / (fizz) (buzz) 'foo'",
5038 "none / 'foo'"
5039 ]
5040 };
5041
5042 gCSSProperties["grid"] = {
5043 domProp: "grid",
5044 inherited: false,
5045 type: CSS_TYPE_TRUE_SHORTHAND,
5046 subproperties: [
5047 "grid-template-areas",
5048 "grid-template-columns",
5049 "grid-template-rows",
5050 "grid-auto-flow",
5051 "grid-auto-columns",
5052 "grid-auto-rows",
5053 ],
5054 initial_values: [
5055 "none",
5056 "none / none",
5057 "none auto",
5058 "none auto / auto",
5059 ],
5060 other_values: [
5061 "row",
5062 "none 40px",
5063 "column dense auto",
5064 "dense row minmax(min-content, 2fr)",
5065 "row 40px / 100px",
5066 ].concat(
5067 gCSSProperties["grid-template"].other_values,
5068 gCSSProperties["grid-auto-flow"].other_values
5069 ),
5070 invalid_values: [
5071 "row column 40px",
5072 "row -20px",
5073 "row 200ms",
5074 "row 40px 100px",
5075 ].concat(
5076 gCSSProperties["grid-template"].invalid_values,
5077 gCSSProperties["grid-auto-flow"].invalid_values
5078 )
5079 };
5080
5081 var gridLineOtherValues = [
5082 "foo",
5083 "2",
5084 "2 foo",
5085 "foo 2",
5086 "-3",
5087 "-3 bar",
5088 "bar -3",
5089 "span 2",
5090 "2 span",
5091 "span foo",
5092 "foo span",
5093 "span 2 foo",
5094 "span foo 2",
5095 "2 foo span",
5096 "foo 2 span",
5097 ];
5098 var gridLineInvalidValues = [
5099 "",
5100 "4th",
5101 "span",
5102 "inherit 2",
5103 "2 inherit",
5104 "20px",
5105 "2 3",
5106 "2.5",
5107 "2.0",
5108 "0",
5109 "0 foo",
5110 "span 0",
5111 "2 foo 3",
5112 "foo 2 foo",
5113 "2 span foo",
5114 "foo span 2",
5115 "span -3",
5116 "span -3 bar",
5117 "span 2 span",
5118 "span foo span",
5119 "span 2 foo span",
5120 ];
5121
5122 gCSSProperties["grid-column-start"] = {
5123 domProp: "gridColumnStart",
5124 inherited: false,
5125 type: CSS_TYPE_LONGHAND,
5126 initial_values: [ "auto" ],
5127 other_values: gridLineOtherValues,
5128 invalid_values: gridLineInvalidValues
5129 };
5130 gCSSProperties["grid-column-end"] = {
5131 domProp: "gridColumnEnd",
5132 inherited: false,
5133 type: CSS_TYPE_LONGHAND,
5134 initial_values: [ "auto" ],
5135 other_values: gridLineOtherValues,
5136 invalid_values: gridLineInvalidValues
5137 };
5138 gCSSProperties["grid-row-start"] = {
5139 domProp: "gridRowStart",
5140 inherited: false,
5141 type: CSS_TYPE_LONGHAND,
5142 initial_values: [ "auto" ],
5143 other_values: gridLineOtherValues,
5144 invalid_values: gridLineInvalidValues
5145 };
5146 gCSSProperties["grid-row-end"] = {
5147 domProp: "gridRowEnd",
5148 inherited: false,
5149 type: CSS_TYPE_LONGHAND,
5150 initial_values: [ "auto" ],
5151 other_values: gridLineOtherValues,
5152 invalid_values: gridLineInvalidValues
5153 };
5154
5155 var gridAutoPositionOtherValues = [];
5156 gridLineOtherValues.concat([ "auto" ]).forEach(function(val) {
5157 gridAutoPositionOtherValues.push(" foo / " + val);
5158 gridAutoPositionOtherValues.push(val + "/2");
5159 });
5160 var gridAutoPositionInvalidValues = [
5161 "foo",
5162 "foo, bar",
5163 "foo / bar / baz",
5164 ];
5165 gridLineInvalidValues.forEach(function(val) {
5166 gridAutoPositionInvalidValues.push("span 3 / " + val);
5167 gridAutoPositionInvalidValues.push(val + " / foo");
5168 });
5169 gCSSProperties["grid-auto-position"] = {
5170 domProp: "gridAutoPosition",
5171 inherited: false,
5172 type: CSS_TYPE_LONGHAND,
5173 initial_values: [ "1 / 1" ],
5174 other_values: gridAutoPositionOtherValues,
5175 invalid_values: gridAutoPositionInvalidValues
5176 };
5177
5178 // The grid-column and grid-row shorthands take values of the form
5179 // <grid-line> [ / <grid-line> ]?
5180 // which is equivalent to:
5181 // <grid-line> | [ <grid-line> / <grid-line> ]
5182 // which is equivalent to:
5183 // <grid-line> | <'grid-auto-position'>
5184 var gridColumnRowOtherValues = [].concat(
5185 gridLineOtherValues,
5186 gridAutoPositionOtherValues);
5187 var gridColumnRowInvalidValues = [].concat(
5188 gridLineInvalidValues,
5189 gridAutoPositionInvalidValues);
5190 // A single <grid-line> is invalid for grid-auto-position,
5191 // but not for grid-column or grid-row:
5192 gridColumnRowInvalidValues.splice(
5193 gridColumnRowInvalidValues.indexOf("foo"),
5194 1);
5195 gCSSProperties["grid-column"] = {
5196 domProp: "gridColumn",
5197 inherited: false,
5198 type: CSS_TYPE_TRUE_SHORTHAND,
5199 subproperties: [
5200 "grid-column-start",
5201 "grid-column-end"
5202 ],
5203 initial_values: [ "auto", "auto / auto" ],
5204 other_values: gridColumnRowOtherValues,
5205 invalid_values: gridColumnRowInvalidValues
5206 };
5207 gCSSProperties["grid-row"] = {
5208 domProp: "gridRow",
5209 inherited: false,
5210 type: CSS_TYPE_TRUE_SHORTHAND,
5211 subproperties: [
5212 "grid-row-start",
5213 "grid-row-end"
5214 ],
5215 initial_values: [ "auto", "auto / auto" ],
5216 other_values: gridColumnRowOtherValues,
5217 invalid_values: gridColumnRowInvalidValues
5218 };
5219
5220 var gridAreaOtherValues = gridLineOtherValues.slice();
5221 gridLineOtherValues.forEach(function(val) {
5222 gridAreaOtherValues.push("foo / " + val);
5223 gridAreaOtherValues.push(val + "/2/3");
5224 gridAreaOtherValues.push("foo / bar / " + val + " / baz");
5225 });
5226 var gridAreaInvalidValues = [
5227 "foo, bar",
5228 "foo / bar / baz / fizz / buzz",
5229 "default / foo / bar / baz",
5230 "foo / initial / bar / baz",
5231 "foo / bar / inherit / baz",
5232 "foo / bar / baz / unset",
5233 ].concat(gridLineInvalidValues);
5234 gridLineInvalidValues.forEach(function(val) {
5235 gridAreaInvalidValues.push("foo / " + val);
5236 gridAreaInvalidValues.push("foo / bar / " + val);
5237 gridAreaInvalidValues.push("foo / 4 / bar / " + val);
5238 });
5239
5240 gCSSProperties["grid-area"] = {
5241 domProp: "gridArea",
5242 inherited: false,
5243 type: CSS_TYPE_TRUE_SHORTHAND,
5244 subproperties: [
5245 "grid-row-start",
5246 "grid-column-start",
5247 "grid-row-end",
5248 "grid-column-end"
5249 ],
5250 initial_values: [
5251 "auto",
5252 "auto / auto",
5253 "auto / auto / auto",
5254 "auto / auto / auto / auto"
5255 ],
5256 other_values: gridAreaOtherValues,
5257 invalid_values: gridAreaInvalidValues
5258 };
5259 }
5260
5261 if (SpecialPowers.getBoolPref("layout.css.image-orientation.enabled")) {
5262 gCSSProperties["image-orientation"] = {
5263 domProp: "imageOrientation",
5264 inherited: true,
5265 type: CSS_TYPE_LONGHAND,
5266 initial_values: [
5267 "0deg",
5268 "0grad",
5269 "0rad",
5270 "0turn",
5271
5272 // Rounded initial values.
5273 "-90deg",
5274 "15deg",
5275 "360deg",
5276 ],
5277 other_values: [
5278 "0deg flip",
5279 "90deg",
5280 "90deg flip",
5281 "180deg",
5282 "180deg flip",
5283 "270deg",
5284 "270deg flip",
5285 "flip",
5286 "from-image",
5287
5288 // Grad units.
5289 "0grad flip",
5290 "100grad",
5291 "100grad flip",
5292 "200grad",
5293 "200grad flip",
5294 "300grad",
5295 "300grad flip",
5296
5297 // Radian units.
5298 "0rad flip",
5299 "1.57079633rad",
5300 "1.57079633rad flip",
5301 "3.14159265rad",
5302 "3.14159265rad flip",
5303 "4.71238898rad",
5304 "4.71238898rad flip",
5305
5306 // Turn units.
5307 "0turn flip",
5308 "0.25turn",
5309 "0.25turn flip",
5310 "0.5turn",
5311 "0.5turn flip",
5312 "0.75turn",
5313 "0.75turn flip",
5314
5315 // Rounded values.
5316 "-45deg flip",
5317 "65deg flip",
5318 "400deg flip",
5319 ],
5320 invalid_values: [
5321 "none",
5322 "0deg none",
5323 "flip 0deg",
5324 "flip 0deg",
5325 "0",
5326 "0 flip",
5327 "flip 0",
5328 "0deg from-image",
5329 "from-image 0deg",
5330 "flip from-image",
5331 "from-image flip",
5332 ]
5333 };
5334 }
5335
5336 if (SpecialPowers.getBoolPref("layout.css.osx-font-smoothing.enabled")) {
5337 gCSSProperties["-moz-osx-font-smoothing"] = {
5338 domProp: "MozOSXFontSmoothing",
5339 inherited: true,
5340 type: CSS_TYPE_LONGHAND,
5341 initial_values: [ "auto" ],
5342 other_values: [ "grayscale" ],
5343 invalid_values: [ "none", "subpixel-antialiased", "antialiased" ]
5344 };
5345 }
5346
5347 if (SpecialPowers.getBoolPref("layout.css.sticky.enabled")) {
5348 gCSSProperties["position"].other_values.push("sticky");
5349 }
5350
5351 if (SpecialPowers.getBoolPref("layout.css.mix-blend-mode.enabled")) {
5352 gCSSProperties["mix-blend-mode"] = {
5353 domProp: "mixBlendMode",
5354 inherited: false,
5355 type: CSS_TYPE_LONGHAND,
5356 initial_values: [ "normal" ],
5357 other_values: ["multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn",
5358 "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"],
5359 invalid_values: []
5360 };
5361 }
5362
5363 if (SpecialPowers.getBoolPref("layout.css.background-blend-mode.enabled")) {
5364 gCSSProperties["background-blend-mode"] = {
5365 domProp: "backgroundBlendMode",
5366 inherited: false,
5367 type: CSS_TYPE_LONGHAND,
5368 initial_values: [ "normal" ],
5369 other_values: [ "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn",
5370 "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity" ],
5371 invalid_values: ["none", "10px", "multiply multiply"]
5372 };
5373 }
5374
5375 if (SpecialPowers.getBoolPref("layout.css.will-change.enabled")) {
5376 gCSSProperties["will-change"] = {
5377 domProp: "willChange",
5378 inherited: false,
5379 type: CSS_TYPE_LONGHAND,
5380 initial_values: [ "auto" ],
5381 other_values: [ "scroll-position", "contents", "transform", "opacity", "scroll-position, transform", "transform, opacity", "contents, transform", "property-that-doesnt-exist-yet" ],
5382 invalid_values: [ "none", "all", "default", "auto, scroll-position", "scroll-position, auto", "transform scroll-position", ",", "trailing," ]
5383 };
5384 }
5385
5386 if (SpecialPowers.getBoolPref("layout.css.overflow-clip-box.enabled")) {
5387 gCSSProperties["overflow-clip-box"] = {
5388 domProp: "overflowClipBox",
5389 inherited: false,
5390 type: CSS_TYPE_LONGHAND,
5391 initial_values: [ "padding-box" ],
5392 other_values: [ "content-box" ],
5393 invalid_values: [ "none", "auto", "border-box", "0" ]
5394 };
5395 }
5396
5397 if (SpecialPowers.getBoolPref("layout.css.unset-value.enabled")) {
5398 gCSSProperties["animation-direction"].invalid_values.push("normal, unset");
5399 gCSSProperties["animation-name"].invalid_values.push("bounce, unset", "unset, bounce");
5400 gCSSProperties["-moz-border-bottom-colors"].invalid_values.push("red unset", "unset red");
5401 gCSSProperties["-moz-border-left-colors"].invalid_values.push("red unset", "unset red");
5402 gCSSProperties["border-radius"].invalid_values.push("unset 2px", "unset / 2px", "2px unset", "2px / unset");
5403 gCSSProperties["border-bottom-left-radius"].invalid_values.push("unset 2px", "2px unset");
5404 gCSSProperties["border-bottom-right-radius"].invalid_values.push("unset 2px", "2px unset");
5405 gCSSProperties["border-top-left-radius"].invalid_values.push("unset 2px", "2px unset");
5406 gCSSProperties["border-top-right-radius"].invalid_values.push("unset 2px", "2px unset");
5407 gCSSProperties["-moz-border-right-colors"].invalid_values.push("red unset", "unset red");
5408 gCSSProperties["-moz-border-top-colors"].invalid_values.push("red unset", "unset red");
5409 gCSSProperties["-moz-outline-radius"].invalid_values.push("unset 2px", "unset / 2px", "2px unset", "2px / unset");
5410 gCSSProperties["-moz-outline-radius-bottomleft"].invalid_values.push("unset 2px", "2px unset");
5411 gCSSProperties["-moz-outline-radius-bottomright"].invalid_values.push("unset 2px", "2px unset");
5412 gCSSProperties["-moz-outline-radius-topleft"].invalid_values.push("unset 2px", "2px unset");
5413 gCSSProperties["-moz-outline-radius-topright"].invalid_values.push("unset 2px", "2px unset");
5414 gCSSProperties["background-image"].invalid_values.push("-moz-linear-gradient(unset, 10px 10px, from(blue))", "-moz-linear-gradient(unset, 10px 10px, blue 0)", "-moz-repeating-linear-gradient(unset, 10px 10px, blue 0)");
5415 gCSSProperties["box-shadow"].invalid_values.push("unset, 2px 2px", "2px 2px, unset", "inset unset");
5416 gCSSProperties["text-overflow"].invalid_values.push('"hello" unset', 'unset "hello"', 'clip unset', 'unset clip', 'unset inherit', 'unset none', 'initial unset');
5417 gCSSProperties["text-shadow"].invalid_values.push("unset, 2px 2px", "2px 2px, unset");
5418 gCSSProperties["transition"].invalid_values.push("2s unset");
5419 gCSSProperties["transition-property"].invalid_values.push("unset, color", "color, unset");
5420 gCSSProperties["-moz-transition"].invalid_values.push("2s unset");
5421 gCSSProperties["-moz-transition-property"].invalid_values.push("unset, color", "color, unset");
5422 gCSSProperties["-moz-animation"].invalid_values.push("2s unset");
5423 gCSSProperties["-moz-animation-direction"].invalid_values.push("unset, normal");
5424 gCSSProperties["-moz-animation-name"].invalid_values.push("bounce, unset", "unset, bounce");
5425 if (SpecialPowers.getBoolPref("layout.css.filters.enabled")) {
5426 gCSSProperties["filter"].invalid_values.push("drop-shadow(unset, 2px 2px)", "drop-shadow(2px 2px, unset)");
5427 }
5428 if (SpecialPowers.getBoolPref("layout.css.text-align-true-value.enabled")) {
5429 gCSSProperties["text-align"].other_values.push("true left");
5430 } else {
5431 gCSSProperties["text-align"].invalid_values.push("true left");
5432 }
5433 }

mercurial