Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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/. */
6 /* constants used in the style struct data provided by nsStyleContext */
8 #ifndef nsStyleConsts_h___
9 #define nsStyleConsts_h___
11 #include "gfxRect.h"
12 #include "nsFont.h"
14 // XXX fold this into nsStyleContext and group by nsStyleXXX struct
16 // Indices into border/padding/margin arrays
17 #define NS_SIDE_TOP mozilla::css::eSideTop
18 #define NS_SIDE_RIGHT mozilla::css::eSideRight
19 #define NS_SIDE_BOTTOM mozilla::css::eSideBottom
20 #define NS_SIDE_LEFT mozilla::css::eSideLeft
22 #define NS_FOR_CSS_SIDES(var_) for (mozilla::css::Side var_ = NS_SIDE_TOP; var_ <= NS_SIDE_LEFT; var_++)
23 static inline mozilla::css::Side operator++(mozilla::css::Side& side, int) {
24 NS_PRECONDITION(side >= NS_SIDE_TOP &&
25 side <= NS_SIDE_LEFT, "Out of range side");
26 side = mozilla::css::Side(side + 1);
27 return side;
28 }
30 #define NS_FOR_CSS_FULL_CORNERS(var_) for (int32_t var_ = 0; var_ < 4; ++var_)
32 // Indices into "half corner" arrays (nsStyleCorners e.g.)
33 #define NS_CORNER_TOP_LEFT_X 0
34 #define NS_CORNER_TOP_LEFT_Y 1
35 #define NS_CORNER_TOP_RIGHT_X 2
36 #define NS_CORNER_TOP_RIGHT_Y 3
37 #define NS_CORNER_BOTTOM_RIGHT_X 4
38 #define NS_CORNER_BOTTOM_RIGHT_Y 5
39 #define NS_CORNER_BOTTOM_LEFT_X 6
40 #define NS_CORNER_BOTTOM_LEFT_Y 7
42 #define NS_FOR_CSS_HALF_CORNERS(var_) for (int32_t var_ = 0; var_ < 8; ++var_)
44 // The results of these conversion macros are exhaustively checked in
45 // nsStyleCoord.cpp.
46 // Arguments must not have side effects.
48 #define NS_HALF_CORNER_IS_X(var_) (!((var_)%2))
49 #define NS_HALF_TO_FULL_CORNER(var_) ((var_)/2)
50 #define NS_FULL_TO_HALF_CORNER(var_, vert_) ((var_)*2 + !!(vert_))
52 #define NS_SIDE_IS_VERTICAL(side_) ((side_) % 2)
53 #define NS_SIDE_TO_FULL_CORNER(side_, second_) \
54 (((side_) + !!(second_)) % 4)
55 #define NS_SIDE_TO_HALF_CORNER(side_, second_, parallel_) \
56 ((((side_) + !!(second_))*2 + ((side_) + !(parallel_))%2) % 8)
58 // {margin,border-{width,style,color},padding}-{left,right}-{ltr,rtl}-source
59 #define NS_BOXPROP_SOURCE_PHYSICAL 0
60 #define NS_BOXPROP_SOURCE_LOGICAL 1
62 // box-sizing
63 #define NS_STYLE_BOX_SIZING_CONTENT 0
64 #define NS_STYLE_BOX_SIZING_PADDING 1
65 #define NS_STYLE_BOX_SIZING_BORDER 2
67 // box-shadow
68 #define NS_STYLE_BOX_SHADOW_INSET 0
70 // float-edge
71 #define NS_STYLE_FLOAT_EDGE_CONTENT 0
72 #define NS_STYLE_FLOAT_EDGE_MARGIN 1
74 // user-focus
75 #define NS_STYLE_USER_FOCUS_NONE 0
76 #define NS_STYLE_USER_FOCUS_IGNORE 1
77 #define NS_STYLE_USER_FOCUS_NORMAL 2
78 #define NS_STYLE_USER_FOCUS_SELECT_ALL 3
79 #define NS_STYLE_USER_FOCUS_SELECT_BEFORE 4
80 #define NS_STYLE_USER_FOCUS_SELECT_AFTER 5
81 #define NS_STYLE_USER_FOCUS_SELECT_SAME 6
82 #define NS_STYLE_USER_FOCUS_SELECT_MENU 7
84 // user-select
85 #define NS_STYLE_USER_SELECT_NONE 0
86 #define NS_STYLE_USER_SELECT_TEXT 1
87 #define NS_STYLE_USER_SELECT_ELEMENT 2
88 #define NS_STYLE_USER_SELECT_ELEMENTS 3
89 #define NS_STYLE_USER_SELECT_ALL 4
90 #define NS_STYLE_USER_SELECT_TOGGLE 5
91 #define NS_STYLE_USER_SELECT_TRI_STATE 6
92 #define NS_STYLE_USER_SELECT_AUTO 7 // internal value - please use nsFrame::IsSelectable()
93 #define NS_STYLE_USER_SELECT_MOZ_ALL 8 // force selection of all children, unless an ancestor has NONE set - bug 48096
94 #define NS_STYLE_USER_SELECT_MOZ_NONE 9 // Like NONE, but doesn't change selection behavior for descendants whose user-select is not AUTO.
96 // user-input
97 #define NS_STYLE_USER_INPUT_NONE 0
98 #define NS_STYLE_USER_INPUT_ENABLED 1
99 #define NS_STYLE_USER_INPUT_DISABLED 2
100 #define NS_STYLE_USER_INPUT_AUTO 3
102 // user-modify
103 #define NS_STYLE_USER_MODIFY_READ_ONLY 0
104 #define NS_STYLE_USER_MODIFY_READ_WRITE 1
105 #define NS_STYLE_USER_MODIFY_WRITE_ONLY 2
107 // box-align
108 #define NS_STYLE_BOX_ALIGN_STRETCH 0
109 #define NS_STYLE_BOX_ALIGN_START 1
110 #define NS_STYLE_BOX_ALIGN_CENTER 2
111 #define NS_STYLE_BOX_ALIGN_BASELINE 3
112 #define NS_STYLE_BOX_ALIGN_END 4
114 // box-pack
115 #define NS_STYLE_BOX_PACK_START 0
116 #define NS_STYLE_BOX_PACK_CENTER 1
117 #define NS_STYLE_BOX_PACK_END 2
118 #define NS_STYLE_BOX_PACK_JUSTIFY 3
120 // box-direction
121 #define NS_STYLE_BOX_DIRECTION_NORMAL 0
122 #define NS_STYLE_BOX_DIRECTION_REVERSE 1
124 // box-orient
125 #define NS_STYLE_BOX_ORIENT_HORIZONTAL 0
126 #define NS_STYLE_BOX_ORIENT_VERTICAL 1
128 // orient
129 #define NS_STYLE_ORIENT_HORIZONTAL 0
130 #define NS_STYLE_ORIENT_VERTICAL 1
131 #define NS_STYLE_ORIENT_AUTO 2
133 // stack-sizing
134 #define NS_STYLE_STACK_SIZING_IGNORE 0
135 #define NS_STYLE_STACK_SIZING_STRETCH_TO_FIT 1
137 // Azimuth - See nsStyleAural
138 #define NS_STYLE_AZIMUTH_LEFT_SIDE 0x00
139 #define NS_STYLE_AZIMUTH_FAR_LEFT 0x01
140 #define NS_STYLE_AZIMUTH_LEFT 0x02
141 #define NS_STYLE_AZIMUTH_CENTER_LEFT 0x03
142 #define NS_STYLE_AZIMUTH_CENTER 0x04
143 #define NS_STYLE_AZIMUTH_CENTER_RIGHT 0x05
144 #define NS_STYLE_AZIMUTH_RIGHT 0x06
145 #define NS_STYLE_AZIMUTH_FAR_RIGHT 0x07
146 #define NS_STYLE_AZIMUTH_RIGHT_SIDE 0x08
147 #define NS_STYLE_AZIMUTH_BEHIND 0x80 // bits
148 #define NS_STYLE_AZIMUTH_LEFTWARDS 0x10 // bits
149 #define NS_STYLE_AZIMUTH_RIGHTWARDS 0x20 // bits
151 // See nsStyleAural
152 #define NS_STYLE_ELEVATION_BELOW 1
153 #define NS_STYLE_ELEVATION_LEVEL 2
154 #define NS_STYLE_ELEVATION_ABOVE 3
155 #define NS_STYLE_ELEVATION_HIGHER 4
156 #define NS_STYLE_ELEVATION_LOWER 5
158 // See nsStyleAural
159 #define NS_STYLE_PITCH_X_LOW 1
160 #define NS_STYLE_PITCH_LOW 2
161 #define NS_STYLE_PITCH_MEDIUM 3
162 #define NS_STYLE_PITCH_HIGH 4
163 #define NS_STYLE_PITCH_X_HIGH 5
165 // See nsStyleAural
166 #define NS_STYLE_SPEAK_NONE 0
167 #define NS_STYLE_SPEAK_NORMAL 1
168 #define NS_STYLE_SPEAK_SPELL_OUT 2
170 // See nsStyleAural
171 #define NS_STYLE_SPEAK_HEADER_ONCE 0
172 #define NS_STYLE_SPEAK_HEADER_ALWAYS 1
174 // See nsStyleAural
175 #define NS_STYLE_SPEAK_NUMERAL_DIGITS 0
176 #define NS_STYLE_SPEAK_NUMERAL_CONTINUOUS 1
178 // See nsStyleAural
179 #define NS_STYLE_SPEAK_PUNCTUATION_NONE 0
180 #define NS_STYLE_SPEAK_PUNCTUATION_CODE 1
182 // See nsStyleAural
183 #define NS_STYLE_SPEECH_RATE_X_SLOW 0
184 #define NS_STYLE_SPEECH_RATE_SLOW 1
185 #define NS_STYLE_SPEECH_RATE_MEDIUM 2
186 #define NS_STYLE_SPEECH_RATE_FAST 3
187 #define NS_STYLE_SPEECH_RATE_X_FAST 4
188 #define NS_STYLE_SPEECH_RATE_FASTER 10
189 #define NS_STYLE_SPEECH_RATE_SLOWER 11
191 // See nsStyleAural
192 #define NS_STYLE_VOLUME_SILENT 0
193 #define NS_STYLE_VOLUME_X_SOFT 1
194 #define NS_STYLE_VOLUME_SOFT 2
195 #define NS_STYLE_VOLUME_MEDIUM 3
196 #define NS_STYLE_VOLUME_LOUD 4
197 #define NS_STYLE_VOLUME_X_LOUD 5
199 // See nsStyleColor
200 #define NS_STYLE_COLOR_MOZ_USE_TEXT_COLOR 1
201 #define NS_STYLE_COLOR_INHERIT_FROM_BODY 2 /* Can't come from CSS directly */
203 // See nsStyleColor
204 #define NS_COLOR_CURRENTCOLOR -1
205 #define NS_COLOR_MOZ_DEFAULT_COLOR -2
206 #define NS_COLOR_MOZ_DEFAULT_BACKGROUND_COLOR -3
207 #define NS_COLOR_MOZ_HYPERLINKTEXT -4
208 #define NS_COLOR_MOZ_VISITEDHYPERLINKTEXT -5
209 #define NS_COLOR_MOZ_ACTIVEHYPERLINKTEXT -6
210 // Only valid as paints in SVG glyphs
211 #define NS_COLOR_CONTEXT_FILL -7
212 #define NS_COLOR_CONTEXT_STROKE -8
214 // See nsStyleDisplay
215 #define NS_STYLE_WILL_CHANGE_STACKING_CONTEXT (1<<0)
216 #define NS_STYLE_WILL_CHANGE_TRANSFORM (1<<1)
217 #define NS_STYLE_WILL_CHANGE_SCROLL (1<<2)
218 #define NS_STYLE_WILL_CHANGE_OPACITY (1<<3)
220 // See nsStyleDisplay
221 #define NS_STYLE_ANIMATION_DIRECTION_NORMAL 0
222 #define NS_STYLE_ANIMATION_DIRECTION_REVERSE 1
223 #define NS_STYLE_ANIMATION_DIRECTION_ALTERNATE 2
224 #define NS_STYLE_ANIMATION_DIRECTION_ALTERNATE_REVERSE 3
226 // See nsStyleDisplay
227 #define NS_STYLE_ANIMATION_FILL_MODE_NONE 0
228 #define NS_STYLE_ANIMATION_FILL_MODE_FORWARDS 1
229 #define NS_STYLE_ANIMATION_FILL_MODE_BACKWARDS 2
230 #define NS_STYLE_ANIMATION_FILL_MODE_BOTH 3
232 // See nsStyleDisplay
233 #define NS_STYLE_ANIMATION_ITERATION_COUNT_INFINITE 0
235 // See nsStyleDisplay
236 #define NS_STYLE_ANIMATION_PLAY_STATE_RUNNING 0
237 #define NS_STYLE_ANIMATION_PLAY_STATE_PAUSED 1
239 // See nsStyleBackground
240 #define NS_STYLE_BG_ATTACHMENT_SCROLL 0
241 #define NS_STYLE_BG_ATTACHMENT_FIXED 1
242 #define NS_STYLE_BG_ATTACHMENT_LOCAL 2
244 // See nsStyleBackground
245 // Code depends on these constants having the same values as BG_ORIGIN_*
246 #define NS_STYLE_BG_CLIP_BORDER 0
247 #define NS_STYLE_BG_CLIP_PADDING 1
248 #define NS_STYLE_BG_CLIP_CONTENT 2
249 // A magic value that we use for our "pretend that background-clip is
250 // 'padding' when we have a solid border" optimization. This isn't
251 // actually equal to NS_STYLE_BG_CLIP_PADDING because using that
252 // causes antialiasing seams between the background and border. This
253 // is a backend-only value.
254 #define NS_STYLE_BG_CLIP_MOZ_ALMOST_PADDING 127
256 // See nsStyleBackground
257 #define NS_STYLE_BG_INLINE_POLICY_EACH_BOX 0
258 #define NS_STYLE_BG_INLINE_POLICY_CONTINUOUS 1
259 #define NS_STYLE_BG_INLINE_POLICY_BOUNDING_BOX 2
261 // See nsStyleBackground
262 // Code depends on these constants having the same values as BG_CLIP_*
263 #define NS_STYLE_BG_ORIGIN_BORDER 0
264 #define NS_STYLE_BG_ORIGIN_PADDING 1
265 #define NS_STYLE_BG_ORIGIN_CONTENT 2
267 // See nsStyleBackground
268 // The parser code depends on |ing these values together.
269 #define NS_STYLE_BG_POSITION_CENTER (1<<0)
270 #define NS_STYLE_BG_POSITION_TOP (1<<1)
271 #define NS_STYLE_BG_POSITION_BOTTOM (1<<2)
272 #define NS_STYLE_BG_POSITION_LEFT (1<<3)
273 #define NS_STYLE_BG_POSITION_RIGHT (1<<4)
275 // See nsStyleBackground
276 #define NS_STYLE_BG_REPEAT_NO_REPEAT 0x00
277 #define NS_STYLE_BG_REPEAT_REPEAT_X 0x01
278 #define NS_STYLE_BG_REPEAT_REPEAT_Y 0x02
279 #define NS_STYLE_BG_REPEAT_REPEAT 0x03
281 // See nsStyleBackground
282 #define NS_STYLE_BG_SIZE_CONTAIN 0
283 #define NS_STYLE_BG_SIZE_COVER 1
285 // See nsStyleTable
286 #define NS_STYLE_BORDER_COLLAPSE 0
287 #define NS_STYLE_BORDER_SEPARATE 1
289 // Possible enumerated specified values of border-*-width, used by nsCSSMargin
290 #define NS_STYLE_BORDER_WIDTH_THIN 0
291 #define NS_STYLE_BORDER_WIDTH_MEDIUM 1
292 #define NS_STYLE_BORDER_WIDTH_THICK 2
293 // XXX chopping block #define NS_STYLE_BORDER_WIDTH_LENGTH_VALUE 3
295 // See nsStyleBorder mBorderStyle
296 #define NS_STYLE_BORDER_STYLE_NONE 0
297 #define NS_STYLE_BORDER_STYLE_GROOVE 1
298 #define NS_STYLE_BORDER_STYLE_RIDGE 2
299 #define NS_STYLE_BORDER_STYLE_DOTTED 3
300 #define NS_STYLE_BORDER_STYLE_DASHED 4
301 #define NS_STYLE_BORDER_STYLE_SOLID 5
302 #define NS_STYLE_BORDER_STYLE_DOUBLE 6
303 #define NS_STYLE_BORDER_STYLE_INSET 7
304 #define NS_STYLE_BORDER_STYLE_OUTSET 8
305 #define NS_STYLE_BORDER_STYLE_HIDDEN 9
306 #define NS_STYLE_BORDER_STYLE_AUTO 10 // for outline-style only
308 // See nsStyleBorder mBorderImage
309 #define NS_STYLE_BORDER_IMAGE_REPEAT_STRETCH 0
310 #define NS_STYLE_BORDER_IMAGE_REPEAT_REPEAT 1
311 #define NS_STYLE_BORDER_IMAGE_REPEAT_ROUND 2
313 #define NS_STYLE_BORDER_IMAGE_SLICE_NOFILL 0
314 #define NS_STYLE_BORDER_IMAGE_SLICE_FILL 1
316 // See nsStyleDisplay
317 #define NS_STYLE_CLEAR_NONE 0
318 #define NS_STYLE_CLEAR_LEFT 1
319 #define NS_STYLE_CLEAR_RIGHT 2
320 #define NS_STYLE_CLEAR_BOTH 3
321 #define NS_STYLE_CLEAR_LINE 4
322 // @note NS_STYLE_CLEAR_LINE can be added to one of the other values in layout
323 // so it needs to use a bit value that none of the other values can have.
324 #define NS_STYLE_CLEAR_MAX (NS_STYLE_CLEAR_LINE | NS_STYLE_CLEAR_BOTH)
326 // See nsStyleContent
327 #define NS_STYLE_CONTENT_OPEN_QUOTE 0
328 #define NS_STYLE_CONTENT_CLOSE_QUOTE 1
329 #define NS_STYLE_CONTENT_NO_OPEN_QUOTE 2
330 #define NS_STYLE_CONTENT_NO_CLOSE_QUOTE 3
331 #define NS_STYLE_CONTENT_ALT_CONTENT 4
333 // See nsStyleColor
334 #define NS_STYLE_CURSOR_AUTO 1
335 #define NS_STYLE_CURSOR_CROSSHAIR 2
336 #define NS_STYLE_CURSOR_DEFAULT 3 // ie: an arrow
337 #define NS_STYLE_CURSOR_POINTER 4 // for links
338 #define NS_STYLE_CURSOR_MOVE 5
339 #define NS_STYLE_CURSOR_E_RESIZE 6
340 #define NS_STYLE_CURSOR_NE_RESIZE 7
341 #define NS_STYLE_CURSOR_NW_RESIZE 8
342 #define NS_STYLE_CURSOR_N_RESIZE 9
343 #define NS_STYLE_CURSOR_SE_RESIZE 10
344 #define NS_STYLE_CURSOR_SW_RESIZE 11
345 #define NS_STYLE_CURSOR_S_RESIZE 12
346 #define NS_STYLE_CURSOR_W_RESIZE 13
347 #define NS_STYLE_CURSOR_TEXT 14 // ie: i-beam
348 #define NS_STYLE_CURSOR_WAIT 15
349 #define NS_STYLE_CURSOR_HELP 16
350 #define NS_STYLE_CURSOR_COPY 17 // CSS3
351 #define NS_STYLE_CURSOR_ALIAS 18
352 #define NS_STYLE_CURSOR_CONTEXT_MENU 19
353 #define NS_STYLE_CURSOR_CELL 20
354 #define NS_STYLE_CURSOR_GRAB 21
355 #define NS_STYLE_CURSOR_GRABBING 22
356 #define NS_STYLE_CURSOR_SPINNING 23
357 #define NS_STYLE_CURSOR_ZOOM_IN 24
358 #define NS_STYLE_CURSOR_ZOOM_OUT 25
359 #define NS_STYLE_CURSOR_NOT_ALLOWED 26
360 #define NS_STYLE_CURSOR_COL_RESIZE 27
361 #define NS_STYLE_CURSOR_ROW_RESIZE 28
362 #define NS_STYLE_CURSOR_NO_DROP 29
363 #define NS_STYLE_CURSOR_VERTICAL_TEXT 30
364 #define NS_STYLE_CURSOR_ALL_SCROLL 31
365 #define NS_STYLE_CURSOR_NESW_RESIZE 32
366 #define NS_STYLE_CURSOR_NWSE_RESIZE 33
367 #define NS_STYLE_CURSOR_NS_RESIZE 34
368 #define NS_STYLE_CURSOR_EW_RESIZE 35
369 #define NS_STYLE_CURSOR_NONE 36
371 // See nsStyleVisibility
372 #define NS_STYLE_DIRECTION_LTR 0
373 #define NS_STYLE_DIRECTION_RTL 1
374 #define NS_STYLE_DIRECTION_INHERIT 2
376 // See nsStyleVisibility
377 #define NS_STYLE_WRITING_MODE_HORIZONTAL_TB 0
378 #define NS_STYLE_WRITING_MODE_VERTICAL_LR 1
379 #define NS_STYLE_WRITING_MODE_VERTICAL_RL 2
381 // See nsStyleDisplay
382 #define NS_STYLE_DISPLAY_NONE 0
383 #define NS_STYLE_DISPLAY_BLOCK 1
384 #define NS_STYLE_DISPLAY_INLINE 2
385 #define NS_STYLE_DISPLAY_INLINE_BLOCK 3
386 #define NS_STYLE_DISPLAY_LIST_ITEM 4
387 #define NS_STYLE_DISPLAY_TABLE 8
388 #define NS_STYLE_DISPLAY_INLINE_TABLE 9
389 #define NS_STYLE_DISPLAY_TABLE_ROW_GROUP 10
390 #define NS_STYLE_DISPLAY_TABLE_COLUMN 11
391 #define NS_STYLE_DISPLAY_TABLE_COLUMN_GROUP 12
392 #define NS_STYLE_DISPLAY_TABLE_HEADER_GROUP 13
393 #define NS_STYLE_DISPLAY_TABLE_FOOTER_GROUP 14
394 #define NS_STYLE_DISPLAY_TABLE_ROW 15
395 #define NS_STYLE_DISPLAY_TABLE_CELL 16
396 #define NS_STYLE_DISPLAY_TABLE_CAPTION 17
397 #define NS_STYLE_DISPLAY_BOX 18
398 #define NS_STYLE_DISPLAY_INLINE_BOX 19
399 #ifdef MOZ_XUL
400 #define NS_STYLE_DISPLAY_XUL_GRID 20
401 #define NS_STYLE_DISPLAY_INLINE_XUL_GRID 21
402 #define NS_STYLE_DISPLAY_XUL_GRID_GROUP 22
403 #define NS_STYLE_DISPLAY_XUL_GRID_LINE 23
404 #define NS_STYLE_DISPLAY_STACK 24
405 #define NS_STYLE_DISPLAY_INLINE_STACK 25
406 #define NS_STYLE_DISPLAY_DECK 26
407 #define NS_STYLE_DISPLAY_POPUP 27
408 #define NS_STYLE_DISPLAY_GROUPBOX 28
409 #endif
410 #define NS_STYLE_DISPLAY_FLEX 29
411 #define NS_STYLE_DISPLAY_INLINE_FLEX 30
412 #define NS_STYLE_DISPLAY_GRID 31
413 #define NS_STYLE_DISPLAY_INLINE_GRID 32
415 // See nsStylePosition
416 #define NS_STYLE_ALIGN_CONTENT_FLEX_START 0
417 #define NS_STYLE_ALIGN_CONTENT_FLEX_END 1
418 #define NS_STYLE_ALIGN_CONTENT_CENTER 2
419 #define NS_STYLE_ALIGN_CONTENT_SPACE_BETWEEN 3
420 #define NS_STYLE_ALIGN_CONTENT_SPACE_AROUND 4
421 #define NS_STYLE_ALIGN_CONTENT_STRETCH 5
423 // See nsStylePosition
424 #define NS_STYLE_ALIGN_ITEMS_FLEX_START 0
425 #define NS_STYLE_ALIGN_ITEMS_FLEX_END 1
426 #define NS_STYLE_ALIGN_ITEMS_CENTER 2
427 #define NS_STYLE_ALIGN_ITEMS_BASELINE 3
428 #define NS_STYLE_ALIGN_ITEMS_STRETCH 4
430 // For convenience/clarity (since we use this default value in multiple places)
431 #define NS_STYLE_ALIGN_ITEMS_INITIAL_VALUE NS_STYLE_ALIGN_ITEMS_STRETCH
433 // The "align-self" property accepts all of the normal "align-items" values
434 // (above) plus a special 'auto' value that computes to the parent's
435 // "align-items" value. Our computed style code internally represents 'auto'
436 // with this enum until we actually evaluate it:
437 #define NS_STYLE_ALIGN_SELF_AUTO 5
439 // See nsStylePosition
440 #define NS_STYLE_FLEX_DIRECTION_ROW 0
441 #define NS_STYLE_FLEX_DIRECTION_ROW_REVERSE 1
442 #define NS_STYLE_FLEX_DIRECTION_COLUMN 2
443 #define NS_STYLE_FLEX_DIRECTION_COLUMN_REVERSE 3
445 // See nsStylePosition
446 #define NS_STYLE_FLEX_WRAP_NOWRAP 0
447 #define NS_STYLE_FLEX_WRAP_WRAP 1
448 #define NS_STYLE_FLEX_WRAP_WRAP_REVERSE 2
450 // See nsStylePosition
451 // NOTE: This is the initial value of the integer-valued 'order' property
452 // (rather than an internal numerical representation of some keyword).
453 #define NS_STYLE_ORDER_INITIAL 0
455 // See nsStylePosition
456 #define NS_STYLE_JUSTIFY_CONTENT_FLEX_START 0
457 #define NS_STYLE_JUSTIFY_CONTENT_FLEX_END 1
458 #define NS_STYLE_JUSTIFY_CONTENT_CENTER 2
459 #define NS_STYLE_JUSTIFY_CONTENT_SPACE_BETWEEN 3
460 #define NS_STYLE_JUSTIFY_CONTENT_SPACE_AROUND 4
462 // See nsStyleDisplay
463 #define NS_STYLE_FLOAT_NONE 0
464 #define NS_STYLE_FLOAT_LEFT 1
465 #define NS_STYLE_FLOAT_RIGHT 2
467 // See nsStyleFilter
468 #define NS_STYLE_FILTER_NONE 0
469 #define NS_STYLE_FILTER_URL 1
470 #define NS_STYLE_FILTER_BLUR 2
471 #define NS_STYLE_FILTER_BRIGHTNESS 3
472 #define NS_STYLE_FILTER_CONTRAST 4
473 #define NS_STYLE_FILTER_GRAYSCALE 5
474 #define NS_STYLE_FILTER_INVERT 6
475 #define NS_STYLE_FILTER_OPACITY 7
476 #define NS_STYLE_FILTER_SATURATE 8
477 #define NS_STYLE_FILTER_SEPIA 9
478 #define NS_STYLE_FILTER_HUE_ROTATE 10
479 #define NS_STYLE_FILTER_DROP_SHADOW 11
481 // See nsStyleFont
482 // We should eventually stop using the NS_STYLE_* variants here.
483 #define NS_STYLE_FONT_STYLE_NORMAL NS_FONT_STYLE_NORMAL
484 #define NS_STYLE_FONT_STYLE_ITALIC NS_FONT_STYLE_ITALIC
485 #define NS_STYLE_FONT_STYLE_OBLIQUE NS_FONT_STYLE_OBLIQUE
487 // See nsStyleFont
488 // We should eventually stop using the NS_STYLE_* variants here.
489 #define NS_STYLE_FONT_VARIANT_NORMAL NS_FONT_VARIANT_NORMAL
490 #define NS_STYLE_FONT_VARIANT_SMALL_CAPS NS_FONT_VARIANT_SMALL_CAPS
492 // See nsStyleFont
493 // We should eventually stop using the NS_STYLE_* variants here.
494 #define NS_STYLE_FONT_WEIGHT_NORMAL NS_FONT_WEIGHT_NORMAL
495 #define NS_STYLE_FONT_WEIGHT_BOLD NS_FONT_WEIGHT_BOLD
496 // The constants below appear only in style sheets and not computed style.
497 #define NS_STYLE_FONT_WEIGHT_BOLDER (-1)
498 #define NS_STYLE_FONT_WEIGHT_LIGHTER (-2)
500 // See nsStyleFont
501 #define NS_STYLE_FONT_SIZE_XXSMALL 0
502 #define NS_STYLE_FONT_SIZE_XSMALL 1
503 #define NS_STYLE_FONT_SIZE_SMALL 2
504 #define NS_STYLE_FONT_SIZE_MEDIUM 3
505 #define NS_STYLE_FONT_SIZE_LARGE 4
506 #define NS_STYLE_FONT_SIZE_XLARGE 5
507 #define NS_STYLE_FONT_SIZE_XXLARGE 6
508 #define NS_STYLE_FONT_SIZE_XXXLARGE 7 // Only used by <font size="7">. Not specifiable in CSS.
509 #define NS_STYLE_FONT_SIZE_LARGER 8
510 #define NS_STYLE_FONT_SIZE_SMALLER 9
512 // See nsStyleFont
513 // We should eventually stop using the NS_STYLE_* variants here.
514 #define NS_STYLE_FONT_STRETCH_ULTRA_CONDENSED NS_FONT_STRETCH_ULTRA_CONDENSED
515 #define NS_STYLE_FONT_STRETCH_EXTRA_CONDENSED NS_FONT_STRETCH_EXTRA_CONDENSED
516 #define NS_STYLE_FONT_STRETCH_CONDENSED NS_FONT_STRETCH_CONDENSED
517 #define NS_STYLE_FONT_STRETCH_SEMI_CONDENSED NS_FONT_STRETCH_SEMI_CONDENSED
518 #define NS_STYLE_FONT_STRETCH_NORMAL NS_FONT_STRETCH_NORMAL
519 #define NS_STYLE_FONT_STRETCH_SEMI_EXPANDED NS_FONT_STRETCH_SEMI_EXPANDED
520 #define NS_STYLE_FONT_STRETCH_EXPANDED NS_FONT_STRETCH_EXPANDED
521 #define NS_STYLE_FONT_STRETCH_EXTRA_EXPANDED NS_FONT_STRETCH_EXTRA_EXPANDED
522 #define NS_STYLE_FONT_STRETCH_ULTRA_EXPANDED NS_FONT_STRETCH_ULTRA_EXPANDED
524 // See nsStyleFont - system fonts
525 #define NS_STYLE_FONT_CAPTION 1 // css2
526 #define NS_STYLE_FONT_ICON 2
527 #define NS_STYLE_FONT_MENU 3
528 #define NS_STYLE_FONT_MESSAGE_BOX 4
529 #define NS_STYLE_FONT_SMALL_CAPTION 5
530 #define NS_STYLE_FONT_STATUS_BAR 6
531 #define NS_STYLE_FONT_WINDOW 7 // css3
532 #define NS_STYLE_FONT_DOCUMENT 8
533 #define NS_STYLE_FONT_WORKSPACE 9
534 #define NS_STYLE_FONT_DESKTOP 10
535 #define NS_STYLE_FONT_INFO 11
536 #define NS_STYLE_FONT_DIALOG 12
537 #define NS_STYLE_FONT_BUTTON 13
538 #define NS_STYLE_FONT_PULL_DOWN_MENU 14
539 #define NS_STYLE_FONT_LIST 15
540 #define NS_STYLE_FONT_FIELD 16
542 // grid-auto-flow keywords
543 #define NS_STYLE_GRID_AUTO_FLOW_NONE (1 << 0)
544 #define NS_STYLE_GRID_AUTO_FLOW_COLUMN (1 << 1)
545 #define NS_STYLE_GRID_AUTO_FLOW_ROW (1 << 2)
546 #define NS_STYLE_GRID_AUTO_FLOW_DENSE (1 << 3)
548 // 'subgrid' keyword in grid-template-{columns,rows}
549 #define NS_STYLE_GRID_TEMPLATE_SUBGRID 0
551 // CSS Grid <track-breadth> keywords
552 // Should not overlap with NS_STYLE_GRID_TEMPLATE_SUBGRID
553 #define NS_STYLE_GRID_TRACK_BREADTH_MAX_CONTENT 1
554 #define NS_STYLE_GRID_TRACK_BREADTH_MIN_CONTENT 2
556 // defaults per MathML spec
557 #define NS_MATHML_DEFAULT_SCRIPT_SIZE_MULTIPLIER 0.71f
558 #define NS_MATHML_DEFAULT_SCRIPT_MIN_SIZE_PT 8
560 // See nsStyleFont
561 #define NS_MATHML_MATHVARIANT_NONE 0
562 #define NS_MATHML_MATHVARIANT_NORMAL 1
563 #define NS_MATHML_MATHVARIANT_BOLD 2
564 #define NS_MATHML_MATHVARIANT_ITALIC 3
565 #define NS_MATHML_MATHVARIANT_BOLD_ITALIC 4
566 #define NS_MATHML_MATHVARIANT_SCRIPT 5
567 #define NS_MATHML_MATHVARIANT_BOLD_SCRIPT 6
568 #define NS_MATHML_MATHVARIANT_FRAKTUR 7
569 #define NS_MATHML_MATHVARIANT_DOUBLE_STRUCK 8
570 #define NS_MATHML_MATHVARIANT_BOLD_FRAKTUR 9
571 #define NS_MATHML_MATHVARIANT_SANS_SERIF 10
572 #define NS_MATHML_MATHVARIANT_BOLD_SANS_SERIF 11
573 #define NS_MATHML_MATHVARIANT_SANS_SERIF_ITALIC 12
574 #define NS_MATHML_MATHVARIANT_SANS_SERIF_BOLD_ITALIC 13
575 #define NS_MATHML_MATHVARIANT_MONOSPACE 14
576 #define NS_MATHML_MATHVARIANT_INITIAL 15
577 #define NS_MATHML_MATHVARIANT_TAILED 16
578 #define NS_MATHML_MATHVARIANT_LOOPED 17
579 #define NS_MATHML_MATHVARIANT_STRETCHED 18
581 // See nsStyleFont::mMathDisplay
582 #define NS_MATHML_DISPLAYSTYLE_INLINE 0
583 #define NS_MATHML_DISPLAYSTYLE_BLOCK 1
585 // See nsStylePosition::mWidth, mMinWidth, mMaxWidth
586 #define NS_STYLE_WIDTH_MAX_CONTENT 0
587 #define NS_STYLE_WIDTH_MIN_CONTENT 1
588 #define NS_STYLE_WIDTH_FIT_CONTENT 2
589 #define NS_STYLE_WIDTH_AVAILABLE 3
591 // See nsStyleDisplay.mPosition
592 #define NS_STYLE_POSITION_STATIC 0
593 #define NS_STYLE_POSITION_RELATIVE 1
594 #define NS_STYLE_POSITION_ABSOLUTE 2
595 #define NS_STYLE_POSITION_FIXED 3
596 #define NS_STYLE_POSITION_STICKY 4
598 // See nsStyleDisplay.mClip
599 #define NS_STYLE_CLIP_AUTO 0x00
600 #define NS_STYLE_CLIP_RECT 0x01
601 #define NS_STYLE_CLIP_TYPE_MASK 0x0F
602 #define NS_STYLE_CLIP_LEFT_AUTO 0x10
603 #define NS_STYLE_CLIP_TOP_AUTO 0x20
604 #define NS_STYLE_CLIP_RIGHT_AUTO 0x40
605 #define NS_STYLE_CLIP_BOTTOM_AUTO 0x80
607 // FRAME/FRAMESET/IFRAME specific values including backward compatibility. Boolean values with
608 // the same meaning (e.g. 1 & yes) may need to be distinguished for correct mode processing
609 #define NS_STYLE_FRAME_YES 0
610 #define NS_STYLE_FRAME_NO 1
611 #define NS_STYLE_FRAME_0 2
612 #define NS_STYLE_FRAME_1 3
613 #define NS_STYLE_FRAME_ON 4
614 #define NS_STYLE_FRAME_OFF 5
615 #define NS_STYLE_FRAME_AUTO 6
616 #define NS_STYLE_FRAME_SCROLL 7
617 #define NS_STYLE_FRAME_NOSCROLL 8
619 // See nsStyleDisplay.mOverflow
620 #define NS_STYLE_OVERFLOW_VISIBLE 0
621 #define NS_STYLE_OVERFLOW_HIDDEN 1
622 #define NS_STYLE_OVERFLOW_SCROLL 2
623 #define NS_STYLE_OVERFLOW_AUTO 3
624 #define NS_STYLE_OVERFLOW_CLIP 4
625 #define NS_STYLE_OVERFLOW_SCROLLBARS_HORIZONTAL 5
626 #define NS_STYLE_OVERFLOW_SCROLLBARS_VERTICAL 6
628 // See nsStyleDisplay.mOverflowClipBox
629 #define NS_STYLE_OVERFLOW_CLIP_BOX_PADDING_BOX 0
630 #define NS_STYLE_OVERFLOW_CLIP_BOX_CONTENT_BOX 1
632 // See nsStyleList
633 #define NS_STYLE_LIST_STYLE_NONE 0
634 #define NS_STYLE_LIST_STYLE_DISC 1
635 #define NS_STYLE_LIST_STYLE_CIRCLE 2
636 #define NS_STYLE_LIST_STYLE_SQUARE 3
637 #define NS_STYLE_LIST_STYLE_DECIMAL 4
638 #define NS_STYLE_LIST_STYLE_DECIMAL_LEADING_ZERO 5
639 #define NS_STYLE_LIST_STYLE_LOWER_ROMAN 6
640 #define NS_STYLE_LIST_STYLE_UPPER_ROMAN 7
641 #define NS_STYLE_LIST_STYLE_LOWER_GREEK 8
642 #define NS_STYLE_LIST_STYLE_LOWER_ALPHA 9
643 #define NS_STYLE_LIST_STYLE_LOWER_LATIN 9 // == ALPHA
644 #define NS_STYLE_LIST_STYLE_UPPER_ALPHA 10
645 #define NS_STYLE_LIST_STYLE_UPPER_LATIN 10 // == ALPHA
646 #define NS_STYLE_LIST_STYLE_HEBREW 11
647 #define NS_STYLE_LIST_STYLE_ARMENIAN 12
648 #define NS_STYLE_LIST_STYLE_GEORGIAN 13
649 #define NS_STYLE_LIST_STYLE_CJK_DECIMAL 14
650 #define NS_STYLE_LIST_STYLE_CJK_IDEOGRAPHIC 15
651 #define NS_STYLE_LIST_STYLE_HIRAGANA 16
652 #define NS_STYLE_LIST_STYLE_KATAKANA 17
653 #define NS_STYLE_LIST_STYLE_HIRAGANA_IROHA 18
654 #define NS_STYLE_LIST_STYLE_KATAKANA_IROHA 19
655 #define NS_STYLE_LIST_STYLE_JAPANESE_INFORMAL 20
656 #define NS_STYLE_LIST_STYLE_JAPANESE_FORMAL 21
657 #define NS_STYLE_LIST_STYLE_KOREAN_HANGUL_FORMAL 22
658 #define NS_STYLE_LIST_STYLE_KOREAN_HANJA_INFORMAL 23
659 #define NS_STYLE_LIST_STYLE_KOREAN_HANJA_FORMAL 24
660 #define NS_STYLE_LIST_STYLE_SIMP_CHINESE_INFORMAL 25
661 #define NS_STYLE_LIST_STYLE_SIMP_CHINESE_FORMAL 26
662 #define NS_STYLE_LIST_STYLE_TRAD_CHINESE_INFORMAL 27
663 #define NS_STYLE_LIST_STYLE_TRAD_CHINESE_FORMAL 28
664 #define NS_STYLE_LIST_STYLE_MOZ_CJK_HEAVENLY_STEM 124
665 #define NS_STYLE_LIST_STYLE_MOZ_CJK_EARTHLY_BRANCH 125
666 #define NS_STYLE_LIST_STYLE_MOZ_TRAD_CHINESE_INFORMAL 126
667 #define NS_STYLE_LIST_STYLE_MOZ_TRAD_CHINESE_FORMAL 127
668 #define NS_STYLE_LIST_STYLE_MOZ_SIMP_CHINESE_INFORMAL 128
669 #define NS_STYLE_LIST_STYLE_MOZ_SIMP_CHINESE_FORMAL 129
670 #define NS_STYLE_LIST_STYLE_MOZ_JAPANESE_INFORMAL 130
671 #define NS_STYLE_LIST_STYLE_MOZ_JAPANESE_FORMAL 131
672 #define NS_STYLE_LIST_STYLE_MOZ_ARABIC_INDIC 132
673 #define NS_STYLE_LIST_STYLE_MOZ_PERSIAN 133
674 #define NS_STYLE_LIST_STYLE_MOZ_URDU 134
675 #define NS_STYLE_LIST_STYLE_MOZ_DEVANAGARI 135
676 #define NS_STYLE_LIST_STYLE_MOZ_GURMUKHI 136
677 #define NS_STYLE_LIST_STYLE_MOZ_GUJARATI 137
678 #define NS_STYLE_LIST_STYLE_MOZ_ORIYA 138
679 #define NS_STYLE_LIST_STYLE_MOZ_KANNADA 139
680 #define NS_STYLE_LIST_STYLE_MOZ_MALAYALAM 140
681 #define NS_STYLE_LIST_STYLE_MOZ_BENGALI 141
682 #define NS_STYLE_LIST_STYLE_MOZ_TAMIL 142
683 #define NS_STYLE_LIST_STYLE_MOZ_TELUGU 143
684 #define NS_STYLE_LIST_STYLE_MOZ_THAI 144
685 #define NS_STYLE_LIST_STYLE_MOZ_LAO 145
686 #define NS_STYLE_LIST_STYLE_MOZ_MYANMAR 146
687 #define NS_STYLE_LIST_STYLE_MOZ_KHMER 147
688 #define NS_STYLE_LIST_STYLE_MOZ_HANGUL 148
689 #define NS_STYLE_LIST_STYLE_MOZ_HANGUL_CONSONANT 149
690 #define NS_STYLE_LIST_STYLE_MOZ_ETHIOPIC_HALEHAME 150
691 #define NS_STYLE_LIST_STYLE_MOZ_ETHIOPIC_NUMERIC 151
692 #define NS_STYLE_LIST_STYLE_MOZ_ETHIOPIC_HALEHAME_AM 152
693 #define NS_STYLE_LIST_STYLE_MOZ_ETHIOPIC_HALEHAME_TI_ER 153
694 #define NS_STYLE_LIST_STYLE_MOZ_ETHIOPIC_HALEHAME_TI_ET 154
696 // See nsStyleList
697 #define NS_STYLE_LIST_STYLE_POSITION_INSIDE 0
698 #define NS_STYLE_LIST_STYLE_POSITION_OUTSIDE 1
700 // See nsStyleMargin
701 #define NS_STYLE_MARGIN_SIZE_AUTO 0
703 // See nsStyleVisibility
704 #define NS_STYLE_POINTER_EVENTS_NONE 0
705 #define NS_STYLE_POINTER_EVENTS_VISIBLEPAINTED 1
706 #define NS_STYLE_POINTER_EVENTS_VISIBLEFILL 2
707 #define NS_STYLE_POINTER_EVENTS_VISIBLESTROKE 3
708 #define NS_STYLE_POINTER_EVENTS_VISIBLE 4
709 #define NS_STYLE_POINTER_EVENTS_PAINTED 5
710 #define NS_STYLE_POINTER_EVENTS_FILL 6
711 #define NS_STYLE_POINTER_EVENTS_STROKE 7
712 #define NS_STYLE_POINTER_EVENTS_ALL 8
713 #define NS_STYLE_POINTER_EVENTS_AUTO 9
715 // See nsStyleVisibility.mImageOrientationType
716 #define NS_STYLE_IMAGE_ORIENTATION_FLIP 0
717 #define NS_STYLE_IMAGE_ORIENTATION_FROM_IMAGE 1
719 // See nsStyleDisplay
720 #define NS_STYLE_RESIZE_NONE 0
721 #define NS_STYLE_RESIZE_BOTH 1
722 #define NS_STYLE_RESIZE_HORIZONTAL 2
723 #define NS_STYLE_RESIZE_VERTICAL 3
725 // See nsStyleText
726 #define NS_STYLE_TEXT_ALIGN_DEFAULT 0
727 #define NS_STYLE_TEXT_ALIGN_LEFT 1
728 #define NS_STYLE_TEXT_ALIGN_RIGHT 2
729 #define NS_STYLE_TEXT_ALIGN_CENTER 3
730 #define NS_STYLE_TEXT_ALIGN_JUSTIFY 4
731 #define NS_STYLE_TEXT_ALIGN_CHAR 5 //align based on a certain character, for table cell
732 #define NS_STYLE_TEXT_ALIGN_END 6
733 #define NS_STYLE_TEXT_ALIGN_AUTO 7
734 #define NS_STYLE_TEXT_ALIGN_MOZ_CENTER 8
735 #define NS_STYLE_TEXT_ALIGN_MOZ_RIGHT 9
736 #define NS_STYLE_TEXT_ALIGN_MOZ_LEFT 10
737 // NS_STYLE_TEXT_ALIGN_MOZ_CENTER_OR_INHERIT is only used in data structs; it
738 // is never present in stylesheets or computed data.
739 #define NS_STYLE_TEXT_ALIGN_MOZ_CENTER_OR_INHERIT 11
740 #define NS_STYLE_TEXT_ALIGN_TRUE 12
741 // Note: make sure that the largest NS_STYLE_TEXT_ALIGN_* value is smaller than
742 // the smallest NS_STYLE_VERTICAL_ALIGN_* value below!
744 // See nsStyleText, nsStyleFont
745 #define NS_STYLE_TEXT_DECORATION_LINE_NONE 0
746 #define NS_STYLE_TEXT_DECORATION_LINE_UNDERLINE NS_FONT_DECORATION_UNDERLINE
747 #define NS_STYLE_TEXT_DECORATION_LINE_OVERLINE NS_FONT_DECORATION_OVERLINE
748 #define NS_STYLE_TEXT_DECORATION_LINE_LINE_THROUGH NS_FONT_DECORATION_LINE_THROUGH
749 #define NS_STYLE_TEXT_DECORATION_LINE_BLINK 0x08
750 #define NS_STYLE_TEXT_DECORATION_LINE_PREF_ANCHORS 0x10
751 // OVERRIDE_ALL does not occur in stylesheets; it only comes from HTML
752 // attribute mapping (and thus appears in computed data)
753 #define NS_STYLE_TEXT_DECORATION_LINE_OVERRIDE_ALL 0x20
754 #define NS_STYLE_TEXT_DECORATION_LINE_LINES_MASK (NS_STYLE_TEXT_DECORATION_LINE_UNDERLINE | NS_STYLE_TEXT_DECORATION_LINE_OVERLINE | NS_STYLE_TEXT_DECORATION_LINE_LINE_THROUGH)
756 // See nsStyleText
757 #define NS_STYLE_TEXT_DECORATION_STYLE_NONE 0 // not in CSS spec, mapped to -moz-none
758 #define NS_STYLE_TEXT_DECORATION_STYLE_DOTTED 1
759 #define NS_STYLE_TEXT_DECORATION_STYLE_DASHED 2
760 #define NS_STYLE_TEXT_DECORATION_STYLE_SOLID 3
761 #define NS_STYLE_TEXT_DECORATION_STYLE_DOUBLE 4
762 #define NS_STYLE_TEXT_DECORATION_STYLE_WAVY 5
763 #define NS_STYLE_TEXT_DECORATION_STYLE_MAX NS_STYLE_TEXT_DECORATION_STYLE_WAVY
765 // See nsStyleTextOverflow
766 #define NS_STYLE_TEXT_OVERFLOW_CLIP 0
767 #define NS_STYLE_TEXT_OVERFLOW_ELLIPSIS 1
768 #define NS_STYLE_TEXT_OVERFLOW_STRING 2
770 // See nsStyleText
771 #define NS_STYLE_TEXT_TRANSFORM_NONE 0
772 #define NS_STYLE_TEXT_TRANSFORM_CAPITALIZE 1
773 #define NS_STYLE_TEXT_TRANSFORM_LOWERCASE 2
774 #define NS_STYLE_TEXT_TRANSFORM_UPPERCASE 3
775 #define NS_STYLE_TEXT_TRANSFORM_FULLWIDTH 4
777 // See nsStyleDisplay
778 #define NS_STYLE_TOUCH_ACTION_NONE (1 << 0)
779 #define NS_STYLE_TOUCH_ACTION_AUTO (1 << 1)
780 #define NS_STYLE_TOUCH_ACTION_PAN_X (1 << 2)
781 #define NS_STYLE_TOUCH_ACTION_PAN_Y (1 << 3)
782 #define NS_STYLE_TOUCH_ACTION_MANIPULATION (1 << 4)
784 // See nsStyleDisplay
785 #define NS_STYLE_TRANSITION_TIMING_FUNCTION_EASE 0
786 #define NS_STYLE_TRANSITION_TIMING_FUNCTION_LINEAR 1
787 #define NS_STYLE_TRANSITION_TIMING_FUNCTION_EASE_IN 2
788 #define NS_STYLE_TRANSITION_TIMING_FUNCTION_EASE_OUT 3
789 #define NS_STYLE_TRANSITION_TIMING_FUNCTION_EASE_IN_OUT 4
790 #define NS_STYLE_TRANSITION_TIMING_FUNCTION_STEP_START 5
791 #define NS_STYLE_TRANSITION_TIMING_FUNCTION_STEP_END 6
793 // See nsStyleText
794 // Note: these values pickup after the text-align values because there
795 // are a few html cases where an object can have both types of
796 // alignment applied with a single attribute
797 #define NS_STYLE_VERTICAL_ALIGN_BASELINE 13
798 #define NS_STYLE_VERTICAL_ALIGN_SUB 14
799 #define NS_STYLE_VERTICAL_ALIGN_SUPER 15
800 #define NS_STYLE_VERTICAL_ALIGN_TOP 16
801 #define NS_STYLE_VERTICAL_ALIGN_TEXT_TOP 17
802 #define NS_STYLE_VERTICAL_ALIGN_MIDDLE 18
803 #define NS_STYLE_VERTICAL_ALIGN_TEXT_BOTTOM 19
804 #define NS_STYLE_VERTICAL_ALIGN_BOTTOM 20
805 #define NS_STYLE_VERTICAL_ALIGN_MIDDLE_WITH_BASELINE 21
807 // See nsStyleVisibility
808 #define NS_STYLE_VISIBILITY_HIDDEN 0
809 #define NS_STYLE_VISIBILITY_VISIBLE 1
810 #define NS_STYLE_VISIBILITY_COLLAPSE 2
812 // See nsStyleText
813 #define NS_STYLE_TABSIZE_INITIAL 8
815 // See nsStyleText
816 #define NS_STYLE_WHITESPACE_NORMAL 0
817 #define NS_STYLE_WHITESPACE_PRE 1
818 #define NS_STYLE_WHITESPACE_NOWRAP 2
819 #define NS_STYLE_WHITESPACE_PRE_WRAP 3
820 #define NS_STYLE_WHITESPACE_PRE_LINE 4
821 #define NS_STYLE_WHITESPACE_PRE_DISCARD_NEWLINES 5
823 // See nsStyleText
824 #define NS_STYLE_WORDBREAK_NORMAL 0
825 #define NS_STYLE_WORDBREAK_BREAK_ALL 1
826 #define NS_STYLE_WORDBREAK_KEEP_ALL 2
828 // See nsStyleText
829 #define NS_STYLE_WORDWRAP_NORMAL 0
830 #define NS_STYLE_WORDWRAP_BREAK_WORD 1
832 // See nsStyleText
833 #define NS_STYLE_HYPHENS_NONE 0
834 #define NS_STYLE_HYPHENS_MANUAL 1
835 #define NS_STYLE_HYPHENS_AUTO 2
837 // See nsStyleText
838 #define NS_STYLE_TEXT_SIZE_ADJUST_NONE 0
839 #define NS_STYLE_TEXT_SIZE_ADJUST_AUTO 1
841 // See nsStyleText
842 #define NS_STYLE_TEXT_ORIENTATION_AUTO 0
843 #define NS_STYLE_TEXT_ORIENTATION_UPRIGHT 1
844 #define NS_STYLE_TEXT_ORIENTATION_SIDEWAYS 2
846 // See nsStyleText
847 #define NS_STYLE_TEXT_COMBINE_UPRIGHT_NONE 0
848 #define NS_STYLE_TEXT_COMBINE_UPRIGHT_ALL 1
849 #define NS_STYLE_TEXT_COMBINE_UPRIGHT_DIGITS_2 2
850 #define NS_STYLE_TEXT_COMBINE_UPRIGHT_DIGITS_3 3
851 #define NS_STYLE_TEXT_COMBINE_UPRIGHT_DIGITS_4 4
853 // See nsStyleText
854 #define NS_STYLE_LINE_HEIGHT_BLOCK_HEIGHT 0
856 // See nsStyleText
857 #define NS_STYLE_UNICODE_BIDI_NORMAL 0x0
858 #define NS_STYLE_UNICODE_BIDI_EMBED 0x1
859 #define NS_STYLE_UNICODE_BIDI_ISOLATE 0x2
860 #define NS_STYLE_UNICODE_BIDI_OVERRIDE 0x4
861 #define NS_STYLE_UNICODE_BIDI_ISOLATE_OVERRIDE 0x6
862 #define NS_STYLE_UNICODE_BIDI_PLAINTEXT 0x8
864 // See nsStyleTable (here for HTML 4.0 for now, should probably change to side flags)
865 #define NS_STYLE_TABLE_FRAME_NONE 0
866 #define NS_STYLE_TABLE_FRAME_ABOVE 1
867 #define NS_STYLE_TABLE_FRAME_BELOW 2
868 #define NS_STYLE_TABLE_FRAME_HSIDES 3
869 #define NS_STYLE_TABLE_FRAME_VSIDES 4
870 #define NS_STYLE_TABLE_FRAME_LEFT 5
871 #define NS_STYLE_TABLE_FRAME_RIGHT 6
872 #define NS_STYLE_TABLE_FRAME_BOX 7
873 #define NS_STYLE_TABLE_FRAME_BORDER 8
875 // See nsStyleTable
876 #define NS_STYLE_TABLE_RULES_NONE 0
877 #define NS_STYLE_TABLE_RULES_GROUPS 1
878 #define NS_STYLE_TABLE_RULES_ROWS 2
879 #define NS_STYLE_TABLE_RULES_COLS 3
880 #define NS_STYLE_TABLE_RULES_ALL 4
882 #define NS_STYLE_TABLE_LAYOUT_AUTO 0
883 #define NS_STYLE_TABLE_LAYOUT_FIXED 1
885 #define NS_STYLE_TABLE_EMPTY_CELLS_HIDE 0
886 #define NS_STYLE_TABLE_EMPTY_CELLS_SHOW 1
887 #define NS_STYLE_TABLE_EMPTY_CELLS_SHOW_BACKGROUND 2
889 #define NS_STYLE_CAPTION_SIDE_TOP 0
890 #define NS_STYLE_CAPTION_SIDE_RIGHT 1
891 #define NS_STYLE_CAPTION_SIDE_BOTTOM 2
892 #define NS_STYLE_CAPTION_SIDE_LEFT 3
893 #define NS_STYLE_CAPTION_SIDE_TOP_OUTSIDE 4
894 #define NS_STYLE_CAPTION_SIDE_BOTTOM_OUTSIDE 5
896 // constants for cell "scope" attribute
897 #define NS_STYLE_CELL_SCOPE_ROW 0
898 #define NS_STYLE_CELL_SCOPE_COL 1
899 #define NS_STYLE_CELL_SCOPE_ROWGROUP 2
900 #define NS_STYLE_CELL_SCOPE_COLGROUP 3
902 // See nsStylePage
903 #define NS_STYLE_PAGE_MARKS_NONE 0x00
904 #define NS_STYLE_PAGE_MARKS_CROP 0x01
905 #define NS_STYLE_PAGE_MARKS_REGISTER 0x02
907 // See nsStylePage
908 #define NS_STYLE_PAGE_SIZE_AUTO 0
909 #define NS_STYLE_PAGE_SIZE_PORTRAIT 1
910 #define NS_STYLE_PAGE_SIZE_LANDSCAPE 2
912 // See nsStyleBreaks
913 #define NS_STYLE_PAGE_BREAK_AUTO 0
914 #define NS_STYLE_PAGE_BREAK_ALWAYS 1
915 #define NS_STYLE_PAGE_BREAK_AVOID 2
916 #define NS_STYLE_PAGE_BREAK_LEFT 3
917 #define NS_STYLE_PAGE_BREAK_RIGHT 4
919 // See nsStyleColumn
920 #define NS_STYLE_COLUMN_COUNT_AUTO 0
921 #define NS_STYLE_COLUMN_COUNT_UNLIMITED (-1)
923 #define NS_STYLE_COLUMN_FILL_AUTO 0
924 #define NS_STYLE_COLUMN_FILL_BALANCE 1
926 // See nsStyleUIReset
927 #define NS_STYLE_IME_MODE_AUTO 0
928 #define NS_STYLE_IME_MODE_NORMAL 1
929 #define NS_STYLE_IME_MODE_ACTIVE 2
930 #define NS_STYLE_IME_MODE_DISABLED 3
931 #define NS_STYLE_IME_MODE_INACTIVE 4
933 // See nsStyleGradient
934 #define NS_STYLE_GRADIENT_SHAPE_LINEAR 0
935 #define NS_STYLE_GRADIENT_SHAPE_ELLIPTICAL 1
936 #define NS_STYLE_GRADIENT_SHAPE_CIRCULAR 2
938 #define NS_STYLE_GRADIENT_SIZE_CLOSEST_SIDE 0
939 #define NS_STYLE_GRADIENT_SIZE_CLOSEST_CORNER 1
940 #define NS_STYLE_GRADIENT_SIZE_FARTHEST_SIDE 2
941 #define NS_STYLE_GRADIENT_SIZE_FARTHEST_CORNER 3
942 #define NS_STYLE_GRADIENT_SIZE_EXPLICIT_SIZE 4
944 // See nsStyleSVG
946 // dominant-baseline
947 #define NS_STYLE_DOMINANT_BASELINE_AUTO 0
948 #define NS_STYLE_DOMINANT_BASELINE_USE_SCRIPT 1
949 #define NS_STYLE_DOMINANT_BASELINE_NO_CHANGE 2
950 #define NS_STYLE_DOMINANT_BASELINE_RESET_SIZE 3
951 #define NS_STYLE_DOMINANT_BASELINE_IDEOGRAPHIC 4
952 #define NS_STYLE_DOMINANT_BASELINE_ALPHABETIC 5
953 #define NS_STYLE_DOMINANT_BASELINE_HANGING 6
954 #define NS_STYLE_DOMINANT_BASELINE_MATHEMATICAL 7
955 #define NS_STYLE_DOMINANT_BASELINE_CENTRAL 8
956 #define NS_STYLE_DOMINANT_BASELINE_MIDDLE 9
957 #define NS_STYLE_DOMINANT_BASELINE_TEXT_AFTER_EDGE 10
958 #define NS_STYLE_DOMINANT_BASELINE_TEXT_BEFORE_EDGE 11
960 // fill-rule
961 #define NS_STYLE_FILL_RULE_NONZERO 0
962 #define NS_STYLE_FILL_RULE_EVENODD 1
964 // image-rendering
965 #define NS_STYLE_IMAGE_RENDERING_AUTO 0
966 #define NS_STYLE_IMAGE_RENDERING_OPTIMIZESPEED 1
967 #define NS_STYLE_IMAGE_RENDERING_OPTIMIZEQUALITY 2
968 #define NS_STYLE_IMAGE_RENDERING_CRISPEDGES 3
970 // mask-type
971 #define NS_STYLE_MASK_TYPE_LUMINANCE 0
972 #define NS_STYLE_MASK_TYPE_ALPHA 1
974 // paint-order
975 #define NS_STYLE_PAINT_ORDER_NORMAL 0
976 #define NS_STYLE_PAINT_ORDER_FILL 1
977 #define NS_STYLE_PAINT_ORDER_STROKE 2
978 #define NS_STYLE_PAINT_ORDER_MARKERS 3
979 #define NS_STYLE_PAINT_ORDER_LAST_VALUE NS_STYLE_PAINT_ORDER_MARKERS
980 // NS_STYLE_PAINT_ORDER_BITWIDTH is the number of bits required to store
981 // a single paint-order component value.
982 #define NS_STYLE_PAINT_ORDER_BITWIDTH 2
984 // shape-rendering
985 #define NS_STYLE_SHAPE_RENDERING_AUTO 0
986 #define NS_STYLE_SHAPE_RENDERING_OPTIMIZESPEED 1
987 #define NS_STYLE_SHAPE_RENDERING_CRISPEDGES 2
988 #define NS_STYLE_SHAPE_RENDERING_GEOMETRICPRECISION 3
990 // stroke-linecap
991 #define NS_STYLE_STROKE_LINECAP_BUTT 0
992 #define NS_STYLE_STROKE_LINECAP_ROUND 1
993 #define NS_STYLE_STROKE_LINECAP_SQUARE 2
995 // stroke-linejoin
996 #define NS_STYLE_STROKE_LINEJOIN_MITER 0
997 #define NS_STYLE_STROKE_LINEJOIN_ROUND 1
998 #define NS_STYLE_STROKE_LINEJOIN_BEVEL 2
1000 // stroke-dasharray, stroke-dashoffset, stroke-width
1001 #define NS_STYLE_STROKE_PROP_CONTEXT_VALUE 0
1003 // text-anchor
1004 #define NS_STYLE_TEXT_ANCHOR_START 0
1005 #define NS_STYLE_TEXT_ANCHOR_MIDDLE 1
1006 #define NS_STYLE_TEXT_ANCHOR_END 2
1008 // text-rendering
1009 #define NS_STYLE_TEXT_RENDERING_AUTO 0
1010 #define NS_STYLE_TEXT_RENDERING_OPTIMIZESPEED 1
1011 #define NS_STYLE_TEXT_RENDERING_OPTIMIZELEGIBILITY 2
1012 #define NS_STYLE_TEXT_RENDERING_GEOMETRICPRECISION 3
1014 // color-interpolation and color-interpolation-filters
1015 #define NS_STYLE_COLOR_INTERPOLATION_AUTO 0
1016 #define NS_STYLE_COLOR_INTERPOLATION_SRGB 1
1017 #define NS_STYLE_COLOR_INTERPOLATION_LINEARRGB 2
1019 // vector-effect
1020 #define NS_STYLE_VECTOR_EFFECT_NONE 0
1021 #define NS_STYLE_VECTOR_EFFECT_NON_SCALING_STROKE 1
1023 // 3d Transforms - Backface visibility
1024 #define NS_STYLE_BACKFACE_VISIBILITY_VISIBLE 1
1025 #define NS_STYLE_BACKFACE_VISIBILITY_HIDDEN 0
1027 #define NS_STYLE_TRANSFORM_STYLE_FLAT 0
1028 #define NS_STYLE_TRANSFORM_STYLE_PRESERVE_3D 1
1030 // object {fill,stroke}-opacity inherited from context for SVG glyphs
1031 #define NS_STYLE_CONTEXT_FILL_OPACITY 0
1032 #define NS_STYLE_CONTEXT_STROKE_OPACITY 1
1034 // blending
1035 #define NS_STYLE_BLEND_NORMAL 0
1036 #define NS_STYLE_BLEND_MULTIPLY 1
1037 #define NS_STYLE_BLEND_SCREEN 2
1038 #define NS_STYLE_BLEND_OVERLAY 3
1039 #define NS_STYLE_BLEND_DARKEN 4
1040 #define NS_STYLE_BLEND_LIGHTEN 5
1041 #define NS_STYLE_BLEND_COLOR_DODGE 6
1042 #define NS_STYLE_BLEND_COLOR_BURN 7
1043 #define NS_STYLE_BLEND_HARD_LIGHT 8
1044 #define NS_STYLE_BLEND_SOFT_LIGHT 9
1045 #define NS_STYLE_BLEND_DIFFERENCE 10
1046 #define NS_STYLE_BLEND_EXCLUSION 11
1047 #define NS_STYLE_BLEND_HUE 12
1048 #define NS_STYLE_BLEND_SATURATION 13
1049 #define NS_STYLE_BLEND_COLOR 14
1050 #define NS_STYLE_BLEND_LUMINOSITY 15
1052 // See nsStyleText::mControlCharacterVisibility
1053 #define NS_STYLE_CONTROL_CHARACTER_VISIBILITY_HIDDEN 0
1054 #define NS_STYLE_CONTROL_CHARACTER_VISIBILITY_VISIBLE 1
1056 /*****************************************************************************
1057 * Constants for media features. *
1058 *****************************************************************************/
1060 // orientation
1061 #define NS_STYLE_ORIENTATION_PORTRAIT 0
1062 #define NS_STYLE_ORIENTATION_LANDSCAPE 1
1064 // scan
1065 #define NS_STYLE_SCAN_PROGRESSIVE 0
1066 #define NS_STYLE_SCAN_INTERLACE 1
1068 #endif /* nsStyleConsts_h___ */