1 : /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 : /* ***** BEGIN LICENSE BLOCK *****
3 : * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 : *
5 : * The contents of this file are subject to the Mozilla Public License Version
6 : * 1.1 (the "License"); you may not use this file except in compliance with
7 : * the License. You may obtain a copy of the License at
8 : * http://www.mozilla.org/MPL/
9 : *
10 : * Software distributed under the License is distributed on an "AS IS" basis,
11 : * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 : * for the specific language governing rights and limitations under the
13 : * License.
14 : *
15 : * The Original Code is mozilla.org code.
16 : *
17 : * The Initial Developer of the Original Code is
18 : * Netscape Communications Corporation.
19 : * Portions created by the Initial Developer are Copyright (C) 1998
20 : * the Initial Developer. All Rights Reserved.
21 : *
22 : * Contributor(s):
23 : * Mats Palmgren <matspal@gmail.com>
24 : * Jonathon Jongsma <jonathon.jongsma@collabora.co.uk>, Collabora Ltd.
25 : *
26 : * Alternatively, the contents of this file may be used under the terms of
27 : * either of the GNU General Public License Version 2 or later (the "GPL"),
28 : * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
29 : * in which case the provisions of the GPL or the LGPL are applicable instead
30 : * of those above. If you wish to allow use of your version of this file only
31 : * under the terms of either the GPL or the LGPL, and not to allow others to
32 : * use your version of this file under the terms of the MPL, indicate your
33 : * decision by deleting the provisions above and replace them with the notice
34 : * and other provisions required by the GPL or the LGPL. If you do not delete
35 : * the provisions above, a recipient may use your version of this file under
36 : * the terms of any one of the MPL, the GPL or the LGPL.
37 : *
38 : * ***** END LICENSE BLOCK ***** */
39 :
40 : /* constants used in the style struct data provided by nsStyleContext */
41 :
42 : #ifndef nsStyleConsts_h___
43 : #define nsStyleConsts_h___
44 :
45 : #include "gfxRect.h"
46 : #include "nsFont.h"
47 :
48 : // XXX fold this into nsStyleContext and group by nsStyleXXX struct
49 :
50 : // Indices into border/padding/margin arrays
51 : #define NS_SIDE_TOP mozilla::css::eSideTop
52 : #define NS_SIDE_RIGHT mozilla::css::eSideRight
53 : #define NS_SIDE_BOTTOM mozilla::css::eSideBottom
54 : #define NS_SIDE_LEFT mozilla::css::eSideLeft
55 :
56 : #define NS_FOR_CSS_SIDES(var_) for (mozilla::css::Side var_ = NS_SIDE_TOP; var_ <= NS_SIDE_LEFT; var_++)
57 0 : static inline mozilla::css::Side operator++(mozilla::css::Side& side, int) {
58 0 : NS_PRECONDITION(side >= NS_SIDE_TOP &&
59 : side <= NS_SIDE_LEFT, "Out of range side");
60 0 : side = mozilla::css::Side(side + 1);
61 0 : return side;
62 : }
63 :
64 : #define NS_FOR_CSS_FULL_CORNERS(var_) for (PRInt32 var_ = 0; var_ < 4; ++var_)
65 :
66 : // Indices into "half corner" arrays (nsStyleCorners e.g.)
67 : #define NS_CORNER_TOP_LEFT_X 0
68 : #define NS_CORNER_TOP_LEFT_Y 1
69 : #define NS_CORNER_TOP_RIGHT_X 2
70 : #define NS_CORNER_TOP_RIGHT_Y 3
71 : #define NS_CORNER_BOTTOM_RIGHT_X 4
72 : #define NS_CORNER_BOTTOM_RIGHT_Y 5
73 : #define NS_CORNER_BOTTOM_LEFT_X 6
74 : #define NS_CORNER_BOTTOM_LEFT_Y 7
75 :
76 : #define NS_FOR_CSS_HALF_CORNERS(var_) for (PRInt32 var_ = 0; var_ < 8; ++var_)
77 :
78 : // The results of these conversion macros are exhaustively checked in
79 : // nsStyleCoord.cpp.
80 : // Arguments must not have side effects.
81 :
82 : #define NS_HALF_CORNER_IS_X(var_) (!((var_)%2))
83 : #define NS_HALF_TO_FULL_CORNER(var_) ((var_)/2)
84 : #define NS_FULL_TO_HALF_CORNER(var_, vert_) ((var_)*2 + !!(vert_))
85 :
86 : #define NS_SIDE_IS_VERTICAL(side_) ((side_) % 2)
87 : #define NS_SIDE_TO_FULL_CORNER(side_, second_) \
88 : (((side_) + !!(second_)) % 4)
89 : #define NS_SIDE_TO_HALF_CORNER(side_, second_, parallel_) \
90 : ((((side_) + !!(second_))*2 + ((side_) + !(parallel_))%2) % 8)
91 :
92 : // {margin,border-{width,style,color},padding}-{left,right}-{ltr,rtl}-source
93 : #define NS_BOXPROP_SOURCE_PHYSICAL 0
94 : #define NS_BOXPROP_SOURCE_LOGICAL 1
95 :
96 : // box-sizing
97 : #define NS_STYLE_BOX_SIZING_CONTENT 0
98 : #define NS_STYLE_BOX_SIZING_PADDING 1
99 : #define NS_STYLE_BOX_SIZING_BORDER 2
100 :
101 : // box-shadow
102 : #define NS_STYLE_BOX_SHADOW_INSET 0
103 :
104 : // float-edge
105 : #define NS_STYLE_FLOAT_EDGE_CONTENT 0
106 : #define NS_STYLE_FLOAT_EDGE_MARGIN 1
107 :
108 : // user-focus
109 : #define NS_STYLE_USER_FOCUS_NONE 0
110 : #define NS_STYLE_USER_FOCUS_IGNORE 1
111 : #define NS_STYLE_USER_FOCUS_NORMAL 2
112 : #define NS_STYLE_USER_FOCUS_SELECT_ALL 3
113 : #define NS_STYLE_USER_FOCUS_SELECT_BEFORE 4
114 : #define NS_STYLE_USER_FOCUS_SELECT_AFTER 5
115 : #define NS_STYLE_USER_FOCUS_SELECT_SAME 6
116 : #define NS_STYLE_USER_FOCUS_SELECT_MENU 7
117 :
118 : // user-select
119 : #define NS_STYLE_USER_SELECT_NONE 0
120 : #define NS_STYLE_USER_SELECT_TEXT 1
121 : #define NS_STYLE_USER_SELECT_ELEMENT 2
122 : #define NS_STYLE_USER_SELECT_ELEMENTS 3
123 : #define NS_STYLE_USER_SELECT_ALL 4
124 : #define NS_STYLE_USER_SELECT_TOGGLE 5
125 : #define NS_STYLE_USER_SELECT_TRI_STATE 6
126 : #define NS_STYLE_USER_SELECT_AUTO 7 // internal value - please use nsFrame::IsSelectable()
127 : #define NS_STYLE_USER_SELECT_MOZ_ALL 8 // force selection of all children, unless an ancestor has NONE set - bug 48096
128 : #define NS_STYLE_USER_SELECT_MOZ_NONE 9 // Like NONE, but doesn't change selection behavior for descendants whose user-select is not AUTO.
129 :
130 : // user-input
131 : #define NS_STYLE_USER_INPUT_NONE 0
132 : #define NS_STYLE_USER_INPUT_ENABLED 1
133 : #define NS_STYLE_USER_INPUT_DISABLED 2
134 : #define NS_STYLE_USER_INPUT_AUTO 3
135 :
136 : // user-modify
137 : #define NS_STYLE_USER_MODIFY_READ_ONLY 0
138 : #define NS_STYLE_USER_MODIFY_READ_WRITE 1
139 : #define NS_STYLE_USER_MODIFY_WRITE_ONLY 2
140 :
141 : // box-align
142 : #define NS_STYLE_BOX_ALIGN_STRETCH 0
143 : #define NS_STYLE_BOX_ALIGN_START 1
144 : #define NS_STYLE_BOX_ALIGN_CENTER 2
145 : #define NS_STYLE_BOX_ALIGN_BASELINE 3
146 : #define NS_STYLE_BOX_ALIGN_END 4
147 :
148 : // box-pack
149 : #define NS_STYLE_BOX_PACK_START 0
150 : #define NS_STYLE_BOX_PACK_CENTER 1
151 : #define NS_STYLE_BOX_PACK_END 2
152 : #define NS_STYLE_BOX_PACK_JUSTIFY 3
153 :
154 : // box-direction
155 : #define NS_STYLE_BOX_DIRECTION_NORMAL 0
156 : #define NS_STYLE_BOX_DIRECTION_REVERSE 1
157 :
158 : // box-orient
159 : #define NS_STYLE_BOX_ORIENT_HORIZONTAL 0
160 : #define NS_STYLE_BOX_ORIENT_VERTICAL 1
161 :
162 : // orient
163 : #define NS_STYLE_ORIENT_HORIZONTAL 0
164 : #define NS_STYLE_ORIENT_VERTICAL 1
165 :
166 : // stack-sizing
167 : #define NS_STYLE_STACK_SIZING_IGNORE 0
168 : #define NS_STYLE_STACK_SIZING_STRETCH_TO_FIT 1
169 :
170 : // Azimuth - See nsStyleAural
171 : #define NS_STYLE_AZIMUTH_LEFT_SIDE 0x00
172 : #define NS_STYLE_AZIMUTH_FAR_LEFT 0x01
173 : #define NS_STYLE_AZIMUTH_LEFT 0x02
174 : #define NS_STYLE_AZIMUTH_CENTER_LEFT 0x03
175 : #define NS_STYLE_AZIMUTH_CENTER 0x04
176 : #define NS_STYLE_AZIMUTH_CENTER_RIGHT 0x05
177 : #define NS_STYLE_AZIMUTH_RIGHT 0x06
178 : #define NS_STYLE_AZIMUTH_FAR_RIGHT 0x07
179 : #define NS_STYLE_AZIMUTH_RIGHT_SIDE 0x08
180 : #define NS_STYLE_AZIMUTH_BEHIND 0x80 // bits
181 : #define NS_STYLE_AZIMUTH_LEFTWARDS 0x10 // bits
182 : #define NS_STYLE_AZIMUTH_RIGHTWARDS 0x20 // bits
183 :
184 : // See nsStyleAural
185 : #define NS_STYLE_ELEVATION_BELOW 1
186 : #define NS_STYLE_ELEVATION_LEVEL 2
187 : #define NS_STYLE_ELEVATION_ABOVE 3
188 : #define NS_STYLE_ELEVATION_HIGHER 4
189 : #define NS_STYLE_ELEVATION_LOWER 5
190 :
191 : // See nsStyleAural
192 : #define NS_STYLE_PITCH_X_LOW 1
193 : #define NS_STYLE_PITCH_LOW 2
194 : #define NS_STYLE_PITCH_MEDIUM 3
195 : #define NS_STYLE_PITCH_HIGH 4
196 : #define NS_STYLE_PITCH_X_HIGH 5
197 :
198 : // See nsStyleAural
199 : #define NS_STYLE_SPEAK_NONE 0
200 : #define NS_STYLE_SPEAK_NORMAL 1
201 : #define NS_STYLE_SPEAK_SPELL_OUT 2
202 :
203 : // See nsStyleAural
204 : #define NS_STYLE_SPEAK_HEADER_ONCE 0
205 : #define NS_STYLE_SPEAK_HEADER_ALWAYS 1
206 :
207 : // See nsStyleAural
208 : #define NS_STYLE_SPEAK_NUMERAL_DIGITS 0
209 : #define NS_STYLE_SPEAK_NUMERAL_CONTINUOUS 1
210 :
211 : // See nsStyleAural
212 : #define NS_STYLE_SPEAK_PUNCTUATION_NONE 0
213 : #define NS_STYLE_SPEAK_PUNCTUATION_CODE 1
214 :
215 : // See nsStyleAural
216 : #define NS_STYLE_SPEECH_RATE_X_SLOW 0
217 : #define NS_STYLE_SPEECH_RATE_SLOW 1
218 : #define NS_STYLE_SPEECH_RATE_MEDIUM 2
219 : #define NS_STYLE_SPEECH_RATE_FAST 3
220 : #define NS_STYLE_SPEECH_RATE_X_FAST 4
221 : #define NS_STYLE_SPEECH_RATE_FASTER 10
222 : #define NS_STYLE_SPEECH_RATE_SLOWER 11
223 :
224 : // See nsStyleAural
225 : #define NS_STYLE_VOLUME_SILENT 0
226 : #define NS_STYLE_VOLUME_X_SOFT 1
227 : #define NS_STYLE_VOLUME_SOFT 2
228 : #define NS_STYLE_VOLUME_MEDIUM 3
229 : #define NS_STYLE_VOLUME_LOUD 4
230 : #define NS_STYLE_VOLUME_X_LOUD 5
231 :
232 : // See nsStyleColor
233 : #define NS_STYLE_COLOR_MOZ_USE_TEXT_COLOR 1
234 : #define NS_STYLE_COLOR_INHERIT_FROM_BODY 2 /* Can't come from CSS directly */
235 :
236 : // See nsStyleColor
237 : #define NS_COLOR_CURRENTCOLOR -1
238 : #define NS_COLOR_MOZ_DEFAULT_COLOR -2
239 : #define NS_COLOR_MOZ_DEFAULT_BACKGROUND_COLOR -3
240 : #define NS_COLOR_MOZ_HYPERLINKTEXT -4
241 : #define NS_COLOR_MOZ_VISITEDHYPERLINKTEXT -5
242 : #define NS_COLOR_MOZ_ACTIVEHYPERLINKTEXT -6
243 :
244 : // See nsStyleDisplay
245 : #define NS_STYLE_ANIMATION_DIRECTION_NORMAL 0
246 : #define NS_STYLE_ANIMATION_DIRECTION_ALTERNATE 1
247 :
248 : // See nsStyleDisplay
249 : #define NS_STYLE_ANIMATION_FILL_MODE_NONE 0
250 : #define NS_STYLE_ANIMATION_FILL_MODE_FORWARDS 1
251 : #define NS_STYLE_ANIMATION_FILL_MODE_BACKWARDS 2
252 : #define NS_STYLE_ANIMATION_FILL_MODE_BOTH 3
253 :
254 : // See nsStyleDisplay
255 : #define NS_STYLE_ANIMATION_ITERATION_COUNT_INFINITE 0
256 :
257 : // See nsStyleDisplay
258 : #define NS_STYLE_ANIMATION_PLAY_STATE_RUNNING 0
259 : #define NS_STYLE_ANIMATION_PLAY_STATE_PAUSED 1
260 :
261 : // See nsStyleBackground
262 : #define NS_STYLE_BG_ATTACHMENT_SCROLL 0
263 : #define NS_STYLE_BG_ATTACHMENT_FIXED 1
264 :
265 : // See nsStyleBackground
266 : // Code depends on these constants having the same values as BG_ORIGIN_*
267 : #define NS_STYLE_BG_CLIP_BORDER 0
268 : #define NS_STYLE_BG_CLIP_PADDING 1
269 : #define NS_STYLE_BG_CLIP_CONTENT 2
270 : // A magic value that we use for our "pretend that background-clip is
271 : // 'padding' when we have a solid border" optimization. This isn't
272 : // actually equal to NS_STYLE_BG_CLIP_PADDING because using that
273 : // causes antialiasing seams between the background and border. This
274 : // is a backend-only value.
275 : #define NS_STYLE_BG_CLIP_MOZ_ALMOST_PADDING 127
276 :
277 : // See nsStyleBackground
278 : #define NS_STYLE_BG_INLINE_POLICY_EACH_BOX 0
279 : #define NS_STYLE_BG_INLINE_POLICY_CONTINUOUS 1
280 : #define NS_STYLE_BG_INLINE_POLICY_BOUNDING_BOX 2
281 :
282 : // See nsStyleBackground
283 : // Code depends on these constants having the same values as BG_CLIP_*
284 : #define NS_STYLE_BG_ORIGIN_BORDER 0
285 : #define NS_STYLE_BG_ORIGIN_PADDING 1
286 : #define NS_STYLE_BG_ORIGIN_CONTENT 2
287 :
288 : // See nsStyleBackground
289 : // The parser code depends on |ing these values together.
290 : #define NS_STYLE_BG_POSITION_CENTER (1<<0)
291 : #define NS_STYLE_BG_POSITION_TOP (1<<1)
292 : #define NS_STYLE_BG_POSITION_BOTTOM (1<<2)
293 : #define NS_STYLE_BG_POSITION_LEFT (1<<3)
294 : #define NS_STYLE_BG_POSITION_RIGHT (1<<4)
295 :
296 : // See nsStyleBackground
297 : #define NS_STYLE_BG_REPEAT_NO_REPEAT 0x00
298 : #define NS_STYLE_BG_REPEAT_REPEAT_X 0x01
299 : #define NS_STYLE_BG_REPEAT_REPEAT_Y 0x02
300 : #define NS_STYLE_BG_REPEAT_REPEAT 0x03
301 :
302 : // See nsStyleBackground
303 : #define NS_STYLE_BG_SIZE_CONTAIN 0
304 : #define NS_STYLE_BG_SIZE_COVER 1
305 :
306 : // See nsStyleTable
307 : #define NS_STYLE_BORDER_COLLAPSE 0
308 : #define NS_STYLE_BORDER_SEPARATE 1
309 :
310 : // Possible enumerated specified values of border-*-width, used by nsCSSMargin
311 : #define NS_STYLE_BORDER_WIDTH_THIN 0
312 : #define NS_STYLE_BORDER_WIDTH_MEDIUM 1
313 : #define NS_STYLE_BORDER_WIDTH_THICK 2
314 : // XXX chopping block #define NS_STYLE_BORDER_WIDTH_LENGTH_VALUE 3
315 :
316 : // See nsStyleBorder mBorderStyle
317 : #define NS_STYLE_BORDER_STYLE_NONE 0
318 : #define NS_STYLE_BORDER_STYLE_GROOVE 1
319 : #define NS_STYLE_BORDER_STYLE_RIDGE 2
320 : #define NS_STYLE_BORDER_STYLE_DOTTED 3
321 : #define NS_STYLE_BORDER_STYLE_DASHED 4
322 : #define NS_STYLE_BORDER_STYLE_SOLID 5
323 : #define NS_STYLE_BORDER_STYLE_DOUBLE 6
324 : #define NS_STYLE_BORDER_STYLE_INSET 7
325 : #define NS_STYLE_BORDER_STYLE_OUTSET 8
326 : #define NS_STYLE_BORDER_STYLE_HIDDEN 9
327 : #define NS_STYLE_BORDER_STYLE_AUTO 10 // for outline-style only
328 :
329 : // See nsStyleBorder mBorderImage
330 : #define NS_STYLE_BORDER_IMAGE_STRETCH 0
331 : #define NS_STYLE_BORDER_IMAGE_REPEAT 1
332 : #define NS_STYLE_BORDER_IMAGE_ROUND 2
333 :
334 : // See nsStyleDisplay
335 : #define NS_STYLE_CLEAR_NONE 0
336 : #define NS_STYLE_CLEAR_LEFT 1
337 : #define NS_STYLE_CLEAR_RIGHT 2
338 : #define NS_STYLE_CLEAR_LEFT_AND_RIGHT 3
339 : #define NS_STYLE_CLEAR_LINE 4
340 : #define NS_STYLE_CLEAR_BLOCK 5
341 : #define NS_STYLE_CLEAR_COLUMN 6
342 : #define NS_STYLE_CLEAR_PAGE 7
343 : #define NS_STYLE_CLEAR_LAST_VALUE NS_STYLE_CLEAR_PAGE
344 :
345 : // See nsStyleContent
346 : #define NS_STYLE_CONTENT_OPEN_QUOTE 0
347 : #define NS_STYLE_CONTENT_CLOSE_QUOTE 1
348 : #define NS_STYLE_CONTENT_NO_OPEN_QUOTE 2
349 : #define NS_STYLE_CONTENT_NO_CLOSE_QUOTE 3
350 : #define NS_STYLE_CONTENT_ALT_CONTENT 4
351 :
352 : // See nsStyleColor
353 : #define NS_STYLE_CURSOR_AUTO 1
354 : #define NS_STYLE_CURSOR_CROSSHAIR 2
355 : #define NS_STYLE_CURSOR_DEFAULT 3 // ie: an arrow
356 : #define NS_STYLE_CURSOR_POINTER 4 // for links
357 : #define NS_STYLE_CURSOR_MOVE 5
358 : #define NS_STYLE_CURSOR_E_RESIZE 6
359 : #define NS_STYLE_CURSOR_NE_RESIZE 7
360 : #define NS_STYLE_CURSOR_NW_RESIZE 8
361 : #define NS_STYLE_CURSOR_N_RESIZE 9
362 : #define NS_STYLE_CURSOR_SE_RESIZE 10
363 : #define NS_STYLE_CURSOR_SW_RESIZE 11
364 : #define NS_STYLE_CURSOR_S_RESIZE 12
365 : #define NS_STYLE_CURSOR_W_RESIZE 13
366 : #define NS_STYLE_CURSOR_TEXT 14 // ie: i-beam
367 : #define NS_STYLE_CURSOR_WAIT 15
368 : #define NS_STYLE_CURSOR_HELP 16
369 : #define NS_STYLE_CURSOR_COPY 17 // CSS3
370 : #define NS_STYLE_CURSOR_ALIAS 18
371 : #define NS_STYLE_CURSOR_CONTEXT_MENU 19
372 : #define NS_STYLE_CURSOR_CELL 20
373 : #define NS_STYLE_CURSOR_GRAB 21
374 : #define NS_STYLE_CURSOR_GRABBING 22
375 : #define NS_STYLE_CURSOR_SPINNING 23
376 : #define NS_STYLE_CURSOR_MOZ_ZOOM_IN 24
377 : #define NS_STYLE_CURSOR_MOZ_ZOOM_OUT 25
378 : #define NS_STYLE_CURSOR_NOT_ALLOWED 26
379 : #define NS_STYLE_CURSOR_COL_RESIZE 27
380 : #define NS_STYLE_CURSOR_ROW_RESIZE 28
381 : #define NS_STYLE_CURSOR_NO_DROP 29
382 : #define NS_STYLE_CURSOR_VERTICAL_TEXT 30
383 : #define NS_STYLE_CURSOR_ALL_SCROLL 31
384 : #define NS_STYLE_CURSOR_NESW_RESIZE 32
385 : #define NS_STYLE_CURSOR_NWSE_RESIZE 33
386 : #define NS_STYLE_CURSOR_NS_RESIZE 34
387 : #define NS_STYLE_CURSOR_EW_RESIZE 35
388 : #define NS_STYLE_CURSOR_NONE 36
389 :
390 : // See nsStyleVisibility
391 : #define NS_STYLE_DIRECTION_LTR 0
392 : #define NS_STYLE_DIRECTION_RTL 1
393 : #define NS_STYLE_DIRECTION_INHERIT 2
394 :
395 : // See nsStyleDisplay
396 : #define NS_STYLE_DISPLAY_NONE 0
397 : #define NS_STYLE_DISPLAY_BLOCK 1
398 : #define NS_STYLE_DISPLAY_INLINE 2
399 : #define NS_STYLE_DISPLAY_INLINE_BLOCK 3
400 : #define NS_STYLE_DISPLAY_LIST_ITEM 4
401 : #define NS_STYLE_DISPLAY_TABLE 8
402 : #define NS_STYLE_DISPLAY_INLINE_TABLE 9
403 : #define NS_STYLE_DISPLAY_TABLE_ROW_GROUP 10
404 : #define NS_STYLE_DISPLAY_TABLE_COLUMN 11
405 : #define NS_STYLE_DISPLAY_TABLE_COLUMN_GROUP 12
406 : #define NS_STYLE_DISPLAY_TABLE_HEADER_GROUP 13
407 : #define NS_STYLE_DISPLAY_TABLE_FOOTER_GROUP 14
408 : #define NS_STYLE_DISPLAY_TABLE_ROW 15
409 : #define NS_STYLE_DISPLAY_TABLE_CELL 16
410 : #define NS_STYLE_DISPLAY_TABLE_CAPTION 17
411 : #define NS_STYLE_DISPLAY_BOX 18
412 : #define NS_STYLE_DISPLAY_INLINE_BOX 19
413 : #ifdef MOZ_XUL
414 : #define NS_STYLE_DISPLAY_GRID 20
415 : #define NS_STYLE_DISPLAY_INLINE_GRID 21
416 : #define NS_STYLE_DISPLAY_GRID_GROUP 22
417 : #define NS_STYLE_DISPLAY_GRID_LINE 23
418 : #define NS_STYLE_DISPLAY_STACK 24
419 : #define NS_STYLE_DISPLAY_INLINE_STACK 25
420 : #define NS_STYLE_DISPLAY_DECK 26
421 : #define NS_STYLE_DISPLAY_POPUP 27
422 : #define NS_STYLE_DISPLAY_GROUPBOX 28
423 : #endif
424 :
425 : // See nsStyleDisplay
426 : #define NS_STYLE_FLOAT_NONE 0
427 : #define NS_STYLE_FLOAT_LEFT 1
428 : #define NS_STYLE_FLOAT_RIGHT 2
429 :
430 : // See nsStyleFont
431 : // We should eventually stop using the NS_STYLE_* variants here.
432 : #define NS_STYLE_FONT_STYLE_NORMAL NS_FONT_STYLE_NORMAL
433 : #define NS_STYLE_FONT_STYLE_ITALIC NS_FONT_STYLE_ITALIC
434 : #define NS_STYLE_FONT_STYLE_OBLIQUE NS_FONT_STYLE_OBLIQUE
435 :
436 : // See nsStyleFont
437 : // We should eventually stop using the NS_STYLE_* variants here.
438 : #define NS_STYLE_FONT_VARIANT_NORMAL NS_FONT_VARIANT_NORMAL
439 : #define NS_STYLE_FONT_VARIANT_SMALL_CAPS NS_FONT_VARIANT_SMALL_CAPS
440 :
441 : // See nsStyleFont
442 : // We should eventually stop using the NS_STYLE_* variants here.
443 : #define NS_STYLE_FONT_WEIGHT_NORMAL NS_FONT_WEIGHT_NORMAL
444 : #define NS_STYLE_FONT_WEIGHT_BOLD NS_FONT_WEIGHT_BOLD
445 : // The constants below appear only in style sheets and not computed style.
446 : #define NS_STYLE_FONT_WEIGHT_BOLDER (-1)
447 : #define NS_STYLE_FONT_WEIGHT_LIGHTER (-2)
448 :
449 : // See nsStyleFont
450 : #define NS_STYLE_FONT_SIZE_XXSMALL 0
451 : #define NS_STYLE_FONT_SIZE_XSMALL 1
452 : #define NS_STYLE_FONT_SIZE_SMALL 2
453 : #define NS_STYLE_FONT_SIZE_MEDIUM 3
454 : #define NS_STYLE_FONT_SIZE_LARGE 4
455 : #define NS_STYLE_FONT_SIZE_XLARGE 5
456 : #define NS_STYLE_FONT_SIZE_XXLARGE 6
457 : #define NS_STYLE_FONT_SIZE_XXXLARGE 7 // Only used by <font size="7">. Not specifiable in CSS.
458 : #define NS_STYLE_FONT_SIZE_LARGER 8
459 : #define NS_STYLE_FONT_SIZE_SMALLER 9
460 :
461 : // See nsStyleFont
462 : // We should eventually stop using the NS_STYLE_* variants here.
463 : #define NS_STYLE_FONT_STRETCH_ULTRA_CONDENSED NS_FONT_STRETCH_ULTRA_CONDENSED
464 : #define NS_STYLE_FONT_STRETCH_EXTRA_CONDENSED NS_FONT_STRETCH_EXTRA_CONDENSED
465 : #define NS_STYLE_FONT_STRETCH_CONDENSED NS_FONT_STRETCH_CONDENSED
466 : #define NS_STYLE_FONT_STRETCH_SEMI_CONDENSED NS_FONT_STRETCH_SEMI_CONDENSED
467 : #define NS_STYLE_FONT_STRETCH_NORMAL NS_FONT_STRETCH_NORMAL
468 : #define NS_STYLE_FONT_STRETCH_SEMI_EXPANDED NS_FONT_STRETCH_SEMI_EXPANDED
469 : #define NS_STYLE_FONT_STRETCH_EXPANDED NS_FONT_STRETCH_EXPANDED
470 : #define NS_STYLE_FONT_STRETCH_EXTRA_EXPANDED NS_FONT_STRETCH_EXTRA_EXPANDED
471 : #define NS_STYLE_FONT_STRETCH_ULTRA_EXPANDED NS_FONT_STRETCH_ULTRA_EXPANDED
472 :
473 : // See nsStyleFont - system fonts
474 : #define NS_STYLE_FONT_CAPTION 1 // css2
475 : #define NS_STYLE_FONT_ICON 2
476 : #define NS_STYLE_FONT_MENU 3
477 : #define NS_STYLE_FONT_MESSAGE_BOX 4
478 : #define NS_STYLE_FONT_SMALL_CAPTION 5
479 : #define NS_STYLE_FONT_STATUS_BAR 6
480 : #define NS_STYLE_FONT_WINDOW 7 // css3
481 : #define NS_STYLE_FONT_DOCUMENT 8
482 : #define NS_STYLE_FONT_WORKSPACE 9
483 : #define NS_STYLE_FONT_DESKTOP 10
484 : #define NS_STYLE_FONT_INFO 11
485 : #define NS_STYLE_FONT_DIALOG 12
486 : #define NS_STYLE_FONT_BUTTON 13
487 : #define NS_STYLE_FONT_PULL_DOWN_MENU 14
488 : #define NS_STYLE_FONT_LIST 15
489 : #define NS_STYLE_FONT_FIELD 16
490 :
491 : // defaults per MathML spec
492 : #define NS_MATHML_DEFAULT_SCRIPT_SIZE_MULTIPLIER 0.71f
493 : #define NS_MATHML_DEFAULT_SCRIPT_MIN_SIZE_PT 8
494 :
495 : // See nsStylePosition::mWidth, mMinWidth, mMaxWidth
496 : #define NS_STYLE_WIDTH_MAX_CONTENT 0
497 : #define NS_STYLE_WIDTH_MIN_CONTENT 1
498 : #define NS_STYLE_WIDTH_FIT_CONTENT 2
499 : #define NS_STYLE_WIDTH_AVAILABLE 3
500 :
501 : // See nsStylePosition.mPosition
502 : #define NS_STYLE_POSITION_STATIC 0
503 : #define NS_STYLE_POSITION_RELATIVE 1
504 : #define NS_STYLE_POSITION_ABSOLUTE 2
505 : #define NS_STYLE_POSITION_FIXED 3
506 :
507 : // See nsStylePosition.mClip
508 : #define NS_STYLE_CLIP_AUTO 0x00
509 : #define NS_STYLE_CLIP_RECT 0x01
510 : #define NS_STYLE_CLIP_TYPE_MASK 0x0F
511 : #define NS_STYLE_CLIP_LEFT_AUTO 0x10
512 : #define NS_STYLE_CLIP_TOP_AUTO 0x20
513 : #define NS_STYLE_CLIP_RIGHT_AUTO 0x40
514 : #define NS_STYLE_CLIP_BOTTOM_AUTO 0x80
515 :
516 : // FRAME/FRAMESET/IFRAME specific values including backward compatibility. Boolean values with
517 : // the same meaning (e.g. 1 & yes) may need to be distinguished for correct mode processing
518 : #define NS_STYLE_FRAME_YES 0
519 : #define NS_STYLE_FRAME_NO 1
520 : #define NS_STYLE_FRAME_0 2
521 : #define NS_STYLE_FRAME_1 3
522 : #define NS_STYLE_FRAME_ON 4
523 : #define NS_STYLE_FRAME_OFF 5
524 : #define NS_STYLE_FRAME_AUTO 6
525 : #define NS_STYLE_FRAME_SCROLL 7
526 : #define NS_STYLE_FRAME_NOSCROLL 8
527 :
528 : // See nsStylePosition.mOverflow
529 : #define NS_STYLE_OVERFLOW_VISIBLE 0
530 : #define NS_STYLE_OVERFLOW_HIDDEN 1
531 : #define NS_STYLE_OVERFLOW_SCROLL 2
532 : #define NS_STYLE_OVERFLOW_AUTO 3
533 : #define NS_STYLE_OVERFLOW_CLIP 4
534 : #define NS_STYLE_OVERFLOW_SCROLLBARS_HORIZONTAL 5
535 : #define NS_STYLE_OVERFLOW_SCROLLBARS_VERTICAL 6
536 :
537 : // See nsStyleList
538 : #define NS_STYLE_LIST_STYLE_NONE 0
539 : #define NS_STYLE_LIST_STYLE_DISC 1
540 : #define NS_STYLE_LIST_STYLE_CIRCLE 2
541 : #define NS_STYLE_LIST_STYLE_SQUARE 3
542 : #define NS_STYLE_LIST_STYLE_DECIMAL 4
543 : #define NS_STYLE_LIST_STYLE_DECIMAL_LEADING_ZERO 5
544 : #define NS_STYLE_LIST_STYLE_LOWER_ROMAN 6
545 : #define NS_STYLE_LIST_STYLE_UPPER_ROMAN 7
546 : #define NS_STYLE_LIST_STYLE_LOWER_GREEK 8
547 : #define NS_STYLE_LIST_STYLE_LOWER_ALPHA 9
548 : #define NS_STYLE_LIST_STYLE_LOWER_LATIN 9 // == ALPHA
549 : #define NS_STYLE_LIST_STYLE_UPPER_ALPHA 10
550 : #define NS_STYLE_LIST_STYLE_UPPER_LATIN 10 // == ALPHA
551 : #define NS_STYLE_LIST_STYLE_HEBREW 11
552 : #define NS_STYLE_LIST_STYLE_ARMENIAN 12
553 : #define NS_STYLE_LIST_STYLE_GEORGIAN 13
554 : #define NS_STYLE_LIST_STYLE_CJK_IDEOGRAPHIC 14
555 : #define NS_STYLE_LIST_STYLE_HIRAGANA 15
556 : #define NS_STYLE_LIST_STYLE_KATAKANA 16
557 : #define NS_STYLE_LIST_STYLE_HIRAGANA_IROHA 17
558 : #define NS_STYLE_LIST_STYLE_KATAKANA_IROHA 18
559 : #define NS_STYLE_LIST_STYLE_MOZ_CJK_HEAVENLY_STEM 24
560 : #define NS_STYLE_LIST_STYLE_MOZ_CJK_EARTHLY_BRANCH 25
561 : #define NS_STYLE_LIST_STYLE_MOZ_TRAD_CHINESE_INFORMAL 26
562 : #define NS_STYLE_LIST_STYLE_MOZ_TRAD_CHINESE_FORMAL 27
563 : #define NS_STYLE_LIST_STYLE_MOZ_SIMP_CHINESE_INFORMAL 28
564 : #define NS_STYLE_LIST_STYLE_MOZ_SIMP_CHINESE_FORMAL 29
565 : #define NS_STYLE_LIST_STYLE_MOZ_JAPANESE_INFORMAL 30
566 : #define NS_STYLE_LIST_STYLE_MOZ_JAPANESE_FORMAL 31
567 : #define NS_STYLE_LIST_STYLE_MOZ_ARABIC_INDIC 32
568 : #define NS_STYLE_LIST_STYLE_MOZ_PERSIAN 33
569 : #define NS_STYLE_LIST_STYLE_MOZ_URDU 34
570 : #define NS_STYLE_LIST_STYLE_MOZ_DEVANAGARI 35
571 : #define NS_STYLE_LIST_STYLE_MOZ_GURMUKHI 36
572 : #define NS_STYLE_LIST_STYLE_MOZ_GUJARATI 37
573 : #define NS_STYLE_LIST_STYLE_MOZ_ORIYA 38
574 : #define NS_STYLE_LIST_STYLE_MOZ_KANNADA 39
575 : #define NS_STYLE_LIST_STYLE_MOZ_MALAYALAM 40
576 : #define NS_STYLE_LIST_STYLE_MOZ_BENGALI 41
577 : #define NS_STYLE_LIST_STYLE_MOZ_TAMIL 42
578 : #define NS_STYLE_LIST_STYLE_MOZ_TELUGU 43
579 : #define NS_STYLE_LIST_STYLE_MOZ_THAI 44
580 : #define NS_STYLE_LIST_STYLE_MOZ_LAO 45
581 : #define NS_STYLE_LIST_STYLE_MOZ_MYANMAR 46
582 : #define NS_STYLE_LIST_STYLE_MOZ_KHMER 47
583 : #define NS_STYLE_LIST_STYLE_MOZ_HANGUL 48
584 : #define NS_STYLE_LIST_STYLE_MOZ_HANGUL_CONSONANT 49
585 : #define NS_STYLE_LIST_STYLE_MOZ_ETHIOPIC_HALEHAME 50
586 : #define NS_STYLE_LIST_STYLE_MOZ_ETHIOPIC_NUMERIC 51
587 : #define NS_STYLE_LIST_STYLE_MOZ_ETHIOPIC_HALEHAME_AM 52
588 : #define NS_STYLE_LIST_STYLE_MOZ_ETHIOPIC_HALEHAME_TI_ER 53
589 : #define NS_STYLE_LIST_STYLE_MOZ_ETHIOPIC_HALEHAME_TI_ET 54
590 :
591 : // See nsStyleList
592 : #define NS_STYLE_LIST_STYLE_POSITION_INSIDE 0
593 : #define NS_STYLE_LIST_STYLE_POSITION_OUTSIDE 1
594 :
595 : // See nsStyleMargin
596 : #define NS_STYLE_MARGIN_SIZE_AUTO 0
597 :
598 : // See nsStyleVisibility
599 : #define NS_STYLE_POINTER_EVENTS_NONE 0
600 : #define NS_STYLE_POINTER_EVENTS_VISIBLEPAINTED 1
601 : #define NS_STYLE_POINTER_EVENTS_VISIBLEFILL 2
602 : #define NS_STYLE_POINTER_EVENTS_VISIBLESTROKE 3
603 : #define NS_STYLE_POINTER_EVENTS_VISIBLE 4
604 : #define NS_STYLE_POINTER_EVENTS_PAINTED 5
605 : #define NS_STYLE_POINTER_EVENTS_FILL 6
606 : #define NS_STYLE_POINTER_EVENTS_STROKE 7
607 : #define NS_STYLE_POINTER_EVENTS_ALL 8
608 : #define NS_STYLE_POINTER_EVENTS_AUTO 9
609 :
610 : // See nsStyleDisplay
611 : #define NS_STYLE_RESIZE_NONE 0
612 : #define NS_STYLE_RESIZE_BOTH 1
613 : #define NS_STYLE_RESIZE_HORIZONTAL 2
614 : #define NS_STYLE_RESIZE_VERTICAL 3
615 :
616 : // See nsStyleText
617 : #define NS_STYLE_TEXT_ALIGN_DEFAULT 0
618 : #define NS_STYLE_TEXT_ALIGN_LEFT 1
619 : #define NS_STYLE_TEXT_ALIGN_RIGHT 2
620 : #define NS_STYLE_TEXT_ALIGN_CENTER 3
621 : #define NS_STYLE_TEXT_ALIGN_JUSTIFY 4
622 : #define NS_STYLE_TEXT_ALIGN_CHAR 5 //align based on a certain character, for table cell
623 : #define NS_STYLE_TEXT_ALIGN_END 6
624 : #define NS_STYLE_TEXT_ALIGN_AUTO 7
625 : #define NS_STYLE_TEXT_ALIGN_MOZ_CENTER 8
626 : #define NS_STYLE_TEXT_ALIGN_MOZ_RIGHT 9
627 : #define NS_STYLE_TEXT_ALIGN_MOZ_LEFT 10
628 : // NS_STYLE_TEXT_ALIGN_MOZ_CENTER_OR_INHERIT is only used in data structs; it
629 : // is never present in stylesheets or computed data.
630 : #define NS_STYLE_TEXT_ALIGN_MOZ_CENTER_OR_INHERIT 11
631 : // Note: make sure that the largest NS_STYLE_TEXT_ALIGN_* value is smaller than
632 : // the smallest NS_STYLE_VERTICAL_ALIGN_* value below!
633 :
634 : // See nsStyleText
635 : #define NS_STYLE_TEXT_BLINK_NONE 0
636 : #define NS_STYLE_TEXT_BLINK_BLINK 1
637 :
638 : // See nsStyleText, nsStyleFont
639 : #define NS_STYLE_TEXT_DECORATION_LINE_NONE 0
640 : #define NS_STYLE_TEXT_DECORATION_LINE_UNDERLINE NS_FONT_DECORATION_UNDERLINE
641 : #define NS_STYLE_TEXT_DECORATION_LINE_OVERLINE NS_FONT_DECORATION_OVERLINE
642 : #define NS_STYLE_TEXT_DECORATION_LINE_LINE_THROUGH NS_FONT_DECORATION_LINE_THROUGH
643 : #define NS_STYLE_TEXT_DECORATION_LINE_BLINK 0x08
644 : #define NS_STYLE_TEXT_DECORATION_LINE_PREF_ANCHORS 0x10
645 : // OVERRIDE_ALL does not occur in stylesheets; it only comes from HTML
646 : // attribute mapping (and thus appears in computed data)
647 : #define NS_STYLE_TEXT_DECORATION_LINE_OVERRIDE_ALL 0x20
648 : #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)
649 :
650 : // See nsStyleText
651 : #define NS_STYLE_TEXT_DECORATION_STYLE_NONE 0 // not in CSS spec, mapped to -moz-none
652 : #define NS_STYLE_TEXT_DECORATION_STYLE_DOTTED 1
653 : #define NS_STYLE_TEXT_DECORATION_STYLE_DASHED 2
654 : #define NS_STYLE_TEXT_DECORATION_STYLE_SOLID 3
655 : #define NS_STYLE_TEXT_DECORATION_STYLE_DOUBLE 4
656 : #define NS_STYLE_TEXT_DECORATION_STYLE_WAVY 5
657 : #define NS_STYLE_TEXT_DECORATION_STYLE_MAX NS_STYLE_TEXT_DECORATION_STYLE_WAVY
658 :
659 : // See nsStyleTextOverflow
660 : #define NS_STYLE_TEXT_OVERFLOW_CLIP 0
661 : #define NS_STYLE_TEXT_OVERFLOW_ELLIPSIS 1
662 : #define NS_STYLE_TEXT_OVERFLOW_STRING 2
663 :
664 : // See nsStyleText
665 : #define NS_STYLE_TEXT_TRANSFORM_NONE 0
666 : #define NS_STYLE_TEXT_TRANSFORM_CAPITALIZE 1
667 : #define NS_STYLE_TEXT_TRANSFORM_LOWERCASE 2
668 : #define NS_STYLE_TEXT_TRANSFORM_UPPERCASE 3
669 :
670 : // See nsStyleDisplay
671 : #define NS_STYLE_TRANSITION_TIMING_FUNCTION_EASE 0
672 : #define NS_STYLE_TRANSITION_TIMING_FUNCTION_LINEAR 1
673 : #define NS_STYLE_TRANSITION_TIMING_FUNCTION_EASE_IN 2
674 : #define NS_STYLE_TRANSITION_TIMING_FUNCTION_EASE_OUT 3
675 : #define NS_STYLE_TRANSITION_TIMING_FUNCTION_EASE_IN_OUT 4
676 : #define NS_STYLE_TRANSITION_TIMING_FUNCTION_STEP_START 5
677 : #define NS_STYLE_TRANSITION_TIMING_FUNCTION_STEP_END 6
678 :
679 : // See nsStyleText
680 : // Note: these values pickup after the text-align values because there
681 : // are a few html cases where an object can have both types of
682 : // alignment applied with a single attribute
683 : #define NS_STYLE_VERTICAL_ALIGN_BASELINE 12
684 : #define NS_STYLE_VERTICAL_ALIGN_SUB 13
685 : #define NS_STYLE_VERTICAL_ALIGN_SUPER 14
686 : #define NS_STYLE_VERTICAL_ALIGN_TOP 15
687 : #define NS_STYLE_VERTICAL_ALIGN_TEXT_TOP 16
688 : #define NS_STYLE_VERTICAL_ALIGN_MIDDLE 17
689 : #define NS_STYLE_VERTICAL_ALIGN_TEXT_BOTTOM 18
690 : #define NS_STYLE_VERTICAL_ALIGN_BOTTOM 19
691 : #define NS_STYLE_VERTICAL_ALIGN_MIDDLE_WITH_BASELINE 20
692 :
693 : // See nsStyleVisibility
694 : #define NS_STYLE_VISIBILITY_HIDDEN 0
695 : #define NS_STYLE_VISIBILITY_VISIBLE 1
696 : #define NS_STYLE_VISIBILITY_COLLAPSE 2
697 :
698 : // See nsStyleText
699 : #define NS_STYLE_TABSIZE_INITIAL 8
700 :
701 : // See nsStyleText
702 : #define NS_STYLE_WHITESPACE_NORMAL 0
703 : #define NS_STYLE_WHITESPACE_PRE 1
704 : #define NS_STYLE_WHITESPACE_NOWRAP 2
705 : #define NS_STYLE_WHITESPACE_PRE_WRAP 3
706 : #define NS_STYLE_WHITESPACE_PRE_LINE 4
707 :
708 : // See nsStyleText
709 : #define NS_STYLE_WORDWRAP_NORMAL 0
710 : #define NS_STYLE_WORDWRAP_BREAK_WORD 1
711 :
712 : // See nsStyleText
713 : #define NS_STYLE_HYPHENS_NONE 0
714 : #define NS_STYLE_HYPHENS_MANUAL 1
715 : #define NS_STYLE_HYPHENS_AUTO 2
716 :
717 : // See nsStyleText
718 : #define NS_STYLE_TEXT_SIZE_ADJUST_NONE 0
719 : #define NS_STYLE_TEXT_SIZE_ADJUST_AUTO 1
720 :
721 : // See nsStyleText
722 : #define NS_STYLE_LINE_HEIGHT_BLOCK_HEIGHT 0
723 :
724 : // See nsStyleText
725 : #define NS_STYLE_UNICODE_BIDI_NORMAL 0x0
726 : #define NS_STYLE_UNICODE_BIDI_EMBED 0x1
727 : #define NS_STYLE_UNICODE_BIDI_ISOLATE 0x2
728 : #define NS_STYLE_UNICODE_BIDI_OVERRIDE 0x4
729 : #define NS_STYLE_UNICODE_BIDI_PLAINTEXT 0x8
730 :
731 : // See nsStyleTable (here for HTML 4.0 for now, should probably change to side flags)
732 : #define NS_STYLE_TABLE_FRAME_NONE 0
733 : #define NS_STYLE_TABLE_FRAME_ABOVE 1
734 : #define NS_STYLE_TABLE_FRAME_BELOW 2
735 : #define NS_STYLE_TABLE_FRAME_HSIDES 3
736 : #define NS_STYLE_TABLE_FRAME_VSIDES 4
737 : #define NS_STYLE_TABLE_FRAME_LEFT 5
738 : #define NS_STYLE_TABLE_FRAME_RIGHT 6
739 : #define NS_STYLE_TABLE_FRAME_BOX 7
740 : #define NS_STYLE_TABLE_FRAME_BORDER 8
741 :
742 : // See nsStyleTable
743 : #define NS_STYLE_TABLE_RULES_NONE 0
744 : #define NS_STYLE_TABLE_RULES_GROUPS 1
745 : #define NS_STYLE_TABLE_RULES_ROWS 2
746 : #define NS_STYLE_TABLE_RULES_COLS 3
747 : #define NS_STYLE_TABLE_RULES_ALL 4
748 :
749 : #define NS_STYLE_TABLE_COLS_NONE (-1)
750 : #define NS_STYLE_TABLE_COLS_ALL PRInt32(1 << 30)
751 :
752 : #define NS_STYLE_TABLE_LAYOUT_AUTO 0
753 : #define NS_STYLE_TABLE_LAYOUT_FIXED 1
754 :
755 : #define NS_STYLE_TABLE_EMPTY_CELLS_HIDE 0
756 : #define NS_STYLE_TABLE_EMPTY_CELLS_SHOW 1
757 : #define NS_STYLE_TABLE_EMPTY_CELLS_SHOW_BACKGROUND 2
758 :
759 : #define NS_STYLE_CAPTION_SIDE_TOP 0
760 : #define NS_STYLE_CAPTION_SIDE_RIGHT 1
761 : #define NS_STYLE_CAPTION_SIDE_BOTTOM 2
762 : #define NS_STYLE_CAPTION_SIDE_LEFT 3
763 : #define NS_STYLE_CAPTION_SIDE_TOP_OUTSIDE 4
764 : #define NS_STYLE_CAPTION_SIDE_BOTTOM_OUTSIDE 5
765 :
766 : // constants for cell "scope" attribute
767 : #define NS_STYLE_CELL_SCOPE_ROW 0
768 : #define NS_STYLE_CELL_SCOPE_COL 1
769 : #define NS_STYLE_CELL_SCOPE_ROWGROUP 2
770 : #define NS_STYLE_CELL_SCOPE_COLGROUP 3
771 :
772 : // See nsStylePage
773 : #define NS_STYLE_PAGE_MARKS_NONE 0x00
774 : #define NS_STYLE_PAGE_MARKS_CROP 0x01
775 : #define NS_STYLE_PAGE_MARKS_REGISTER 0x02
776 :
777 : // See nsStylePage
778 : #define NS_STYLE_PAGE_SIZE_AUTO 0
779 : #define NS_STYLE_PAGE_SIZE_PORTRAIT 1
780 : #define NS_STYLE_PAGE_SIZE_LANDSCAPE 2
781 :
782 : // See nsStyleBreaks
783 : #define NS_STYLE_PAGE_BREAK_AUTO 0
784 : #define NS_STYLE_PAGE_BREAK_ALWAYS 1
785 : #define NS_STYLE_PAGE_BREAK_AVOID 2
786 : #define NS_STYLE_PAGE_BREAK_LEFT 3
787 : #define NS_STYLE_PAGE_BREAK_RIGHT 4
788 :
789 : // See nsStyleColumn
790 : #define NS_STYLE_COLUMN_COUNT_AUTO 0
791 : #define NS_STYLE_COLUMN_COUNT_UNLIMITED (-1)
792 :
793 : #define NS_STYLE_COLUMN_FILL_AUTO 0
794 : #define NS_STYLE_COLUMN_FILL_BALANCE 1
795 :
796 : // See nsStyleUIReset
797 : #define NS_STYLE_IME_MODE_AUTO 0
798 : #define NS_STYLE_IME_MODE_NORMAL 1
799 : #define NS_STYLE_IME_MODE_ACTIVE 2
800 : #define NS_STYLE_IME_MODE_DISABLED 3
801 : #define NS_STYLE_IME_MODE_INACTIVE 4
802 :
803 : // See nsStyleGradient
804 : #define NS_STYLE_GRADIENT_SHAPE_LINEAR 0
805 : #define NS_STYLE_GRADIENT_SHAPE_ELLIPTICAL 1
806 : #define NS_STYLE_GRADIENT_SHAPE_CIRCULAR 2
807 :
808 : #define NS_STYLE_GRADIENT_SIZE_CLOSEST_SIDE 0
809 : #define NS_STYLE_GRADIENT_SIZE_CLOSEST_CORNER 1
810 : #define NS_STYLE_GRADIENT_SIZE_FARTHEST_SIDE 2
811 : #define NS_STYLE_GRADIENT_SIZE_FARTHEST_CORNER 3
812 :
813 : // See nsStyleSVG
814 :
815 : // dominant-baseline
816 : #define NS_STYLE_DOMINANT_BASELINE_AUTO 0
817 : #define NS_STYLE_DOMINANT_BASELINE_USE_SCRIPT 1
818 : #define NS_STYLE_DOMINANT_BASELINE_NO_CHANGE 2
819 : #define NS_STYLE_DOMINANT_BASELINE_RESET_SIZE 3
820 : #define NS_STYLE_DOMINANT_BASELINE_IDEOGRAPHIC 4
821 : #define NS_STYLE_DOMINANT_BASELINE_ALPHABETIC 5
822 : #define NS_STYLE_DOMINANT_BASELINE_HANGING 6
823 : #define NS_STYLE_DOMINANT_BASELINE_MATHEMATICAL 7
824 : #define NS_STYLE_DOMINANT_BASELINE_CENTRAL 8
825 : #define NS_STYLE_DOMINANT_BASELINE_MIDDLE 9
826 : #define NS_STYLE_DOMINANT_BASELINE_TEXT_AFTER_EDGE 10
827 : #define NS_STYLE_DOMINANT_BASELINE_TEXT_BEFORE_EDGE 11
828 :
829 : // fill-rule
830 : #define NS_STYLE_FILL_RULE_NONZERO 0
831 : #define NS_STYLE_FILL_RULE_EVENODD 1
832 :
833 : // image-rendering
834 : #define NS_STYLE_IMAGE_RENDERING_AUTO 0
835 : #define NS_STYLE_IMAGE_RENDERING_OPTIMIZESPEED 1
836 : #define NS_STYLE_IMAGE_RENDERING_OPTIMIZEQUALITY 2
837 : #define NS_STYLE_IMAGE_RENDERING_CRISPEDGES 3
838 :
839 : // shape-rendering
840 : #define NS_STYLE_SHAPE_RENDERING_AUTO 0
841 : #define NS_STYLE_SHAPE_RENDERING_OPTIMIZESPEED 1
842 : #define NS_STYLE_SHAPE_RENDERING_CRISPEDGES 2
843 : #define NS_STYLE_SHAPE_RENDERING_GEOMETRICPRECISION 3
844 :
845 : // stroke-linecap
846 : #define NS_STYLE_STROKE_LINECAP_BUTT 0
847 : #define NS_STYLE_STROKE_LINECAP_ROUND 1
848 : #define NS_STYLE_STROKE_LINECAP_SQUARE 2
849 :
850 : // stroke-linejoin
851 : #define NS_STYLE_STROKE_LINEJOIN_MITER 0
852 : #define NS_STYLE_STROKE_LINEJOIN_ROUND 1
853 : #define NS_STYLE_STROKE_LINEJOIN_BEVEL 2
854 :
855 : // text-anchor
856 : #define NS_STYLE_TEXT_ANCHOR_START 0
857 : #define NS_STYLE_TEXT_ANCHOR_MIDDLE 1
858 : #define NS_STYLE_TEXT_ANCHOR_END 2
859 :
860 : // text-rendering
861 : #define NS_STYLE_TEXT_RENDERING_AUTO 0
862 : #define NS_STYLE_TEXT_RENDERING_OPTIMIZESPEED 1
863 : #define NS_STYLE_TEXT_RENDERING_OPTIMIZELEGIBILITY 2
864 : #define NS_STYLE_TEXT_RENDERING_GEOMETRICPRECISION 3
865 :
866 : // color-interpolation and color-interpolation-filters
867 : #define NS_STYLE_COLOR_INTERPOLATION_AUTO 0
868 : #define NS_STYLE_COLOR_INTERPOLATION_SRGB 1
869 : #define NS_STYLE_COLOR_INTERPOLATION_LINEARRGB 2
870 :
871 : // 3d Transforms - Backface visibility
872 : #define NS_STYLE_BACKFACE_VISIBILITY_VISIBLE 1
873 : #define NS_STYLE_BACKFACE_VISIBILITY_HIDDEN 0
874 :
875 : #define NS_STYLE_TRANSFORM_STYLE_FLAT 0
876 : #define NS_STYLE_TRANSFORM_STYLE_PRESERVE_3D 1
877 :
878 : /*****************************************************************************
879 : * Constants for media features. *
880 : *****************************************************************************/
881 :
882 : // orientation
883 : #define NS_STYLE_ORIENTATION_PORTRAIT 0
884 : #define NS_STYLE_ORIENTATION_LANDSCAPE 1
885 :
886 : // scan
887 : #define NS_STYLE_SCAN_PROGRESSIVE 0
888 : #define NS_STYLE_SCAN_INTERLACE 1
889 :
890 : #endif /* nsStyleConsts_h___ */
|