No bug - tagging b4d3227540c9ebc43d64aac6168fdca7019c22d8 with FIREFOX_BETA_126_BASE...
[gecko.git] / layout / style / test / property_database.js
blobc63d65926edd614425175ca6a42f49f3fa9ba422
1 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
2 /* eslint-disable dot-notation */
3 /* vim: set ts=2 sw=2 sts=2 et: */
4 /* This Source Code Form is subject to the terms of the Mozilla Public
5  * License, v. 2.0. If a copy of the MPL was not distributed with this
6  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 // Utility function. Returns true if the given boolean pref...
9 //  (a) exists and (b) is set to true.
10 // Otherwise, returns false.
12 // This function also reports a test failure if the pref isn't set at all. This
13 // ensures that we remove pref-checks from mochitests (instead of accidentally
14 // disabling the tests that are controlled by that check) when we remove a
15 // mature feature's pref from the rest of the codebase.
16 function IsCSSPropertyPrefEnabled(prefName) {
17   try {
18     if (SpecialPowers.getBoolPref(prefName)) {
19       return true;
20     }
21   } catch (ex) {
22     ok(
23       false,
24       "Failed to look up property-controlling pref '" +
25         prefName +
26         "' (" +
27         ex +
28         ")"
29     );
30   }
32   return false;
35 // True longhand properties.
36 const CSS_TYPE_LONGHAND = 0;
38 // True shorthand properties.
39 const CSS_TYPE_TRUE_SHORTHAND = 1;
41 // Properties that we handle as shorthands but were longhands either in
42 // the current spec or earlier versions of the spec.
43 const CSS_TYPE_SHORTHAND_AND_LONGHAND = 2;
45 // Legacy shorthand properties, that behave mostly like an alias
46 // (CSS_TYPE_SHORTHAND_AND_LONGHAND) but not quite because their syntax may not
47 // match, plus they shouldn't serialize in cssText.
48 const CSS_TYPE_LEGACY_SHORTHAND = 3;
50 // Each property has the following fields:
51 //   domProp: The name of the relevant member of nsIDOM[NS]CSS2Properties
52 //   inherited: Whether the property is inherited by default (stated as
53 //     yes or no in the property header in all CSS specs)
54 //   type: see above
55 //   alias_for: optional, indicates that the property is an alias for
56 //     some other property that is the preferred serialization.  (Type
57 //     must not be CSS_TYPE_LONGHAND.)
58 //   logical: optional, indicates that the property is a logical directional
59 //     property.  (Type must be CSS_TYPE_LONGHAND.)
60 //   axis: optional, indicates that the property is an axis-related logical
61 //     directional property.  (Type must be CSS_TYPE_LONGHAND and 'logical'
62 //     must be true.)
63 //   initial_values: Values whose computed value should be the same as the
64 //     computed value for the property's initial value.
65 //   other_values: Values whose computed value should be different from the
66 //     computed value for the property's initial value.
67 //   XXX Should have a third field for values whose computed value may or
68 //     may not be the same as for the property's initial value.
69 //   invalid_values: Things that are not values for the property and
70 //     should be rejected, but which are balanced and should not absorb
71 //     what follows
72 //   quirks_values: Values that should be accepted in quirks mode only,
73 //     mapped to the values they are equivalent to.
74 //   unbalanced_values: Things that are not values for the property and
75 //     should be rejected, and which also contain unbalanced constructs
76 //     that should absorb what follows
78 // Note: By default, an alias is assumed to accept/reject the same values as
79 // the property that it aliases, and to have the same prerequisites. So, if
80 // "alias_for" is set, the "*_values" and "prerequisites" fields can simply
81 // be omitted, and they'll be populated automatically to match the aliased
82 // property's fields.
84 // Helper functions used to construct gCSSProperties.
86 function initial_font_family_is_sans_serif() {
87   // The initial value of 'font-family' might be 'serif' or
88   // 'sans-serif'.
89   const meta = document.createElement("meta");
90   meta.setAttribute("style", "font: initial;");
91   document.documentElement.appendChild(meta);
92   const family = getComputedStyle(meta).fontFamily;
93   meta.remove();
94   return family == "sans-serif";
97 var gInitialFontFamilyIsSansSerif = initial_font_family_is_sans_serif();
99 // shared by background-image and border-image-source
100 var validNonUrlImageValues = [
101   "-moz-element(#a)",
102   "-moz-element(  #a  )",
103   "-moz-element(#a-1)",
104   "-moz-element(#a\\:1)",
105   /* gradient torture test */
106   "linear-gradient(red, blue)",
107   "linear-gradient(red, yellow, blue)",
108   "linear-gradient(red 1px, yellow 20%, blue 24em, green)",
109   "linear-gradient(red, yellow, green, blue 50%)",
110   "linear-gradient(red -50%, yellow -25%, green, blue)",
111   "linear-gradient(red -99px, yellow, green, blue 120%)",
112   "linear-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))",
113   "linear-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)",
114   "linear-gradient(red, green calc(50% + 20px), blue)",
115   "linear-gradient(180deg, red, blue)",
117   "linear-gradient(to top, red, blue)",
118   "linear-gradient(to bottom, red, blue)",
119   "linear-gradient(to left, red, blue)",
120   "linear-gradient(to right, red, blue)",
121   "linear-gradient(to top left, red, blue)",
122   "linear-gradient(to top right, red, blue)",
123   "linear-gradient(to bottom left, red, blue)",
124   "linear-gradient(to bottom right, red, blue)",
125   "linear-gradient(to left top, red, blue)",
126   "linear-gradient(to left bottom, red, blue)",
127   "linear-gradient(to right top, red, blue)",
128   "linear-gradient(to right bottom, red, blue)",
130   "linear-gradient(-33deg, red, blue)",
131   "linear-gradient(30grad, red, blue)",
132   "linear-gradient(10deg, red, blue)",
133   "linear-gradient(1turn, red, blue)",
134   "linear-gradient(.414rad, red, blue)",
136   "linear-gradient(.414rad, red, 50%, blue)",
137   "linear-gradient(.414rad, red, 0%, blue)",
138   "linear-gradient(.414rad, red, 100%, blue)",
140   "linear-gradient(.414rad, red 50%, 50%, blue 50%)",
141   "linear-gradient(.414rad, red 50%, 20%, blue 50%)",
142   "linear-gradient(.414rad, red 50%, 30%, blue 10%)",
143   "linear-gradient(to right bottom, red, 20%, green 50%, 65%, blue)",
144   "linear-gradient(to right bottom, red, 20%, green 10%, blue)",
145   "linear-gradient(to right bottom, red, 50%, green 50%, 50%, blue)",
146   "linear-gradient(to right bottom, red, 0%, green 50%, 100%, blue)",
148   "linear-gradient(red 0% 100%)",
149   "linear-gradient(red 0% 50%, blue 50%)",
150   "linear-gradient(red 0% 50%, blue 50% 100%)",
151   "linear-gradient(red 0% 50%, 0%, blue 50%)",
152   "linear-gradient(red 0% 50%, 0%, blue 50% 100%)",
154   /* Unitless 0 is valid as an <angle> */
155   "linear-gradient(0, red, blue)",
157   "radial-gradient(red, blue)",
158   "radial-gradient(red, yellow, blue)",
159   "radial-gradient(red 1px, yellow 20%, blue 24em, green)",
160   "radial-gradient(red, yellow, green, blue 50%)",
161   "radial-gradient(red -50%, yellow -25%, green, blue)",
162   "radial-gradient(red -99px, yellow, green, blue 120%)",
163   "radial-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))",
165   "radial-gradient(0 0, red, blue)",
166   "radial-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)",
168   "radial-gradient(at top left, red, blue)",
169   "radial-gradient(at 20% bottom, red, blue)",
170   "radial-gradient(at center 20%, red, blue)",
171   "radial-gradient(at left 35px, red, blue)",
172   "radial-gradient(at 10% 10em, red, blue)",
173   "radial-gradient(at 44px top, red, blue)",
174   "radial-gradient(at 0 0, red, blue)",
176   "radial-gradient(farthest-corner, red, blue)",
177   "radial-gradient(circle, red, blue)",
178   "radial-gradient(ellipse closest-corner, red, blue)",
179   "radial-gradient(closest-corner ellipse, red, blue)",
180   "radial-gradient(farthest-side circle, red, blue)",
182   "radial-gradient(at 43px, red, blue)",
183   "radial-gradient(at 43px 43px, red, blue)",
184   "radial-gradient(at 50% 50%, red, blue)",
185   "radial-gradient(at 43px 50%, red, blue)",
186   "radial-gradient(at 50% 43px, red, blue)",
187   "radial-gradient(circle 43px, red, blue)",
188   "radial-gradient(43px circle, red, blue)",
189   "radial-gradient(ellipse 43px 43px, red, blue)",
190   "radial-gradient(ellipse 50% 50%, red, blue)",
191   "radial-gradient(ellipse 43px 50%, red, blue)",
192   "radial-gradient(ellipse 50% 43px, red, blue)",
193   "radial-gradient(50% 43px ellipse, red, blue)",
195   "radial-gradient(farthest-corner at top left, red, blue)",
196   "radial-gradient(ellipse closest-corner at 45px, red, blue)",
197   "radial-gradient(circle farthest-side at 45px, red, blue)",
198   "radial-gradient(closest-side ellipse at 50%, red, blue)",
199   "radial-gradient(farthest-corner circle at 4em, red, blue)",
201   "radial-gradient(30% 40% at top left, red, blue)",
202   "radial-gradient(50px 60px at 15% 20%, red, blue)",
203   "radial-gradient(7em 8em at 45px, red, blue)",
205   "radial-gradient(circle at 15% 20%, red, blue)",
207   "radial-gradient(red 0% 100%)",
208   "radial-gradient(red 0% 50%, blue 50%)",
209   "radial-gradient(red 0% 50%, blue 50% 100%)",
210   "radial-gradient(red 0% 50%, 0%, blue 50%)",
211   "radial-gradient(red 0% 50%, 0%, blue 50% 100%)",
213   "repeating-radial-gradient(red, blue)",
214   "repeating-radial-gradient(red, yellow, blue)",
215   "repeating-radial-gradient(red 1px, yellow 20%, blue 24em, green)",
216   "repeating-radial-gradient(red, yellow, green, blue 50%)",
217   "repeating-radial-gradient(red -50%, yellow -25%, green, blue)",
218   "repeating-radial-gradient(red -99px, yellow, green, blue 120%)",
219   "repeating-radial-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))",
220   "repeating-radial-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)",
222   "repeating-radial-gradient(at top left, red, blue)",
223   "repeating-radial-gradient(at 0 0, red, blue)",
224   "repeating-radial-gradient(at 20% bottom, red, blue)",
225   "repeating-radial-gradient(at center 20%, red, blue)",
226   "repeating-radial-gradient(at left 35px, red, blue)",
227   "repeating-radial-gradient(at 10% 10em, red, blue)",
228   "repeating-radial-gradient(at 44px top, red, blue)",
230   "repeating-radial-gradient(farthest-corner at top left, red, blue)",
231   "repeating-radial-gradient(closest-corner ellipse at 45px, red, blue)",
232   "repeating-radial-gradient(farthest-side circle at 45px, red, blue)",
233   "repeating-radial-gradient(ellipse closest-side at 50%, red, blue)",
234   "repeating-radial-gradient(circle farthest-corner at 4em, red, blue)",
236   "repeating-radial-gradient(30% 40% at top left, red, blue)",
237   "repeating-radial-gradient(50px 60px at 15% 20%, red, blue)",
238   "repeating-radial-gradient(7em 8em at 45px, red, blue)",
240   // When that happens this should be moved to the `invalid` list.
241   "repeating-radial-gradient(circle closest-side at left 0px bottom 7in, hsl(2,2%,5%), rgb(1,6,0))",
243   "radial-gradient(at calc(25%) top, red, blue)",
244   "radial-gradient(at left calc(25%), red, blue)",
245   "radial-gradient(at calc(25px) top, red, blue)",
246   "radial-gradient(at left calc(25px), red, blue)",
247   "radial-gradient(at calc(-25%) top, red, blue)",
248   "radial-gradient(at left calc(-25%), red, blue)",
249   "radial-gradient(at calc(-25px) top, red, blue)",
250   "radial-gradient(at left calc(-25px), red, blue)",
251   "radial-gradient(at calc(100px + -25%) top, red, blue)",
252   "radial-gradient(at left calc(100px + -25%), red, blue)",
253   "radial-gradient(at calc(100px + -25px) top, red, blue)",
254   "radial-gradient(at left calc(100px + -25px), red, blue)",
256   "image-set(linear-gradient(green, green) 1x, url(foobar.png) 2x)",
257   "image-set(linear-gradient(red, red), url(foobar.png) 2x)",
258   "image-set(url(foobar.png) 2x)",
259   "image-set(url(foobar.png) 1x, url(bar.png) 2x, url(baz.png) 3x)",
260   "image-set('foobar.png', 'bar.png' 2x, url(baz.png) 3x)",
261   "image-set(url(foobar.png) type('image/png'))",
262   "image-set(url(foobar.png) 1x type('image/png'))",
263   "image-set(url(foobar.png) type('image/png') 1x)",
265   ...(IsCSSPropertyPrefEnabled("layout.css.cross-fade.enabled")
266     ? [
267         "cross-fade(red, blue)",
268         "cross-fade(red)",
269         "cross-fade(red 50%)",
270         // see: <https://github.com/w3c/csswg-drafts/issues/5333>. This
271         // may become invalid depending on how discussion on that issue
272         // goes.
273         "cross-fade(red -50%, blue 150%)",
274         "cross-fade(red -50%, url(www.example.com))",
276         "cross-fade(url(http://placekitten.com/200/300), 55% linear-gradient(red, blue))",
277         "cross-fade(cross-fade(red, white), cross-fade(blue))",
278         "cross-fade(gold 77%, 60% blue)",
280         "cross-fade(url(http://placekitten.com/200/300), url(http://placekitten.com/200/300))",
281         "cross-fade(#F0F8FF, rgb(0, 0, 0), rgba(0, 255, 0, 1) 25%)",
282       ]
283     : []),
285   // Conic gradient
286   "conic-gradient(red, blue)",
287   "conic-gradient(red,blue,yellow)",
288   "conic-gradient(  red  ,  blue,   yellow)",
289   "conic-gradient(red 0, blue 50deg)",
290   "conic-gradient(red 10%, blue 50%)",
291   "conic-gradient(red -50deg, blue 50deg)",
292   "conic-gradient(red 50deg, blue 0.3turn, yellow 200grad, orange 60% 5rad)",
294   "conic-gradient(red 0 100%)",
295   "conic-gradient(red 0 50%, blue 50%)",
296   "conic-gradient(red 0 50deg, blue 50% 100%)",
297   "conic-gradient(red 0 50%, 0deg, blue 50%)",
298   "conic-gradient(red 0deg 50%, 0%, blue 50% 100%)",
300   "conic-gradient(from 0, red, blue)",
301   "conic-gradient(from 40deg, red, blue)",
302   "conic-gradient(from 0.4turn, red, blue)",
303   "conic-gradient(from 200grad, red, blue)",
304   "conic-gradient(from 5rad, red, blue)",
306   "conic-gradient(at top, red, blue)",
307   "conic-gradient(at top left, red, blue)",
308   "conic-gradient(at left top, red, blue)",
309   "conic-gradient(at center center, red, blue)",
310   "conic-gradient(at 20% bottom, red, blue)",
311   "conic-gradient(at center 20%, red, blue)",
312   "conic-gradient(at left 35px, red, blue)",
313   "conic-gradient(at 10% 10em, red, blue)",
314   "conic-gradient(at 44px top, red, blue)",
315   "conic-gradient(at 0 0, red, blue)",
316   "conic-gradient(at 10px, red, blue)",
318   "conic-gradient(at calc(25%) top, red, blue)",
319   "conic-gradient(at left calc(25%), red, blue)",
320   "conic-gradient(at calc(25px) top, red, blue)",
321   "conic-gradient(at left calc(25px), red, blue)",
322   "conic-gradient(at calc(-25%) top, red, blue)",
323   "conic-gradient(at left calc(-25%), red, blue)",
324   "conic-gradient(at calc(-25px) top, red, blue)",
325   "conic-gradient(at left calc(-25px), red, blue)",
326   "conic-gradient(at calc(100px + -25%) top, red, blue)",
327   "conic-gradient(at left calc(100px + -25%), red, blue)",
328   "conic-gradient(at calc(100px + -25px) top, red, blue)",
329   "conic-gradient(at left calc(100px + -25px), red, blue)",
331   "conic-gradient(from 0 at 0 0, red, blue)",
332   "conic-gradient(from 40deg at 50%, red, blue)",
333   "conic-gradient(from 0.4turn at left 30%, red, blue)",
334   "conic-gradient(from 200grad at calc(100px + -25%) top, red, blue)",
335   "conic-gradient(from 5rad at 10px, red, blue)",
337   "repeating-conic-gradient(red, blue)",
338   "repeating-conic-gradient(red, yellow, blue)",
339   "repeating-conic-gradient(red 1deg, yellow 20%, blue 5rad, green)",
340   "repeating-conic-gradient(red, yellow, green, blue 50%)",
341   "repeating-conic-gradient(red -50%, yellow -25%, green, blue)",
342   "repeating-conic-gradient(red -99deg, yellow, green, blue 120%)",
343   "repeating-conic-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))",
344   "repeating-conic-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)",
346   "repeating-conic-gradient(from 0, red, blue)",
347   "repeating-conic-gradient(from 40deg, red, blue)",
348   "repeating-conic-gradient(from 0.4turn, red, blue)",
349   "repeating-conic-gradient(from 200grad, red, blue)",
350   "repeating-conic-gradient(from 5rad, red, blue)",
352   "repeating-conic-gradient(at top left, red, blue)",
353   "repeating-conic-gradient(at 0 0, red, blue)",
354   "repeating-conic-gradient(at 20% bottom, red, blue)",
355   "repeating-conic-gradient(at center 20%, red, blue)",
356   "repeating-conic-gradient(at left 35px, red, blue)",
357   "repeating-conic-gradient(at 10% 10em, red, blue)",
358   "repeating-conic-gradient(at 44px top, red, blue)",
360   "repeating-conic-gradient(from 0 at 0 0, red, blue)",
361   "repeating-conic-gradient(from 40deg at 50%, red, blue)",
362   "repeating-conic-gradient(from 0.4turn at left 30%, red, blue)",
363   "repeating-conic-gradient(from 200grad at calc(100px + -25%) top, red, blue)",
364   "repeating-conic-gradient(from 5rad at 10px, red, blue)",
366   // 2008 GRADIENTS: -webkit-gradient()
367   // ----------------------------------
368   // linear w/ no color stops (valid) and a variety of position values:
369   "-webkit-gradient(linear, 1 2, 3 4)",
370   "-webkit-gradient(linear,1 2,3 4)", // (no extra space)
371   "-webkit-gradient(linear  ,  1   2  ,  3   4  )", // (lots of extra space)
372   "-webkit-gradient(linear, 1 10% , 0% 4)", // percentages
373   "-webkit-gradient(linear, +1.0 -2%, +5.3% -0)", // (+/- & decimals are valid)
374   "-webkit-gradient(linear, left top, right bottom)", // keywords
375   "-webkit-gradient(linear, right center, center top)",
376   "-webkit-gradient(linear, center center, center center)",
377   "-webkit-gradient(linear, center 5%, 30 top)", // keywords mixed w/ nums
379   // linear w/ just 1 color stop:
380   "-webkit-gradient(linear, 1 2, 3 4, from(lime))",
381   "-webkit-gradient(linear, 1 2, 3 4, to(lime))",
382   // * testing the various allowable stop values (<number> & <percent>):
383   "-webkit-gradient(linear, 1 2, 3 4, color-stop(0, lime))",
384   "-webkit-gradient(linear, 1 2, 3 4, color-stop(-0, lime))",
385   "-webkit-gradient(linear, 1 2, 3 4, color-stop(-30, lime))",
386   "-webkit-gradient(linear, 1 2, 3 4, color-stop(+9999, lime))",
387   "-webkit-gradient(linear, 1 2, 3 4, color-stop(-.1, lime))",
388   "-webkit-gradient(linear, 1 2, 3 4, color-stop(0%, lime))",
389   "-webkit-gradient(linear, 1 2, 3 4, color-stop(100%, lime))",
390   "-webkit-gradient(linear, 1 2, 3 4, color-stop(9999%, lime))",
391   "-webkit-gradient(linear, 1 2, 3 4, color-stop(-.5%, lime))",
392   "-webkit-gradient(linear, 1 2, 3 4, color-stop(+0%, lime))",
393   // * testing the various color values:
394   "-webkit-gradient(linear, 1 2, 3 4, color-stop(0, transparent))",
395   "-webkit-gradient(linear, 1 2, 3 4, color-stop(0, rgb(1,2,3)))",
396   "-webkit-gradient(linear, 1 2, 3 4, color-stop(0, #00ff00))",
397   "-webkit-gradient(linear, 1 2, 3 4, color-stop(0, #00f))",
398   "-webkit-gradient(linear, 1 2, 3 4, color-stop(0, hsla(240, 30%, 50%, 0.8)))",
399   "-webkit-gradient(linear, 1 2, 3 4, color-stop(0, rgba(255, 230, 10, 0.5)))",
401   // linear w/ multiple color stops:
402   // * using from()/to() -- note that out-of-order is OK:
403   "-webkit-gradient(linear, 1 2, 3 4, from(lime), from(blue))",
404   "-webkit-gradient(linear, 1 2, 3 4, to(lime),   to(blue))",
405   "-webkit-gradient(linear, 1 2, 3 4, from(lime), to(blue))",
406   "-webkit-gradient(linear, 1 2, 3 4, to(lime),   from(blue))",
407   "-webkit-gradient(linear, 1 2, 3 4, from(lime), to(blue), from(purple))",
408   // * using color-stop():
409   "-webkit-gradient(linear, 1 2, 3 4, color-stop(0, lime), color-stop(30%, blue))",
410   "-webkit-gradient(linear, 1 2, 3 4, color-stop(0, lime), color-stop(30%, blue), color-stop(100%, purple))",
411   // * using color-stop() intermixed with from()/to() functions:
412   "-webkit-gradient(linear, 1 2, 3 4, from(lime), color-stop(30%, blue))",
413   "-webkit-gradient(linear, 1 2, 3 4, color-stop(30%, blue), to(lime))",
414   // * overshooting endpoints (0 & 1.0)
415   "-webkit-gradient(linear, 1 2, 3 4, color-stop(-30%, lime), color-stop(.4, blue), color-stop(1.5, purple))",
416   // * repeating a stop position (valid)
417   "-webkit-gradient(linear, 1 2, 3 4, color-stop(30%, lime), color-stop(30%, blue))",
418   // * stops out of order (valid)
419   "-webkit-gradient(linear, 1 2, 3 4, color-stop(70%, lime), color-stop(20%, blue), color-stop(40%, purple))",
421   // radial w/ no color stops (valid) and a several different radius values:
422   "-webkit-gradient(radial, 1 2, 8, 3 4, 9)",
423   "-webkit-gradient(radial, 0 0, 10, 0 0, 5)",
425   // radial w/ color stops
426   // (mostly leaning on more-robust 'linear' tests above; just testing a few
427   // examples w/ radial as a sanity-check):
428   "-webkit-gradient(radial, 1 2, 8, 3 4, 9, from(lime))",
429   "-webkit-gradient(radial, 1 2, 8, 3 4, 9, to(blue))",
430   "-webkit-gradient(radial, 1 2, 8, 3 4, 9, color-stop(0.5, #00f), color-stop(0.8, rgba(100, 200, 0, 0.5)))",
432   // 2011 GRADIENTS: -webkit-linear-gradient(), -webkit-radial -gradient()
433   // ---------------------------------------------------------------------
434   // Basic linear-gradient syntax (valid when prefixed or unprefixed):
435   "-webkit-linear-gradient(red, green, blue)",
437   // Angled linear-gradients (valid when prefixed or unprefixed):
438   "-webkit-linear-gradient(135deg, red, blue)",
439   "-webkit-linear-gradient( 135deg  , red  , blue )",
440   "-webkit-linear-gradient(280deg, red 60%, blue)",
442   // Linear-gradient with unitless-0 <angle> (normally invalid for <angle>
443   // but accepted here for better webkit emulation):
444   "-webkit-linear-gradient(0, red, blue)",
446   // Linear-gradient with calc expression (bug 1363349)
447   "-webkit-gradient(linear, calc(5 + 5) top, calc(10 + 10) top, from(blue), to(lime))",
448   "-webkit-gradient(linear, calc(5 - 5) top, calc(10 + 10) top, from(blue), to(lime))",
449   "-webkit-gradient(linear, calc(5 * 5) top, calc(10 + 10) top, from(blue), to(lime))",
450   "-webkit-gradient(linear, calc(5 / 5) top, calc(10 + 10) top, from(blue), to(lime))",
451   "-webkit-gradient(linear, left calc(25% - 10%), right calc(75% + 10%), from(blue), to(lime))",
452   "-webkit-gradient(linear, calc(1) 2, 3 4)",
454   // Radial-gradient with calc expression (bug 1363349)
455   "-webkit-gradient(radial, 1 2, 0, 3 4, calc(1 + 5), from(blue), to(lime))",
456   "-webkit-gradient(radial, 1 2, calc(1 + 2), 3 4, calc(1 + 5), from(blue), to(lime))",
457   "-webkit-gradient(radial, 1 2, calc(1 - 2), 3 4, calc(1 + 5), from(blue), to(lime))",
458   "-webkit-gradient(radial, 1 2, calc(1 * 2), 3 4, calc(1 + 5), from(blue), to(lime))",
459   "-webkit-gradient(radial, 1 2, calc(1 / 2), 3 4, calc(1 + 5), from(blue), to(lime))",
460   "-webkit-gradient(radial, calc(0 + 1) calc(1 + 1), calc(1 + 2), calc(1 + 2) 4, calc(1 + 5), from(blue), to(lime))",
461   "-webkit-gradient(radial, 1 2, calc(8), 3 4, 9)",
463   // Basic radial-gradient syntax (valid when prefixed or unprefixed):
464   "-webkit-radial-gradient(circle, white, black)",
465   "-webkit-radial-gradient(circle, white, black)",
466   "-webkit-radial-gradient(ellipse closest-side, white, black)",
467   "-webkit-radial-gradient(circle farthest-corner, white, black)",
469   // Contain/cover keywords (valid only for -moz/-webkit prefixed):
470   "-webkit-radial-gradient(cover, red, blue)",
471   "-webkit-radial-gradient(cover circle, red, blue)",
472   "-webkit-radial-gradient(contain, red, blue)",
473   "-webkit-radial-gradient(contain ellipse, red, blue)",
475   // Initial side/corner/point (valid only for -moz/-webkit prefixed):
476   "-webkit-linear-gradient(top, red, blue)",
477   "-webkit-linear-gradient(left, red, blue)",
478   "-webkit-linear-gradient(bottom, red, blue)",
479   "-webkit-linear-gradient(right top, red, blue)",
480   "-webkit-linear-gradient(top right, red, blue)",
481   "-webkit-radial-gradient(right, red, blue)",
482   "-webkit-radial-gradient(left bottom, red, blue)",
483   "-webkit-radial-gradient(bottom left, red, blue)",
484   "-webkit-radial-gradient(center, red, blue)",
485   "-webkit-radial-gradient(center right, red, blue)",
486   "-webkit-radial-gradient(center center, red, blue)",
487   "-webkit-radial-gradient(center top, red, blue)",
488   "-webkit-radial-gradient(left 50%, red, blue)",
489   "-webkit-radial-gradient(20px top, red, blue)",
490   "-webkit-radial-gradient(20em 30%, red, blue)",
492   // Point + keyword-sized shape (valid only for -moz/-webkit prefixed):
493   "-webkit-radial-gradient(center, circle closest-corner, red, blue)",
494   "-webkit-radial-gradient(10px 20px, cover circle, red, blue)",
495   "-webkit-radial-gradient(5em 50%, ellipse contain, red, blue)",
497   // Repeating examples:
498   "-webkit-repeating-linear-gradient(red 10%, blue 30%)",
499   "-webkit-repeating-linear-gradient(30deg, pink 20px, orange 70px)",
500   "-webkit-repeating-linear-gradient(left, red, blue)",
501   "-webkit-repeating-linear-gradient(left, red 10%, blue 30%)",
502   "-webkit-repeating-radial-gradient(circle, red, blue 10%, red 20%)",
503   "-webkit-repeating-radial-gradient(circle farthest-corner, gray 10px, yellow 20px)",
504   "-webkit-repeating-radial-gradient(top left, circle, red, blue 4%, red 8%)",
506 var invalidNonUrlImageValues = [
507   "-moz-element(#a:1)",
508   "-moz-element(a#a)",
509   "-moz-element(#a a)",
510   "-moz-element(#a+a)",
511   "-moz-element(#a())",
512   /* no quirks mode colors */
513   "linear-gradient(red, ff00ff)",
514   /* no quirks mode colors */
515   "radial-gradient(at 10% bottom, ffffff, black) scroll no-repeat",
516   /* no quirks mode lengths */
517   "linear-gradient(red -99, yellow, green, blue 120%)",
518   /* Unitless nonzero numbers are valid as an <angle> */
519   "linear-gradient(30, red, blue)",
520   /* There must be a comma between gradient-line (e.g. <angle>) and colors */
521   "linear-gradient(30deg red, blue)",
522   "linear-gradient(to top left red, blue)",
523   "linear-gradient(to right red, blue)",
524   /* Invalid color or calc() function */
525   "linear-gradient(red, rgb(0, rubbish, 0) 50%, red)",
526   "linear-gradient(red, red calc(50% + rubbish), red)",
527   "linear-gradient(to top calc(50% + rubbish), red, blue)",
529   "radial-gradient(circle 175px 20px, black, white)",
530   "radial-gradient(175px 20px circle, black, white)",
531   "radial-gradient(ellipse 175px, black, white)",
532   "radial-gradient(175px ellipse, black, white)",
533   "radial-gradient(50%, red, blue)",
534   "radial-gradient(circle 50%, red, blue)",
535   "radial-gradient(50% circle, red, blue)",
537   /* Invalid units */
538   "conic-gradient(red, blue 50px, yellow 30px)",
539   "repeating-conic-gradient(red 1deg, yellow 20%, blue 24em, green)",
540   "conic-gradient(from 0%, black, white)",
541   "conic-gradient(from 60%, black, white)",
542   "conic-gradient(from 40px, black, white)",
543   "conic-gradient(from 50, black, white)",
544   "conic-gradient(at 50deg, black, white)",
545   "conic-gradient(from 40deg at 50deg, black, white)",
546   "conic-gradient(from 40deg at 50deg 60deg, black, white)",
547   /* Invalid keywords (or ordering) */
548   "conic-gradient(at 40% from 50deg, black, white)",
549   "conic-gradient(to 50deg, black, white)",
551   /* Used to be valid only when prefixed */
552   "linear-gradient(top left, red, blue)",
553   "linear-gradient(0 0, red, blue)",
554   "linear-gradient(20% bottom, red, blue)",
555   "linear-gradient(center 20%, red, blue)",
556   "linear-gradient(left 35px, red, blue)",
557   "linear-gradient(10% 10em, red, blue)",
558   "linear-gradient(44px top, red, blue)",
560   "linear-gradient(top left 45deg, red, blue)",
561   "linear-gradient(20% bottom -300deg, red, blue)",
562   "linear-gradient(center 20% 1.95929rad, red, blue)",
563   "linear-gradient(left 35px 30grad, red, blue)",
564   "linear-gradient(left 35px 0.1turn, red, blue)",
565   "linear-gradient(10% 10em 99999deg, red, blue)",
566   "linear-gradient(44px top -33deg, red, blue)",
568   "linear-gradient(30grad left 35px, red, blue)",
569   "linear-gradient(10deg 20px, red, blue)",
570   "linear-gradient(1turn 20px, red, blue)",
571   "linear-gradient(.414rad bottom, red, blue)",
573   "linear-gradient(to top, 0%, blue)",
574   "linear-gradient(to top, red, 100%)",
575   "linear-gradient(to top, red, 45%, 56%, blue)",
576   "linear-gradient(to top, red,, blue)",
577   "linear-gradient(to top, red, green 35%, 15%, 54%, blue)",
579   "linear-gradient(unset, 10px 10px, from(blue))",
580   "linear-gradient(unset, 10px 10px, blue 0)",
581   "repeating-linear-gradient(unset, 10px 10px, blue 0)",
583   "radial-gradient(top left 45deg, red, blue)",
584   "radial-gradient(20% bottom -300deg, red, blue)",
585   "radial-gradient(center 20% 1.95929rad, red, blue)",
586   "radial-gradient(left 35px 30grad, red, blue)",
587   "radial-gradient(10% 10em 99999deg, red, blue)",
588   "radial-gradient(44px top -33deg, red, blue)",
590   "radial-gradient(-33deg, red, blue)",
591   "radial-gradient(30grad left 35px, red, blue)",
592   "radial-gradient(10deg 20px, red, blue)",
593   "radial-gradient(.414rad bottom, red, blue)",
595   "radial-gradient(cover, red, blue)",
596   "radial-gradient(ellipse contain, red, blue)",
597   "radial-gradient(cover circle, red, blue)",
599   "radial-gradient(top left, cover, red, blue)",
600   "radial-gradient(15% 20%, circle, red, blue)",
601   "radial-gradient(45px, ellipse closest-corner, red, blue)",
602   "radial-gradient(45px, farthest-side circle, red, blue)",
604   "radial-gradient(99deg, cover, red, blue)",
605   "radial-gradient(-1.2345rad, circle, red, blue)",
606   "radial-gradient(399grad, ellipse closest-corner, red, blue)",
607   "radial-gradient(399grad, farthest-side circle, red, blue)",
609   "radial-gradient(top left 99deg, cover, red, blue)",
610   "radial-gradient(15% 20% -1.2345rad, circle, red, blue)",
611   "radial-gradient(45px 399grad, ellipse closest-corner, red, blue)",
612   "radial-gradient(45px 399grad, farthest-side circle, red, blue)",
613   "radial-gradient(circle red, blue)",
615   /* don't allow more than two positions with multi-position syntax */
616   "linear-gradient(red 0% 50% 100%)",
617   "linear-gradient(red 0% 50% 75%, blue 75%)",
618   "linear-gradient(to bottom, red 0% 50% 100%)",
619   "linear-gradient(to bottom, red 0% 50% 75%, blue 75%)",
620   "radial-gradient(red 0% 50% 100%)",
621   "radial-gradient(red 0% 50% 75%, blue 75%)",
622   "radial-gradient(center, red 0% 50% 100%)",
623   "radial-gradient(center, red 0% 50% 75%, blue 75%)",
624   "conic-gradient(red 0% 50% 100%)",
625   "conic-gradient(red 0% 50% 75%, blue 75%)",
626   "conic-gradient(center, red 0% 50% 100%)",
627   "conic-gradient(center, red 0% 50% 75%, blue 75%)",
629   // missing color in color stop
630   "conic-gradient(red 50deg, blue 0.3turn, yellow 200grad, orange 60%, 5rad)",
632   "-moz-linear-gradient(unset, 10px 10px, from(blue))",
633   "-moz-linear-gradient(unset, 10px 10px, blue 0)",
634   "-moz-repeating-linear-gradient(unset, 10px 10px, blue 0)",
636   // 2008 GRADIENTS: -webkit-gradient()
637   // https://www.webkit.org/blog/175/introducing-css-gradients/
638   // ----------------------------------
639   // Mostly-empty expressions (missing most required pieces):
640   "-webkit-gradient()",
641   "-webkit-gradient( )",
642   "-webkit-gradient(,)",
643   "-webkit-gradient(bogus)",
644   "-webkit-gradient(linear)",
645   "-webkit-gradient(linear,)",
646   "-webkit-gradient(,linear)",
647   "-webkit-gradient(radial)",
648   "-webkit-gradient(radial,)",
650   // linear w/ partial/missing <point> expression(s)
651   "-webkit-gradient(linear, 1)", // Incomplete <point>
652   "-webkit-gradient(linear, left)", // Incomplete <point>
653   "-webkit-gradient(linear, center)", // Incomplete <point>
654   "-webkit-gradient(linear, top)", // Incomplete <point>
655   "-webkit-gradient(linear, 5%)", // Incomplete <point>
656   "-webkit-gradient(linear, 1 2)", // Missing 2nd <point>
657   "-webkit-gradient(linear, 1, 3)", // 2 incomplete <point>s
658   "-webkit-gradient(linear, 1, 3 4)", // Incomplete 1st <point>
659   "-webkit-gradient(linear, 1 2, 3)", // Incomplete 2nd <point>
660   "-webkit-gradient(linear, 1 2, 3, 4)", // Comma inside <point>
661   "-webkit-gradient(linear, 1, 2, 3 4)", // Comma inside <point>
662   "-webkit-gradient(linear, 1, 2, 3, 4)", // Comma inside <point>
664   // linear w/ invalid units in <point> expression
665   "-webkit-gradient(linear, 1px 2, 3 4)",
666   "-webkit-gradient(linear, 1 2, 3 4px)",
667   "-webkit-gradient(linear, 1px 2px, 3px 4px)",
668   "-webkit-gradient(linear, 1 2em, 3 4)",
670   // linear w/ <radius> (only valid for radial)
671   "-webkit-gradient(linear, 1 2, 8, 3 4, 9)",
673   // linear w/ out-of-order position keywords in <point> expression
674   // (horizontal keyword is supposed to come first, for "x" coord)
675   "-webkit-gradient(linear, 0 0, top right)",
676   "-webkit-gradient(linear, bottom center, 0 0)",
677   "-webkit-gradient(linear, top bottom, 0 0)",
678   "-webkit-gradient(linear, bottom top, 0 0)",
679   "-webkit-gradient(linear, bottom top, 0 0)",
681   // linear w/ trailing comma (which implies missing color-stops):
682   "-webkit-gradient(linear, 1 2, 3 4,)",
684   // linear w/ invalid color values:
685   "-webkit-gradient(linear, 1 2, 3 4, from(invalidcolorname))",
686   "-webkit-gradient(linear, 1 2, 3 4, from(inherit))",
687   "-webkit-gradient(linear, 1 2, 3 4, from(initial))",
688   "-webkit-gradient(linear, 1 2, 3 4, from(currentColor))",
689   "-webkit-gradient(linear, 1 2, 3 4, from(00ff00))",
690   "-webkit-gradient(linear, 1 2, 3 4, from(##00ff00))",
691   "-webkit-gradient(linear, 1 2, 3 4, from(#00fff))", // wrong num hex digits
692   "-webkit-gradient(linear, 1 2, 3 4, from(xyz(0,0,0)))", // bogus color func
693   // Mixing <number> and <percentage> is invalid.
694   "-webkit-gradient(linear, 1 2, 3 4, from(rgb(100, 100%, 30)))",
696   // linear w/ color stops that have comma issues
697   "-webkit-gradient(linear, 1 2, 3 4 from(lime))",
698   "-webkit-gradient(linear, 1 2, 3 4, from(lime,))",
699   "-webkit-gradient(linear, 1 2, 3 4, from(lime),)",
700   "-webkit-gradient(linear, 1 2, 3 4, from(lime) to(blue))",
701   "-webkit-gradient(linear, 1 2, 3 4, from(lime),, to(blue))",
702   "-webkit-gradient(linear, 1 2, 3 4, from(rbg(0, 0, 0,)))",
703   "-webkit-gradient(linear, 1 2, 3 4, color-stop(0 lime))",
704   "-webkit-gradient(linear, 1 2, 3 4, color-stop(0,, lime))",
706   // radial w/ broken <point>/radius expression(s)
707   "-webkit-gradient(radial, 1)", // Incomplete <point>
708   "-webkit-gradient(radial, 1 2)", // Missing radius + 2nd <point>
709   "-webkit-gradient(radial, 1 2, 8)", // Missing 2nd <point>
710   "-webkit-gradient(radial, 1 2, 8, 3)", // Incomplete 2nd <point>
711   "-webkit-gradient(radial, 1 2, 8, 3 4)", // Missing 2nd radius
712   "-webkit-gradient(radial, 1 2, 3 4, 9)", // Missing 1st radius
713   "-webkit-gradient(radial, 1 2, -1.5, center center, +99999.9999)", // Negative radius
715   // radial w/ incorrect units on radius (invalid; expecting <number>)
716   "-webkit-gradient(radial, 1 2, 8%,      3 4, 9)",
717   "-webkit-gradient(radial, 1 2, 8px,     3 4, 9)",
718   "-webkit-gradient(radial, 1 2, 8em,     3 4, 9)",
719   "-webkit-gradient(radial, 1 2, top,     3 4, 9)",
721   // radial w/ trailing comma (which implies missing color-stops):
722   "-webkit-gradient(linear, 1 2, 8, 3 4, 9,)",
724   // radial w/ invalid color value (mostly leaning on 'linear' test above):
725   "-webkit-gradient(radial, 1 2, 8, 3 4, 9, from(invalidcolorname))",
727   // 2011 GRADIENTS: -webkit-linear-gradient(), -webkit-radial -gradient()
728   // ---------------------------------------------------------------------
729   // Syntax that's invalid for all types of gradients:
730   // * empty gradient expressions:
731   "-webkit-linear-gradient()",
732   "-webkit-radial-gradient()",
733   "-webkit-repeating-linear-gradient()",
734   "-webkit-repeating-radial-gradient()",
736   // * missing comma between <legacy-gradient-line> and color list:
737   "-webkit-linear-gradient(0 red, blue)",
738   "-webkit-linear-gradient(30deg red, blue)",
739   "-webkit-linear-gradient(top right red, blue)",
740   "-webkit-linear-gradient(bottom red, blue)",
742   // Linear-gradient with calc expression containing mixed units
743   // (bug 1363349)
744   "-webkit-gradient(linear, calc(5 + 5%) top, calc(10 + 10) top, from(blue), to(lime))",
745   "-webkit-gradient(linear, left calc(25 - 10%), right calc(75% + 10%), from(blue), to(lime))",
747   // Radial-gradient with calc expression containing mixed units, or a
748   // percentage in the radius (bug 1363349)
749   "-webkit-gradient(radial, 1 2, 0, 3 4, calc(1% + 5%), from(blue), to(lime))",
750   "-webkit-gradient(radial, 1 2, calc(1 + 2), 3 4, calc(1 + 5%), from(blue), to(lime))",
751   "-webkit-gradient(radial, calc(0 + 1) calc(1 + 1), calc(1% + 2%), calc(1 + 2) 4, calc(1 + 5), from(blue), to(lime))",
753   // Linear syntax that's invalid for both -webkit & unprefixed, but valid
754   // for -moz:
755   // * initial <legacy-gradient-line> which includes a length:
756   "-webkit-linear-gradient(10px, red, blue)",
757   "-webkit-linear-gradient(10px top, red, blue)",
758   // * initial <legacy-gradient-line> which includes a side *and* an angle:
759   "-webkit-linear-gradient(bottom 30deg, red, blue)",
760   "-webkit-linear-gradient(30deg bottom, red, blue)",
761   "-webkit-linear-gradient(10px top 50deg, red, blue)",
762   "-webkit-linear-gradient(50deg 10px top, red, blue)",
763   // * initial <legacy-gradient-line> which includes explicit "center":
764   "-webkit-linear-gradient(center, red, blue)",
765   "-webkit-linear-gradient(left center, red, blue)",
766   "-webkit-linear-gradient(top center, red, blue)",
767   "-webkit-linear-gradient(center top, red, blue)",
769   // Linear syntax that's invalid for -webkit, but valid for -moz & unprefixed:
770   // * "to" syntax:
771   "-webkit-linear-gradient(to top, red, blue)",
773   // * <shape> followed by angle:
774   "-webkit-radial-gradient(circle 10deg, red, blue)",
776   // Radial syntax that's invalid for both -webkit & -moz, but valid for
777   // unprefixed:
778   // * "<shape> at <position>" syntax:
779   "-webkit-radial-gradient(circle at left bottom, red, blue)",
780   // * explicitly-sized shape:
781   "-webkit-radial-gradient(circle 10px, red, blue)",
782   "-webkit-radial-gradient(ellipse 40px 20px, red, blue)",
784   // Radial syntax that's invalid for both -webkit & unprefixed, but valid
785   // for -moz:
786   // * initial angle
787   "-webkit-radial-gradient(30deg, red, blue)",
788   // * initial angle/position combo
789   "-webkit-radial-gradient(top 30deg, red, blue)",
790   "-webkit-radial-gradient(left top 30deg, red, blue)",
791   "-webkit-radial-gradient(10px 20px 30deg, red, blue)",
793   // Conic gradients should not support prefixed syntax
794   "-webkit-gradient(conic, 1 2, 3 4, color-stop(0, lime))",
795   "-webkit-conic-gradient(red, blue)",
796   "-moz-conic-gradient(red, blue)",
797   "-webkit-repeating-conic-gradient(red, blue)",
798   "-moz-repeating-conic-gradient(red, blue)",
800   "image-set(url(foobar.png) 1x, none)",
801   "image-set(garbage)",
802   "image-set(image-set('foobar.png', 'bar.png' 2x) 1x, url(baz.png) 3x)", // Nested image-sets should fail to parse
803   "image-set(image-set(garbage))",
804   "image-set()",
805   "image-set(type('image/png') url(foobar.png) 1x)",
806   "image-set(url(foobar.png) type('image/png') 1x type('image/png'))",
807   "image-set(url(foobar.png) type('image/png') type('image/png'))",
808   "image-set(url(foobar.png) type(image/png))",
809   "image-set(url(foobar.png) epyt('image/png'))",
811   ...(IsCSSPropertyPrefEnabled("layout.css.cross-fade.enabled")
812     ? [
813         "cross-fade(red blue)",
814         "cross-fade()",
815         "cross-fade(50%, blue 50%)",
816         // Old syntax
817         "cross-fade(red, white, 50%)",
818         // see: <https://github.com/w3c/csswg-drafts/issues/5333>. This
819         // may become invalid depending on how discussion on that issue
820         // goes.
821         "cross-fade(red, 150%, blue)",
822         "cross-fade(red auto, blue 10%)",
824         // nested invalidity should propagate.
825         "cross-fade(url(http://placekitten.com/200/300), 55% linear-gradient(center, red, blue))",
826         "cross-fade(cross-fade(red, white, 50%), cross-fade(blue))",
828         "cross-fade(url(http://placekitten.com/200/300) url(http://placekitten.com/200/300))",
829         "cross-fade(#F0F8FF, rgb(0, 0, 0), rgba(0, 255, 0, 1), 25%)",
830       ]
831     : []),
833 var unbalancedGradientAndElementValues = ["-moz-element(#a()"];
835 var basicShapeSVGBoxValues = [
836   "fill-box",
837   "stroke-box",
838   "view-box",
840   "polygon(evenodd, 20pt 20cm) fill-box",
841   "polygon(evenodd, 20ex 20pc) stroke-box",
842   "polygon(evenodd, 20rem 20in) view-box",
845 var basicShapeOtherValues = [
846   "polygon(20px 20px)",
847   "polygon(20px 20%)",
848   "polygon(20% 20%)",
849   "polygon(20rem 20em)",
850   "polygon(20cm 20mm)",
851   "polygon(20px 20px, 30px 30px)",
852   "polygon(20px 20px, 30% 30%, 30px 30px)",
854   "content-box",
855   "padding-box",
856   "border-box",
858   "polygon(0 0) content-box",
859   "border-box polygon(0 0)",
860   "padding-box    polygon(   0  20px ,  30px    20% )  ",
862   "circle()",
863   "circle(at center)",
864   "circle(at top 0px left 20px)",
865   "circle(at bottom right)",
866   "circle(20%)",
867   "circle(300px)",
868   "circle(calc(20px + 30px))",
869   "circle(farthest-side)",
870   "circle(closest-side)",
871   "circle(closest-side at center)",
872   "circle(farthest-side at top)",
873   "circle(20px at top right)",
874   "circle(40% at 50% 100%)",
875   "circle(calc(20% + 20%) at right bottom)",
876   "circle() padding-box",
878   "ellipse()",
879   "ellipse(at center)",
880   "ellipse(at top 0px left 20px)",
881   "ellipse(at bottom right)",
882   "ellipse(20% 20%)",
883   "ellipse(300px 50%)",
884   "ellipse(calc(20px + 30px) 10%)",
885   "ellipse(farthest-side closest-side)",
886   "ellipse(closest-side farthest-side)",
887   "ellipse(farthest-side farthest-side)",
888   "ellipse(closest-side closest-side)",
889   "ellipse(closest-side closest-side at center)",
890   "ellipse(20% farthest-side at top)",
891   "ellipse(20px 50% at top right)",
892   "ellipse(closest-side 40% at 50% 100%)",
893   "ellipse(calc(20% + 20%) calc(20px + 20cm) at right bottom)",
895   "inset(1px)",
896   "inset(20% -20px)",
897   "inset(20em 4rem calc(20% + 20px))",
898   "inset(20vh 20vw 20pt 3%)",
899   "inset(5px round 3px)",
900   "inset(1px 2px round 3px / 3px)",
901   "inset(1px 2px 3px round 3px 2em / 20%)",
902   "inset(1px 2px 3px 4px round 3px 2vw 20% / 20px 3em 2vh 20%)",
905 var basicShapeOtherValuesWithFillRule = [
906   "polygon(nonzero, 20px 20px, 30% 30%, 30px 30px)",
907   "polygon(evenodd, 20px 20px, 30% 30%, 30px 30px)",
908   "polygon(evenodd, 20% 20em) content-box",
909   "polygon(evenodd, 20vh 20em) padding-box",
910   "polygon(evenodd, 20vh calc(20% + 20em)) border-box",
911   "polygon(evenodd, 20vh 20vw) margin-box",
914 var basicShapeInvalidValues = [
915   "url(#test) url(#tes2)",
916   "polygon (0 0)",
917   "polygon(20px, 40px)",
918   "border-box content-box",
919   "polygon(0 0) polygon(0 0)",
920   "polygon(nonzero 0 0)",
921   "polygon(evenodd 20px 20px)",
922   "polygon(20px 20px, evenodd)",
923   "polygon(20px 20px, nonzero)",
924   "polygon(0 0) conten-box content-box",
925   "content-box polygon(0 0) conten-box",
926   "padding-box polygon(0 0) conten-box",
927   "polygon(0 0) polygon(0 0) content-box",
928   "polygon(0 0) content-box polygon(0 0)",
929   "polygon(0 0), content-box",
930   "polygon(0 0), polygon(0 0)",
931   "content-box polygon(0 0) polygon(0 0)",
932   "content-box polygon(0 0) none",
933   "none content-box polygon(0 0)",
934   "inherit content-box polygon(0 0)",
935   "initial polygon(0 0)",
936   "polygon(0 0) farthest-side",
937   "farthest-corner polygon(0 0)",
938   "polygon(0 0) farthest-corner",
939   "polygon(0 0) conten-box",
940   "polygon(0 0) polygon(0 0) farthest-corner",
941   "polygon(0 0) polygon(0 0) polygon(0 0)",
942   "border-box polygon(0, 0)",
943   "border-box padding-box",
944   "margin-box farthest-side",
945   "nonsense() border-box",
946   "border-box nonsense()",
948   "circle(at)",
949   "circle(at 20% 20% 30%)",
950   "circle(20px 2px at center)",
951   "circle(2at center)",
952   "circle(closest-corner)",
953   "circle(at center top closest-side)",
954   "circle(-20px)",
955   "circle(farthest-side closest-side)",
956   "circle(20% 20%)",
957   "circle(at farthest-side)",
958   "circle(calc(20px + rubbish))",
959   "circle(at top left 20px)",
961   "ellipse(at)",
962   "ellipse(at 20% 20% 30%)",
963   "ellipse(20px at center)",
964   "ellipse(-20px 20px)",
965   "ellipse(closest-corner farthest-corner)",
966   "ellipse(20px -20px)",
967   "ellipse(-20px -20px)",
968   "ellipse(farthest-side)",
969   "ellipse(20%)",
970   "ellipse(at farthest-side farthest-side)",
971   "ellipse(at top left calc(20px + rubbish))",
972   "ellipse(at top left 20px)",
974   "polygon(at)",
975   "polygon(at 20% 20% 30%)",
976   "polygon(20px at center)",
977   "polygon(2px 2at center)",
978   "polygon(closest-corner farthest-corner)",
979   "polygon(at center top closest-side closest-side)",
980   "polygon(40% at 50% 100%)",
981   "polygon(40% farthest-side 20px at 50% 100%)",
983   "inset()",
984   "inset(round)",
985   "inset(round 3px)",
986   "inset(1px round 1px 2px 3px 4px 5px)",
987   "inset(1px 2px 3px 4px 5px)",
988   "inset(1px, round 3px)",
989   "inset(1px, 2px)",
990   "inset(1px 2px, 3px)",
991   "inset(1px at 3px)",
992   "inset(1px round 1px // 2px)",
993   "inset(1px round)",
994   "inset(1px calc(2px + rubbish))",
995   "inset(1px round 2px calc(3px + rubbish))",
998 var basicShapeUnbalancedValues = [
999   "polygon(30% 30%",
1000   "polygon(nonzero, 20% 20px",
1001   "polygon(evenodd, 20px 20px",
1003   "circle(",
1004   "circle(40% at 50% 100%",
1005   "ellipse(",
1006   "ellipse(40% at 50% 100%",
1008   "inset(1px",
1009   "inset(1px 2px",
1010   "inset(1px 2px 3px",
1011   "inset(1px 2px 3px 4px",
1012   "inset(1px 2px 3px 4px round 5px",
1013   "inset(1px 2px 3px 4px round 5px / 6px",
1016 var basicShapeXywhRectValues = [];
1017 if (IsCSSPropertyPrefEnabled("layout.css.basic-shape-xywh.enabled")) {
1018   basicShapeXywhRectValues.push(
1019     "xywh(1px 2% 3px 4em)",
1020     "xywh(1px 2% 3px 4em round 0px)",
1021     "xywh(1px 2% 3px 4em round 0px 1%)",
1022     "xywh(1px 2% 3px 4em round 0px 1% 2px)",
1023     "xywh(1px 2% 3px 4em round 0px 1% 2px 3em)"
1024   );
1027 if (IsCSSPropertyPrefEnabled("layout.css.basic-shape-rect.enabled")) {
1028   basicShapeXywhRectValues.push(
1029     "rect(auto auto auto auto)",
1030     "rect(1px 2% auto 4em)",
1031     "rect(1px 2% auto 4em round 0px)",
1032     "rect(1px 2% auto 4em round 0px 1%)",
1033     "rect(1px 2% auto 4em round 0px 1% 2px)",
1034     "rect(1px 2% auto 4em round 0px 1% 2px 3em)"
1035   );
1038 var basicShapeShapeValues = [];
1039 var basicShapeShapeValuesWithFillRule = [];
1040 if (IsCSSPropertyPrefEnabled("layout.css.basic-shape-shape.enabled")) {
1041   basicShapeShapeValuesWithFillRule.push(
1042     "shape(evenodd from 0px 0px, line to 10px 10px)",
1043     "shape(nonzero from 0px 0px, line to 10px 10px)"
1044   );
1046   basicShapeShapeValues.push(
1047     "shape(from 0px 0%, line to 10px 10%)",
1048     "shape(from 10px 10px, move by 10px 5px, line by 20px 40%, close)",
1049     "shape(from 10px 10px, hline by 10px, vline to 5rem)",
1050     "shape(from 10px 10px, vline by 5%, hline to 1vw)",
1051     "shape(from 10px 10px, curve to 50px 20px via 10rem 1%)",
1052     "shape(from 10px 10px, smooth to 50px 20px via 10rem 1%)",
1053     "shape(from 10% 1rem, arc to 50px 1pt of 20% cw large rotate 25deg)"
1054   );
1056   // It's fine to include this for properties which don't support shape(),
1057   // e.g. shape-outside, because they must reject these values.
1058   basicShapeInvalidValues.push(
1059     "shape()",
1060     "shape(evenodd, from 0px 0px)",
1061     "shape(from 0px 0px line to 10px 10px)",
1062     "shape(from 0px 0px)",
1063     "shape(close)",
1064     "shape(nonzero, close)"
1065   );
1068 if (/* mozGradientsEnabled */ true) {
1069   // Maybe one day :(
1070   // Extend gradient lists with valid/invalid moz-prefixed expressions:
1071   validNonUrlImageValues.push(
1072     "-moz-linear-gradient(red, blue)",
1073     "-moz-linear-gradient(red, yellow, blue)",
1074     "-moz-linear-gradient(red 1px, yellow 20%, blue 24em, green)",
1075     "-moz-linear-gradient(red, yellow, green, blue 50%)",
1076     "-moz-linear-gradient(red -50%, yellow -25%, green, blue)",
1077     "-moz-linear-gradient(red -99px, yellow, green, blue 120%)",
1078     "-moz-linear-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))",
1079     "-moz-linear-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)",
1081     "-moz-linear-gradient(top, red, blue)",
1083     "-moz-linear-gradient(to top, red, blue)",
1084     "-moz-linear-gradient(to bottom, red, blue)",
1085     "-moz-linear-gradient(to left, red, blue)",
1086     "-moz-linear-gradient(to right, red, blue)",
1087     "-moz-linear-gradient(to top left, red, blue)",
1088     "-moz-linear-gradient(to top right, red, blue)",
1089     "-moz-linear-gradient(to bottom left, red, blue)",
1090     "-moz-linear-gradient(to bottom right, red, blue)",
1091     "-moz-linear-gradient(to left top, red, blue)",
1092     "-moz-linear-gradient(to left bottom, red, blue)",
1093     "-moz-linear-gradient(to right top, red, blue)",
1094     "-moz-linear-gradient(to right bottom, red, blue)",
1096     "-moz-linear-gradient(top left, red, blue)",
1097     "-moz-linear-gradient(left, red, blue)",
1098     "-moz-linear-gradient(bottom, red, blue)",
1100     "-moz-linear-gradient(0, red, blue)",
1102     "-moz-linear-gradient(-33deg, red, blue)",
1104     "-moz-linear-gradient(blue calc(0px) ,green calc(25%) ,red calc(40px) ,blue calc(60px) , yellow  calc(100px))",
1105     "-moz-linear-gradient(-33deg, blue calc(-25%) ,red 40px)",
1106     "-moz-linear-gradient(10deg, blue calc(100px + -25%),red calc(40px))",
1107     "-moz-linear-gradient(10deg, blue calc(-25px),red calc(100%))",
1108     "-moz-linear-gradient(.414rad, blue calc(100px + -25px) ,green calc(100px + -25px) ,red calc(100px + -25%) ,blue calc(-25px) , yellow  calc(-25px))",
1109     "-moz-linear-gradient(1turn, blue calc(-25%) ,green calc(25px) ,red calc(25%),blue calc(0px),white 50px, yellow  calc(-25px))",
1111     "-moz-radial-gradient(red, blue)",
1112     "-moz-radial-gradient(red, yellow, blue)",
1113     "-moz-radial-gradient(red 1px, yellow 20%, blue 24em, green)",
1114     "-moz-radial-gradient(red, yellow, green, blue 50%)",
1115     "-moz-radial-gradient(red -50%, yellow -25%, green, blue)",
1116     "-moz-radial-gradient(red -99px, yellow, green, blue 120%)",
1117     "-moz-radial-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))",
1119     "-moz-radial-gradient(top left, red, blue)",
1120     "-moz-radial-gradient(20% bottom, red, blue)",
1121     "-moz-radial-gradient(center 20%, red, blue)",
1122     "-moz-radial-gradient(left 35px, red, blue)",
1123     "-moz-radial-gradient(10% 10em, red, blue)",
1124     "-moz-radial-gradient(44px top, red, blue)",
1126     "-moz-radial-gradient(0 0, red, blue)",
1127     "-moz-radial-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)",
1129     "-moz-radial-gradient(cover, red, blue)",
1130     "-moz-radial-gradient(cover circle, red, blue)",
1131     "-moz-radial-gradient(contain, red, blue)",
1132     "-moz-radial-gradient(contain ellipse, red, blue)",
1133     "-moz-radial-gradient(circle, red, blue)",
1134     "-moz-radial-gradient(ellipse closest-corner, red, blue)",
1135     "-moz-radial-gradient(farthest-side circle, red, blue)",
1137     "-moz-radial-gradient(top left, cover, red, blue)",
1138     "-moz-radial-gradient(15% 20%, circle, red, blue)",
1139     "-moz-radial-gradient(45px, ellipse closest-corner, red, blue)",
1140     "-moz-radial-gradient(45px, farthest-side circle, red, blue)",
1142     "-moz-repeating-linear-gradient(red, blue)",
1143     "-moz-repeating-linear-gradient(red, yellow, blue)",
1144     "-moz-repeating-linear-gradient(red 1px, yellow 20%, blue 24em, green)",
1145     "-moz-repeating-linear-gradient(red, yellow, green, blue 50%)",
1146     "-moz-repeating-linear-gradient(red -50%, yellow -25%, green, blue)",
1147     "-moz-repeating-linear-gradient(red -99px, yellow, green, blue 120%)",
1148     "-moz-repeating-linear-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))",
1149     "-moz-repeating-linear-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)",
1151     "-moz-repeating-linear-gradient(to top, red, blue)",
1152     "-moz-repeating-linear-gradient(to bottom, red, blue)",
1153     "-moz-repeating-linear-gradient(to left, red, blue)",
1154     "-moz-repeating-linear-gradient(to right, red, blue)",
1155     "-moz-repeating-linear-gradient(to top left, red, blue)",
1156     "-moz-repeating-linear-gradient(to top right, red, blue)",
1157     "-moz-repeating-linear-gradient(to bottom left, red, blue)",
1158     "-moz-repeating-linear-gradient(to bottom right, red, blue)",
1159     "-moz-repeating-linear-gradient(to left top, red, blue)",
1160     "-moz-repeating-linear-gradient(to left bottom, red, blue)",
1161     "-moz-repeating-linear-gradient(to right top, red, blue)",
1162     "-moz-repeating-linear-gradient(to right bottom, red, blue)",
1164     "-moz-repeating-linear-gradient(top left, red, blue)",
1166     "-moz-repeating-radial-gradient(red, blue)",
1167     "-moz-repeating-radial-gradient(red, yellow, blue)",
1168     "-moz-repeating-radial-gradient(red 1px, yellow 20%, blue 24em, green)",
1169     "-moz-repeating-radial-gradient(red, yellow, green, blue 50%)",
1170     "-moz-repeating-radial-gradient(red -50%, yellow -25%, green, blue)",
1171     "-moz-repeating-radial-gradient(red -99px, yellow, green, blue 120%)",
1172     "-moz-repeating-radial-gradient(#ffff00, #ef3, rgba(10, 20, 30, 0.4))",
1173     "-moz-repeating-radial-gradient(rgba(10, 20, 30, 0.4), #ffff00, #ef3)",
1175     "-moz-repeating-radial-gradient(farthest-corner, red, blue)",
1176     "-moz-repeating-radial-gradient(circle, red, blue)",
1177     "-moz-repeating-radial-gradient(ellipse closest-corner, red, blue)",
1179     "-moz-radial-gradient(calc(25%) top, red, blue)",
1180     "-moz-radial-gradient(left calc(25%), red, blue)",
1181     "-moz-radial-gradient(calc(25px) top, red, blue)",
1182     "-moz-radial-gradient(left calc(25px), red, blue)",
1183     "-moz-radial-gradient(calc(-25%) top, red, blue)",
1184     "-moz-radial-gradient(left calc(-25%), red, blue)",
1185     "-moz-radial-gradient(calc(-25px) top, red, blue)",
1186     "-moz-radial-gradient(left calc(-25px), red, blue)",
1187     "-moz-radial-gradient(calc(100px + -25%) top, red, blue)",
1188     "-moz-radial-gradient(left calc(100px + -25%), red, blue)",
1189     "-moz-radial-gradient(calc(100px + -25px) top, red, blue)",
1190     "-moz-radial-gradient(left calc(100px + -25px), red, blue)"
1191   );
1193   invalidNonUrlImageValues.push(
1194     // The entries in this block used to be valid with the older more-complex
1195     // -moz prefixed gradient syntax, but we've since simplified the syntax for
1196     // consistency with -webkit prefixed gradients, in a way that makes these
1197     // invalid now.
1198     "-moz-linear-gradient(center 0%, red, blue)",
1199     "-moz-linear-gradient(50% top, red, blue)",
1200     "-moz-linear-gradient(50% 0%, red, blue)",
1201     "-moz-linear-gradient(0 0, red, blue)",
1202     "-moz-linear-gradient(20% bottom, red, blue)",
1203     "-moz-linear-gradient(center 20%, red, blue)",
1204     "-moz-linear-gradient(left 35px, red, blue)",
1205     "-moz-linear-gradient(10% 10em, red, blue)",
1206     "-moz-linear-gradient(44px top, red, blue)",
1207     "-moz-linear-gradient(0px, red, blue)",
1208     "-moz-linear-gradient(top left 45deg, red, blue)",
1209     "-moz-linear-gradient(20% bottom -300deg, red, blue)",
1210     "-moz-linear-gradient(center 20% 1.95929rad, red, blue)",
1211     "-moz-linear-gradient(left 35px 30grad, red, blue)",
1212     "-moz-linear-gradient(left 35px 0.1turn, red, blue)",
1213     "-moz-linear-gradient(10% 10em 99999deg, red, blue)",
1214     "-moz-linear-gradient(44px top -33deg, red, blue)",
1215     "-moz-linear-gradient(30grad left 35px, red, blue)",
1216     "-moz-linear-gradient(10deg 20px, red, blue)",
1217     "-moz-linear-gradient(1turn 20px, red, blue)",
1218     "-moz-linear-gradient(.414rad bottom, red, blue)",
1219     "-moz-radial-gradient(top left 45deg, red, blue)",
1220     "-moz-radial-gradient(20% bottom -300deg, red, blue)",
1221     "-moz-radial-gradient(center 20% 1.95929rad, red, blue)",
1222     "-moz-radial-gradient(left 35px 30grad, red, blue)",
1223     "-moz-radial-gradient(10% 10em 99999deg, red, blue)",
1224     "-moz-radial-gradient(44px top -33deg, red, blue)",
1225     "-moz-radial-gradient(-33deg, red, blue)",
1226     "-moz-radial-gradient(30grad left 35px, red, blue)",
1227     "-moz-radial-gradient(10deg 20px, red, blue)",
1228     "-moz-radial-gradient(.414rad bottom, red, blue)",
1229     "-moz-radial-gradient(99deg, cover, red, blue)",
1230     "-moz-radial-gradient(-1.2345rad, circle, red, blue)",
1231     "-moz-radial-gradient(399grad, ellipse closest-corner, red, blue)",
1232     "-moz-radial-gradient(399grad, farthest-side circle, red, blue)",
1233     "-moz-radial-gradient(top left 99deg, cover, red, blue)",
1234     "-moz-radial-gradient(15% 20% -1.2345rad, circle, red, blue)",
1235     "-moz-radial-gradient(45px 399grad, ellipse closest-corner, red, blue)",
1236     "-moz-radial-gradient(45px 399grad, farthest-side circle, red, blue)",
1237     "-moz-repeating-linear-gradient(0 0, red, blue)",
1238     "-moz-repeating-linear-gradient(20% bottom, red, blue)",
1239     "-moz-repeating-linear-gradient(center 20%, red, blue)",
1240     "-moz-repeating-linear-gradient(left 35px, red, blue)",
1241     "-moz-repeating-linear-gradient(10% 10em, red, blue)",
1242     "-moz-repeating-linear-gradient(44px top, red, blue)",
1243     "-moz-repeating-linear-gradient(top left 45deg, red, blue)",
1244     "-moz-repeating-linear-gradient(20% bottom -300deg, red, blue)",
1245     "-moz-repeating-linear-gradient(center 20% 1.95929rad, red, blue)",
1246     "-moz-repeating-linear-gradient(left 35px 30grad, red, blue)",
1247     "-moz-repeating-linear-gradient(10% 10em 99999deg, red, blue)",
1248     "-moz-repeating-linear-gradient(44px top -33deg, red, blue)",
1249     "-moz-repeating-linear-gradient(30grad left 35px, red, blue)",
1250     "-moz-repeating-linear-gradient(10deg 20px, red, blue)",
1251     "-moz-repeating-linear-gradient(.414rad bottom, red, blue)",
1253     /* Negative radii */
1254     "-moz-radial-gradient(40%, -100px -10%, red, blue)",
1256     /* no quirks mode colors */
1257     "-moz-radial-gradient(10% bottom, ffffff, black) scroll no-repeat",
1258     /* no quirks mode lengths */
1259     "-moz-linear-gradient(10 10px -45deg, red, blue) repeat",
1260     "-moz-linear-gradient(10px 10 -45deg, red, blue) repeat",
1261     /* Unitless 0 is invalid as an <angle> */
1262     "-moz-linear-gradient(top left 0, red, blue)",
1263     "-moz-linear-gradient(5px 5px 0, red, blue)",
1264     /* There must be a comma between gradient-line (e.g. <angle>) and colors */
1265     "-moz-linear-gradient(30deg red, blue)",
1266     "-moz-linear-gradient(5px 5px 30deg red, blue)",
1267     "-moz-linear-gradient(5px 5px red, blue)",
1268     "-moz-linear-gradient(top left 30deg red, blue)",
1270     /* Old syntax */
1271     "-moz-linear-gradient(10px 10px, 20px, 30px 30px, 40px, from(blue), to(red))",
1272     "-moz-radial-gradient(20px 20px, 10px 10px, from(green), to(#ff00ff))",
1273     "-moz-radial-gradient(10px 10px, 20%, 40px 40px, 10px, from(green), to(#ff00ff))",
1274     "-moz-linear-gradient(10px, 20px, 30px, 40px, color-stop(0.5, #00ccff))",
1275     "-moz-linear-gradient(20px 20px, from(blue), to(red))",
1276     "-moz-linear-gradient(40px 40px, 10px 10px, from(blue) to(red) color-stop(10%, fuchsia))",
1277     "-moz-linear-gradient(20px 20px 30px, 10px 10px, from(red), to(#ff0000))",
1278     "-moz-radial-gradient(left top, center, 20px 20px, 10px, from(blue), to(red))",
1279     "-moz-linear-gradient(left left, top top, from(blue))",
1280     "-moz-linear-gradient(inherit, 10px 10px, from(blue))",
1281     /* New syntax */
1282     "-moz-linear-gradient(10px 10px, 20px, 30px 30px, 40px, blue 0, red 100%)",
1283     "-moz-radial-gradient(20px 20px, 10px 10px, from(green), to(#ff00ff))",
1284     "-moz-radial-gradient(10px 10px, 20%, 40px 40px, 10px, from(green), to(#ff00ff))",
1285     "-moz-linear-gradient(10px, 20px, 30px, 40px, #00ccff 50%)",
1286     "-moz-linear-gradient(40px 40px, 10px 10px, blue 0 fuchsia 10% red 100%)",
1287     "-moz-linear-gradient(20px 20px 30px, 10px 10px, red 0, #ff0000 100%)",
1288     "-moz-radial-gradient(left top, center, 20px 20px, 10px, from(blue), to(red))",
1289     "-moz-linear-gradient(left left, top top, blue 0)",
1290     "-moz-linear-gradient(inherit, 10px 10px, blue 0)",
1291     "-moz-linear-gradient(left left blue red)",
1292     "-moz-linear-gradient(left left blue, red)",
1293     "-moz-linear-gradient()",
1294     "-moz-linear-gradient(cover, red, blue)",
1295     "-moz-linear-gradient(auto, red, blue)",
1296     "-moz-linear-gradient(22 top, red, blue)",
1297     "-moz-linear-gradient(10% red blue)",
1298     "-moz-linear-gradient(10%, red blue)",
1299     "-moz-linear-gradient(10%,, red, blue)",
1300     "-moz-linear-gradient(45px, center, red, blue)",
1301     "-moz-linear-gradient(45px, center red, blue)",
1302     "-moz-radial-gradient(contain, ellipse, red, blue)",
1303     "-moz-radial-gradient(10deg contain, red, blue)",
1304     "-moz-radial-gradient(10deg, contain,, red, blue)",
1305     "-moz-radial-gradient(contain contain, red, blue)",
1306     "-moz-radial-gradient(ellipse circle, red, blue)",
1307     "-moz-radial-gradient(to top left, red, blue)",
1308     "-moz-radial-gradient(center, 10%, red, blue)",
1309     "-moz-radial-gradient(5rad, 20px, red, blue)",
1311     "-moz-radial-gradient(at top left to cover, red, blue)",
1312     "-moz-radial-gradient(at 15% 20% circle, red, blue)",
1314     "-moz-radial-gradient(to cover, red, blue)",
1315     "-moz-radial-gradient(to contain, red, blue)",
1316     "-moz-radial-gradient(to closest-side circle, red, blue)",
1317     "-moz-radial-gradient(to farthest-corner ellipse, red, blue)",
1319     "-moz-radial-gradient(ellipse at 45px closest-corner, red, blue)",
1320     "-moz-radial-gradient(circle at 45px farthest-side, red, blue)",
1321     "-moz-radial-gradient(ellipse 45px, closest-side, red, blue)",
1322     "-moz-radial-gradient(circle 45px, farthest-corner, red, blue)",
1323     "-moz-radial-gradient(ellipse, ellipse closest-side, red, blue)",
1324     "-moz-radial-gradient(circle, circle farthest-corner, red, blue)",
1326     "-moz-radial-gradient(99deg to farthest-corner, red, blue)",
1327     "-moz-radial-gradient(-1.2345rad circle, red, blue)",
1328     "-moz-radial-gradient(ellipse 399grad to closest-corner, red, blue)",
1329     "-moz-radial-gradient(circle 399grad to farthest-side, red, blue)",
1331     "-moz-radial-gradient(at top left 99deg, to farthest-corner, red, blue)",
1332     "-moz-radial-gradient(circle at 15% 20% -1.2345rad, red, blue)",
1333     "-moz-radial-gradient(to top left at 30% 40%, red, blue)",
1334     "-moz-radial-gradient(ellipse at 45px 399grad, to closest-corner, red, blue)",
1335     "-moz-radial-gradient(at 45px 399grad to farthest-side circle, red, blue)",
1337     "-moz-radial-gradient(to 50%, red, blue)",
1338     "-moz-radial-gradient(circle to 50%, red, blue)",
1339     "-moz-radial-gradient(circle to 43px 43px, red, blue)",
1340     "-moz-radial-gradient(circle to 50% 50%, red, blue)",
1341     "-moz-radial-gradient(circle to 43px 50%, red, blue)",
1342     "-moz-radial-gradient(circle to 50% 43px, red, blue)",
1343     "-moz-radial-gradient(ellipse to 43px, red, blue)",
1344     "-moz-radial-gradient(ellipse to 50%, red, blue)",
1346     "-moz-linear-gradient(to 0 0, red, blue)",
1347     "-moz-linear-gradient(to 20% bottom, red, blue)",
1348     "-moz-linear-gradient(to center 20%, red, blue)",
1349     "-moz-linear-gradient(to left 35px, red, blue)",
1350     "-moz-linear-gradient(to 10% 10em, red, blue)",
1351     "-moz-linear-gradient(to 44px top, red, blue)",
1352     "-moz-linear-gradient(to top left 45deg, red, blue)",
1353     "-moz-linear-gradient(to 20% bottom -300deg, red, blue)",
1354     "-moz-linear-gradient(to center 20% 1.95929rad, red, blue)",
1355     "-moz-linear-gradient(to left 35px 30grad, red, blue)",
1356     "-moz-linear-gradient(to 10% 10em 99999deg, red, blue)",
1357     "-moz-linear-gradient(to 44px top -33deg, red, blue)",
1358     "-moz-linear-gradient(to -33deg, red, blue)",
1359     "-moz-linear-gradient(to 30grad left 35px, red, blue)",
1360     "-moz-linear-gradient(to 10deg 20px, red, blue)",
1361     "-moz-linear-gradient(to .414rad bottom, red, blue)",
1363     "-moz-linear-gradient(to top top, red, blue)",
1364     "-moz-linear-gradient(to bottom bottom, red, blue)",
1365     "-moz-linear-gradient(to left left, red, blue)",
1366     "-moz-linear-gradient(to right right, red, blue)",
1368     "-moz-repeating-linear-gradient(10px 10px, 20px, 30px 30px, 40px, blue 0, red 100%)",
1369     "-moz-repeating-radial-gradient(20px 20px, 10px 10px, from(green), to(#ff00ff))",
1370     "-moz-repeating-radial-gradient(10px 10px, 20%, 40px 40px, 10px, from(green), to(#ff00ff))",
1371     "-moz-repeating-linear-gradient(10px, 20px, 30px, 40px, #00ccff 50%)",
1372     "-moz-repeating-linear-gradient(40px 40px, 10px 10px, blue 0 fuchsia 10% red 100%)",
1373     "-moz-repeating-linear-gradient(20px 20px 30px, 10px 10px, red 0, #ff0000 100%)",
1374     "-moz-repeating-radial-gradient(left top, center, 20px 20px, 10px, from(blue), to(red))",
1375     "-moz-repeating-linear-gradient(left left, top top, blue 0)",
1376     "-moz-repeating-linear-gradient(inherit, 10px 10px, blue 0)",
1377     "-moz-repeating-linear-gradient(left left blue red)",
1378     "-moz-repeating-linear-gradient()",
1380     "-moz-repeating-linear-gradient(to 0 0, red, blue)",
1381     "-moz-repeating-linear-gradient(to 20% bottom, red, blue)",
1382     "-moz-repeating-linear-gradient(to center 20%, red, blue)",
1383     "-moz-repeating-linear-gradient(to left 35px, red, blue)",
1384     "-moz-repeating-linear-gradient(to 10% 10em, red, blue)",
1385     "-moz-repeating-linear-gradient(to 44px top, red, blue)",
1386     "-moz-repeating-linear-gradient(to top left 45deg, red, blue)",
1387     "-moz-repeating-linear-gradient(to 20% bottom -300deg, red, blue)",
1388     "-moz-repeating-linear-gradient(to center 20% 1.95929rad, red, blue)",
1389     "-moz-repeating-linear-gradient(to left 35px 30grad, red, blue)",
1390     "-moz-repeating-linear-gradient(to 10% 10em 99999deg, red, blue)",
1391     "-moz-repeating-linear-gradient(to 44px top -33deg, red, blue)",
1392     "-moz-repeating-linear-gradient(to -33deg, red, blue)",
1393     "-moz-repeating-linear-gradient(to 30grad left 35px, red, blue)",
1394     "-moz-repeating-linear-gradient(to 10deg 20px, red, blue)",
1395     "-moz-repeating-linear-gradient(to .414rad bottom, red, blue)",
1397     "-moz-repeating-linear-gradient(to top top, red, blue)",
1398     "-moz-repeating-linear-gradient(to bottom bottom, red, blue)",
1399     "-moz-repeating-linear-gradient(to left left, red, blue)",
1400     "-moz-repeating-linear-gradient(to right right, red, blue)",
1402     "-moz-repeating-radial-gradient(to top left at 30% 40%, red, blue)",
1403     "-moz-repeating-radial-gradient(ellipse at 45px closest-corner, red, blue)",
1404     "-moz-repeating-radial-gradient(circle at 45px farthest-side, red, blue)",
1406     /* Valid only when unprefixed */
1407     "-moz-radial-gradient(at top left, red, blue)",
1408     "-moz-radial-gradient(at 20% bottom, red, blue)",
1409     "-moz-radial-gradient(at center 20%, red, blue)",
1410     "-moz-radial-gradient(at left 35px, red, blue)",
1411     "-moz-radial-gradient(at 10% 10em, red, blue)",
1412     "-moz-radial-gradient(at 44px top, red, blue)",
1413     "-moz-radial-gradient(at 0 0, red, blue)",
1415     "-moz-radial-gradient(circle 43px, red, blue)",
1416     "-moz-radial-gradient(ellipse 43px 43px, red, blue)",
1417     "-moz-radial-gradient(ellipse 50% 50%, red, blue)",
1418     "-moz-radial-gradient(ellipse 43px 50%, red, blue)",
1419     "-moz-radial-gradient(ellipse 50% 43px, red, blue)",
1421     "-moz-radial-gradient(farthest-corner at top left, red, blue)",
1422     "-moz-radial-gradient(ellipse closest-corner at 45px, red, blue)",
1423     "-moz-radial-gradient(circle farthest-side at 45px, red, blue)",
1424     "-moz-radial-gradient(closest-side ellipse at 50%, red, blue)",
1425     "-moz-radial-gradient(farthest-corner circle at 4em, red, blue)",
1427     "-moz-radial-gradient(30% 40% at top left, red, blue)",
1428     "-moz-radial-gradient(50px 60px at 15% 20%, red, blue)",
1429     "-moz-radial-gradient(7em 8em at 45px, red, blue)"
1430   );
1433 const pathValues = {
1434   other_values: [
1435     "path('M 10 10 20 20 H 90 V 90 Z')",
1436     "path('M10 10 20,20H90V90Z')",
1437     "path('M 10 10 C 20 20, 40 20, 50 10')",
1438     "path('M 10 80 C 40 10, 65 10, 95 80 S 1.5e2 150, 180 80')",
1439     "path('M 10 80 Q 95 10 180 80')",
1440     "path('M 10 80 Q 52.5 10, 95 80 T 180 80')",
1441     "path('M 80 80 A 45 45, 0, 0, 0, 1.25e2 1.25e2 L 125 80 Z')",
1442     "path('M100-200h20z')",
1443     "path('M10,10L20.6.5z')",
1444   ],
1445   invalid_values: [
1446     "path()",
1447     "path(a)",
1448     "path('M 10 Z')",
1449     "path('M 10-10 20')",
1450     "path('M 10 10 C 20 20 40 20')",
1451   ],
1454 var gCSSProperties = {
1455   animation: {
1456     domProp: "animation",
1457     inherited: false,
1458     type: CSS_TYPE_TRUE_SHORTHAND,
1459     applies_to_marker: true,
1460     subproperties: [
1461       "animation-name",
1462       "animation-duration",
1463       "animation-timing-function",
1464       "animation-delay",
1465       "animation-direction",
1466       "animation-fill-mode",
1467       "animation-iteration-count",
1468       "animation-play-state",
1469     ],
1470     initial_values: [
1471       "none none 0s 0s ease normal running 1.0",
1472       "none",
1473       "0s",
1474       "ease",
1475       "normal",
1476       "running",
1477       "1.0",
1478     ],
1479     other_values: [
1480       "none none 0s 0s cubic-bezier(0.25, 0.1, 0.25, 1.0) normal running 1.0",
1481       "bounce 1s linear 2s",
1482       "bounce 1s 2s linear",
1483       "bounce linear 1s 2s",
1484       "linear bounce 1s 2s",
1485       "linear 1s bounce 2s",
1486       "linear 1s 2s bounce",
1487       "1s bounce linear 2s",
1488       "1s bounce 2s linear",
1489       "1s 2s bounce linear",
1490       "1s linear bounce 2s",
1491       "1s linear 2s bounce",
1492       "1s 2s linear bounce",
1493       "bounce linear 1s",
1494       "bounce 1s linear",
1495       "linear bounce 1s",
1496       "linear 1s bounce",
1497       "1s bounce linear",
1498       "1s linear bounce",
1499       "1s 2s bounce",
1500       "1s bounce 2s",
1501       "bounce 1s 2s",
1502       "1s 2s linear",
1503       "1s linear 2s",
1504       "linear 1s 2s",
1505       "bounce 1s",
1506       "1s bounce",
1507       "linear 1s",
1508       "1s linear",
1509       "1s 2s",
1510       "2s 1s",
1511       "bounce",
1512       "linear",
1513       "1s",
1514       "height",
1515       "2s",
1516       "ease-in-out",
1517       "2s ease-in",
1518       "opacity linear",
1519       "ease-out 2s",
1520       "2s color, 1s bounce, 500ms height linear, 1s opacity 4s cubic-bezier(0.0, 0.1, 1.0, 1.0)",
1521       "1s \\32bounce linear 2s",
1522       "1s -bounce linear 2s",
1523       "1s -\\32bounce linear 2s",
1524       "1s \\32 0bounce linear 2s",
1525       "1s -\\32 0bounce linear 2s",
1526       "1s \\2bounce linear 2s",
1527       "1s -\\2bounce linear 2s",
1528       "2s, 1s bounce",
1529       "1s bounce, 2s",
1530       "2s all, 1s bounce",
1531       "1s bounce, 2s all",
1532       "1s bounce, 2s none",
1533       "2s none, 1s bounce",
1534       "2s bounce, 1s all",
1535       "2s all, 1s bounce",
1536     ],
1537     invalid_values: [
1538       "2s inherit",
1539       "inherit 2s",
1540       "2s bounce, 1s inherit",
1541       "2s inherit, 1s bounce",
1542       "2s initial",
1543       "2s all,, 1s bounce",
1544       "2s all, , 1s bounce",
1545       "bounce 1s cubic-bezier(0, rubbish) 2s",
1546       "bounce 1s steps(rubbish) 2s",
1547       "2s unset",
1548     ],
1549   },
1550   "animation-delay": {
1551     domProp: "animationDelay",
1552     inherited: false,
1553     type: CSS_TYPE_LONGHAND,
1554     applies_to_marker: true,
1555     initial_values: ["0s", "0ms"],
1556     other_values: [
1557       "1s",
1558       "250ms",
1559       "-100ms",
1560       "-1s",
1561       "1s, 250ms, 2.3s",
1562       "calc(1s + 2ms)",
1563     ],
1564     invalid_values: ["0", "0px"],
1565   },
1566   "animation-direction": {
1567     domProp: "animationDirection",
1568     inherited: false,
1569     type: CSS_TYPE_LONGHAND,
1570     applies_to_marker: true,
1571     initial_values: ["normal"],
1572     other_values: [
1573       "alternate",
1574       "normal, alternate",
1575       "alternate, normal",
1576       "normal, normal",
1577       "normal, normal, normal",
1578       "reverse",
1579       "alternate-reverse",
1580       "normal, reverse, alternate-reverse, alternate",
1581     ],
1582     invalid_values: [
1583       "normal normal",
1584       "inherit, normal",
1585       "reverse-alternate",
1586       "normal, unset",
1587       "unset, normal",
1588     ],
1589   },
1590   "animation-duration": {
1591     domProp: "animationDuration",
1592     inherited: false,
1593     type: CSS_TYPE_LONGHAND,
1594     initial_values: ["0s", "0ms"],
1595     applies_to_marker: true,
1596     other_values: ["1s", "250ms", "1s, 250ms, 2.3s", "calc(1s + 2ms)"],
1597     invalid_values: ["0", "0px", "-1ms", "-2s"],
1598   },
1599   "animation-fill-mode": {
1600     domProp: "animationFillMode",
1601     inherited: false,
1602     type: CSS_TYPE_LONGHAND,
1603     applies_to_marker: true,
1604     initial_values: ["none"],
1605     other_values: [
1606       "forwards",
1607       "backwards",
1608       "both",
1609       "none, none",
1610       "forwards, backwards",
1611       "forwards, none",
1612       "none, both",
1613     ],
1614     invalid_values: ["all"],
1615   },
1616   "animation-iteration-count": {
1617     domProp: "animationIterationCount",
1618     inherited: false,
1619     type: CSS_TYPE_LONGHAND,
1620     applies_to_marker: true,
1621     initial_values: ["1"],
1622     other_values: [
1623       "infinite",
1624       "0",
1625       "0.5",
1626       "7.75",
1627       "-0.0",
1628       "1, 2, 3",
1629       "infinite, 2",
1630       "1, infinite",
1631       "calc(1 + 2.0)",
1632     ],
1633     // negatives forbidden per
1634     // http://lists.w3.org/Archives/Public/www-style/2011Mar/0355.html
1635     invalid_values: ["none", "-1", "-0.5", "-1, infinite", "infinite, -3"],
1636   },
1637   "animation-name": {
1638     domProp: "animationName",
1639     inherited: false,
1640     type: CSS_TYPE_LONGHAND,
1641     applies_to_marker: true,
1642     initial_values: ["none"],
1643     other_values: [
1644       "all",
1645       "ball",
1646       "mall",
1647       "color",
1648       "bounce, bubble, opacity",
1649       "foobar",
1650       "auto",
1651       "\\32bounce",
1652       "-bounce",
1653       "-\\32bounce",
1654       "\\32 0bounce",
1655       "-\\32 0bounce",
1656       "\\2bounce",
1657       "-\\2bounce",
1658     ],
1659     invalid_values: [
1660       "bounce, initial",
1661       "initial, bounce",
1662       "bounce, inherit",
1663       "inherit, bounce",
1664       "bounce, unset",
1665       "unset, bounce",
1666     ],
1667   },
1668   "animation-play-state": {
1669     domProp: "animationPlayState",
1670     inherited: false,
1671     type: CSS_TYPE_LONGHAND,
1672     applies_to_marker: true,
1673     initial_values: ["running"],
1674     other_values: [
1675       "paused",
1676       "running, running",
1677       "paused, running",
1678       "paused, paused",
1679       "running, paused",
1680       "paused, running, running, running, paused, running",
1681     ],
1682     invalid_values: ["0"],
1683   },
1684   "animation-timing-function": {
1685     domProp: "animationTimingFunction",
1686     inherited: false,
1687     type: CSS_TYPE_LONGHAND,
1688     applies_to_marker: true,
1689     initial_values: ["ease"],
1690     other_values: [
1691       "cubic-bezier(0.25, 0.1, 0.25, 1.0)",
1692       "linear",
1693       "ease-in",
1694       "ease-out",
1695       "ease-in-out",
1696       "linear, ease-in, cubic-bezier(0.1, 0.2, 0.8, 0.9)",
1697       "cubic-bezier(0.5, 0.5, 0.5, 0.5)",
1698       "cubic-bezier(0.25, 1.5, 0.75, -0.5)",
1699       "step-start",
1700       "step-end",
1701       "steps(1)",
1702       "steps(2, start)",
1703       "steps(386)",
1704       "steps(3, end)",
1705       "steps(calc(2 + 1))",
1706       "steps(1, jump-start)",
1707       "steps(1, jump-end)",
1708       "steps(2, jump-none)",
1709       "steps(1, jump-both)",
1710     ],
1711     invalid_values: [
1712       "none",
1713       "auto",
1714       "cubic-bezier(0.25, 0.1, 0.25)",
1715       "cubic-bezier(0.25, 0.1, 0.25, 0.25, 1.0)",
1716       "cubic-bezier(-0.5, 0.5, 0.5, 0.5)",
1717       "cubic-bezier(1.5, 0.5, 0.5, 0.5)",
1718       "cubic-bezier(0.5, 0.5, -0.5, 0.5)",
1719       "cubic-bezier(0.5, 0.5, 1.5, 0.5)",
1720       "steps(2, step-end)",
1721       "steps(0)",
1722       "steps(-2)",
1723       "steps(0, step-end, 1)",
1724       "steps(0, jump-start)",
1725       "steps(0, jump-end)",
1726       "steps(1, jump-none)",
1727       "steps(0, jump-both)",
1728     ],
1729   },
1730   appearance: {
1731     domProp: "appearance",
1732     inherited: false,
1733     type: CSS_TYPE_LONGHAND,
1734     initial_values: ["none"],
1735     other_values: ["auto", "radio", "menulist"],
1736     invalid_values: [],
1737   },
1738   "-moz-appearance": {
1739     domProp: "MozAppearance",
1740     inherited: false,
1741     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
1742     alias_for: "appearance",
1743     subproperties: ["appearance"],
1744   },
1745   "-webkit-appearance": {
1746     domProp: "webkitAppearance",
1747     inherited: false,
1748     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
1749     alias_for: "appearance",
1750     subproperties: ["appearance"],
1751   },
1752   "aspect-ratio": {
1753     domProp: "aspectRatio",
1754     inherited: false,
1755     type: CSS_TYPE_LONGHAND,
1756     initial_values: ["auto"],
1757     other_values: [
1758       "1",
1759       "1.0",
1760       "1 / 2",
1761       "1/2",
1762       "16.2 / 9.5",
1763       "1/0",
1764       "0/1",
1765       "0 / 0",
1766       "auto 1",
1767       "0 auto",
1768     ],
1769     invalid_values: ["none", "1 test", "1 / auto", "auto / 1"],
1770   },
1771   "border-inline": {
1772     domProp: "borderInline",
1773     inherited: false,
1774     type: CSS_TYPE_TRUE_SHORTHAND,
1775     subproperties: [
1776       "border-inline-start-color",
1777       "border-inline-start-style",
1778       "border-inline-start-width",
1779       "border-inline-end-color",
1780       "border-inline-end-style",
1781       "border-inline-end-width",
1782     ],
1783     initial_values: [
1784       "none",
1785       "medium",
1786       "currentColor",
1787       "thin",
1788       "none medium currentcolor",
1789     ],
1790     other_values: [
1791       "solid",
1792       "green",
1793       "medium solid",
1794       "green solid",
1795       "10px solid",
1796       "thick solid",
1797       "5px green none",
1798     ],
1799     invalid_values: ["5%", "5", "5 solid green"],
1800   },
1801   "border-inline-end": {
1802     domProp: "borderInlineEnd",
1803     inherited: false,
1804     type: CSS_TYPE_TRUE_SHORTHAND,
1805     subproperties: [
1806       "border-inline-end-color",
1807       "border-inline-end-style",
1808       "border-inline-end-width",
1809     ],
1810     initial_values: [
1811       "none",
1812       "medium",
1813       "currentColor",
1814       "thin",
1815       "none medium currentcolor",
1816     ],
1817     other_values: [
1818       "solid",
1819       "green",
1820       "medium solid",
1821       "green solid",
1822       "10px solid",
1823       "thick solid",
1824       "5px green none",
1825     ],
1826     invalid_values: ["5%", "5", "5 green none"],
1827   },
1828   "border-inline-color": {
1829     domProp: "borderInlineColor",
1830     inherited: false,
1831     type: CSS_TYPE_TRUE_SHORTHAND,
1832     subproperties: ["border-inline-start-color", "border-inline-end-color"],
1833     initial_values: ["currentColor"],
1834     other_values: ["green", "rgba(255,128,0,0.5) blue", "blue transparent"],
1835     invalid_values: ["#0", "#00", "#00000", "#0000000", "#000000000", "000000"],
1836   },
1837   "border-inline-end-color": {
1838     domProp: "borderInlineEndColor",
1839     inherited: false,
1840     type: CSS_TYPE_LONGHAND,
1841     applies_to_first_letter: true,
1842     logical: true,
1843     initial_values: ["currentColor"],
1844     other_values: ["green", "rgba(255,128,0,0.5)", "transparent"],
1845     invalid_values: ["#0", "#00", "#00000", "#0000000", "#000000000", "000000"],
1846   },
1847   "border-inline-style": {
1848     domProp: "borderInlineStyle",
1849     inherited: false,
1850     type: CSS_TYPE_TRUE_SHORTHAND,
1851     subproperties: ["border-inline-start-style", "border-inline-end-style"],
1852     initial_values: ["none"],
1853     other_values: [
1854       "solid",
1855       "dashed solid",
1856       "solid dotted",
1857       "double double",
1858       "inset outset",
1859       "inset double",
1860       "none groove",
1861       "ridge none",
1862     ],
1863     invalid_values: [],
1864   },
1865   "border-inline-end-style": {
1866     domProp: "borderInlineEndStyle",
1867     inherited: false,
1868     type: CSS_TYPE_LONGHAND,
1869     applies_to_first_letter: true,
1870     logical: true,
1871     /* XXX hidden is sometimes the same as initial */
1872     initial_values: ["none"],
1873     other_values: [
1874       "solid",
1875       "dashed",
1876       "dotted",
1877       "double",
1878       "outset",
1879       "inset",
1880       "groove",
1881       "ridge",
1882     ],
1883     invalid_values: [],
1884   },
1885   "border-inline-width": {
1886     domProp: "borderInlineWidth",
1887     inherited: false,
1888     type: CSS_TYPE_TRUE_SHORTHAND,
1889     subproperties: ["border-inline-start-width", "border-inline-end-width"],
1890     prerequisites: { "border-style": "solid" },
1891     initial_values: ["medium", "3px", "medium medium"],
1892     other_values: [
1893       "thin",
1894       "thick",
1895       "1px",
1896       "2em",
1897       "calc(2px)",
1898       "calc(2px) thin",
1899       "calc(-2px)",
1900       "calc(-2px) thick",
1901       "calc(0em)",
1902       "medium calc(0em)",
1903       "calc(0px)",
1904       "1px calc(0px)",
1905       "calc(5em)",
1906       "1em calc(5em)",
1907     ],
1908     invalid_values: ["5%", "5", "5 thin", "thin 5%", "blue", "solid"],
1909   },
1910   "border-inline-end-width": {
1911     domProp: "borderInlineEndWidth",
1912     inherited: false,
1913     type: CSS_TYPE_LONGHAND,
1914     applies_to_first_letter: true,
1915     logical: true,
1916     prerequisites: { "border-inline-end-style": "solid" },
1917     initial_values: ["medium", "3px", "calc(4px - 1px)"],
1918     other_values: [
1919       "thin",
1920       "thick",
1921       "1px",
1922       "2em",
1923       "calc(2px)",
1924       "calc(-2px)",
1925       "calc(0em)",
1926       "calc(0px)",
1927       "calc(5em)",
1928       "calc(3*25px)",
1929       "calc(25px*3)",
1930       "calc(3*25px + 5em)",
1931     ],
1932     invalid_values: ["5%", "5"],
1933   },
1934   "border-image": {
1935     domProp: "borderImage",
1936     inherited: false,
1937     type: CSS_TYPE_TRUE_SHORTHAND,
1938     subproperties: [
1939       "border-image-source",
1940       "border-image-slice",
1941       "border-image-width",
1942       "border-image-outset",
1943       "border-image-repeat",
1944     ],
1945     initial_values: ["none"],
1946     other_values: [
1947       "url('border.png') 27 27 27 27",
1948       "url('border.png') 27",
1949       "stretch url('border.png')",
1950       "url('border.png') 27 fill",
1951       "url('border.png') 27 27 27 27 repeat",
1952       "repeat url('border.png') 27 27 27 27",
1953       "url('border.png') repeat 27 27 27 27",
1954       "url('border.png') fill 27 27 27 27 repeat",
1955       "url('border.png') fill 27 27 27 27 repeat space",
1956       "url('border.png') 27 27 27 27 / 1em",
1957       "27 27 27 27 / 1em url('border.png') ",
1958       "url('border.png') 27 27 27 27 / 10 10 10 / 10 10 repeat",
1959       "repeat 27 27 27 27 / 10 10 10 / 10 10 url('border.png')",
1960       "url('border.png') 27 27 27 27 / / 10 10 1em",
1961       "fill 27 27 27 27 / / 10 10 1em url('border.png')",
1962       "url('border.png') 27 27 27 27 / 1em 1em 1em 1em repeat",
1963       "url('border.png') 27 27 27 27 / 1em 1em 1em 1em stretch round",
1964     ],
1965     invalid_values: [
1966       "url('border.png') 27 27 27 27 27",
1967       "url('border.png') 27 27 27 27 / 1em 1em 1em 1em 1em",
1968       "url('border.png') 27 27 27 27 /",
1969       "url('border.png') fill",
1970       "url('border.png') fill repeat",
1971       "fill repeat",
1972       "url('border.png') fill / 1em",
1973       "url('border.png') / repeat",
1974       "url('border.png') 1 /",
1975       "url('border.png') 1 / /",
1976       "1 / url('border.png')",
1977       "url('border.png') / 1",
1978       "url('border.png') / / 1",
1979     ],
1980   },
1981   "border-image-source": {
1982     domProp: "borderImageSource",
1983     inherited: false,
1984     type: CSS_TYPE_LONGHAND,
1985     applies_to_first_letter: true,
1986     initial_values: ["none"],
1987     other_values: ["url('border.png')"].concat(validNonUrlImageValues),
1988     invalid_values: ["url('border.png') url('border.png')"].concat(
1989       invalidNonUrlImageValues
1990     ),
1991     unbalanced_values: [].concat(unbalancedGradientAndElementValues),
1992   },
1993   "border-image-slice": {
1994     domProp: "borderImageSlice",
1995     inherited: false,
1996     type: CSS_TYPE_LONGHAND,
1997     applies_to_first_letter: true,
1998     initial_values: ["100%", "100% 100% 100% 100%"],
1999     other_values: [
2000       "0%",
2001       "10",
2002       "10 100% 0 2",
2003       "0 0 0 0",
2004       "fill 10 10",
2005       "10 10 fill",
2006     ],
2007     invalid_values: [
2008       "-10%",
2009       "-10",
2010       "10 10 10 10 10",
2011       "10 10 10 10 -10",
2012       "10px",
2013       "-10px",
2014       "fill",
2015       "fill fill 10px",
2016       "10px fill fill",
2017     ],
2018   },
2019   "border-image-width": {
2020     domProp: "borderImageWidth",
2021     inherited: false,
2022     type: CSS_TYPE_LONGHAND,
2023     applies_to_first_letter: true,
2024     initial_values: ["1", "1 1 1 1"],
2025     other_values: [
2026       "0",
2027       "0%",
2028       "0px",
2029       "auto auto auto auto",
2030       "10 10% auto 15px",
2031       "10px 10px 10px 10px",
2032       "10",
2033       "10 10",
2034       "10 10 10",
2035       "calc(10px)",
2036       "calc(10px + 5%)",
2037     ],
2038     invalid_values: [
2039       "-10",
2040       "-10px",
2041       "-10%",
2042       "10 10 10 10 10",
2043       "10 10 10 10 auto",
2044       "auto auto auto auto auto",
2045       "10px calc(nonsense)",
2046       "1px red",
2047     ],
2048     unbalanced_values: ["10px calc("],
2049   },
2050   "border-image-outset": {
2051     domProp: "borderImageOutset",
2052     inherited: false,
2053     type: CSS_TYPE_LONGHAND,
2054     applies_to_first_letter: true,
2055     initial_values: ["0", "0 0 0 0"],
2056     other_values: [
2057       "10px",
2058       "10",
2059       "10 10",
2060       "10 10 10",
2061       "10 10 10 10",
2062       "10px 10 10 10px",
2063     ],
2064     invalid_values: [
2065       "-10",
2066       "-10px",
2067       "-10%",
2068       "10%",
2069       "10 10 10 10 10",
2070       "10px calc(nonsense)",
2071       "1px red",
2072     ],
2073     unbalanced_values: ["10px calc("],
2074   },
2075   "border-image-repeat": {
2076     domProp: "borderImageRepeat",
2077     inherited: false,
2078     type: CSS_TYPE_LONGHAND,
2079     applies_to_first_letter: true,
2080     initial_values: ["stretch", "stretch stretch"],
2081     other_values: [
2082       "round",
2083       "repeat",
2084       "stretch round",
2085       "repeat round",
2086       "stretch repeat",
2087       "round round",
2088       "repeat repeat",
2089       "space",
2090       "stretch space",
2091       "repeat space",
2092       "round space",
2093       "space space",
2094     ],
2095     invalid_values: ["none", "stretch stretch stretch", "0", "10", "0%", "0px"],
2096   },
2097   "border-radius": {
2098     domProp: "borderRadius",
2099     inherited: false,
2100     type: CSS_TYPE_TRUE_SHORTHAND,
2101     prerequisites: { width: "200px", height: "100px", display: "inline-block" },
2102     subproperties: [
2103       "border-bottom-left-radius",
2104       "border-bottom-right-radius",
2105       "border-top-left-radius",
2106       "border-top-right-radius",
2107     ],
2108     initial_values: [
2109       "0",
2110       "0px",
2111       "0px 0 0 0px",
2112       "calc(-2px)",
2113       "calc(0px) calc(0pt)",
2114       "calc(0px) calc(0pt) calc(0px) calc(0em)",
2115     ],
2116     other_values: [
2117       "0%",
2118       "3%",
2119       "1px",
2120       "2em",
2121       "3em 2px",
2122       "2pt 3% 4em",
2123       "2px 2px 2px 2px", // circular
2124       "3% / 2%",
2125       "1px / 4px",
2126       "2em / 1em",
2127       "3em 2px / 2px 3em",
2128       "2pt 3% 4em / 4pt 1% 5em",
2129       "2px 2px 2px 2px / 4px 4px 4px 4px",
2130       "1pt / 2pt 3pt",
2131       "4pt 5pt / 3pt", // elliptical
2132       "calc(-1%)",
2133       "calc(2px)",
2134       "calc(50%)",
2135       "calc(3*25px)",
2136       "calc(3*25px) 5px",
2137       "5px calc(3*25px)",
2138       "calc(20%) calc(3*25px)",
2139       "calc(25px*3)",
2140       "calc(3*25px + 50%)",
2141       "2px 2px calc(2px + 1%) 2px",
2142       "1px 2px 2px 2px / 2px 2px calc(2px + 1%) 2px",
2143     ],
2144     invalid_values: [
2145       "2px -2px",
2146       "inherit 2px",
2147       "inherit / 2px",
2148       "2px inherit",
2149       "2px / inherit",
2150       "2px 2px 2px 2px 2px",
2151       "1px / 2px 2px 2px 2px 2px",
2152       "2",
2153       "2 2",
2154       "2px 2px 2px 2px / 2px 2px 2 2px",
2155       "2px calc(0px + rubbish)",
2156       "unset 2px",
2157       "unset / 2px",
2158       "2px unset",
2159       "2px / unset",
2160     ],
2161   },
2162   "border-bottom-left-radius": {
2163     domProp: "borderBottomLeftRadius",
2164     inherited: false,
2165     type: CSS_TYPE_LONGHAND,
2166     applies_to_first_letter: true,
2167     prerequisites: { width: "200px", height: "100px", display: "inline-block" },
2168     initial_values: ["0", "0px", "calc(-2px)"],
2169     other_values: [
2170       "0%",
2171       "3%",
2172       "1px",
2173       "2em", // circular
2174       "3% 2%",
2175       "1px 4px",
2176       "2em 2pt", // elliptical
2177       "calc(-1%)",
2178       "calc(2px)",
2179       "calc(50%)",
2180       "calc(3*25px)",
2181       "calc(3*25px) 5px",
2182       "5px calc(3*25px)",
2183       "calc(20%) calc(3*25px)",
2184       "calc(25px*3)",
2185       "calc(3*25px + 50%)",
2186     ],
2187     invalid_values: [
2188       "-1px",
2189       "4px -2px",
2190       "inherit 2px",
2191       "2px inherit",
2192       "2",
2193       "2px 2",
2194       "2 2px",
2195       "2px calc(0px + rubbish)",
2196       "unset 2px",
2197       "2px unset",
2198     ],
2199   },
2200   "border-bottom-right-radius": {
2201     domProp: "borderBottomRightRadius",
2202     inherited: false,
2203     type: CSS_TYPE_LONGHAND,
2204     applies_to_first_letter: true,
2205     prerequisites: { width: "200px", height: "100px", display: "inline-block" },
2206     initial_values: ["0", "0px", "calc(-2px)"],
2207     other_values: [
2208       "0%",
2209       "3%",
2210       "1px",
2211       "2em", // circular
2212       "3% 2%",
2213       "1px 4px",
2214       "2em 2pt", // elliptical
2215       "calc(-1%)",
2216       "calc(2px)",
2217       "calc(50%)",
2218       "calc(3*25px)",
2219       "calc(3*25px) 5px",
2220       "5px calc(3*25px)",
2221       "calc(20%) calc(3*25px)",
2222       "calc(25px*3)",
2223       "calc(3*25px + 50%)",
2224     ],
2225     invalid_values: [
2226       "-1px",
2227       "4px -2px",
2228       "inherit 2px",
2229       "2px inherit",
2230       "2",
2231       "2px 2",
2232       "2 2px",
2233       "2px calc(0px + rubbish)",
2234       "unset 2px",
2235       "2px unset",
2236     ],
2237   },
2238   "border-top-left-radius": {
2239     domProp: "borderTopLeftRadius",
2240     inherited: false,
2241     type: CSS_TYPE_LONGHAND,
2242     applies_to_first_letter: true,
2243     prerequisites: { width: "200px", height: "100px", display: "inline-block" },
2244     initial_values: ["0", "0px", "calc(-2px)"],
2245     other_values: [
2246       "0%",
2247       "3%",
2248       "1px",
2249       "2em", // circular
2250       "3% 2%",
2251       "1px 4px",
2252       "2em 2pt", // elliptical
2253       "calc(-1%)",
2254       "calc(2px)",
2255       "calc(50%)",
2256       "calc(3*25px)",
2257       "calc(3*25px) 5px",
2258       "5px calc(3*25px)",
2259       "calc(20%) calc(3*25px)",
2260       "calc(25px*3)",
2261       "calc(3*25px + 50%)",
2262     ],
2263     invalid_values: [
2264       "-1px",
2265       "4px -2px",
2266       "inherit 2px",
2267       "2px inherit",
2268       "2",
2269       "2px 2",
2270       "2 2px",
2271       "2px calc(0px + rubbish)",
2272       "unset 2px",
2273       "2px unset",
2274     ],
2275   },
2276   "border-top-right-radius": {
2277     domProp: "borderTopRightRadius",
2278     inherited: false,
2279     type: CSS_TYPE_LONGHAND,
2280     applies_to_first_letter: true,
2281     prerequisites: { width: "200px", height: "100px", display: "inline-block" },
2282     initial_values: ["0", "0px", "calc(-2px)"],
2283     other_values: [
2284       "0%",
2285       "3%",
2286       "1px",
2287       "2em", // circular
2288       "3% 2%",
2289       "1px 4px",
2290       "2em 2pt", // elliptical
2291       "calc(-1%)",
2292       "calc(2px)",
2293       "calc(50%)",
2294       "calc(3*25px)",
2295       "calc(3*25px) 5px",
2296       "5px calc(3*25px)",
2297       "calc(20%) calc(3*25px)",
2298       "calc(25px*3)",
2299       "calc(3*25px + 50%)",
2300     ],
2301     invalid_values: [
2302       "-1px",
2303       "4px -2px",
2304       "inherit 2px",
2305       "2px inherit",
2306       "2",
2307       "2px 2",
2308       "2 2px",
2309       "2px calc(0px + rubbish)",
2310       "unset 2px",
2311       "2px unset",
2312     ],
2313   },
2314   "border-start-start-radius": {
2315     domProp: "borderStartStartRadius",
2316     inherited: false,
2317     type: CSS_TYPE_LONGHAND,
2318     applies_to_first_letter: true,
2319     logical: true,
2320     prerequisites: { width: "200px", height: "100px", display: "inline-block" },
2321     initial_values: ["0", "0px", "calc(-2px)"],
2322     other_values: [
2323       "0%",
2324       "3%",
2325       "1px",
2326       "2em", // circular
2327       "3% 2%",
2328       "1px 4px",
2329       "2em 2pt", // elliptical
2330       "calc(-1%)",
2331       "calc(2px)",
2332       "calc(50%)",
2333       "calc(3*25px)",
2334       "calc(3*25px) 5px",
2335       "5px calc(3*25px)",
2336       "calc(20%) calc(3*25px)",
2337       "calc(25px*3)",
2338       "calc(3*25px + 50%)",
2339     ],
2340     invalid_values: [
2341       "-1px",
2342       "4px -2px",
2343       "inherit 2px",
2344       "2px inherit",
2345       "2",
2346       "2px 2",
2347       "2 2px",
2348       "2px calc(0px + rubbish)",
2349       "unset 2px",
2350       "2px unset",
2351     ],
2352   },
2353   "border-start-end-radius": {
2354     domProp: "borderStartEndRadius",
2355     inherited: false,
2356     type: CSS_TYPE_LONGHAND,
2357     applies_to_first_letter: true,
2358     logical: true,
2359     prerequisites: { width: "200px", height: "100px", display: "inline-block" },
2360     initial_values: ["0", "0px", "calc(-2px)"],
2361     other_values: [
2362       "0%",
2363       "3%",
2364       "1px",
2365       "2em", // circular
2366       "3% 2%",
2367       "1px 4px",
2368       "2em 2pt", // elliptical
2369       "calc(-1%)",
2370       "calc(2px)",
2371       "calc(50%)",
2372       "calc(3*25px)",
2373       "calc(3*25px) 5px",
2374       "5px calc(3*25px)",
2375       "calc(20%) calc(3*25px)",
2376       "calc(25px*3)",
2377       "calc(3*25px + 50%)",
2378     ],
2379     invalid_values: [
2380       "-1px",
2381       "4px -2px",
2382       "inherit 2px",
2383       "2px inherit",
2384       "2",
2385       "2px 2",
2386       "2 2px",
2387       "2px calc(0px + rubbish)",
2388       "unset 2px",
2389       "2px unset",
2390     ],
2391   },
2392   "border-end-start-radius": {
2393     domProp: "borderEndStartRadius",
2394     inherited: false,
2395     type: CSS_TYPE_LONGHAND,
2396     applies_to_first_letter: true,
2397     logical: true,
2398     prerequisites: { width: "200px", height: "100px", display: "inline-block" },
2399     initial_values: ["0", "0px", "calc(-2px)"],
2400     other_values: [
2401       "0%",
2402       "3%",
2403       "1px",
2404       "2em", // circular
2405       "3% 2%",
2406       "1px 4px",
2407       "2em 2pt", // elliptical
2408       "calc(-1%)",
2409       "calc(2px)",
2410       "calc(50%)",
2411       "calc(3*25px)",
2412       "calc(3*25px) 5px",
2413       "5px calc(3*25px)",
2414       "calc(20%) calc(3*25px)",
2415       "calc(25px*3)",
2416       "calc(3*25px + 50%)",
2417     ],
2418     invalid_values: [
2419       "-1px",
2420       "4px -2px",
2421       "inherit 2px",
2422       "2px inherit",
2423       "2",
2424       "2px 2",
2425       "2 2px",
2426       "2px calc(0px + rubbish)",
2427       "unset 2px",
2428       "2px unset",
2429     ],
2430   },
2431   "border-end-end-radius": {
2432     domProp: "borderEndEndRadius",
2433     inherited: false,
2434     type: CSS_TYPE_LONGHAND,
2435     applies_to_first_letter: true,
2436     logical: true,
2437     prerequisites: { width: "200px", height: "100px", display: "inline-block" },
2438     initial_values: ["0", "0px", "calc(-2px)"],
2439     other_values: [
2440       "0%",
2441       "3%",
2442       "1px",
2443       "2em", // circular
2444       "3% 2%",
2445       "1px 4px",
2446       "2em 2pt", // elliptical
2447       "calc(-1%)",
2448       "calc(2px)",
2449       "calc(50%)",
2450       "calc(3*25px)",
2451       "calc(3*25px) 5px",
2452       "5px calc(3*25px)",
2453       "calc(20%) calc(3*25px)",
2454       "calc(25px*3)",
2455       "calc(3*25px + 50%)",
2456     ],
2457     invalid_values: [
2458       "-1px",
2459       "4px -2px",
2460       "inherit 2px",
2461       "2px inherit",
2462       "2",
2463       "2px 2",
2464       "2 2px",
2465       "2px calc(0px + rubbish)",
2466       "unset 2px",
2467       "2px unset",
2468     ],
2469   },
2470   "border-inline-start": {
2471     domProp: "borderInlineStart",
2472     inherited: false,
2473     type: CSS_TYPE_TRUE_SHORTHAND,
2474     subproperties: [
2475       "border-inline-start-color",
2476       "border-inline-start-style",
2477       "border-inline-start-width",
2478     ],
2479     initial_values: [
2480       "none",
2481       "medium",
2482       "currentColor",
2483       "thin",
2484       "none medium currentcolor",
2485     ],
2486     other_values: [
2487       "solid",
2488       "green",
2489       "medium solid",
2490       "green solid",
2491       "10px solid",
2492       "thick solid",
2493       "5px green none",
2494     ],
2495     invalid_values: ["5%", "5", "5 green solid"],
2496   },
2497   "border-inline-start-color": {
2498     domProp: "borderInlineStartColor",
2499     inherited: false,
2500     type: CSS_TYPE_LONGHAND,
2501     applies_to_first_letter: true,
2502     logical: true,
2503     initial_values: ["currentColor"],
2504     other_values: ["green", "rgba(255,128,0,0.5)", "transparent"],
2505     invalid_values: ["#0", "#00", "#00000", "#0000000", "#000000000", "000000"],
2506   },
2507   "border-inline-start-style": {
2508     domProp: "borderInlineStartStyle",
2509     inherited: false,
2510     type: CSS_TYPE_LONGHAND,
2511     applies_to_first_letter: true,
2512     logical: true,
2513     /* XXX hidden is sometimes the same as initial */
2514     initial_values: ["none"],
2515     other_values: [
2516       "solid",
2517       "dashed",
2518       "dotted",
2519       "double",
2520       "outset",
2521       "inset",
2522       "groove",
2523       "ridge",
2524     ],
2525     invalid_values: [],
2526   },
2527   "border-inline-start-width": {
2528     domProp: "borderInlineStartWidth",
2529     inherited: false,
2530     type: CSS_TYPE_LONGHAND,
2531     applies_to_first_letter: true,
2532     logical: true,
2533     prerequisites: { "border-inline-start-style": "solid" },
2534     initial_values: ["medium", "3px", "calc(4px - 1px)"],
2535     other_values: [
2536       "thin",
2537       "thick",
2538       "1px",
2539       "2em",
2540       "calc(2px)",
2541       "calc(-2px)",
2542       "calc(0em)",
2543       "calc(0px)",
2544       "calc(5em)",
2545       "calc(3*25px)",
2546       "calc(25px*3)",
2547       "calc(3*25px + 5em)",
2548     ],
2549     invalid_values: ["5%", "5"],
2550   },
2551   "-moz-box-align": {
2552     domProp: "MozBoxAlign",
2553     inherited: false,
2554     type: CSS_TYPE_LONGHAND,
2555     initial_values: ["stretch"],
2556     other_values: ["start", "center", "baseline", "end"],
2557     invalid_values: [],
2558   },
2559   "-moz-box-direction": {
2560     domProp: "MozBoxDirection",
2561     inherited: false,
2562     type: CSS_TYPE_LONGHAND,
2563     initial_values: ["normal"],
2564     other_values: ["reverse"],
2565     invalid_values: [],
2566   },
2567   "-moz-box-flex": {
2568     domProp: "MozBoxFlex",
2569     inherited: false,
2570     type: CSS_TYPE_LONGHAND,
2571     initial_values: ["0", "0.0", "-0.0"],
2572     other_values: ["1", "100", "0.1"],
2573     invalid_values: ["10px", "-1"],
2574   },
2575   "-moz-box-ordinal-group": {
2576     domProp: "MozBoxOrdinalGroup",
2577     inherited: false,
2578     type: CSS_TYPE_LONGHAND,
2579     initial_values: ["1"],
2580     other_values: ["2", "100", "0"],
2581     invalid_values: ["1.0", "-1", "-1000"],
2582   },
2583   "-moz-box-orient": {
2584     domProp: "MozBoxOrient",
2585     inherited: false,
2586     type: CSS_TYPE_LONGHAND,
2587     initial_values: ["horizontal", "inline-axis"],
2588     other_values: ["vertical", "block-axis"],
2589     invalid_values: [],
2590   },
2591   "-moz-box-pack": {
2592     domProp: "MozBoxPack",
2593     inherited: false,
2594     type: CSS_TYPE_LONGHAND,
2595     initial_values: ["start"],
2596     other_values: ["center", "end", "justify"],
2597     invalid_values: [],
2598   },
2599   "box-decoration-break": {
2600     domProp: "boxDecorationBreak",
2601     inherited: false,
2602     type: CSS_TYPE_LONGHAND,
2603     initial_values: ["slice"],
2604     other_values: ["clone"],
2605     invalid_values: ["auto", "none", "1px"],
2606   },
2607   "box-sizing": {
2608     domProp: "boxSizing",
2609     inherited: false,
2610     type: CSS_TYPE_LONGHAND,
2611     initial_values: ["content-box"],
2612     other_values: ["border-box"],
2613     invalid_values: [
2614       "padding-box",
2615       "margin-box",
2616       "content",
2617       "padding",
2618       "border",
2619       "margin",
2620     ],
2621   },
2622   "-moz-box-sizing": {
2623     domProp: "MozBoxSizing",
2624     inherited: false,
2625     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
2626     alias_for: "box-sizing",
2627     subproperties: ["box-sizing"],
2628   },
2629   "print-color-adjust": {
2630     domProp: "printColorAdjust",
2631     inherited: true,
2632     type: CSS_TYPE_LONGHAND,
2633     initial_values: ["economy"],
2634     other_values: ["exact"],
2635     invalid_values: [],
2636   },
2637   "color-adjust": {
2638     domProp: "colorAdjust",
2639     inherited: true,
2640     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
2641     alias_for: "print-color-adjust",
2642     subproperties: ["print-color-adjust"],
2643   },
2644   "color-scheme": {
2645     domProp: "colorScheme",
2646     inherited: true,
2647     type: CSS_TYPE_LONGHAND,
2648     initial_values: ["normal"],
2649     other_values: [
2650       "light",
2651       "dark",
2652       "light dark",
2653       "light dark purple",
2654       "light light dark",
2655       "only light",
2656       "only light dark",
2657       "only light dark purple",
2658       "light only",
2659     ],
2660     invalid_values: ["only normal", "normal only", "only light only"],
2661   },
2662   columns: {
2663     domProp: "columns",
2664     inherited: false,
2665     type: CSS_TYPE_TRUE_SHORTHAND,
2666     subproperties: ["column-count", "column-width"],
2667     initial_values: ["auto", "auto auto"],
2668     other_values: [
2669       "3",
2670       "20px",
2671       "2 10px",
2672       "10px 2",
2673       "2 auto",
2674       "auto 2",
2675       "auto 50px",
2676       "50px auto",
2677     ],
2678     invalid_values: [
2679       "5%",
2680       "-1px",
2681       "-1",
2682       "3 5",
2683       "10px 4px",
2684       "10 2px 5in",
2685       "30px -1",
2686       "auto 3 5px",
2687       "5 auto 20px",
2688       "auto auto auto",
2689       "calc(50px + rubbish) 2",
2690     ],
2691   },
2692   "column-count": {
2693     domProp: "columnCount",
2694     inherited: false,
2695     type: CSS_TYPE_LONGHAND,
2696     initial_values: ["auto"],
2697     other_values: ["1", "17"],
2698     // negative and zero invalid per editor's draft
2699     invalid_values: ["-1", "0", "3px"],
2700   },
2701   "column-fill": {
2702     domProp: "columnFill",
2703     inherited: false,
2704     type: CSS_TYPE_LONGHAND,
2705     initial_values: ["balance"],
2706     other_values: ["auto"],
2707     invalid_values: ["2px", "dotted", "5em"],
2708   },
2709   "column-rule": {
2710     domProp: "columnRule",
2711     inherited: false,
2712     type: CSS_TYPE_TRUE_SHORTHAND,
2713     prerequisites: { color: "green" },
2714     subproperties: [
2715       "column-rule-width",
2716       "column-rule-style",
2717       "column-rule-color",
2718     ],
2719     initial_values: [
2720       "medium none currentColor",
2721       "none",
2722       "medium",
2723       "currentColor",
2724     ],
2725     other_values: [
2726       "2px blue solid",
2727       "red dotted 1px",
2728       "ridge 4px orange",
2729       "5px solid",
2730     ],
2731     invalid_values: [
2732       "2px 3px 4px red",
2733       "dotted dashed",
2734       "5px dashed green 3px",
2735       "5 solid",
2736       "5 green solid",
2737     ],
2738   },
2739   "column-rule-width": {
2740     domProp: "columnRuleWidth",
2741     inherited: false,
2742     type: CSS_TYPE_LONGHAND,
2743     prerequisites: { "column-rule-style": "solid" },
2744     initial_values: ["medium", "3px", "calc(3px)", "calc(5em + 3px - 5em)"],
2745     other_values: [
2746       "thin",
2747       "15px",
2748       /* valid calc() values */
2749       "calc(-2px)",
2750       "calc(2px)",
2751       "calc(3em)",
2752       "calc(3em + 2px)",
2753       "calc( 3em + 2px)",
2754       "calc(3em + 2px )",
2755       "calc( 3em + 2px )",
2756       "calc(3*25px)",
2757       "calc(3 *25px)",
2758       "calc(3 * 25px)",
2759       "calc(3* 25px)",
2760       "calc(25px*3)",
2761       "calc(25px *3)",
2762       "calc(25px* 3)",
2763       "calc(25px * 3)",
2764       "calc(25px * 3 / 4)",
2765       "calc((25px * 3) / 4)",
2766       "calc(25px * (3 / 4))",
2767       "calc(3 * 25px / 4)",
2768       "calc((3 * 25px) / 4)",
2769       "calc(3 * (25px / 4))",
2770       "calc(3em + 25px * 3 / 4)",
2771       "calc(3em + (25px * 3) / 4)",
2772       "calc(3em + 25px * (3 / 4))",
2773       "calc(25px * 3 / 4 + 3em)",
2774       "calc((25px * 3) / 4 + 3em)",
2775       "calc(25px * (3 / 4) + 3em)",
2776       "calc(3em + (25px * 3 / 4))",
2777       "calc(3em + ((25px * 3) / 4))",
2778       "calc(3em + (25px * (3 / 4)))",
2779       "calc((25px * 3 / 4) + 3em)",
2780       "calc(((25px * 3) / 4) + 3em)",
2781       "calc((25px * (3 / 4)) + 3em)",
2782       "calc(3*25px + 1in)",
2783       "calc(1in - 3em + 2px)",
2784       "calc(1in - (3em + 2px))",
2785       "calc((1in - 3em) + 2px)",
2786       "calc(50px/2)",
2787       "calc(50px/(2 - 1))",
2788       "calc(-3px)",
2789       /* numeric reduction cases */
2790       "calc(5 * 3 * 2em)",
2791       "calc(2em * 5 * 3)",
2792       "calc((5 * 3) * 2em)",
2793       "calc(2em * (5 * 3))",
2794       "calc((5 + 3) * 2em)",
2795       "calc(2em * (5 + 3))",
2796       "calc(2em / (5 + 3))",
2797       "calc(2em * (5*2 + 3))",
2798       "calc(2em * ((5*2) + 3))",
2799       "calc(2em * (5*(2 + 3)))",
2801       "calc((5 + 7) * 3em)",
2802       "calc((5em + 3em) - 2em)",
2803       "calc((5em - 3em) + 2em)",
2804       "calc(2em - (5em - 3em))",
2805       "calc(2em + (5em - 3em))",
2806       "calc(2em - (5em + 3em))",
2807       "calc(2em + (5em + 3em))",
2808       "calc(2em + 5em - 3em)",
2809       "calc(2em - 5em - 3em)",
2810       "calc(2em + 5em + 3em)",
2811       "calc(2em - 5em + 3em)",
2813       "calc(2em / 4 * 3)",
2814       "calc(2em * 4 / 3)",
2815       "calc(2em * 4 * 3)",
2816       "calc(2em / 4 / 3)",
2817       "calc(4 * 2em / 3)",
2818       "calc(4 / 3 * 2em)",
2820       "calc((2em / 4) * 3)",
2821       "calc((2em * 4) / 3)",
2822       "calc((2em * 4) * 3)",
2823       "calc((2em / 4) / 3)",
2824       "calc((4 * 2em) / 3)",
2825       "calc((4 / 3) * 2em)",
2827       "calc(2em / (4 * 3))",
2828       "calc(2em * (4 / 3))",
2829       "calc(2em * (4 * 3))",
2830       "calc(2em / (4 / 3))",
2831       "calc(4 * (2em / 3))",
2833       "min(5px)",
2834       "min(5px,2em)",
2836       "max(5px)",
2837       "max(5px,2em)",
2839       "calc(min(5px))",
2840       "calc(min(5px,2em))",
2842       "calc(max(5px))",
2843       "calc(max(5px,2em))",
2845       // Valid cases with unitless zero (which is never
2846       // a length).
2847       "calc(0 * 2em)",
2848       "calc(2em * 0)",
2849       "calc(3em + 0 * 2em)",
2850       "calc(3em + 2em * 0)",
2851       "calc((0 + 2) * 2em)",
2852       "calc((2 + 0) * 2em)",
2853       // And test zero lengths while we're here.
2854       "calc(2 * 0px)",
2855       "calc(0 * 0px)",
2856       "calc(2 * 0em)",
2857       "calc(0 * 0em)",
2858       "calc(0px * 0)",
2859       "calc(0px * 2)",
2860     ],
2861     invalid_values: [
2862       "20",
2863       "-1px",
2864       "red",
2865       "50%",
2866       /* invalid calc() values */
2867       "calc(2em+ 2px)",
2868       "calc(2em +2px)",
2869       "calc(2em+2px)",
2870       "calc(2em- 2px)",
2871       "calc(2em -2px)",
2872       "calc(2em-2px)",
2873       "-moz-min()",
2874       "calc(min())",
2875       "-moz-max()",
2876       "calc(max())",
2877       "-moz-min(5px)",
2878       "-moz-max(5px)",
2879       "-moz-min(5px,2em)",
2880       "-moz-max(5px,2em)",
2881       "calc(5 + 5)",
2882       "calc(5 * 5)",
2883       "calc(5em * 5em)",
2884       "calc(5em / 5em * 5em)",
2886       "calc(4 * 3 / 2em)",
2887       "calc((4 * 3) / 2em)",
2888       "calc(4 * (3 / 2em))",
2889       "calc(4 / (3 * 2em))",
2891       // Tests for handling of unitless zero, which cannot
2892       // be a length inside calc().
2893       "calc(0)",
2894       "calc(0 + 2em)",
2895       "calc(2em + 0)",
2896       "calc(0 * 2)",
2897       "calc(2 * 0)",
2898       "calc(1 * (2em + 0))",
2899       "calc((2em + 0))",
2900       "calc((2em + 0) * 1)",
2901       "calc(1 * (0 + 2em))",
2902       "calc((0 + 2em))",
2903       "calc((0 + 2em) * 1)",
2904     ],
2905   },
2906   "column-rule-style": {
2907     domProp: "columnRuleStyle",
2908     inherited: false,
2909     type: CSS_TYPE_LONGHAND,
2910     initial_values: ["none"],
2911     other_values: [
2912       "solid",
2913       "hidden",
2914       "ridge",
2915       "groove",
2916       "inset",
2917       "outset",
2918       "double",
2919       "dotted",
2920       "dashed",
2921     ],
2922     invalid_values: ["20", "foo"],
2923   },
2924   "column-rule-color": {
2925     domProp: "columnRuleColor",
2926     inherited: false,
2927     type: CSS_TYPE_LONGHAND,
2928     prerequisites: { color: "green" },
2929     initial_values: ["currentColor"],
2930     other_values: ["red", "blue", "#ffff00"],
2931     invalid_values: ["ffff00"],
2932   },
2933   "column-span": {
2934     domProp: "columnSpan",
2935     inherited: false,
2936     type: CSS_TYPE_LONGHAND,
2937     initial_values: ["none"],
2938     other_values: ["all"],
2939     invalid_values: ["-1", "0", "auto", "2px"],
2940   },
2941   "column-width": {
2942     domProp: "columnWidth",
2943     inherited: false,
2944     type: CSS_TYPE_LONGHAND,
2945     initial_values: ["auto"],
2946     other_values: [
2947       "15px",
2948       "calc(15px)",
2949       "calc(30px - 3em)",
2950       "calc(-15px)",
2951       "0px",
2952       "calc(0px)",
2953     ],
2954     invalid_values: ["20", "-1px", "50%"],
2955   },
2956   d: {
2957     domProp: "d",
2958     inherited: false,
2959     type: CSS_TYPE_LONGHAND,
2960     initial_values: ["none"],
2961     other_values: ["path('')", "path(' ')"].concat(pathValues.other_values),
2962     invalid_values: pathValues.invalid_values,
2963   },
2964   "-moz-float-edge": {
2965     domProp: "MozFloatEdge",
2966     inherited: false,
2967     type: CSS_TYPE_LONGHAND,
2968     initial_values: ["content-box"],
2969     other_values: ["margin-box"],
2970     invalid_values: ["content", "padding", "border", "margin"],
2971   },
2972   "-moz-force-broken-image-icon": {
2973     domProp: "MozForceBrokenImageIcon",
2974     inherited: false,
2975     type: CSS_TYPE_LONGHAND,
2976     initial_values: ["0"],
2977     other_values: ["1"],
2978     invalid_values: [],
2979   },
2980   "margin-inline": {
2981     domProp: "marginInline",
2982     inherited: false,
2983     type: CSS_TYPE_TRUE_SHORTHAND,
2984     subproperties: ["margin-inline-start", "margin-inline-end"],
2985     initial_values: ["0", "0px 0em"],
2986     other_values: [
2987       "1px",
2988       "3em 1%",
2989       "5%",
2990       "calc(2px) 1%",
2991       "calc(-2px) 1%",
2992       "calc(50%) 1%",
2993       "calc(3*25px) calc(2px)",
2994       "calc(25px*3) 1em",
2995       "calc(3*25px + 50%) calc(3*25px - 50%)",
2996     ],
2997     invalid_values: [
2998       "5",
2999       "..25px",
3000       ".+5px",
3001       ".px",
3002       "-.px",
3003       "++5px",
3004       "-+4px",
3005       "+-3px",
3006       "--7px",
3007       "+-.6px",
3008       "-+.5px",
3009       "++.7px",
3010       "--.4px",
3011     ],
3012   },
3013   "margin-inline-end": {
3014     domProp: "marginInlineEnd",
3015     inherited: false,
3016     type: CSS_TYPE_LONGHAND,
3017     applies_to_first_letter: true,
3018     logical: true,
3019     /* no subproperties */
3020     /* auto may or may not be initial */
3021     initial_values: [
3022       "0",
3023       "0px",
3024       "0%",
3025       "0em",
3026       "0ex",
3027       "calc(0pt)",
3028       "calc(0% + 0px)",
3029     ],
3030     other_values: [
3031       "1px",
3032       "3em",
3033       "5%",
3034       "calc(2px)",
3035       "calc(-2px)",
3036       "calc(50%)",
3037       "calc(3*25px)",
3038       "calc(25px*3)",
3039       "calc(3*25px + 50%)",
3040     ],
3041     invalid_values: [
3042       "5",
3043       "..25px",
3044       ".+5px",
3045       ".px",
3046       "-.px",
3047       "++5px",
3048       "-+4px",
3049       "+-3px",
3050       "--7px",
3051       "+-.6px",
3052       "-+.5px",
3053       "++.7px",
3054       "--.4px",
3055     ],
3056   },
3057   "margin-inline-start": {
3058     domProp: "marginInlineStart",
3059     inherited: false,
3060     type: CSS_TYPE_LONGHAND,
3061     applies_to_first_letter: true,
3062     logical: true,
3063     /* no subproperties */
3064     /* auto may or may not be initial */
3065     initial_values: [
3066       "0",
3067       "0px",
3068       "0%",
3069       "0em",
3070       "0ex",
3071       "calc(0pt)",
3072       "calc(0% + 0px)",
3073     ],
3074     other_values: [
3075       "1px",
3076       "3em",
3077       "5%",
3078       "calc(2px)",
3079       "calc(-2px)",
3080       "calc(50%)",
3081       "calc(3*25px)",
3082       "calc(25px*3)",
3083       "calc(3*25px + 50%)",
3084     ],
3085     invalid_values: [
3086       "5",
3087       "..25px",
3088       ".+5px",
3089       ".px",
3090       "-.px",
3091       "++5px",
3092       "-+4px",
3093       "+-3px",
3094       "--7px",
3095       "+-.6px",
3096       "-+.5px",
3097       "++.7px",
3098       "--.4px",
3099     ],
3100   },
3101   mask: {
3102     domProp: "mask",
3103     inherited: false,
3104     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
3105     /* FIXME: All mask-border-* should be added when we implement them. */
3106     subproperties: [
3107       "mask-clip",
3108       "mask-image",
3109       "mask-mode",
3110       "mask-origin",
3111       "mask-position-x",
3112       "mask-position-y",
3113       "mask-repeat",
3114       "mask-size",
3115       "mask-composite",
3116     ],
3117     initial_values: [
3118       "match-source",
3119       "none",
3120       "repeat",
3121       "add",
3122       "0% 0%",
3123       "top left",
3124       "0% 0% / auto",
3125       "top left / auto",
3126       "left top / auto",
3127       "0% 0% / auto auto",
3128       "top left none",
3129       "left top none",
3130       "none left top",
3131       "none top left",
3132       "none 0% 0%",
3133       "top left / auto none",
3134       "left top / auto none",
3135       "top left / auto auto none",
3136       "match-source none repeat add top left",
3137       "top left repeat none add",
3138       "none repeat add top left / auto",
3139       "top left / auto repeat none add match-source",
3140       "none repeat add 0% 0% / auto auto match-source",
3141       "border-box",
3142       "border-box border-box",
3143     ],
3144     other_values: [
3145       "none alpha repeat add left top",
3146       "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)",
3147       "no-repeat url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==') alpha left top add",
3148       "repeat-x",
3149       "repeat-y",
3150       "no-repeat",
3151       "none repeat-y alpha add 0% 0%",
3152       "subtract",
3153       "0% top subtract alpha repeat none",
3154       "top",
3155       "left",
3156       "50% 50%",
3157       "center",
3158       "top / 100px",
3159       "left / contain",
3160       "left / cover",
3161       "10px / 10%",
3162       "10em / calc(20px)",
3163       "top left / 100px 100px",
3164       "top left / 100px auto",
3165       "top left / 100px 10%",
3166       "top left / 100px calc(20px)",
3167       "bottom right add none alpha repeat",
3168       "50% alpha",
3169       "alpha 50%",
3170       "50%",
3171       "url(#mymask)",
3172       "radial-gradient(at 10% bottom, #ffffff, black) add no-repeat",
3173       "repeating-radial-gradient(at 10% bottom, #ffffff, black) no-repeat",
3174       "-moz-element(#test) alpha",
3175       /* multiple mask-image */
3176       "url(404.png), url(404.png)",
3177       "repeat-x, subtract, none",
3178       "0% top url(404.png), url(404.png) 50% top",
3179       "subtract repeat-y top left url(404.png), repeat-x alpha",
3180       "top left / contain, bottom right / cover",
3181       /* test cases with clip+origin in the shorthand */
3182       "url(404.png) alpha padding-box",
3183       "url(404.png) border-box alpha",
3184       "content-box url(404.png)",
3185       "url(404.png) alpha padding-box padding-box",
3186       "url(404.png) alpha padding-box border-box",
3187       "content-box border-box url(404.png)",
3188       "alpha padding-box url(404.png) border-box",
3189       "alpha padding-box url(404.png) padding-box",
3190     ],
3191     invalid_values: [
3192       /* mixes with keywords have to be in correct order */
3193       "50% left",
3194       "top 50%",
3195       /* no quirks mode colors */
3196       "radial-gradient(at 10% bottom, ffffff, black) add no-repeat",
3197       /* no quirks mode lengths */
3198       "linear-gradient(red -99, yellow, green, blue 120%)",
3199       /* bug 258080: don't accept background-position separated */
3200       "left url(404.png) top",
3201       "top url(404.png) left",
3202       "-moz-element(#a rubbish)",
3203       "left top / match-source",
3204     ],
3205   },
3206   "mask-clip": {
3207     domProp: "maskClip",
3208     inherited: false,
3209     type: CSS_TYPE_LONGHAND,
3210     initial_values: ["border-box"],
3211     other_values: [
3212       "content-box",
3213       "fill-box",
3214       "stroke-box",
3215       "view-box",
3216       "no-clip",
3217       "padding-box",
3218       "border-box, padding-box",
3219       "padding-box, padding-box, padding-box",
3220       "border-box, border-box",
3221     ],
3222     invalid_values: ["content-box content-box", "margin-box"],
3223   },
3224   "mask-composite": {
3225     domProp: "maskComposite",
3226     inherited: false,
3227     type: CSS_TYPE_LONGHAND,
3228     initial_values: ["add"],
3229     other_values: [
3230       "subtract",
3231       "intersect",
3232       "exclude",
3233       "add, add",
3234       "subtract, intersect",
3235       "subtract, subtract, add",
3236     ],
3237     invalid_values: ["add subtract", "intersect exclude"],
3238   },
3239   "mask-image": {
3240     domProp: "maskImage",
3241     inherited: false,
3242     type: CSS_TYPE_LONGHAND,
3243     initial_values: ["none"],
3244     other_values: [
3245       "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)",
3246       "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==')",
3247       'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
3248       "none, none",
3249       "none, none, none, none, none",
3250       "url(#mymask)",
3251       "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), none",
3252       "none, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), none",
3253       "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)",
3254     ].concat(validNonUrlImageValues),
3255     invalid_values: [].concat(invalidNonUrlImageValues),
3256     unbalanced_values: [].concat(unbalancedGradientAndElementValues),
3257   },
3258   "mask-mode": {
3259     domProp: "maskMode",
3260     inherited: false,
3261     type: CSS_TYPE_LONGHAND,
3262     initial_values: ["match-source"],
3263     other_values: [
3264       "alpha",
3265       "luminance",
3266       "match-source, match-source",
3267       "match-source, alpha",
3268       "alpha, luminance, match-source",
3269     ],
3270     invalid_values: ["match-source match-source", "alpha match-source"],
3271   },
3272   "mask-origin": {
3273     domProp: "maskOrigin",
3274     inherited: false,
3275     type: CSS_TYPE_LONGHAND,
3276     initial_values: ["border-box"],
3277     other_values: [
3278       "padding-box",
3279       "content-box",
3280       "fill-box",
3281       "stroke-box",
3282       "view-box",
3283       "border-box, padding-box",
3284       "padding-box, padding-box, padding-box",
3285       "border-box, border-box",
3286     ],
3287     invalid_values: ["padding-box padding-box", "no-clip", "margin-box"],
3288   },
3289   "mask-position": {
3290     domProp: "maskPosition",
3291     inherited: false,
3292     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
3293     initial_values: [
3294       "top 0% left 0%",
3295       "top left",
3296       "left top",
3297       "0% 0%",
3298       "0% top",
3299       "left 0%",
3300     ],
3301     other_values: [
3302       "top",
3303       "left",
3304       "right",
3305       "bottom",
3306       "center",
3307       "center bottom",
3308       "bottom center",
3309       "center right",
3310       "right center",
3311       "center top",
3312       "top center",
3313       "center left",
3314       "left center",
3315       "right bottom",
3316       "bottom right",
3317       "50%",
3318       "top left, top left",
3319       "top left, top right",
3320       "top right, top left",
3321       "left top, 0% 0%",
3322       "10% 20%, 30%, 40%",
3323       "top left, bottom right",
3324       "right bottom, left top",
3325       "0%",
3326       "0px",
3327       "30px",
3328       "0%, 10%, 20%, 30%",
3329       "top, top, top, top, top",
3330       "calc(20px)",
3331       "calc(20px) 10px",
3332       "10px calc(20px)",
3333       "calc(20px) 25%",
3334       "25% calc(20px)",
3335       "calc(20px) calc(20px)",
3336       "calc(20px + 1em) calc(20px / 2)",
3337       "calc(20px + 50%) calc(50% - 10px)",
3338       "calc(-20px) calc(-50%)",
3339       "calc(-20%) calc(-50%)",
3340       "0px 0px",
3341       "right 20px top 60px",
3342       "right 20px bottom 60px",
3343       "left 20px top 60px",
3344       "left 20px bottom 60px",
3345       "right -50px top -50px",
3346       "left -50px bottom -50px",
3347       "right 20px top -50px",
3348       "right -20px top 50px",
3349       "right 3em bottom 10px",
3350       "bottom 3em right 10px",
3351       "top 3em right 10px",
3352       "left 15px",
3353       "10px top",
3354       "left 20%",
3355       "right 20%",
3356     ],
3357     subproperties: ["mask-position-x", "mask-position-y"],
3358     invalid_values: [
3359       "center 10px center 4px",
3360       "center 10px center",
3361       "top 20%",
3362       "bottom 20%",
3363       "50% left",
3364       "top 50%",
3365       "50% bottom 10%",
3366       "right 10% 50%",
3367       "left right",
3368       "top bottom",
3369       "left 10% right",
3370       "top 20px bottom 20px",
3371       "left left",
3372       "0px calc(0px + rubbish)",
3373       "left top 15px",
3374       "left 10px top",
3375     ],
3376   },
3377   "mask-position-x": {
3378     domProp: "maskPositionX",
3379     inherited: false,
3380     type: CSS_TYPE_LONGHAND,
3381     initial_values: ["left", "0%"],
3382     other_values: [
3383       "right",
3384       "center",
3385       "50%",
3386       "center, center",
3387       "center, right",
3388       "right, center",
3389       "center, 50%",
3390       "10%, 20%, 40%",
3391       "1px",
3392       "30px",
3393       "50%, 10%, 20%, 30%",
3394       "center, center, center, center, center",
3395       "calc(20px)",
3396       "calc(20px + 1em)",
3397       "calc(20px / 2)",
3398       "calc(20px + 50%)",
3399       "calc(50% - 10px)",
3400       "calc(-20px)",
3401       "calc(-50%)",
3402       "calc(-20%)",
3403       "right 20px",
3404       "left 20px",
3405       "right -50px",
3406       "left -50px",
3407       "right 20px",
3408       "right 3em",
3409     ],
3410     invalid_values: [
3411       "center 10px",
3412       "right 10% 50%",
3413       "left right",
3414       "left left",
3415       "bottom 20px",
3416       "top 10%",
3417       "bottom 3em",
3418       "top",
3419       "bottom",
3420       "top, top",
3421       "top, bottom",
3422       "bottom, top",
3423       "top, 0%",
3424       "top, top, top, top, top",
3425       "calc(0px + rubbish)",
3426       "center 0%",
3427     ],
3428   },
3429   "mask-position-y": {
3430     domProp: "maskPositionY",
3431     inherited: false,
3432     type: CSS_TYPE_LONGHAND,
3433     initial_values: ["top", "0%"],
3434     other_values: [
3435       "bottom",
3436       "center",
3437       "50%",
3438       "center, center",
3439       "center, bottom",
3440       "bottom, center",
3441       "center, 0%",
3442       "10%, 20%, 40%",
3443       "1px",
3444       "30px",
3445       "50%, 10%, 20%, 30%",
3446       "center, center, center, center, center",
3447       "calc(20px)",
3448       "calc(20px + 1em)",
3449       "calc(20px / 2)",
3450       "calc(20px + 50%)",
3451       "calc(50% - 10px)",
3452       "calc(-20px)",
3453       "calc(-50%)",
3454       "calc(-20%)",
3455       "bottom 20px",
3456       "top 20px",
3457       "bottom -50px",
3458       "top -50px",
3459       "bottom 20px",
3460       "bottom 3em",
3461     ],
3462     invalid_values: [
3463       "center 10px",
3464       "bottom 10% 50%",
3465       "top bottom",
3466       "top top",
3467       "right 20px",
3468       "left 10%",
3469       "right 3em",
3470       "left",
3471       "right",
3472       "left, left",
3473       "left, right",
3474       "right, left",
3475       "left, 0%",
3476       "left, left, left, left, left",
3477       "calc(0px + rubbish)",
3478       "center 0%",
3479     ],
3480   },
3481   "mask-repeat": {
3482     domProp: "maskRepeat",
3483     inherited: false,
3484     type: CSS_TYPE_LONGHAND,
3485     initial_values: ["repeat", "repeat repeat"],
3486     other_values: [
3487       "repeat-x",
3488       "repeat-y",
3489       "no-repeat",
3490       "repeat-x, repeat-x",
3491       "repeat, no-repeat",
3492       "repeat-y, no-repeat, repeat-y",
3493       "repeat, repeat, repeat",
3494       "repeat no-repeat",
3495       "no-repeat repeat",
3496       "no-repeat no-repeat",
3497       "repeat no-repeat",
3498       "no-repeat no-repeat, no-repeat no-repeat",
3499     ],
3500     invalid_values: [
3501       "repeat repeat repeat",
3502       "repeat-x repeat-y",
3503       "repeat repeat-x",
3504       "repeat repeat-y",
3505       "repeat-x repeat",
3506       "repeat-y repeat",
3507     ],
3508   },
3509   "mask-size": {
3510     domProp: "maskSize",
3511     inherited: false,
3512     type: CSS_TYPE_LONGHAND,
3513     initial_values: ["auto", "auto auto"],
3514     other_values: [
3515       "contain",
3516       "cover",
3517       "100px auto",
3518       "auto 100px",
3519       "100% auto",
3520       "auto 100%",
3521       "25% 50px",
3522       "3em 40%",
3523       "calc(20px)",
3524       "calc(20px) 10px",
3525       "10px calc(20px)",
3526       "calc(20px) 25%",
3527       "25% calc(20px)",
3528       "calc(20px) calc(20px)",
3529       "calc(20px + 1em) calc(20px / 2)",
3530       "calc(20px + 50%) calc(50% - 10px)",
3531       "calc(-20px) calc(-50%)",
3532       "calc(-20%) calc(-50%)",
3533     ],
3534     invalid_values: [
3535       "contain contain",
3536       "cover cover",
3537       "cover auto",
3538       "auto cover",
3539       "contain cover",
3540       "cover contain",
3541       "-5px 3px",
3542       "3px -5px",
3543       "auto -5px",
3544       "-5px auto",
3545       "5 3",
3546       "10px calc(10px + rubbish)",
3547     ],
3548   },
3549   "mask-type": {
3550     domProp: "maskType",
3551     inherited: false,
3552     type: CSS_TYPE_LONGHAND,
3553     initial_values: ["luminance"],
3554     other_values: ["alpha"],
3555     invalid_values: [],
3556   },
3557   "padding-inline-end": {
3558     domProp: "paddingInlineEnd",
3559     inherited: false,
3560     type: CSS_TYPE_LONGHAND,
3561     applies_to_first_letter: true,
3562     // No applies_to_placeholder because we have a !important rule in forms.css.
3563     logical: true,
3564     /* no subproperties */
3565     initial_values: [
3566       "0",
3567       "0px",
3568       "0%",
3569       "0em",
3570       "0ex",
3571       "calc(0pt)",
3572       "calc(0% + 0px)",
3573       "calc(-3px)",
3574       "calc(-1%)",
3575     ],
3576     other_values: [
3577       "1px",
3578       "3em",
3579       "5%",
3580       "calc(2px)",
3581       "calc(50%)",
3582       "calc(3*25px)",
3583       "calc(25px*3)",
3584       "calc(3*25px + 50%)",
3585     ],
3586     invalid_values: ["5"],
3587   },
3588   "padding-inline-start": {
3589     domProp: "paddingInlineStart",
3590     inherited: false,
3591     type: CSS_TYPE_LONGHAND,
3592     applies_to_first_letter: true,
3593     // No applies_to_placeholder because we have a !important rule in forms.css.
3594     logical: true,
3595     /* no subproperties */
3596     initial_values: [
3597       "0",
3598       "0px",
3599       "0%",
3600       "0em",
3601       "0ex",
3602       "calc(0pt)",
3603       "calc(0% + 0px)",
3604       "calc(-3px)",
3605       "calc(-1%)",
3606     ],
3607     other_values: [
3608       "1px",
3609       "3em",
3610       "5%",
3611       "calc(2px)",
3612       "calc(50%)",
3613       "calc(3*25px)",
3614       "calc(25px*3)",
3615       "calc(3*25px + 50%)",
3616     ],
3617     invalid_values: ["5"],
3618   },
3619   resize: {
3620     domProp: "resize",
3621     inherited: false,
3622     type: CSS_TYPE_LONGHAND,
3623     // No applies_to_placeholder because we have a !important rule in forms.css.
3624     prerequisites: { display: "block", overflow: "auto" },
3625     initial_values: ["none"],
3626     other_values: ["both", "horizontal", "vertical", "inline", "block"],
3627     invalid_values: [],
3628   },
3629   "tab-size": {
3630     domProp: "tabSize",
3631     inherited: true,
3632     type: CSS_TYPE_LONGHAND,
3633     initial_values: ["8"],
3634     other_values: [
3635       "0",
3636       "2.5",
3637       "3",
3638       "99",
3639       "12000",
3640       "0px",
3641       "1em",
3642       "calc(1px + 1em)",
3643       "calc(1px - 2px)",
3644       "calc(1 + 1)",
3645       "calc(-2.5)",
3646     ],
3647     invalid_values: [
3648       "9%",
3649       "calc(9% + 1px)",
3650       "calc(1 + 1em)",
3651       "-1",
3652       "-808",
3653       "auto",
3654     ],
3655   },
3656   "-moz-text-size-adjust": {
3657     domProp: "MozTextSizeAdjust",
3658     inherited: true,
3659     type: CSS_TYPE_LONGHAND,
3660     initial_values: ["auto"],
3661     other_values: ["none"],
3662     invalid_values: ["-5%", "0", "100", "0%", "50%", "100%", "220.3%"],
3663   },
3664   transform: {
3665     domProp: "transform",
3666     inherited: false,
3667     type: CSS_TYPE_LONGHAND,
3668     prerequisites: { width: "300px", height: "50px" },
3669     initial_values: ["none"],
3670     other_values: [
3671       "translatex(1px)",
3672       "translatex(4em)",
3673       "translatex(-4px)",
3674       "translatex(3px)",
3675       "translatex(0px) translatex(1px) translatex(2px) translatex(3px) translatex(4px)",
3676       "translatey(4em)",
3677       "translate(3px)",
3678       "translate(10px, -3px)",
3679       "rotate(45deg)",
3680       "rotate(45grad)",
3681       "rotate(45rad)",
3682       "rotate(0.25turn)",
3683       "rotate(0)",
3684       "scalex(10)",
3685       "scalex(10%)",
3686       "scalex(-10)",
3687       "scalex(-10%)",
3688       "scaley(10)",
3689       "scaley(10%)",
3690       "scaley(-10)",
3691       "scaley(-10%)",
3692       "scale(10)",
3693       "scale(10%)",
3694       "scale(10, 20)",
3695       "scale(10%, 20%)",
3696       "scale(-10)",
3697       "scale(-10%)",
3698       "scale(-10, 20)",
3699       "scale(10%, -20%)",
3700       "scale(10, 20%)",
3701       "scale(-10, 20%)",
3702       "skewx(30deg)",
3703       "skewx(0)",
3704       "skewy(0)",
3705       "skewx(30grad)",
3706       "skewx(30rad)",
3707       "skewx(0.08turn)",
3708       "skewy(30deg)",
3709       "skewy(30grad)",
3710       "skewy(30rad)",
3711       "skewy(0.08turn)",
3712       "rotate(45deg) scale(2, 1)",
3713       "skewx(45deg) skewx(-50grad)",
3714       "translate(0, 0) scale(1, 1) skewx(0) skewy(0) matrix(1, 0, 0, 1, 0, 0)",
3715       "translatex(50%)",
3716       "translatey(50%)",
3717       "translate(50%)",
3718       "translate(3%, 5px)",
3719       "translate(5px, 3%)",
3720       "matrix(1, 2, 3, 4, 5, 6)",
3721       /* valid calc() values */
3722       "translatex(calc(5px + 10%))",
3723       "translatey(calc(0.25 * 5px + 10% / 3))",
3724       "translate(calc(5px - 10% * 3))",
3725       "translate(calc(5px - 3 * 10%), 50px)",
3726       "translate(-50px, calc(5px - 10% * 3))",
3727       "translate(10px, calc(min(5px,10%)))",
3728       "translate(calc(max(5px,10%)), 10%)",
3729       "translate(max(5px,10%), 10%)",
3730       "translatez(1px)",
3731       "translatez(4em)",
3732       "translatez(-4px)",
3733       "translatez(0px)",
3734       "translatez(2px) translatez(5px)",
3735       "translate3d(3px, 4px, 5px)",
3736       "translate3d(2em, 3px, 1em)",
3737       "translatex(2px) translate3d(4px, 5px, 6px) translatey(1px)",
3738       "scale3d(4, 4, 4)",
3739       "scale3d(4%, 4%, 4%)",
3740       "scale3d(-2, 3, -7)",
3741       "scale3d(-2%, 3%, -7%)",
3742       "scalez(4)",
3743       "scalez(4%)",
3744       "scalez(-6)",
3745       "scalez(-6%)",
3746       "rotate3d(2, 3, 4, 45deg)",
3747       "rotate3d(-3, 7, 0, 12rad)",
3748       "rotatex(15deg)",
3749       "rotatey(-12grad)",
3750       "rotatez(72rad)",
3751       "rotatex(0.125turn)",
3752       "rotate3d(0, 0, 0, 0rad)",
3753       "perspective(0px)",
3754       "perspective(1000px)",
3755       "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)",
3756     ],
3757     invalid_values: [
3758       "1px",
3759       "#0000ff",
3760       "red",
3761       "auto",
3762       "translatex(1)",
3763       "translatey(1)",
3764       "translate(2)",
3765       "translate(-3, -4)",
3766       "translatex(1px 1px)",
3767       "translatex(translatex(1px))",
3768       "translatex(#0000ff)",
3769       "translatex(red)",
3770       "translatey()",
3771       "matrix(1px, 2px, 3px, 4px, 5px, 6px)",
3772       "skewx(red)",
3773       "matrix(1%, 0, 0, 0, 0px, 0px)",
3774       "matrix(0, 1%, 2, 3, 4px,5px)",
3775       "matrix(0, 1, 2%, 3, 4px, 5px)",
3776       "matrix(0, 1, 2, 3%, 4%, 5%)",
3777       "matrix(1, 2, 3, 4, 5px, 6%)",
3778       "matrix(1, 2, 3, 4, 5%, 6px)",
3779       "matrix(1, 2, 3, 4, 5%, 6%)",
3780       "matrix(1, 2, 3, 4, 5px, 6em)",
3781       /* invalid calc() values */
3782       "translatey(-moz-min(5px,10%))",
3783       "translatex(-moz-max(5px,10%))",
3784       "matrix(1, 0, 0, 1, max(5px * 3), calc(10% - 3px))",
3785       "perspective(-10px)",
3786       "matrix3d(dinosaur)",
3787       "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)",
3788       "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)",
3789       "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15%, 16)",
3790       "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16px)",
3791       "rotatey(words)",
3792       "rotatex(7)",
3793       "translate3d(3px, 4px, 1px, 7px)",
3794       "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13px, 14em, 15px, 16)",
3795       "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 20%, 10%, 15, 16)",
3796     ],
3797   },
3798   "transform-box": {
3799     domProp: "transformBox",
3800     inherited: false,
3801     type: CSS_TYPE_LONGHAND,
3802     initial_values: ["view-box"],
3803     other_values: ["fill-box", "border-box"],
3804     invalid_values: ["padding-box", "margin-box"],
3805   },
3806   "transform-origin": {
3807     domProp: "transformOrigin",
3808     inherited: false,
3809     type: CSS_TYPE_LONGHAND,
3810     /* no subproperties */
3811     prerequisites: { width: "10px", height: "10px", display: "block" },
3812     initial_values: ["50% 50%", "center", "center center"],
3813     other_values: [
3814       "25% 25%",
3815       "6px 5px",
3816       "20% 3em",
3817       "0 0",
3818       "0in 1in",
3819       "top",
3820       "bottom",
3821       "top left",
3822       "top right",
3823       "top center",
3824       "center left",
3825       "center right",
3826       "bottom left",
3827       "bottom right",
3828       "bottom center",
3829       "20% center",
3830       "6px center",
3831       "13in bottom",
3832       "left 50px",
3833       "right 13%",
3834       "center 40px",
3835       "calc(20px)",
3836       "calc(20px) 10px",
3837       "10px calc(20px)",
3838       "calc(20px) 25%",
3839       "25% calc(20px)",
3840       "calc(20px) calc(20px)",
3841       "calc(20px + 1em) calc(20px / 2)",
3842       "calc(20px + 50%) calc(50% - 10px)",
3843       "calc(-20px) calc(-50%)",
3844       "calc(-20%) calc(-50%)",
3845       "6px 5px 5px",
3846       "top center 10px",
3847     ],
3848     invalid_values: [
3849       "red",
3850       "auto",
3851       "none",
3852       "0.5 0.5",
3853       "40px #0000ff",
3854       "border",
3855       "center red",
3856       "right diagonal",
3857       "#00ffff bottom",
3858       "0px calc(0px + rubbish)",
3859       "0px 0px calc(0px + rubbish)",
3860     ],
3861   },
3862   "perspective-origin": {
3863     domProp: "perspectiveOrigin",
3864     inherited: false,
3865     type: CSS_TYPE_LONGHAND,
3866     /* no subproperties */
3867     prerequisites: { width: "10px", height: "10px", display: "block" },
3868     initial_values: ["50% 50%", "center", "center center"],
3869     other_values: [
3870       "25% 25%",
3871       "6px 5px",
3872       "20% 3em",
3873       "0 0",
3874       "0in 1in",
3875       "top",
3876       "bottom",
3877       "top left",
3878       "top right",
3879       "top center",
3880       "center left",
3881       "center right",
3882       "bottom left",
3883       "bottom right",
3884       "bottom center",
3885       "20% center",
3886       "6px center",
3887       "13in bottom",
3888       "left 50px",
3889       "right 13%",
3890       "center 40px",
3891       "calc(20px)",
3892       "calc(20px) 10px",
3893       "10px calc(20px)",
3894       "calc(20px) 25%",
3895       "25% calc(20px)",
3896       "calc(20px) calc(20px)",
3897       "calc(20px + 1em) calc(20px / 2)",
3898       "calc(20px + 50%) calc(50% - 10px)",
3899       "calc(-20px) calc(-50%)",
3900       "calc(-20%) calc(-50%)",
3901     ],
3902     invalid_values: [
3903       "red",
3904       "auto",
3905       "none",
3906       "0.5 0.5",
3907       "40px #0000ff",
3908       "border",
3909       "center red",
3910       "right diagonal",
3911       "#00ffff bottom",
3912     ],
3913   },
3914   perspective: {
3915     domProp: "perspective",
3916     inherited: false,
3917     type: CSS_TYPE_LONGHAND,
3918     initial_values: ["none"],
3919     other_values: ["1000px", "500.2px", "0", "0px"],
3920     invalid_values: ["pants", "200", "-100px", "-27.2em"],
3921   },
3922   "backface-visibility": {
3923     domProp: "backfaceVisibility",
3924     inherited: false,
3925     type: CSS_TYPE_LONGHAND,
3926     initial_values: ["visible"],
3927     other_values: ["hidden"],
3928     invalid_values: ["collapse"],
3929   },
3930   "transform-style": {
3931     domProp: "transformStyle",
3932     inherited: false,
3933     type: CSS_TYPE_LONGHAND,
3934     initial_values: ["flat"],
3935     other_values: ["preserve-3d"],
3936     invalid_values: [],
3937   },
3938   "-moz-user-input": {
3939     domProp: "MozUserInput",
3940     inherited: true,
3941     type: CSS_TYPE_LONGHAND,
3942     initial_values: ["auto"],
3943     other_values: ["none"],
3944     invalid_values: [],
3945   },
3946   "-moz-user-modify": {
3947     domProp: "MozUserModify",
3948     inherited: true,
3949     type: CSS_TYPE_LONGHAND,
3950     initial_values: ["read-only"],
3951     other_values: ["read-write", "write-only"],
3952     invalid_values: [],
3953   },
3954   "-moz-user-select": {
3955     domProp: "MozUserSelect",
3956     inherited: false,
3957     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
3958     alias_for: "user-select",
3959     subproperties: ["user-select"],
3960   },
3961   "user-select": {
3962     domProp: "userSelect",
3963     inherited: false,
3964     type: CSS_TYPE_LONGHAND,
3965     initial_values: ["auto"],
3966     other_values: ["none", "text", "all", "-moz-none"],
3967     invalid_values: [],
3968   },
3969   background: {
3970     domProp: "background",
3971     inherited: false,
3972     type: CSS_TYPE_TRUE_SHORTHAND,
3973     subproperties: [
3974       "background-attachment",
3975       "background-color",
3976       "background-image",
3977       "background-position-x",
3978       "background-position-y",
3979       "background-repeat",
3980       "background-clip",
3981       "background-origin",
3982       "background-size",
3983     ],
3984     initial_values: [
3985       "transparent",
3986       "none",
3987       "repeat",
3988       "scroll",
3989       "0% 0%",
3990       "top left",
3991       "left top",
3992       "0% 0% / auto",
3993       "top left / auto",
3994       "left top / auto",
3995       "0% 0% / auto auto",
3996       "transparent none",
3997       "top left none",
3998       "left top none",
3999       "none left top",
4000       "none top left",
4001       "none 0% 0%",
4002       "left top / auto none",
4003       "left top / auto auto none",
4004       "transparent none repeat scroll top left",
4005       "left top repeat none scroll transparent",
4006       "transparent none repeat scroll top left / auto",
4007       "left top / auto repeat none scroll transparent",
4008       "none repeat scroll 0% 0% / auto auto transparent",
4009       "padding-box border-box",
4010     ],
4011     other_values: [
4012       /* without multiple backgrounds */
4013       "green",
4014       "none green repeat scroll left top",
4015       "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)",
4016       "repeat url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==') transparent left top scroll",
4017       "repeat-x",
4018       "repeat-y",
4019       "no-repeat",
4020       "none repeat-y transparent scroll 0% 0%",
4021       "fixed",
4022       "0% top transparent fixed repeat none",
4023       "top",
4024       "left",
4025       "50% 50%",
4026       "center",
4027       "top / 100px",
4028       "left / contain",
4029       "left / cover",
4030       "10px / 10%",
4031       "10em / calc(20px)",
4032       "top left / 100px 100px",
4033       "top left / 100px auto",
4034       "top left / 100px 10%",
4035       "top left / 100px calc(20px)",
4036       "bottom right 8px scroll none transparent repeat",
4037       "50% transparent",
4038       "transparent 50%",
4039       "50%",
4040       "radial-gradient(at 10% bottom, #ffffff, black) scroll no-repeat",
4041       "repeating-radial-gradient(at 10% bottom, #ffffff, black) scroll no-repeat",
4042       "-moz-element(#test) lime",
4043       /* multiple backgrounds */
4044       "url(404.png), url(404.png)",
4045       "url(404.png), url(404.png) transparent",
4046       "url(404.png), url(404.png) red",
4047       "repeat-x, fixed, none",
4048       "0% top url(404.png), url(404.png) 0% top",
4049       "fixed repeat-y top left url(404.png), repeat-x green",
4050       "top left / contain, bottom right / cover",
4051       /* test cases with clip+origin in the shorthand */
4052       "url(404.png) green padding-box",
4053       "url(404.png) border-box transparent",
4054       "content-box url(404.png) blue",
4055       "url(404.png) green padding-box padding-box",
4056       "url(404.png) green padding-box border-box",
4057       "content-box border-box url(404.png) blue",
4058       "url(404.png) green padding-box text",
4059       "content-box text url(404.png) blue",
4060       /* clip and origin separated in the shorthand */
4061       "url(404.png) padding-box green border-box",
4062       "url(404.png) padding-box green padding-box",
4063       "transparent padding-box url(404.png) border-box",
4064       "transparent padding-box url(404.png) padding-box",
4065       /* text */
4066       "text",
4067       "text border-box",
4068     ],
4069     invalid_values: [
4070       /* mixes with keywords have to be in correct order */
4071       "50% left",
4072       "top 50%",
4073       /* no quirks mode colors */
4074       "radial-gradient(at 10% bottom, ffffff, black) scroll no-repeat",
4075       /* no quirks mode lengths */
4076       "linear-gradient(red -99, yellow, green, blue 120%)",
4077       /* bug 258080: don't accept background-position separated */
4078       "left url(404.png) top",
4079       "top url(404.png) left",
4080       /* not allowed to have color in non-bottom layer */
4081       "url(404.png) transparent, url(404.png)",
4082       "url(404.png) red, url(404.png)",
4083       "url(404.png) transparent, url(404.png) transparent",
4084       "url(404.png) transparent red, url(404.png) transparent red",
4085       "url(404.png) red, url(404.png) red",
4086       "url(404.png) rgba(0, 0, 0, 0), url(404.png)",
4087       "url(404.png) rgb(255, 0, 0), url(404.png)",
4088       "url(404.png) rgba(0, 0, 0, 0), url(404.png) rgba(0, 0, 0, 0)",
4089       "url(404.png) rgba(0, 0, 0, 0) rgb(255, 0, 0), url(404.png) rgba(0, 0, 0, 0) rgb(255, 0, 0)",
4090       "url(404.png) rgb(255, 0, 0), url(404.png) rgb(255, 0, 0)",
4091       /* error inside functions */
4092       "-moz-element(#a rubbish) black",
4093       "content-box text text",
4094       "padding-box text url(404.png) text",
4095     ],
4096   },
4097   "background-attachment": {
4098     domProp: "backgroundAttachment",
4099     inherited: false,
4100     type: CSS_TYPE_LONGHAND,
4101     applies_to_first_letter: true,
4102     applies_to_first_line: true,
4103     applies_to_placeholder: true,
4104     applies_to_cue: true,
4105     initial_values: ["scroll"],
4106     other_values: [
4107       "fixed",
4108       "local",
4109       "scroll,scroll",
4110       "fixed, scroll",
4111       "scroll, fixed, local, scroll",
4112       "fixed, fixed",
4113     ],
4114     invalid_values: [],
4115   },
4116   "background-blend-mode": {
4117     domProp: "backgroundBlendMode",
4118     inherited: false,
4119     type: CSS_TYPE_LONGHAND,
4120     applies_to_first_letter: true,
4121     applies_to_first_line: true,
4122     applies_to_placeholder: true,
4123     applies_to_cue: true,
4124     initial_values: ["normal"],
4125     other_values: [
4126       "multiply",
4127       "screen",
4128       "overlay",
4129       "darken",
4130       "lighten",
4131       "color-dodge",
4132       "color-burn",
4133       "hard-light",
4134       "soft-light",
4135       "difference",
4136       "exclusion",
4137       "hue",
4138       "saturation",
4139       "color",
4140       "luminosity",
4141     ],
4142     invalid_values: ["none", "10px", "multiply multiply", "plus-lighter"],
4143   },
4144   "background-clip": {
4145     /*
4146      * When we rename this to 'background-clip', we also
4147      * need to rename the values to match the spec.
4148      */
4149     domProp: "backgroundClip",
4150     inherited: false,
4151     type: CSS_TYPE_LONGHAND,
4152     applies_to_first_letter: true,
4153     applies_to_first_line: true,
4154     applies_to_placeholder: true,
4155     applies_to_cue: true,
4156     initial_values: ["border-box"],
4157     other_values: [
4158       "content-box",
4159       "padding-box",
4160       "border-box, padding-box",
4161       "padding-box, padding-box, padding-box",
4162       "border-box, border-box",
4163       "text",
4164       "content-box, text",
4165       "text, border-box",
4166       "text, text",
4167     ],
4168     invalid_values: [
4169       "margin-box",
4170       "border-box border-box",
4171       "fill-box",
4172       "stroke-box",
4173       "view-box",
4174       "no-clip",
4175     ],
4176   },
4177   "background-color": {
4178     domProp: "backgroundColor",
4179     inherited: false,
4180     type: CSS_TYPE_LONGHAND,
4181     applies_to_first_letter: true,
4182     applies_to_first_line: true,
4183     applies_to_placeholder: true,
4184     applies_to_cue: true,
4185     initial_values: ["transparent", "rgba(0, 0, 0, 0)"],
4186     other_values: [
4187       "green",
4188       "rgb(255, 0, 128)",
4189       "#fc2",
4190       "#96ed2a",
4191       "black",
4192       "rgba(255,255,0,3)",
4193       "hsl(240, 50%, 50%)",
4194       "rgb(50%, 50%, 50%)",
4195       "-moz-default-background-color",
4196       "rgb(100, 100.0, 100)",
4197       "rgba(255, 127, 15, 0)",
4198       "hsla(240, 97%, 50%, 0.0)",
4199       "rgba(255,255,255,-3.7)",
4200     ],
4201     invalid_values: [
4202       "#0",
4203       "#00",
4204       "#00000",
4205       "#0000000",
4206       "#000000000",
4207       "rgb(100, 100%, 100)",
4208     ],
4209     quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" },
4210   },
4211   "background-image": {
4212     domProp: "backgroundImage",
4213     inherited: false,
4214     type: CSS_TYPE_LONGHAND,
4215     applies_to_first_letter: true,
4216     applies_to_first_line: true,
4217     applies_to_placeholder: true,
4218     applies_to_cue: true,
4219     initial_values: ["none"],
4220     other_values: [
4221       "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)",
4222       "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==')",
4223       'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
4224       "none, none",
4225       "none, none, none, none, none",
4226       "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), none",
4227       "none, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), none",
4228       "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==), url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)",
4229     ].concat(validNonUrlImageValues),
4230     invalid_values: [].concat(invalidNonUrlImageValues),
4231     unbalanced_values: [].concat(unbalancedGradientAndElementValues),
4232   },
4233   "background-origin": {
4234     domProp: "backgroundOrigin",
4235     inherited: false,
4236     type: CSS_TYPE_LONGHAND,
4237     applies_to_first_letter: true,
4238     applies_to_first_line: true,
4239     applies_to_placeholder: true,
4240     applies_to_cue: true,
4241     initial_values: ["padding-box"],
4242     other_values: [
4243       "border-box",
4244       "content-box",
4245       "border-box, padding-box",
4246       "padding-box, padding-box, padding-box",
4247       "border-box, border-box",
4248     ],
4249     invalid_values: [
4250       "margin-box",
4251       "padding-box padding-box",
4252       "fill-box",
4253       "stroke-box",
4254       "view-box",
4255       "no-clip",
4256     ],
4257   },
4258   "background-position": {
4259     domProp: "backgroundPosition",
4260     inherited: false,
4261     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
4262     applies_to_first_letter: true,
4263     applies_to_first_line: true,
4264     applies_to_placeholder: true,
4265     applies_to_cue: true,
4266     initial_values: [
4267       "top 0% left 0%",
4268       "top 0% left",
4269       "top left",
4270       "left top",
4271       "0% 0%",
4272       "0% top",
4273       "left 0%",
4274     ],
4275     other_values: [
4276       "top",
4277       "left",
4278       "right",
4279       "bottom",
4280       "center",
4281       "center bottom",
4282       "bottom center",
4283       "center right",
4284       "right center",
4285       "center top",
4286       "top center",
4287       "center left",
4288       "left center",
4289       "right bottom",
4290       "bottom right",
4291       "50%",
4292       "top left, top left",
4293       "top left, top right",
4294       "top right, top left",
4295       "left top, 0% 0%",
4296       "10% 20%, 30%, 40%",
4297       "top left, bottom right",
4298       "right bottom, left top",
4299       "0%",
4300       "0px",
4301       "30px",
4302       "0%, 10%, 20%, 30%",
4303       "top, top, top, top, top",
4304       "calc(20px)",
4305       "calc(20px) 10px",
4306       "10px calc(20px)",
4307       "calc(20px) 25%",
4308       "25% calc(20px)",
4309       "calc(20px) calc(20px)",
4310       "calc(20px + 1em) calc(20px / 2)",
4311       "calc(20px + 50%) calc(50% - 10px)",
4312       "calc(-20px) calc(-50%)",
4313       "calc(-20%) calc(-50%)",
4314       "0px 0px",
4315       "right 20px top 60px",
4316       "right 20px bottom 60px",
4317       "left 20px top 60px",
4318       "left 20px bottom 60px",
4319       "right -50px top -50px",
4320       "left -50px bottom -50px",
4321       "right 20px top -50px",
4322       "right -20px top 50px",
4323       "right 3em bottom 10px",
4324       "bottom 3em right 10px",
4325       "top 3em right 10px",
4326       "left 15px",
4327       "10px top",
4328       "left top 15px",
4329       "left 10px top",
4330       "left 20%",
4331       "right 20%",
4332     ],
4333     subproperties: ["background-position-x", "background-position-y"],
4334     invalid_values: [
4335       "center 10px center 4px",
4336       "center 10px center",
4337       "top 20%",
4338       "bottom 20%",
4339       "50% left",
4340       "top 50%",
4341       "50% bottom 10%",
4342       "right 10% 50%",
4343       "left right",
4344       "top bottom",
4345       "left 10% right",
4346       "top 20px bottom 20px",
4347       "left left",
4348       "0px calc(0px + rubbish)",
4349     ],
4350     quirks_values: {
4351       "20 20": "20px 20px",
4352       "10 5px": "10px 5px",
4353       "7px 2": "7px 2px",
4354     },
4355   },
4356   "background-position-x": {
4357     domProp: "backgroundPositionX",
4358     inherited: false,
4359     type: CSS_TYPE_LONGHAND,
4360     applies_to_first_letter: true,
4361     applies_to_first_line: true,
4362     applies_to_placeholder: true,
4363     applies_to_cue: true,
4364     initial_values: ["left 0%", "left", "0%"],
4365     other_values: [
4366       "right",
4367       "center",
4368       "50%",
4369       "left, left",
4370       "left, right",
4371       "right, left",
4372       "left, 0%",
4373       "10%, 20%, 40%",
4374       "0px",
4375       "30px",
4376       "0%, 10%, 20%, 30%",
4377       "left, left, left, left, left",
4378       "calc(20px)",
4379       "calc(20px + 1em)",
4380       "calc(20px / 2)",
4381       "calc(20px + 50%)",
4382       "calc(50% - 10px)",
4383       "calc(-20px)",
4384       "calc(-50%)",
4385       "calc(-20%)",
4386       "right 20px",
4387       "left 20px",
4388       "right -50px",
4389       "left -50px",
4390       "right 20px",
4391       "right 3em",
4392     ],
4393     invalid_values: [
4394       "center 10px",
4395       "right 10% 50%",
4396       "left right",
4397       "left left",
4398       "bottom 20px",
4399       "top 10%",
4400       "bottom 3em",
4401       "top",
4402       "bottom",
4403       "top, top",
4404       "top, bottom",
4405       "bottom, top",
4406       "top, 0%",
4407       "top, top, top, top, top",
4408       "calc(0px + rubbish)",
4409     ],
4410   },
4411   "background-position-y": {
4412     domProp: "backgroundPositionY",
4413     inherited: false,
4414     type: CSS_TYPE_LONGHAND,
4415     applies_to_first_letter: true,
4416     applies_to_first_line: true,
4417     applies_to_placeholder: true,
4418     applies_to_cue: true,
4419     initial_values: ["top 0%", "top", "0%"],
4420     other_values: [
4421       "bottom",
4422       "center",
4423       "50%",
4424       "top, top",
4425       "top, bottom",
4426       "bottom, top",
4427       "top, 0%",
4428       "10%, 20%, 40%",
4429       "0px",
4430       "30px",
4431       "0%, 10%, 20%, 30%",
4432       "top, top, top, top, top",
4433       "calc(20px)",
4434       "calc(20px + 1em)",
4435       "calc(20px / 2)",
4436       "calc(20px + 50%)",
4437       "calc(50% - 10px)",
4438       "calc(-20px)",
4439       "calc(-50%)",
4440       "calc(-20%)",
4441       "bottom 20px",
4442       "top 20px",
4443       "bottom -50px",
4444       "top -50px",
4445       "bottom 20px",
4446       "bottom 3em",
4447     ],
4448     invalid_values: [
4449       "center 10px",
4450       "bottom 10% 50%",
4451       "top bottom",
4452       "top top",
4453       "right 20px",
4454       "left 10%",
4455       "right 3em",
4456       "left",
4457       "right",
4458       "left, left",
4459       "left, right",
4460       "right, left",
4461       "left, 0%",
4462       "left, left, left, left, left",
4463       "calc(0px + rubbish)",
4464     ],
4465   },
4466   "background-repeat": {
4467     domProp: "backgroundRepeat",
4468     inherited: false,
4469     type: CSS_TYPE_LONGHAND,
4470     applies_to_first_letter: true,
4471     applies_to_first_line: true,
4472     applies_to_placeholder: true,
4473     applies_to_cue: true,
4474     initial_values: ["repeat", "repeat repeat"],
4475     other_values: [
4476       "repeat-x",
4477       "repeat-y",
4478       "no-repeat",
4479       "repeat-x, repeat-x",
4480       "repeat, no-repeat",
4481       "repeat-y, no-repeat, repeat-y",
4482       "repeat, repeat, repeat",
4483       "repeat no-repeat",
4484       "no-repeat repeat",
4485       "no-repeat no-repeat",
4486       "repeat repeat, repeat repeat",
4487       "round, repeat",
4488       "round repeat, repeat-x",
4489       "round no-repeat, repeat-y",
4490       "round round",
4491       "space, repeat",
4492       "space repeat, repeat-x",
4493       "space no-repeat, repeat-y",
4494       "space space",
4495       "space round",
4496     ],
4497     invalid_values: [
4498       "repeat repeat repeat",
4499       "repeat-x repeat-y",
4500       "repeat repeat-x",
4501       "repeat repeat-y",
4502       "repeat-x repeat",
4503       "repeat-y repeat",
4504       "round round round",
4505       "repeat-x round",
4506       "round repeat-x",
4507       "repeat-y round",
4508       "round repeat-y",
4509       "space space space",
4510       "repeat-x space",
4511       "space repeat-x",
4512       "repeat-y space",
4513       "space repeat-y",
4514     ],
4515   },
4516   "background-size": {
4517     domProp: "backgroundSize",
4518     inherited: false,
4519     type: CSS_TYPE_LONGHAND,
4520     applies_to_first_letter: true,
4521     applies_to_first_line: true,
4522     applies_to_placeholder: true,
4523     applies_to_cue: true,
4524     initial_values: ["auto", "auto auto"],
4525     other_values: [
4526       "contain",
4527       "cover",
4528       "100px auto",
4529       "auto 100px",
4530       "100% auto",
4531       "auto 100%",
4532       "25% 50px",
4533       "3em 40%",
4534       "calc(20px)",
4535       "calc(20px) 10px",
4536       "10px calc(20px)",
4537       "calc(20px) 25%",
4538       "25% calc(20px)",
4539       "calc(20px) calc(20px)",
4540       "calc(20px + 1em) calc(20px / 2)",
4541       "calc(20px + 50%) calc(50% - 10px)",
4542       "calc(-20px) calc(-50%)",
4543       "calc(-20%) calc(-50%)",
4544     ],
4545     invalid_values: [
4546       "contain contain",
4547       "cover cover",
4548       "cover auto",
4549       "auto cover",
4550       "contain cover",
4551       "cover contain",
4552       "-5px 3px",
4553       "3px -5px",
4554       "auto -5px",
4555       "-5px auto",
4556       "5 3",
4557       "10px calc(10px + rubbish)",
4558     ],
4559   },
4560   border: {
4561     domProp: "border",
4562     inherited: false,
4563     type: CSS_TYPE_TRUE_SHORTHAND,
4564     subproperties: [
4565       "border-bottom-color",
4566       "border-bottom-style",
4567       "border-bottom-width",
4568       "border-left-color",
4569       "border-left-style",
4570       "border-left-width",
4571       "border-right-color",
4572       "border-right-style",
4573       "border-right-width",
4574       "border-top-color",
4575       "border-top-style",
4576       "border-top-width",
4577       "border-image-source",
4578       "border-image-slice",
4579       "border-image-width",
4580       "border-image-outset",
4581       "border-image-repeat",
4582     ],
4583     initial_values: [
4584       "none",
4585       "medium",
4586       "currentColor",
4587       "thin",
4588       "none medium currentcolor",
4589       "calc(4px - 1px) none",
4590     ],
4591     other_values: [
4592       "solid",
4593       "medium solid",
4594       "green solid",
4595       "10px solid",
4596       "thick solid",
4597       "calc(2px) solid blue",
4598     ],
4599     invalid_values: ["5%", "medium solid ff00ff", "5 solid green"],
4600   },
4601   "border-bottom": {
4602     domProp: "borderBottom",
4603     inherited: false,
4604     type: CSS_TYPE_TRUE_SHORTHAND,
4605     subproperties: [
4606       "border-bottom-color",
4607       "border-bottom-style",
4608       "border-bottom-width",
4609     ],
4610     initial_values: [
4611       "none",
4612       "medium",
4613       "currentColor",
4614       "thin",
4615       "none medium currentcolor",
4616     ],
4617     other_values: [
4618       "solid",
4619       "green",
4620       "medium solid",
4621       "green solid",
4622       "10px solid",
4623       "thick solid",
4624       "5px green none",
4625     ],
4626     invalid_values: ["5%", "5", "5 solid green"],
4627   },
4628   "border-bottom-color": {
4629     domProp: "borderBottomColor",
4630     inherited: false,
4631     type: CSS_TYPE_LONGHAND,
4632     applies_to_first_letter: true,
4633     prerequisites: { color: "black" },
4634     initial_values: ["currentColor"],
4635     other_values: ["green", "rgba(255,128,0,0.5)", "transparent"],
4636     invalid_values: ["#0", "#00", "#00000", "#0000000", "#000000000"],
4637     quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" },
4638   },
4639   "border-bottom-style": {
4640     domProp: "borderBottomStyle",
4641     inherited: false,
4642     type: CSS_TYPE_LONGHAND,
4643     applies_to_first_letter: true,
4644     /* XXX hidden is sometimes the same as initial */
4645     initial_values: ["none"],
4646     other_values: [
4647       "solid",
4648       "dashed",
4649       "dotted",
4650       "double",
4651       "outset",
4652       "inset",
4653       "groove",
4654       "ridge",
4655     ],
4656     invalid_values: [],
4657   },
4658   "border-bottom-width": {
4659     domProp: "borderBottomWidth",
4660     inherited: false,
4661     type: CSS_TYPE_LONGHAND,
4662     applies_to_first_letter: true,
4663     prerequisites: { "border-bottom-style": "solid" },
4664     initial_values: ["medium", "3px", "calc(4px - 1px)"],
4665     other_values: [
4666       "thin",
4667       "thick",
4668       "1px",
4669       "2em",
4670       "calc(2px)",
4671       "calc(-2px)",
4672       "calc(0em)",
4673       "calc(0px)",
4674       "calc(5em)",
4675       "calc(3*25px)",
4676       "calc(25px*3)",
4677       "calc(3*25px + 5em)",
4678     ],
4679     invalid_values: ["5%"],
4680     quirks_values: { 5: "5px" },
4681   },
4682   "border-collapse": {
4683     domProp: "borderCollapse",
4684     inherited: true,
4685     type: CSS_TYPE_LONGHAND,
4686     initial_values: ["separate"],
4687     other_values: ["collapse"],
4688     invalid_values: [],
4689   },
4690   "border-color": {
4691     domProp: "borderColor",
4692     inherited: false,
4693     type: CSS_TYPE_TRUE_SHORTHAND,
4694     subproperties: [
4695       "border-top-color",
4696       "border-right-color",
4697       "border-bottom-color",
4698       "border-left-color",
4699     ],
4700     initial_values: [
4701       "currentColor",
4702       "currentColor currentColor",
4703       "currentColor currentColor currentColor",
4704       "currentColor currentColor currentcolor CURRENTcolor",
4705     ],
4706     other_values: [
4707       "green",
4708       "currentColor green",
4709       "currentColor currentColor green",
4710       "currentColor currentColor currentColor green",
4711       "rgba(255,128,0,0.5)",
4712       "transparent",
4713     ],
4714     invalid_values: [
4715       "#0",
4716       "#00",
4717       "#00000",
4718       "#0000000",
4719       "#000000000",
4720       "red rgb(nonsense)",
4721       "red 1px",
4722     ],
4723     unbalanced_values: ["red rgb("],
4724     quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" },
4725   },
4726   "border-left": {
4727     domProp: "borderLeft",
4728     inherited: false,
4729     type: CSS_TYPE_TRUE_SHORTHAND,
4730     subproperties: [
4731       "border-left-color",
4732       "border-left-style",
4733       "border-left-width",
4734     ],
4735     initial_values: [
4736       "none",
4737       "medium",
4738       "currentColor",
4739       "thin",
4740       "none medium currentcolor",
4741     ],
4742     other_values: [
4743       "solid",
4744       "green",
4745       "medium solid",
4746       "green solid",
4747       "10px solid",
4748       "thick solid",
4749       "5px green none",
4750     ],
4751     invalid_values: [
4752       "5%",
4753       "5",
4754       "5 solid green",
4755       "calc(5px + rubbish) green solid",
4756       "5px rgb(0, rubbish, 0) solid",
4757     ],
4758   },
4759   "border-left-color": {
4760     domProp: "borderLeftColor",
4761     inherited: false,
4762     type: CSS_TYPE_LONGHAND,
4763     applies_to_first_letter: true,
4764     prerequisites: { color: "black" },
4765     initial_values: ["currentColor"],
4766     other_values: ["green", "rgba(255,128,0,0.5)", "transparent"],
4767     invalid_values: ["#0", "#00", "#00000", "#0000000", "#000000000"],
4768     quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" },
4769   },
4770   "border-left-style": {
4771     domProp: "borderLeftStyle",
4772     inherited: false,
4773     type: CSS_TYPE_LONGHAND,
4774     applies_to_first_letter: true,
4775     /* XXX hidden is sometimes the same as initial */
4776     initial_values: ["none"],
4777     other_values: [
4778       "solid",
4779       "dashed",
4780       "dotted",
4781       "double",
4782       "outset",
4783       "inset",
4784       "groove",
4785       "ridge",
4786     ],
4787     invalid_values: [],
4788   },
4789   "border-left-width": {
4790     domProp: "borderLeftWidth",
4791     inherited: false,
4792     type: CSS_TYPE_LONGHAND,
4793     applies_to_first_letter: true,
4794     prerequisites: { "border-left-style": "solid" },
4795     initial_values: ["medium", "3px", "calc(4px - 1px)"],
4796     other_values: [
4797       "thin",
4798       "thick",
4799       "1px",
4800       "2em",
4801       "calc(2px)",
4802       "calc(-2px)",
4803       "calc(0em)",
4804       "calc(0px)",
4805       "calc(5em)",
4806       "calc(3*25px)",
4807       "calc(25px*3)",
4808       "calc(3*25px + 5em)",
4809     ],
4810     invalid_values: ["5%"],
4811     quirks_values: { 5: "5px" },
4812   },
4813   "border-right": {
4814     domProp: "borderRight",
4815     inherited: false,
4816     type: CSS_TYPE_TRUE_SHORTHAND,
4817     subproperties: [
4818       "border-right-color",
4819       "border-right-style",
4820       "border-right-width",
4821     ],
4822     initial_values: [
4823       "none",
4824       "medium",
4825       "currentColor",
4826       "thin",
4827       "none medium currentcolor",
4828     ],
4829     other_values: [
4830       "solid",
4831       "green",
4832       "medium solid",
4833       "green solid",
4834       "10px solid",
4835       "thick solid",
4836       "5px green none",
4837     ],
4838     invalid_values: ["5%", "5", "5 solid green"],
4839   },
4840   "border-right-color": {
4841     domProp: "borderRightColor",
4842     inherited: false,
4843     type: CSS_TYPE_LONGHAND,
4844     applies_to_first_letter: true,
4845     prerequisites: { color: "black" },
4846     initial_values: ["currentColor"],
4847     other_values: ["green", "rgba(255,128,0,0.5)", "transparent"],
4848     invalid_values: ["#0", "#00", "#00000", "#0000000", "#000000000"],
4849     quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" },
4850   },
4851   "border-right-style": {
4852     domProp: "borderRightStyle",
4853     inherited: false,
4854     type: CSS_TYPE_LONGHAND,
4855     applies_to_first_letter: true,
4856     /* XXX hidden is sometimes the same as initial */
4857     initial_values: ["none"],
4858     other_values: [
4859       "solid",
4860       "dashed",
4861       "dotted",
4862       "double",
4863       "outset",
4864       "inset",
4865       "groove",
4866       "ridge",
4867     ],
4868     invalid_values: [],
4869   },
4870   "border-right-width": {
4871     domProp: "borderRightWidth",
4872     inherited: false,
4873     type: CSS_TYPE_LONGHAND,
4874     applies_to_first_letter: true,
4875     prerequisites: { "border-right-style": "solid" },
4876     initial_values: ["medium", "3px", "calc(4px - 1px)"],
4877     other_values: [
4878       "thin",
4879       "thick",
4880       "1px",
4881       "2em",
4882       "calc(2px)",
4883       "calc(-2px)",
4884       "calc(0em)",
4885       "calc(0px)",
4886       "calc(5em)",
4887       "calc(3*25px)",
4888       "calc(25px*3)",
4889       "calc(3*25px + 5em)",
4890     ],
4891     invalid_values: ["5%"],
4892     quirks_values: { 5: "5px" },
4893   },
4894   "border-spacing": {
4895     domProp: "borderSpacing",
4896     inherited: true,
4897     type: CSS_TYPE_LONGHAND,
4898     initial_values: [
4899       "0",
4900       "0 0",
4901       "0px",
4902       "0 0px",
4903       "calc(0px)",
4904       "calc(0px) calc(0em)",
4905       "calc(2em - 2em) calc(3px + 7px - 10px)",
4906       "calc(-5px)",
4907       "calc(-5px) calc(-5px)",
4908     ],
4909     other_values: [
4910       "3px",
4911       "4em 2px",
4912       "4em 0",
4913       "0px 2px",
4914       "calc(7px)",
4915       "0 calc(7px)",
4916       "calc(7px) 0",
4917       "calc(0px) calc(7px)",
4918       "calc(7px) calc(0px)",
4919       "7px calc(0px)",
4920       "calc(0px) 7px",
4921       "7px calc(0px)",
4922       "3px calc(2em)",
4923     ],
4924     invalid_values: [
4925       "0%",
4926       "0 0%",
4927       "-5px",
4928       "-5px -5px",
4929       "0 -5px",
4930       "-5px 0",
4931       "0 calc(0px + rubbish)",
4932     ],
4933     quirks_values: {
4934       "2px 5": "2px 5px",
4935       7: "7px",
4936       "3 4px": "3px 4px",
4937     },
4938   },
4939   "border-style": {
4940     domProp: "borderStyle",
4941     inherited: false,
4942     type: CSS_TYPE_TRUE_SHORTHAND,
4943     subproperties: [
4944       "border-top-style",
4945       "border-right-style",
4946       "border-bottom-style",
4947       "border-left-style",
4948     ],
4949     /* XXX hidden is sometimes the same as initial */
4950     initial_values: [
4951       "none",
4952       "none none",
4953       "none none none",
4954       "none none none none",
4955     ],
4956     other_values: [
4957       "solid",
4958       "dashed",
4959       "dotted",
4960       "double",
4961       "outset",
4962       "inset",
4963       "groove",
4964       "ridge",
4965       "none solid",
4966       "none none solid",
4967       "none none none solid",
4968       "groove none none none",
4969       "none ridge none none",
4970       "none none double none",
4971       "none none none dotted",
4972     ],
4973     invalid_values: [],
4974   },
4975   "border-top": {
4976     domProp: "borderTop",
4977     inherited: false,
4978     type: CSS_TYPE_TRUE_SHORTHAND,
4979     subproperties: ["border-top-color", "border-top-style", "border-top-width"],
4980     initial_values: [
4981       "none",
4982       "medium",
4983       "currentColor",
4984       "thin",
4985       "none medium currentcolor",
4986     ],
4987     other_values: [
4988       "solid",
4989       "green",
4990       "medium solid",
4991       "green solid",
4992       "10px solid",
4993       "thick solid",
4994       "5px green none",
4995     ],
4996     invalid_values: ["5%", "5", "5 solid green"],
4997   },
4998   "border-top-color": {
4999     domProp: "borderTopColor",
5000     inherited: false,
5001     type: CSS_TYPE_LONGHAND,
5002     applies_to_first_letter: true,
5003     prerequisites: { color: "black" },
5004     initial_values: ["currentColor"],
5005     other_values: ["green", "rgba(255,128,0,0.5)", "transparent"],
5006     invalid_values: ["#0", "#00", "#00000", "#0000000", "#000000000"],
5007     quirks_values: { "000000": "#000000", "96ed2a": "#96ed2a" },
5008   },
5009   "border-top-style": {
5010     domProp: "borderTopStyle",
5011     inherited: false,
5012     type: CSS_TYPE_LONGHAND,
5013     applies_to_first_letter: true,
5014     /* XXX hidden is sometimes the same as initial */
5015     initial_values: ["none"],
5016     other_values: [
5017       "solid",
5018       "dashed",
5019       "dotted",
5020       "double",
5021       "outset",
5022       "inset",
5023       "groove",
5024       "ridge",
5025     ],
5026     invalid_values: [],
5027   },
5028   "border-top-width": {
5029     domProp: "borderTopWidth",
5030     inherited: false,
5031     type: CSS_TYPE_LONGHAND,
5032     applies_to_first_letter: true,
5033     prerequisites: { "border-top-style": "solid" },
5034     initial_values: ["medium", "3px", "calc(4px - 1px)"],
5035     other_values: [
5036       "thin",
5037       "thick",
5038       "1px",
5039       "2em",
5040       "calc(2px)",
5041       "calc(-2px)",
5042       "calc(0em)",
5043       "calc(0px)",
5044       "calc(5em)",
5045       "calc(3*25px)",
5046       "calc(25px*3)",
5047       "calc(3*25px + 5em)",
5048     ],
5049     invalid_values: ["5%"],
5050     quirks_values: { 5: "5px" },
5051   },
5052   "border-width": {
5053     domProp: "borderWidth",
5054     inherited: false,
5055     type: CSS_TYPE_TRUE_SHORTHAND,
5056     subproperties: [
5057       "border-top-width",
5058       "border-right-width",
5059       "border-bottom-width",
5060       "border-left-width",
5061     ],
5062     prerequisites: { "border-style": "solid" },
5063     initial_values: [
5064       "medium",
5065       "3px",
5066       "medium medium",
5067       "3px medium medium",
5068       "medium 3px medium medium",
5069       "calc(3px) 3px calc(5px - 2px) calc(2px - -1px)",
5070     ],
5071     other_values: ["thin", "thick", "1px", "2em", "2px 0 0px 1em", "calc(2em)"],
5072     invalid_values: ["5%", "1px calc(nonsense)", "1px red"],
5073     unbalanced_values: ["1px calc("],
5074     quirks_values: { 5: "5px" },
5075   },
5076   bottom: {
5077     domProp: "bottom",
5078     inherited: false,
5079     type: CSS_TYPE_LONGHAND,
5080     /* FIXME: run tests with multiple prerequisites */
5081     prerequisites: { position: "relative" },
5082     /* XXX 0 may or may not be equal to auto */
5083     initial_values: ["auto"],
5084     other_values: [
5085       "32px",
5086       "-3em",
5087       "12%",
5088       "calc(2px)",
5089       "calc(-2px)",
5090       "calc(50%)",
5091       "calc(3*25px)",
5092       "calc(25px*3)",
5093       "calc(3*25px + 50%)",
5094     ],
5095     invalid_values: [],
5096     quirks_values: { 5: "5px" },
5097   },
5098   "box-shadow": {
5099     domProp: "boxShadow",
5100     inherited: false,
5101     type: CSS_TYPE_LONGHAND,
5102     applies_to_first_letter: true,
5103     initial_values: ["none"],
5104     prerequisites: { color: "blue" },
5105     other_values: [
5106       "2px 2px",
5107       "2px 2px 1px",
5108       "2px 2px 2px 2px",
5109       "blue 3px 2px",
5110       "2px 2px 1px 5px green",
5111       "2px 2px red",
5112       "green 2px 2px 1px",
5113       "green 2px 2px, blue 1px 3px 4px",
5114       "currentColor 3px 3px",
5115       "blue 2px 2px, currentColor 1px 2px, 1px 2px 3px 2px orange",
5116       "3px 0 0 0",
5117       "inset 2px 2px 3px 4px black",
5118       "2px -2px green inset, 4px 4px 3px blue, inset 2px 2px",
5119       /* calc() values */
5120       "2px 2px calc(-5px)" /* clamped */,
5121       "calc(3em - 2px) 2px green",
5122       "green calc(3em - 2px) 2px",
5123       "2px calc(2px + 0.2em)",
5124       "blue 2px calc(2px + 0.2em)",
5125       "2px calc(2px + 0.2em) blue",
5126       "calc(-2px) calc(-2px)",
5127       "-2px -2px",
5128       "calc(2px) calc(2px)",
5129       "calc(2px) calc(2px) calc(2px)",
5130       "calc(2px) calc(2px) calc(2px) calc(2px)",
5131     ],
5132     invalid_values: [
5133       "3% 3%",
5134       "1px 1px 1px 1px 1px",
5135       "2px 2px, none",
5136       "red 2px 2px blue",
5137       "inherit, 2px 2px",
5138       "2px 2px, inherit",
5139       "2px 2px -5px",
5140       "inset 4px 4px black inset",
5141       "inset inherit",
5142       "inset none",
5143       "3 3",
5144       "3px 3",
5145       "3 3px",
5146       "3px 3px 3",
5147       "3px 3px 3px 3",
5148       "3px calc(3px + rubbish)",
5149       "3px 3px calc(3px + rubbish)",
5150       "3px 3px 3px calc(3px + rubbish)",
5151       "3px 3px 3px 3px rgb(0, rubbish, 0)",
5152       "unset, 2px 2px",
5153       "2px 2px, unset",
5154       "inset unset",
5155     ],
5156   },
5157   "caption-side": {
5158     domProp: "captionSide",
5159     inherited: true,
5160     type: CSS_TYPE_LONGHAND,
5161     initial_values: ["top"],
5162     other_values: ["bottom"],
5163     invalid_values: ["right", "left", "top-outside", "bottom-outside"],
5164   },
5165   "caret-color": {
5166     domProp: "caretColor",
5167     inherited: true,
5168     type: CSS_TYPE_LONGHAND,
5169     prerequisites: { color: "black" },
5170     // Though "auto" is an independent computed-value time keyword value,
5171     // it is not distinguishable from currentcolor because getComputedStyle
5172     // always returns used value for <color>.
5173     initial_values: ["auto", "currentcolor", "black", "rgb(0,0,0)"],
5174     other_values: ["green", "transparent", "rgba(128,128,128,.5)", "#123"],
5175     invalid_values: ["#0", "#00", "#00000", "cc00ff"],
5176   },
5177   clear: {
5178     domProp: "clear",
5179     inherited: false,
5180     type: CSS_TYPE_LONGHAND,
5181     initial_values: ["none"],
5182     other_values: ["left", "right", "both", "inline-start", "inline-end"],
5183     invalid_values: [],
5184   },
5185   clip: {
5186     domProp: "clip",
5187     inherited: false,
5188     type: CSS_TYPE_LONGHAND,
5189     initial_values: ["auto"],
5190     other_values: [
5191       "rect(0 0 0 0)",
5192       "rect(auto,auto,auto,auto)",
5193       "rect(3px, 4px, 4em, 0)",
5194       "rect(auto, 3em, 4pt, 2px)",
5195       "rect(2px 3px 4px 5px)",
5196     ],
5197     invalid_values: ["rect(auto, 3em, 2%, 5px)"],
5198     quirks_values: { "rect(1, 2, 3, 4)": "rect(1px, 2px, 3px, 4px)" },
5199   },
5200   color: {
5201     domProp: "color",
5202     inherited: true,
5203     type: CSS_TYPE_LONGHAND,
5204     applies_to_first_letter: true,
5205     applies_to_first_line: true,
5206     applies_to_marker: true,
5207     applies_to_placeholder: true,
5208     applies_to_cue: true,
5209     /* XXX should test currentColor, but may or may not be initial */
5210     initial_values: [
5211       "black",
5212       "#000",
5213       "#000f",
5214       "#000000ff",
5215       "-moz-default-color",
5216       "rgb(0, 0, 0)",
5217       "rgb(0%, 0%, 0%)",
5218       /* css-color-4: */
5219       /* rgb() and rgba() are aliases of each other. */
5220       "rgb(0, 0, 0)",
5221       "rgba(0, 0, 0)",
5222       "rgb(0, 0, 0, 1)",
5223       "rgba(0, 0, 0, 1)",
5224       /* hsl() and hsla() are aliases of each other. */
5225       "hsl(0, 0%, 0%)",
5226       "hsla(0, 0%, 0%)",
5227       "hsl(0, 0%, 0%, 1)",
5228       "hsla(0, 0%, 0%, 1)",
5229       /* rgb() and rgba() functions now accept <number> rather than <integer>. */
5230       "rgb(0.0, 0.0, 0.0)",
5231       "rgba(0.0, 0.0, 0.0)",
5232       "rgb(0.0, 0.0, 0.0, 1)",
5233       "rgba(0.0, 0.0, 0.0, 1)",
5234       /* <alpha-value> now accepts <percentage> as well as <number> in rgba() and hsla(). */
5235       "rgb(0.0, 0.0, 0.0, 100%)",
5236       "hsl(0, 0%, 0%, 100%)",
5237       /* rgb() and hsl() now support comma-less expression. */
5238       "rgb(0 0 0)",
5239       "rgb(0 0 0 / 1)",
5240       "rgb(0/* comment */0/* comment */0)",
5241       "rgb(0/* comment */0/* comment*/0/1.0)",
5242       "hsl(0 0% 0%)",
5243       "hsl(0 0% 0% / 1)",
5244       "hsl(0/* comment */0%/* comment */0%)",
5245       "hsl(0/* comment */0%/* comment */0%/1)",
5246       /* Support <angle> for hsl() hue component. */
5247       "hsl(0deg, 0%, 0%)",
5248       "hsl(360deg, 0%, 0%)",
5249       "hsl(0grad, 0%, 0%)",
5250       "hsl(400grad, 0%, 0%)",
5251       "hsl(0rad, 0%, 0%)",
5252       "hsl(0turn, 0%, 0%)",
5253       "hsl(1turn, 0%, 0%)",
5254       /* CSS4 System Colors */
5255       "canvastext",
5256       /* Preserve previously available specially prefixed colors */
5257       "-moz-default-color",
5258     ],
5259     other_values: [
5260       "green",
5261       "#f3c",
5262       "#fed292",
5263       "rgba(45,300,12,2)",
5264       "transparent",
5265       "LinkText",
5266       "rgba(255,128,0,0.5)",
5267       "#e0fc",
5268       "#10fcee72",
5269       /* css-color-4: */
5270       "rgb(100, 100.0, 100)",
5271       "rgb(300 300 300 / 200%)",
5272       "rgb(300.0 300.0 300.0 / 2.0)",
5273       "hsl(720, 200%, 200%, 2.0)",
5274       "hsla(720 200% 200% / 200%)",
5275       "hsl(480deg, 20%, 30%, 0.3)",
5276       "hsl(55grad, 400%, 30%)",
5277       "hsl(0.5grad 400% 500% / 9.0)",
5278       "hsl(33rad 100% 90% / 4)",
5279       "hsl(0.33turn, 40%, 40%, 10%)",
5280       "hsl(63e292, 41%, 34%)",
5281       /* CSS4 System Colors */
5282       "canvas",
5283       "linktext",
5284       "visitedtext",
5285       "activetext",
5286       "buttonface",
5287       "field",
5288       "highlight",
5289       "graytext",
5290       /* Preserve previously available specially prefixed colors */
5291       "-moz-activehyperlinktext",
5292       "-moz-default-background-color",
5293       "-moz-hyperlinktext",
5294       "-moz-visitedhyperlinktext",
5295       /* color-mix */
5296       "color-mix(in srgb, red, blue)",
5297       "color-mix(in srgb, highlight, rgba(0, 0, 0, .5))",
5298       "color-mix(in srgb, color-mix(in srgb, red 10%, blue), green)",
5299       "color-mix(in srgb, blue, red 80%)",
5300       "color-mix(in srgb, rgba(0, 200, 32, .5) 90%, red 50%)",
5301       "color-mix(in srgb, currentColor, red)",
5302     ],
5303     invalid_values: [
5304       "#f",
5305       "#ff",
5306       "#fffff",
5307       "#fffffff",
5308       "#fffffffff",
5309       "rgb(100%, 0, 100%)",
5310       "rgba(100, 0, 100%, 30%)",
5311       "hsl(0, 0, 0%)",
5312       "hsla(0%, 0%, 0%, 0.1)",
5313       /* trailing commas */
5314       "rgb(0, 0, 0,)",
5315       "rgba(0, 0, 0, 0,)",
5316       "hsl(0, 0%, 0%,)",
5317       "hsla(0, 0%, 0%, 1,)",
5318       /* css-color-4: */
5319       /* comma and comma-less expressions should not mix together. */
5320       "rgb(0, 0, 0 / 1)",
5321       "rgb(0 0 0, 1)",
5322       "rgb(0, 0 0, 1)",
5323       "rgb(0 0, 0 / 1)",
5324       "hsl(0, 0%, 0% / 1)",
5325       "hsl(0 0% 0%, 1)",
5326       "hsl(0 0% 0%, 1)",
5327       "hsl(0 0%, 0% / 1)",
5328       /* trailing slash */
5329       "rgb(0 0 0 /)",
5330       "rgb(0, 0, 0 /)",
5331       "hsl(0 0% 0% /)",
5332       "hsl(0, 0%, 0% /)",
5333       /* color-mix */
5334       "color-mix(red, blue)",
5335       "color-mix(red blue)",
5336       "color-mix(in srgb, red blue)",
5337       "color-mix(in srgb, red 10% blue)",
5338     ],
5339     quirks_values: {
5340       "000000": "#000000",
5341       "96ed2a": "#96ed2a",
5342       fff: "#ffffff",
5343       ffffff: "#ffffff",
5344     },
5345   },
5346   content: {
5347     domProp: "content",
5348     inherited: false,
5349     type: CSS_TYPE_LONGHAND,
5350     applies_to_marker: true,
5351     // XXX This really depends on pseudo-element-ness.
5352     initial_values: ["normal", "none"],
5353     other_values: [
5354       '""',
5355       "''",
5356       '"hello"',
5357       "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==)",
5358       "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==')",
5359       'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
5360       "counter(foo)",
5361       "counter(bar, upper-roman)",
5362       'counters(foo, ".")',
5363       "counters(bar, '-', lower-greek)",
5364       "'-' counter(foo) '.'",
5365       "attr(title)",
5366       "open-quote",
5367       "close-quote",
5368       "no-open-quote",
5369       "no-close-quote",
5370       "close-quote attr(title) counters(foo, '.', upper-alpha)",
5371       "attr(\\32)",
5372       "attr(\\2)",
5373       "attr(-\\2)",
5374       "attr(-\\32)",
5375       'attr(title, "fallback")',
5376       'attr(\\32, "fallback")',
5377       'attr(-\\32, "fallback")',
5378       "counter(\\2)",
5379       "counters(\\32, '.')",
5380       "counter(-\\32, upper-roman)",
5381       "counters(-\\2, '-', lower-greek)",
5382       "counter(\\()",
5383       "counters(a\\+b, '.')",
5384       "counter(\\}, upper-alpha)",
5385       "-moz-alt-content",
5386       "counter(foo, symbols('*'))",
5387       "counter(foo, symbols(numeric '0' '1'))",
5388       "counters(foo, '.', symbols('*'))",
5389       "counters(foo, '.', symbols(numeric '0' '1'))",
5390       "image-set(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==))",
5391     ].concat(validNonUrlImageValues),
5392     invalid_values: [
5393       "counter(foo, none)",
5394       "counters(bar, '.', none)",
5395       "counters(foo)",
5396       'counter(foo, ".")',
5397       'attr("title")',
5398       "attr('title')",
5399       "attr(2)",
5400       "attr(-2)",
5401       "counter(2)",
5402       "counters(-2, '.')",
5403       "-moz-alt-content 'foo'",
5404       "'foo' -moz-alt-content",
5405       "counter(one, two, three) 'foo'",
5406     ].concat(invalidNonUrlImageValues),
5407   },
5408   "counter-increment": {
5409     domProp: "counterIncrement",
5410     inherited: false,
5411     type: CSS_TYPE_LONGHAND,
5412     initial_values: ["none"],
5413     other_values: [
5414       "foo 1",
5415       "bar",
5416       "foo 3 bar baz 2",
5417       "\\32  1",
5418       "-\\32  1",
5419       "-c 1",
5420       "\\32 1",
5421       "-\\32 1",
5422       "\\2  1",
5423       "-\\2  1",
5424       "-c 1",
5425       "\\2 1",
5426       "-\\2 1",
5427       "-\\7f \\9e 1",
5428     ],
5429     invalid_values: ["none foo", "none foo 3", "foo none", "foo 3 none"],
5430     unbalanced_values: ["foo 1 ("],
5431   },
5432   "counter-reset": {
5433     domProp: "counterReset",
5434     inherited: false,
5435     type: CSS_TYPE_LONGHAND,
5436     initial_values: ["none"],
5437     other_values: [
5438       "foo 1",
5439       "bar",
5440       "foo 3 bar baz 2",
5441       "\\32  1",
5442       "-\\32  1",
5443       "-c 1",
5444       "\\32 1",
5445       "-\\32 1",
5446       "\\2  1",
5447       "-\\2  1",
5448       "-c 1",
5449       "\\2 1",
5450       "-\\2 1",
5451       "-\\7f \\9e 1",
5452     ],
5453     invalid_values: ["none foo", "none foo 3", "foo none", "foo 3 none"],
5454   },
5455   "counter-set": {
5456     domProp: "counterSet",
5457     inherited: false,
5458     type: CSS_TYPE_LONGHAND,
5459     initial_values: ["none"],
5460     other_values: [
5461       "foo 1",
5462       "bar",
5463       "foo 3 bar baz 2",
5464       "\\32  1",
5465       "-\\32  1",
5466       "-c 1",
5467       "\\32 1",
5468       "-\\32 1",
5469       "\\2  1",
5470       "-\\2  1",
5471       "-c 1",
5472       "\\2 1",
5473       "-\\2 1",
5474       "-\\7f \\9e 1",
5475     ],
5476     invalid_values: ["none foo", "none foo 3", "foo none", "foo 3 none"],
5477   },
5478   cursor: {
5479     domProp: "cursor",
5480     inherited: true,
5481     type: CSS_TYPE_LONGHAND,
5482     initial_values: ["auto"],
5483     other_values: [
5484       "crosshair",
5485       "default",
5486       "pointer",
5487       "move",
5488       "e-resize",
5489       "ne-resize",
5490       "nw-resize",
5491       "n-resize",
5492       "se-resize",
5493       "sw-resize",
5494       "s-resize",
5495       "w-resize",
5496       "text",
5497       "wait",
5498       "help",
5499       "progress",
5500       "copy",
5501       "alias",
5502       "context-menu",
5503       "cell",
5504       "not-allowed",
5505       "col-resize",
5506       "row-resize",
5507       "no-drop",
5508       "vertical-text",
5509       "all-scroll",
5510       "nesw-resize",
5511       "nwse-resize",
5512       "ns-resize",
5513       "ew-resize",
5514       "none",
5515       "grab",
5516       "grabbing",
5517       "zoom-in",
5518       "zoom-out",
5519       "-moz-grab",
5520       "-moz-grabbing",
5521       "-moz-zoom-in",
5522       "-moz-zoom-out",
5523       "url(foo.png), move",
5524       "url(foo.png) 5 7, move",
5525       "url(foo.png) 12 3, url(bar.png), no-drop",
5526       "url(foo.png), url(bar.png) 7 2, wait",
5527       "url(foo.png) 3 2, url(bar.png) 7 9, pointer",
5528       "url(foo.png) calc(1 + 2) calc(3), pointer",
5529       "image-set(url(foo.png)), auto",
5530     ],
5531     invalid_values: [
5532       "url(foo.png)",
5533       "url(foo.png) 5 5",
5534       "image-set(linear-gradient(red, blue)), auto",
5535       // Gradients are supported per spec, but we don't have support for it yet
5536       "linear-gradient(red, blue), auto",
5537     ],
5538   },
5539   direction: {
5540     domProp: "direction",
5541     inherited: true,
5542     type: CSS_TYPE_LONGHAND,
5543     applies_to_marker: true,
5544     initial_values: ["ltr"],
5545     other_values: ["rtl"],
5546     invalid_values: [],
5547   },
5548   display: {
5549     domProp: "display",
5550     inherited: false,
5551     type: CSS_TYPE_LONGHAND,
5552     // No applies_to_placeholder because we have a !important rule in forms.css.
5553     initial_values: ["inline"],
5554     /* XXX none will really mess with other properties */
5555     prerequisites: { float: "none", position: "static", contain: "none" },
5556     other_values: [
5557       "block",
5558       "flex",
5559       "inline-flex",
5560       "list-item",
5561       "inline list-item",
5562       "inline flow-root list-item",
5563       "inline-block",
5564       "table",
5565       "inline-table",
5566       "table-row-group",
5567       "table-header-group",
5568       "table-footer-group",
5569       "table-row",
5570       "table-column-group",
5571       "table-column",
5572       "table-cell",
5573       "table-caption",
5574       "block ruby",
5575       "ruby",
5576       "ruby-base",
5577       "ruby-base-container",
5578       "ruby-text",
5579       "ruby-text-container",
5580       "contents",
5581       "none",
5582     ],
5583     invalid_values: [],
5584   },
5585   "empty-cells": {
5586     domProp: "emptyCells",
5587     inherited: true,
5588     type: CSS_TYPE_LONGHAND,
5589     initial_values: ["show"],
5590     other_values: ["hide"],
5591     invalid_values: [],
5592   },
5593   float: {
5594     domProp: "cssFloat",
5595     inherited: false,
5596     type: CSS_TYPE_LONGHAND,
5597     applies_to_first_letter: true,
5598     initial_values: ["none"],
5599     other_values: ["left", "right", "inline-start", "inline-end"],
5600     invalid_values: [],
5601   },
5602   font: {
5603     domProp: "font",
5604     inherited: true,
5605     type: CSS_TYPE_TRUE_SHORTHAND,
5606     prerequisites: { "writing-mode": "initial" },
5607     subproperties: [
5608       "font-style",
5609       "font-variant",
5610       "font-weight",
5611       "font-size",
5612       "line-height",
5613       "font-family",
5614       "font-stretch",
5615       "font-size-adjust",
5616       "font-feature-settings",
5617       "font-language-override",
5618       "font-kerning",
5619       "font-variant-alternates",
5620       "font-variant-caps",
5621       "font-variant-east-asian",
5622       "font-variant-ligatures",
5623       "font-variant-numeric",
5624       "font-variant-position",
5625     ],
5626     initial_values: [
5627       gInitialFontFamilyIsSansSerif ? "medium sans-serif" : "medium serif",
5628     ],
5629     other_values: [
5630       "large serif",
5631       "9px fantasy",
5632       "condensed bold italic small-caps 24px/1.4 Times New Roman, serif",
5633       "small inherit roman",
5634       "small roman inherit",
5635       // system fonts
5636       "caption",
5637       "icon",
5638       "menu",
5639       "message-box",
5640       "small-caption",
5641       "status-bar",
5642       // line-height with calc()
5643       "condensed bold italic small-caps 24px/calc(2px) Times New Roman, serif",
5644       "condensed bold italic small-caps 24px/calc(50%) Times New Roman, serif",
5645       "condensed bold italic small-caps 24px/calc(3*25px) Times New Roman, serif",
5646       "condensed bold italic small-caps 24px/calc(25px*3) Times New Roman, serif",
5647       "condensed bold italic small-caps 24px/calc(3*25px + 50%) Times New Roman, serif",
5648       "condensed bold italic small-caps 24px/calc(1 + 2*3/4) Times New Roman, serif",
5649     ],
5650     invalid_values: [
5651       "9 fantasy",
5652       "-2px fantasy",
5653       // line-height with calc()
5654       "condensed bold italic small-caps 24px/calc(1 + 2px) Times New Roman, serif",
5655       "condensed bold italic small-caps 24px/calc(100% + 0.1) Times New Roman, serif",
5656     ],
5657   },
5658   "font-family": {
5659     domProp: "fontFamily",
5660     inherited: true,
5661     type: CSS_TYPE_LONGHAND,
5662     applies_to_first_letter: true,
5663     applies_to_first_line: true,
5664     applies_to_marker: true,
5665     applies_to_placeholder: true,
5666     applies_to_cue: true,
5667     initial_values: [gInitialFontFamilyIsSansSerif ? "sans-serif" : "serif"],
5668     other_values: [
5669       gInitialFontFamilyIsSansSerif ? "serif" : "sans-serif",
5670       "Times New Roman, serif",
5671       "'Times New Roman', serif",
5672       "cursive",
5673       "fantasy",
5674       '\\"Times New Roman',
5675       '"Times New Roman"',
5676       'Times, \\"Times New Roman',
5677       'Times, "Times New Roman"',
5678       "-no-such-font-installed",
5679       "inherit roman",
5680       "roman inherit",
5681       "Times, inherit roman",
5682       "inherit roman, Times",
5683       "roman inherit, Times",
5684       "Times, roman inherit",
5685     ],
5686     invalid_values: [
5687       '"Times New" Roman',
5688       '"Times New Roman\n',
5689       'Times, "Times New Roman\n',
5690     ],
5691   },
5692   "font-feature-settings": {
5693     domProp: "fontFeatureSettings",
5694     inherited: true,
5695     type: CSS_TYPE_LONGHAND,
5696     applies_to_first_letter: true,
5697     applies_to_first_line: true,
5698     applies_to_marker: true,
5699     applies_to_placeholder: true,
5700     applies_to_cue: true,
5701     initial_values: ["normal"],
5702     other_values: [
5703       "'liga' on",
5704       "'liga'",
5705       '"liga" 1',
5706       "'liga', 'clig' 1",
5707       '"liga" off',
5708       '"liga" 0',
5709       '"cv01" 3, "cv02" 4',
5710       '"cswh", "smcp" off, "salt" 4',
5711       '"cswh" 1, "smcp" off, "salt" 4',
5712       '"cswh" 0, \'blah\', "liga", "smcp" off, "salt" 4',
5713       '"liga"        ,"smcp" 0         , "blah"',
5714       '"ab\\"c"',
5715       '"ab\\\\c"',
5716       "'vert' calc(2)",
5717     ],
5718     invalid_values: [
5719       "liga",
5720       "liga 1",
5721       "liga normal",
5722       '"liga" normal',
5723       "normal liga",
5724       'normal "liga"',
5725       'normal, "liga"',
5726       '"liga=1"',
5727       "'foobar' on",
5728       '"blahblah" 0',
5729       '"liga" 3.14',
5730       '"liga" 1 3.14',
5731       '"liga" 1 normal',
5732       '"liga" 1 off',
5733       '"liga" on off',
5734       '"liga" , 0 "smcp"',
5735       '"liga" "smcp"',
5736     ],
5737   },
5738   "font-kerning": {
5739     domProp: "fontKerning",
5740     inherited: true,
5741     type: CSS_TYPE_LONGHAND,
5742     applies_to_first_letter: true,
5743     applies_to_first_line: true,
5744     applies_to_marker: true,
5745     applies_to_placeholder: true,
5746     applies_to_cue: true,
5747     initial_values: ["auto"],
5748     other_values: ["normal", "none"],
5749     invalid_values: ["on"],
5750   },
5751   "font-language-override": {
5752     domProp: "fontLanguageOverride",
5753     inherited: true,
5754     type: CSS_TYPE_LONGHAND,
5755     applies_to_first_letter: true,
5756     applies_to_first_line: true,
5757     applies_to_marker: true,
5758     applies_to_placeholder: true,
5759     applies_to_cue: true,
5760     initial_values: ["normal"],
5761     other_values: ["'ENG'", "'TRK'", '"TRK"', "'N\\'Ko'"],
5762     invalid_values: ["TRK", "ja"],
5763   },
5764   "font-size": {
5765     domProp: "fontSize",
5766     inherited: true,
5767     type: CSS_TYPE_LONGHAND,
5768     applies_to_first_letter: true,
5769     applies_to_first_line: true,
5770     applies_to_marker: true,
5771     applies_to_placeholder: true,
5772     applies_to_cue: true,
5773     initial_values: [
5774       "medium",
5775       "1rem",
5776       "calc(1rem)",
5777       "calc(0.75rem + 200% - 125% + 0.25rem - 75%)",
5778     ],
5779     other_values: [
5780       "large",
5781       "2em",
5782       "50%",
5783       "xx-small",
5784       "xxx-large",
5785       "36pt",
5786       "8px",
5787       "larger",
5788       "smaller",
5789       "0px",
5790       "0%",
5791       "calc(2em)",
5792       "calc(36pt + 75% + (30% + 2em + 2px))",
5793       "calc(-2em)",
5794       "calc(-50%)",
5795       "calc(-1px)",
5796     ],
5797     invalid_values: ["-2em", "-50%", "-1px"],
5798     quirks_values: { 5: "5px" },
5799   },
5800   "font-size-adjust": {
5801     domProp: "fontSizeAdjust",
5802     inherited: true,
5803     type: CSS_TYPE_LONGHAND,
5804     applies_to_first_letter: true,
5805     applies_to_first_line: true,
5806     applies_to_marker: true,
5807     applies_to_placeholder: true,
5808     applies_to_cue: true,
5809     initial_values: ["none"],
5810     other_values: [
5811       "0.7",
5812       "0.0",
5813       "0",
5814       "3",
5815       "from-font",
5816       "cap-height 0.8",
5817       "ch-width 0.4",
5818       "ic-width 0.4",
5819       "ic-height 0.9",
5820       "ch-width from-font",
5821     ],
5822     invalid_values: [
5823       "-0.3",
5824       "-1",
5825       "normal",
5826       "none none",
5827       "cap-height none",
5828       "none from-font",
5829       "from-font none",
5830       "0.5 from-font",
5831       "0.5 cap-height",
5832       "cap-height, 0.8",
5833     ],
5834   },
5835   "font-stretch": {
5836     domProp: "fontStretch",
5837     inherited: true,
5838     type: CSS_TYPE_LONGHAND,
5839     applies_to_first_letter: true,
5840     applies_to_first_line: true,
5841     applies_to_marker: true,
5842     applies_to_placeholder: true,
5843     applies_to_cue: true,
5844     initial_values: ["normal"],
5845     other_values: [
5846       "ultra-condensed",
5847       "extra-condensed",
5848       "condensed",
5849       "semi-condensed",
5850       "semi-expanded",
5851       "expanded",
5852       "extra-expanded",
5853       "ultra-expanded",
5854     ],
5855     invalid_values: ["narrower", "wider"],
5856   },
5857   "font-style": {
5858     domProp: "fontStyle",
5859     inherited: true,
5860     type: CSS_TYPE_LONGHAND,
5861     applies_to_first_letter: true,
5862     applies_to_first_line: true,
5863     applies_to_marker: true,
5864     applies_to_placeholder: true,
5865     applies_to_cue: true,
5866     initial_values: ["normal"],
5867     other_values: ["italic", "oblique"],
5868     invalid_values: [],
5869   },
5870   "font-synthesis": {
5871     domProp: "fontSynthesis",
5872     inherited: true,
5873     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
5874     subproperties: [
5875       "font-synthesis-weight",
5876       "font-synthesis-style",
5877       "font-synthesis-small-caps",
5878       "font-synthesis-position",
5879     ],
5880     applies_to_first_letter: true,
5881     applies_to_first_line: true,
5882     applies_to_marker: true,
5883     applies_to_placeholder: true,
5884     applies_to_cue: true,
5885     initial_values: [
5886       "weight style small-caps position",
5887       "weight small-caps style position",
5888       "small-caps weight position style",
5889       "small-caps style position weight",
5890       "style position weight small-caps",
5891       "style position small-caps weight",
5892     ],
5893     other_values: [
5894       "none",
5895       "weight",
5896       "style",
5897       "small-caps",
5898       "position",
5899       "weight style",
5900       "style weight",
5901       "weight small-caps",
5902       "small-caps weight",
5903       "weight position",
5904       "position weight",
5905       "style small-caps",
5906       "small-caps style",
5907       "style position",
5908       "position style",
5909       "small-caps position",
5910       "position small-caps",
5911       "weight style small-caps",
5912       "small-caps weight style",
5913       "weight style position",
5914       "position weight style",
5915       "weight small-caps position",
5916       "position weight small-caps",
5917     ],
5918     invalid_values: [
5919       "10px",
5920       "weight none",
5921       "style none",
5922       "none style",
5923       "none 10px",
5924       "weight 10px",
5925       "weight weight",
5926       "style style",
5927       "small-caps none",
5928       "small-caps small-caps",
5929       "position none",
5930       "position position",
5931     ],
5932   },
5933   "font-synthesis-weight": {
5934     domProp: "fontSynthesisWeight",
5935     inherited: true,
5936     type: CSS_TYPE_LONGHAND,
5937     applies_to_first_letter: true,
5938     applies_to_first_line: true,
5939     applies_to_marker: true,
5940     applies_to_placeholder: true,
5941     applies_to_cue: true,
5942     initial_values: ["auto"],
5943     other_values: ["none"],
5944     invalid_values: ["auto none", "weight", "normal", "0"],
5945   },
5946   "font-synthesis-style": {
5947     domProp: "fontSynthesisStyle",
5948     inherited: true,
5949     type: CSS_TYPE_LONGHAND,
5950     applies_to_first_letter: true,
5951     applies_to_first_line: true,
5952     applies_to_marker: true,
5953     applies_to_placeholder: true,
5954     applies_to_cue: true,
5955     initial_values: ["auto"],
5956     other_values: ["none"],
5957     invalid_values: ["auto none", "style", "normal", "0"],
5958   },
5959   "font-synthesis-small-caps": {
5960     domProp: "fontSynthesisSmallCaps",
5961     inherited: true,
5962     type: CSS_TYPE_LONGHAND,
5963     applies_to_first_letter: true,
5964     applies_to_first_line: true,
5965     applies_to_marker: true,
5966     applies_to_placeholder: true,
5967     applies_to_cue: true,
5968     initial_values: ["auto"],
5969     other_values: ["none"],
5970     invalid_values: ["auto none", "small-caps", "normal", "0"],
5971   },
5972   "font-synthesis-position": {
5973     domProp: "fontSynthesisPosition",
5974     inherited: true,
5975     type: CSS_TYPE_LONGHAND,
5976     applies_to_first_letter: true,
5977     applies_to_first_line: true,
5978     applies_to_marker: true,
5979     applies_to_placeholder: true,
5980     applies_to_cue: true,
5981     initial_values: ["auto"],
5982     other_values: ["none"],
5983     invalid_values: ["auto none", "position", "normal", "0"],
5984   },
5985   "font-variant": {
5986     domProp: "fontVariant",
5987     inherited: true,
5988     type: CSS_TYPE_TRUE_SHORTHAND,
5989     subproperties: [
5990       "font-variant-alternates",
5991       "font-variant-caps",
5992       "font-variant-east-asian",
5993       "font-variant-ligatures",
5994       "font-variant-numeric",
5995       "font-variant-position",
5996     ],
5997     initial_values: ["normal"],
5998     other_values: [
5999       "small-caps",
6000       "none",
6001       "traditional oldstyle-nums",
6002       "all-small-caps",
6003       "common-ligatures no-discretionary-ligatures",
6004       "proportional-nums oldstyle-nums",
6005       "proportional-nums slashed-zero diagonal-fractions oldstyle-nums ordinal",
6006       "traditional historical-forms styleset(ok-alt-a, ok-alt-b)",
6007       "styleset(potato)",
6008     ],
6009     invalid_values: [
6010       "small-caps normal",
6011       "small-caps small-caps",
6012       "none common-ligatures",
6013       "common-ligatures none",
6014       "small-caps potato",
6015       "small-caps jis83 all-small-caps",
6016       "super historical-ligatures sub",
6017       "stacked-fractions diagonal-fractions historical-ligatures",
6018       "common-ligatures traditional common-ligatures",
6019       "lining-nums traditional slashed-zero ordinal normal",
6020       "traditional historical-forms styleset(ok-alt-a, ok-alt-b) historical-forms",
6021       "historical-forms styleset(ok-alt-a, ok-alt-b) traditional styleset(potato)",
6022       "annotation(a,b,c)",
6023     ],
6024   },
6025   "font-variant-alternates": {
6026     domProp: "fontVariantAlternates",
6027     inherited: true,
6028     type: CSS_TYPE_LONGHAND,
6029     applies_to_first_letter: true,
6030     applies_to_first_line: true,
6031     applies_to_marker: true,
6032     applies_to_placeholder: true,
6033     applies_to_cue: true,
6034     initial_values: ["normal"],
6035     other_values: [
6036       "historical-forms",
6037       "styleset(alt-a, alt-b)",
6038       "character-variant(a, b, c)",
6039       "annotation(circled)",
6040       "swash(squishy)",
6041       "styleset(complex\\ blob, a)",
6042       "annotation(\\62 lah)",
6043     ],
6044     invalid_values: [
6045       "historical-forms normal",
6046       "historical-forms historical-forms",
6047       "swash",
6048       "swash(3)",
6049       "annotation(a, b)",
6050       "ornaments(a,b)",
6051       "styleset(1234blah)",
6052       "annotation(a), annotation(b)",
6053       "annotation(a) normal",
6054     ],
6055   },
6056   "font-variant-caps": {
6057     domProp: "fontVariantCaps",
6058     inherited: true,
6059     type: CSS_TYPE_LONGHAND,
6060     applies_to_first_letter: true,
6061     applies_to_first_line: true,
6062     applies_to_marker: true,
6063     applies_to_placeholder: true,
6064     applies_to_cue: true,
6065     initial_values: ["normal"],
6066     other_values: [
6067       "small-caps",
6068       "all-small-caps",
6069       "petite-caps",
6070       "all-petite-caps",
6071       "titling-caps",
6072       "unicase",
6073     ],
6074     invalid_values: [
6075       "normal small-caps",
6076       "petite-caps normal",
6077       "unicase unicase",
6078     ],
6079   },
6080   "font-variant-east-asian": {
6081     domProp: "fontVariantEastAsian",
6082     inherited: true,
6083     type: CSS_TYPE_LONGHAND,
6084     applies_to_first_letter: true,
6085     applies_to_first_line: true,
6086     applies_to_marker: true,
6087     applies_to_placeholder: true,
6088     applies_to_cue: true,
6089     initial_values: ["normal"],
6090     other_values: [
6091       "jis78",
6092       "jis83",
6093       "jis90",
6094       "jis04",
6095       "simplified",
6096       "traditional",
6097       "full-width",
6098       "proportional-width",
6099       "ruby",
6100       "jis78 full-width",
6101       "jis78 full-width ruby",
6102       "simplified proportional-width",
6103       "ruby simplified",
6104     ],
6105     invalid_values: [
6106       "jis78 normal",
6107       "jis90 jis04",
6108       "simplified traditional",
6109       "full-width proportional-width",
6110       "ruby simplified ruby",
6111       "jis78 ruby simplified",
6112     ],
6113   },
6114   "font-variant-ligatures": {
6115     domProp: "fontVariantLigatures",
6116     inherited: true,
6117     type: CSS_TYPE_LONGHAND,
6118     applies_to_first_letter: true,
6119     applies_to_first_line: true,
6120     applies_to_marker: true,
6121     applies_to_placeholder: true,
6122     applies_to_cue: true,
6123     initial_values: ["normal"],
6124     other_values: [
6125       "none",
6126       "common-ligatures",
6127       "no-common-ligatures",
6128       "discretionary-ligatures",
6129       "no-discretionary-ligatures",
6130       "historical-ligatures",
6131       "no-historical-ligatures",
6132       "contextual",
6133       "no-contextual",
6134       "common-ligatures no-discretionary-ligatures",
6135       "contextual no-discretionary-ligatures",
6136       "historical-ligatures no-common-ligatures",
6137       "no-historical-ligatures discretionary-ligatures",
6138       "common-ligatures no-discretionary-ligatures historical-ligatures no-contextual",
6139     ],
6140     invalid_values: [
6141       "common-ligatures normal",
6142       "common-ligatures no-common-ligatures",
6143       "common-ligatures common-ligatures",
6144       "no-historical-ligatures historical-ligatures",
6145       "no-discretionary-ligatures discretionary-ligatures",
6146       "no-contextual contextual",
6147       "common-ligatures no-discretionary-ligatures no-common-ligatures",
6148       "common-ligatures none",
6149       "no-discretionary-ligatures none",
6150       "none common-ligatures",
6151     ],
6152   },
6153   "font-variant-numeric": {
6154     domProp: "fontVariantNumeric",
6155     inherited: true,
6156     type: CSS_TYPE_LONGHAND,
6157     applies_to_first_letter: true,
6158     applies_to_first_line: true,
6159     applies_to_marker: true,
6160     applies_to_placeholder: true,
6161     applies_to_cue: true,
6162     initial_values: ["normal"],
6163     other_values: [
6164       "lining-nums",
6165       "oldstyle-nums",
6166       "proportional-nums",
6167       "tabular-nums",
6168       "diagonal-fractions",
6169       "stacked-fractions",
6170       "slashed-zero",
6171       "ordinal",
6172       "lining-nums diagonal-fractions",
6173       "tabular-nums stacked-fractions",
6174       "tabular-nums slashed-zero stacked-fractions",
6175       "proportional-nums slashed-zero diagonal-fractions oldstyle-nums ordinal",
6176     ],
6177     invalid_values: [
6178       "lining-nums normal",
6179       "lining-nums oldstyle-nums",
6180       "lining-nums normal slashed-zero ordinal",
6181       "proportional-nums tabular-nums",
6182       "diagonal-fractions stacked-fractions",
6183       "slashed-zero diagonal-fractions slashed-zero",
6184       "lining-nums slashed-zero diagonal-fractions oldstyle-nums",
6185       "diagonal-fractions diagonal-fractions",
6186     ],
6187   },
6188   "font-variant-position": {
6189     domProp: "fontVariantPosition",
6190     inherited: true,
6191     type: CSS_TYPE_LONGHAND,
6192     applies_to_first_letter: true,
6193     applies_to_first_line: true,
6194     applies_to_marker: true,
6195     applies_to_placeholder: true,
6196     applies_to_cue: true,
6197     initial_values: ["normal"],
6198     other_values: ["super", "sub"],
6199     invalid_values: ["normal sub", "super sub"],
6200   },
6201   "font-weight": {
6202     domProp: "fontWeight",
6203     inherited: true,
6204     type: CSS_TYPE_LONGHAND,
6205     applies_to_first_letter: true,
6206     applies_to_first_line: true,
6207     applies_to_marker: true,
6208     applies_to_placeholder: true,
6209     applies_to_cue: true,
6210     initial_values: ["normal", "400"],
6211     other_values: [
6212       "bold",
6213       "100",
6214       "200",
6215       "300",
6216       "500",
6217       "600",
6218       "700",
6219       "800",
6220       "900",
6221       "bolder",
6222       "lighter",
6223       "10.5",
6224       "calc(10 + 10)",
6225       "calc(10 - 99)",
6226       "100.0",
6227       "107",
6228       "399",
6229       "401",
6230       "699",
6231       "710",
6232       "1000",
6233     ],
6234     invalid_values: ["0", "1001", "calc(10%)"],
6235   },
6236   height: {
6237     domProp: "height",
6238     inherited: false,
6239     type: CSS_TYPE_LONGHAND,
6240     /* FIXME: test zero, and test calc clamping */
6241     initial_values: [" auto"],
6242     /* computed value tests for height test more with display:block */
6243     prerequisites: { display: "block" },
6244     other_values: [
6245       "15px",
6246       "3em",
6247       "15%",
6248       "max-content",
6249       "min-content",
6250       "fit-content",
6251       "-moz-fit-content",
6252       "-moz-available",
6253       // these two keywords are the aliases of above first two.
6254       "-moz-max-content",
6255       "-moz-min-content",
6256       "calc(2px)",
6257       "calc(50%)",
6258       "calc(3*25px)",
6259       "calc(25px*3)",
6260       "calc(3*25px + 50%)",
6261       "fit-content(100px)",
6262       "fit-content(10%)",
6263       "fit-content(calc(3*25px + 50%))",
6264     ],
6265     invalid_values: ["none"],
6266     quirks_values: { 5: "5px" },
6267   },
6268   "ime-mode": {
6269     domProp: "imeMode",
6270     inherited: false,
6271     type: CSS_TYPE_LONGHAND,
6272     initial_values: ["auto"],
6273     other_values: ["normal", "disabled", "active", "inactive"],
6274     invalid_values: ["none", "enabled", "1px"],
6275   },
6276   left: {
6277     domProp: "left",
6278     inherited: false,
6279     type: CSS_TYPE_LONGHAND,
6280     /* FIXME: run tests with multiple prerequisites */
6281     prerequisites: { position: "relative" },
6282     /* XXX 0 may or may not be equal to auto */
6283     initial_values: ["auto"],
6284     other_values: [
6285       "32px",
6286       "-3em",
6287       "12%",
6288       "calc(2px)",
6289       "calc(-2px)",
6290       "calc(50%)",
6291       "calc(3*25px)",
6292       "calc(25px*3)",
6293       "calc(3*25px + 50%)",
6294     ],
6295     invalid_values: [],
6296     quirks_values: { 5: "5px" },
6297   },
6298   "letter-spacing": {
6299     domProp: "letterSpacing",
6300     inherited: true,
6301     type: CSS_TYPE_LONGHAND,
6302     applies_to_first_letter: true,
6303     applies_to_first_line: true,
6304     applies_to_placeholder: true,
6305     initial_values: ["normal", "0", "0px", "calc(0px)"],
6306     other_values: [
6307       "1em",
6308       "2px",
6309       "-3px",
6310       "calc(1em)",
6311       "calc(1em + 3px)",
6312       "calc(15px / 2)",
6313       "calc(15px/2)",
6314       "calc(-3px)",
6315     ],
6316     invalid_values: [],
6317     quirks_values: { 5: "5px" },
6318   },
6319   "line-break": {
6320     domProp: "lineBreak",
6321     inherited: true,
6322     type: CSS_TYPE_LONGHAND,
6323     initial_values: ["auto"],
6324     other_values: ["loose", "normal", "strict", "anywhere"],
6325     invalid_values: [],
6326   },
6327   "line-height": {
6328     domProp: "lineHeight",
6329     inherited: true,
6330     type: CSS_TYPE_LONGHAND,
6331     applies_to_marker: true,
6332     applies_to_first_letter: true,
6333     applies_to_first_line: true,
6334     applies_to_placeholder: true,
6335     applies_to_cue: true,
6336     /*
6337      * Inheritance tests require consistent font size, since
6338      * getComputedStyle (which uses the CSS2 computed value, or
6339      * CSS2.1 used value) doesn't match what the CSS2.1 computed
6340      * value is.  And they even require consistent font metrics for
6341      * computation of 'normal'.
6342      */
6343     prerequisites: {
6344       "font-size": "19px",
6345       "font-size-adjust": "none",
6346       "font-family": "serif",
6347       "font-weight": "normal",
6348       "font-style": "normal",
6349       height: "18px",
6350       display: "block",
6351       "writing-mode": "initial",
6352     },
6354     initial_values: ["normal"],
6355     other_values: [
6356       "1.0",
6357       "1",
6358       "1em",
6359       "47px",
6360       "calc(2px)",
6361       "calc(50%)",
6362       "calc(3*25px)",
6363       "calc(25px*3)",
6364       "calc(3*25px + 50%)",
6365       "calc(1 + 2*3/4)",
6366     ],
6367     invalid_values: ["calc(1 + 2px)", "calc(100% + 0.1)"],
6368   },
6369   "list-style": {
6370     domProp: "listStyle",
6371     inherited: true,
6372     type: CSS_TYPE_TRUE_SHORTHAND,
6373     subproperties: [
6374       "list-style-type",
6375       "list-style-position",
6376       "list-style-image",
6377     ],
6378     initial_values: [
6379       "outside",
6380       "disc",
6381       "disc outside",
6382       "outside disc",
6383       "disc none",
6384       "none disc",
6385       "none disc outside",
6386       "none outside disc",
6387       "disc none outside",
6388       "disc outside none",
6389       "outside none disc",
6390       "outside disc none",
6391     ],
6392     other_values: [
6393       "inside none",
6394       "none inside",
6395       "none none inside",
6396       "square",
6397       "none",
6398       "none none",
6399       "outside none none",
6400       "none outside none",
6401       "none none outside",
6402       "none outside",
6403       "outside none",
6404       "outside outside",
6405       "outside inside",
6406       "\\32 style",
6407       "\\32 style inside",
6408       '"-"',
6409       "'-'",
6410       "inside '-'",
6411       "'-' outside",
6412       "none '-'",
6413       "inside none '-'",
6414       'symbols("*" "\\2020" "\\2021" "\\A7")',
6415       'symbols(cyclic "*" "\\2020" "\\2021" "\\A7")',
6416       'inside symbols("*" "\\2020" "\\2021" "\\A7")',
6417       'symbols("*" "\\2020" "\\2021" "\\A7") outside',
6418       'none symbols("*" "\\2020" "\\2021" "\\A7")',
6419       'inside none symbols("*" "\\2020" "\\2021" "\\A7")',
6420       'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
6421       'none url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
6422       'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") none',
6423       'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") outside',
6424       'outside url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
6425       'outside none url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
6426       'outside url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") none',
6427       'none url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") outside',
6428       'none outside url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
6429       'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") outside none',
6430       'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==") none outside',
6431     ],
6432     invalid_values: [
6433       "disc disc",
6434       "unknown value",
6435       "none none none",
6436       "none disc url(404.png)",
6437       "none url(404.png) disc",
6438       "disc none url(404.png)",
6439       "disc url(404.png) none",
6440       "url(404.png) none disc",
6441       "url(404.png) disc none",
6442       "none disc outside url(404.png)",
6443     ],
6444   },
6445   "list-style-image": {
6446     domProp: "listStyleImage",
6447     inherited: true,
6448     type: CSS_TYPE_LONGHAND,
6449     initial_values: ["none"],
6450     other_values: [
6451       'url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAKElEQVR42u3NQQ0AAAgEoNP+nTWFDzcoQE1udQQCgUAgEAgEAsGTYAGjxAE/G/Q2tQAAAABJRU5ErkJggg==")',
6452       // Add some tests for interesting url() values here to test serialization, etc.
6453       "url('data:text/plain,\"')",
6454       'url("data:text/plain,\'")',
6455       "url('data:text/plain,\\'')",
6456       'url("data:text/plain,\\"")',
6457       "url('data:text/plain,\\\"')",
6458       'url("data:text/plain,\\\'")',
6459       "url(data:text/plain,\\\\)",
6460     ].concat(validNonUrlImageValues),
6461     invalid_values: ["url('border.png') url('border.png')"].concat(
6462       invalidNonUrlImageValues
6463     ),
6464     unbalanced_values: [].concat(unbalancedGradientAndElementValues),
6465   },
6466   "list-style-position": {
6467     domProp: "listStylePosition",
6468     inherited: true,
6469     type: CSS_TYPE_LONGHAND,
6470     initial_values: ["outside"],
6471     other_values: ["inside"],
6472     invalid_values: [],
6473   },
6474   "list-style-type": {
6475     domProp: "listStyleType",
6476     inherited: true,
6477     type: CSS_TYPE_LONGHAND,
6478     initial_values: ["disc"],
6479     other_values: [
6480       "none",
6481       "circle",
6482       "square",
6483       "disclosure-closed",
6484       "disclosure-open",
6485       "decimal",
6486       "decimal-leading-zero",
6487       "lower-roman",
6488       "upper-roman",
6489       "lower-greek",
6490       "lower-alpha",
6491       "lower-latin",
6492       "upper-alpha",
6493       "upper-latin",
6494       "hebrew",
6495       "armenian",
6496       "georgian",
6497       "cjk-decimal",
6498       "cjk-ideographic",
6499       "hiragana",
6500       "katakana",
6501       "hiragana-iroha",
6502       "katakana-iroha",
6503       "japanese-informal",
6504       "japanese-formal",
6505       "korean-hangul-formal",
6506       "korean-hanja-informal",
6507       "korean-hanja-formal",
6508       "simp-chinese-informal",
6509       "simp-chinese-formal",
6510       "trad-chinese-informal",
6511       "trad-chinese-formal",
6512       "ethiopic-numeric",
6513       "-moz-cjk-heavenly-stem",
6514       "-moz-cjk-earthly-branch",
6515       "-moz-trad-chinese-informal",
6516       "-moz-trad-chinese-formal",
6517       "-moz-simp-chinese-informal",
6518       "-moz-simp-chinese-formal",
6519       "-moz-japanese-informal",
6520       "-moz-japanese-formal",
6521       "-moz-arabic-indic",
6522       "-moz-persian",
6523       "-moz-urdu",
6524       "-moz-devanagari",
6525       "-moz-gurmukhi",
6526       "-moz-gujarati",
6527       "-moz-oriya",
6528       "-moz-kannada",
6529       "-moz-malayalam",
6530       "-moz-bengali",
6531       "-moz-tamil",
6532       "-moz-telugu",
6533       "-moz-thai",
6534       "-moz-lao",
6535       "-moz-myanmar",
6536       "-moz-khmer",
6537       "-moz-hangul",
6538       "-moz-hangul-consonant",
6539       "-moz-ethiopic-halehame",
6540       "-moz-ethiopic-numeric",
6541       "-moz-ethiopic-halehame-am",
6542       "-moz-ethiopic-halehame-ti-er",
6543       "-moz-ethiopic-halehame-ti-et",
6544       "other-style",
6545       "inside",
6546       "outside",
6547       "\\32 style",
6548       '"-"',
6549       "'-'",
6550       'symbols("*" "\\2020" "\\2021" "\\A7")',
6551       "symbols(cyclic '*' '\\2020' '\\2021' '\\A7')",
6552     ],
6553     invalid_values: [],
6554   },
6555   margin: {
6556     domProp: "margin",
6557     inherited: false,
6558     type: CSS_TYPE_TRUE_SHORTHAND,
6559     subproperties: [
6560       "margin-top",
6561       "margin-right",
6562       "margin-bottom",
6563       "margin-left",
6564     ],
6565     initial_values: ["0", "0px 0 0em", "0% 0px 0em 0pt"],
6566     other_values: [
6567       "3px 0",
6568       "2em 4px 2pt",
6569       "1em 2em 3px 4px",
6570       "1em calc(2em + 3px) 4ex 5cm",
6571     ],
6572     invalid_values: ["1px calc(nonsense)", "1px red"],
6573     unbalanced_values: ["1px calc("],
6574     quirks_values: { 5: "5px", "3px 6px 2 5px": "3px 6px 2px 5px" },
6575   },
6576   "margin-bottom": {
6577     domProp: "marginBottom",
6578     inherited: false,
6579     type: CSS_TYPE_LONGHAND,
6580     applies_to_first_letter: true,
6581     /* XXX testing auto has prerequisites */
6582     initial_values: ["0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)"],
6583     other_values: [
6584       "1px",
6585       "2em",
6586       "5%",
6587       "calc(2px)",
6588       "calc(-2px)",
6589       "calc(50%)",
6590       "calc(3*25px)",
6591       "calc(25px*3)",
6592       "calc(3*25px + 50%)",
6593     ],
6594     invalid_values: [],
6595     quirks_values: { 5: "5px" },
6596   },
6597   "margin-left": {
6598     domProp: "marginLeft",
6599     inherited: false,
6600     type: CSS_TYPE_LONGHAND,
6601     applies_to_first_letter: true,
6602     /* XXX testing auto has prerequisites */
6603     initial_values: ["0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)"],
6604     other_values: [
6605       "1px",
6606       "2em",
6607       "5%",
6608       ".5px",
6609       "+32px",
6610       "+.789px",
6611       "-.328px",
6612       "+0.56px",
6613       "-0.974px",
6614       "237px",
6615       "-289px",
6616       "-056px",
6617       "1987.45px",
6618       "-84.32px",
6619       "calc(2px)",
6620       "calc(-2px)",
6621       "calc(50%)",
6622       "calc(3*25px)",
6623       "calc(25px*3)",
6624       "calc(3*25px + 50%)",
6625     ],
6626     invalid_values: [
6627       "..25px",
6628       ".+5px",
6629       ".px",
6630       "-.px",
6631       "++5px",
6632       "-+4px",
6633       "+-3px",
6634       "--7px",
6635       "+-.6px",
6636       "-+.5px",
6637       "++.7px",
6638       "--.4px",
6639     ],
6640     quirks_values: { 5: "5px" },
6641   },
6642   "margin-right": {
6643     domProp: "marginRight",
6644     inherited: false,
6645     type: CSS_TYPE_LONGHAND,
6646     applies_to_first_letter: true,
6647     /* XXX testing auto has prerequisites */
6648     initial_values: ["0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)"],
6649     other_values: [
6650       "1px",
6651       "2em",
6652       "5%",
6653       "calc(2px)",
6654       "calc(-2px)",
6655       "calc(50%)",
6656       "calc(3*25px)",
6657       "calc(25px*3)",
6658       "calc(3*25px + 50%)",
6659     ],
6660     invalid_values: [],
6661     quirks_values: { 5: "5px" },
6662   },
6663   "margin-top": {
6664     domProp: "marginTop",
6665     inherited: false,
6666     type: CSS_TYPE_LONGHAND,
6667     applies_to_first_letter: true,
6668     /* XXX testing auto has prerequisites */
6669     initial_values: ["0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)"],
6670     other_values: [
6671       "1px",
6672       "2em",
6673       "5%",
6674       "calc(2px)",
6675       "calc(-2px)",
6676       "calc(50%)",
6677       "calc(3*25px)",
6678       "calc(25px*3)",
6679       "calc(3*25px + 50%)",
6680     ],
6681     invalid_values: [],
6682     quirks_values: { 5: "5px" },
6683   },
6684   "max-height": {
6685     domProp: "maxHeight",
6686     inherited: false,
6687     type: CSS_TYPE_LONGHAND,
6688     prerequisites: { display: "block" },
6689     initial_values: ["none"],
6690     other_values: [
6691       "30px",
6692       "50%",
6693       "0",
6694       "max-content",
6695       "min-content",
6696       "fit-content",
6697       "-moz-fit-content",
6698       "-moz-available",
6699       // these two keywords are the aliases of above first two.
6700       "-moz-max-content",
6701       "-moz-min-content",
6702       "calc(2px)",
6703       "calc(-2px)",
6704       "calc(0px)",
6705       "calc(50%)",
6706       "calc(3*25px)",
6707       "calc(25px*3)",
6708       "calc(3*25px + 50%)",
6709       "fit-content(100px)",
6710       "fit-content(10%)",
6711       "fit-content(calc(3*25px + 50%))",
6712     ],
6713     invalid_values: ["auto"],
6714     quirks_values: { 5: "5px" },
6715   },
6716   "max-width": {
6717     domProp: "maxWidth",
6718     inherited: false,
6719     type: CSS_TYPE_LONGHAND,
6720     prerequisites: { display: "block" },
6721     initial_values: ["none"],
6722     other_values: [
6723       "30px",
6724       "50%",
6725       "0",
6726       // these four keywords compute to the initial value only when the
6727       // writing mode is vertical, and we're testing with a horizontal
6728       // writing mode
6729       "max-content",
6730       "min-content",
6731       "fit-content",
6732       "-moz-fit-content",
6733       "-moz-available",
6734       // these two keywords are the aliases of above first two.
6735       "-moz-max-content",
6736       "-moz-min-content",
6737       "calc(2px)",
6738       "calc(-2px)",
6739       "calc(0px)",
6740       "calc(50%)",
6741       "calc(3*25px)",
6742       "calc(25px*3)",
6743       "calc(3*25px + 50%)",
6744       "fit-content(100px)",
6745       "fit-content(10%)",
6746       "fit-content(calc(3*25px + 50%))",
6747     ],
6748     invalid_values: ["auto"],
6749     quirks_values: { 5: "5px" },
6750   },
6751   "min-height": {
6752     domProp: "minHeight",
6753     inherited: false,
6754     type: CSS_TYPE_LONGHAND,
6755     prerequisites: { display: "block" },
6756     initial_values: ["auto", "0", "calc(0em)", "calc(-2px)"],
6757     other_values: [
6758       "30px",
6759       "50%",
6760       "max-content",
6761       "min-content",
6762       "fit-content",
6763       "-moz-fit-content",
6764       "-moz-available",
6765       // these two keywords are the aliases of above first two.
6766       "-moz-max-content",
6767       "-moz-min-content",
6768       "calc(-1%)",
6769       "calc(2px)",
6770       "calc(50%)",
6771       "calc(3*25px)",
6772       "calc(25px*3)",
6773       "calc(3*25px + 50%)",
6774       "fit-content(100px)",
6775       "fit-content(10%)",
6776       "fit-content(calc(3*25px + 50%))",
6777     ],
6778     invalid_values: ["none"],
6779     quirks_values: { 5: "5px" },
6780   },
6781   "min-width": {
6782     domProp: "minWidth",
6783     inherited: false,
6784     type: CSS_TYPE_LONGHAND,
6785     prerequisites: { display: "block" },
6786     initial_values: ["auto", "0", "calc(0em)", "calc(-2px)"],
6787     other_values: [
6788       "30px",
6789       "50%",
6790       // these four keywords compute to the initial value only when the
6791       // writing mode is vertical, and we're testing with a horizontal
6792       // writing mode
6793       "max-content",
6794       "min-content",
6795       "fit-content",
6796       "-moz-fit-content",
6797       "-moz-available",
6798       // these two keywords are the aliases of above first two.
6799       "-moz-max-content",
6800       "-moz-min-content",
6801       "calc(-1%)",
6802       "calc(2px)",
6803       "calc(50%)",
6804       "calc(3*25px)",
6805       "calc(25px*3)",
6806       "calc(3*25px + 50%)",
6807       "fit-content(100px)",
6808       "fit-content(10%)",
6809       "fit-content(calc(3*25px + 50%))",
6810     ],
6811     invalid_values: ["none"],
6812     quirks_values: { 5: "5px" },
6813   },
6814   "object-fit": {
6815     domProp: "objectFit",
6816     inherited: false,
6817     type: CSS_TYPE_LONGHAND,
6818     initial_values: ["fill"],
6819     other_values: ["contain", "cover", "none", "scale-down"],
6820     invalid_values: ["auto", "5px", "100%"],
6821   },
6822   "object-position": {
6823     domProp: "objectPosition",
6824     inherited: false,
6825     type: CSS_TYPE_LONGHAND,
6826     initial_values: ["50% 50%", "50%", "center", "center center"],
6827     other_values: [
6828       "calc(20px)",
6829       "calc(20px) 10px",
6830       "10px calc(20px)",
6831       "calc(20px) 25%",
6832       "25% calc(20px)",
6833       "calc(20px) calc(20px)",
6834       "calc(20px + 1em) calc(20px / 2)",
6835       "calc(20px + 50%) calc(50% - 10px)",
6836       "calc(-20px) calc(-50%)",
6837       "calc(-20%) calc(-50%)",
6838       "0px 0px",
6839       "right 20px top 60px",
6840       "right 20px bottom 60px",
6841       "left 20px top 60px",
6842       "left 20px bottom 60px",
6843       "right -50px top -50px",
6844       "left -50px bottom -50px",
6845       "right 20px top -50px",
6846       "right -20px top 50px",
6847       "right 3em bottom 10px",
6848       "bottom 3em right 10px",
6849       "top 3em right 10px",
6850       "left 15px",
6851       "10px top",
6852       "left 20%",
6853       "right 20%",
6854     ],
6855     invalid_values: [
6856       "center 10px center 4px",
6857       "center 10px center",
6858       "top 20%",
6859       "bottom 20%",
6860       "50% left",
6861       "top 50%",
6862       "50% bottom 10%",
6863       "right 10% 50%",
6864       "left right",
6865       "top bottom",
6866       "left 10% right",
6867       "top 20px bottom 20px",
6868       "left left",
6869       "20 20",
6870       "left top 15px",
6871       "left 10px top",
6872     ],
6873   },
6874   offset: {
6875     domProp: "offset",
6876     inherited: false,
6877     type: CSS_TYPE_TRUE_SHORTHAND,
6878     subproperties: [
6879       "offset-path",
6880       "offset-distance",
6881       "offset-rotate",
6882       "offset-anchor",
6883       "offset-position",
6884     ],
6885     initial_values: ["none"],
6886     other_values: [
6887       "none 30deg reverse",
6888       "none 50px reverse 30deg",
6889       "none calc(10px + 20%) auto",
6890       "none reverse",
6891       "none / left center",
6892       "path('M 0 0 H 1') -200% auto",
6893       "path('M 0 0 H 1') -200%",
6894       "path('M 0 0 H 1') 50px",
6895       "path('M 0 0 H 1') auto",
6896       "path('M 0 0 H 1') reverse 30deg 50px",
6897       "path('M 0 0 H 1')",
6898       "path('m 20 0 h 100') -7rad 8px / auto",
6899       "path('m 0 30 v 100') -7rad 8px / left top",
6900       "path('m 0 0 h 100') -7rad 8px",
6901       "path('M 0 0 H 100') 100px 0deg",
6902       "top right / top left",
6903       "top right ray(45deg closest-side)",
6904       "50% 50% ray(0rad farthest-side)",
6905     ],
6906     invalid_values: [
6907       "100px 0deg path('m 0 0 h 100')",
6908       "30deg",
6909       "auto 30deg 100px",
6910       "auto / none",
6911       "none /",
6912       "none / 100px 20px 30deg",
6913       "path('M 20 30 A 60 70 80') bottom",
6914       "path('M 20 30 A 60 70 80') bottom top",
6915       "path('M 20 30 A 60 70 80') 100px 200px",
6916       "path('M 20 30 A 60 70 80') reverse auto",
6917       "path('M 20 30 A 60 70 80') reverse 10px 30deg",
6918       "path('M 20 30 A 60 70 80') /",
6919     ],
6920   },
6921   "offset-anchor": {
6922     domProp: "offsetAnchor",
6923     inherited: false,
6924     type: CSS_TYPE_LONGHAND,
6925     initial_values: ["auto"],
6926     other_values: [
6927       "left bottom",
6928       "center center",
6929       "calc(20% + 10px) center",
6930       "right 30em",
6931       "10px 20%",
6932       "left -10px top -20%",
6933       "right 10% bottom 20em",
6934     ],
6935     invalid_values: ["none", "10deg", "left 10% top"],
6936   },
6937   "offset-distance": {
6938     domProp: "offsetDistance",
6939     inherited: false,
6940     type: CSS_TYPE_LONGHAND,
6941     initial_values: ["0"],
6942     other_values: ["10px", "10%", "190%", "-280%", "calc(30px + 40%)"],
6943     invalid_values: ["none", "45deg"],
6944   },
6945   "offset-path": {
6946     domProp: "offsetPath",
6947     inherited: false,
6948     type: CSS_TYPE_LONGHAND,
6949     initial_values: ["none"],
6950     other_values: [
6951       "ray(0deg)",
6952       "ray(45deg closest-side)",
6953       "ray(0rad farthest-side)",
6954       "ray(0.5turn closest-corner contain)",
6955       "ray(200grad farthest-corner)",
6956       "ray(sides 180deg)",
6957       "ray(contain farthest-side 180deg)",
6958       "ray(calc(180deg - 45deg) farthest-side)",
6959       "ray(0deg at center center)",
6960       "ray(at 10% 10% 1rad)",
6961     ]
6962       .concat(pathValues.other_values)
6963       .concat(basicShapeOtherValues)
6964       .concat(basicShapeXywhRectValues)
6965       .concat(basicShapeShapeValues),
6966     invalid_values: [
6967       "path('')",
6968       "ray(closest-side)",
6969       "ray(0deg, closest-side)",
6970       "ray(contain 0deg closest-side contain)",
6971     ].concat(pathValues.invalid_values),
6972   },
6973   "offset-position": {
6974     domProp: "offsetPosition",
6975     inherited: false,
6976     type: CSS_TYPE_LONGHAND,
6977     initial_values: ["normal"],
6978     other_values: [
6979       "auto",
6980       "left bottom",
6981       "center center",
6982       "calc(20% + 10px) center",
6983       "right 30em",
6984       "10px 20%",
6985       "left -10px top -20%",
6986       "right 10% bottom 20em",
6987     ],
6988     invalid_values: ["none", "10deg", "left 10% top"],
6989   },
6990   "offset-rotate": {
6991     domProp: "offsetRotate",
6992     inherited: false,
6993     type: CSS_TYPE_LONGHAND,
6994     initial_values: ["auto"],
6995     other_values: ["reverse", "0deg", "0rad reverse", "-45deg", "5turn auto"],
6996     invalid_values: ["none", "10px", "reverse 0deg reverse", "reverse auto"],
6997   },
6998   opacity: {
6999     domProp: "opacity",
7000     inherited: false,
7001     type: CSS_TYPE_LONGHAND,
7002     applies_to_first_letter: true,
7003     applies_to_first_line: true,
7004     applies_to_placeholder: true,
7005     applies_to_cue: true,
7006     initial_values: [
7007       "1",
7008       "17",
7009       "397.376",
7010       "3e1",
7011       "3e+1",
7012       "3e0",
7013       "3e+0",
7014       "3e-0",
7015       "300%",
7016     ],
7017     other_values: ["0", "0.4", "0.0000", "-3", "3e-1", "-100%", "50%"],
7018     invalid_values: ["0px", "1px"],
7019   },
7020   "-moz-orient": {
7021     domProp: "MozOrient",
7022     inherited: false,
7023     type: CSS_TYPE_LONGHAND,
7024     initial_values: ["inline"],
7025     other_values: ["horizontal", "vertical", "block"],
7026     invalid_values: ["none"],
7027   },
7028   outline: {
7029     domProp: "outline",
7030     inherited: false,
7031     type: CSS_TYPE_TRUE_SHORTHAND,
7032     subproperties: ["outline-color", "outline-style", "outline-width"],
7033     initial_values: [
7034       "none",
7035       "medium",
7036       "thin",
7037       // XXX Should be invert, but currently currentcolor.
7038       //"invert", "none medium invert"
7039       "currentColor",
7040       "none medium currentcolor",
7041     ],
7042     other_values: [
7043       "solid",
7044       "medium solid",
7045       "green solid",
7046       "10px solid",
7047       "thick solid",
7048     ],
7049     invalid_values: ["5%", "5", "5 solid green"],
7050   },
7051   "outline-color": {
7052     domProp: "outlineColor",
7053     inherited: false,
7054     type: CSS_TYPE_LONGHAND,
7055     applies_to_cue: true,
7056     prerequisites: { color: "black" },
7057     initial_values: ["currentColor"], // XXX should be invert
7058     other_values: ["green", "rgba(255,128,0,0.5)", "transparent"],
7059     invalid_values: [
7060       "#0",
7061       "#00",
7062       "#00000",
7063       "#0000000",
7064       "#000000000",
7065       "000000",
7066       "cc00ff",
7067     ],
7068   },
7069   "outline-offset": {
7070     domProp: "outlineOffset",
7071     inherited: false,
7072     type: CSS_TYPE_LONGHAND,
7073     initial_values: [
7074       "0",
7075       "0px",
7076       "-0",
7077       "calc(0px)",
7078       "calc(3em + 2px - 2px - 3em)",
7079       "calc(-0em)",
7080     ],
7081     other_values: [
7082       "-3px",
7083       "1em",
7084       "calc(3em)",
7085       "calc(7pt + 3 * 2em)",
7086       "calc(-3px)",
7087     ],
7088     invalid_values: ["5%"],
7089   },
7090   "outline-style": {
7091     domProp: "outlineStyle",
7092     inherited: false,
7093     type: CSS_TYPE_LONGHAND,
7094     applies_to_cue: true,
7095     // XXX Should 'hidden' be the same as initial?
7096     initial_values: ["none"],
7097     other_values: [
7098       "solid",
7099       "dashed",
7100       "dotted",
7101       "double",
7102       "outset",
7103       "inset",
7104       "groove",
7105       "ridge",
7106       "auto",
7107     ],
7108     invalid_values: [],
7109   },
7110   "outline-width": {
7111     domProp: "outlineWidth",
7112     inherited: false,
7113     type: CSS_TYPE_LONGHAND,
7114     applies_to_cue: true,
7115     prerequisites: { "outline-style": "solid" },
7116     initial_values: ["medium", "3px", "calc(4px - 1px)"],
7117     other_values: [
7118       "thin",
7119       "thick",
7120       "1px",
7121       "2em",
7122       "calc(2px)",
7123       "calc(-2px)",
7124       "calc(0px)",
7125       "calc(0px)",
7126       "calc(5em)",
7127       "calc(3*25px)",
7128       "calc(25px*3)",
7129       "calc(3*25px + 5em)",
7130     ],
7131     invalid_values: ["5%", "5"],
7132   },
7133   overflow: {
7134     domProp: "overflow",
7135     inherited: false,
7136     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
7137     prerequisites: { display: "block", contain: "none" },
7138     subproperties: ["overflow-x", "overflow-y"],
7139     initial_values: ["visible"],
7140     other_values: [
7141       "auto",
7142       "scroll",
7143       "hidden",
7144       "clip",
7145       "auto auto",
7146       "auto scroll",
7147       "hidden scroll",
7148       "auto hidden",
7149       "clip clip",
7150       "overlay",
7151       "overlay overlay",
7152     ],
7153     invalid_values: [
7154       "clip -moz-scrollbars-none",
7155       "-moz-scrollbars-none",
7156       "-moz-scrollbars-horizontal",
7157       "-moz-scrollbars-vertical",
7158     ],
7159   },
7160   "overflow-x": {
7161     domProp: "overflowX",
7162     inherited: false,
7163     type: CSS_TYPE_LONGHAND,
7164     // No applies_to_placeholder because we have a !important rule in forms.css.
7165     prerequisites: {
7166       display: "block",
7167       "overflow-y": "visible",
7168       contain: "none",
7169     },
7170     initial_values: ["visible"],
7171     other_values: ["auto", "scroll", "hidden", "clip", "overlay"],
7172     invalid_values: [],
7173   },
7174   "overflow-y": {
7175     domProp: "overflowY",
7176     inherited: false,
7177     type: CSS_TYPE_LONGHAND,
7178     // No applies_to_placeholder because we have a !important rule in forms.css.
7179     prerequisites: {
7180       display: "block",
7181       "overflow-x": "visible",
7182       contain: "none",
7183     },
7184     initial_values: ["visible"],
7185     other_values: ["auto", "scroll", "hidden", "clip", "overlay"],
7186     invalid_values: [],
7187   },
7188   "overflow-inline": {
7189     domProp: "overflowInline",
7190     inherited: false,
7191     type: CSS_TYPE_LONGHAND,
7192     logical: true,
7193     // No applies_to_placeholder because we have a !important rule in forms.css.
7194     prerequisites: {
7195       display: "block",
7196       "overflow-block": "visible",
7197       contain: "none",
7198     },
7199     initial_values: ["visible"],
7200     other_values: ["auto", "scroll", "hidden", "clip"],
7201     invalid_values: [],
7202   },
7203   "overflow-block": {
7204     domProp: "overflowBlock",
7205     inherited: false,
7206     type: CSS_TYPE_LONGHAND,
7207     logical: true,
7208     // No applies_to_placeholder because we have a !important rule in forms.css.
7209     prerequisites: {
7210       display: "block",
7211       "overflow-inline": "visible",
7212       contain: "none",
7213     },
7214     initial_values: ["visible"],
7215     other_values: ["auto", "scroll", "hidden", "clip"],
7216     invalid_values: [],
7217   },
7218   "overflow-clip-margin": {
7219     domProp: "overflowClipMargin",
7220     inherited: false,
7221     type: CSS_TYPE_LONGHAND,
7222     initial_values: ["0px"],
7223     other_values: ["1px", "2em", "calc(10px + 1vh)"],
7224     invalid_values: ["-10px"],
7225   },
7226   padding: {
7227     domProp: "padding",
7228     inherited: false,
7229     type: CSS_TYPE_TRUE_SHORTHAND,
7230     subproperties: [
7231       "padding-top",
7232       "padding-right",
7233       "padding-bottom",
7234       "padding-left",
7235     ],
7236     initial_values: [
7237       "0",
7238       "0px 0 0em",
7239       "0% 0px 0em 0pt",
7240       "calc(0px) calc(0em) calc(-2px) calc(-1%)",
7241     ],
7242     other_values: ["3px 0", "2em 4px 2pt", "1em 2em 3px 4px"],
7243     invalid_values: ["1px calc(nonsense)", "1px red", "-1px"],
7244     unbalanced_values: ["1px calc("],
7245     quirks_values: { 5: "5px", "3px 6px 2 5px": "3px 6px 2px 5px" },
7246   },
7247   "padding-block": {
7248     domProp: "paddingBlock",
7249     inherited: false,
7250     type: CSS_TYPE_TRUE_SHORTHAND,
7251     subproperties: ["padding-block-start", "padding-block-end"],
7252     initial_values: ["0", "0px 0em"],
7253     other_values: ["3px 0", "2% 4px", "1em", "calc(1px) calc(-1%)"],
7254     invalid_values: ["1px calc(nonsense)", "1px red", "-1px", "auto", "none"],
7255     unbalanced_values: ["1px calc("],
7256   },
7257   "padding-inline": {
7258     domProp: "paddingInline",
7259     inherited: false,
7260     type: CSS_TYPE_TRUE_SHORTHAND,
7261     subproperties: ["padding-inline-start", "padding-inline-end"],
7262     initial_values: ["0", "0px 0em"],
7263     other_values: ["3px 0", "2% 4px", "1em", "calc(1px) calc(-1%)"],
7264     invalid_values: ["1px calc(nonsense)", "1px red", "-1px", "auto", "none"],
7265     unbalanced_values: ["1px calc("],
7266   },
7267   "padding-bottom": {
7268     domProp: "paddingBottom",
7269     inherited: false,
7270     type: CSS_TYPE_LONGHAND,
7271     applies_to_first_letter: true,
7272     // No applies_to_placeholder because we have a !important rule in forms.css.
7273     initial_values: [
7274       "0",
7275       "0px",
7276       "0%",
7277       "calc(0pt)",
7278       "calc(0% + 0px)",
7279       "calc(-3px)",
7280       "calc(-1%)",
7281     ],
7282     other_values: [
7283       "1px",
7284       "2em",
7285       "5%",
7286       "calc(2px)",
7287       "calc(50%)",
7288       "calc(3*25px)",
7289       "calc(25px*3)",
7290       "calc(3*25px + 50%)",
7291     ],
7292     invalid_values: [],
7293     quirks_values: { 5: "5px" },
7294   },
7295   "padding-left": {
7296     domProp: "paddingLeft",
7297     inherited: false,
7298     type: CSS_TYPE_LONGHAND,
7299     applies_to_first_letter: true,
7300     // No applies_to_placeholder because we have a !important rule in forms.css.
7301     initial_values: [
7302       "0",
7303       "0px",
7304       "0%",
7305       "calc(0pt)",
7306       "calc(0% + 0px)",
7307       "calc(-3px)",
7308       "calc(-1%)",
7309     ],
7310     other_values: [
7311       "1px",
7312       "2em",
7313       "5%",
7314       "calc(2px)",
7315       "calc(50%)",
7316       "calc(3*25px)",
7317       "calc(25px*3)",
7318       "calc(3*25px + 50%)",
7319     ],
7320     invalid_values: [],
7321     quirks_values: { 5: "5px" },
7322   },
7323   "padding-right": {
7324     domProp: "paddingRight",
7325     inherited: false,
7326     type: CSS_TYPE_LONGHAND,
7327     applies_to_first_letter: true,
7328     // No applies_to_placeholder because we have a !important rule in forms.css.
7329     initial_values: [
7330       "0",
7331       "0px",
7332       "0%",
7333       "calc(0pt)",
7334       "calc(0% + 0px)",
7335       "calc(-3px)",
7336       "calc(-1%)",
7337     ],
7338     other_values: [
7339       "1px",
7340       "2em",
7341       "5%",
7342       "calc(2px)",
7343       "calc(50%)",
7344       "calc(3*25px)",
7345       "calc(25px*3)",
7346       "calc(3*25px + 50%)",
7347     ],
7348     invalid_values: [],
7349     quirks_values: { 5: "5px" },
7350   },
7351   "padding-top": {
7352     domProp: "paddingTop",
7353     inherited: false,
7354     type: CSS_TYPE_LONGHAND,
7355     applies_to_first_letter: true,
7356     // No applies_to_placeholder because we have a !important rule in forms.css.
7357     initial_values: [
7358       "0",
7359       "0px",
7360       "0%",
7361       "calc(0pt)",
7362       "calc(0% + 0px)",
7363       "calc(-3px)",
7364       "calc(-1%)",
7365     ],
7366     other_values: [
7367       "1px",
7368       "2em",
7369       "5%",
7370       "calc(2px)",
7371       "calc(50%)",
7372       "calc(3*25px)",
7373       "calc(25px*3)",
7374       "calc(3*25px + 50%)",
7375     ],
7376     invalid_values: [],
7377     quirks_values: { 5: "5px" },
7378   },
7379   "page-break-after": {
7380     domProp: "pageBreakAfter",
7381     inherited: false,
7382     type: CSS_TYPE_LEGACY_SHORTHAND,
7383     alias_for: "break-after",
7384     subproperties: ["break-after"],
7385     initial_values: ["auto"],
7386     other_values: ["always", "avoid", "left", "right"],
7387     legacy_mapping: {
7388       always: "page",
7389     },
7390     invalid_values: ["page", "column"],
7391   },
7392   "page-break-before": {
7393     domProp: "pageBreakBefore",
7394     inherited: false,
7395     type: CSS_TYPE_LEGACY_SHORTHAND,
7396     alias_for: "break-before",
7397     subproperties: ["break-before"],
7398     initial_values: ["auto"],
7399     other_values: ["always", "avoid", "left", "right"],
7400     legacy_mapping: {
7401       always: "page",
7402     },
7403     invalid_values: ["page", "column"],
7404   },
7405   "break-after": {
7406     domProp: "breakAfter",
7407     inherited: false,
7408     type: CSS_TYPE_LONGHAND,
7409     initial_values: ["auto"],
7410     other_values: ["always", "page", "avoid", "left", "right"],
7411     invalid_values: [],
7412   },
7413   "break-before": {
7414     domProp: "breakBefore",
7415     inherited: false,
7416     type: CSS_TYPE_LONGHAND,
7417     initial_values: ["auto"],
7418     other_values: ["always", "page", "avoid", "left", "right"],
7419     invalid_values: [],
7420   },
7421   "break-inside": {
7422     domProp: "breakInside",
7423     inherited: false,
7424     type: CSS_TYPE_LONGHAND,
7425     initial_values: ["auto"],
7426     other_values: ["avoid", "avoid-page", "avoid-column"],
7427     invalid_values: ["left", "right", "always"],
7428   },
7429   "page-break-inside": {
7430     domProp: "pageBreakInside",
7431     inherited: false,
7432     type: CSS_TYPE_LEGACY_SHORTHAND,
7433     alias_for: "break-inside",
7434     subproperties: ["break-inside"],
7435     initial_values: ["auto"],
7436     other_values: ["avoid"],
7437     invalid_values: ["avoid-page", "avoid-column"],
7438   },
7439   "paint-order": {
7440     domProp: "paintOrder",
7441     inherited: true,
7442     type: CSS_TYPE_LONGHAND,
7443     applies_to_first_letter: true,
7444     applies_to_first_line: true,
7445     initial_values: ["normal"],
7446     other_values: [
7447       "fill",
7448       "fill stroke",
7449       "fill stroke markers",
7450       "stroke markers fill",
7451     ],
7452     invalid_values: ["fill stroke markers fill", "fill normal"],
7453   },
7454   "pointer-events": {
7455     domProp: "pointerEvents",
7456     inherited: true,
7457     type: CSS_TYPE_LONGHAND,
7458     // No applies_to_placeholder because we have a !important rule in forms.css.
7459     initial_values: ["auto"],
7460     other_values: [
7461       "visiblePainted",
7462       "visibleFill",
7463       "visibleStroke",
7464       "visible",
7465       "painted",
7466       "fill",
7467       "stroke",
7468       "all",
7469       "none",
7470     ],
7471     invalid_values: [],
7472   },
7473   position: {
7474     domProp: "position",
7475     inherited: false,
7476     type: CSS_TYPE_LONGHAND,
7477     initial_values: ["static"],
7478     other_values: ["relative", "absolute", "fixed", "sticky"],
7479     invalid_values: [],
7480   },
7481   quotes: {
7482     domProp: "quotes",
7483     inherited: true,
7484     type: CSS_TYPE_LONGHAND,
7485     initial_values: ["auto"],
7486     other_values: [
7487       "none",
7488       "'\"' '\"'",
7489       "'' ''",
7490       '"\u201C" "\u201D" "\u2018" "\u2019"',
7491       '"\\201C" "\\201D" "\\2018" "\\2019"',
7492     ],
7493     invalid_values: ["'\"'", '"" "" ""'],
7494   },
7495   right: {
7496     domProp: "right",
7497     inherited: false,
7498     type: CSS_TYPE_LONGHAND,
7499     /* FIXME: run tests with multiple prerequisites */
7500     prerequisites: { position: "relative" },
7501     /* XXX 0 may or may not be equal to auto */
7502     initial_values: ["auto"],
7503     other_values: [
7504       "32px",
7505       "-3em",
7506       "12%",
7507       "calc(2px)",
7508       "calc(-2px)",
7509       "calc(50%)",
7510       "calc(3*25px)",
7511       "calc(25px*3)",
7512       "calc(3*25px + 50%)",
7513     ],
7514     invalid_values: [],
7515     quirks_values: { 5: "5px" },
7516   },
7517   "ruby-align": {
7518     domProp: "rubyAlign",
7519     inherited: true,
7520     type: CSS_TYPE_LONGHAND,
7521     initial_values: ["space-around"],
7522     other_values: ["start", "center", "space-between"],
7523     invalid_values: ["end", "1", "10px", "50%", "start center"],
7524   },
7525   "ruby-position": {
7526     domProp: "rubyPosition",
7527     inherited: true,
7528     type: CSS_TYPE_LONGHAND,
7529     applies_to_cue: true,
7530     initial_values: ["alternate", "alternate over", "over alternate"],
7531     other_values: ["over", "under", "alternate under", "under alternate"],
7532     invalid_values: [
7533       "left",
7534       "right",
7535       "auto",
7536       "none",
7537       "not_a_position",
7538       "over left",
7539       "right under",
7540       "over under",
7541       "alternate alternate",
7542       "0",
7543       "100px",
7544       "50%",
7545     ],
7546   },
7547   "scroll-behavior": {
7548     domProp: "scrollBehavior",
7549     inherited: false,
7550     type: CSS_TYPE_LONGHAND,
7551     initial_values: ["auto"],
7552     other_values: ["smooth"],
7553     invalid_values: ["none", "1px"],
7554   },
7555   "scroll-snap-stop": {
7556     domProp: "scrollSnapStop",
7557     inherited: false,
7558     type: CSS_TYPE_LONGHAND,
7559     initial_values: ["normal"],
7560     other_values: ["always"],
7561     invalid_values: ["auto", "none", "1px"],
7562   },
7563   "scroll-snap-type": {
7564     domProp: "scrollSnapType",
7565     inherited: false,
7566     type: CSS_TYPE_LONGHAND,
7567     initial_values: ["none"],
7568     other_values: [
7569       "both mandatory",
7570       "y mandatory",
7571       "inline proximity",
7572       "both",
7573       "x",
7574       "y",
7575       "block",
7576       "inline",
7577     ],
7578     invalid_values: [
7579       "auto",
7580       "1px",
7581       "x y",
7582       "block mandatory inline",
7583       "mandatory",
7584       "proximity",
7585       "mandatory inline",
7586       "proximity both",
7587       "mandatory x",
7588       "proximity y",
7589       "mandatory block",
7590       "proximity mandatory",
7591     ],
7592   },
7593   "scroll-snap-align": {
7594     domProp: "scrollSnapAlign",
7595     inherited: false,
7596     type: CSS_TYPE_LONGHAND,
7597     initial_values: ["none"],
7598     other_values: [
7599       "start",
7600       "end",
7601       "center",
7602       "start none",
7603       "center end",
7604       "start start",
7605     ],
7606     invalid_values: ["auto", "start invalid", "start end center"],
7607   },
7608   "scroll-margin": {
7609     domProp: "scrollMargin",
7610     inherited: false,
7611     type: CSS_TYPE_TRUE_SHORTHAND,
7612     subproperties: [
7613       "scroll-margin-top",
7614       "scroll-margin-right",
7615       "scroll-margin-bottom",
7616       "scroll-margin-left",
7617     ],
7618     initial_values: ["0"],
7619     other_values: [
7620       "-10px",
7621       "calc(2em + 3ex)",
7622       "1px 2px",
7623       "1px 2px 3px",
7624       "1px 2px 3px 4px",
7625     ],
7626     invalid_values: ["auto", "20%", "-30%", "1px 2px 3px 4px 5px"],
7627   },
7628   "scroll-margin-top": {
7629     domProp: "scrollMarginTop",
7630     inherited: false,
7631     type: CSS_TYPE_LONGHAND,
7632     initial_values: ["0"],
7633     other_values: ["-10px", "calc(2em + 3ex)"],
7634     invalid_values: ["auto", "20%", "-30%", "1px 2px"],
7635   },
7636   "scroll-margin-right": {
7637     domProp: "scrollMarginRight",
7638     inherited: false,
7639     type: CSS_TYPE_LONGHAND,
7640     initial_values: ["0"],
7641     other_values: ["-10px", "calc(2em + 3ex)"],
7642     invalid_values: ["auto", "20%", "-30%", "1px 2px"],
7643   },
7644   "scroll-margin-bottom": {
7645     domProp: "scrollMarginBottom",
7646     inherited: false,
7647     type: CSS_TYPE_LONGHAND,
7648     initial_values: ["0"],
7649     other_values: ["-10px", "calc(2em + 3ex)"],
7650     invalid_values: ["auto", "20%", "-30%", "1px 2px"],
7651   },
7652   "scroll-margin-left": {
7653     domProp: "scrollMarginLeft",
7654     inherited: false,
7655     type: CSS_TYPE_LONGHAND,
7656     initial_values: ["0"],
7657     other_values: ["-10px", "calc(2em + 3ex)"],
7658     invalid_values: ["auto", "20%", "-30%", "1px 2px"],
7659   },
7660   "scroll-margin-inline": {
7661     domProp: "scrollMarginInline",
7662     inherited: false,
7663     type: CSS_TYPE_TRUE_SHORTHAND,
7664     subproperties: ["scroll-margin-inline-start", "scroll-margin-inline-end"],
7665     initial_values: ["0"],
7666     other_values: ["-10px", "calc(2em + 3ex)", "1px 2px"],
7667     invalid_values: ["auto", "20%", "-30%", "1px 2px 3px"],
7668   },
7669   "scroll-margin-inline-start": {
7670     domProp: "scrollMarginInlineStart",
7671     inherited: false,
7672     type: CSS_TYPE_LONGHAND,
7673     logical: true,
7674     initial_values: ["0"],
7675     other_values: ["-10px", "calc(2em + 3ex)"],
7676     invalid_values: ["auto", "20%", "-30%", "1px 2px"],
7677   },
7678   "scroll-margin-inline-end": {
7679     domProp: "scrollMarginInlineEnd",
7680     inherited: false,
7681     type: CSS_TYPE_LONGHAND,
7682     logical: true,
7683     initial_values: ["0"],
7684     other_values: ["-10px", "calc(2em + 3ex)"],
7685     invalid_values: ["auto", "20%", "-30%", "1px 2px"],
7686   },
7687   "scroll-margin-block": {
7688     domProp: "scrollMarginBlock",
7689     inherited: false,
7690     type: CSS_TYPE_TRUE_SHORTHAND,
7691     subproperties: ["scroll-margin-block-start", "scroll-margin-block-end"],
7692     initial_values: ["0"],
7693     other_values: ["-10px", "calc(2em + 3ex)", "1px 2px"],
7694     invalid_values: ["auto", "20%", "-30%", "1px 2px 3px"],
7695   },
7696   "scroll-margin-block-start": {
7697     domProp: "scrollMarginBlockStart",
7698     inherited: false,
7699     type: CSS_TYPE_LONGHAND,
7700     logical: true,
7701     initial_values: ["0"],
7702     other_values: ["-10px", "calc(2em + 3ex)"],
7703     invalid_values: ["auto", "20%", "-30%", "1px 2px"],
7704   },
7705   "scroll-margin-block-end": {
7706     domProp: "scrollMarginBlockEnd",
7707     inherited: false,
7708     type: CSS_TYPE_LONGHAND,
7709     logical: true,
7710     initial_values: ["0"],
7711     other_values: ["-10px", "calc(2em + 3ex)"],
7712     invalid_values: ["auto", "20%", "-30%", "1px 2px"],
7713   },
7714   "scroll-padding": {
7715     domProp: "scrollPadding",
7716     inherited: false,
7717     type: CSS_TYPE_TRUE_SHORTHAND,
7718     subproperties: [
7719       "scroll-padding-top",
7720       "scroll-padding-right",
7721       "scroll-padding-bottom",
7722       "scroll-padding-left",
7723     ],
7724     initial_values: ["auto"],
7725     other_values: [
7726       "10px",
7727       "0",
7728       "20%",
7729       "calc(2em + 3ex)",
7730       "1px 2px",
7731       "1px 2px 3%",
7732       "1px 2px 3% 4px",
7733       "1px auto",
7734     ],
7735     invalid_values: ["20", "-20px"],
7736   },
7737   "scroll-padding-top": {
7738     domProp: "scrollPaddingTop",
7739     inherited: false,
7740     type: CSS_TYPE_LONGHAND,
7741     initial_values: ["auto"],
7742     other_values: [
7743       "0",
7744       "10px",
7745       "20%",
7746       "calc(2em + 3ex)",
7747       "calc(50% + 60px)",
7748       "calc(-50px)",
7749     ],
7750     invalid_values: ["20", "-20px"],
7751   },
7752   "scroll-padding-right": {
7753     domProp: "scrollPaddingRight",
7754     inherited: false,
7755     type: CSS_TYPE_LONGHAND,
7756     initial_values: ["auto"],
7757     other_values: [
7758       "0",
7759       "10px",
7760       "20%",
7761       "calc(2em + 3ex)",
7762       "calc(50% + 60px)",
7763       "calc(-50px)",
7764     ],
7765     invalid_values: ["20", "-20px"],
7766   },
7767   "scroll-padding-bottom": {
7768     domProp: "scrollPaddingBottom",
7769     inherited: false,
7770     type: CSS_TYPE_LONGHAND,
7771     initial_values: ["auto"],
7772     other_values: [
7773       "0",
7774       "10px",
7775       "20%",
7776       "calc(2em + 3ex)",
7777       "calc(50% + 60px)",
7778       "calc(-50px)",
7779     ],
7780     invalid_values: ["20", "-20px"],
7781   },
7782   "scroll-padding-left": {
7783     domProp: "scrollPaddingLeft",
7784     inherited: false,
7785     type: CSS_TYPE_LONGHAND,
7786     initial_values: ["auto"],
7787     other_values: [
7788       "0",
7789       "10px",
7790       "20%",
7791       "calc(2em + 3ex)",
7792       "calc(50% + 60px)",
7793       "calc(-50px)",
7794     ],
7795     invalid_values: ["20", "-20px"],
7796   },
7797   "scroll-padding-inline": {
7798     domProp: "scrollPaddingInline",
7799     inherited: false,
7800     type: CSS_TYPE_TRUE_SHORTHAND,
7801     subproperties: ["scroll-padding-inline-start", "scroll-padding-inline-end"],
7802     initial_values: ["auto", "auto auto"],
7803     other_values: [
7804       "10px",
7805       "0",
7806       "20%",
7807       "calc(2em + 3ex)",
7808       "1px 2px",
7809       "1px auto",
7810     ],
7811     invalid_values: ["20", "-20px"],
7812   },
7813   "scroll-padding-inline-start": {
7814     domProp: "scrollPaddingInlineStart",
7815     inherited: false,
7816     type: CSS_TYPE_LONGHAND,
7817     logical: true,
7818     initial_values: ["auto"],
7819     other_values: [
7820       "0",
7821       "10px",
7822       "20%",
7823       "calc(2em + 3ex)",
7824       "calc(50% + 60px)",
7825       "calc(-50px)",
7826     ],
7827     invalid_values: ["20", "-20px"],
7828   },
7829   "scroll-padding-inline-end": {
7830     domProp: "scrollPaddingInlineEnd",
7831     inherited: false,
7832     type: CSS_TYPE_LONGHAND,
7833     logical: true,
7834     initial_values: ["auto"],
7835     other_values: [
7836       "0",
7837       "10px",
7838       "20%",
7839       "calc(2em + 3ex)",
7840       "calc(50% + 60px)",
7841       "calc(-50px)",
7842     ],
7843     invalid_values: ["20", "-20px"],
7844   },
7845   "scroll-padding-block": {
7846     domProp: "scrollPaddingBlock",
7847     inherited: false,
7848     type: CSS_TYPE_TRUE_SHORTHAND,
7849     subproperties: ["scroll-padding-block-start", "scroll-padding-block-end"],
7850     initial_values: ["auto", "auto auto"],
7851     other_values: [
7852       "10px",
7853       "0",
7854       "20%",
7855       "calc(2em + 3ex)",
7856       "1px 2px",
7857       "1px auto",
7858     ],
7859     invalid_values: ["20", "-20px"],
7860   },
7861   "scroll-padding-block-start": {
7862     domProp: "scrollPaddingBlockStart",
7863     inherited: false,
7864     type: CSS_TYPE_LONGHAND,
7865     logical: true,
7866     initial_values: ["auto"],
7867     other_values: [
7868       "0",
7869       "10px",
7870       "20%",
7871       "calc(2em + 3ex)",
7872       "calc(50% + 60px)",
7873       "calc(-50px)",
7874     ],
7875     invalid_values: ["20", "-20px"],
7876   },
7877   "scroll-padding-block-end": {
7878     domProp: "scrollPaddingBlockEnd",
7879     inherited: false,
7880     type: CSS_TYPE_LONGHAND,
7881     logical: true,
7882     initial_values: ["auto"],
7883     other_values: [
7884       "0",
7885       "10px",
7886       "20%",
7887       "calc(2em + 3ex)",
7888       "calc(50% + 60px)",
7889       "calc(-50px)",
7890     ],
7891     invalid_values: ["20", "-20px"],
7892   },
7893   "table-layout": {
7894     domProp: "tableLayout",
7895     inherited: false,
7896     type: CSS_TYPE_LONGHAND,
7897     initial_values: ["auto"],
7898     other_values: ["fixed"],
7899     invalid_values: [],
7900   },
7901   "text-align": {
7902     domProp: "textAlign",
7903     inherited: true,
7904     type: CSS_TYPE_LONGHAND,
7905     applies_to_placeholder: true,
7906     // don't know whether left and right are same as start
7907     initial_values: ["start"],
7908     other_values: ["center", "justify", "end", "match-parent"],
7909     invalid_values: [
7910       "true",
7911       "true true",
7912       "char",
7913       "-moz-center-or-inherit",
7914       "true left",
7915       "unsafe left",
7916     ],
7917   },
7918   "text-align-last": {
7919     domProp: "textAlignLast",
7920     inherited: true,
7921     type: CSS_TYPE_LONGHAND,
7922     initial_values: ["auto"],
7923     other_values: ["center", "justify", "start", "end", "left", "right"],
7924     invalid_values: [],
7925   },
7926   "text-combine-upright": {
7927     domProp: "textCombineUpright",
7928     inherited: true,
7929     type: CSS_TYPE_LONGHAND,
7930     applies_to_cue: true,
7931     applies_to_marker: true,
7932     initial_values: ["none"],
7933     other_values: ["all"],
7934     invalid_values: [
7935       "auto",
7936       "all 2",
7937       "none all",
7938       "digits -3",
7939       "digits 0",
7940       "digits 12",
7941       "none 3",
7942       "digits 3.1415",
7943       "digits3",
7944       "digits 1",
7945       "digits 3 all",
7946       "digits foo",
7947       "digits all",
7948       "digits 3.0",
7949     ],
7950   },
7951   "text-decoration": {
7952     domProp: "textDecoration",
7953     inherited: false,
7954     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
7955     applies_to_first_letter: true,
7956     applies_to_first_line: true,
7957     applies_to_placeholder: true,
7958     applies_to_cue: true,
7959     subproperties: [
7960       "text-decoration-color",
7961       "text-decoration-line",
7962       "text-decoration-style",
7963       "text-decoration-thickness",
7964     ],
7965     initial_values: ["none"],
7966     other_values: [
7967       "underline",
7968       "overline",
7969       "line-through",
7970       "blink",
7971       "blink line-through underline",
7972       "underline overline line-through blink",
7973       "underline red solid",
7974       "underline #ff0000",
7975       "solid underline",
7976       "red underline",
7977       "#ff0000 underline",
7978       "dotted underline",
7979       "solid underline 50px",
7980       "underline 50px blue",
7981       "50px dotted line-through purple",
7982       "overline 2em",
7983       "underline from-font",
7984       "red from-font overline",
7985       "5% underline blue",
7986       "dotted line-through 25%",
7987     ],
7988     invalid_values: [
7989       "none none",
7990       "underline none",
7991       "none underline",
7992       "blink none",
7993       "none blink",
7994       "line-through blink line-through",
7995       "underline overline line-through blink none",
7996       "underline overline line-throuh blink blink",
7997       "rgb(0, rubbish, 0) underline",
7998       "from font blue underline",
7999     ],
8000   },
8001   "text-decoration-color": {
8002     domProp: "textDecorationColor",
8003     inherited: false,
8004     type: CSS_TYPE_LONGHAND,
8005     applies_to_first_letter: true,
8006     applies_to_first_line: true,
8007     applies_to_placeholder: true,
8008     applies_to_cue: true,
8009     prerequisites: { color: "black" },
8010     initial_values: ["currentColor"],
8011     other_values: ["green", "rgba(255,128,0,0.5)", "transparent"],
8012     invalid_values: [
8013       "#0",
8014       "#00",
8015       "#00000",
8016       "#0000000",
8017       "#000000000",
8018       "000000",
8019       "ff00ff",
8020     ],
8021   },
8022   "text-decoration-line": {
8023     domProp: "textDecorationLine",
8024     inherited: false,
8025     type: CSS_TYPE_LONGHAND,
8026     applies_to_first_letter: true,
8027     applies_to_first_line: true,
8028     applies_to_placeholder: true,
8029     applies_to_cue: true,
8030     initial_values: ["none"],
8031     other_values: [
8032       "underline",
8033       "overline",
8034       "line-through",
8035       "blink",
8036       "blink line-through underline",
8037       "underline overline line-through blink",
8038     ],
8039     invalid_values: [
8040       "none none",
8041       "underline none",
8042       "none underline",
8043       "line-through blink line-through",
8044       "underline overline line-through blink none",
8045       "underline overline line-throuh blink blink",
8046     ],
8047   },
8048   "text-decoration-style": {
8049     domProp: "textDecorationStyle",
8050     inherited: false,
8051     type: CSS_TYPE_LONGHAND,
8052     applies_to_first_letter: true,
8053     applies_to_first_line: true,
8054     applies_to_placeholder: true,
8055     applies_to_cue: true,
8056     initial_values: ["solid"],
8057     other_values: ["double", "dotted", "dashed", "wavy", "-moz-none"],
8058     invalid_values: [
8059       "none",
8060       "groove",
8061       "ridge",
8062       "inset",
8063       "outset",
8064       "solid dashed",
8065       "wave",
8066     ],
8067   },
8068   "text-decoration-thickness": {
8069     domProp: "textDecorationThickness",
8070     inherited: false,
8071     type: CSS_TYPE_LONGHAND,
8072     applies_to_first_letter: true,
8073     applies_to_first_line: true,
8074     applies_to_placeholder: true,
8075     applies_to_cue: true,
8076     initial_values: ["auto"],
8077     other_values: [
8078       "from-font",
8079       "0",
8080       "-14px",
8081       "25px",
8082       "100em",
8083       "-45em",
8084       "43%",
8085       "-10%",
8086     ],
8087     invalid_values: ["13", "-25", "rubbish", ",./!@#$", "from font"],
8088   },
8089   "text-decoration-skip-ink": {
8090     domProp: "textDecorationSkipInk",
8091     inherited: true,
8092     type: CSS_TYPE_LONGHAND,
8093     applies_to_first_letter: true,
8094     applies_to_first_line: true,
8095     applies_to_placeholder: true,
8096     initial_values: ["auto"],
8097     other_values: ["none", "all"],
8098     invalid_values: [
8099       "13",
8100       "15%",
8101       "-1",
8102       "0",
8103       "otto",
8104       "trash",
8105       "non",
8106       "nada",
8107       "!@#$%^",
8108       "none auto",
8109       "auto none",
8110     ],
8111   },
8112   "text-underline-offset": {
8113     domProp: "textUnderlineOffset",
8114     inherited: true,
8115     type: CSS_TYPE_LONGHAND,
8116     applies_to_first_letter: true,
8117     applies_to_first_line: true,
8118     applies_to_placeholder: true,
8119     initial_values: ["auto"],
8120     other_values: ["0", "-14px", "25px", "100em", "-45em", "43%", "-10%"],
8121     invalid_values: [
8122       "13",
8123       "-25",
8124       "rubbish",
8125       ",./!@#$",
8126       "from-font",
8127       "from font",
8128     ],
8129   },
8130   "text-underline-position": {
8131     domProp: "textUnderlinePosition",
8132     inherited: true,
8133     type: CSS_TYPE_LONGHAND,
8134     applies_to_first_letter: true,
8135     applies_to_first_line: true,
8136     applies_to_placeholder: true,
8137     initial_values: ["auto"],
8138     other_values: [
8139       "under",
8140       "left",
8141       "right",
8142       "left under",
8143       "under left",
8144       "right under",
8145       "under right",
8146       "from-font",
8147       "from-font left",
8148       "from-font right",
8149       "left from-font",
8150       "right from-font",
8151     ],
8152     invalid_values: [
8153       "none",
8154       "auto from-font",
8155       "auto under",
8156       "under from-font",
8157       "left right",
8158       "right auto",
8159       "0",
8160       "1px",
8161       "10%",
8162       "from font",
8163     ],
8164   },
8165   "text-emphasis": {
8166     domProp: "textEmphasis",
8167     inherited: true,
8168     type: CSS_TYPE_TRUE_SHORTHAND,
8169     prerequisites: { color: "black" },
8170     subproperties: ["text-emphasis-style", "text-emphasis-color"],
8171     initial_values: [
8172       "none currentColor",
8173       "currentColor none",
8174       "none",
8175       "currentColor",
8176       "none black",
8177     ],
8178     other_values: [
8179       "filled dot black",
8180       "#f00 circle open",
8181       "sesame filled rgba(0,0,255,0.5)",
8182       "red",
8183       "green none",
8184       "currentColor filled",
8185       "currentColor open",
8186     ],
8187     invalid_values: [
8188       "filled black dot",
8189       "filled filled red",
8190       "open open circle #000",
8191       "circle dot #f00",
8192       "rubbish",
8193     ],
8194   },
8195   "text-emphasis-color": {
8196     domProp: "textEmphasisColor",
8197     inherited: true,
8198     type: CSS_TYPE_LONGHAND,
8199     prerequisites: { color: "black" },
8200     initial_values: ["currentColor", "black", "rgb(0,0,0)"],
8201     other_values: ["red", "rgba(255,255,255,0.5)", "transparent"],
8202     invalid_values: [
8203       "#0",
8204       "#00",
8205       "#00000",
8206       "#0000000",
8207       "#000000000",
8208       "000000",
8209       "ff00ff",
8210       "rgb(255,xxx,255)",
8211     ],
8212   },
8213   "text-emphasis-position": {
8214     domProp: "textEmphasisPosition",
8215     inherited: true,
8216     type: CSS_TYPE_LONGHAND,
8217     initial_values: ["over right", "right over", "over"],
8218     other_values: [
8219       "over left",
8220       "left over",
8221       "under left",
8222       "left under",
8223       "under right",
8224       "right under",
8225       "under",
8226     ],
8227     invalid_values: [
8228       "over over",
8229       "left left",
8230       "over right left",
8231       "rubbish left",
8232       "over rubbish",
8233     ],
8234   },
8235   "text-emphasis-style": {
8236     domProp: "textEmphasisStyle",
8237     inherited: true,
8238     type: CSS_TYPE_LONGHAND,
8239     initial_values: ["none"],
8240     other_values: [
8241       "filled",
8242       "open",
8243       "dot",
8244       "circle",
8245       "double-circle",
8246       "triangle",
8247       "sesame",
8248       "'#'",
8249       "filled dot",
8250       "filled circle",
8251       "filled double-circle",
8252       "filled triangle",
8253       "filled sesame",
8254       "dot filled",
8255       "circle filled",
8256       "double-circle filled",
8257       "triangle filled",
8258       "sesame filled",
8259       "dot open",
8260       "circle open",
8261       "double-circle open",
8262       "triangle open",
8263       "sesame open",
8264     ],
8265     invalid_values: [
8266       "rubbish",
8267       "dot rubbish",
8268       "rubbish dot",
8269       "open rubbish",
8270       "rubbish open",
8271       "open filled",
8272       "dot circle",
8273       "open '#'",
8274       "'#' filled",
8275       "dot '#'",
8276       "'#' circle",
8277       "1",
8278       "1 open",
8279       "open 1",
8280     ],
8281   },
8282   "text-indent": {
8283     domProp: "textIndent",
8284     inherited: true,
8285     type: CSS_TYPE_LONGHAND,
8286     initial_values: ["0", "calc(3em - 5em + 2px + 2em - 2px)"],
8287     other_values: [
8288       "2em",
8289       "5%",
8290       "-10px",
8291       "calc(2px)",
8292       "calc(-2px)",
8293       "calc(50%)",
8294       "calc(3*25px)",
8295       "calc(25px*3)",
8296       "calc(3*25px + 50%)",
8297     ],
8298     invalid_values: [],
8299     quirks_values: { 5: "5px" },
8300   },
8301   "text-overflow": {
8302     domProp: "textOverflow",
8303     inherited: false,
8304     type: CSS_TYPE_LONGHAND,
8305     applies_to_placeholder: true,
8306     initial_values: ["clip"],
8307     other_values: [
8308       "ellipsis",
8309       '""',
8310       "''",
8311       '"hello"',
8312       "clip clip",
8313       "ellipsis ellipsis",
8314       "clip ellipsis",
8315       'clip ""',
8316       '"hello" ""',
8317       '"" ellipsis',
8318     ],
8319     invalid_values: [
8320       "none",
8321       "auto",
8322       '"hello" inherit',
8323       'inherit "hello"',
8324       "clip initial",
8325       "initial clip",
8326       "initial inherit",
8327       "inherit initial",
8328       "inherit none",
8329       '"hello" unset',
8330       'unset "hello"',
8331       "clip unset",
8332       "unset clip",
8333       "unset inherit",
8334       "unset none",
8335       "initial unset",
8336     ],
8337   },
8338   "text-shadow": {
8339     domProp: "textShadow",
8340     inherited: true,
8341     type: CSS_TYPE_LONGHAND,
8342     applies_to_first_letter: true,
8343     applies_to_first_line: true,
8344     applies_to_placeholder: true,
8345     applies_to_cue: true,
8346     prerequisites: { color: "blue" },
8347     initial_values: ["none"],
8348     other_values: [
8349       "2px 2px",
8350       "2px 2px 1px",
8351       "2px 2px green",
8352       "2px 2px 1px green",
8353       "green 2px 2px",
8354       "green 2px 2px 1px",
8355       "green 2px 2px, blue 1px 3px 4px",
8356       "currentColor 3px 3px",
8357       "blue 2px 2px, currentColor 1px 2px",
8358       /* calc() values */
8359       "2px 2px calc(-5px)" /* clamped */,
8360       "calc(3em - 2px) 2px green",
8361       "green calc(3em - 2px) 2px",
8362       "2px calc(2px + 0.2em)",
8363       "blue 2px calc(2px + 0.2em)",
8364       "2px calc(2px + 0.2em) blue",
8365       "calc(-2px) calc(-2px)",
8366       "-2px -2px",
8367       "calc(2px) calc(2px)",
8368       "calc(2px) calc(2px) calc(2px)",
8369     ],
8370     invalid_values: [
8371       "3% 3%",
8372       "2px 2px -5px",
8373       "2px 2px 2px 2px",
8374       "2px 2px, none",
8375       "none, 2px 2px",
8376       "inherit, 2px 2px",
8377       "2px 2px, inherit",
8378       "2 2px",
8379       "2px 2",
8380       "2px 2px 2",
8381       "2px 2px 2px 2",
8382       "calc(2px) calc(2px) calc(2px) calc(2px)",
8383       "3px 3px calc(3px + rubbish)",
8384       "unset, 2px 2px",
8385       "2px 2px, unset",
8386     ],
8387   },
8388   "text-transform": {
8389     domProp: "textTransform",
8390     inherited: true,
8391     type: CSS_TYPE_LONGHAND,
8392     applies_to_first_letter: true,
8393     applies_to_first_line: true,
8394     applies_to_placeholder: true,
8395     applies_to_marker: true,
8396     initial_values: ["none"],
8397     other_values: [
8398       "capitalize",
8399       "uppercase",
8400       "lowercase",
8401       "full-width",
8402       "full-size-kana",
8403       "uppercase full-width",
8404       "full-size-kana capitalize",
8405       "full-width lowercase full-size-kana",
8406     ],
8407     invalid_values: [
8408       "none none",
8409       "none uppercase",
8410       "full-width none",
8411       "uppercase lowercase",
8412       "full-width capitalize full-width",
8413       "uppercase full-width lowercase",
8414     ],
8415   },
8416   "text-wrap": {
8417     domProp: "textWrap",
8418     inherited: true,
8419     type: CSS_TYPE_TRUE_SHORTHAND,
8420     subproperties: ["text-wrap-mode"],
8421     applies_to_placeholder: true,
8422     applies_to_cue: true,
8423     applies_to_marker: true,
8424     initial_values: ["wrap"],
8425     other_values: ["nowrap"],
8426     invalid_values: [],
8427   },
8428   "text-wrap-mode": {
8429     domProp: "textWrapMode",
8430     inherited: true,
8431     type: CSS_TYPE_LONGHAND,
8432     applies_to_cue: true,
8433     applies_to_placeholder: true,
8434     applies_to_marker: true,
8435     initial_values: ["wrap"],
8436     other_values: ["nowrap"],
8437     invalid_values: ["none", "normal", "on", "off", "wrap nowrap"],
8438   },
8439   top: {
8440     domProp: "top",
8441     inherited: false,
8442     type: CSS_TYPE_LONGHAND,
8443     /* FIXME: run tests with multiple prerequisites */
8444     prerequisites: { position: "relative" },
8445     /* XXX 0 may or may not be equal to auto */
8446     initial_values: ["auto"],
8447     other_values: [
8448       "32px",
8449       "-3em",
8450       "12%",
8451       "calc(2px)",
8452       "calc(-2px)",
8453       "calc(50%)",
8454       "calc(3*25px)",
8455       "calc(25px*3)",
8456       "calc(3*25px + 50%)",
8457     ],
8458     invalid_values: [],
8459     quirks_values: { 5: "5px" },
8460   },
8461   transition: {
8462     domProp: "transition",
8463     inherited: false,
8464     type: CSS_TYPE_TRUE_SHORTHAND,
8465     applies_to_marker: true,
8466     subproperties: [
8467       "transition-property",
8468       "transition-duration",
8469       "transition-timing-function",
8470       "transition-delay",
8471     ],
8472     initial_values: ["all 0s ease 0s", "all", "0s", "0s 0s", "ease"],
8473     other_values: [
8474       "all 0s cubic-bezier(0.25, 0.1, 0.25, 1.0) 0s",
8475       "width 1s linear 2s",
8476       "width 1s 2s linear",
8477       "width linear 1s 2s",
8478       "linear width 1s 2s",
8479       "linear 1s width 2s",
8480       "linear 1s 2s width",
8481       "1s width linear 2s",
8482       "1s width 2s linear",
8483       "1s 2s width linear",
8484       "1s linear width 2s",
8485       "1s linear 2s width",
8486       "1s 2s linear width",
8487       "width linear 1s",
8488       "width 1s linear",
8489       "linear width 1s",
8490       "linear 1s width",
8491       "1s width linear",
8492       "1s linear width",
8493       "1s 2s width",
8494       "1s width 2s",
8495       "width 1s 2s",
8496       "1s 2s linear",
8497       "1s linear 2s",
8498       "linear 1s 2s",
8499       "width 1s",
8500       "1s width",
8501       "linear 1s",
8502       "1s linear",
8503       "1s 2s",
8504       "2s 1s",
8505       "width",
8506       "linear",
8507       "1s",
8508       "height",
8509       "2s",
8510       "ease-in-out",
8511       "2s ease-in",
8512       "opacity linear",
8513       "ease-out 2s",
8514       "2s color, 1s width, 500ms height linear, 1s opacity 4s cubic-bezier(0.0, 0.1, 1.0, 1.0)",
8515       "1s \\32width linear 2s",
8516       "1s -width linear 2s",
8517       "1s -\\32width linear 2s",
8518       "1s \\32 0width linear 2s",
8519       "1s -\\32 0width linear 2s",
8520       "1s \\2width linear 2s",
8521       "1s -\\2width linear 2s",
8522       "2s, 1s width",
8523       "1s width, 2s",
8524       "2s all, 1s width",
8525       "1s width, 2s all",
8526       "2s all, 1s width",
8527       "2s width, 1s all",
8528       "3s --my-color",
8529       "none",
8530       "none 2s linear 2s",
8531     ],
8532     invalid_values: [
8533       "1s width, 2s none",
8534       "2s none, 1s width",
8535       "2s inherit",
8536       "inherit 2s",
8537       "2s width, 1s inherit",
8538       "2s inherit, 1s width",
8539       "2s initial",
8540       "1s width,,2s color",
8541       "1s width, ,2s color",
8542       "bounce 1s cubic-bezier(0, rubbish) 2s",
8543       "bounce 1s steps(rubbish) 2s",
8544       "2s unset",
8545     ],
8546   },
8547   "transition-delay": {
8548     domProp: "transitionDelay",
8549     inherited: false,
8550     type: CSS_TYPE_LONGHAND,
8551     applies_to_marker: true,
8552     initial_values: ["0s", "0ms"],
8553     other_values: ["1s", "250ms", "-100ms", "-1s", "1s, 250ms, 2.3s"],
8554     invalid_values: ["0", "0px"],
8555   },
8556   "transition-duration": {
8557     domProp: "transitionDuration",
8558     inherited: false,
8559     type: CSS_TYPE_LONGHAND,
8560     applies_to_marker: true,
8561     initial_values: ["0s", "0ms"],
8562     other_values: ["1s", "250ms", "1s, 250ms, 2.3s"],
8563     invalid_values: ["0", "0px", "-1ms", "-2s"],
8564   },
8565   "transition-property": {
8566     domProp: "transitionProperty",
8567     inherited: false,
8568     type: CSS_TYPE_LONGHAND,
8569     applies_to_marker: true,
8570     initial_values: ["all"],
8571     other_values: [
8572       "none",
8573       "left",
8574       "top",
8575       "color",
8576       "width, height, opacity",
8577       "foobar",
8578       "auto",
8579       "\\32width",
8580       "-width",
8581       "-\\32width",
8582       "\\32 0width",
8583       "-\\32 0width",
8584       "\\2width",
8585       "-\\2width",
8586       "all, all",
8587       "all, color",
8588       "color, all",
8589       "--my-color",
8590     ],
8591     invalid_values: [
8592       "none, none",
8593       "color, none",
8594       "none, color",
8595       "inherit, color",
8596       "color, inherit",
8597       "initial, color",
8598       "color, initial",
8599       "none, color",
8600       "color, none",
8601       "unset, color",
8602       "color, unset",
8603     ],
8604   },
8605   "transition-timing-function": {
8606     domProp: "transitionTimingFunction",
8607     inherited: false,
8608     type: CSS_TYPE_LONGHAND,
8609     applies_to_marker: true,
8610     initial_values: ["ease"],
8611     other_values: [
8612       "cubic-bezier(0.25, 0.1, 0.25, 1.0)",
8613       "linear",
8614       "ease-in",
8615       "ease-out",
8616       "ease-in-out",
8617       "linear, ease-in, cubic-bezier(0.1, 0.2, 0.8, 0.9)",
8618       "cubic-bezier(0.5, 0.5, 0.5, 0.5)",
8619       "cubic-bezier(0.25, 1.5, 0.75, -0.5)",
8620       "step-start",
8621       "step-end",
8622       "steps(1)",
8623       "steps(2, start)",
8624       "steps(386)",
8625       "steps(3, end)",
8626       "steps(1, jump-start)",
8627       "steps(1, jump-end)",
8628       "steps(2, jump-none)",
8629       "steps(1, jump-both)",
8630     ],
8631     invalid_values: [
8632       "none",
8633       "auto",
8634       "cubic-bezier(0.25, 0.1, 0.25)",
8635       "cubic-bezier(0.25, 0.1, 0.25, 0.25, 1.0)",
8636       "cubic-bezier(-0.5, 0.5, 0.5, 0.5)",
8637       "cubic-bezier(1.5, 0.5, 0.5, 0.5)",
8638       "cubic-bezier(0.5, 0.5, -0.5, 0.5)",
8639       "cubic-bezier(0.5, 0.5, 1.5, 0.5)",
8640       "steps(2, step-end)",
8641       "steps(0)",
8642       "steps(-2)",
8643       "steps(0, step-end, 1)",
8644       "steps(0, jump-start)",
8645       "steps(0, jump-end)",
8646       "steps(1, jump-none)",
8647       "steps(0, jump-both)",
8648     ],
8649   },
8650   "unicode-bidi": {
8651     domProp: "unicodeBidi",
8652     inherited: false,
8653     type: CSS_TYPE_LONGHAND,
8654     applies_to_marker: true,
8655     initial_values: ["normal"],
8656     other_values: [
8657       "embed",
8658       "bidi-override",
8659       "isolate",
8660       "plaintext",
8661       "isolate-override",
8662     ],
8663     invalid_values: [
8664       "auto",
8665       "none",
8666       "-moz-isolate",
8667       "-moz-plaintext",
8668       "-moz-isolate-override",
8669     ],
8670   },
8671   "vertical-align": {
8672     domProp: "verticalAlign",
8673     inherited: false,
8674     type: CSS_TYPE_LONGHAND,
8675     applies_to_first_letter: true,
8676     applies_to_first_line: true,
8677     applies_to_placeholder: true,
8678     initial_values: ["baseline"],
8679     other_values: [
8680       "sub",
8681       "super",
8682       "top",
8683       "text-top",
8684       "middle",
8685       "bottom",
8686       "text-bottom",
8687       "-moz-middle-with-baseline",
8688       "15%",
8689       "3px",
8690       "0.2em",
8691       "-5px",
8692       "-3%",
8693       "calc(2px)",
8694       "calc(-2px)",
8695       "calc(50%)",
8696       "calc(3*25px)",
8697       "calc(25px*3)",
8698       "calc(3*25px + 50%)",
8699     ],
8700     invalid_values: [],
8701     quirks_values: { 5: "5px" },
8702   },
8703   "baseline-source": {
8704     domProp: "baselineSource",
8705     inherited: false,
8706     type: CSS_TYPE_LONGHAND,
8707     applies_to_first_letter: true,
8708     applies_to_first_line: true,
8709     applies_to_placeholder: true,
8710     initial_values: ["auto"],
8711     other_values: ["first", "last"],
8712     invalid_values: [],
8713   },
8714   visibility: {
8715     domProp: "visibility",
8716     inherited: true,
8717     type: CSS_TYPE_LONGHAND,
8718     applies_to_cue: true,
8719     initial_values: ["visible"],
8720     other_values: ["hidden", "collapse"],
8721     invalid_values: [],
8722   },
8723   "white-space": {
8724     domProp: "whiteSpace",
8725     inherited: true,
8726     type: CSS_TYPE_TRUE_SHORTHAND,
8727     subproperties: ["white-space-collapse", "text-wrap-mode"],
8728     applies_to_placeholder: true,
8729     applies_to_cue: true,
8730     applies_to_marker: true,
8731     initial_values: ["normal"],
8732     other_values: [
8733       "pre",
8734       "nowrap",
8735       "pre-wrap",
8736       "pre-line",
8737       "-moz-pre-space",
8738       "break-spaces",
8739     ],
8740     invalid_values: [],
8741   },
8742   "white-space-collapse": {
8743     domProp: "whiteSpaceCollapse",
8744     inherited: true,
8745     type: CSS_TYPE_LONGHAND,
8746     applies_to_placeholder: true,
8747     applies_to_cue: true,
8748     applies_to_marker: true,
8749     initial_values: ["collapse"],
8750     other_values: [
8751       "preserve",
8752       "preserve-breaks",
8753       "preserve-spaces",
8754       "break-spaces",
8755     ],
8756     invalid_values: ["normal", "auto"],
8757   },
8758   width: {
8759     domProp: "width",
8760     inherited: false,
8761     type: CSS_TYPE_LONGHAND,
8762     prerequisites: {
8763       // computed value tests for width test more with display:block
8764       display: "block",
8765       // add some margin to avoid the initial "auto" value getting
8766       // resolved to the same length as the parent element.
8767       "margin-left": "5px",
8768     },
8769     initial_values: [" auto"],
8770     /* XXX these have prerequisites */
8771     other_values: [
8772       "15px",
8773       "3em",
8774       "15%",
8775       // these three keywords compute to the initial value only when the
8776       // writing mode is vertical, and we're testing with a horizontal
8777       // writing mode
8778       "max-content",
8779       "min-content",
8780       "fit-content",
8781       "-moz-fit-content",
8782       // these two keywords are the aliases of above first two.
8783       "-moz-max-content",
8784       "-moz-min-content",
8785       // whether -moz-available computes to the initial value depends on
8786       // the container size, and for the container size we're testing
8787       // with, it does
8788       // "-moz-available",
8789       "3e1px",
8790       "3e+1px",
8791       "3e0px",
8792       "3e+0px",
8793       "3e-0px",
8794       "3e-1px",
8795       "3.2e1px",
8796       "3.2e+1px",
8797       "3.2e0px",
8798       "3.2e+0px",
8799       "3.2e-0px",
8800       "3.2e-1px",
8801       "3e1%",
8802       "3e+1%",
8803       "3e0%",
8804       "3e+0%",
8805       "3e-0%",
8806       "3e-1%",
8807       "3.2e1%",
8808       "3.2e+1%",
8809       "3.2e0%",
8810       "3.2e+0%",
8811       "3.2e-0%",
8812       "3.2e-1%",
8813       /* valid calc() values */
8814       "calc(-2px)",
8815       "calc(2px)",
8816       "calc(50%)",
8817       "calc(50% + 2px)",
8818       "calc( 50% + 2px)",
8819       "calc(50% + 2px )",
8820       "calc( 50% + 2px )",
8821       "calc(50% - -2px)",
8822       "calc(2px - -50%)",
8823       "calc(3*25px)",
8824       "calc(3 *25px)",
8825       "calc(3 * 25px)",
8826       "calc(3* 25px)",
8827       "calc(25px*3)",
8828       "calc(25px *3)",
8829       "calc(25px* 3)",
8830       "calc(25px * 3)",
8831       "calc(3*25px + 50%)",
8832       "calc(50% - 3em + 2px)",
8833       "calc(50% - (3em + 2px))",
8834       "calc((50% - 3em) + 2px)",
8835       "calc(2em)",
8836       "calc(50%)",
8837       "calc(50px/2)",
8838       "calc(50px/(2 - 1))",
8839       "calc(min(5px))",
8840       "calc(min(5px,2em))",
8841       "calc(max(5px))",
8842       "calc(max(5px,2em))",
8843       "min(5px)",
8844       "min(5px,2em)",
8845       "max(5px)",
8846       "max(5px,2em)",
8847       "fit-content(100px)",
8848       "fit-content(10%)",
8849       "fit-content(calc(3*25px + 50%))",
8850     ],
8851     invalid_values: [
8852       "none",
8853       "-2px",
8854       "content" /* (valid for 'flex-basis' but not 'width') */,
8855       /* invalid calc() values */
8856       "calc(50%+ 2px)",
8857       "calc(50% +2px)",
8858       "calc(50%+2px)",
8859       "-moz-min()",
8860       "calc(min())",
8861       "-moz-max()",
8862       "calc(max())",
8863       "-moz-min(5px)",
8864       "-moz-max(5px)",
8865       "-moz-min(5px,2em)",
8866       "-moz-max(5px,2em)",
8867       /* If we ever support division by values, which is
8868        * complicated for the reasons described in
8869        * http://lists.w3.org/Archives/Public/www-style/2010Jan/0007.html
8870        * , we should support all 4 of these as described in
8871        * http://lists.w3.org/Archives/Public/www-style/2009Dec/0296.html
8872        */
8873       "calc((3em / 100%) * 3em)",
8874       "calc(3em / 100% * 3em)",
8875       "calc(3em * (3em / 100%))",
8876       "calc(3em * 3em / 100%)",
8877     ],
8878     quirks_values: { 5: "5px" },
8879   },
8880   "will-change": {
8881     domProp: "willChange",
8882     inherited: false,
8883     type: CSS_TYPE_LONGHAND,
8884     initial_values: ["auto"],
8885     other_values: [
8886       "scroll-position",
8887       "contents",
8888       "transform",
8889       "opacity",
8890       "scroll-position, transform",
8891       "transform, opacity",
8892       "contents, transform",
8893       "property-that-doesnt-exist-yet",
8894     ],
8895     invalid_values: [
8896       "none",
8897       "all",
8898       "default",
8899       "auto, scroll-position",
8900       "scroll-position, auto",
8901       "transform scroll-position",
8902       ",",
8903       "trailing,",
8904       "will-change",
8905       "transform, will-change",
8906     ],
8907   },
8908   "word-break": {
8909     domProp: "wordBreak",
8910     inherited: true,
8911     type: CSS_TYPE_LONGHAND,
8912     initial_values: ["normal"],
8913     other_values: ["break-all", "keep-all"],
8914     invalid_values: [],
8915   },
8916   "word-spacing": {
8917     domProp: "wordSpacing",
8918     inherited: true,
8919     type: CSS_TYPE_LONGHAND,
8920     applies_to_first_letter: true,
8921     applies_to_first_line: true,
8922     applies_to_placeholder: true,
8923     initial_values: ["normal", "0", "0px", "-0em", "calc(-0px)", "calc(0em)"],
8924     other_values: [
8925       "1em",
8926       "2px",
8927       "-3px",
8928       "0%",
8929       "50%",
8930       "-120%",
8931       "calc(1em)",
8932       "calc(1em + 3px)",
8933       "calc(15px / 2)",
8934       "calc(15px/2)",
8935       "calc(-2em)",
8936       "calc(0% + 0px)",
8937       "calc(-10%/2 - 1em)",
8938     ],
8939     invalid_values: [],
8940     quirks_values: { 5: "5px" },
8941   },
8942   "overflow-wrap": {
8943     domProp: "overflowWrap",
8944     inherited: true,
8945     type: CSS_TYPE_LONGHAND,
8946     initial_values: ["normal"],
8947     other_values: ["break-word"],
8948     invalid_values: [],
8949   },
8950   hyphens: {
8951     domProp: "hyphens",
8952     inherited: true,
8953     type: CSS_TYPE_LONGHAND,
8954     initial_values: ["manual"],
8955     other_values: ["none", "auto"],
8956     invalid_values: [],
8957   },
8958   "z-index": {
8959     domProp: "zIndex",
8960     inherited: false,
8961     type: CSS_TYPE_LONGHAND,
8962     /* XXX requires position */
8963     initial_values: ["auto"],
8964     other_values: ["0", "3", "-7000", "12000"],
8965     invalid_values: ["3.0", "17.5", "3e1"],
8966   },
8967   "clip-path": {
8968     domProp: "clipPath",
8969     inherited: false,
8970     type: CSS_TYPE_LONGHAND,
8971     initial_values: ["none"],
8972     other_values: [
8973       "path(nonzero, 'M 10 10 h 100 v 100 h-100 v-100 z')",
8974       "path(evenodd, 'M 10 10 h 100 v 100 h-100 v-100 z')",
8975       "path('M10,30A20,20 0,0,1 50,30A20,20 0,0,1 90,30Q90,60 50,90Q10,60 10,30z')",
8976       "url(#mypath)",
8977       "url('404.svg#mypath')",
8978       "url(#my-clip-path)",
8979       "margin-box",
8980     ]
8981       .concat(basicShapeSVGBoxValues)
8982       .concat(basicShapeOtherValues)
8983       .concat(basicShapeOtherValuesWithFillRule)
8984       .concat(basicShapeXywhRectValues)
8985       .concat(basicShapeShapeValues)
8986       .concat(basicShapeShapeValuesWithFillRule),
8987     invalid_values: [
8988       "path(nonzero)",
8989       "path(abs, 'M 10 10 L 10 10 z')",
8990       "path(evenodd, '')",
8991       "path('')",
8992     ].concat(basicShapeInvalidValues),
8993     unbalanced_values: basicShapeUnbalancedValues,
8994   },
8995   "clip-rule": {
8996     domProp: "clipRule",
8997     inherited: true,
8998     type: CSS_TYPE_LONGHAND,
8999     initial_values: ["nonzero"],
9000     other_values: ["evenodd"],
9001     invalid_values: [],
9002   },
9003   "color-interpolation": {
9004     domProp: "colorInterpolation",
9005     inherited: true,
9006     type: CSS_TYPE_LONGHAND,
9007     initial_values: ["sRGB"],
9008     other_values: ["auto", "linearRGB"],
9009     invalid_values: [],
9010   },
9011   "color-interpolation-filters": {
9012     domProp: "colorInterpolationFilters",
9013     inherited: true,
9014     type: CSS_TYPE_LONGHAND,
9015     initial_values: ["linearRGB"],
9016     other_values: ["sRGB", "auto"],
9017     invalid_values: [],
9018   },
9019   "dominant-baseline": {
9020     domProp: "dominantBaseline",
9021     inherited: true,
9022     type: CSS_TYPE_LONGHAND,
9023     initial_values: ["auto"],
9024     other_values: [
9025       "ideographic",
9026       "alphabetic",
9027       "hanging",
9028       "mathematical",
9029       "central",
9030       "middle",
9031       "text-after-edge",
9032       "text-before-edge",
9033     ],
9034     invalid_values: [],
9035   },
9036   fill: {
9037     domProp: "fill",
9038     inherited: true,
9039     type: CSS_TYPE_LONGHAND,
9040     applies_to_first_letter: true,
9041     applies_to_first_line: true,
9042     prerequisites: { color: "blue" },
9043     initial_values: ["black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)"],
9044     other_values: [
9045       "green",
9046       "#fc3",
9047       "url('#myserver')",
9048       "url(foo.svg#myserver)",
9049       'url("#myserver") green',
9050       "none",
9051       "currentColor",
9052       "context-fill",
9053       "context-stroke",
9054     ],
9055     invalid_values: ["000000", "ff00ff", "url('#myserver') rgb(0, rubbish, 0)"],
9056   },
9057   "fill-opacity": {
9058     domProp: "fillOpacity",
9059     inherited: true,
9060     type: CSS_TYPE_LONGHAND,
9061     applies_to_first_letter: true,
9062     applies_to_first_line: true,
9063     initial_values: ["1", "2.8", "1.000", "300%"],
9064     other_values: [
9065       "0",
9066       "0.3",
9067       "-7.3",
9068       "-100%",
9069       "50%",
9070       "context-fill-opacity",
9071       "context-stroke-opacity",
9072     ],
9073     invalid_values: [],
9074   },
9075   "fill-rule": {
9076     domProp: "fillRule",
9077     inherited: true,
9078     type: CSS_TYPE_LONGHAND,
9079     applies_to_first_letter: true,
9080     applies_to_first_line: true,
9081     initial_values: ["nonzero"],
9082     other_values: ["evenodd"],
9083     invalid_values: [],
9084   },
9085   filter: {
9086     domProp: "filter",
9087     inherited: false,
9088     type: CSS_TYPE_LONGHAND,
9089     initial_values: ["none"],
9090     other_values: [
9091       // SVG reference filters
9092       "url(#my-filter)",
9093       "url(#my-filter-1) url(#my-filter-2)",
9095       // Filter functions
9096       "opacity(50%) saturate(1.0)",
9097       "invert(50%) sepia(0.1) brightness(90%)",
9099       // Mixed SVG reference filters and filter functions
9100       "grayscale(1) url(#my-filter-1)",
9101       "url(#my-filter-1) brightness(50%) contrast(0.9)",
9103       // Bad URLs
9104       "url('badscheme:badurl')",
9105       "blur(3px) url('badscheme:badurl') grayscale(50%)",
9107       "blur()",
9108       "blur(0)",
9109       "blur(0px)",
9110       "blur(0.5px)",
9111       "blur(3px)",
9112       "blur(100px)",
9113       "blur(0.1em)",
9114       "blur(calc(-1px))", // Parses and becomes blur(0px).
9115       "blur(calc(0px))",
9116       "blur(calc(5px))",
9117       "blur(calc(2 * 5px))",
9119       "brightness()",
9120       "brightness(0)",
9121       "brightness(50%)",
9122       "brightness(1)",
9123       "brightness(1.0)",
9124       "brightness(2)",
9125       "brightness(350%)",
9126       "brightness(4.567)",
9128       "contrast()",
9129       "contrast(0)",
9130       "contrast(50%)",
9131       "contrast(1)",
9132       "contrast(1.0)",
9133       "contrast(2)",
9134       "contrast(350%)",
9135       "contrast(4.567)",
9137       "drop-shadow(2px 2px)",
9138       "drop-shadow(2px 2px 1px)",
9139       "drop-shadow(2px 2px green)",
9140       "drop-shadow(2px 2px 1px green)",
9141       "drop-shadow(green 2px 2px)",
9142       "drop-shadow(green 2px 2px 1px)",
9143       "drop-shadow(currentColor 3px 3px)",
9144       "drop-shadow(2px 2px calc(-5px))" /* clamped */,
9145       "drop-shadow(calc(3em - 2px) 2px green)",
9146       "drop-shadow(green calc(3em - 2px) 2px)",
9147       "drop-shadow(2px calc(2px + 0.2em))",
9148       "drop-shadow(blue 2px calc(2px + 0.2em))",
9149       "drop-shadow(2px calc(2px + 0.2em) blue)",
9150       "drop-shadow(calc(-2px) calc(-2px))",
9151       "drop-shadow(-2px -2px)",
9152       "drop-shadow(calc(2px) calc(2px))",
9153       "drop-shadow(calc(2px) calc(2px) calc(2px))",
9155       "grayscale()",
9156       "grayscale(0)",
9157       "grayscale(50%)",
9158       "grayscale(1)",
9159       "grayscale(1.0)",
9160       "grayscale(2)",
9161       "grayscale(350%)",
9162       "grayscale(4.567)",
9164       "hue-rotate()",
9165       "hue-rotate(0)",
9166       "hue-rotate(0deg)",
9167       "hue-rotate(90deg)",
9168       "hue-rotate(540deg)",
9169       "hue-rotate(-90deg)",
9170       "hue-rotate(10grad)",
9171       "hue-rotate(1.6rad)",
9172       "hue-rotate(-1.6rad)",
9173       "hue-rotate(0.5turn)",
9174       "hue-rotate(-2turn)",
9176       "invert()",
9177       "invert(0)",
9178       "invert(50%)",
9179       "invert(1)",
9180       "invert(1.0)",
9181       "invert(2)",
9182       "invert(350%)",
9183       "invert(4.567)",
9185       "opacity()",
9186       "opacity(0)",
9187       "opacity(50%)",
9188       "opacity(1)",
9189       "opacity(1.0)",
9190       "opacity(2)",
9191       "opacity(350%)",
9192       "opacity(4.567)",
9194       "saturate()",
9195       "saturate(0)",
9196       "saturate(50%)",
9197       "saturate(1)",
9198       "saturate(1.0)",
9199       "saturate(2)",
9200       "saturate(350%)",
9201       "saturate(4.567)",
9203       "sepia()",
9204       "sepia(0)",
9205       "sepia(50%)",
9206       "sepia(1)",
9207       "sepia(1.0)",
9208       "sepia(2)",
9209       "sepia(350%)",
9210       "sepia(4.567)",
9211     ],
9212     invalid_values: [
9213       // none
9214       "none none",
9215       "url(#my-filter) none",
9216       "none url(#my-filter)",
9217       "blur(2px) none url(#my-filter)",
9219       // Nested filters
9220       "grayscale(invert(1.0))",
9222       // Comma delimited filters
9223       "url(#my-filter),",
9224       "invert(50%), url(#my-filter), brightness(90%)",
9226       // Test the following situations for each filter function:
9227       // - Invalid number of arguments
9228       // - Comma delimited arguments
9229       // - Wrong argument type
9230       // - Argument value out of range
9231       "blur(3px 5px)",
9232       "blur(3px,)",
9233       "blur(3px, 5px)",
9234       "blur(#my-filter)",
9235       "blur(0.5)",
9236       "blur(50%)",
9237       "blur(calc(0))", // Unitless zero in calc is not a valid length.
9238       "blur(calc(0.1))",
9239       "blur(calc(10%))",
9240       "blur(calc(20px - 5%))",
9241       "blur(-3px)",
9243       "brightness(0.5 0.5)",
9244       "brightness(0.5,)",
9245       "brightness(0.5, 0.5)",
9246       "brightness(#my-filter)",
9247       "brightness(10px)",
9248       "brightness(-1)",
9250       "contrast(0.5 0.5)",
9251       "contrast(0.5,)",
9252       "contrast(0.5, 0.5)",
9253       "contrast(#my-filter)",
9254       "contrast(10px)",
9255       "contrast(-1)",
9257       "drop-shadow()",
9258       "drop-shadow(3% 3%)",
9259       "drop-shadow(2px 2px -5px)",
9260       "drop-shadow(2px 2px 2px 2px)",
9261       "drop-shadow(2px 2px, none)",
9262       "drop-shadow(none, 2px 2px)",
9263       "drop-shadow(inherit, 2px 2px)",
9264       "drop-shadow(2px 2px, inherit)",
9265       "drop-shadow(2 2px)",
9266       "drop-shadow(2px 2)",
9267       "drop-shadow(2px 2px 2)",
9268       "drop-shadow(2px 2px 2px 2)",
9269       "drop-shadow(calc(2px) calc(2px) calc(2px) calc(2px))",
9270       "drop-shadow(green 2px 2px, blue 1px 3px 4px)",
9271       "drop-shadow(blue 2px 2px, currentColor 1px 2px)",
9272       "drop-shadow(unset, 2px 2px)",
9273       "drop-shadow(2px 2px, unset)",
9275       "grayscale(0.5 0.5)",
9276       "grayscale(0.5,)",
9277       "grayscale(0.5, 0.5)",
9278       "grayscale(#my-filter)",
9279       "grayscale(10px)",
9280       "grayscale(-1)",
9282       "hue-rotate(0.5 0.5)",
9283       "hue-rotate(0.5,)",
9284       "hue-rotate(0.5, 0.5)",
9285       "hue-rotate(#my-filter)",
9286       "hue-rotate(10px)",
9287       "hue-rotate(-1)",
9288       "hue-rotate(45deg,)",
9290       "invert(0.5 0.5)",
9291       "invert(0.5,)",
9292       "invert(0.5, 0.5)",
9293       "invert(#my-filter)",
9294       "invert(10px)",
9295       "invert(-1)",
9297       "opacity(0.5 0.5)",
9298       "opacity(0.5,)",
9299       "opacity(0.5, 0.5)",
9300       "opacity(#my-filter)",
9301       "opacity(10px)",
9302       "opacity(-1)",
9304       "saturate(0.5 0.5)",
9305       "saturate(0.5,)",
9306       "saturate(0.5, 0.5)",
9307       "saturate(#my-filter)",
9308       "saturate(10px)",
9309       "saturate(-1)",
9311       "sepia(0.5 0.5)",
9312       "sepia(0.5,)",
9313       "sepia(0.5, 0.5)",
9314       "sepia(#my-filter)",
9315       "sepia(10px)",
9316       "sepia(-1)",
9317     ],
9318   },
9319   "flood-color": {
9320     domProp: "floodColor",
9321     inherited: false,
9322     type: CSS_TYPE_LONGHAND,
9323     prerequisites: { color: "blue" },
9324     initial_values: ["black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)"],
9325     other_values: ["green", "#fc3", "currentColor"],
9326     invalid_values: [
9327       "url('#myserver')",
9328       "url(foo.svg#myserver)",
9329       'url("#myserver") green',
9330       "000000",
9331       "ff00ff",
9332     ],
9333   },
9334   "flood-opacity": {
9335     domProp: "floodOpacity",
9336     inherited: false,
9337     type: CSS_TYPE_LONGHAND,
9338     initial_values: ["1", "2.8", "1.000", "300%"],
9339     other_values: ["0", "0.3", "-7.3", "-100%", "50%"],
9340     invalid_values: [],
9341   },
9342   "image-orientation": {
9343     domProp: "imageOrientation",
9344     inherited: true,
9345     type: CSS_TYPE_LONGHAND,
9346     initial_values: ["from-image"],
9347     other_values: ["none"],
9348     invalid_values: ["0", "0deg"],
9349   },
9350   "image-rendering": {
9351     domProp: "imageRendering",
9352     inherited: true,
9353     type: CSS_TYPE_LONGHAND,
9354     initial_values: ["auto"],
9355     other_values: [
9356       "optimizeSpeed",
9357       "optimizeQuality",
9358       "-moz-crisp-edges",
9359       "crisp-edges",
9360       "smooth",
9361       "pixelated",
9362     ],
9363     invalid_values: [],
9364   },
9365   isolation: {
9366     domProp: "isolation",
9367     inherited: false,
9368     type: CSS_TYPE_LONGHAND,
9369     initial_values: ["auto"],
9370     other_values: ["isolate"],
9371     invalid_values: [],
9372   },
9373   "lighting-color": {
9374     domProp: "lightingColor",
9375     inherited: false,
9376     type: CSS_TYPE_LONGHAND,
9377     prerequisites: { color: "blue" },
9378     initial_values: [
9379       "white",
9380       "#fff",
9381       "#ffffff",
9382       "rgb(255,255,255)",
9383       "rgba(255,255,255,1.0)",
9384       "rgba(255,255,255,42.0)",
9385     ],
9386     other_values: ["green", "#fc3", "currentColor"],
9387     invalid_values: [
9388       "url('#myserver')",
9389       "url(foo.svg#myserver)",
9390       'url("#myserver") green',
9391       "000000",
9392       "ff00ff",
9393     ],
9394   },
9395   marker: {
9396     domProp: "marker",
9397     inherited: true,
9398     type: CSS_TYPE_TRUE_SHORTHAND,
9399     subproperties: ["marker-start", "marker-mid", "marker-end"],
9400     initial_values: ["none"],
9401     other_values: ["url(#mysym)"],
9402     invalid_values: [
9403       "none none",
9404       "url(#mysym) url(#mysym)",
9405       "none url(#mysym)",
9406       "url(#mysym) none",
9407     ],
9408   },
9409   "marker-end": {
9410     domProp: "markerEnd",
9411     inherited: true,
9412     type: CSS_TYPE_LONGHAND,
9413     initial_values: ["none"],
9414     other_values: ["url(#mysym)"],
9415     invalid_values: [],
9416   },
9417   "marker-mid": {
9418     domProp: "markerMid",
9419     inherited: true,
9420     type: CSS_TYPE_LONGHAND,
9421     initial_values: ["none"],
9422     other_values: ["url(#mysym)"],
9423     invalid_values: [],
9424   },
9425   "marker-start": {
9426     domProp: "markerStart",
9427     inherited: true,
9428     type: CSS_TYPE_LONGHAND,
9429     initial_values: ["none"],
9430     other_values: ["url(#mysym)"],
9431     invalid_values: [],
9432   },
9433   "mix-blend-mode": {
9434     domProp: "mixBlendMode",
9435     inherited: false,
9436     type: CSS_TYPE_LONGHAND,
9437     initial_values: ["normal"],
9438     other_values: [
9439       "multiply",
9440       "screen",
9441       "overlay",
9442       "darken",
9443       "lighten",
9444       "color-dodge",
9445       "color-burn",
9446       "hard-light",
9447       "soft-light",
9448       "difference",
9449       "exclusion",
9450       "hue",
9451       "saturation",
9452       "color",
9453       "luminosity",
9454       "plus-lighter",
9455     ],
9456     invalid_values: [],
9457   },
9458   "shape-image-threshold": {
9459     domProp: "shapeImageThreshold",
9460     inherited: false,
9461     type: CSS_TYPE_LONGHAND,
9462     applies_to_first_letter: true,
9463     initial_values: ["0", "0.0000", "-3", "0%", "-100%"],
9464     other_values: [
9465       "0.4",
9466       "1",
9467       "17",
9468       "397.376",
9469       "3e1",
9470       "3e+1",
9471       "3e-1",
9472       "3e0",
9473       "3e+0",
9474       "3e-0",
9475       "50%",
9476       "300%",
9477     ],
9478     invalid_values: ["0px", "1px", "default", "auto"],
9479   },
9480   "shape-margin": {
9481     domProp: "shapeMargin",
9482     inherited: false,
9483     type: CSS_TYPE_LONGHAND,
9484     applies_to_first_letter: true,
9485     initial_values: ["0"],
9486     other_values: ["2px", "2%", "1em", "calc(1px + 1em)", "calc(1%)"],
9487     invalid_values: ["-1px", "auto", "none", "1px 1px", "-1%"],
9488   },
9489   "shape-outside": {
9490     domProp: "shapeOutside",
9491     inherited: false,
9492     type: CSS_TYPE_LONGHAND,
9493     applies_to_first_letter: true,
9494     initial_values: ["none"],
9495     other_values: ["url(#my-shape-outside)", "margin-box"].concat(
9496       basicShapeOtherValues,
9497       basicShapeOtherValuesWithFillRule,
9498       validNonUrlImageValues
9499     ),
9500     invalid_values: [].concat(
9501       basicShapeSVGBoxValues,
9502       basicShapeInvalidValues,
9503       invalidNonUrlImageValues
9504     ),
9505     unbalanced_values: [].concat(
9506       basicShapeUnbalancedValues,
9507       unbalancedGradientAndElementValues
9508     ),
9509   },
9510   "shape-rendering": {
9511     domProp: "shapeRendering",
9512     inherited: true,
9513     type: CSS_TYPE_LONGHAND,
9514     initial_values: ["auto"],
9515     other_values: ["optimizeSpeed", "crispEdges", "geometricPrecision"],
9516     invalid_values: [],
9517   },
9518   "stop-color": {
9519     domProp: "stopColor",
9520     inherited: false,
9521     type: CSS_TYPE_LONGHAND,
9522     prerequisites: { color: "blue" },
9523     initial_values: ["black", "#000", "#000000", "rgb(0,0,0)", "rgba(0,0,0,1)"],
9524     other_values: ["green", "#fc3", "currentColor"],
9525     invalid_values: [
9526       "url('#myserver')",
9527       "url(foo.svg#myserver)",
9528       'url("#myserver") green',
9529       "000000",
9530       "ff00ff",
9531     ],
9532   },
9533   "stop-opacity": {
9534     domProp: "stopOpacity",
9535     inherited: false,
9536     type: CSS_TYPE_LONGHAND,
9537     initial_values: ["1", "2.8", "1.000", "300%"],
9538     other_values: ["0", "0.3", "-7.3", "-100%", "50%"],
9539     invalid_values: [],
9540   },
9541   stroke: {
9542     domProp: "stroke",
9543     inherited: true,
9544     type: CSS_TYPE_LONGHAND,
9545     applies_to_first_letter: true,
9546     applies_to_first_line: true,
9547     initial_values: ["none"],
9548     other_values: [
9549       "black",
9550       "#000",
9551       "#000000",
9552       "rgb(0,0,0)",
9553       "rgba(0,0,0,1)",
9554       "green",
9555       "#fc3",
9556       "url('#myserver')",
9557       "url(foo.svg#myserver)",
9558       'url("#myserver") green',
9559       "currentColor",
9560       "context-fill",
9561       "context-stroke",
9562     ],
9563     invalid_values: ["000000", "ff00ff"],
9564   },
9565   "stroke-dasharray": {
9566     domProp: "strokeDasharray",
9567     inherited: true,
9568     type: CSS_TYPE_LONGHAND,
9569     applies_to_first_letter: true,
9570     applies_to_first_line: true,
9571     initial_values: ["none"],
9572     other_values: [
9573       "5px,3px,2px",
9574       "5px 3px 2px",
9575       "  5px ,3px\t, 2px ",
9576       "1px",
9577       "5%",
9578       "3em",
9579       "0.0002",
9580       "context-value",
9581     ],
9582     invalid_values: ["-5px,3px,2px", "5px,3px,-2px"],
9583   },
9584   "stroke-dashoffset": {
9585     domProp: "strokeDashoffset",
9586     inherited: true,
9587     applies_to_first_letter: true,
9588     applies_to_first_line: true,
9589     type: CSS_TYPE_LONGHAND,
9590     initial_values: ["0", "-0px", "0em"],
9591     other_values: ["3px", "3%", "1em", "0.0002", "context-value"],
9592     invalid_values: [],
9593   },
9594   "stroke-linecap": {
9595     domProp: "strokeLinecap",
9596     inherited: true,
9597     type: CSS_TYPE_LONGHAND,
9598     applies_to_first_letter: true,
9599     applies_to_first_line: true,
9600     initial_values: ["butt"],
9601     other_values: ["round", "square"],
9602     invalid_values: [],
9603   },
9604   "stroke-linejoin": {
9605     domProp: "strokeLinejoin",
9606     inherited: true,
9607     type: CSS_TYPE_LONGHAND,
9608     applies_to_first_letter: true,
9609     applies_to_first_line: true,
9610     initial_values: ["miter"],
9611     other_values: ["round", "bevel"],
9612     invalid_values: [],
9613   },
9614   "stroke-miterlimit": {
9615     domProp: "strokeMiterlimit",
9616     inherited: true,
9617     type: CSS_TYPE_LONGHAND,
9618     applies_to_first_letter: true,
9619     applies_to_first_line: true,
9620     initial_values: ["4"],
9621     other_values: ["0", "0.9", "1", "7", "5000", "1.1"],
9622     invalid_values: ["-1", "3px", "-0.3"],
9623   },
9624   "stroke-opacity": {
9625     domProp: "strokeOpacity",
9626     inherited: true,
9627     type: CSS_TYPE_LONGHAND,
9628     applies_to_first_letter: true,
9629     applies_to_first_line: true,
9630     initial_values: ["1", "2.8", "1.000", "300%"],
9631     other_values: [
9632       "0",
9633       "0.3",
9634       "-7.3",
9635       "-100%",
9636       "50%",
9637       "context-fill-opacity",
9638       "context-stroke-opacity",
9639     ],
9640     invalid_values: [],
9641   },
9642   "stroke-width": {
9643     domProp: "strokeWidth",
9644     inherited: true,
9645     type: CSS_TYPE_LONGHAND,
9646     applies_to_first_letter: true,
9647     applies_to_first_line: true,
9648     initial_values: ["1px"],
9649     other_values: [
9650       "0",
9651       "0px",
9652       "-0em",
9653       "17px",
9654       "0.2em",
9655       "0.0002",
9656       "context-value",
9657     ],
9658     invalid_values: ["-0.1px", "-3px"],
9659   },
9660   x: {
9661     domProp: "x",
9662     inherited: false,
9663     type: CSS_TYPE_LONGHAND,
9664     initial_values: ["0px"],
9665     other_values: ["-1em", "17px", "0.2em", "23.4%"],
9666     invalid_values: ["auto", "context-value", "0.0002"],
9667   },
9668   y: {
9669     domProp: "y",
9670     inherited: false,
9671     type: CSS_TYPE_LONGHAND,
9672     initial_values: ["0px"],
9673     other_values: ["-1em", "17px", "0.2em", "23.4%"],
9674     invalid_values: ["auto", "context-value", "0.0002"],
9675   },
9676   cx: {
9677     domProp: "cx",
9678     inherited: false,
9679     type: CSS_TYPE_LONGHAND,
9680     initial_values: ["0px"],
9681     other_values: ["-1em", "17px", "0.2em", "23.4%"],
9682     invalid_values: ["auto", "context-value", "0.0002"],
9683   },
9684   cy: {
9685     domProp: "cy",
9686     inherited: false,
9687     type: CSS_TYPE_LONGHAND,
9688     initial_values: ["0px"],
9689     other_values: ["-1em", "17px", "0.2em", "23.4%"],
9690     invalid_values: ["auto", "context-value", "0.0002"],
9691   },
9692   r: {
9693     domProp: "r",
9694     inherited: false,
9695     type: CSS_TYPE_LONGHAND,
9696     initial_values: ["0px"],
9697     other_values: ["17px", "0.2em", "23.4%"],
9698     invalid_values: ["auto", "-1", "-1.5px", "0.0002"],
9699   },
9700   rx: {
9701     domProp: "rx",
9702     inherited: false,
9703     type: CSS_TYPE_LONGHAND,
9704     initial_values: ["auto"],
9705     other_values: ["17px", "0.2em", "23.4%"],
9706     invalid_values: ["hello", "-12px", "0.0002"],
9707   },
9708   ry: {
9709     domProp: "ry",
9710     inherited: false,
9711     type: CSS_TYPE_LONGHAND,
9712     initial_values: ["auto"],
9713     other_values: ["17px", "0.2em", "23.4%"],
9714     invalid_values: ["hello", "-1.3px", "0.0002"],
9715   },
9716   "text-anchor": {
9717     domProp: "textAnchor",
9718     inherited: true,
9719     type: CSS_TYPE_LONGHAND,
9720     initial_values: ["start"],
9721     other_values: ["middle", "end"],
9722     invalid_values: [],
9723   },
9724   "text-rendering": {
9725     domProp: "textRendering",
9726     inherited: true,
9727     type: CSS_TYPE_LONGHAND,
9728     applies_to_first_letter: true,
9729     applies_to_first_line: true,
9730     initial_values: ["auto"],
9731     other_values: ["optimizeSpeed", "optimizeLegibility", "geometricPrecision"],
9732     invalid_values: [],
9733   },
9734   "vector-effect": {
9735     domProp: "vectorEffect",
9736     inherited: false,
9737     type: CSS_TYPE_LONGHAND,
9738     applies_to_first_letter: true,
9739     applies_to_first_line: true,
9740     initial_values: ["none"],
9741     other_values: ["non-scaling-stroke"],
9742     invalid_values: [],
9743   },
9744   "-moz-window-dragging": {
9745     domProp: "MozWindowDragging",
9746     inherited: false,
9747     type: CSS_TYPE_LONGHAND,
9748     initial_values: ["default"],
9749     other_values: ["drag", "no-drag"],
9750     invalid_values: ["none"],
9751   },
9752   "accent-color": {
9753     domProp: "accentColor",
9754     inherited: true,
9755     type: CSS_TYPE_LONGHAND,
9756     prerequisites: { color: "black" },
9757     initial_values: ["auto"],
9758     other_values: [
9759       "currentcolor",
9760       "black",
9761       "green",
9762       "transparent",
9763       "rgba(128,128,128,.5)",
9764       "#123",
9765     ],
9766     invalid_values: ["#0", "#00", "#00000", "cc00ff"],
9767   },
9768   "align-content": {
9769     domProp: "alignContent",
9770     inherited: false,
9771     type: CSS_TYPE_LONGHAND,
9772     initial_values: ["normal"],
9773     other_values: [
9774       "start",
9775       "end",
9776       "flex-start",
9777       "flex-end",
9778       "center",
9779       "space-between",
9780       "space-around",
9781       "space-evenly",
9782       "first baseline",
9783       "last baseline",
9784       "baseline",
9785       "stretch",
9786       "safe start",
9787       "unsafe end",
9788       "safe end",
9789     ],
9790     invalid_values: [
9791       "none",
9792       "5",
9793       "self-end",
9794       "safe",
9795       "normal unsafe",
9796       "unsafe safe",
9797       "safe baseline",
9798       "baseline unsafe",
9799       "baseline end",
9800       "end normal",
9801       "safe end unsafe start",
9802       "safe end unsafe",
9803       "normal safe start",
9804       "unsafe end start",
9805       "end start safe",
9806       "space-between unsafe",
9807       "stretch safe",
9808       "auto",
9809       "first",
9810       "last",
9811       "left",
9812       "right",
9813     ],
9814   },
9815   "align-items": {
9816     domProp: "alignItems",
9817     inherited: false,
9818     type: CSS_TYPE_LONGHAND,
9819     initial_values: ["normal"],
9820     other_values: [
9821       "end",
9822       "flex-start",
9823       "flex-end",
9824       "self-start",
9825       "self-end",
9826       "center",
9827       "stretch",
9828       "first baseline",
9829       "last baseline",
9830       "baseline",
9831       "start",
9832       "unsafe center",
9833       "safe center",
9834     ],
9835     invalid_values: [
9836       "space-between",
9837       "abc",
9838       "5%",
9839       "legacy",
9840       "legacy end",
9841       "end legacy",
9842       "unsafe",
9843       "unsafe baseline",
9844       "normal unsafe",
9845       "safe left unsafe",
9846       "safe stretch",
9847       "end end",
9848       "auto",
9849       "left",
9850       "right",
9851     ],
9852   },
9853   "align-self": {
9854     domProp: "alignSelf",
9855     inherited: false,
9856     type: CSS_TYPE_LONGHAND,
9857     initial_values: ["auto"],
9858     other_values: [
9859       "normal",
9860       "start",
9861       "flex-start",
9862       "flex-end",
9863       "center",
9864       "stretch",
9865       "first baseline",
9866       "last baseline",
9867       "baseline",
9868       "unsafe center",
9869       "self-start",
9870       "safe self-end",
9871     ],
9872     invalid_values: [
9873       "space-between",
9874       "abc",
9875       "30px",
9876       "stretch safe",
9877       "safe",
9878       "left",
9879       "right",
9880     ],
9881   },
9882   "justify-content": {
9883     domProp: "justifyContent",
9884     inherited: false,
9885     type: CSS_TYPE_LONGHAND,
9886     initial_values: ["normal"],
9887     other_values: [
9888       "start",
9889       "end",
9890       "flex-start",
9891       "flex-end",
9892       "center",
9893       "left",
9894       "right",
9895       "space-between",
9896       "space-around",
9897       "space-evenly",
9898       "stretch",
9899       "safe start",
9900       "unsafe end",
9901       "safe end",
9902     ],
9903     invalid_values: [
9904       "30px",
9905       "5%",
9906       "self-end",
9907       "safe",
9908       "normal unsafe",
9909       "unsafe safe",
9910       "safe baseline",
9911       "baseline unsafe",
9912       "baseline end",
9913       "normal end",
9914       "safe end unsafe start",
9915       "safe end unsafe",
9916       "normal safe start",
9917       "unsafe end start",
9918       "end start safe",
9919       "space-around unsafe",
9920       "safe stretch",
9921       "auto",
9922       "first",
9923       "last",
9924     ],
9925   },
9926   "justify-items": {
9927     domProp: "justifyItems",
9928     inherited: false,
9929     type: CSS_TYPE_LONGHAND,
9930     initial_values: ["legacy", "normal"],
9931     other_values: [
9932       "end",
9933       "flex-start",
9934       "flex-end",
9935       "self-start",
9936       "self-end",
9937       "center",
9938       "left",
9939       "right",
9940       "stretch",
9941       "start",
9942       "legacy left",
9943       "right legacy",
9944       "legacy center",
9945       "unsafe right",
9946       "unsafe left",
9947       "safe right",
9948       "safe center",
9949     ],
9950     invalid_values: [
9951       "auto",
9952       "space-between",
9953       "abc",
9954       "30px",
9955       "legacy start",
9956       "end legacy",
9957       "legacy baseline",
9958       "legacy legacy",
9959       "unsafe",
9960       "safe legacy left",
9961       "legacy left safe",
9962       "legacy safe left",
9963       "safe left legacy",
9964       "legacy left legacy",
9965       "baseline unsafe",
9966       "safe unsafe",
9967       "safe left unsafe",
9968       "safe stretch",
9969       "last",
9970     ],
9971   },
9972   "justify-self": {
9973     domProp: "justifySelf",
9974     inherited: false,
9975     type: CSS_TYPE_LONGHAND,
9976     initial_values: ["auto"],
9977     other_values: [
9978       "normal",
9979       "start",
9980       "end",
9981       "flex-start",
9982       "flex-end",
9983       "self-start",
9984       "self-end",
9985       "center",
9986       "left",
9987       "right",
9988       "stretch",
9989       "unsafe left",
9990       "baseline",
9991       "last baseline",
9992       "first baseline",
9993       "unsafe right",
9994       "safe right",
9995       "safe center",
9996     ],
9997     invalid_values: [
9998       "space-between",
9999       "abc",
10000       "30px",
10001       "none",
10002       "first",
10003       "last",
10004       "legacy left",
10005       "right legacy",
10006       "baseline first",
10007       "baseline last",
10008     ],
10009   },
10010   "place-content": {
10011     domProp: "placeContent",
10012     inherited: false,
10013     type: CSS_TYPE_TRUE_SHORTHAND,
10014     subproperties: ["align-content", "justify-content"],
10015     initial_values: ["normal"],
10016     other_values: [
10017       "normal start",
10018       "baseline end",
10019       "end end",
10020       "space-between flex-end",
10021       "last baseline start",
10022       "space-evenly",
10023       "flex-start",
10024       "end",
10025       "unsafe start",
10026       "safe center",
10027       "baseline",
10028       "last baseline",
10029     ],
10030     invalid_values: [
10031       "none",
10032       "center safe",
10033       "right / end",
10034       "left",
10035       "right",
10036       "left left",
10037       "right right",
10038     ],
10039   },
10040   "place-items": {
10041     domProp: "placeItems",
10042     inherited: false,
10043     type: CSS_TYPE_TRUE_SHORTHAND,
10044     subproperties: ["align-items", "justify-items"],
10045     initial_values: ["normal"],
10046     other_values: [
10047       "normal center",
10048       "baseline end",
10049       "end legacy",
10050       "end",
10051       "flex-end left",
10052       "last baseline start",
10053       "stretch",
10054       "safe center",
10055       "end legacy left",
10056     ],
10057     invalid_values: [
10058       "space-between",
10059       "start space-evenly",
10060       "none",
10061       "end/end",
10062       "center safe",
10063       "auto start",
10064       "left",
10065       "right",
10066       "left left",
10067       "right right",
10068     ],
10069   },
10070   "place-self": {
10071     domProp: "placeSelf",
10072     inherited: false,
10073     type: CSS_TYPE_TRUE_SHORTHAND,
10074     subproperties: ["align-self", "justify-self"],
10075     initial_values: ["auto"],
10076     other_values: [
10077       "normal start",
10078       "first baseline end",
10079       "end auto",
10080       "end",
10081       "normal",
10082       "baseline start",
10083       "baseline",
10084       "start baseline",
10085       "self-end left",
10086       "last baseline start",
10087       "stretch",
10088     ],
10089     invalid_values: [
10090       "space-between",
10091       "start space-evenly",
10092       "none",
10093       "end safe",
10094       "auto legacy left",
10095       "legacy left",
10096       "auto/auto",
10097       "left",
10098       "right",
10099       "left left",
10100       "right right",
10101     ],
10102   },
10103   flex: {
10104     domProp: "flex",
10105     inherited: false,
10106     type: CSS_TYPE_TRUE_SHORTHAND,
10107     subproperties: ["flex-grow", "flex-shrink", "flex-basis"],
10108     initial_values: ["0 1 auto", "auto 0 1", "0 auto", "auto 0"],
10109     other_values: [
10110       "none",
10111       "1",
10112       "0",
10113       "0 1",
10114       "0.5",
10115       "1.2 3.4",
10116       "0 0 0",
10117       "0 0 0px",
10118       "0px 0 0",
10119       "5px 0 0",
10120       "2 auto",
10121       "auto 4",
10122       "auto 5.6 7.8",
10123       "max-content",
10124       "1 max-content",
10125       "1 2 max-content",
10126       "max-content 1",
10127       "max-content 1 2",
10128       "-0",
10129     ],
10130     invalid_values: [
10131       "1 2px 3",
10132       "1 auto 3",
10133       "1px 2 3px",
10134       "1px 2 3 4px",
10135       "-1",
10136       "1 -1",
10137       "0 1 calc(0px + rubbish)",
10138     ],
10139   },
10140   "flex-basis": {
10141     domProp: "flexBasis",
10142     inherited: false,
10143     type: CSS_TYPE_LONGHAND,
10144     initial_values: [" auto"],
10145     // NOTE: Besides "content", this is cribbed directly from the "width"
10146     // chunk, since this property takes the exact same values as width
10147     // (plus 'content' & with different semantics on 'auto').
10148     // XXXdholbert (Maybe these should get separated out into
10149     // a reusable array defined at the top of this file?)
10150     other_values: [
10151       "content",
10152       "15px",
10153       "3em",
10154       "15%",
10155       "max-content",
10156       "min-content",
10157       "fit-content",
10158       "-moz-max-content",
10159       "-moz-min-content",
10160       "-moz-fit-content",
10161       "-moz-available",
10162       // valid calc() values
10163       "calc(-2px)",
10164       "calc(2px)",
10165       "calc(50%)",
10166       "calc(50% + 2px)",
10167       "calc( 50% + 2px)",
10168       "calc(50% + 2px )",
10169       "calc( 50% + 2px )",
10170       "calc(50% - -2px)",
10171       "calc(2px - -50%)",
10172       "calc(3*25px)",
10173       "calc(3 *25px)",
10174       "calc(3 * 25px)",
10175       "calc(3* 25px)",
10176       "calc(25px*3)",
10177       "calc(25px *3)",
10178       "calc(25px* 3)",
10179       "calc(25px * 3)",
10180       "calc(3*25px + 50%)",
10181       "calc(50% - 3em + 2px)",
10182       "calc(50% - (3em + 2px))",
10183       "calc((50% - 3em) + 2px)",
10184       "calc(2em)",
10185       "calc(50%)",
10186       "calc(50px/2)",
10187       "calc(50px/(2 - 1))",
10188       "calc(min(5px))",
10189       "calc(min(5px,2em))",
10190       "calc(max(5px))",
10191       "calc(max(5px,2em))",
10192       "min(5px)",
10193       "min(5px,2em)",
10194       "max(5px)",
10195       "max(5px,2em)",
10196     ],
10197     invalid_values: [
10198       "none",
10199       "-2px",
10200       // invalid calc() values
10201       "calc(50%+ 2px)",
10202       "calc(50% +2px)",
10203       "calc(50%+2px)",
10204       "-moz-min()",
10205       "calc(min())",
10206       "-moz-max()",
10207       "calc(max())",
10208       "-moz-min(5px)",
10209       "-moz-max(5px)",
10210       "-moz-min(5px,2em)",
10211       "-moz-max(5px,2em)",
10212       // If we ever support division by values, which is
10213       // complicated for the reasons described in
10214       // http://lists.w3.org/Archives/Public/www-style/2010Jan/0007.html
10215       // , we should support all 4 of these as described in
10216       // http://lists.w3.org/Archives/Public/www-style/2009Dec/0296.html
10217       "calc((3em / 100%) * 3em)",
10218       "calc(3em / 100% * 3em)",
10219       "calc(3em * (3em / 100%))",
10220       "calc(3em * 3em / 100%)",
10221     ],
10222   },
10223   "flex-direction": {
10224     domProp: "flexDirection",
10225     inherited: false,
10226     type: CSS_TYPE_LONGHAND,
10227     initial_values: ["row"],
10228     other_values: ["row-reverse", "column", "column-reverse"],
10229     invalid_values: ["10px", "30%", "justify", "column wrap"],
10230   },
10231   "flex-flow": {
10232     domProp: "flexFlow",
10233     inherited: false,
10234     type: CSS_TYPE_TRUE_SHORTHAND,
10235     subproperties: ["flex-direction", "flex-wrap"],
10236     initial_values: ["row nowrap", "nowrap row", "row", "nowrap"],
10237     other_values: [
10238       // only specifying one property:
10239       "column",
10240       "wrap",
10241       "wrap-reverse",
10242       // specifying both properties, 'flex-direction' first:
10243       "row wrap",
10244       "row wrap-reverse",
10245       "column wrap",
10246       "column wrap-reverse",
10247       // specifying both properties, 'flex-wrap' first:
10248       "wrap row",
10249       "wrap column",
10250       "wrap-reverse row",
10251       "wrap-reverse column",
10252     ],
10253     invalid_values: [
10254       // specifying flex-direction twice (invalid):
10255       "row column",
10256       "row column nowrap",
10257       "row nowrap column",
10258       "nowrap row column",
10259       // specifying flex-wrap twice (invalid):
10260       "nowrap wrap-reverse",
10261       "nowrap wrap-reverse row",
10262       "nowrap row wrap-reverse",
10263       "row nowrap wrap-reverse",
10264       // Invalid data-type / invalid keyword type:
10265       "1px",
10266       "5%",
10267       "justify",
10268       "none",
10269     ],
10270   },
10271   "flex-grow": {
10272     domProp: "flexGrow",
10273     inherited: false,
10274     type: CSS_TYPE_LONGHAND,
10275     initial_values: ["0"],
10276     other_values: ["3", "1", "1.0", "2.5", "123"],
10277     invalid_values: ["0px", "-5", "1%", "3em", "stretch", "auto"],
10278   },
10279   "flex-shrink": {
10280     domProp: "flexShrink",
10281     inherited: false,
10282     type: CSS_TYPE_LONGHAND,
10283     initial_values: ["1"],
10284     other_values: ["3", "0", "0.0", "2.5", "123"],
10285     invalid_values: ["0px", "-5", "1%", "3em", "stretch", "auto"],
10286   },
10287   "flex-wrap": {
10288     domProp: "flexWrap",
10289     inherited: false,
10290     type: CSS_TYPE_LONGHAND,
10291     initial_values: ["nowrap"],
10292     other_values: ["wrap", "wrap-reverse"],
10293     invalid_values: ["10px", "30%", "justify", "column wrap", "auto"],
10294   },
10295   order: {
10296     domProp: "order",
10297     inherited: false,
10298     type: CSS_TYPE_LONGHAND,
10299     initial_values: ["0"],
10300     other_values: ["1", "99999", "-1", "-50"],
10301     invalid_values: ["0px", "1.0", "1.", "1%", "0.2", "3em", "stretch"],
10302   },
10304   // Aliases
10305   "word-wrap": {
10306     domProp: "wordWrap",
10307     inherited: true,
10308     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10309     alias_for: "overflow-wrap",
10310     subproperties: ["overflow-wrap"],
10311   },
10312   "-moz-tab-size": {
10313     domProp: "MozTabSize",
10314     inherited: true,
10315     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10316     alias_for: "tab-size",
10317     subproperties: ["tab-size"],
10318   },
10319   "-moz-border-image": {
10320     domProp: "MozBorderImage",
10321     inherited: false,
10322     type: CSS_TYPE_TRUE_SHORTHAND,
10323     alias_for: "border-image",
10324     subproperties: [
10325       "border-image-source",
10326       "border-image-slice",
10327       "border-image-width",
10328       "border-image-outset",
10329       "border-image-repeat",
10330     ],
10331   },
10332   "-moz-font-feature-settings": {
10333     domProp: "MozFontFeatureSettings",
10334     inherited: true,
10335     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10336     applies_to_first_letter: true,
10337     applies_to_first_line: true,
10338     applies_to_marker: true,
10339     applies_to_placeholder: true,
10340     applies_to_cue: true,
10341     alias_for: "font-feature-settings",
10342     subproperties: ["font-feature-settings"],
10343   },
10344   "-moz-font-language-override": {
10345     domProp: "MozFontLanguageOverride",
10346     inherited: true,
10347     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10348     applies_to_first_letter: true,
10349     applies_to_first_line: true,
10350     applies_to_marker: true,
10351     applies_to_placeholder: true,
10352     applies_to_cue: true,
10353     alias_for: "font-language-override",
10354     subproperties: ["font-language-override"],
10355   },
10356   "-moz-hyphens": {
10357     domProp: "MozHyphens",
10358     inherited: true,
10359     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10360     alias_for: "hyphens",
10361     subproperties: ["hyphens"],
10362   },
10363   // vertical text properties
10364   "writing-mode": {
10365     domProp: "writingMode",
10366     inherited: true,
10367     type: CSS_TYPE_LONGHAND,
10368     initial_values: ["horizontal-tb", "lr", "lr-tb", "rl", "rl-tb"],
10369     other_values: [
10370       "vertical-lr",
10371       "vertical-rl",
10372       "sideways-rl",
10373       "sideways-lr",
10374       "tb",
10375       "tb-rl",
10376     ],
10377     invalid_values: ["10px", "30%", "justify", "auto", "1em"],
10378   },
10379   "text-orientation": {
10380     domProp: "textOrientation",
10381     inherited: true,
10382     type: CSS_TYPE_LONGHAND,
10383     initial_values: ["mixed"],
10384     other_values: [
10385       "upright",
10386       "sideways",
10387       "sideways-right",
10388     ] /* sideways-right alias for backward compatibility */,
10389     invalid_values: [
10390       "none",
10391       "3em",
10392       "sideways-left",
10393     ] /* sideways-left removed from CSS Writing Modes */,
10394   },
10395   "block-size": {
10396     domProp: "blockSize",
10397     inherited: false,
10398     type: CSS_TYPE_LONGHAND,
10399     logical: true,
10400     axis: true,
10401     /* XXX testing auto has prerequisites */
10402     initial_values: ["auto"],
10403     prerequisites: { display: "block" },
10404     other_values: [
10405       "15px",
10406       "3em",
10407       "15%",
10408       // These keywords are treated as initial value.
10409       "max-content",
10410       "min-content",
10411       "fit-content",
10412       "-moz-fit-content",
10413       "-moz-available",
10414       "-moz-max-content",
10415       "-moz-min-content",
10416       "calc(2px)",
10417       "calc(50%)",
10418       "calc(3*25px)",
10419       "calc(25px*3)",
10420       "calc(3*25px + 50%)",
10421       "fit-content(100px)",
10422       "fit-content(10%)",
10423       "fit-content(calc(3*25px + 50%))",
10424     ],
10425     invalid_values: ["none"],
10426   },
10427   "border-block": {
10428     domProp: "borderBlock",
10429     inherited: false,
10430     type: CSS_TYPE_TRUE_SHORTHAND,
10431     subproperties: [
10432       "border-block-start-color",
10433       "border-block-start-style",
10434       "border-block-start-width",
10435       "border-block-end-color",
10436       "border-block-end-style",
10437       "border-block-end-width",
10438     ],
10439     initial_values: [
10440       "none",
10441       "medium",
10442       "currentColor",
10443       "thin",
10444       "none medium currentcolor",
10445     ],
10446     other_values: [
10447       "solid",
10448       "green",
10449       "medium solid",
10450       "green solid",
10451       "10px solid",
10452       "thick solid",
10453       "5px green none",
10454     ],
10455     invalid_values: ["5%", "5", "5 solid green"],
10456   },
10457   "border-block-end": {
10458     domProp: "borderBlockEnd",
10459     inherited: false,
10460     type: CSS_TYPE_TRUE_SHORTHAND,
10461     subproperties: [
10462       "border-block-end-color",
10463       "border-block-end-style",
10464       "border-block-end-width",
10465     ],
10466     initial_values: [
10467       "none",
10468       "medium",
10469       "currentColor",
10470       "thin",
10471       "none medium currentcolor",
10472     ],
10473     other_values: [
10474       "solid",
10475       "green",
10476       "medium solid",
10477       "green solid",
10478       "10px solid",
10479       "thick solid",
10480       "5px green none",
10481     ],
10482     invalid_values: ["5%", "5", "5 solid green"],
10483   },
10484   "border-block-color": {
10485     domProp: "borderBlockColor",
10486     inherited: false,
10487     type: CSS_TYPE_TRUE_SHORTHAND,
10488     subproperties: ["border-block-start-color", "border-block-end-color"],
10489     initial_values: ["currentColor"],
10490     other_values: ["green", "rgba(255,128,0,0.5) blue", "blue transparent"],
10491     invalid_values: ["#0", "#00", "#00000", "#0000000", "#000000000", "000000"],
10492   },
10493   "border-block-end-color": {
10494     domProp: "borderBlockEndColor",
10495     inherited: false,
10496     type: CSS_TYPE_LONGHAND,
10497     applies_to_first_letter: true,
10498     logical: true,
10499     initial_values: ["currentColor"],
10500     other_values: ["green", "rgba(255,128,0,0.5)", "transparent"],
10501     invalid_values: ["#0", "#00", "#00000", "#0000000", "#000000000", "000000"],
10502   },
10503   "border-block-style": {
10504     domProp: "borderBlockStyle",
10505     inherited: false,
10506     type: CSS_TYPE_TRUE_SHORTHAND,
10507     subproperties: ["border-block-start-style", "border-block-end-style"],
10508     initial_values: ["none"],
10509     other_values: [
10510       "solid",
10511       "dashed solid",
10512       "solid dotted",
10513       "double double",
10514       "inset outset",
10515       "inset double",
10516       "none groove",
10517       "ridge none",
10518     ],
10519     invalid_values: [],
10520   },
10521   "border-block-end-style": {
10522     domProp: "borderBlockEndStyle",
10523     inherited: false,
10524     type: CSS_TYPE_LONGHAND,
10525     applies_to_first_letter: true,
10526     logical: true,
10527     /* XXX hidden is sometimes the same as initial */
10528     initial_values: ["none"],
10529     other_values: [
10530       "solid",
10531       "dashed",
10532       "dotted",
10533       "double",
10534       "outset",
10535       "inset",
10536       "groove",
10537       "ridge",
10538     ],
10539     invalid_values: [],
10540   },
10541   "border-block-width": {
10542     domProp: "borderBlockWidth",
10543     inherited: false,
10544     type: CSS_TYPE_TRUE_SHORTHAND,
10545     subproperties: ["border-block-start-width", "border-block-end-width"],
10546     prerequisites: { "border-style": "solid" },
10547     initial_values: ["medium", "3px", "medium medium"],
10548     other_values: [
10549       "thin",
10550       "thick",
10551       "1px",
10552       "2em",
10553       "calc(2px)",
10554       "calc(2px) thin",
10555       "calc(-2px)",
10556       "calc(-2px) thick",
10557       "calc(0em)",
10558       "medium calc(0em)",
10559       "calc(0px)",
10560       "1px calc(0px)",
10561       "calc(5em)",
10562       "1em calc(5em)",
10563     ],
10564     invalid_values: ["5%", "5", "5 thin", "thin 5%", "blue", "solid"],
10565   },
10566   "border-block-end-width": {
10567     domProp: "borderBlockEndWidth",
10568     inherited: false,
10569     type: CSS_TYPE_LONGHAND,
10570     applies_to_first_letter: true,
10571     logical: true,
10572     prerequisites: { "border-block-end-style": "solid" },
10573     initial_values: ["medium", "3px", "calc(4px - 1px)"],
10574     other_values: [
10575       "thin",
10576       "thick",
10577       "1px",
10578       "2em",
10579       "calc(2px)",
10580       "calc(-2px)",
10581       "calc(0em)",
10582       "calc(0px)",
10583       "calc(5em)",
10584       "calc(3*25px)",
10585       "calc(25px*3)",
10586       "calc(3*25px + 5em)",
10587     ],
10588     invalid_values: ["5%", "5"],
10589   },
10590   "border-block-start": {
10591     domProp: "borderBlockStart",
10592     inherited: false,
10593     type: CSS_TYPE_TRUE_SHORTHAND,
10594     subproperties: [
10595       "border-block-start-color",
10596       "border-block-start-style",
10597       "border-block-start-width",
10598     ],
10599     initial_values: [
10600       "none",
10601       "medium",
10602       "currentColor",
10603       "thin",
10604       "none medium currentcolor",
10605     ],
10606     other_values: [
10607       "solid",
10608       "green",
10609       "medium solid",
10610       "green solid",
10611       "10px solid",
10612       "thick solid",
10613       "5px green none",
10614     ],
10615     invalid_values: ["5%", "5", "5 solid green"],
10616   },
10617   "border-block-start-color": {
10618     domProp: "borderBlockStartColor",
10619     inherited: false,
10620     type: CSS_TYPE_LONGHAND,
10621     applies_to_first_letter: true,
10622     logical: true,
10623     initial_values: ["currentColor"],
10624     other_values: ["green", "rgba(255,128,0,0.5)", "transparent"],
10625     invalid_values: ["#0", "#00", "#00000", "#0000000", "#000000000", "000000"],
10626   },
10627   "border-block-start-style": {
10628     domProp: "borderBlockStartStyle",
10629     inherited: false,
10630     type: CSS_TYPE_LONGHAND,
10631     applies_to_first_letter: true,
10632     logical: true,
10633     /* XXX hidden is sometimes the same as initial */
10634     initial_values: ["none"],
10635     other_values: [
10636       "solid",
10637       "dashed",
10638       "dotted",
10639       "double",
10640       "outset",
10641       "inset",
10642       "groove",
10643       "ridge",
10644     ],
10645     invalid_values: [],
10646   },
10647   "border-block-start-width": {
10648     domProp: "borderBlockStartWidth",
10649     inherited: false,
10650     type: CSS_TYPE_LONGHAND,
10651     applies_to_first_letter: true,
10652     logical: true,
10653     prerequisites: { "border-block-start-style": "solid" },
10654     initial_values: ["medium", "3px", "calc(4px - 1px)"],
10655     other_values: [
10656       "thin",
10657       "thick",
10658       "1px",
10659       "2em",
10660       "calc(2px)",
10661       "calc(-2px)",
10662       "calc(0em)",
10663       "calc(0px)",
10664       "calc(5em)",
10665       "calc(3*25px)",
10666       "calc(25px*3)",
10667       "calc(3*25px + 5em)",
10668     ],
10669     invalid_values: ["5%", "5"],
10670   },
10671   "-moz-border-end": {
10672     domProp: "MozBorderEnd",
10673     inherited: false,
10674     type: CSS_TYPE_TRUE_SHORTHAND,
10675     alias_for: "border-inline-end",
10676     subproperties: [
10677       "-moz-border-end-color",
10678       "-moz-border-end-style",
10679       "-moz-border-end-width",
10680     ],
10681   },
10682   "-moz-border-end-color": {
10683     domProp: "MozBorderEndColor",
10684     inherited: false,
10685     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10686     applies_to_first_letter: true,
10687     alias_for: "border-inline-end-color",
10688     subproperties: ["border-inline-end-color"],
10689   },
10690   "-moz-border-end-style": {
10691     domProp: "MozBorderEndStyle",
10692     inherited: false,
10693     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10694     applies_to_first_letter: true,
10695     alias_for: "border-inline-end-style",
10696     subproperties: ["border-inline-end-style"],
10697   },
10698   "-moz-border-end-width": {
10699     domProp: "MozBorderEndWidth",
10700     inherited: false,
10701     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10702     applies_to_first_letter: true,
10703     alias_for: "border-inline-end-width",
10704     subproperties: ["border-inline-end-width"],
10705   },
10706   "-moz-border-start": {
10707     domProp: "MozBorderStart",
10708     inherited: false,
10709     type: CSS_TYPE_TRUE_SHORTHAND,
10710     alias_for: "border-inline-start",
10711     subproperties: [
10712       "-moz-border-start-color",
10713       "-moz-border-start-style",
10714       "-moz-border-start-width",
10715     ],
10716   },
10717   "-moz-border-start-color": {
10718     domProp: "MozBorderStartColor",
10719     inherited: false,
10720     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10721     applies_to_first_letter: true,
10722     alias_for: "border-inline-start-color",
10723     subproperties: ["border-inline-start-color"],
10724   },
10725   "-moz-border-start-style": {
10726     domProp: "MozBorderStartStyle",
10727     inherited: false,
10728     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10729     applies_to_first_letter: true,
10730     alias_for: "border-inline-start-style",
10731     subproperties: ["border-inline-start-style"],
10732   },
10733   "-moz-border-start-width": {
10734     domProp: "MozBorderStartWidth",
10735     inherited: false,
10736     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10737     applies_to_first_letter: true,
10738     alias_for: "border-inline-start-width",
10739     subproperties: ["border-inline-start-width"],
10740   },
10741   "inline-size": {
10742     domProp: "inlineSize",
10743     inherited: false,
10744     type: CSS_TYPE_LONGHAND,
10745     logical: true,
10746     axis: true,
10747     /* XXX testing auto has prerequisites */
10748     initial_values: ["auto"],
10749     prerequisites: {
10750       display: "block",
10751       // add some margin to avoid the initial "auto" value getting
10752       // resolved to the same length as the parent element.
10753       "margin-left": "5px",
10754     },
10755     other_values: [
10756       "15px",
10757       "3em",
10758       "15%",
10759       // these three keywords compute to the initial value only when the
10760       // writing mode is vertical, and we're testing with a horizontal
10761       // writing mode
10762       "max-content",
10763       "min-content",
10764       "fit-content",
10765       "-moz-fit-content",
10766       // these two keywords are the aliases of above first two.
10767       "-moz-max-content",
10768       "-moz-min-content",
10769       // whether -moz-available computes to the initial value depends on
10770       // the container size, and for the container size we're testing
10771       // with, it does
10772       // "-moz-available",
10773       "calc(2px)",
10774       "calc(50%)",
10775       "calc(3*25px)",
10776       "calc(25px*3)",
10777       "calc(3*25px + 50%)",
10778       "fit-content(100px)",
10779       "fit-content(10%)",
10780       "fit-content(calc(3*25px + 50%))",
10781     ],
10782     invalid_values: ["none"],
10783   },
10784   "margin-block": {
10785     domProp: "marginBlock",
10786     inherited: false,
10787     type: CSS_TYPE_TRUE_SHORTHAND,
10788     subproperties: ["margin-block-start", "margin-block-end"],
10789     initial_values: ["0", "0px 0em"],
10790     other_values: [
10791       "1px",
10792       "3em 1%",
10793       "5%",
10794       "calc(2px) 1%",
10795       "calc(-2px) 1%",
10796       "calc(50%) 1%",
10797       "calc(3*25px) calc(2px)",
10798       "calc(25px*3) 1em",
10799       "calc(3*25px + 50%) calc(3*25px - 50%)",
10800     ],
10801     invalid_values: [
10802       "5",
10803       "..25px",
10804       ".+5px",
10805       ".px",
10806       "-.px",
10807       "++5px",
10808       "-+4px",
10809       "+-3px",
10810       "--7px",
10811       "+-.6px",
10812       "-+.5px",
10813       "++.7px",
10814       "--.4px",
10815     ],
10816   },
10817   "margin-block-end": {
10818     domProp: "marginBlockEnd",
10819     inherited: false,
10820     type: CSS_TYPE_LONGHAND,
10821     applies_to_first_letter: true,
10822     logical: true,
10823     /* XXX testing auto has prerequisites */
10824     initial_values: ["0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)"],
10825     other_values: [
10826       "1px",
10827       "2em",
10828       "5%",
10829       "calc(2px)",
10830       "calc(-2px)",
10831       "calc(50%)",
10832       "calc(3*25px)",
10833       "calc(25px*3)",
10834       "calc(3*25px + 50%)",
10835     ],
10836     invalid_values: [
10837       "..25px",
10838       ".+5px",
10839       ".px",
10840       "-.px",
10841       "++5px",
10842       "-+4px",
10843       "+-3px",
10844       "--7px",
10845       "+-.6px",
10846       "-+.5px",
10847       "++.7px",
10848       "--.4px",
10849     ],
10850   },
10851   "margin-block-start": {
10852     domProp: "marginBlockStart",
10853     inherited: false,
10854     type: CSS_TYPE_LONGHAND,
10855     applies_to_first_letter: true,
10856     logical: true,
10857     /* XXX testing auto has prerequisites */
10858     initial_values: ["0", "0px", "0%", "calc(0pt)", "calc(0% + 0px)"],
10859     other_values: [
10860       "1px",
10861       "2em",
10862       "5%",
10863       "calc(2px)",
10864       "calc(-2px)",
10865       "calc(50%)",
10866       "calc(3*25px)",
10867       "calc(25px*3)",
10868       "calc(3*25px + 50%)",
10869     ],
10870     invalid_values: [
10871       "..25px",
10872       ".+5px",
10873       ".px",
10874       "-.px",
10875       "++5px",
10876       "-+4px",
10877       "+-3px",
10878       "--7px",
10879       "+-.6px",
10880       "-+.5px",
10881       "++.7px",
10882       "--.4px",
10883     ],
10884   },
10885   "-moz-margin-end": {
10886     domProp: "MozMarginEnd",
10887     inherited: false,
10888     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10889     applies_to_first_letter: true,
10890     alias_for: "margin-inline-end",
10891     subproperties: ["margin-inline-end"],
10892   },
10893   "-moz-margin-start": {
10894     domProp: "MozMarginStart",
10895     inherited: false,
10896     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
10897     applies_to_first_letter: true,
10898     alias_for: "margin-inline-start",
10899     subproperties: ["margin-inline-start"],
10900   },
10901   "max-block-size": {
10902     domProp: "maxBlockSize",
10903     inherited: false,
10904     type: CSS_TYPE_LONGHAND,
10905     logical: true,
10906     axis: true,
10907     prerequisites: { display: "block" },
10908     initial_values: ["none"],
10909     other_values: [
10910       "30px",
10911       "50%",
10912       // These keywords are treated as initial value.
10913       "max-content",
10914       "min-content",
10915       "fit-content",
10916       "-moz-fit-content",
10917       "-moz-available",
10918       "-moz-max-content",
10919       "-moz-min-content",
10920       "calc(2px)",
10921       "calc(50%)",
10922       "calc(3*25px)",
10923       "calc(25px*3)",
10924       "calc(3*25px + 50%)",
10925       "fit-content(100px)",
10926       "fit-content(10%)",
10927       "fit-content(calc(3*25px + 50%))",
10928     ],
10929     invalid_values: ["auto", "5"],
10930   },
10931   "max-inline-size": {
10932     domProp: "maxInlineSize",
10933     inherited: false,
10934     type: CSS_TYPE_LONGHAND,
10935     logical: true,
10936     axis: true,
10937     prerequisites: { display: "block" },
10938     initial_values: ["none"],
10939     other_values: [
10940       "30px",
10941       "50%",
10942       // these four keywords compute to the initial value only when the
10943       // writing mode is vertical, and we're testing with a horizontal
10944       // writing mode
10945       "max-content",
10946       "min-content",
10947       "fit-content",
10948       "-moz-fit-content",
10949       "-moz-available",
10950       // these two keywords are the aliases of above first two.
10951       "-moz-max-content",
10952       "-moz-min-content",
10953       "calc(2px)",
10954       "calc(50%)",
10955       "calc(3*25px)",
10956       "calc(25px*3)",
10957       "calc(3*25px + 50%)",
10958       "fit-content(100px)",
10959       "fit-content(10%)",
10960       "fit-content(calc(3*25px + 50%))",
10961     ],
10962     invalid_values: ["auto", "5"],
10963   },
10964   "min-block-size": {
10965     domProp: "minBlockSize",
10966     inherited: false,
10967     type: CSS_TYPE_LONGHAND,
10968     logical: true,
10969     axis: true,
10970     prerequisites: { display: "block" },
10971     initial_values: ["auto", "0", "calc(0em)", "calc(-2px)"],
10972     other_values: [
10973       "30px",
10974       "50%",
10975       // These keywords are treated as initial value.
10976       "max-content",
10977       "min-content",
10978       "fit-content",
10979       "-moz-fit-content",
10980       "-moz-available",
10981       "-moz-max-content",
10982       "-moz-min-content",
10983       "calc(-1%)",
10984       "calc(2px)",
10985       "calc(50%)",
10986       "calc(3*25px)",
10987       "calc(25px*3)",
10988       "calc(3*25px + 50%)",
10989       "fit-content(100px)",
10990       "fit-content(10%)",
10991       "fit-content(calc(3*25px + 50%))",
10992     ],
10993     invalid_values: ["none", "5"],
10994   },
10995   "min-inline-size": {
10996     domProp: "minInlineSize",
10997     inherited: false,
10998     type: CSS_TYPE_LONGHAND,
10999     logical: true,
11000     axis: true,
11001     prerequisites: { display: "block" },
11002     initial_values: ["auto", "0", "calc(0em)", "calc(-2px)"],
11003     other_values: [
11004       "30px",
11005       "50%",
11006       // these four keywords compute to the initial value only when the
11007       // writing mode is vertical, and we're testing with a horizontal
11008       // writing mode
11009       "max-content",
11010       "min-content",
11011       "fit-content",
11012       "-moz-fit-content",
11013       "-moz-available",
11014       // these two keywords are the aliases of above first two.
11015       "-moz-max-content",
11016       "-moz-min-content",
11017       "calc(-1%)",
11018       "calc(2px)",
11019       "calc(50%)",
11020       "calc(3*25px)",
11021       "calc(25px*3)",
11022       "calc(3*25px + 50%)",
11023       "fit-content(100px)",
11024       "fit-content(10%)",
11025       "fit-content(calc(3*25px + 50%))",
11026     ],
11027     invalid_values: ["none", "5"],
11028   },
11029   inset: {
11030     domProp: "inset",
11031     inherited: false,
11032     type: CSS_TYPE_TRUE_SHORTHAND,
11033     subproperties: ["top", "right", "bottom", "left"],
11034     /* FIXME: run tests with multiple prerequisites */
11035     prerequisites: { position: "relative" },
11036     initial_values: ["auto"],
11037     other_values: [
11038       "3px 0",
11039       "2em 4px 2pt",
11040       "1em 2em 3px 4px",
11041       "1em calc(2em + 3px) 4ex 5cm",
11042     ],
11043     invalid_values: ["1px calc(nonsense)", "1px red", "3"],
11044     unbalanced_values: ["1px calc("],
11045   },
11046   "inset-block": {
11047     domProp: "insetBlock",
11048     inherited: false,
11049     type: CSS_TYPE_TRUE_SHORTHAND,
11050     subproperties: ["inset-block-start", "inset-block-end"],
11051     /* FIXME: run tests with multiple prerequisites */
11052     prerequisites: { position: "relative" },
11053     initial_values: ["auto", "auto auto"],
11054     other_values: [
11055       "32px",
11056       "-3em",
11057       "12%",
11058       "32px auto",
11059       "auto -3em",
11060       "12% auto",
11061       "calc(2px)",
11062       "calc(2px) auto",
11063       "calc(-2px)",
11064       "auto calc(-2px)",
11065       "calc(50%)",
11066       "auto calc(50%)",
11067       "calc(3*25px)",
11068       "calc(3*25px) auto",
11069       "calc(25px*3)",
11070       "auto calc(25px*3)",
11071       "calc(3*25px + 50%)",
11072       "auto calc(3*25px + 50%)",
11073     ],
11074     invalid_values: ["none"],
11075   },
11076   "inset-block-end": {
11077     domProp: "insetBlockEnd",
11078     inherited: false,
11079     type: CSS_TYPE_LONGHAND,
11080     logical: true,
11081     /* FIXME: run tests with multiple prerequisites */
11082     prerequisites: { position: "relative" },
11083     /* XXX 0 may or may not be equal to auto */
11084     initial_values: ["auto"],
11085     other_values: [
11086       "32px",
11087       "-3em",
11088       "12%",
11089       "calc(2px)",
11090       "calc(-2px)",
11091       "calc(50%)",
11092       "calc(3*25px)",
11093       "calc(25px*3)",
11094       "calc(3*25px + 50%)",
11095     ],
11096     invalid_values: [],
11097   },
11098   "inset-block-start": {
11099     domProp: "insetBlockStart",
11100     inherited: false,
11101     type: CSS_TYPE_LONGHAND,
11102     logical: true,
11103     /* FIXME: run tests with multiple prerequisites */
11104     prerequisites: { position: "relative" },
11105     /* XXX 0 may or may not be equal to auto */
11106     initial_values: ["auto"],
11107     other_values: [
11108       "32px",
11109       "-3em",
11110       "12%",
11111       "calc(2px)",
11112       "calc(-2px)",
11113       "calc(50%)",
11114       "calc(3*25px)",
11115       "calc(25px*3)",
11116       "calc(3*25px + 50%)",
11117     ],
11118     invalid_values: [],
11119   },
11120   "inset-inline": {
11121     domProp: "insetInline",
11122     inherited: false,
11123     type: CSS_TYPE_TRUE_SHORTHAND,
11124     subproperties: ["inset-inline-start", "inset-inline-end"],
11125     /* FIXME: run tests with multiple prerequisites */
11126     prerequisites: { position: "relative" },
11127     initial_values: ["auto", "auto auto"],
11128     other_values: [
11129       "32px",
11130       "-3em",
11131       "12%",
11132       "32px auto",
11133       "auto -3em",
11134       "12% auto",
11135       "calc(2px)",
11136       "calc(2px) auto",
11137       "calc(-2px)",
11138       "auto calc(-2px)",
11139       "calc(50%)",
11140       "auto calc(50%)",
11141       "calc(3*25px)",
11142       "calc(3*25px) auto",
11143       "calc(25px*3)",
11144       "auto calc(25px*3)",
11145       "calc(3*25px + 50%)",
11146       "auto calc(3*25px + 50%)",
11147     ],
11148     invalid_values: ["none"],
11149   },
11150   "inset-inline-end": {
11151     domProp: "insetInlineEnd",
11152     inherited: false,
11153     type: CSS_TYPE_LONGHAND,
11154     logical: true,
11155     /* FIXME: run tests with multiple prerequisites */
11156     prerequisites: { position: "relative" },
11157     /* XXX 0 may or may not be equal to auto */
11158     initial_values: ["auto"],
11159     other_values: [
11160       "32px",
11161       "-3em",
11162       "12%",
11163       "calc(2px)",
11164       "calc(-2px)",
11165       "calc(50%)",
11166       "calc(3*25px)",
11167       "calc(25px*3)",
11168       "calc(3*25px + 50%)",
11169     ],
11170     invalid_values: [],
11171   },
11172   "inset-inline-start": {
11173     domProp: "insetInlineStart",
11174     inherited: false,
11175     type: CSS_TYPE_LONGHAND,
11176     logical: true,
11177     /* FIXME: run tests with multiple prerequisites */
11178     prerequisites: { position: "relative" },
11179     /* XXX 0 may or may not be equal to auto */
11180     initial_values: ["auto"],
11181     other_values: [
11182       "32px",
11183       "-3em",
11184       "12%",
11185       "calc(2px)",
11186       "calc(-2px)",
11187       "calc(50%)",
11188       "calc(3*25px)",
11189       "calc(25px*3)",
11190       "calc(3*25px + 50%)",
11191     ],
11192     invalid_values: [],
11193   },
11194   "padding-block-end": {
11195     domProp: "paddingBlockEnd",
11196     inherited: false,
11197     type: CSS_TYPE_LONGHAND,
11198     applies_to_first_letter: true,
11199     // No applies_to_placeholder because we have a !important rule in forms.css.
11200     logical: true,
11201     initial_values: [
11202       "0",
11203       "0px",
11204       "0%",
11205       "calc(0pt)",
11206       "calc(0% + 0px)",
11207       "calc(-3px)",
11208       "calc(-1%)",
11209     ],
11210     other_values: [
11211       "1px",
11212       "2em",
11213       "5%",
11214       "calc(2px)",
11215       "calc(50%)",
11216       "calc(3*25px)",
11217       "calc(25px*3)",
11218       "calc(3*25px + 50%)",
11219     ],
11220     invalid_values: [],
11221   },
11222   "padding-block-start": {
11223     domProp: "paddingBlockStart",
11224     inherited: false,
11225     type: CSS_TYPE_LONGHAND,
11226     applies_to_first_letter: true,
11227     // No applies_to_placeholder because we have a !important rule in forms.css.
11228     logical: true,
11229     initial_values: [
11230       "0",
11231       "0px",
11232       "0%",
11233       "calc(0pt)",
11234       "calc(0% + 0px)",
11235       "calc(-3px)",
11236       "calc(-1%)",
11237     ],
11238     other_values: [
11239       "1px",
11240       "2em",
11241       "5%",
11242       "calc(2px)",
11243       "calc(50%)",
11244       "calc(3*25px)",
11245       "calc(25px*3)",
11246       "calc(3*25px + 50%)",
11247     ],
11248     invalid_values: [],
11249   },
11250   "-moz-padding-end": {
11251     domProp: "MozPaddingEnd",
11252     inherited: false,
11253     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11254     applies_to_first_letter: true,
11255     alias_for: "padding-inline-end",
11256     subproperties: ["padding-inline-end"],
11257   },
11258   "-moz-padding-start": {
11259     domProp: "MozPaddingStart",
11260     inherited: false,
11261     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11262     applies_to_first_letter: true,
11263     alias_for: "padding-inline-start",
11264     subproperties: ["padding-inline-start"],
11265   },
11266   "-webkit-animation": {
11267     domProp: "webkitAnimation",
11268     inherited: false,
11269     type: CSS_TYPE_TRUE_SHORTHAND,
11270     applies_to_marker: true,
11271     alias_for: "animation",
11272     subproperties: [
11273       "animation-name",
11274       "animation-duration",
11275       "animation-timing-function",
11276       "animation-delay",
11277       "animation-direction",
11278       "animation-fill-mode",
11279       "animation-iteration-count",
11280       "animation-play-state",
11281     ],
11282   },
11283   "-webkit-animation-delay": {
11284     domProp: "webkitAnimationDelay",
11285     inherited: false,
11286     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11287     applies_to_marker: true,
11288     alias_for: "animation-delay",
11289     subproperties: ["animation-delay"],
11290   },
11291   "-webkit-animation-direction": {
11292     domProp: "webkitAnimationDirection",
11293     inherited: false,
11294     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11295     applies_to_marker: true,
11296     alias_for: "animation-direction",
11297     subproperties: ["animation-direction"],
11298   },
11299   "-webkit-animation-duration": {
11300     domProp: "webkitAnimationDuration",
11301     inherited: false,
11302     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11303     applies_to_marker: true,
11304     alias_for: "animation-duration",
11305     subproperties: ["animation-duration"],
11306   },
11307   "-webkit-animation-fill-mode": {
11308     domProp: "webkitAnimationFillMode",
11309     inherited: false,
11310     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11311     applies_to_marker: true,
11312     alias_for: "animation-fill-mode",
11313     subproperties: ["animation-fill-mode"],
11314   },
11315   "-webkit-animation-iteration-count": {
11316     domProp: "webkitAnimationIterationCount",
11317     inherited: false,
11318     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11319     applies_to_marker: true,
11320     alias_for: "animation-iteration-count",
11321     subproperties: ["animation-iteration-count"],
11322   },
11323   "-webkit-animation-name": {
11324     domProp: "webkitAnimationName",
11325     inherited: false,
11326     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11327     applies_to_marker: true,
11328     alias_for: "animation-name",
11329     subproperties: ["animation-name"],
11330   },
11331   "-webkit-animation-play-state": {
11332     domProp: "webkitAnimationPlayState",
11333     inherited: false,
11334     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11335     applies_to_marker: true,
11336     alias_for: "animation-play-state",
11337     subproperties: ["animation-play-state"],
11338   },
11339   "-webkit-animation-timing-function": {
11340     domProp: "webkitAnimationTimingFunction",
11341     inherited: false,
11342     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11343     applies_to_marker: true,
11344     alias_for: "animation-timing-function",
11345     subproperties: ["animation-timing-function"],
11346   },
11347   "-webkit-clip-path": {
11348     domProp: "webkitClipPath",
11349     inherited: false,
11350     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11351     alias_for: "clip-path",
11352     subproperties: ["clip-path"],
11353   },
11354   "-webkit-filter": {
11355     domProp: "webkitFilter",
11356     inherited: false,
11357     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11358     alias_for: "filter",
11359     subproperties: ["filter"],
11360   },
11361   "-webkit-text-security": {
11362     domProp: "webkitTextSecurity",
11363     inherited: true,
11364     type: CSS_TYPE_LONGHAND,
11365     applies_to_first_letter: true,
11366     applies_to_first_line: true,
11367     applies_to_placeholder: true,
11368     initial_values: ["none"],
11369     other_values: ["circle", "disc", "square"],
11370     invalid_values: ["0", "auto", "true", "'*'"],
11371   },
11372   "-webkit-text-fill-color": {
11373     domProp: "webkitTextFillColor",
11374     inherited: true,
11375     type: CSS_TYPE_LONGHAND,
11376     applies_to_first_letter: true,
11377     applies_to_first_line: true,
11378     applies_to_placeholder: true,
11379     prerequisites: { color: "black" },
11380     initial_values: ["currentColor", "black", "#000", "#000000", "rgb(0,0,0)"],
11381     other_values: ["red", "rgba(255,255,255,0.5)", "transparent"],
11382     invalid_values: [
11383       "#0",
11384       "#00",
11385       "#00000",
11386       "#0000000",
11387       "#000000000",
11388       "000000",
11389       "ff00ff",
11390       "rgb(255,xxx,255)",
11391     ],
11392   },
11393   "-webkit-text-stroke": {
11394     domProp: "webkitTextStroke",
11395     inherited: true,
11396     type: CSS_TYPE_TRUE_SHORTHAND,
11397     prerequisites: { color: "black" },
11398     subproperties: ["-webkit-text-stroke-width", "-webkit-text-stroke-color"],
11399     initial_values: [
11400       "0 currentColor",
11401       "currentColor 0px",
11402       "0",
11403       "currentColor",
11404       "0px black",
11405     ],
11406     other_values: [
11407       "thin black",
11408       "#f00 medium",
11409       "thick rgba(0,0,255,0.5)",
11410       "calc(4px - 8px) green",
11411       "2px",
11412       "green 0",
11413       "currentColor 4em",
11414       "currentColor calc(5px - 1px)",
11415     ],
11416     invalid_values: ["-3px black", "calc(50%+ 2px) #000", "30% #f00"],
11417   },
11418   "-webkit-text-stroke-color": {
11419     domProp: "webkitTextStrokeColor",
11420     inherited: true,
11421     type: CSS_TYPE_LONGHAND,
11422     applies_to_first_letter: true,
11423     applies_to_first_line: true,
11424     applies_to_placeholder: true,
11425     prerequisites: { color: "black" },
11426     initial_values: ["currentColor", "black", "#000", "#000000", "rgb(0,0,0)"],
11427     other_values: ["red", "rgba(255,255,255,0.5)", "transparent"],
11428     invalid_values: [
11429       "#0",
11430       "#00",
11431       "#00000",
11432       "#0000000",
11433       "#000000000",
11434       "000000",
11435       "ff00ff",
11436       "rgb(255,xxx,255)",
11437     ],
11438   },
11439   "-webkit-text-stroke-width": {
11440     domProp: "webkitTextStrokeWidth",
11441     inherited: true,
11442     type: CSS_TYPE_LONGHAND,
11443     applies_to_first_letter: true,
11444     applies_to_first_line: true,
11445     applies_to_placeholder: true,
11446     initial_values: ["0", "0px", "0em", "0ex", "calc(0pt)", "calc(4px - 8px)"],
11447     other_values: [
11448       "thin",
11449       "medium",
11450       "thick",
11451       "17px",
11452       "0.2em",
11453       "calc(3*25px + 5em)",
11454       "calc(5px - 1px)",
11455     ],
11456     invalid_values: [
11457       "5%",
11458       "1px calc(nonsense)",
11459       "1px red",
11460       "-0.1px",
11461       "-3px",
11462       "30%",
11463     ],
11464   },
11465   "-webkit-text-size-adjust": {
11466     domProp: "webkitTextSizeAdjust",
11467     inherited: true,
11468     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11469     alias_for: "-moz-text-size-adjust",
11470     subproperties: ["-moz-text-size-adjust"],
11471   },
11472   "-webkit-transform": {
11473     domProp: "webkitTransform",
11474     inherited: false,
11475     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11476     alias_for: "transform",
11477     subproperties: ["transform"],
11478   },
11479   "-webkit-transform-origin": {
11480     domProp: "webkitTransformOrigin",
11481     inherited: false,
11482     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11483     alias_for: "transform-origin",
11484     subproperties: ["transform-origin"],
11485   },
11486   "-webkit-transform-style": {
11487     domProp: "webkitTransformStyle",
11488     inherited: false,
11489     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11490     alias_for: "transform-style",
11491     subproperties: ["transform-style"],
11492   },
11493   "-webkit-backface-visibility": {
11494     domProp: "webkitBackfaceVisibility",
11495     inherited: false,
11496     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11497     alias_for: "backface-visibility",
11498     subproperties: ["backface-visibility"],
11499   },
11500   "-webkit-perspective": {
11501     domProp: "webkitPerspective",
11502     inherited: false,
11503     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11504     alias_for: "perspective",
11505     subproperties: ["perspective"],
11506   },
11507   "-webkit-perspective-origin": {
11508     domProp: "webkitPerspectiveOrigin",
11509     inherited: false,
11510     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11511     alias_for: "perspective-origin",
11512     subproperties: ["perspective-origin"],
11513   },
11514   "-webkit-transition": {
11515     domProp: "webkitTransition",
11516     inherited: false,
11517     type: CSS_TYPE_TRUE_SHORTHAND,
11518     applies_to_marker: true,
11519     alias_for: "transition",
11520     subproperties: [
11521       "transition-property",
11522       "transition-duration",
11523       "transition-timing-function",
11524       "transition-delay",
11525     ],
11526   },
11527   "-webkit-transition-delay": {
11528     domProp: "webkitTransitionDelay",
11529     inherited: false,
11530     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11531     applies_to_marker: true,
11532     alias_for: "transition-delay",
11533     subproperties: ["transition-delay"],
11534   },
11535   "-webkit-transition-duration": {
11536     domProp: "webkitTransitionDuration",
11537     inherited: false,
11538     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11539     applies_to_marker: true,
11540     alias_for: "transition-duration",
11541     subproperties: ["transition-duration"],
11542   },
11543   "-webkit-transition-property": {
11544     domProp: "webkitTransitionProperty",
11545     inherited: false,
11546     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11547     applies_to_marker: true,
11548     alias_for: "transition-property",
11549     subproperties: ["transition-property"],
11550   },
11551   "-webkit-transition-timing-function": {
11552     domProp: "webkitTransitionTimingFunction",
11553     inherited: false,
11554     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11555     applies_to_marker: true,
11556     alias_for: "transition-timing-function",
11557     subproperties: ["transition-timing-function"],
11558   },
11559   "-webkit-border-radius": {
11560     domProp: "webkitBorderRadius",
11561     inherited: false,
11562     type: CSS_TYPE_TRUE_SHORTHAND,
11563     alias_for: "border-radius",
11564     subproperties: [
11565       "border-bottom-left-radius",
11566       "border-bottom-right-radius",
11567       "border-top-left-radius",
11568       "border-top-right-radius",
11569     ],
11570   },
11571   "-webkit-border-top-left-radius": {
11572     domProp: "webkitBorderTopLeftRadius",
11573     inherited: false,
11574     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11575     applies_to_first_letter: true,
11576     alias_for: "border-top-left-radius",
11577     subproperties: ["border-top-left-radius"],
11578   },
11579   "-webkit-border-top-right-radius": {
11580     domProp: "webkitBorderTopRightRadius",
11581     inherited: false,
11582     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11583     applies_to_first_letter: true,
11584     alias_for: "border-top-right-radius",
11585     subproperties: ["border-top-right-radius"],
11586   },
11587   "-webkit-border-bottom-left-radius": {
11588     domProp: "webkitBorderBottomLeftRadius",
11589     inherited: false,
11590     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11591     applies_to_first_letter: true,
11592     alias_for: "border-bottom-left-radius",
11593     subproperties: ["border-bottom-left-radius"],
11594   },
11595   "-webkit-border-bottom-right-radius": {
11596     domProp: "webkitBorderBottomRightRadius",
11597     inherited: false,
11598     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11599     applies_to_first_letter: true,
11600     alias_for: "border-bottom-right-radius",
11601     subproperties: ["border-bottom-right-radius"],
11602   },
11603   "-webkit-background-clip": {
11604     domProp: "webkitBackgroundClip",
11605     inherited: false,
11606     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11607     applies_to_first_letter: true,
11608     applies_to_first_line: true,
11609     applies_to_placeholder: true,
11610     applies_to_cue: true,
11611     alias_for: "background-clip",
11612     subproperties: ["background-clip"],
11613   },
11614   "-webkit-background-origin": {
11615     domProp: "webkitBackgroundOrigin",
11616     inherited: false,
11617     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11618     applies_to_first_letter: true,
11619     applies_to_first_line: true,
11620     applies_to_placeholder: true,
11621     applies_to_cue: true,
11622     alias_for: "background-origin",
11623     subproperties: ["background-origin"],
11624   },
11625   "-webkit-background-size": {
11626     domProp: "webkitBackgroundSize",
11627     inherited: false,
11628     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11629     applies_to_first_letter: true,
11630     applies_to_first_line: true,
11631     applies_to_placeholder: true,
11632     applies_to_cue: true,
11633     alias_for: "background-size",
11634     subproperties: ["background-size"],
11635   },
11636   "-webkit-border-image": {
11637     domProp: "webkitBorderImage",
11638     inherited: false,
11639     type: CSS_TYPE_TRUE_SHORTHAND,
11640     alias_for: "border-image",
11641     subproperties: [
11642       "border-image-source",
11643       "border-image-slice",
11644       "border-image-width",
11645       "border-image-outset",
11646       "border-image-repeat",
11647     ],
11648   },
11649   "-webkit-box-shadow": {
11650     domProp: "webkitBoxShadow",
11651     inherited: false,
11652     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11653     applies_to_first_letter: true,
11654     alias_for: "box-shadow",
11655     subproperties: ["box-shadow"],
11656   },
11657   "-webkit-box-sizing": {
11658     domProp: "webkitBoxSizing",
11659     inherited: false,
11660     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11661     alias_for: "box-sizing",
11662     subproperties: ["box-sizing"],
11663   },
11664   "-webkit-box-flex": {
11665     domProp: "webkitBoxFlex",
11666     inherited: false,
11667     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11668     alias_for: "-moz-box-flex",
11669     subproperties: ["-moz-box-flex"],
11670   },
11671   "-webkit-box-ordinal-group": {
11672     domProp: "webkitBoxOrdinalGroup",
11673     inherited: false,
11674     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11675     alias_for: "-moz-box-ordinal-group",
11676     subproperties: ["-moz-box-ordinal-group"],
11677   },
11678   "-webkit-box-orient": {
11679     domProp: "webkitBoxOrient",
11680     inherited: false,
11681     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11682     alias_for: "-moz-box-orient",
11683     subproperties: ["-moz-box-orient"],
11684   },
11685   "-webkit-box-direction": {
11686     domProp: "webkitBoxDirection",
11687     inherited: false,
11688     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11689     alias_for: "-moz-box-direction",
11690     subproperties: ["-moz-box-direction"],
11691   },
11692   "-webkit-box-align": {
11693     domProp: "webkitBoxAlign",
11694     inherited: false,
11695     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11696     alias_for: "-moz-box-align",
11697     subproperties: ["-moz-box-align"],
11698   },
11699   "-webkit-box-pack": {
11700     domProp: "webkitBoxPack",
11701     inherited: false,
11702     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11703     alias_for: "-moz-box-pack",
11704     subproperties: ["-moz-box-pack"],
11705   },
11706   "-webkit-flex-direction": {
11707     domProp: "webkitFlexDirection",
11708     inherited: false,
11709     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11710     alias_for: "flex-direction",
11711     subproperties: ["flex-direction"],
11712   },
11713   "-webkit-flex-wrap": {
11714     domProp: "webkitFlexWrap",
11715     inherited: false,
11716     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11717     alias_for: "flex-wrap",
11718     subproperties: ["flex-wrap"],
11719   },
11720   "-webkit-flex-flow": {
11721     domProp: "webkitFlexFlow",
11722     inherited: false,
11723     type: CSS_TYPE_TRUE_SHORTHAND,
11724     alias_for: "flex-flow",
11725     subproperties: ["flex-direction", "flex-wrap"],
11726   },
11727   "-webkit-line-clamp": {
11728     domProp: "webkitLineClamp",
11729     inherited: false,
11730     type: CSS_TYPE_LONGHAND,
11731     initial_values: ["none"],
11732     other_values: ["1", "2"],
11733     invalid_values: ["auto", "0", "-1"],
11734   },
11735   "-webkit-order": {
11736     domProp: "webkitOrder",
11737     inherited: false,
11738     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11739     alias_for: "order",
11740     subproperties: ["order"],
11741   },
11742   "-webkit-flex": {
11743     domProp: "webkitFlex",
11744     inherited: false,
11745     type: CSS_TYPE_TRUE_SHORTHAND,
11746     alias_for: "flex",
11747     subproperties: ["flex-grow", "flex-shrink", "flex-basis"],
11748   },
11749   "-webkit-flex-grow": {
11750     domProp: "webkitFlexGrow",
11751     inherited: false,
11752     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11753     alias_for: "flex-grow",
11754     subproperties: ["flex-grow"],
11755   },
11756   "-webkit-flex-shrink": {
11757     domProp: "webkitFlexShrink",
11758     inherited: false,
11759     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11760     alias_for: "flex-shrink",
11761     subproperties: ["flex-shrink"],
11762   },
11763   "-webkit-flex-basis": {
11764     domProp: "webkitFlexBasis",
11765     inherited: false,
11766     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11767     alias_for: "flex-basis",
11768     subproperties: ["flex-basis"],
11769   },
11770   "-webkit-justify-content": {
11771     domProp: "webkitJustifyContent",
11772     inherited: false,
11773     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11774     alias_for: "justify-content",
11775     subproperties: ["justify-content"],
11776   },
11777   "-webkit-align-items": {
11778     domProp: "webkitAlignItems",
11779     inherited: false,
11780     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11781     alias_for: "align-items",
11782     subproperties: ["align-items"],
11783   },
11784   "-webkit-align-self": {
11785     domProp: "webkitAlignSelf",
11786     inherited: false,
11787     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11788     alias_for: "align-self",
11789     subproperties: ["align-self"],
11790   },
11791   "-webkit-align-content": {
11792     domProp: "webkitAlignContent",
11793     inherited: false,
11794     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11795     alias_for: "align-content",
11796     subproperties: ["align-content"],
11797   },
11798   "-webkit-user-select": {
11799     domProp: "webkitUserSelect",
11800     inherited: false,
11801     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11802     alias_for: "user-select",
11803     subproperties: ["user-select"],
11804   },
11805   "-webkit-mask": {
11806     domProp: "webkitMask",
11807     inherited: false,
11808     type: CSS_TYPE_TRUE_SHORTHAND,
11809     alias_for: "mask",
11810     subproperties: [
11811       "mask-clip",
11812       "mask-image",
11813       "mask-mode",
11814       "mask-origin",
11815       "mask-position",
11816       "mask-repeat",
11817       "mask-size",
11818       "mask-composite",
11819     ],
11820   },
11821   "-webkit-mask-clip": {
11822     domProp: "webkitMaskClip",
11823     inherited: false,
11824     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11825     alias_for: "mask-clip",
11826     subproperties: ["mask-clip"],
11827   },
11829   "-webkit-mask-composite": {
11830     domProp: "webkitMaskComposite",
11831     inherited: false,
11832     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11833     alias_for: "mask-composite",
11834     subproperties: ["mask-composite"],
11835   },
11837   "-webkit-mask-image": {
11838     domProp: "webkitMaskImage",
11839     inherited: false,
11840     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11841     alias_for: "mask-image",
11842     subproperties: ["mask-image"],
11843   },
11844   "-webkit-mask-origin": {
11845     domProp: "webkitMaskOrigin",
11846     inherited: false,
11847     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11848     alias_for: "mask-origin",
11849     subproperties: ["mask-origin"],
11850   },
11851   "-webkit-mask-position": {
11852     domProp: "webkitMaskPosition",
11853     inherited: false,
11854     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11855     alias_for: "mask-position",
11856     subproperties: ["mask-position"],
11857   },
11858   "-webkit-mask-position-x": {
11859     domProp: "webkitMaskPositionX",
11860     inherited: false,
11861     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11862     alias_for: "mask-position-x",
11863     subproperties: ["mask-position-x"],
11864   },
11865   "-webkit-mask-position-y": {
11866     domProp: "webkitMaskPositionY",
11867     inherited: false,
11868     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11869     alias_for: "mask-position-y",
11870     subproperties: ["mask-position-y"],
11871   },
11872   "-webkit-mask-repeat": {
11873     domProp: "webkitMaskRepeat",
11874     inherited: false,
11875     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11876     alias_for: "mask-repeat",
11877     subproperties: ["mask-repeat"],
11878   },
11879   "-webkit-mask-size": {
11880     domProp: "webkitMaskSize",
11881     inherited: false,
11882     type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
11883     alias_for: "mask-size",
11884     subproperties: ["mask-size"],
11885   },
11886 }; // end of gCSSProperties
11888 // Get the computed value for a property.  For shorthands, return the
11889 // computed values of all the subproperties, delimited by " ; ".
11890 function get_computed_value(cs, property) {
11891   var info = gCSSProperties[property];
11892   if (
11893     info.type == CSS_TYPE_TRUE_SHORTHAND ||
11894     info.type == CSS_TYPE_LEGACY_SHORTHAND ||
11895     (info.type == CSS_TYPE_SHORTHAND_AND_LONGHAND &&
11896       (property == "text-decoration" || property == "mask"))
11897   ) {
11898     var results = [];
11899     for (var idx in info.subproperties) {
11900       var subprop = info.subproperties[idx];
11901       results.push(get_computed_value(cs, subprop));
11902     }
11903     return results.join(" ; ");
11904   }
11905   return cs.getPropertyValue(property);
11909   const mozHiddenUnscrollableEnabled = IsCSSPropertyPrefEnabled(
11910     "layout.css.overflow-moz-hidden-unscrollable.enabled"
11911   );
11912   for (let p of ["overflow", "overflow-x", "overflow-y"]) {
11913     let prop = gCSSProperties[p];
11914     let mozHiddenUnscrollableValues = mozHiddenUnscrollableEnabled
11915       ? prop.other_values
11916       : prop.invalid_values;
11917     mozHiddenUnscrollableValues.push("-moz-hidden-unscrollable");
11918     if (p == "overflow") {
11919       mozHiddenUnscrollableValues.push(
11920         "-moz-hidden-unscrollable -moz-hidden-unscrollable"
11921       );
11922     }
11923   }
11926 if (IsCSSPropertyPrefEnabled("layout.css.individual-transform.enabled")) {
11927   gCSSProperties.rotate = {
11928     domProp: "rotate",
11929     inherited: false,
11930     type: CSS_TYPE_LONGHAND,
11931     initial_values: ["none"],
11932     other_values: [
11933       "45deg",
11934       "45grad",
11935       "72rad",
11936       "0.25turn",
11937       ".57rad",
11938       "0 0 0 0rad",
11939       "0 0 1 45deg",
11940       "0 0 1 0rad",
11941       "0rad 0 0 1",
11942       "10rad 10 20 30",
11943       "x 10rad",
11944       "y 10rad",
11945       "z 10rad",
11946       "10rad x",
11947       "10rad y",
11948       "10rad z",
11949       /* valid calc() values */
11950       "calc(1) 0 0 calc(45deg + 5rad)",
11951       "0 1 0 calc(400grad + 1rad)",
11952       "calc(0.5turn + 10deg)",
11953     ],
11954     invalid_values: [
11955       "0",
11956       "7",
11957       "0, 0, 1, 45deg",
11958       "0 0 45deg",
11959       "0 0 20rad",
11960       "0 0 0 0",
11961       "x x 10rad",
11962       "x y 10rad",
11963       "0 0 1 10rad z",
11964       "0 0 1 z 10rad",
11965       "z 0 0 1 10rad",
11966       "0 0 z 1 10rad",
11967       /* invalid calc() values */
11968       "0.5 1 0 calc(45deg + 10)",
11969       "calc(0.5turn + 10%)",
11970     ],
11971   };
11973   gCSSProperties.translate = {
11974     domProp: "translate",
11975     inherited: false,
11976     type: CSS_TYPE_LONGHAND,
11977     prerequisites: { width: "10px", height: "10px", display: "block" },
11978     initial_values: ["none"],
11979     other_values: [
11980       "-4px",
11981       "3px",
11982       "4em",
11983       "50%",
11984       "4px 5px 6px",
11985       "4px 5px",
11986       "50% 5px 6px",
11987       "50% 10% 6em",
11988       /* valid calc() values */
11989       "calc(5px + 10%)",
11990       "calc(0.25 * 5px + 10% / 3)",
11991       "calc(5px - 10% * 3)",
11992       "calc(5px - 3 * 10%) 50px",
11993       "-50px calc(5px - 10% * 3)",
11994       "10px calc(min(5px,10%))",
11995     ],
11996     invalid_values: [
11997       "1",
11998       "-moz-min(5px,10%)",
11999       "4px, 5px, 6px",
12000       "3px 4px 1px 7px",
12001       "4px 5px 10%",
12002       /* invalid calc() values */
12003       "calc(max(5px,10%) 10%)",
12004       "calc(nonsense)",
12005     ],
12006   };
12007   gCSSProperties.scale = {
12008     domProp: "scale",
12009     inherited: false,
12010     type: CSS_TYPE_LONGHAND,
12011     initial_values: ["none"],
12012     other_values: [
12013       "10",
12014       "10%",
12015       "10 20",
12016       "10% 20%",
12017       "10 20 30",
12018       "10% 20% 30%",
12019       "10 20% 30",
12020       "-10",
12021       "-10%",
12022       "-10 20",
12023       "-10% 20%",
12024       "-10 20 -30",
12025       "-10% 20% -30%",
12026       "-10 20% -30",
12027       "0 2.0",
12028       /* valid calc() values */
12029       "calc(1 + 2)",
12030       "calc(10) calc(20) 30",
12031     ],
12032     invalid_values: [
12033       "10px",
12034       "10deg",
12035       "10, 20, 30",
12036       /* invalid calc() values */
12037       "calc(1 + 20%)",
12038       "10 calc(1 + 10px)",
12039     ],
12040   };
12043 if (
12044   IsCSSPropertyPrefEnabled("layout.css.transform-box-content-stroke.enabled")
12045 ) {
12046   gCSSProperties["transform-box"]["other_values"].push(
12047     "content-box",
12048     "stroke-box"
12049   );
12052 gCSSProperties["touch-action"] = {
12053   domProp: "touchAction",
12054   inherited: false,
12055   type: CSS_TYPE_LONGHAND,
12056   initial_values: ["auto"],
12057   other_values: [
12058     "none",
12059     "pan-x",
12060     "pan-y",
12061     "pinch-zoom",
12062     "pan-x pan-y",
12063     "pan-y pan-x",
12064     "pinch-zoom pan-x",
12065     "pinch-zoom pan-y",
12066     "pan-x pinch-zoom",
12067     "pan-y pinch-zoom",
12068     "pinch-zoom pan-x pan-y",
12069     "pinch-zoom pan-y pan-x",
12070     "pan-x pinch-zoom pan-y",
12071     "pan-y pinch-zoom pan-x",
12072     "pan-x pan-y pinch-zoom",
12073     "pan-y pan-x pinch-zoom",
12074     "manipulation",
12075   ],
12076   invalid_values: [
12077     "zoom",
12078     "pinch",
12079     "tap",
12080     "10px",
12081     "2",
12082     "auto pan-x",
12083     "pan-x auto",
12084     "none pan-x",
12085     "pan-x none",
12086     "auto pan-y",
12087     "pan-y auto",
12088     "none pan-y",
12089     "pan-y none",
12090     "pan-x pan-x",
12091     "pan-y pan-y",
12092     "auto pinch-zoom",
12093     "pinch-zoom auto",
12094     "none pinch-zoom",
12095     "pinch-zoom none",
12096     "pinch-zoom pinch-zoom",
12097     "pan-x pan-y none",
12098     "pan-x none pan-y",
12099     "none pan-x pan-y",
12100     "pan-y pan-x none",
12101     "pan-y none pan-x",
12102     "none pan-y pan-x",
12103     "pan-x pinch-zoom none",
12104     "pan-x none pinch-zoom",
12105     "none pan-x pinch-zoom",
12106     "pinch-zoom pan-x none",
12107     "pinch-zoom none pan-x",
12108     "none pinch-zoom pan-x",
12109     "pinch-zoom pan-y none",
12110     "pinch-zoom none pan-y",
12111     "none pinch-zoom pan-y",
12112     "pan-y pinch-zoom none",
12113     "pan-y none pinch-zoom",
12114     "none pan-y pinch-zoom",
12115     "pan-x pan-y auto",
12116     "pan-x auto pan-y",
12117     "auto pan-x pan-y",
12118     "pan-y pan-x auto",
12119     "pan-y auto pan-x",
12120     "auto pan-y pan-x",
12121     "pan-x pinch-zoom auto",
12122     "pan-x auto pinch-zoom",
12123     "auto pan-x pinch-zoom",
12124     "pinch-zoom pan-x auto",
12125     "pinch-zoom auto pan-x",
12126     "auto pinch-zoom pan-x",
12127     "pinch-zoom pan-y auto",
12128     "pinch-zoom auto pan-y",
12129     "auto pinch-zoom pan-y",
12130     "pan-y pinch-zoom auto",
12131     "pan-y auto pinch-zoom",
12132     "auto pan-y pinch-zoom",
12133     "pan-x pan-y zoom",
12134     "pan-x zoom pan-y",
12135     "zoom pan-x pan-y",
12136     "pan-y pan-x zoom",
12137     "pan-y zoom pan-x",
12138     "zoom pan-y pan-x",
12139     "pinch-zoom pan-y zoom",
12140     "pinch-zoom zoom pan-y",
12141     "zoom pinch-zoom pan-y",
12142     "pan-y pinch-zoom zoom",
12143     "pan-y zoom pinch-zoom",
12144     "zoom pan-y pinch-zoom",
12145     "pan-x pinch-zoom zoom",
12146     "pan-x zoom pinch-zoom",
12147     "zoom pan-x pinch-zoom",
12148     "pinch-zoom pan-x zoom",
12149     "pinch-zoom zoom pan-x",
12150     "zoom pinch-zoom pan-x",
12151     "pan-x pan-y pan-x",
12152     "pan-x pan-x pan-y",
12153     "pan-y pan-x pan-x",
12154     "pan-y pan-x pan-y",
12155     "pan-y pan-y pan-x",
12156     "pan-x pan-y pan-y",
12157     "pan-x pinch-zoom pan-x",
12158     "pan-x pan-x pinch-zoom",
12159     "pinch-zoom pan-x pan-x",
12160     "pinch-zoom pan-x pinch-zoom",
12161     "pinch-zoom pinch-zoom pan-x",
12162     "pan-x pinch-zoom pinch-zoom",
12163     "pinch-zoom pan-y pinch-zoom",
12164     "pinch-zoom pinch-zoom pan-y",
12165     "pan-y pinch-zoom pinch-zoom",
12166     "pan-y pinch-zoom pan-y",
12167     "pan-y pan-y pinch-zoom",
12168     "pinch-zoom pan-y pan-y",
12169     "manipulation none",
12170     "none manipulation",
12171     "manipulation auto",
12172     "auto manipulation",
12173     "manipulation zoom",
12174     "zoom manipulation",
12175     "manipulation manipulation",
12176     "manipulation pan-x",
12177     "pan-x manipulation",
12178     "manipulation pan-y",
12179     "pan-y manipulation",
12180     "manipulation pinch-zoom",
12181     "pinch-zoom manipulation",
12182     "manipulation pan-x pan-y",
12183     "pan-x manipulation pan-y",
12184     "pan-x pan-y manipulation",
12185     "manipulation pan-y pan-x",
12186     "pan-y manipulation pan-x",
12187     "pan-y pan-x manipulation",
12188     "manipulation pinch-zoom pan-y",
12189     "pinch-zoom manipulation pan-y",
12190     "pinch-zoom pan-y manipulation",
12191     "manipulation pan-y pinch-zoom",
12192     "pan-y manipulation pinch-zoom",
12193     "pan-y pinch-zoom manipulation",
12194     "manipulation pan-x pinch-zoom",
12195     "pan-x manipulation pinch-zoom",
12196     "pan-x pinch-zoom manipulation",
12197     "manipulation pinch-zoom pan-x",
12198     "pinch-zoom manipulation pan-x",
12199     "pinch-zoom pan-x manipulation",
12200   ],
12203 gCSSProperties["page"] = {
12204   domProp: "page",
12205   inherited: false,
12206   type: CSS_TYPE_LONGHAND,
12207   initial_values: ["auto"],
12208   other_values: ["page", "small_page", "large_page", "A4"],
12209   invalid_values: ["page1 page2", "auto page", "1cm"],
12212 gCSSProperties["text-justify"] = {
12213   domProp: "textJustify",
12214   inherited: true,
12215   type: CSS_TYPE_LONGHAND,
12216   applies_to_placeholder: true,
12217   initial_values: ["auto"],
12218   other_values: ["none", "inter-word", "inter-character", "distribute"],
12219   invalid_values: [],
12222 if (IsCSSPropertyPrefEnabled("layout.css.text-indent-keywords.enabled")) {
12223   gCSSProperties["text-indent"].other_values.push(
12224     "2em hanging",
12225     "5% each-line",
12226     "-10px hanging each-line",
12227     "hanging calc(2px)",
12228     "each-line calc(-2px)",
12229     "each-line calc(50%) hanging",
12230     "hanging calc(3*25px) each-line",
12231     "each-line hanging calc(25px*3)"
12232   );
12233   gCSSProperties["text-indent"].invalid_values.push(
12234     "hanging",
12235     "each-line",
12236     "-10px hanging hanging",
12237     "each-line calc(2px) each-line"
12238   );
12241 if (IsCSSPropertyPrefEnabled("layout.css.font-variations.enabled")) {
12242   gCSSProperties["font-variation-settings"] = {
12243     domProp: "fontVariationSettings",
12244     inherited: true,
12245     type: CSS_TYPE_LONGHAND,
12246     applies_to_first_letter: true,
12247     applies_to_first_line: true,
12248     applies_to_placeholder: true,
12249     applies_to_marker: true,
12250     applies_to_cue: true,
12251     initial_values: ["normal"],
12252     other_values: [
12253       "'wdth' 0",
12254       "'wdth' -.1",
12255       '"wdth" 1',
12256       "'wdth' 2, 'wght' 3",
12257       '"XXXX" 0',
12258     ],
12259     invalid_values: [
12260       "wdth",
12261       "wdth 1", // unquoted tags
12262       "'wdth'",
12263       "'wdth' 'wght'",
12264       "'wdth', 'wght'", // missing values
12265       "'' 1",
12266       "'wid' 1",
12267       "'width' 1", // incorrect tag lengths
12268       "'wd\th' 1", // non-graphic character in tag
12269       "'wdth' 1 'wght' 2", // missing comma between pairs
12270       "'wdth' 1,", // trailing comma
12271       "'wdth' 1 , , 'wght' 2", // extra comma
12272       "'wdth', 1", // comma within pair
12273     ],
12274     unbalanced_values: [
12275       "'wdth\" 1",
12276       "\"wdth' 1", // mismatched quotes
12277     ],
12278   };
12279   gCSSProperties["font"].subproperties.push("font-variation-settings");
12280   gCSSProperties["font-optical-sizing"] = {
12281     domProp: "fontOpticalSizing",
12282     inherited: true,
12283     type: CSS_TYPE_LONGHAND,
12284     applies_to_first_letter: true,
12285     applies_to_first_line: true,
12286     applies_to_placeholder: true,
12287     applies_to_marker: true,
12288     applies_to_cue: true,
12289     initial_values: ["auto"],
12290     other_values: ["none"],
12291     invalid_values: ["on"],
12292   };
12293   gCSSProperties["font"].subproperties.push("font-optical-sizing");
12294   gCSSProperties["font-variation-settings"].other_values.push(
12295     "'vert' calc(2.5)"
12296   );
12299 if (IsCSSPropertyPrefEnabled("layout.css.font-palette.enabled")) {
12300   gCSSProperties["font-palette"] = {
12301     domProp: "fontPalette",
12302     inherited: true,
12303     type: CSS_TYPE_LONGHAND,
12304     applies_to_first_letter: true,
12305     applies_to_first_line: true,
12306     applies_to_marker: true,
12307     applies_to_placeholder: true,
12308     initial_values: ["normal"],
12309     other_values: ["light", "dark", "--custom"],
12310     invalid_values: ["custom"],
12311   };
12314 if (IsCSSPropertyPrefEnabled("layout.css.font-variant-emoji.enabled")) {
12315   gCSSProperties["font"].subproperties.push("font-variant-emoji");
12316   gCSSProperties["font-variant"].subproperties.push("font-variant-emoji");
12317   gCSSProperties["font-variant-emoji"] = {
12318     domProp: "fontVariantEmoji",
12319     inherited: true,
12320     type: CSS_TYPE_LONGHAND,
12321     applies_to_first_letter: true,
12322     applies_to_first_line: true,
12323     applies_to_marker: true,
12324     applies_to_placeholder: true,
12325     applies_to_cue: true,
12326     initial_values: ["normal"],
12327     other_values: ["text", "emoji", "unicode"],
12328     invalid_values: [
12329       "none",
12330       "auto",
12331       "text emoji",
12332       "auto text",
12333       "normal, unicode",
12334     ],
12335   };
12338 var isGridTemplateMasonryValueEnabled = IsCSSPropertyPrefEnabled(
12339   "layout.css.grid-template-masonry-value.enabled"
12342 if (isGridTemplateMasonryValueEnabled) {
12343   gCSSProperties["masonry-auto-flow"] = {
12344     domProp: "masonryAutoFlow",
12345     inherited: false,
12346     type: CSS_TYPE_LONGHAND,
12347     initial_values: ["pack"],
12348     other_values: ["pack ordered", "ordered next", "next definite-first"],
12349     invalid_values: ["auto", "none", "10px", "row", "dense"],
12350   };
12352   let alignTracks = { ...gCSSProperties["align-content"] };
12353   alignTracks.domProp = "alignTracks";
12354   gCSSProperties["align-tracks"] = alignTracks;
12356   let justifyTracks = { ...gCSSProperties["justify-content"] };
12357   justifyTracks.domProp = "justifyTracks";
12358   gCSSProperties["justify-tracks"] = justifyTracks;
12361 gCSSProperties["display"].other_values.push("grid", "inline-grid");
12362 gCSSProperties["grid-auto-flow"] = {
12363   domProp: "gridAutoFlow",
12364   inherited: false,
12365   type: CSS_TYPE_LONGHAND,
12366   initial_values: ["row"],
12367   other_values: [
12368     "column",
12369     "column dense",
12370     "row dense",
12371     "dense column",
12372     "dense row",
12373     "dense",
12374   ],
12375   invalid_values: ["", "auto", "none", "10px", "column row", "dense row dense"],
12378 gCSSProperties["grid-auto-columns"] = {
12379   domProp: "gridAutoColumns",
12380   inherited: false,
12381   type: CSS_TYPE_LONGHAND,
12382   initial_values: ["auto"],
12383   other_values: [
12384     "40px",
12385     "2em",
12386     "2.5fr",
12387     "12%",
12388     "min-content",
12389     "max-content",
12390     "calc(2px - 99%)",
12391     "minmax(20px, max-content)",
12392     "minmax(min-content, auto)",
12393     "minmax(auto, max-content)",
12394     "m\\69nmax(20px, 4Fr)",
12395     "MinMax(min-content, calc(20px + 10%))",
12396     "fit-content(1px)",
12397     "fit-content(calc(1px - 99%))",
12398     "fit-content(10%)",
12399     "40px 12%",
12400     "2.5fr min-content fit-content(1px)",
12401   ],
12402   invalid_values: [
12403     "",
12404     "normal",
12405     "40ms",
12406     "-40px",
12407     "-12%",
12408     "-2em",
12409     "-2.5fr",
12410     "minmax()",
12411     "minmax(20px)",
12412     "mÄ°nmax(20px, 100px)",
12413     "minmax(20px, 100px, 200px)",
12414     "maxmin(100px, 20px)",
12415     "minmax(min-content, minmax(30px, max-content))",
12416     "fit-content(-1px)",
12417     "fit-content(auto)",
12418     "fit-content(min-content)",
12419     "1px [a] 1px",
12420   ],
12422 gCSSProperties["grid-auto-rows"] = {
12423   domProp: "gridAutoRows",
12424   inherited: false,
12425   type: CSS_TYPE_LONGHAND,
12426   initial_values: gCSSProperties["grid-auto-columns"].initial_values,
12427   other_values: gCSSProperties["grid-auto-columns"].other_values,
12428   invalid_values: gCSSProperties["grid-auto-columns"].invalid_values,
12431 gCSSProperties["grid-template-columns"] = {
12432   domProp: "gridTemplateColumns",
12433   inherited: false,
12434   type: CSS_TYPE_LONGHAND,
12435   initial_values: ["none"],
12436   other_values: [
12437     "auto",
12438     "40px",
12439     "2.5fr",
12440     "[normal] 40px [] auto [ ] 12%",
12441     "[foo] 40px min-content [ bar ] calc(2px - 99%) max-content",
12442     "40px min-content calc(20px + 10%) max-content",
12443     "minmax(min-content, auto)",
12444     "minmax(auto, max-content)",
12445     "m\\69nmax(20px, 4Fr)",
12446     "40px MinMax(min-content, calc(20px + 10%)) max-content",
12447     "40px 2em",
12448     "[] 40px [-foo] 2em [bar baz This is one ident]",
12449     // TODO bug 978478: "[a] repeat(3, [b] 20px [c] 40px [d]) [e]",
12450     "repeat(1, 20px)",
12451     "repeat(1, [a] 20px)",
12452     "[a] Repeat(4, [a] 20px [] auto [b c]) [d]",
12453     "[a] 2.5fr Repeat(4, [a] 20px [] auto [b c]) [d]",
12454     "[a] 2.5fr [z] Repeat(4, [a] 20px [] auto [b c]) [d]",
12455     "[a] 2.5fr [z] Repeat(4, [a] 20px [] auto) [d]",
12456     "[a] 2.5fr [z] Repeat(4, 20px [b c] auto [b c]) [d]",
12457     "[a] 2.5fr [z] Repeat(4, 20px auto) [d]",
12458     "repeat(auto-fill, 0)",
12459     "[a] repeat( Auto-fill,1%)",
12460     "minmax(auto,0) [a] repeat(Auto-fit, 0) minmax(0,auto)",
12461     "minmax(calc(1% + 1px),auto) repeat(Auto-fit,[] 1%) minmax(auto,1%)",
12462     "[a] repeat( auto-fit,[a b] minmax(0,0) )",
12463     "[a] 40px repeat(auto-fit,[a b] minmax(1px, 0) [])",
12464     "[a] calc(1px - 99%) [b] repeat(auto-fit,[a b] minmax(1mm, 1%) [c]) [c]",
12465     "repeat(auto-fill, 0 0)",
12466     "repeat(auto-fill, 0 [] 0)",
12467     "repeat(auto-fill,minmax(1%,auto))",
12468     "repeat(auto-fill,minmax(1em,min-content)) minmax(min-content,0)",
12469     "repeat(auto-fill,minmax(max-content,1mm))",
12470     "repeat(2, fit-content(1px))",
12471     "fit-content(1px) 1fr",
12472     "[a] fit-content(calc(1px - 99%)) [b]",
12473     "[a] fit-content(10%) [b c] fit-content(1em)",
12474     // See https://bugzilla.mozilla.org/show_bug.cgi?id=981300
12475     "[none subgrid min-content max-content foo] 40px",
12476     "subgrid",
12477     "subgrid [] [foo bar]",
12478     "subgrid repeat(1, [])",
12479     "subgrid Repeat(4, [a] [b c] [] [d])",
12480     "subgrid repeat(auto-fill, [])",
12481     "subgrid repeat(Auto-fill, [a b c]) [a] []",
12482     "subgrid [x] repeat( Auto-fill, [a b c]) []",
12483     "subgrid [x] repeat( auto-fill , [a b] [c]) [y]",
12484     "subgrid repeat(auto-fill, [a] [b] [c]) [d]",
12485     "subgrid repeat(Auto-fill, [a] [b c] [] [d])",
12486     "subgrid [x y] [x] repeat(auto-fill, [a b] [c] [d] [d]) [x] [x]",
12487     "subgrid [x] repeat(auto-fill, []) [y z]",
12488     "subgrid [x] repeat(auto-fill, [y]) [z] [] repeat(2, [a] [b]) [y] []",
12489     "subgrid [x] repeat(auto-fill, []) [x y] [z] [] []",
12490   ],
12491   invalid_values: [
12492     "",
12493     "normal",
12494     "40ms",
12495     "-40px",
12496     "-12%",
12497     "-2fr",
12498     "[foo]",
12499     "[inherit] 40px",
12500     "[initial] 40px",
12501     "[unset] 40px",
12502     "[default] 40px",
12503     "[span] 40px",
12504     "[6%] 40px",
12505     "[5th] 40px",
12506     "[foo[] bar] 40px",
12507     "[foo]] 40px",
12508     "(foo) 40px",
12509     "[foo] [bar] 40px",
12510     "40px [foo] [bar]",
12511     "minmax()",
12512     "minmax(20px)",
12513     "mÄ°nmax(20px, 100px)",
12514     "minmax(20px, 100px, 200px)",
12515     "maxmin(100px, 20px)",
12516     "minmax(min-content, minmax(30px, max-content))",
12517     "repeat(0, 20px)",
12518     "repeat(-3, 20px)",
12519     "rêpeat(1, 20px)",
12520     "repeat(1)",
12521     "repeat(1, )",
12522     "repeat(3px, 20px)",
12523     "repeat(2.0, 20px)",
12524     "repeat(2.5, 20px)",
12525     "repeat(2, (foo))",
12526     "repeat(2, foo)",
12527     "40px calc(0px + rubbish)",
12528     "repeat(1, repeat(1, 20px))",
12529     "repeat(auto-fill, auto)",
12530     "repeat(auto-fit,auto)",
12531     "repeat(auto-fill, fit-content(1px))",
12532     "repeat(auto-fit, fit-content(1px))",
12533     "repeat(auto-fit,[])",
12534     "repeat(auto-fill, 0) repeat(auto-fit, 0) ",
12535     "repeat(auto-fit, 0) repeat(auto-fill, 0) ",
12536     "[a] repeat(auto-fit, 0) repeat(auto-fit, 0) ",
12537     "[a] repeat(auto-fill, 0) [a] repeat(auto-fill, 0) ",
12538     "repeat(auto-fill, min-content)",
12539     "repeat(auto-fit,max-content)",
12540     "repeat(auto-fit,1fr)",
12541     "repeat(auto-fit,minmax(auto,auto))",
12542     "repeat(auto-fit,minmax(min-content,1fr))",
12543     "repeat(auto-fit,minmax(1fr,auto))",
12544     "repeat(auto-fill,minmax(1fr,1em))",
12545     "repeat(auto-fill, 10px) auto",
12546     "auto repeat(auto-fit, 10px)",
12547     "minmax(min-content,max-content) repeat(auto-fit, 0)",
12548     "10px [a] 10px [b a] 1fr [b] repeat(auto-fill, 0)",
12549     "fit-content(-1px)",
12550     "fit-content(auto)",
12551     "fit-content(min-content)",
12552     "fit-content(1px) repeat(auto-fit, 1px)",
12553     "fit-content(1px) repeat(auto-fill, 1px)",
12554     "subgrid [inherit]",
12555     "subgrid [initial]",
12556     "subgrid [unset]",
12557     "subgrid [default]",
12558     "subgrid [span]",
12559     "subgrid [foo] 40px",
12560     "subgrid [foo 40px]",
12561     "[foo] subgrid",
12562     "subgrid rêpeat(1, [])",
12563     "subgrid repeat(0, [])",
12564     "subgrid repeat(-3, [])",
12565     "subgrid repeat(2.0, [])",
12566     "subgrid repeat(2.5, [])",
12567     "subgrid repeat(3px, [])",
12568     "subgrid repeat(1)",
12569     "subgrid repeat(1, )",
12570     "subgrid repeat(2, [40px])",
12571     "subgrid repeat(2, foo)",
12572     "subgrid repeat(1, repeat(1, []))",
12573     "subgrid repeat(auto-fill)",
12574     "subgrid repeat(auto-fill) [a]",
12575     "subgrid repeat(auto-fill) []",
12576     "subgrid [a] repeat(auto-fill)",
12577     "subgrid repeat(auto-fill,)",
12578     "subgrid repeat(auto-fill,)",
12579     "subgrid repeat(auto-fill,) [a]",
12580     "subgrid repeat(auto-fill,) []",
12581     "subgrid [a] repeat(auto-fill,)",
12582     "subgrid repeat(auto-fit,[])",
12583     "subgrid [] repeat(auto-fit,[])",
12584     "subgrid [a] repeat(auto-fit,[])",
12585     "subgrid repeat(auto-fill, 1px)",
12586     "subgrid repeat(auto-fill, 1px [])",
12587     "subgrid repeat(auto-fill, []) repeat(auto-fill, [])",
12588   ],
12589   unbalanced_values: ["(foo] 40px"],
12591 if (isGridTemplateMasonryValueEnabled) {
12592   gCSSProperties["grid-template-columns"].other_values.push("masonry");
12593   gCSSProperties["grid-template-columns"].invalid_values.push(
12594     "masonry []",
12595     "masonry [foo] 40px",
12596     "masonry 40px",
12597     "[foo] masonry",
12598     "0px masonry",
12599     "masonry masonry",
12600     "subgrid masonry",
12601     "masonry subgrid",
12602     "masonry repeat(1, [])"
12603   );
12605 gCSSProperties["grid-template-rows"] = {
12606   domProp: "gridTemplateRows",
12607   inherited: false,
12608   type: CSS_TYPE_LONGHAND,
12609   initial_values: gCSSProperties["grid-template-columns"].initial_values,
12610   other_values: gCSSProperties["grid-template-columns"].other_values,
12611   invalid_values: gCSSProperties["grid-template-columns"].invalid_values,
12613 gCSSProperties["grid-template-areas"] = {
12614   domProp: "gridTemplateAreas",
12615   inherited: false,
12616   type: CSS_TYPE_LONGHAND,
12617   initial_values: ["none"],
12618   other_values: [
12619     "'1a-é_ .' \"b .\"",
12620     "' Z\t\\aZ' 'Z Z'",
12621     " '. . a b'  '. .a b' ",
12622     "'a.b' '. . .'",
12623     "'.' '..'",
12624     "'...' '.'",
12625     "'...-blah' '. .'",
12626     "'.. ..' '.. ...'",
12627   ],
12628   invalid_values: [
12629     "''",
12630     "' '",
12631     "'' ''",
12632     "'a b' 'a/b'",
12633     "'a . a'",
12634     "'. a a' 'a a a'",
12635     "'a a .' 'a a a'",
12636     "'a a' 'a .'",
12637     "'a a'\n'..'\n'a a'",
12638   ],
12641 gCSSProperties["grid-template"] = {
12642   domProp: "gridTemplate",
12643   inherited: false,
12644   type: CSS_TYPE_TRUE_SHORTHAND,
12645   subproperties: [
12646     "grid-template-areas",
12647     "grid-template-rows",
12648     "grid-template-columns",
12649   ],
12650   initial_values: ["none", "none / none"],
12651   other_values: [
12652     // <'grid-template-rows'> / <'grid-template-columns'>
12653     "40px / 100px",
12654     "[foo] 40px [bar] / [baz] repeat(auto-fill,100px) [fizz]",
12655     " none/100px",
12656     "40px/none",
12657     // [ <line-names>? <string> <track-size>? <line-names>? ]+ [ / <explicit-track-list> ]?
12658     "'fizz'",
12659     "[bar] 'fizz'",
12660     "'fizz' / [foo] 40px",
12661     "[bar] 'fizz' / [foo] 40px",
12662     "'fizz' 100px / [foo] 40px",
12663     "[bar] 'fizz' 100px / [foo] 40px",
12664     "[bar] 'fizz' 100px [buzz] / [foo] 40px",
12665     "[bar] 'fizz' 100px [buzz] \n [a] '.' 200px [b] / [foo] 40px",
12666     "subgrid / subgrid",
12667     "subgrid/40px 20px",
12668     "subgrid [foo] [] [bar baz] / 40px 20px",
12669     "40px 20px/subgrid",
12670     "40px 20px/subgrid  [foo] [] repeat(3, [a] [b]) [bar baz]",
12671     "subgrid/subgrid",
12672     "subgrid [foo] [] [bar baz]/subgrid [foo] [] [bar baz]",
12673   ],
12674   invalid_values: [
12675     "'fizz' / repeat(1, 100px)",
12676     "'fizz' repeat(1, 100px) / 0px",
12677     "[foo] [bar] 40px / 100px",
12678     "[fizz] [buzz] 100px / 40px",
12679     "[fizz] [buzz] 'foo' / 40px",
12680     "'foo' / none",
12681     "subgrid",
12682     "subgrid []",
12683     "subgrid [] / 'fizz'",
12684     "subgrid / 'fizz'",
12685   ],
12687 if (isGridTemplateMasonryValueEnabled) {
12688   gCSSProperties["grid-template"].other_values.push(
12689     "masonry / subgrid",
12690     "subgrid / masonry",
12691     "masonry / masonry" /* valid but behaves as 'masonry / none' */,
12692     "masonry/40px 20px",
12693     "subgrid [foo] [] [bar baz] / masonry",
12694     "40px 20px/masonry",
12695     "masonry/subgrid  [foo] [] repeat(3, [a] [b]) [bar baz]",
12696     "subgrid [foo] [] [bar baz]/masonry"
12697   );
12698   gCSSProperties["grid-template"].invalid_values.push(
12699     "masonry",
12700     "masonry / 'fizz'"
12701   );
12704 gCSSProperties["grid"] = {
12705   domProp: "grid",
12706   inherited: false,
12707   type: CSS_TYPE_TRUE_SHORTHAND,
12708   subproperties: [
12709     "grid-template-areas",
12710     "grid-template-rows",
12711     "grid-template-columns",
12712     "grid-auto-flow",
12713     "grid-auto-rows",
12714     "grid-auto-columns",
12715   ],
12716   initial_values: ["none", "none / none"],
12717   other_values: [
12718     "auto-flow 40px / none",
12719     "auto-flow 40px 100px / 0",
12720     "auto-flow / 40px",
12721     "auto-flow dense auto / auto",
12722     "dense auto-flow minmax(min-content, 2fr) / auto",
12723     "dense auto-flow / 100px",
12724     "none / auto-flow 40px",
12725     "40px / auto-flow",
12726     "none / dense auto-flow auto",
12727   ].concat(gCSSProperties["grid-template"].other_values),
12728   invalid_values: [
12729     "auto-flow",
12730     " / auto-flow",
12731     "dense 0 / 0",
12732     "dense dense 40px / 0",
12733     "auto-flow / auto-flow",
12734     "auto-flow / dense",
12735     "auto-flow [a] 0 / 0",
12736     "0 / auto-flow [a] 0",
12737     "auto-flow -20px / 0",
12738     "auto-flow 200ms / 0",
12739     "auto-flow 1px [a] 1px / 0",
12740   ].concat(
12741     gCSSProperties["grid-template"].invalid_values,
12742     gCSSProperties["grid-auto-flow"].other_values,
12743     gCSSProperties["grid-auto-flow"].invalid_values.filter(v => v != "none")
12744   ),
12747 var gridLineOtherValues = [
12748   "foo",
12749   "2",
12750   "2 foo",
12751   "foo 2",
12752   "-3",
12753   "-3 bar",
12754   "bar -3",
12755   "span 2",
12756   "2 span",
12757   "span foo",
12758   "foo span",
12759   "span 2 foo",
12760   "span foo 2",
12761   "2 foo span",
12762   "foo 2 span",
12764 var gridLineInvalidValues = [
12765   "",
12766   "4th",
12767   "span",
12768   "inherit 2",
12769   "2 inherit",
12770   "20px",
12771   "2 3",
12772   "2.5",
12773   "2.0",
12774   "0",
12775   "0 foo",
12776   "span 0",
12777   "2 foo 3",
12778   "foo 2 foo",
12779   "2 span foo",
12780   "foo span 2",
12781   "span -3",
12782   "span -3 bar",
12783   "span 2 span",
12784   "span foo span",
12785   "span 2 foo span",
12788 gCSSProperties["grid-column-start"] = {
12789   domProp: "gridColumnStart",
12790   inherited: false,
12791   type: CSS_TYPE_LONGHAND,
12792   initial_values: ["auto"],
12793   other_values: gridLineOtherValues,
12794   invalid_values: gridLineInvalidValues,
12796 gCSSProperties["grid-column-end"] = {
12797   domProp: "gridColumnEnd",
12798   inherited: false,
12799   type: CSS_TYPE_LONGHAND,
12800   initial_values: ["auto"],
12801   other_values: gridLineOtherValues,
12802   invalid_values: gridLineInvalidValues,
12804 gCSSProperties["grid-row-start"] = {
12805   domProp: "gridRowStart",
12806   inherited: false,
12807   type: CSS_TYPE_LONGHAND,
12808   initial_values: ["auto"],
12809   other_values: gridLineOtherValues,
12810   invalid_values: gridLineInvalidValues,
12812 gCSSProperties["grid-row-end"] = {
12813   domProp: "gridRowEnd",
12814   inherited: false,
12815   type: CSS_TYPE_LONGHAND,
12816   initial_values: ["auto"],
12817   other_values: gridLineOtherValues,
12818   invalid_values: gridLineInvalidValues,
12821 // The grid-column and grid-row shorthands take values of the form
12822 //   <grid-line> [ / <grid-line> ]?
12823 var gridColumnRowOtherValues = [].concat(gridLineOtherValues);
12824 gridLineOtherValues.concat(["auto"]).forEach(function (val) {
12825   gridColumnRowOtherValues.push(" foo / " + val);
12826   gridColumnRowOtherValues.push(val + "/2");
12828 var gridColumnRowInvalidValues = ["foo, bar", "foo / bar / baz"].concat(
12829   gridLineInvalidValues
12831 gridLineInvalidValues.forEach(function (val) {
12832   gridColumnRowInvalidValues.push("span 3 / " + val);
12833   gridColumnRowInvalidValues.push(val + " / foo");
12835 gCSSProperties["grid-column"] = {
12836   domProp: "gridColumn",
12837   inherited: false,
12838   type: CSS_TYPE_TRUE_SHORTHAND,
12839   subproperties: ["grid-column-start", "grid-column-end"],
12840   initial_values: ["auto", "auto / auto"],
12841   other_values: gridColumnRowOtherValues,
12842   invalid_values: gridColumnRowInvalidValues,
12844 gCSSProperties["grid-row"] = {
12845   domProp: "gridRow",
12846   inherited: false,
12847   type: CSS_TYPE_TRUE_SHORTHAND,
12848   subproperties: ["grid-row-start", "grid-row-end"],
12849   initial_values: ["auto", "auto / auto"],
12850   other_values: gridColumnRowOtherValues,
12851   invalid_values: gridColumnRowInvalidValues,
12854 var gridAreaOtherValues = gridLineOtherValues.slice();
12855 gridLineOtherValues.forEach(function (val) {
12856   gridAreaOtherValues.push("foo / " + val);
12857   gridAreaOtherValues.push(val + "/2/3");
12858   gridAreaOtherValues.push("foo / bar / " + val + " / baz");
12860 var gridAreaInvalidValues = [
12861   "foo, bar",
12862   "foo / bar / baz / fizz / buzz",
12863   "default / foo / bar / baz",
12864   "foo / initial / bar / baz",
12865   "foo / bar / inherit / baz",
12866   "foo / bar / baz / unset",
12867 ].concat(gridLineInvalidValues);
12868 gridLineInvalidValues.forEach(function (val) {
12869   gridAreaInvalidValues.push("foo / " + val);
12870   gridAreaInvalidValues.push("foo / bar / " + val);
12871   gridAreaInvalidValues.push("foo / 4 / bar / " + val);
12874 gCSSProperties["grid-area"] = {
12875   domProp: "gridArea",
12876   inherited: false,
12877   type: CSS_TYPE_TRUE_SHORTHAND,
12878   subproperties: [
12879     "grid-row-start",
12880     "grid-column-start",
12881     "grid-row-end",
12882     "grid-column-end",
12883   ],
12884   initial_values: [
12885     "auto",
12886     "auto / auto",
12887     "auto / auto / auto",
12888     "auto / auto / auto / auto",
12889   ],
12890   other_values: gridAreaOtherValues,
12891   invalid_values: gridAreaInvalidValues,
12894 gCSSProperties["column-gap"] = {
12895   domProp: "columnGap",
12896   inherited: false,
12897   type: CSS_TYPE_LONGHAND,
12898   initial_values: ["normal"],
12899   other_values: [
12900     "2px",
12901     "2%",
12902     "1em",
12903     "calc(1px + 1em)",
12904     "calc(1%)",
12905     "calc(1% + 1ch)",
12906     "calc(1px - 99%)",
12907   ],
12908   invalid_values: [
12909     "-1px",
12910     "auto",
12911     "none",
12912     "1px 1px",
12913     "-1%",
12914     "fit-content(1px)",
12915   ],
12917 gCSSProperties["grid-column-gap"] = {
12918   domProp: "gridColumnGap",
12919   inherited: false,
12920   type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
12921   alias_for: "column-gap",
12922   subproperties: ["column-gap"],
12924 gCSSProperties["row-gap"] = {
12925   domProp: "rowGap",
12926   inherited: false,
12927   type: CSS_TYPE_LONGHAND,
12928   initial_values: ["normal"],
12929   other_values: [
12930     "2px",
12931     "2%",
12932     "1em",
12933     "calc(1px + 1em)",
12934     "calc(1%)",
12935     "calc(1% + 1ch)",
12936     "calc(1px - 99%)",
12937   ],
12938   invalid_values: ["-1px", "auto", "none", "1px 1px", "-1%", "min-content"],
12940 gCSSProperties["grid-row-gap"] = {
12941   domProp: "gridRowGap",
12942   inherited: false,
12943   type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
12944   alias_for: "row-gap",
12945   subproperties: ["row-gap"],
12947 gCSSProperties["gap"] = {
12948   domProp: "gap",
12949   inherited: false,
12950   type: CSS_TYPE_TRUE_SHORTHAND,
12951   subproperties: ["column-gap", "row-gap"],
12952   initial_values: ["normal", "normal normal"],
12953   other_values: [
12954     "1ch 0",
12955     "1px 1%",
12956     "1em 1px",
12957     "calc(1px) calc(1%)",
12958     "normal 0",
12959     "1% normal",
12960   ],
12961   invalid_values: [
12962     "-1px",
12963     "1px -1px",
12964     "1px 1px 1px",
12965     "inherit 1px",
12966     "1px auto",
12967   ],
12969 gCSSProperties["grid-gap"] = {
12970   domProp: "gridGap",
12971   inherited: false,
12972   type: CSS_TYPE_TRUE_SHORTHAND,
12973   alias_for: "gap",
12974   subproperties: ["column-gap", "row-gap"],
12977 gCSSProperties["contain"] = {
12978   domProp: "contain",
12979   inherited: false,
12980   type: CSS_TYPE_LONGHAND,
12981   initial_values: ["none"],
12982   other_values: [
12983     "strict",
12984     "layout",
12985     "size",
12986     "content",
12987     "paint",
12988     "layout paint",
12989     "paint layout",
12990     "size layout",
12991     "paint size",
12992     "layout size paint",
12993     "layout paint size",
12994     "size paint layout",
12995     "paint size layout",
12996   ],
12997   invalid_values: [
12998     "none strict",
12999     "none size",
13000     "strict layout",
13001     "strict layout size",
13002     "layout strict",
13003     "layout content",
13004     "strict content",
13005     "layout size strict",
13006     "layout size paint strict",
13007     "paint strict",
13008     "size strict",
13009     "paint paint",
13010     "content content",
13011     "size content",
13012     "content strict size",
13013     "paint layout content",
13014     "layout size content",
13015     "size size",
13016     "strict strict",
13017     "auto",
13018     "10px",
13019     "0",
13020   ],
13023 if (IsCSSPropertyPrefEnabled("layout.css.initial-letter.enabled")) {
13024   gCSSProperties["initial-letter"] = {
13025     domProp: "initialLetter",
13026     inherited: false,
13027     type: CSS_TYPE_LONGHAND,
13028     applies_to_first_letter: true,
13029     initial_values: ["normal"],
13030     other_values: ["2", "2.5", "3.7 2", "4 3"],
13031     invalid_values: ["-3", "3.7 -2", "25%", "16px", "1 0", "0", "0 1"],
13032   };
13035 if (IsCSSPropertyPrefEnabled("layout.css.osx-font-smoothing.enabled")) {
13036   gCSSProperties["-moz-osx-font-smoothing"] = {
13037     domProp: "MozOsxFontSmoothing",
13038     inherited: true,
13039     type: CSS_TYPE_LONGHAND,
13040     applies_to_first_letter: true,
13041     applies_to_first_line: true,
13042     applies_to_placeholder: true,
13043     applies_to_cue: true,
13044     applies_to_marker: true,
13045     initial_values: ["auto"],
13046     other_values: ["grayscale"],
13047     invalid_values: ["none", "subpixel-antialiased", "antialiased"],
13048   };
13051 if (IsCSSPropertyPrefEnabled("layout.css.scroll-anchoring.enabled")) {
13052   gCSSProperties["overflow-anchor"] = {
13053     domProp: "overflowAnchor",
13054     inherited: false,
13055     type: CSS_TYPE_LONGHAND,
13056     initial_values: ["auto"],
13057     other_values: ["none"],
13058     invalid_values: [],
13059   };
13062 if (IsCSSPropertyPrefEnabled("layout.css.overflow-clip-box.enabled")) {
13063   gCSSProperties["overflow-clip-box-block"] = {
13064     domProp: "overflowClipBoxBlock",
13065     inherited: false,
13066     type: CSS_TYPE_LONGHAND,
13067     applies_to_placeholder: true,
13068     initial_values: ["padding-box"],
13069     other_values: ["content-box"],
13070     invalid_values: ["auto", "border-box", "0", "padding-box padding-box"],
13071   };
13072   gCSSProperties["overflow-clip-box-inline"] = {
13073     domProp: "overflowClipBoxInline",
13074     inherited: false,
13075     type: CSS_TYPE_LONGHAND,
13076     applies_to_placeholder: true,
13077     initial_values: ["padding-box"],
13078     other_values: ["content-box"],
13079     invalid_values: ["none", "border-box", "0", "content-box content-box"],
13080   };
13081   gCSSProperties["overflow-clip-box"] = {
13082     domProp: "overflowClipBox",
13083     inherited: false,
13084     type: CSS_TYPE_TRUE_SHORTHAND,
13085     subproperties: ["overflow-clip-box-block", "overflow-clip-box-inline"],
13086     initial_values: ["padding-box"],
13087     other_values: [
13088       "content-box",
13089       "padding-box content-box",
13090       "content-box padding-box",
13091       "content-box content-box",
13092     ],
13093     invalid_values: [
13094       "none",
13095       "auto",
13096       "content-box none",
13097       "border-box",
13098       "0",
13099       "content-box, content-box",
13100     ],
13101   };
13104 if (IsCSSPropertyPrefEnabled("layout.css.overscroll-behavior.enabled")) {
13105   gCSSProperties["overscroll-behavior-x"] = {
13106     domProp: "overscrollBehaviorX",
13107     inherited: false,
13108     type: CSS_TYPE_LONGHAND,
13109     initial_values: ["auto"],
13110     other_values: ["contain", "none"],
13111     invalid_values: ["left", "1px"],
13112   };
13113   gCSSProperties["overscroll-behavior-y"] = {
13114     domProp: "overscrollBehaviorY",
13115     inherited: false,
13116     type: CSS_TYPE_LONGHAND,
13117     initial_values: ["auto"],
13118     other_values: ["contain", "none"],
13119     invalid_values: ["left", "1px"],
13120   };
13121   gCSSProperties["overscroll-behavior-inline"] = {
13122     domProp: "overscrollBehaviorInline",
13123     inherited: false,
13124     logical: true,
13125     type: CSS_TYPE_LONGHAND,
13126     initial_values: ["auto"],
13127     other_values: ["contain", "none"],
13128     invalid_values: ["left", "1px"],
13129   };
13130   gCSSProperties["overscroll-behavior-block"] = {
13131     domProp: "overscrollBehaviorBlock",
13132     inherited: false,
13133     logical: true,
13134     type: CSS_TYPE_LONGHAND,
13135     initial_values: ["auto"],
13136     other_values: ["contain", "none"],
13137     invalid_values: ["left", "1px"],
13138   };
13139   gCSSProperties["overscroll-behavior"] = {
13140     domProp: "overscrollBehavior",
13141     inherited: false,
13142     type: CSS_TYPE_TRUE_SHORTHAND,
13143     subproperties: ["overscroll-behavior-x", "overscroll-behavior-y"],
13144     initial_values: ["auto"],
13145     other_values: [
13146       "contain",
13147       "none",
13148       "contain contain",
13149       "contain auto",
13150       "none contain",
13151     ],
13152     invalid_values: ["left", "1px", "contain auto none", "contain nonsense"],
13153   };
13157   const patterns = {
13158     background: [
13159       "{} scroll no-repeat",
13160       "{} repeat",
13161       "url(404.png), {}, -moz-element(#a) black",
13162     ],
13163     mask: [
13164       "{} add no-repeat",
13165       "{} repeat",
13166       "url(404.png), {}, -moz-element(#a) alpha",
13167     ],
13168   };
13170   for (const prop of ["background", "mask"]) {
13171     let i = 0;
13172     const p = patterns[prop];
13173     for (const v of invalidNonUrlImageValues) {
13174       gCSSProperties[prop].invalid_values.push(
13175         p[i++ % p.length].replace("{}", v)
13176       );
13177     }
13178     for (const v of validNonUrlImageValues) {
13179       gCSSProperties[prop].other_values.push(
13180         p[i++ % p.length].replace("{}", v)
13181       );
13182     }
13183   }
13186 gCSSProperties["display"].other_values.push("flow-root");
13188 gCSSProperties["hyphenate-character"] = {
13189   domProp: "hyphenateCharacter",
13190   inherited: true,
13191   type: CSS_TYPE_LONGHAND,
13192   applies_to_first_letter: true,
13193   applies_to_first_line: true,
13194   applies_to_placeholder: true,
13195   initial_values: ["auto"],
13196   other_values: ['"="', '"/-/"', '"\1400"', '""'],
13197   invalid_values: ["none", "auto auto", "1400", "U+1400"],
13200 if (IsCSSPropertyPrefEnabled("layout.css.content-visibility.enabled")) {
13201   gCSSProperties["content-visibility"] = {
13202     domProp: "contentVisibility",
13203     inherited: false,
13204     type: CSS_TYPE_LONGHAND,
13205     initial_values: ["visible"],
13206     other_values: ["auto", "hidden"],
13207     invalid_values: [
13208       "invisible",
13209       "partially-visible",
13210       "auto auto",
13211       "visible hidden",
13212     ],
13213   };
13216 if (IsCSSPropertyPrefEnabled("layout.css.contain-intrinsic-size.enabled")) {
13217   gCSSProperties["contain-intrinsic-width"] = {
13218     domProp: "containIntrinsicWidth",
13219     inherited: false,
13220     type: CSS_TYPE_LONGHAND,
13221     initial_values: ["none"],
13222     other_values: ["1em", "1px", "auto 1px", "auto none"],
13223     invalid_values: ["auto auto", "auto", "-1px"],
13224   };
13225   gCSSProperties["contain-intrinsic-height"] = {
13226     domProp: "containIntrinsicHeight",
13227     inherited: false,
13228     type: CSS_TYPE_LONGHAND,
13229     initial_values: ["none"],
13230     other_values: ["1em", "1px", "auto 1px", "auto none"],
13231     invalid_values: ["auto auto", "auto", "-1px"],
13232   };
13233   gCSSProperties["contain-intrinsic-block-size"] = {
13234     domProp: "containIntrinsicBlockSize",
13235     inherited: false,
13236     logical: true,
13237     type: CSS_TYPE_LONGHAND,
13238     initial_values: ["none"],
13239     other_values: ["1em", "1px", "auto 1px", "auto none"],
13240     invalid_values: ["auto auto", "auto", "-1px"],
13241   };
13242   gCSSProperties["contain-intrinsic-inline-size"] = {
13243     domProp: "containIntrinsicInlineSize",
13244     inherited: false,
13245     logical: true,
13246     type: CSS_TYPE_LONGHAND,
13247     initial_values: ["none"],
13248     other_values: ["1em", "1px", "auto 1px", "auto none"],
13249     invalid_values: ["auto auto", "auto", "-1px"],
13250   };
13252   gCSSProperties["contain-intrinsic-size"] = {
13253     domProp: "containIntrinsicSize",
13254     inherited: false,
13255     type: CSS_TYPE_TRUE_SHORTHAND,
13256     subproperties: ["contain-intrinsic-width", "contain-intrinsic-height"],
13257     initial_values: ["none"],
13258     other_values: ["1em 1em", "1px 1px", "auto 1px auto 1px", "1px auto 1px"],
13259     invalid_values: ["auto auto", "-1px -1px", "1px, auto none"],
13260   };
13263 if (IsCSSPropertyPrefEnabled("layout.css.container-queries.enabled")) {
13264   gCSSProperties["container-type"] = {
13265     domProp: "containerType",
13266     inherited: false,
13267     type: CSS_TYPE_LONGHAND,
13268     initial_values: ["normal"],
13269     other_values: ["inline-size", "size"],
13270     invalid_values: [
13271       "none style",
13272       "none inline-size",
13273       "inline-size none",
13274       "style none",
13275       "style style",
13276       "inline-size style inline-size",
13277       "inline-size block-size",
13278       "block-size",
13279       "block-size style",
13280       "size inline-size",
13281       "size block-size",
13282     ],
13283   };
13284   gCSSProperties["container-name"] = {
13285     domProp: "containerName",
13286     inherited: false,
13287     type: CSS_TYPE_LONGHAND,
13288     initial_values: ["none"],
13289     other_values: ["foo bar", "foo", "baz bazz", "foo foo"],
13290     invalid_values: ["foo unset", "none bar", "foo initial", "initial foo"],
13291   };
13292   gCSSProperties["container"] = {
13293     domProp: "container",
13294     inherited: false,
13295     type: CSS_TYPE_TRUE_SHORTHAND,
13296     subproperties: ["container-type", "container-name"],
13297     initial_values: ["none"],
13298     other_values: ["foo / size", "foo bar / size", "foo / inline-size", "foo"],
13299     invalid_values: ["size / foo", "size / foo bar"],
13300   };
13303 if (false) {
13304   // TODO These properties are chrome-only, and are not exposed via CSSOM.
13305   // We may still want to find a way to test them. See bug 1206999.
13306   gCSSProperties["-moz-window-shadow"] = {
13307     //domProp: "MozWindowShadow",
13308     inherited: false,
13309     type: CSS_TYPE_LONGHAND,
13310     initial_values: ["default"],
13311     other_values: ["none", "menu", "tooltip", "sheet", "cliprounded"],
13312     invalid_values: [],
13313   };
13315   gCSSProperties["-moz-window-opacity"] = {
13316     // domProp: "MozWindowOpacity",
13317     inherited: false,
13318     type: CSS_TYPE_LONGHAND,
13319     initial_values: [
13320       "1",
13321       "17",
13322       "397.376",
13323       "3e1",
13324       "3e+1",
13325       "3e0",
13326       "3e+0",
13327       "3e-0",
13328       "300%",
13329     ],
13330     other_values: ["0", "0.4", "0.0000", "-3", "3e-1", "-100%", "50%"],
13331     invalid_values: ["0px", "1px", "20%", "default", "auto"],
13332   };
13334   gCSSProperties["-moz-window-transform"] = {
13335     // domProp: "MozWindowTransform",
13336     inherited: false,
13337     type: CSS_TYPE_LONGHAND,
13338     prerequisites: { width: "300px", height: "50px" },
13339     initial_values: ["none"],
13340     other_values: [
13341       "translatex(1px)",
13342       "translatex(4em)",
13343       "translatex(-4px)",
13344       "translatex(3px)",
13345       "translatex(0px) translatex(1px) translatex(2px) translatex(3px) translatex(4px)",
13346       "translatey(4em)",
13347       "translate(3px)",
13348       "translate(10px, -3px)",
13349       "rotate(45deg)",
13350       "rotate(45grad)",
13351       "rotate(45rad)",
13352       "rotate(0.25turn)",
13353       "rotate(0)",
13354       "scalex(10)",
13355       "scalex(10%)",
13356       "scalex(-10)",
13357       "scalex(-10%)",
13358       "scaley(10)",
13359       "scaley(10%)",
13360       "scaley(-10)",
13361       "scaley(-10%)",
13362       "scale(10)",
13363       "scale(10%)",
13364       "scale(10, 20)",
13365       "scale(10%, 20%)",
13366       "scale(-10)",
13367       "scale(-10%)",
13368       "scale(-10, 20)",
13369       "scale(10%, -20%)",
13370       "scale(10, 20%)",
13371       "scale(-10, 20%)",
13372       "skewx(30deg)",
13373       "skewx(0)",
13374       "skewy(0)",
13375       "skewx(30grad)",
13376       "skewx(30rad)",
13377       "skewx(0.08turn)",
13378       "skewy(30deg)",
13379       "skewy(30grad)",
13380       "skewy(30rad)",
13381       "skewy(0.08turn)",
13382       "rotate(45deg) scale(2, 1)",
13383       "skewx(45deg) skewx(-50grad)",
13384       "translate(0, 0) scale(1, 1) skewx(0) skewy(0) matrix(1, 0, 0, 1, 0, 0)",
13385       "translatex(50%)",
13386       "translatey(50%)",
13387       "translate(50%)",
13388       "translate(3%, 5px)",
13389       "translate(5px, 3%)",
13390       "matrix(1, 2, 3, 4, 5, 6)",
13391       /* valid calc() values */
13392       "translatex(calc(5px + 10%))",
13393       "translatey(calc(0.25 * 5px + 10% / 3))",
13394       "translate(calc(5px - 10% * 3))",
13395       "translate(calc(5px - 3 * 10%), 50px)",
13396       "translate(-50px, calc(5px - 10% * 3))",
13397       "translatez(1px)",
13398       "translatez(4em)",
13399       "translatez(-4px)",
13400       "translatez(0px)",
13401       "translatez(2px) translatez(5px)",
13402       "translate3d(3px, 4px, 5px)",
13403       "translate3d(2em, 3px, 1em)",
13404       "translatex(2px) translate3d(4px, 5px, 6px) translatey(1px)",
13405       "scale3d(4, 4, 4)",
13406       "scale3d(4%, 4%, 4%)",
13407       "scale3d(-2, 3, -7)",
13408       "scale3d(-2%, 3%, -7%)",
13409       "scalez(4)",
13410       "scalez(4%)",
13411       "scalez(-6)",
13412       "scalez(-6%)",
13413       "rotate3d(2, 3, 4, 45deg)",
13414       "rotate3d(-3, 7, 0, 12rad)",
13415       "rotatex(15deg)",
13416       "rotatey(-12grad)",
13417       "rotatez(72rad)",
13418       "rotatex(0.125turn)",
13419       "perspective(0px)",
13420       "perspective(1000px)",
13421       "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)",
13422       "translate(10px, calc(min(5px,10%)))",
13423       "translate(calc(max(5px,10%)), 10%)",
13424       "translate(max(5px,10%), 10%)",
13425     ],
13426     invalid_values: [
13427       "1px",
13428       "#0000ff",
13429       "red",
13430       "auto",
13431       "translatex(1)",
13432       "translatey(1)",
13433       "translate(2)",
13434       "translate(-3, -4)",
13435       "translatex(1px 1px)",
13436       "translatex(translatex(1px))",
13437       "translatex(#0000ff)",
13438       "translatex(red)",
13439       "translatey()",
13440       "matrix(1px, 2px, 3px, 4px, 5px, 6px)",
13441       "skewx(red)",
13442       "matrix(1%, 0, 0, 0, 0px, 0px)",
13443       "matrix(0, 1%, 2, 3, 4px,5px)",
13444       "matrix(0, 1, 2%, 3, 4px, 5px)",
13445       "matrix(0, 1, 2, 3%, 4%, 5%)",
13446       "matrix(1, 2, 3, 4, 5px, 6%)",
13447       "matrix(1, 2, 3, 4, 5%, 6px)",
13448       "matrix(1, 2, 3, 4, 5%, 6%)",
13449       "matrix(1, 2, 3, 4, 5px, 6em)",
13450       /* invalid calc() values */
13451       "translatey(-moz-min(5px,10%))",
13452       "translatex(-moz-max(5px,10%))",
13453       "matrix(1, 0, 0, 1, max(5px * 3), calc(10% - 3px))",
13454       "perspective(-10px)",
13455       "matrix3d(dinosaur)",
13456       "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)",
13457       "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)",
13458       "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15%, 16)",
13459       "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16px)",
13460       "rotatey(words)",
13461       "rotatex(7)",
13462       "translate3d(3px, 4px, 1px, 7px)",
13463       "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13px, 14em, 15px, 16)",
13464       "matrix3d(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 20%, 10%, 15, 16)",
13465     ],
13466   };
13468   gCSSProperties["-moz-window-transform-origin"] = {
13469     // domProp: "MozWindowTransformOrigin",
13470     inherited: false,
13471     type: CSS_TYPE_LONGHAND,
13472     /* no subproperties */
13473     prerequisites: { width: "10px", height: "10px", display: "block" },
13474     initial_values: ["50% 50%", "center", "center center"],
13475     other_values: [
13476       "25% 25%",
13477       "6px 5px",
13478       "20% 3em",
13479       "0 0",
13480       "0in 1in",
13481       "top",
13482       "bottom",
13483       "top left",
13484       "top right",
13485       "top center",
13486       "center left",
13487       "center right",
13488       "bottom left",
13489       "bottom right",
13490       "bottom center",
13491       "20% center",
13492       "6px center",
13493       "13in bottom",
13494       "left 50px",
13495       "right 13%",
13496       "center 40px",
13497       "calc(20px)",
13498       "calc(20px) 10px",
13499       "10px calc(20px)",
13500       "calc(20px) 25%",
13501       "25% calc(20px)",
13502       "calc(20px) calc(20px)",
13503       "calc(20px + 1em) calc(20px / 2)",
13504       "calc(20px + 50%) calc(50% - 10px)",
13505       "calc(-20px) calc(-50%)",
13506       "calc(-20%) calc(-50%)",
13507     ],
13508     invalid_values: [
13509       "red",
13510       "auto",
13511       "none",
13512       "0.5 0.5",
13513       "40px #0000ff",
13514       "border",
13515       "center red",
13516       "right diagonal",
13517       "#00ffff bottom",
13518       "0px calc(0px + rubbish)",
13519       "0px 0px calc(0px + rubbish)",
13520       "6px 5px 5px",
13521       "top center 10px",
13522     ],
13523   };
13525   gCSSProperties["-moz-context-properties"] = {
13526     //domProp: "MozContextProperties",
13527     inherited: true,
13528     type: CSS_TYPE_LONGHAND,
13529     initial_values: ["none"],
13530     other_values: [
13531       "fill",
13532       "stroke",
13533       "fill, stroke",
13534       "fill, stroke, fill",
13535       "fill, foo",
13536       "foo",
13537     ],
13538     invalid_values: [
13539       "default",
13540       "fill, auto",
13541       "all, stroke",
13542       "none, fill",
13543       "fill, none",
13544       "fill, default",
13545       "2px",
13546     ],
13547   };
13550 gCSSProperties["scrollbar-color"] = {
13551   domProp: "scrollbarColor",
13552   inherited: true,
13553   type: CSS_TYPE_LONGHAND,
13554   initial_values: ["auto"],
13555   other_values: ["red green", "blue yellow", "#ffff00 white"],
13556   invalid_values: ["ffff00 red", "auto red", "red auto", "green"],
13559 gCSSProperties["scrollbar-width"] = {
13560   domProp: "scrollbarWidth",
13561   inherited: false,
13562   type: CSS_TYPE_LONGHAND,
13563   initial_values: ["auto"],
13564   other_values: ["none", "thin"],
13565   invalid_values: ["1px"],
13568 if (IsCSSPropertyPrefEnabled("layout.css.motion-path-url.enabled")) {
13569   gCSSProperties["offset-path"]["other_values"].push("url(#svgPath)");
13573   let linear_function_other_values = [
13574     "linear(0, 1)",
13575     "linear(0 0% 50%, 1 50% 100%)",
13576   ];
13578   let linear_function_invalid_values = [
13579     "linear()",
13580     "linear(0.5)",
13581     "linear(0% 0 100%)",
13582     "linear(0,)",
13583   ];
13584   gCSSProperties["animation-timing-function"].other_values.push(
13585     ...linear_function_other_values
13586   );
13587   gCSSProperties["animation-timing-function"].invalid_values.push(
13588     ...linear_function_invalid_values
13589   );
13591   gCSSProperties["transition-timing-function"].other_values.push(
13592     ...linear_function_other_values
13593   );
13594   gCSSProperties["transition-timing-function"].invalid_values.push(
13595     ...linear_function_invalid_values
13596   );
13598   gCSSProperties["animation"].other_values.push(
13599     "1s 2s linear(0, 1) bounce",
13600     "4s linear(0, 0.5 25% 75%, 1 100% 100%)"
13601   );
13604 if (IsCSSPropertyPrefEnabled("layout.css.backdrop-filter.enabled")) {
13605   gCSSProperties["backdrop-filter"] = {
13606     domProp: "backdropFilter",
13607     inherited: false,
13608     type: CSS_TYPE_LONGHAND,
13609     initial_values: ["none"],
13610     other_values: gCSSProperties["filter"].other_values,
13611     invalid_values: gCSSProperties["filter"].invalid_values,
13612   };
13615 gCSSProperties["math-depth"] = {
13616   domProp: "mathDepth",
13617   inherited: true,
13618   type: CSS_TYPE_LONGHAND,
13619   initial_values: ["0"],
13620   other_values: [
13621     // auto-add cannot be tested here because it has no effect when the
13622     // inherited math-style is equal to the default (normal).
13623     "123",
13624     "-123",
13625     "add(123)",
13626     "add(-123)",
13627     "calc(1 + 2*3)",
13628     "add(calc(4 - 2/3))",
13629   ],
13630   invalid_values: ["auto", "1,23", "1.23", "add(1,23)", "add(1.23)"],
13633 gCSSProperties["math-style"] = {
13634   domProp: "mathStyle",
13635   inherited: true,
13636   type: CSS_TYPE_LONGHAND,
13637   initial_values: ["normal"],
13638   other_values: ["compact"],
13639   invalid_values: [],
13642 if (IsCSSPropertyPrefEnabled("layout.css.forced-color-adjust.enabled")) {
13643   gCSSProperties["forced-color-adjust"] = {
13644     domProp: "forcedColorAdjust",
13645     inherited: true,
13646     type: CSS_TYPE_LONGHAND,
13647     initial_values: ["auto"],
13648     other_values: ["none"],
13649     invalid_values: [],
13650   };
13653 if (IsCSSPropertyPrefEnabled("layout.css.animation-composition.enabled")) {
13654   gCSSProperties["animation-composition"] = {
13655     domProp: "animationComposition",
13656     inherited: false,
13657     type: CSS_TYPE_LONGHAND,
13658     applies_to_marker: true,
13659     initial_values: ["replace"],
13660     other_values: [
13661       "add",
13662       "accumulate",
13663       "replace, add",
13664       "add, accumulate",
13665       "replace, add, accumulate",
13666     ],
13667     invalid_values: ["all", "none"],
13668   };
13671 if (IsCSSPropertyPrefEnabled("layout.css.prefixes.animations")) {
13672   Object.assign(gCSSProperties, {
13673     "-moz-animation": {
13674       domProp: "MozAnimation",
13675       inherited: false,
13676       type: CSS_TYPE_TRUE_SHORTHAND,
13677       applies_to_marker: true,
13678       alias_for: "animation",
13679       subproperties: [
13680         "animation-name",
13681         "animation-duration",
13682         "animation-timing-function",
13683         "animation-delay",
13684         "animation-direction",
13685         "animation-fill-mode",
13686         "animation-iteration-count",
13687         "animation-play-state",
13688       ],
13689     },
13690     "-moz-animation-delay": {
13691       domProp: "MozAnimationDelay",
13692       inherited: false,
13693       type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
13694       applies_to_marker: true,
13695       alias_for: "animation-delay",
13696       subproperties: ["animation-delay"],
13697     },
13698     "-moz-animation-direction": {
13699       domProp: "MozAnimationDirection",
13700       inherited: false,
13701       type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
13702       applies_to_marker: true,
13703       alias_for: "animation-direction",
13704       subproperties: ["animation-direction"],
13705     },
13706     "-moz-animation-duration": {
13707       domProp: "MozAnimationDuration",
13708       inherited: false,
13709       type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
13710       applies_to_marker: true,
13711       alias_for: "animation-duration",
13712       subproperties: ["animation-duration"],
13713     },
13714     "-moz-animation-fill-mode": {
13715       domProp: "MozAnimationFillMode",
13716       inherited: false,
13717       type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
13718       applies_to_marker: true,
13719       alias_for: "animation-fill-mode",
13720       subproperties: ["animation-fill-mode"],
13721     },
13722     "-moz-animation-iteration-count": {
13723       domProp: "MozAnimationIterationCount",
13724       inherited: false,
13725       type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
13726       applies_to_marker: true,
13727       alias_for: "animation-iteration-count",
13728       subproperties: ["animation-iteration-count"],
13729     },
13730     "-moz-animation-name": {
13731       domProp: "MozAnimationName",
13732       inherited: false,
13733       type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
13734       applies_to_marker: true,
13735       alias_for: "animation-name",
13736       subproperties: ["animation-name"],
13737     },
13738     "-moz-animation-play-state": {
13739       domProp: "MozAnimationPlayState",
13740       inherited: false,
13741       type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
13742       applies_to_marker: true,
13743       alias_for: "animation-play-state",
13744       subproperties: ["animation-play-state"],
13745     },
13746     "-moz-animation-timing-function": {
13747       domProp: "MozAnimationTimingFunction",
13748       inherited: false,
13749       type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
13750       applies_to_marker: true,
13751       alias_for: "animation-timing-function",
13752       subproperties: ["animation-timing-function"],
13753     },
13754   });
13757 if (IsCSSPropertyPrefEnabled("layout.css.scroll-driven-animations.enabled")) {
13758   // Basically, web-platform-tests should cover most cases, so here we only
13759   // put some basic test cases.
13760   gCSSProperties["animation"].subproperties.push("animation-timeline");
13761   gCSSProperties["animation"].initial_values.push(
13762     "none none 0s 0s ease normal running 1.0 auto",
13763     "none none auto"
13764   );
13765   gCSSProperties["animation"].other_values.push(
13766     "none none 0s 0s cubic-bezier(0.25, 0.1, 0.25, 1.0) normal running 1.0 auto",
13767     "bounce 1s linear 2s timeline",
13768     "bounce 1s 2s linear none",
13769     "bounce timeline",
13770     "2s, 1s bounce timeline",
13771     "1s bounce timeline, 2s",
13772     "1s bounce none, 2s none auto"
13773   );
13775   gCSSProperties["-moz-animation"].subproperties.push("animation-timeline");
13776   gCSSProperties["-webkit-animation"].subproperties.push("animation-timeline");
13778   gCSSProperties["animation-timeline"] = {
13779     domProp: "animationTimeline",
13780     inherited: false,
13781     type: CSS_TYPE_LONGHAND,
13782     applies_to_marker: true,
13783     initial_values: ["auto"],
13784     other_values: [
13785       "none",
13786       "all",
13787       "ball",
13788       "mall",
13789       "color",
13790       "bounce, bubble, opacity",
13791       "foobar",
13792       "\\32bounce",
13793       "-bounce",
13794       "-\\32bounce",
13795       "\\32 0bounce",
13796       "-\\32 0bounce",
13797       "\\2bounce",
13798       "-\\2bounce",
13799       "scroll()",
13800       "scroll(block)",
13801       "scroll(inline)",
13802       "scroll(horizontal)",
13803       "scroll(vertical)",
13804       "scroll(root)",
13805       "scroll(nearest)",
13806       "scroll(inline nearest)",
13807       "scroll(vertical root)",
13808       "scroll(root horizontal)",
13809       "view()",
13810       "view(inline)",
13811       "view(auto)",
13812       "view(auto 1px)",
13813       "view(inline auto)",
13814       "view(vertical auto auto)",
13815       "view(horizontal 1px 1%)",
13816       "view(1px 1% block)",
13817     ],
13818     invalid_values: [
13819       "bounce, initial",
13820       "initial, bounce",
13821       "bounce, inherit",
13822       "inherit, bounce",
13823       "bounce, unset",
13824       "unset, bounce",
13825     ],
13826   };
13828   gCSSProperties["scroll-timeline-name"] = {
13829     domProp: "scrollTimelineName",
13830     inherited: false,
13831     type: CSS_TYPE_LONGHAND,
13832     initial_values: ["none"],
13833     other_values: [
13834       "all",
13835       "auto",
13836       "ball",
13837       "mall",
13838       "color",
13839       "foobar",
13840       "\\32bounce",
13841       "-bounce",
13842       "-\\32bounce",
13843       "\\32 0bounce",
13844       "-\\32 0bounce",
13845       "\\2bounce",
13846       "-\\2bounce",
13847     ],
13848     invalid_values: ["abc bounce", "10px", "rgb(1, 2, 3)"],
13849   };
13851   gCSSProperties["scroll-timeline-axis"] = {
13852     domProp: "scrollTimelineAxis",
13853     inherited: false,
13854     type: CSS_TYPE_LONGHAND,
13855     initial_values: ["block"],
13856     other_values: ["inline", "vertical", "horizontal"],
13857     invalid_values: ["auto", "none", "abc"],
13858   };
13860   gCSSProperties["scroll-timeline"] = {
13861     domProp: "scrollTimeline",
13862     inherited: false,
13863     type: CSS_TYPE_TRUE_SHORTHAND,
13864     subproperties: ["scroll-timeline-name", "scroll-timeline-axis"],
13865     initial_values: ["none block", "none"],
13866     other_values: [
13867       "auto inline",
13868       "bounce inline",
13869       "bounce vertical",
13870       "\\32bounce inline",
13871       "-bounce block",
13872       "\\32 0bounce vertical",
13873       "-\\32 0bounce horizontal",
13874       "a, b, c",
13875       "a block, b inline, c vertical",
13876     ],
13877     invalid_values: ["", "bounce bounce", "horizontal a", "block abc"],
13878   };
13880   gCSSProperties["view-timeline-name"] = {
13881     domProp: "viewTimelineName",
13882     inherited: false,
13883     type: CSS_TYPE_LONGHAND,
13884     initial_values: ["none"],
13885     other_values: [
13886       "all",
13887       "auto",
13888       "ball",
13889       "mall",
13890       "color",
13891       "foobar",
13892       "\\32bounce",
13893       "-bounce",
13894       "-\\32bounce",
13895       "\\32 0bounce",
13896       "-\\32 0bounce",
13897       "\\2bounce",
13898       "-\\2bounce",
13899       "bounce, abc",
13900       "none, none",
13901     ],
13902     invalid_values: ["abc bounce", "10px", "rgb(1, 2, 3)"],
13903   };
13905   gCSSProperties["view-timeline-axis"] = {
13906     domProp: "viewTimelineAxis",
13907     inherited: false,
13908     type: CSS_TYPE_LONGHAND,
13909     initial_values: ["block"],
13910     other_values: ["inline", "vertical", "horizontal", "inline, block"],
13911     invalid_values: ["auto", "none", "abc", "inline block"],
13912   };
13914   gCSSProperties["view-timeline-inset"] = {
13915     domProp: "viewTimelineInset",
13916     inherited: false,
13917     type: CSS_TYPE_LONGHAND,
13918     initial_values: ["auto"],
13919     other_values: ["0px", "1%", "1px 1%", "0px 0%", "calc(0px) auto"],
13920     invalid_values: ["none", "rgb(1, 2, 3)", "foo bar", "1px 2px 3px"],
13921   };
13923   gCSSProperties["view-timeline"] = {
13924     domProp: "viewTimeline",
13925     inherited: false,
13926     type: CSS_TYPE_TRUE_SHORTHAND,
13927     subproperties: ["view-timeline-name", "view-timeline-axis"],
13928     initial_values: ["none block", "none"],
13929     other_values: [
13930       "auto inline",
13931       "bounce inline",
13932       "bounce vertical",
13933       "\\32bounce inline",
13934       "-bounce block",
13935       "\\32 0bounce vertical",
13936       "-\\32 0bounce horizontal",
13937       "a, b, c",
13938       "a block, b inline, c vertical",
13939     ],
13940     invalid_values: ["", ",", "abc abc", "horizontal a", "block abc"],
13941   };
13944 gCSSProperties["scrollbar-gutter"] = {
13945   domProp: "scrollbarGutter",
13946   inherited: false,
13947   type: CSS_TYPE_LONGHAND,
13948   initial_values: ["auto"],
13949   other_values: ["stable", "stable both-edges", "both-edges stable"],
13950   invalid_values: [
13951     "auto stable",
13952     "auto both-edges",
13953     "both-edges",
13954     "stable mirror",
13955     // The following values are from scrollbar-gutter extension in CSS
13956     // Overflow 4 https://drafts.csswg.org/css-overflow-4/#sbg-ext.
13957     "always",
13958     "always both-edges",
13959     "always force",
13960     "always both-edges force",
13961     "stable both-edges force",
13962     "match-parent",
13963   ],
13966 if (IsCSSPropertyPrefEnabled("layout.css.text-wrap-balance.enabled")) {
13967   gCSSProperties["text-wrap-style"] = {
13968     domProp: "textWrapStyle",
13969     inherited: true,
13970     type: CSS_TYPE_LONGHAND,
13971     applies_to_placeholder: true,
13972     applies_to_cue: true,
13973     applies_to_marker: true,
13974     initial_values: ["auto"],
13975     other_values: ["stable", "balance"],
13976     invalid_values: ["wrap", "nowrap", "normal"],
13977   };
13978   gCSSProperties["text-wrap"].subproperties.push("text-wrap-style");
13979   gCSSProperties["text-wrap"].other_values.push("stable");
13980   gCSSProperties["text-wrap"].other_values.push("balance");
13981   gCSSProperties["text-wrap"].other_values.push("wrap stable");
13982   gCSSProperties["text-wrap"].other_values.push("nowrap balance");
13985 if (IsCSSPropertyPrefEnabled("layout.css.prefixes.transforms")) {
13986   Object.assign(gCSSProperties, {
13987     "-moz-transform": {
13988       domProp: "MozTransform",
13989       inherited: false,
13990       type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
13991       alias_for: "transform",
13992       subproperties: ["transform"],
13993     },
13994     "-moz-transform-origin": {
13995       domProp: "MozTransformOrigin",
13996       inherited: false,
13997       type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
13998       alias_for: "transform-origin",
13999       subproperties: ["transform-origin"],
14000     },
14001     "-moz-perspective-origin": {
14002       domProp: "MozPerspectiveOrigin",
14003       inherited: false,
14004       type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14005       alias_for: "perspective-origin",
14006       subproperties: ["perspective-origin"],
14007     },
14008     "-moz-perspective": {
14009       domProp: "MozPerspective",
14010       inherited: false,
14011       type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14012       alias_for: "perspective",
14013       subproperties: ["perspective"],
14014     },
14015     "-moz-backface-visibility": {
14016       domProp: "MozBackfaceVisibility",
14017       inherited: false,
14018       type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14019       alias_for: "backface-visibility",
14020       subproperties: ["backface-visibility"],
14021     },
14022     "-moz-transform-style": {
14023       domProp: "MozTransformStyle",
14024       inherited: false,
14025       type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14026       alias_for: "transform-style",
14027       subproperties: ["transform-style"],
14028     },
14029   });
14032 if (IsCSSPropertyPrefEnabled("layout.css.zoom.enabled")) {
14033   Object.assign(gCSSProperties, {
14034     zoom: {
14035       domProp: "zoom",
14036       inherited: false,
14037       type: CSS_TYPE_LONGHAND,
14038       initial_values: ["normal", "1", "100%", "0", "0%"],
14039       other_values: ["1.5", "2", "150%", "200%"],
14040       invalid_values: ["-1", "-40%"],
14041     },
14042   });
14045 if (IsCSSPropertyPrefEnabled("layout.css.prefixes.transitions")) {
14046   Object.assign(gCSSProperties, {
14047     "-moz-transition": {
14048       domProp: "MozTransition",
14049       inherited: false,
14050       type: CSS_TYPE_TRUE_SHORTHAND,
14051       applies_to_marker: true,
14052       alias_for: "transition",
14053       subproperties: [
14054         "transition-property",
14055         "transition-duration",
14056         "transition-timing-function",
14057         "transition-delay",
14058       ],
14059     },
14060     "-moz-transition-delay": {
14061       domProp: "MozTransitionDelay",
14062       inherited: false,
14063       type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14064       applies_to_marker: true,
14065       alias_for: "transition-delay",
14066       subproperties: ["transition-delay"],
14067     },
14068     "-moz-transition-duration": {
14069       domProp: "MozTransitionDuration",
14070       inherited: false,
14071       type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14072       applies_to_marker: true,
14073       alias_for: "transition-duration",
14074       subproperties: ["transition-duration"],
14075     },
14076     "-moz-transition-property": {
14077       domProp: "MozTransitionProperty",
14078       inherited: false,
14079       type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14080       applies_to_marker: true,
14081       alias_for: "transition-property",
14082       subproperties: ["transition-property"],
14083     },
14084     "-moz-transition-timing-function": {
14085       domProp: "MozTransitionTimingFunction",
14086       inherited: false,
14087       type: CSS_TYPE_SHORTHAND_AND_LONGHAND,
14088       applies_to_marker: true,
14089       alias_for: "transition-timing-function",
14090       subproperties: ["transition-timing-function"],
14091     },
14092   });
14095 if (IsCSSPropertyPrefEnabled("layout.css.transition-behavior.enabled")) {
14096   Object.assign(gCSSProperties, {
14097     "transition-behavior": {
14098       domProp: "transitionBehavior",
14099       inherited: false,
14100       type: CSS_TYPE_LONGHAND,
14101       applies_to_marker: true,
14102       initial_values: ["normal"],
14103       other_values: ["allow-discrete"],
14104       invalid_values: ["none", "auto", "discrete"],
14105     },
14106   });
14108   gCSSProperties["transition"].subproperties.push("transition-behavior");
14109   gCSSProperties["transition"].initial_values.push("normal");
14110   gCSSProperties["transition"].other_values.push(
14111     "allow-discrete",
14112     "width allow-discrete",
14113     "1s allow-discrete",
14114     "linear allow-discrete"
14115   );
14116   gCSSProperties["-webkit-transition"].subproperties.push(
14117     "transition-behavior"
14118   );
14120   if (IsCSSPropertyPrefEnabled("layout.css.prefixes.transitions")) {
14121     gCSSProperties["-moz-transition"].subproperties.push("transition-behavior");
14122   }
14125 // Copy aliased properties' fields from their alias targets. Keep this logic
14126 // at the bottom of this file to ensure all the aliased properties are
14127 // processed.
14128 for (var prop in gCSSProperties) {
14129   var entry = gCSSProperties[prop];
14130   if (entry.alias_for) {
14131     var aliasTargetEntry = gCSSProperties[entry.alias_for];
14132     if (!aliasTargetEntry) {
14133       ok(
14134         false,
14135         "Alias '" +
14136           prop +
14137           "' alias_for field, '" +
14138           entry.alias_for +
14139           "', " +
14140           "must be set to a recognized CSS property in gCSSProperties"
14141       );
14142     } else {
14143       // Copy 'values' fields & 'prerequisites' field from aliasTargetEntry:
14144       var fieldsToCopy = [
14145         "initial_values",
14146         "other_values",
14147         "invalid_values",
14148         "quirks_values",
14149         "unbalanced_values",
14150         "prerequisites",
14151       ];
14153       fieldsToCopy.forEach(function (fieldName) {
14154         // (Don't copy the field if the alias already has something there,
14155         // or if the aliased property doesn't have anything to copy.)
14156         if (!(fieldName in entry) && fieldName in aliasTargetEntry) {
14157           entry[fieldName] = aliasTargetEntry[fieldName];
14158         }
14159       });
14160     }
14161   }