Line data Source code
1 : /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 : /* This Source Code Form is subject to the terms of the Mozilla Public
3 : * License, v. 2.0. If a copy of the MPL was not distributed with this
4 : * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 :
6 : /*
7 : * methods for dealing with CSS properties and tables of the keyword
8 : * values they accept
9 : */
10 :
11 : #ifndef nsCSSProps_h___
12 : #define nsCSSProps_h___
13 :
14 : #include <limits>
15 : #include <type_traits>
16 : #include "nsString.h"
17 : #include "nsCSSPropertyID.h"
18 : #include "nsStyleStructFwd.h"
19 : #include "nsCSSKeywords.h"
20 : #include "mozilla/CSSEnabledState.h"
21 : #include "mozilla/UseCounter.h"
22 : #include "mozilla/EnumTypeTraits.h"
23 : #include "mozilla/Preferences.h"
24 : #include "nsXULAppAPI.h"
25 :
26 : // Length of the "--" prefix on custom names (such as custom property names,
27 : // and, in the future, custom media query names).
28 : #define CSS_CUSTOM_NAME_PREFIX_LENGTH 2
29 :
30 : // Flags for ParseVariant method
31 : #define VARIANT_KEYWORD 0x000001 // K
32 : #define VARIANT_LENGTH 0x000002 // L
33 : #define VARIANT_PERCENT 0x000004 // P
34 : #define VARIANT_COLOR 0x000008 // C eCSSUnit_*Color, eCSSUnit_Ident (e.g. "red")
35 : #define VARIANT_URL 0x000010 // U
36 : #define VARIANT_NUMBER 0x000020 // N
37 : #define VARIANT_INTEGER 0x000040 // I
38 : #define VARIANT_ANGLE 0x000080 // G
39 : #define VARIANT_FREQUENCY 0x000100 // F
40 : #define VARIANT_TIME 0x000200 // T
41 : #define VARIANT_STRING 0x000400 // S
42 : #define VARIANT_COUNTER 0x000800 //
43 : #define VARIANT_ATTR 0x001000 //
44 : #define VARIANT_IDENTIFIER 0x002000 // D
45 : #define VARIANT_IDENTIFIER_NO_INHERIT 0x004000 // like above, but excluding
46 : // 'inherit' and 'initial'
47 : #define VARIANT_AUTO 0x010000 // A
48 : #define VARIANT_INHERIT 0x020000 // H eCSSUnit_Initial, eCSSUnit_Inherit, eCSSUnit_Unset
49 : #define VARIANT_NONE 0x040000 // O
50 : #define VARIANT_NORMAL 0x080000 // M
51 : #define VARIANT_SYSFONT 0x100000 // eCSSUnit_System_Font
52 : #define VARIANT_GRADIENT 0x200000 // eCSSUnit_Gradient
53 : #define VARIANT_TIMING_FUNCTION 0x400000 // cubic-bezier() and steps()
54 : #define VARIANT_ALL 0x800000 //
55 : #define VARIANT_IMAGE_RECT 0x01000000 // eCSSUnit_Function
56 : // This is an extra bit that says that a VARIANT_ANGLE allows unitless zero:
57 : #define VARIANT_ZERO_ANGLE 0x02000000 // unitless zero for angles
58 : #define VARIANT_CALC 0x04000000 // eCSSUnit_Calc
59 : #define VARIANT_ELEMENT 0x08000000 // eCSSUnit_Element
60 : #define VARIANT_NONNEGATIVE_DIMENSION 0x10000000 // Only lengths greater than or equal to 0.0
61 : // Keyword used iff gfx.font_rendering.opentype_svg.enabled is true:
62 : #define VARIANT_OPENTYPE_SVG_KEYWORD 0x20000000
63 : #define VARIANT_ABSOLUTE_DIMENSION 0x40000000 // B Only lengths with absolute length unit
64 :
65 : // Variants that can consume more than one token
66 : #define VARIANT_MULTIPLE_TOKENS \
67 : (VARIANT_COLOR | /* rgb(...), hsl(...), etc. */ \
68 : VARIANT_COUNTER | /* counter(...), counters(...) */ \
69 : VARIANT_ATTR | /* attr(...) */ \
70 : VARIANT_GRADIENT | /* linear-gradient(...), etc. */ \
71 : VARIANT_TIMING_FUNCTION | /* cubic-bezier(...), steps(...) */ \
72 : VARIANT_IMAGE_RECT | /* -moz-image-rect(...) */ \
73 : VARIANT_CALC | /* calc(...) */ \
74 : VARIANT_ELEMENT) /* -moz-element(...) */
75 :
76 : // Common combinations of variants
77 : #define VARIANT_AL (VARIANT_AUTO | VARIANT_LENGTH)
78 : #define VARIANT_LP (VARIANT_LENGTH | VARIANT_PERCENT)
79 : #define VARIANT_LN (VARIANT_LENGTH | VARIANT_NUMBER)
80 : #define VARIANT_AH (VARIANT_AUTO | VARIANT_INHERIT)
81 : #define VARIANT_AHLP (VARIANT_AH | VARIANT_LP)
82 : #define VARIANT_AHI (VARIANT_AH | VARIANT_INTEGER)
83 : #define VARIANT_AHK (VARIANT_AH | VARIANT_KEYWORD)
84 : #define VARIANT_AHKLP (VARIANT_AHLP | VARIANT_KEYWORD)
85 : #define VARIANT_AHL (VARIANT_AH | VARIANT_LENGTH)
86 : #define VARIANT_AHKL (VARIANT_AHK | VARIANT_LENGTH)
87 : #define VARIANT_HK (VARIANT_INHERIT | VARIANT_KEYWORD)
88 : #define VARIANT_HKF (VARIANT_HK | VARIANT_FREQUENCY)
89 : #define VARIANT_HKI (VARIANT_HK | VARIANT_INTEGER)
90 : #define VARIANT_HKL (VARIANT_HK | VARIANT_LENGTH)
91 : #define VARIANT_HKLP (VARIANT_HK | VARIANT_LP)
92 : #define VARIANT_HKLPO (VARIANT_HKLP | VARIANT_NONE)
93 : #define VARIANT_HL (VARIANT_INHERIT | VARIANT_LENGTH)
94 : #define VARIANT_HI (VARIANT_INHERIT | VARIANT_INTEGER)
95 : #define VARIANT_HLP (VARIANT_HL | VARIANT_PERCENT)
96 : #define VARIANT_HLPN (VARIANT_HLP | VARIANT_NUMBER)
97 : #define VARIANT_HLPO (VARIANT_HLP | VARIANT_NONE)
98 : #define VARIANT_HTP (VARIANT_INHERIT | VARIANT_TIME | VARIANT_PERCENT)
99 : #define VARIANT_HMK (VARIANT_HK | VARIANT_NORMAL)
100 : #define VARIANT_HC (VARIANT_INHERIT | VARIANT_COLOR)
101 : #define VARIANT_HCK (VARIANT_HK | VARIANT_COLOR)
102 : #define VARIANT_HUK (VARIANT_HK | VARIANT_URL)
103 : #define VARIANT_HUO (VARIANT_INHERIT | VARIANT_URL | VARIANT_NONE)
104 : #define VARIANT_AHUO (VARIANT_AUTO | VARIANT_HUO)
105 : #define VARIANT_HPN (VARIANT_INHERIT | VARIANT_PERCENT | VARIANT_NUMBER)
106 : #define VARIANT_PN (VARIANT_PERCENT | VARIANT_NUMBER)
107 : #define VARIANT_ALPN (VARIANT_AL | VARIANT_PN)
108 : #define VARIANT_HN (VARIANT_INHERIT | VARIANT_NUMBER)
109 : #define VARIANT_HON (VARIANT_HN | VARIANT_NONE)
110 : #define VARIANT_HOS (VARIANT_INHERIT | VARIANT_NONE | VARIANT_STRING)
111 : #define VARIANT_LPN (VARIANT_LP | VARIANT_NUMBER)
112 : #define VARIANT_UK (VARIANT_URL | VARIANT_KEYWORD)
113 : #define VARIANT_UO (VARIANT_URL | VARIANT_NONE)
114 : #define VARIANT_ANGLE_OR_ZERO (VARIANT_ANGLE | VARIANT_ZERO_ANGLE)
115 : #define VARIANT_LB (VARIANT_LENGTH | VARIANT_ABSOLUTE_DIMENSION)
116 : #define VARIANT_LBCALC (VARIANT_LB | VARIANT_CALC)
117 : #define VARIANT_LCALC (VARIANT_LENGTH | VARIANT_CALC)
118 : #define VARIANT_LPCALC (VARIANT_LCALC | VARIANT_PERCENT)
119 : #define VARIANT_LNCALC (VARIANT_LCALC | VARIANT_NUMBER)
120 : #define VARIANT_LPNCALC (VARIANT_LNCALC | VARIANT_PERCENT)
121 : #define VARIANT_IMAGE (VARIANT_URL | VARIANT_NONE | VARIANT_GRADIENT | \
122 : VARIANT_IMAGE_RECT | VARIANT_ELEMENT)
123 :
124 : // Flags for the kFlagsTable bitfield (flags_ in nsCSSPropList.h)
125 :
126 : // This property is a logical property (such as padding-inline-start).
127 : #define CSS_PROPERTY_LOGICAL (1<<0)
128 :
129 : #define CSS_PROPERTY_VALUE_LIST_USES_COMMAS (1<<1) /* otherwise spaces */
130 :
131 : #define CSS_PROPERTY_APPLIES_TO_FIRST_LETTER (1<<2)
132 : #define CSS_PROPERTY_APPLIES_TO_FIRST_LINE (1<<3)
133 : #define CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE \
134 : (CSS_PROPERTY_APPLIES_TO_FIRST_LETTER | CSS_PROPERTY_APPLIES_TO_FIRST_LINE)
135 :
136 : // Note that 'background-color' is ignored differently from the other
137 : // properties that have this set, but that's just special-cased.
138 : #define CSS_PROPERTY_IGNORED_WHEN_COLORS_DISABLED (1<<4)
139 :
140 : // A property that needs to have image loads started when a URL value
141 : // for the property is used for an element. This is supported only
142 : // for a few possible value formats: image directly in the value; list
143 : // of images; and with CSS_PROPERTY_IMAGE_IS_IN_ARRAY_0, image in slot
144 : // 0 of an array, or list of such arrays.
145 : #define CSS_PROPERTY_START_IMAGE_LOADS (1<<5)
146 :
147 : // Should be set only for properties with START_IMAGE_LOADS. Indicates
148 : // that the property has an array value with a URL/image value at index
149 : // 0 in the array, rather than the URL/image being in the value or value
150 : // list.
151 : #define CSS_PROPERTY_IMAGE_IS_IN_ARRAY_0 (1<<6)
152 :
153 : // This is a logical property that represents some value associated with
154 : // a logical axis rather than a logical box side, and thus has two
155 : // corresponding physical properties it could set rather than four. For
156 : // example, the block-size logical property has this flag set, as it
157 : // represents the size in either the block or inline axis dimensions, and
158 : // has two corresponding physical properties, width and height. Must not
159 : // be used in conjunction with CSS_PROPERTY_LOGICAL_END_EDGE.
160 : #define CSS_PROPERTY_LOGICAL_AXIS (1<<7)
161 :
162 : // This property allows calc() between lengths and percentages and
163 : // stores such calc() expressions in its style structs (typically in an
164 : // nsStyleCoord, although this is not the case for 'background-position'
165 : // and 'background-size').
166 : #define CSS_PROPERTY_STORES_CALC (1<<8)
167 :
168 : // Define what mechanism the CSS parser uses for parsing the property.
169 : // See CSSParserImpl::ParseProperty(nsCSSPropertyID). Don't use 0 so that
170 : // we can verify that every property sets one of the values.
171 : //
172 : // CSS_PROPERTY_PARSE_FUNCTION must be used for shorthand properties,
173 : // since it's the only mechanism that allows appending values for
174 : // separate properties. Longhand properties that require custom parsing
175 : // functions should prefer using CSS_PROPERTY_PARSE_VALUE (or
176 : // CSS_PROPERTY_PARSE_VALUE_LIST) and
177 : // CSS_PROPERTY_VALUE_PARSER_FUNCTION, though a number of existing
178 : // longhand properties use CSS_PROPERTY_PARSE_FUNCTION instead.
179 : #define CSS_PROPERTY_PARSE_PROPERTY_MASK (7<<9)
180 : #define CSS_PROPERTY_PARSE_INACCESSIBLE (1<<9)
181 : #define CSS_PROPERTY_PARSE_FUNCTION (2<<9)
182 : #define CSS_PROPERTY_PARSE_VALUE (3<<9)
183 : #define CSS_PROPERTY_PARSE_VALUE_LIST (4<<9)
184 :
185 : // See CSSParserImpl::ParseSingleValueProperty and comment above
186 : // CSS_PROPERTY_PARSE_FUNCTION (which is different).
187 : #define CSS_PROPERTY_VALUE_PARSER_FUNCTION (1<<12)
188 : static_assert((CSS_PROPERTY_PARSE_PROPERTY_MASK &
189 : CSS_PROPERTY_VALUE_PARSER_FUNCTION) == 0,
190 : "didn't leave enough room for the parse property constants");
191 :
192 : #define CSS_PROPERTY_VALUE_RESTRICTION_MASK (3<<13)
193 : // The parser (in particular, CSSParserImpl::ParseSingleValueProperty)
194 : // should enforce that the value of this property must be 0 or larger.
195 : #define CSS_PROPERTY_VALUE_NONNEGATIVE (1<<13)
196 : // The parser (in particular, CSSParserImpl::ParseSingleValueProperty)
197 : // should enforce that the value of this property must be 1 or larger.
198 : #define CSS_PROPERTY_VALUE_AT_LEAST_ONE (2<<13)
199 :
200 : // Does this property support the hashless hex color quirk in quirks mode?
201 : #define CSS_PROPERTY_HASHLESS_COLOR_QUIRK (1<<15)
202 :
203 : // Does this property support the unitless length quirk in quirks mode?
204 : #define CSS_PROPERTY_UNITLESS_LENGTH_QUIRK (1<<16)
205 :
206 : // Is this property (which must be a shorthand) really an alias?
207 : #define CSS_PROPERTY_IS_ALIAS (1<<17)
208 :
209 : // Does the property apply to ::placeholder?
210 : #define CSS_PROPERTY_APPLIES_TO_PLACEHOLDER (1<<18)
211 :
212 : // This property is allowed in an @page rule.
213 : #define CSS_PROPERTY_APPLIES_TO_PAGE_RULE (1<<19)
214 :
215 : // This property's getComputedStyle implementation requires layout to be
216 : // flushed.
217 : #define CSS_PROPERTY_GETCS_NEEDS_LAYOUT_FLUSH (1<<20)
218 :
219 : // This property requires a stacking context.
220 : #define CSS_PROPERTY_CREATES_STACKING_CONTEXT (1<<21)
221 :
222 : // The following two flags along with the pref defines where the this
223 : // property can be used:
224 : // * If none of the two flags is presented, the pref completely controls
225 : // the availability of this property. And in that case, if it has no
226 : // pref, this property is usable everywhere.
227 : // * If any of the flags is set, this property is always enabled in the
228 : // specific contexts regardless of the value of the pref. If there is
229 : // no pref for this property at all in this case, it is an internal-
230 : // only property, which cannot be used anywhere else, and should be
231 : // wrapped in "#ifndef CSS_PROP_LIST_EXCLUDE_INTERNAL".
232 : // Note that, these flags have no effect on the use of aliases of this
233 : // property.
234 : // Furthermore, for the purposes of animation (including triggering
235 : // transitions) these flags are ignored. That is, if the property is disabled
236 : // by a pref, we will *not* run animations or transitions on it even in
237 : // UA sheets or chrome.
238 : #define CSS_PROPERTY_ENABLED_MASK (3<<22)
239 : #define CSS_PROPERTY_ENABLED_IN_UA_SHEETS (1<<22)
240 : #define CSS_PROPERTY_ENABLED_IN_CHROME (1<<23)
241 : #define CSS_PROPERTY_ENABLED_IN_UA_SHEETS_AND_CHROME \
242 : (CSS_PROPERTY_ENABLED_IN_UA_SHEETS | CSS_PROPERTY_ENABLED_IN_CHROME)
243 :
244 : // This property's unitless values are pixels.
245 : #define CSS_PROPERTY_NUMBERS_ARE_PIXELS (1<<24)
246 :
247 : // This property is a logical property for one of the two block axis
248 : // sides (such as margin-block-start or margin-block-end). Must only be
249 : // set if CSS_PROPERTY_LOGICAL is set. When not set, the logical
250 : // property is for one of the two inline axis sides (such as
251 : // margin-inline-start or margin-inline-end).
252 : #define CSS_PROPERTY_LOGICAL_BLOCK_AXIS (1<<25)
253 :
254 : // This property is a logical property for the "end" edge of the
255 : // axis determined by the presence or absence of
256 : // CSS_PROPERTY_LOGICAL_BLOCK_AXIS (such as margin-block-end or
257 : // margin-inline-end). Must only be set if CSS_PROPERTY_LOGICAL is set.
258 : // When not set, the logical property is for the "start" edge (such as
259 : // margin-block-start or margin-inline-start).
260 : #define CSS_PROPERTY_LOGICAL_END_EDGE (1<<26)
261 :
262 : // This property can be animated on the compositor.
263 : #define CSS_PROPERTY_CAN_ANIMATE_ON_COMPOSITOR (1<<27)
264 :
265 : // This property is an internal property that is not represented
266 : // in the DOM. Properties with this flag must be defined in an #ifndef
267 : // CSS_PROP_LIST_EXCLUDE_INTERNAL section of nsCSSPropList.h.
268 : #define CSS_PROPERTY_INTERNAL (1<<28)
269 :
270 : // This property has values that can establish a containing block for
271 : // fixed positioned and absolutely positioned elements.
272 : // This should be set for any properties that can cause an element to be
273 : // such a containing block, as implemented in
274 : // nsStyleDisplay::IsFixedPosContainingBlock.
275 : #define CSS_PROPERTY_FIXPOS_CB (1<<29)
276 :
277 : // This property has values that can establish a containing block for
278 : // absolutely positioned elements.
279 : // This should be set for any properties that can cause an element to be
280 : // such a containing block, as implemented in
281 : // nsStyleDisplay::IsAbsPosContainingBlock.
282 : // It does not need to be set for properties that also have
283 : // CSS_PROPERTY_FIXPOS_CB set.
284 : #define CSS_PROPERTY_ABSPOS_CB (1<<30)
285 :
286 : /**
287 : * Types of animatable values.
288 : */
289 : enum nsStyleAnimType {
290 : // requires a custom implementation in
291 : // StyleAnimationValue::ExtractComputedValue
292 : eStyleAnimType_Custom,
293 :
294 : // nsStyleCoord with animatable values
295 : eStyleAnimType_Coord,
296 :
297 : // same as Coord, except for one side of an nsStyleSides
298 : // listed in the same order as the NS_STYLE_* constants
299 : eStyleAnimType_Sides_Top,
300 : eStyleAnimType_Sides_Right,
301 : eStyleAnimType_Sides_Bottom,
302 : eStyleAnimType_Sides_Left,
303 :
304 : // similar, but for the *pair* of coord members of an nsStyleCorners
305 : // for the relevant corner
306 : eStyleAnimType_Corner_TopLeft,
307 : eStyleAnimType_Corner_TopRight,
308 : eStyleAnimType_Corner_BottomRight,
309 : eStyleAnimType_Corner_BottomLeft,
310 :
311 : // nscoord values
312 : eStyleAnimType_nscoord,
313 :
314 : // float values
315 : eStyleAnimType_float,
316 :
317 : // nscolor values
318 : eStyleAnimType_Color,
319 :
320 : // StyleComplexColor values
321 : eStyleAnimType_ComplexColor,
322 :
323 : // nsStyleSVGPaint values
324 : eStyleAnimType_PaintServer,
325 :
326 : // RefPtr<nsCSSShadowArray> values
327 : eStyleAnimType_Shadow,
328 :
329 : // discrete values
330 : eStyleAnimType_Discrete,
331 :
332 : // property not animatable
333 : eStyleAnimType_None
334 : };
335 :
336 : class nsCSSProps {
337 : public:
338 : typedef mozilla::CSSEnabledState EnabledState;
339 :
340 : struct KTableEntry
341 : {
342 : // KTableEntry objects can be initialized either with an int16_t value
343 : // or a value of an enumeration type that can fit within an int16_t.
344 :
345 : constexpr KTableEntry(nsCSSKeyword aKeyword, int16_t aValue)
346 : : mKeyword(aKeyword)
347 : , mValue(aValue)
348 : {
349 : }
350 :
351 : template<typename T,
352 : typename = typename std::enable_if<std::is_enum<T>::value>::type>
353 : constexpr KTableEntry(nsCSSKeyword aKeyword, T aValue)
354 : : mKeyword(aKeyword)
355 : , mValue(static_cast<int16_t>(aValue))
356 : {
357 : static_assert(mozilla::EnumTypeFitsWithin<T, int16_t>::value,
358 : "aValue must be an enum that fits within mValue");
359 : }
360 :
361 : nsCSSKeyword mKeyword;
362 : int16_t mValue;
363 : };
364 :
365 : static void AddRefTable(void);
366 : static void ReleaseTable(void);
367 :
368 : // Looks up the property with name aProperty and returns its corresponding
369 : // nsCSSPropertyID value. If aProperty is the name of a custom property,
370 : // then eCSSPropertyExtra_variable will be returned.
371 : static nsCSSPropertyID LookupProperty(const nsAString& aProperty,
372 : EnabledState aEnabled);
373 : static nsCSSPropertyID LookupProperty(const nsACString& aProperty,
374 : EnabledState aEnabled);
375 : // As above, but looked up using a property's IDL name.
376 : // eCSSPropertyExtra_variable won't be returned from these methods.
377 : static nsCSSPropertyID LookupPropertyByIDLName(
378 : const nsAString& aPropertyIDLName,
379 : EnabledState aEnabled);
380 : static nsCSSPropertyID LookupPropertyByIDLName(
381 : const nsACString& aPropertyIDLName,
382 : EnabledState aEnabled);
383 :
384 : // Returns whether aProperty is a custom property name, i.e. begins with
385 : // "--". This assumes that the CSS Variables pref has been enabled.
386 : static bool IsCustomPropertyName(const nsAString& aProperty);
387 : static bool IsCustomPropertyName(const nsACString& aProperty);
388 :
389 105845 : static inline bool IsShorthand(nsCSSPropertyID aProperty) {
390 105845 : MOZ_ASSERT(0 <= aProperty && aProperty < eCSSProperty_COUNT,
391 : "out of range");
392 105845 : return (aProperty >= eCSSProperty_COUNT_no_shorthands);
393 : }
394 :
395 : // Must be given a longhand property.
396 : static bool IsInherited(nsCSSPropertyID aProperty);
397 :
398 : // Same but for @font-face descriptors
399 : static nsCSSFontDesc LookupFontDesc(const nsAString& aProperty);
400 : static nsCSSFontDesc LookupFontDesc(const nsACString& aProperty);
401 :
402 : // For @counter-style descriptors
403 : static nsCSSCounterDesc LookupCounterDesc(const nsAString& aProperty);
404 : static nsCSSCounterDesc LookupCounterDesc(const nsACString& aProperty);
405 :
406 : // For predefined counter styles which need to be lower-cased during parse
407 : static bool IsPredefinedCounterStyle(const nsAString& aStyle);
408 : static bool IsPredefinedCounterStyle(const nsACString& aStyle);
409 :
410 : // Given a property enum, get the string value
411 : static const nsCString& GetStringValue(nsCSSPropertyID aProperty);
412 : static const nsCString& GetStringValue(nsCSSFontDesc aFontDesc);
413 : static const nsCString& GetStringValue(nsCSSCounterDesc aCounterDesc);
414 :
415 : // Given a CSS Property and a Property Enum Value
416 : // Return back a const nsString& representation of the
417 : // value. Return back nullstr if no value is found
418 : static const nsCString& LookupPropertyValue(nsCSSPropertyID aProperty, int32_t aValue);
419 :
420 : // Get a color name for a predefined color value like buttonhighlight or activeborder
421 : // Sets the aStr param to the name of the propertyID
422 : static bool GetColorName(int32_t aPropID, nsCString &aStr);
423 :
424 : // Returns the index of |aKeyword| in |aTable|, if it exists there;
425 : // otherwise, returns -1.
426 : // NOTE: Generally, clients should call FindKeyword() instead of this method.
427 : static int32_t FindIndexOfKeyword(nsCSSKeyword aKeyword,
428 : const KTableEntry aTable[]);
429 :
430 : // Find |aKeyword| in |aTable|, if found set |aValue| to its corresponding value.
431 : // If not found, return false and do not set |aValue|.
432 : static bool FindKeyword(nsCSSKeyword aKeyword, const KTableEntry aTable[],
433 : int32_t& aValue);
434 : // Return the first keyword in |aTable| that has the corresponding value |aValue|.
435 : // Return |eCSSKeyword_UNKNOWN| if not found.
436 : static nsCSSKeyword ValueToKeywordEnum(int32_t aValue,
437 : const KTableEntry aTable[]);
438 : template<typename T,
439 : typename = typename std::enable_if<std::is_enum<T>::value>::type>
440 0 : static nsCSSKeyword ValueToKeywordEnum(T aValue,
441 : const KTableEntry aTable[])
442 : {
443 : static_assert(mozilla::EnumTypeFitsWithin<T, int16_t>::value,
444 : "aValue must be an enum that fits within KTableEntry::mValue");
445 0 : return ValueToKeywordEnum(static_cast<int16_t>(aValue), aTable);
446 : }
447 : // Ditto but as a string, return "" when not found.
448 : static const nsCString& ValueToKeyword(int32_t aValue,
449 : const KTableEntry aTable[]);
450 : template<typename T,
451 : typename = typename std::enable_if<std::is_enum<T>::value>::type>
452 0 : static const nsCString& ValueToKeyword(T aValue, const KTableEntry aTable[])
453 : {
454 : static_assert(mozilla::EnumTypeFitsWithin<T, int16_t>::value,
455 : "aValue must be an enum that fits within KTableEntry::mValue");
456 0 : return ValueToKeyword(static_cast<int16_t>(aValue), aTable);
457 : }
458 :
459 : static const nsStyleStructID kSIDTable[eCSSProperty_COUNT_no_shorthands];
460 : static const KTableEntry* const kKeywordTableTable[eCSSProperty_COUNT_no_shorthands];
461 : static const nsStyleAnimType kAnimTypeTable[eCSSProperty_COUNT_no_shorthands];
462 : static const ptrdiff_t
463 : kStyleStructOffsetTable[eCSSProperty_COUNT_no_shorthands];
464 :
465 : private:
466 : static const uint32_t kFlagsTable[eCSSProperty_COUNT];
467 :
468 : public:
469 54404 : static inline bool PropHasFlags(nsCSSPropertyID aProperty, uint32_t aFlags)
470 : {
471 54404 : MOZ_ASSERT(0 <= aProperty && aProperty < eCSSProperty_COUNT,
472 : "out of range");
473 54404 : MOZ_ASSERT(!(aFlags & CSS_PROPERTY_PARSE_PROPERTY_MASK),
474 : "The CSS_PROPERTY_PARSE_* values are not bitflags; don't pass "
475 : "them to PropHasFlags. You probably want PropertyParseType "
476 : "instead.");
477 54404 : return (nsCSSProps::kFlagsTable[aProperty] & aFlags) == aFlags;
478 : }
479 :
480 7458 : static inline uint32_t PropertyParseType(nsCSSPropertyID aProperty)
481 : {
482 7458 : MOZ_ASSERT(0 <= aProperty && aProperty < eCSSProperty_COUNT,
483 : "out of range");
484 7458 : return nsCSSProps::kFlagsTable[aProperty] &
485 7458 : CSS_PROPERTY_PARSE_PROPERTY_MASK;
486 : }
487 :
488 8846 : static inline uint32_t ValueRestrictions(nsCSSPropertyID aProperty)
489 : {
490 8846 : MOZ_ASSERT(0 <= aProperty && aProperty < eCSSProperty_COUNT,
491 : "out of range");
492 8846 : return nsCSSProps::kFlagsTable[aProperty] &
493 8846 : CSS_PROPERTY_VALUE_RESTRICTION_MASK;
494 : }
495 :
496 : private:
497 : // Lives in nsCSSParser.cpp for the macros it depends on.
498 : static const uint32_t kParserVariantTable[eCSSProperty_COUNT_no_shorthands];
499 :
500 : public:
501 8852 : static inline uint32_t ParserVariant(nsCSSPropertyID aProperty) {
502 8852 : MOZ_ASSERT(0 <= aProperty && aProperty < eCSSProperty_COUNT_no_shorthands,
503 : "out of range");
504 8852 : return nsCSSProps::kParserVariantTable[aProperty];
505 : }
506 :
507 : private:
508 : // A table for shorthand properties. The appropriate index is the
509 : // property ID minus eCSSProperty_COUNT_no_shorthands.
510 : static const nsCSSPropertyID *const
511 : kSubpropertyTable[eCSSProperty_COUNT - eCSSProperty_COUNT_no_shorthands];
512 :
513 : public:
514 : static inline
515 4920 : const nsCSSPropertyID * SubpropertyEntryFor(nsCSSPropertyID aProperty) {
516 4920 : MOZ_ASSERT(eCSSProperty_COUNT_no_shorthands <= aProperty &&
517 : aProperty < eCSSProperty_COUNT,
518 : "out of range");
519 4920 : return nsCSSProps::kSubpropertyTable[aProperty -
520 4920 : eCSSProperty_COUNT_no_shorthands];
521 : }
522 :
523 : // Returns an eCSSProperty_UNKNOWN-terminated array of the shorthand
524 : // properties containing |aProperty|, sorted from those that contain
525 : // the most properties to those that contain the least.
526 2478 : static const nsCSSPropertyID * ShorthandsContaining(nsCSSPropertyID aProperty) {
527 2478 : MOZ_ASSERT(gShorthandsContainingPool, "uninitialized");
528 2478 : MOZ_ASSERT(0 <= aProperty && aProperty < eCSSProperty_COUNT_no_shorthands,
529 : "out of range");
530 2478 : return gShorthandsContainingTable[aProperty];
531 : }
532 : private:
533 : // gShorthandsContainingTable is an array of the return values for
534 : // ShorthandsContaining (arrays of nsCSSPropertyID terminated by
535 : // eCSSProperty_UNKNOWN) pointing into memory in
536 : // gShorthandsContainingPool (which contains all of those arrays in a
537 : // single allocation, and is the one pointer that should be |free|d).
538 : static nsCSSPropertyID *gShorthandsContainingTable[eCSSProperty_COUNT_no_shorthands];
539 : static nsCSSPropertyID* gShorthandsContainingPool;
540 : static bool BuildShorthandsContainingTable();
541 :
542 : private:
543 : static const size_t gPropertyCountInStruct[nsStyleStructID_Length];
544 : static const size_t gPropertyIndexInStruct[eCSSProperty_COUNT_no_shorthands];
545 : public:
546 : /**
547 : * Return the number of properties that must be cascaded when
548 : * nsRuleNode builds the nsStyle* for aSID.
549 : */
550 56704 : static size_t PropertyCountInStruct(nsStyleStructID aSID) {
551 56704 : MOZ_ASSERT(0 <= aSID && aSID < nsStyleStructID_Length,
552 : "out of range");
553 56704 : return gPropertyCountInStruct[aSID];
554 : }
555 : /**
556 : * Return an index for aProperty that is unique within its SID and in
557 : * the range 0 <= index < PropertyCountInStruct(aSID).
558 : */
559 85553 : static size_t PropertyIndexInStruct(nsCSSPropertyID aProperty) {
560 85553 : MOZ_ASSERT(0 <= aProperty && aProperty < eCSSProperty_COUNT_no_shorthands,
561 : "out of range");
562 85553 : return gPropertyIndexInStruct[aProperty];
563 : }
564 :
565 : private:
566 : // A table for logical property groups. Indexes are
567 : // nsCSSPropertyLogicalGroup values.
568 : static const nsCSSPropertyID* const
569 : kLogicalGroupTable[eCSSPropertyLogicalGroup_COUNT];
570 :
571 : public:
572 : /**
573 : * Returns an array of longhand physical properties which can be set by
574 : * the argument, which must be a logical longhand property. The returned
575 : * array is terminated by an eCSSProperty_UNKNOWN value. For example,
576 : * given eCSSProperty_margin_block_start, returns an array of the four
577 : * properties eCSSProperty_margin_top, eCSSProperty_margin_right,
578 : * eCSSProperty_margin_bottom and eCSSProperty_margin_left, followed
579 : * by the sentinel.
580 : *
581 : * When called with a property that has the CSS_PROPERTY_LOGICAL_AXIS
582 : * flag, the returned array will have two values preceding the sentinel;
583 : * otherwise it will have four.
584 : *
585 : * (Note that the running time of this function is proportional to the
586 : * number of logical longhand properties that exist. If we start
587 : * getting too many of these properties, we should make kLogicalGroupTable
588 : * be a simple array of eCSSProperty_COUNT length.)
589 : */
590 : static const nsCSSPropertyID* LogicalGroup(nsCSSPropertyID aProperty);
591 :
592 : private:
593 : static bool gPropertyEnabled[eCSSProperty_COUNT_with_aliases];
594 :
595 : private:
596 : // Defined in the generated nsCSSPropsGenerated.inc.
597 : static const char* const kIDLNameTable[eCSSProperty_COUNT];
598 :
599 : public:
600 : /**
601 : * Returns the IDL name of the specified property, which must be a
602 : * longhand, logical or shorthand property. The IDL name is the property
603 : * name with any hyphen-lowercase character pairs replaced by an
604 : * uppercase character:
605 : * https://drafts.csswg.org/cssom/#css-property-to-idl-attribute
606 : *
607 : * As a special case, the string "cssFloat" is returned for the float
608 : * property. nullptr is returned for internal properties.
609 : */
610 0 : static const char* PropertyIDLName(nsCSSPropertyID aProperty)
611 : {
612 0 : MOZ_ASSERT(0 <= aProperty && aProperty < eCSSProperty_COUNT,
613 : "out of range");
614 0 : return kIDLNameTable[aProperty];
615 : }
616 :
617 : private:
618 : static const int32_t kIDLNameSortPositionTable[eCSSProperty_COUNT];
619 :
620 : public:
621 : /**
622 : * Returns the position of the specified property in a list of all
623 : * properties sorted by their IDL name.
624 : */
625 16 : static int32_t PropertyIDLNameSortPosition(nsCSSPropertyID aProperty)
626 : {
627 16 : MOZ_ASSERT(0 <= aProperty && aProperty < eCSSProperty_COUNT,
628 : "out of range");
629 16 : return kIDLNameSortPositionTable[aProperty];
630 : }
631 :
632 20041 : static bool IsEnabled(nsCSSPropertyID aProperty) {
633 20041 : MOZ_ASSERT(0 <= aProperty && aProperty < eCSSProperty_COUNT_with_aliases,
634 : "out of range");
635 : // We don't have useful pref init phases in the parent process. But in the
636 : // child process, assert that we're not trying to parse stylesheets before
637 : // we've gotten all our prefs.
638 20041 : MOZ_ASSERT(XRE_IsParentProcess() ||
639 : mozilla::Preferences::InitPhase() == END_ALL_PREFS,
640 : "Checking style preferences before they have been set");
641 20041 : return gPropertyEnabled[aProperty];
642 : }
643 :
644 : // A table for the use counter associated with each CSS property. If a
645 : // property does not have a use counter defined in UseCounters.conf, then
646 : // its associated entry is |eUseCounter_UNKNOWN|.
647 : static const mozilla::UseCounter gPropertyUseCounter[eCSSProperty_COUNT_no_shorthands];
648 :
649 : public:
650 :
651 6305 : static mozilla::UseCounter UseCounterFor(nsCSSPropertyID aProperty) {
652 6305 : MOZ_ASSERT(0 <= aProperty && aProperty < eCSSProperty_COUNT_no_shorthands,
653 : "out of range");
654 6305 : return gPropertyUseCounter[aProperty];
655 : }
656 :
657 19786 : static bool IsEnabled(nsCSSPropertyID aProperty, EnabledState aEnabled)
658 : {
659 19786 : if (IsEnabled(aProperty)) {
660 19742 : return true;
661 : }
662 44 : if (aEnabled == EnabledState::eIgnoreEnabledState) {
663 0 : return true;
664 : }
665 122 : if ((aEnabled & EnabledState::eInUASheets) &&
666 78 : PropHasFlags(aProperty, CSS_PROPERTY_ENABLED_IN_UA_SHEETS))
667 : {
668 34 : return true;
669 : }
670 22 : if ((aEnabled & EnabledState::eInChrome) &&
671 12 : PropHasFlags(aProperty, CSS_PROPERTY_ENABLED_IN_CHROME))
672 : {
673 2 : return true;
674 : }
675 8 : return false;
676 : }
677 :
678 : public:
679 :
680 : // Storing the enabledstate_ value in an nsCSSPropertyID variable is a small hack
681 : // to avoid needing a separate variable declaration for its real type
682 : // (CSSEnabledState), which would then require using a block and
683 : // therefore a pair of macros by consumers for the start and end of the loop.
684 : #define CSSPROPS_FOR_SHORTHAND_SUBPROPERTIES(it_, prop_, enabledstate_) \
685 : for (const nsCSSPropertyID *it_ = nsCSSProps::SubpropertyEntryFor(prop_), \
686 : es_ = (nsCSSPropertyID)((enabledstate_) | \
687 : CSSEnabledState(0)); \
688 : *it_ != eCSSProperty_UNKNOWN; ++it_) \
689 : if (nsCSSProps::IsEnabled(*it_, (mozilla::CSSEnabledState) es_))
690 :
691 : // Keyword/Enum value tables
692 : static const KTableEntry kAnimationDirectionKTable[];
693 : static const KTableEntry kAnimationFillModeKTable[];
694 : static const KTableEntry kAnimationIterationCountKTable[];
695 : static const KTableEntry kAnimationPlayStateKTable[];
696 : static const KTableEntry kAnimationTimingFunctionKTable[];
697 : static const KTableEntry kAppearanceKTable[];
698 : static const KTableEntry kAzimuthKTable[];
699 : static const KTableEntry kBackfaceVisibilityKTable[];
700 : static const KTableEntry kTransformStyleKTable[];
701 : static const KTableEntry kImageLayerAttachmentKTable[];
702 : static const KTableEntry kBackgroundOriginKTable[];
703 : static const KTableEntry kMaskOriginKTable[];
704 : static const KTableEntry kImageLayerPositionKTable[];
705 : static const KTableEntry kImageLayerRepeatKTable[];
706 : static const KTableEntry kImageLayerRepeatPartKTable[];
707 : static const KTableEntry kImageLayerSizeKTable[];
708 : static const KTableEntry kImageLayerCompositeKTable[];
709 : static const KTableEntry kImageLayerModeKTable[];
710 : // Not const because we modify its entries when the pref
711 : // "layout.css.background-clip.text" changes:
712 : static KTableEntry kBackgroundClipKTable[];
713 : static const KTableEntry kMaskClipKTable[];
714 : static const KTableEntry kBlendModeKTable[];
715 : static const KTableEntry kBorderCollapseKTable[];
716 : static const KTableEntry kBorderImageRepeatKTable[];
717 : static const KTableEntry kBorderImageSliceKTable[];
718 : static const KTableEntry kBorderStyleKTable[];
719 : static const KTableEntry kBorderWidthKTable[];
720 : static const KTableEntry kBoxAlignKTable[];
721 : static const KTableEntry kBoxDecorationBreakKTable[];
722 : static const KTableEntry kBoxDirectionKTable[];
723 : static const KTableEntry kBoxOrientKTable[];
724 : static const KTableEntry kBoxPackKTable[];
725 : static const KTableEntry kClipPathGeometryBoxKTable[];
726 : static const KTableEntry kCounterRangeKTable[];
727 : static const KTableEntry kCounterSpeakAsKTable[];
728 : static const KTableEntry kCounterSymbolsSystemKTable[];
729 : static const KTableEntry kCounterSystemKTable[];
730 : static const KTableEntry kDominantBaselineKTable[];
731 : static const KTableEntry kShapeRadiusKTable[];
732 : static const KTableEntry kFillRuleKTable[];
733 : static const KTableEntry kFilterFunctionKTable[];
734 : static const KTableEntry kImageRenderingKTable[];
735 : static const KTableEntry kShapeOutsideShapeBoxKTable[];
736 : static const KTableEntry kShapeRenderingKTable[];
737 : static const KTableEntry kStrokeLinecapKTable[];
738 : static const KTableEntry kStrokeLinejoinKTable[];
739 : static const KTableEntry kStrokeContextValueKTable[];
740 : static const KTableEntry kVectorEffectKTable[];
741 : static const KTableEntry kTextAnchorKTable[];
742 : static const KTableEntry kTextRenderingKTable[];
743 : static const KTableEntry kColorAdjustKTable[];
744 : static const KTableEntry kColorInterpolationKTable[];
745 : static const KTableEntry kColumnFillKTable[];
746 : static const KTableEntry kColumnSpanKTable[];
747 : static const KTableEntry kBoxPropSourceKTable[];
748 : static const KTableEntry kBoxShadowTypeKTable[];
749 : static const KTableEntry kBoxSizingKTable[];
750 : static const KTableEntry kCaptionSideKTable[];
751 : // Not const because we modify its entries when the pref
752 : // "layout.css.float-logical-values.enabled" changes:
753 : static KTableEntry kClearKTable[];
754 : static const KTableEntry kColorKTable[];
755 : static const KTableEntry kContentKTable[];
756 : static const KTableEntry kControlCharacterVisibilityKTable[];
757 : static const KTableEntry kCursorKTable[];
758 : static const KTableEntry kDirectionKTable[];
759 : // Not const because we modify its entries when various
760 : // "layout.css.*.enabled" prefs changes:
761 : static KTableEntry kDisplayKTable[];
762 : static const KTableEntry kElevationKTable[];
763 : static const KTableEntry kEmptyCellsKTable[];
764 : // -- tables for parsing the {align,justify}-{content,items,self} properties --
765 : static const KTableEntry kAlignAllKeywords[];
766 : static const KTableEntry kAlignOverflowPosition[]; // <overflow-position>
767 : static const KTableEntry kAlignSelfPosition[]; // <self-position>
768 : static const KTableEntry kAlignLegacy[]; // 'legacy'
769 : static const KTableEntry kAlignLegacyPosition[]; // 'left/right/center'
770 : static const KTableEntry kAlignAutoNormalStretchBaseline[]; // 'auto/normal/stretch/baseline'
771 : static const KTableEntry kAlignNormalStretchBaseline[]; // 'normal/stretch/baseline'
772 : static const KTableEntry kAlignNormalBaseline[]; // 'normal/baseline'
773 : static const KTableEntry kAlignContentDistribution[]; // <content-distribution>
774 : static const KTableEntry kAlignContentPosition[]; // <content-position>
775 : // -- tables for auto-completion of the {align,justify}-{content,items,self} properties --
776 : static const KTableEntry kAutoCompletionAlignJustifySelf[];
777 : static const KTableEntry kAutoCompletionAlignItems[];
778 : static const KTableEntry kAutoCompletionAlignJustifyContent[];
779 : // ------------------------------------------------------------------
780 : static const KTableEntry kFlexDirectionKTable[];
781 : static const KTableEntry kFlexWrapKTable[];
782 : // Not const because we modify its entries when the pref
783 : // "layout.css.float-logical-values.enabled" changes:
784 : static KTableEntry kFloatKTable[];
785 : static const KTableEntry kFloatEdgeKTable[];
786 : static const KTableEntry kFontDisplayKTable[];
787 : static const KTableEntry kFontKTable[];
788 : static const KTableEntry kFontKerningKTable[];
789 : static const KTableEntry kFontSizeKTable[];
790 : static const KTableEntry kFontSmoothingKTable[];
791 : static const KTableEntry kFontStretchKTable[];
792 : static const KTableEntry kFontStyleKTable[];
793 : static const KTableEntry kFontSynthesisKTable[];
794 : static const KTableEntry kFontVariantKTable[];
795 : static const KTableEntry kFontVariantAlternatesKTable[];
796 : static const KTableEntry kFontVariantAlternatesFuncsKTable[];
797 : static const KTableEntry kFontVariantCapsKTable[];
798 : static const KTableEntry kFontVariantEastAsianKTable[];
799 : static const KTableEntry kFontVariantLigaturesKTable[];
800 : static const KTableEntry kFontVariantNumericKTable[];
801 : static const KTableEntry kFontVariantPositionKTable[];
802 : static const KTableEntry kFontWeightKTable[];
803 : static const KTableEntry kGridAutoFlowKTable[];
804 : static const KTableEntry kGridTrackBreadthKTable[];
805 : static const KTableEntry kHyphensKTable[];
806 : static const KTableEntry kImageOrientationKTable[];
807 : static const KTableEntry kImageOrientationFlipKTable[];
808 : static const KTableEntry kIsolationKTable[];
809 : static const KTableEntry kIMEModeKTable[];
810 : static const KTableEntry kLineHeightKTable[];
811 : static const KTableEntry kListStylePositionKTable[];
812 : static const KTableEntry kListStyleKTable[];
813 : static const KTableEntry kMaskTypeKTable[];
814 : static const KTableEntry kMathVariantKTable[];
815 : static const KTableEntry kMathDisplayKTable[];
816 : static const KTableEntry kContainKTable[];
817 : static const KTableEntry kContextOpacityKTable[];
818 : static const KTableEntry kContextPatternKTable[];
819 : static const KTableEntry kObjectFitKTable[];
820 : static const KTableEntry kOrientKTable[];
821 : static const KTableEntry kOutlineStyleKTable[];
822 : static const KTableEntry kOverflowKTable[];
823 : static const KTableEntry kOverflowSubKTable[];
824 : static const KTableEntry kOverflowClipBoxKTable[];
825 : static const KTableEntry kOverflowWrapKTable[];
826 : static const KTableEntry kPageBreakKTable[];
827 : static const KTableEntry kPageBreakInsideKTable[];
828 : static const KTableEntry kPageMarksKTable[];
829 : static const KTableEntry kPageSizeKTable[];
830 : static const KTableEntry kPitchKTable[];
831 : static const KTableEntry kPointerEventsKTable[];
832 : static const KTableEntry kPositionKTable[];
833 : static const KTableEntry kRadialGradientShapeKTable[];
834 : static const KTableEntry kRadialGradientSizeKTable[];
835 : static const KTableEntry kRadialGradientLegacySizeKTable[];
836 : static const KTableEntry kResizeKTable[];
837 : static const KTableEntry kRubyAlignKTable[];
838 : static const KTableEntry kRubyPositionKTable[];
839 : static const KTableEntry kScrollBehaviorKTable[];
840 : static const KTableEntry kScrollSnapTypeKTable[];
841 : static const KTableEntry kSpeakKTable[];
842 : static const KTableEntry kSpeakHeaderKTable[];
843 : static const KTableEntry kSpeakNumeralKTable[];
844 : static const KTableEntry kSpeakPunctuationKTable[];
845 : static const KTableEntry kSpeechRateKTable[];
846 : static const KTableEntry kStackSizingKTable[];
847 : static const KTableEntry kTableLayoutKTable[];
848 : // Not const because we modify its entries when the pref
849 : // "layout.css.text-align-unsafe-value.enabled" changes:
850 : static KTableEntry kTextAlignKTable[];
851 : static KTableEntry kTextAlignLastKTable[];
852 : static const KTableEntry kTextCombineUprightKTable[];
853 : static const KTableEntry kTextDecorationLineKTable[];
854 : static const KTableEntry kTextDecorationStyleKTable[];
855 : static const KTableEntry kTextEmphasisPositionKTable[];
856 : static const KTableEntry kTextEmphasisStyleFillKTable[];
857 : static const KTableEntry kTextEmphasisStyleShapeKTable[];
858 : static const KTableEntry kTextJustifyKTable[];
859 : static const KTableEntry kTextOrientationKTable[];
860 : static const KTableEntry kTextOverflowKTable[];
861 : static const KTableEntry kTextSizeAdjustKTable[];
862 : static const KTableEntry kTextTransformKTable[];
863 : static const KTableEntry kTouchActionKTable[];
864 : static const KTableEntry kTopLayerKTable[];
865 : static const KTableEntry kTransformBoxKTable[];
866 : static const KTableEntry kTransitionTimingFunctionKTable[];
867 : static const KTableEntry kUnicodeBidiKTable[];
868 : static const KTableEntry kUserFocusKTable[];
869 : static const KTableEntry kUserInputKTable[];
870 : static const KTableEntry kUserModifyKTable[];
871 : static const KTableEntry kUserSelectKTable[];
872 : static const KTableEntry kVerticalAlignKTable[];
873 : static const KTableEntry kVisibilityKTable[];
874 : static const KTableEntry kVolumeKTable[];
875 : static const KTableEntry kWhitespaceKTable[];
876 : static const KTableEntry kWidthKTable[]; // also min-width, max-width
877 : static const KTableEntry kWindowDraggingKTable[];
878 : static const KTableEntry kWindowShadowKTable[];
879 : static const KTableEntry kWordBreakKTable[];
880 : static const KTableEntry kWritingModeKTable[];
881 : };
882 :
883 : #endif /* nsCSSProps_h___ */
|