• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3  *           (C) 2000 Antti Koivisto (koivisto@kde.org)
4  *           (C) 2000 Dirk Mueller (mueller@kde.org)
5  * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
6  * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Library General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Library General Public License for more details.
17  *
18  * You should have received a copy of the GNU Library General Public License
19  * along with this library; see the file COPYING.LIB.  If not, write to
20  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21  * Boston, MA 02110-1301, USA.
22  *
23  */
24 
25 #ifndef RenderStyleConstants_h
26 #define RenderStyleConstants_h
27 
28 namespace WebCore {
29 
30 /*
31  * WARNING:
32  * --------
33  *
34  * The order of the values in the enums have to agree with the order specified
35  * in CSSValueKeywords.in, otherwise some optimizations in the parser will fail,
36  * and produce invalid results.
37  */
38 
39 
40 // These have been defined in the order of their precedence for border-collapsing. Do
41 // not change this order!
42 enum EBorderStyle { BNONE, BHIDDEN, INSET, GROOVE, RIDGE, OUTSET, DOTTED, DASHED, SOLID, DOUBLE };
43 
44 enum EBorderPrecedence { BOFF, BTABLE, BCOLGROUP, BCOL, BROWGROUP, BROW, BCELL };
45 
46 enum PseudoState { PseudoUnknown, PseudoNone, PseudoAnyLink, PseudoLink, PseudoVisited};
47 
48 enum EPosition {
49     StaticPosition, RelativePosition, AbsolutePosition, FixedPosition
50 };
51 
52 enum EFloat {
53     FNONE = 0, FLEFT, FRIGHT
54 };
55 
56 
57 enum EMarginCollapse { MCOLLAPSE, MSEPARATE, MDISCARD };
58 
59 // Box attributes. Not inherited.
60 
61 enum EBoxSizing { CONTENT_BOX, BORDER_BOX };
62 
63 // Random visual rendering model attributes. Not inherited.
64 
65 enum EOverflow {
66     OVISIBLE, OHIDDEN, OSCROLL, OAUTO, OOVERLAY, OMARQUEE
67 };
68 
69 enum EVerticalAlign {
70     BASELINE, MIDDLE, SUB, SUPER, TEXT_TOP,
71     TEXT_BOTTOM, TOP, BOTTOM, BASELINE_MIDDLE, LENGTH
72 };
73 
74 enum EClear{
75     CNONE = 0, CLEFT = 1, CRIGHT = 2, CBOTH = 3
76 };
77 
78 enum ETableLayout {
79     TAUTO, TFIXED
80 };
81 
82 enum EUnicodeBidi {
83     UBNormal, Embed, Override
84 };
85 
86 enum EFillBox {
87     BorderFillBox, PaddingFillBox, ContentFillBox, TextFillBox
88 };
89 
90 enum EFillRepeat {
91     RepeatFill, RepeatXFill, RepeatYFill, NoRepeatFill
92 };
93 
94 enum EFillLayerType {
95     BackgroundFillLayer, MaskFillLayer
96 };
97 
98 // CSS3 Marquee Properties
99 
100 enum EMarqueeBehavior { MNONE, MSCROLL, MSLIDE, MALTERNATE };
101 enum EMarqueeDirection { MAUTO = 0, MLEFT = 1, MRIGHT = -1, MUP = 2, MDOWN = -2, MFORWARD = 3, MBACKWARD = -3 };
102 
103 // CSS3 Flexible Box Properties
104 
105 enum EBoxAlignment { BSTRETCH, BSTART, BCENTER, BEND, BJUSTIFY, BBASELINE };
106 enum EBoxOrient { HORIZONTAL, VERTICAL };
107 enum EBoxLines { SINGLE, MULTIPLE };
108 enum EBoxDirection { BNORMAL, BREVERSE };
109 
110 enum ETextSecurity {
111     TSNONE, TSDISC, TSCIRCLE, TSSQUARE
112 };
113 
114 // CSS3 User Modify Properties
115 
116 enum EUserModify {
117     READ_ONLY, READ_WRITE, READ_WRITE_PLAINTEXT_ONLY
118 };
119 
120 // CSS3 User Drag Values
121 
122 enum EUserDrag {
123     DRAG_AUTO, DRAG_NONE, DRAG_ELEMENT
124 };
125 
126 // CSS3 User Select Values
127 
128 enum EUserSelect {
129     SELECT_NONE, SELECT_TEXT
130 };
131 
132 // Word Break Values. Matches WinIE, rather than CSS3
133 
134 enum EWordBreak {
135     NormalWordBreak, BreakAllWordBreak, BreakWordBreak
136 };
137 
138 enum EWordWrap {
139     NormalWordWrap, BreakWordWrap
140 };
141 
142 enum ENBSPMode {
143     NBNORMAL, SPACE
144 };
145 
146 enum EKHTMLLineBreak {
147     LBNORMAL, AFTER_WHITE_SPACE
148 };
149 
150 enum EMatchNearestMailBlockquoteColor {
151     BCNORMAL, MATCH
152 };
153 
154 enum EResize {
155     RESIZE_NONE, RESIZE_BOTH, RESIZE_HORIZONTAL, RESIZE_VERTICAL
156 };
157 
158 enum EListStyleType {
159      DISC, CIRCLE, SQUARE, LDECIMAL, DECIMAL_LEADING_ZERO,
160      LOWER_ROMAN, UPPER_ROMAN, LOWER_GREEK,
161      LOWER_ALPHA, LOWER_LATIN, UPPER_ALPHA, UPPER_LATIN,
162      HEBREW, ARMENIAN, GEORGIAN, CJK_IDEOGRAPHIC,
163      HIRAGANA, KATAKANA, HIRAGANA_IROHA, KATAKANA_IROHA, LNONE
164 };
165 
166 enum ContentType {
167     CONTENT_NONE, CONTENT_OBJECT, CONTENT_TEXT, CONTENT_COUNTER
168 };
169 
170 enum EBorderFit { BorderFitBorder, BorderFitLines };
171 
172 enum ETimingFunctionType { LinearTimingFunction, CubicBezierTimingFunction };
173 
174 enum EAnimPlayState {
175     AnimPlayStatePlaying = 0x0,
176     AnimPlayStatePaused = 0x1
177 };
178 
179 enum EWhiteSpace {
180     NORMAL, PRE, PRE_WRAP, PRE_LINE, NOWRAP, KHTML_NOWRAP
181 };
182 
183 enum ETextAlign {
184     TAAUTO, LEFT, RIGHT, CENTER, JUSTIFY, WEBKIT_LEFT, WEBKIT_RIGHT, WEBKIT_CENTER
185 };
186 
187 enum ETextTransform {
188     CAPITALIZE, UPPERCASE, LOWERCASE, TTNONE
189 };
190 
191 enum ETextDecoration {
192     TDNONE = 0x0 , UNDERLINE = 0x1, OVERLINE = 0x2, LINE_THROUGH= 0x4, BLINK = 0x8
193 };
194 
195 enum EPageBreak {
196     PBAUTO, PBALWAYS, PBAVOID
197 };
198 
199 enum EEmptyCell {
200     SHOW, HIDE
201 };
202 
203 enum ECaptionSide {
204     CAPTOP, CAPBOTTOM, CAPLEFT, CAPRIGHT
205 };
206 
207 enum EListStylePosition { OUTSIDE, INSIDE };
208 
209 enum EVisibility { VISIBLE, HIDDEN, COLLAPSE };
210 
211 enum ECursor {
212     // The following must match the order in CSSValueKeywords.in.
213     CURSOR_AUTO,
214     CURSOR_CROSS,
215     CURSOR_DEFAULT,
216     CURSOR_POINTER,
217     CURSOR_MOVE,
218     CURSOR_VERTICAL_TEXT,
219     CURSOR_CELL,
220     CURSOR_CONTEXT_MENU,
221     CURSOR_ALIAS,
222     CURSOR_PROGRESS,
223     CURSOR_NO_DROP,
224     CURSOR_NOT_ALLOWED,
225     CURSOR_WEBKIT_ZOOM_IN,
226     CURSOR_WEBKIT_ZOOM_OUT,
227     CURSOR_E_RESIZE,
228     CURSOR_NE_RESIZE,
229     CURSOR_NW_RESIZE,
230     CURSOR_N_RESIZE,
231     CURSOR_SE_RESIZE,
232     CURSOR_SW_RESIZE,
233     CURSOR_S_RESIZE,
234     CURSOR_W_RESIZE,
235     CURSOR_EW_RESIZE,
236     CURSOR_NS_RESIZE,
237     CURSOR_NESW_RESIZE,
238     CURSOR_NWSE_RESIZE,
239     CURSOR_COL_RESIZE,
240     CURSOR_ROW_RESIZE,
241     CURSOR_TEXT,
242     CURSOR_WAIT,
243     CURSOR_HELP,
244     CURSOR_ALL_SCROLL,
245     CURSOR_WEBKIT_GRAB,
246     CURSOR_WEBKIT_GRABBING,
247 
248     // The following are handled as exceptions so don't need to match.
249     CURSOR_COPY,
250     CURSOR_NONE
251 };
252 
253 enum EDisplay {
254     INLINE, BLOCK, LIST_ITEM, RUN_IN, COMPACT, INLINE_BLOCK,
255     TABLE, INLINE_TABLE, TABLE_ROW_GROUP,
256     TABLE_HEADER_GROUP, TABLE_FOOTER_GROUP, TABLE_ROW,
257     TABLE_COLUMN_GROUP, TABLE_COLUMN, TABLE_CELL,
258     TABLE_CAPTION, BOX, INLINE_BOX, NONE
259 };
260 
261 enum EPointerEvents {
262     PE_NONE, PE_AUTO, PE_STROKE, PE_FILL, PE_PAINTED, PE_VISIBLE,
263     PE_VISIBLE_STROKE, PE_VISIBLE_FILL, PE_VISIBLE_PAINTED, PE_ALL
264 };
265 
266 } // namespace WebCore
267 
268 #endif // RenderStyleConstants_h
269