]> git.saurik.com Git - iphone-api.git/blob - WebCore/RenderStyleConstants.h
Add support for new WinterBoard Settings features.
[iphone-api.git] / WebCore / RenderStyleConstants.h
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 // The difference between two styles. The following values are used:
40 // (1) StyleDifferenceEqual - The two styles are identical
41 // (2) StyleDifferenceRecompositeLayer - The layer needs its position and transform updated, but no repaint
42 // (3) StyleDifferenceRepaint - The object just needs to be repainted.
43 // (4) StyleDifferenceRepaintLayer - The layer and its descendant layers needs to be repainted.
44 // (5) StyleDifferenceLayout - A layout is required.
45 enum StyleDifference {
46 StyleDifferenceEqual,
47 #if USE(ACCELERATED_COMPOSITING)
48 StyleDifferenceRecompositeLayer,
49 #endif
50 StyleDifferenceRepaint,
51 StyleDifferenceRepaintLayer,
52 StyleDifferenceLayoutPositionedMovementOnly,
53 StyleDifferenceLayout
54 };
55
56 // When some style properties change, different amounts of work have to be done depending on
57 // context (e.g. whether the property is changing on an element which has a compositing layer).
58 // A simple StyleDifference does not provide enough information so we return a bit mask of
59 // StyleDifferenceContextSensitiveProperties from RenderStyle::diff() too.
60 enum StyleDifferenceContextSensitiveProperty {
61 ContextSensitivePropertyNone = 0,
62 ContextSensitivePropertyTransform = (1 << 0),
63 ContextSensitivePropertyOpacity = (1 << 1)
64 };
65
66 // Static pseudo styles. Dynamic ones are produced on the fly.
67 enum PseudoId {
68 NOPSEUDO, FIRST_LINE, FIRST_LETTER, BEFORE, AFTER, SELECTION, FIRST_LINE_INHERITED, SCROLLBAR, FILE_UPLOAD_BUTTON, INPUT_PLACEHOLDER,
69 SLIDER_THUMB, SEARCH_CANCEL_BUTTON, SEARCH_DECORATION, SEARCH_RESULTS_DECORATION, SEARCH_RESULTS_BUTTON, MEDIA_CONTROLS_PANEL,
70 MEDIA_CONTROLS_PLAY_BUTTON, MEDIA_CONTROLS_MUTE_BUTTON, MEDIA_CONTROLS_TIMELINE, MEDIA_CONTROLS_TIMELINE_CONTAINER,
71 MEDIA_CONTROLS_CURRENT_TIME_DISPLAY, MEDIA_CONTROLS_TIME_REMAINING_DISPLAY, MEDIA_CONTROLS_SEEK_BACK_BUTTON,
72 MEDIA_CONTROLS_SEEK_FORWARD_BUTTON, MEDIA_CONTROLS_FULLSCREEN_BUTTON,
73 SCROLLBAR_THUMB, SCROLLBAR_BUTTON, SCROLLBAR_TRACK, SCROLLBAR_TRACK_PIECE, SCROLLBAR_CORNER, RESIZER,
74
75 FIRST_INTERNAL_PSEUDOID = FILE_UPLOAD_BUTTON
76 };
77
78 // These have been defined in the order of their precedence for border-collapsing. Do
79 // not change this order!
80 enum EBorderStyle { BNONE, BHIDDEN, INSET, GROOVE, RIDGE, OUTSET, DOTTED, DASHED, SOLID, DOUBLE };
81
82 enum EBorderPrecedence { BOFF, BTABLE, BCOLGROUP, BCOL, BROWGROUP, BROW, BCELL };
83
84 enum PseudoState { PseudoUnknown, PseudoNone, PseudoAnyLink, PseudoLink, PseudoVisited};
85
86 enum EPosition {
87 StaticPosition, RelativePosition, AbsolutePosition, FixedPosition
88 };
89
90 enum EFloat {
91 FNONE = 0, FLEFT, FRIGHT
92 };
93
94
95 enum EMarginCollapse { MCOLLAPSE, MSEPARATE, MDISCARD };
96
97 // Box attributes. Not inherited.
98
99 enum EBoxSizing { CONTENT_BOX, BORDER_BOX };
100
101 // Random visual rendering model attributes. Not inherited.
102
103 enum EOverflow {
104 OVISIBLE, OHIDDEN, OSCROLL, OAUTO, OOVERLAY, OMARQUEE
105 };
106
107 enum EVerticalAlign {
108 BASELINE, MIDDLE, SUB, SUPER, TEXT_TOP,
109 TEXT_BOTTOM, TOP, BOTTOM, BASELINE_MIDDLE, LENGTH
110 };
111
112 enum EClear{
113 CNONE = 0, CLEFT = 1, CRIGHT = 2, CBOTH = 3
114 };
115
116 enum ETableLayout {
117 TAUTO, TFIXED
118 };
119
120 enum EUnicodeBidi {
121 UBNormal, Embed, Override
122 };
123
124 enum EFillBox {
125 BorderFillBox, PaddingFillBox, ContentFillBox, TextFillBox
126 };
127
128 enum EFillRepeat {
129 RepeatFill, RepeatXFill, RepeatYFill, NoRepeatFill
130 };
131
132 enum EFillLayerType {
133 BackgroundFillLayer, MaskFillLayer
134 };
135
136 // CSS3 Marquee Properties
137
138 enum EMarqueeBehavior { MNONE, MSCROLL, MSLIDE, MALTERNATE };
139 enum EMarqueeDirection { MAUTO = 0, MLEFT = 1, MRIGHT = -1, MUP = 2, MDOWN = -2, MFORWARD = 3, MBACKWARD = -3 };
140
141 // CSS3 Flexible Box Properties
142
143 enum EBoxAlignment { BSTRETCH, BSTART, BCENTER, BEND, BJUSTIFY, BBASELINE };
144 enum EBoxOrient { HORIZONTAL, VERTICAL };
145 enum EBoxLines { SINGLE, MULTIPLE };
146 enum EBoxDirection { BNORMAL, BREVERSE };
147
148 enum ETextSecurity {
149 TSNONE, TSDISC, TSCIRCLE, TSSQUARE
150 };
151
152 // CSS3 User Modify Properties
153
154 enum EUserModify {
155 READ_ONLY, READ_WRITE, READ_WRITE_PLAINTEXT_ONLY
156 };
157
158 // CSS3 User Drag Values
159
160 enum EUserDrag {
161 DRAG_AUTO, DRAG_NONE, DRAG_ELEMENT
162 };
163
164 // CSS3 User Select Values
165
166 enum EUserSelect {
167 SELECT_NONE, SELECT_TEXT
168 };
169
170 // Word Break Values. Matches WinIE, rather than CSS3
171
172 enum EWordBreak {
173 NormalWordBreak, BreakAllWordBreak, BreakWordBreak
174 };
175
176 enum EWordWrap {
177 NormalWordWrap, BreakWordWrap
178 };
179
180 enum ENBSPMode {
181 NBNORMAL, SPACE
182 };
183
184 enum EKHTMLLineBreak {
185 LBNORMAL, AFTER_WHITE_SPACE
186 };
187
188 enum EMatchNearestMailBlockquoteColor {
189 BCNORMAL, MATCH
190 };
191
192 enum EResize {
193 RESIZE_NONE, RESIZE_BOTH, RESIZE_HORIZONTAL, RESIZE_VERTICAL
194 };
195
196 enum EListStyleType {
197 DISC, CIRCLE, SQUARE, LDECIMAL, DECIMAL_LEADING_ZERO,
198 LOWER_ROMAN, UPPER_ROMAN, LOWER_GREEK,
199 LOWER_ALPHA, LOWER_LATIN, UPPER_ALPHA, UPPER_LATIN,
200 HEBREW, ARMENIAN, GEORGIAN, CJK_IDEOGRAPHIC,
201 HIRAGANA, KATAKANA, HIRAGANA_IROHA, KATAKANA_IROHA, LNONE
202 };
203
204 enum StyleContentType {
205 CONTENT_NONE, CONTENT_OBJECT, CONTENT_TEXT, CONTENT_COUNTER
206 };
207
208 enum EBorderFit { BorderFitBorder, BorderFitLines };
209
210 enum ETimingFunctionType { LinearTimingFunction, CubicBezierTimingFunction };
211
212 enum EAnimPlayState {
213 AnimPlayStatePlaying = 0x0,
214 AnimPlayStatePaused = 0x1
215 };
216
217 enum EWhiteSpace {
218 NORMAL, PRE, PRE_WRAP, PRE_LINE, NOWRAP, KHTML_NOWRAP
219 };
220
221 enum ETextAlign {
222 TAAUTO, LEFT, RIGHT, CENTER, JUSTIFY, WEBKIT_LEFT, WEBKIT_RIGHT, WEBKIT_CENTER
223 };
224
225 enum ETextTransform {
226 CAPITALIZE, UPPERCASE, LOWERCASE, TTNONE
227 };
228
229 enum ETextDecoration {
230 TDNONE = 0x0 , UNDERLINE = 0x1, OVERLINE = 0x2, LINE_THROUGH= 0x4, BLINK = 0x8
231 };
232
233 enum EPageBreak {
234 PBAUTO, PBALWAYS, PBAVOID
235 };
236
237 enum EEmptyCell {
238 SHOW, HIDE
239 };
240
241 enum ECaptionSide {
242 CAPTOP, CAPBOTTOM, CAPLEFT, CAPRIGHT
243 };
244
245 enum EListStylePosition { OUTSIDE, INSIDE };
246
247 enum EVisibility { VISIBLE, HIDDEN, COLLAPSE };
248
249 enum ECursor {
250 // The following must match the order in CSSValueKeywords.in.
251 CURSOR_AUTO,
252 CURSOR_CROSS,
253 CURSOR_DEFAULT,
254 CURSOR_POINTER,
255 CURSOR_MOVE,
256 CURSOR_VERTICAL_TEXT,
257 CURSOR_CELL,
258 CURSOR_CONTEXT_MENU,
259 CURSOR_ALIAS,
260 CURSOR_PROGRESS,
261 CURSOR_NO_DROP,
262 CURSOR_NOT_ALLOWED,
263 CURSOR_WEBKIT_ZOOM_IN,
264 CURSOR_WEBKIT_ZOOM_OUT,
265 CURSOR_E_RESIZE,
266 CURSOR_NE_RESIZE,
267 CURSOR_NW_RESIZE,
268 CURSOR_N_RESIZE,
269 CURSOR_SE_RESIZE,
270 CURSOR_SW_RESIZE,
271 CURSOR_S_RESIZE,
272 CURSOR_W_RESIZE,
273 CURSOR_EW_RESIZE,
274 CURSOR_NS_RESIZE,
275 CURSOR_NESW_RESIZE,
276 CURSOR_NWSE_RESIZE,
277 CURSOR_COL_RESIZE,
278 CURSOR_ROW_RESIZE,
279 CURSOR_TEXT,
280 CURSOR_WAIT,
281 CURSOR_HELP,
282 CURSOR_ALL_SCROLL,
283 CURSOR_WEBKIT_GRAB,
284 CURSOR_WEBKIT_GRABBING,
285
286 // The following are handled as exceptions so don't need to match.
287 CURSOR_COPY,
288 CURSOR_NONE
289 };
290
291 enum EDisplay {
292 INLINE, BLOCK, LIST_ITEM, RUN_IN, COMPACT, INLINE_BLOCK,
293 TABLE, INLINE_TABLE, TABLE_ROW_GROUP,
294 TABLE_HEADER_GROUP, TABLE_FOOTER_GROUP, TABLE_ROW,
295 TABLE_COLUMN_GROUP, TABLE_COLUMN, TABLE_CELL,
296 TABLE_CAPTION, BOX, INLINE_BOX, NONE
297 };
298
299 enum EPointerEvents {
300 PE_NONE, PE_AUTO, PE_STROKE, PE_FILL, PE_PAINTED, PE_VISIBLE,
301 PE_VISIBLE_STROKE, PE_VISIBLE_FILL, PE_VISIBLE_PAINTED, PE_ALL
302 };
303
304 enum ETransformStyle3D {
305 TransformStyle3DFlat, TransformStyle3DPreserve3D
306 };
307
308 enum EBackfaceVisibility {
309 BackfaceVisibilityVisible, BackfaceVisibilityHidden
310 };
311
312 enum EImageLoadingBorder {
313 IMAGE_LOADING_BORDER_OUTLINE, IMAGE_LOADING_BORDER_NONE
314 };
315
316 } // namespace WebCore
317
318 #endif // RenderStyleConstants_h