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)
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.
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.
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.
25 #ifndef RenderStyleConstants_h
26 #define RenderStyleConstants_h
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.
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
{
47 #if USE(ACCELERATED_COMPOSITING)
48 StyleDifferenceRecompositeLayer
,
50 StyleDifferenceRepaint
,
51 StyleDifferenceRepaintLayer
,
52 StyleDifferenceLayoutPositionedMovementOnly
,
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)
66 // Static pseudo styles. Dynamic ones are produced on the fly.
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
,
75 FIRST_INTERNAL_PSEUDOID
= FILE_UPLOAD_BUTTON
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
};
82 enum EBorderPrecedence
{ BOFF
, BTABLE
, BCOLGROUP
, BCOL
, BROWGROUP
, BROW
, BCELL
};
84 enum PseudoState
{ PseudoUnknown
, PseudoNone
, PseudoAnyLink
, PseudoLink
, PseudoVisited
};
87 StaticPosition
, RelativePosition
, AbsolutePosition
, FixedPosition
91 FNONE
= 0, FLEFT
, FRIGHT
95 enum EMarginCollapse
{ MCOLLAPSE
, MSEPARATE
, MDISCARD
};
97 // Box attributes. Not inherited.
99 enum EBoxSizing
{ CONTENT_BOX
, BORDER_BOX
};
101 // Random visual rendering model attributes. Not inherited.
104 OVISIBLE
, OHIDDEN
, OSCROLL
, OAUTO
, OOVERLAY
, OMARQUEE
107 enum EVerticalAlign
{
108 BASELINE
, MIDDLE
, SUB
, SUPER
, TEXT_TOP
,
109 TEXT_BOTTOM
, TOP
, BOTTOM
, BASELINE_MIDDLE
, LENGTH
113 CNONE
= 0, CLEFT
= 1, CRIGHT
= 2, CBOTH
= 3
121 UBNormal
, Embed
, Override
125 BorderFillBox
, PaddingFillBox
, ContentFillBox
, TextFillBox
129 RepeatFill
, RepeatXFill
, RepeatYFill
, NoRepeatFill
132 enum EFillLayerType
{
133 BackgroundFillLayer
, MaskFillLayer
136 // CSS3 Marquee Properties
138 enum EMarqueeBehavior
{ MNONE
, MSCROLL
, MSLIDE
, MALTERNATE
};
139 enum EMarqueeDirection
{ MAUTO
= 0, MLEFT
= 1, MRIGHT
= -1, MUP
= 2, MDOWN
= -2, MFORWARD
= 3, MBACKWARD
= -3 };
141 // CSS3 Flexible Box Properties
143 enum EBoxAlignment
{ BSTRETCH
, BSTART
, BCENTER
, BEND
, BJUSTIFY
, BBASELINE
};
144 enum EBoxOrient
{ HORIZONTAL
, VERTICAL
};
145 enum EBoxLines
{ SINGLE
, MULTIPLE
};
146 enum EBoxDirection
{ BNORMAL
, BREVERSE
};
149 TSNONE
, TSDISC
, TSCIRCLE
, TSSQUARE
152 // CSS3 User Modify Properties
155 READ_ONLY
, READ_WRITE
, READ_WRITE_PLAINTEXT_ONLY
158 // CSS3 User Drag Values
161 DRAG_AUTO
, DRAG_NONE
, DRAG_ELEMENT
164 // CSS3 User Select Values
167 SELECT_NONE
, SELECT_TEXT
170 // Word Break Values. Matches WinIE, rather than CSS3
173 NormalWordBreak
, BreakAllWordBreak
, BreakWordBreak
177 NormalWordWrap
, BreakWordWrap
184 enum EKHTMLLineBreak
{
185 LBNORMAL
, AFTER_WHITE_SPACE
188 enum EMatchNearestMailBlockquoteColor
{
193 RESIZE_NONE
, RESIZE_BOTH
, RESIZE_HORIZONTAL
, RESIZE_VERTICAL
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
204 enum StyleContentType
{
205 CONTENT_NONE
, CONTENT_OBJECT
, CONTENT_TEXT
, CONTENT_COUNTER
208 enum EBorderFit
{ BorderFitBorder
, BorderFitLines
};
210 enum ETimingFunctionType
{ LinearTimingFunction
, CubicBezierTimingFunction
};
212 enum EAnimPlayState
{
213 AnimPlayStatePlaying
= 0x0,
214 AnimPlayStatePaused
= 0x1
218 NORMAL
, PRE
, PRE_WRAP
, PRE_LINE
, NOWRAP
, KHTML_NOWRAP
222 TAAUTO
, LEFT
, RIGHT
, CENTER
, JUSTIFY
, WEBKIT_LEFT
, WEBKIT_RIGHT
, WEBKIT_CENTER
225 enum ETextTransform
{
226 CAPITALIZE
, UPPERCASE
, LOWERCASE
, TTNONE
229 enum ETextDecoration
{
230 TDNONE
= 0x0 , UNDERLINE
= 0x1, OVERLINE
= 0x2, LINE_THROUGH
= 0x4, BLINK
= 0x8
234 PBAUTO
, PBALWAYS
, PBAVOID
242 CAPTOP
, CAPBOTTOM
, CAPLEFT
, CAPRIGHT
245 enum EListStylePosition
{ OUTSIDE
, INSIDE
};
247 enum EVisibility
{ VISIBLE
, HIDDEN
, COLLAPSE
};
250 // The following must match the order in CSSValueKeywords.in.
256 CURSOR_VERTICAL_TEXT
,
263 CURSOR_WEBKIT_ZOOM_IN
,
264 CURSOR_WEBKIT_ZOOM_OUT
,
284 CURSOR_WEBKIT_GRABBING
,
286 // The following are handled as exceptions so don't need to match.
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
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
304 enum ETransformStyle3D
{
305 TransformStyle3DFlat
, TransformStyle3DPreserve3D
308 enum EBackfaceVisibility
{
309 BackfaceVisibilityVisible
, BackfaceVisibilityHidden
312 enum EImageLoadingBorder
{
313 IMAGE_LOADING_BORDER_OUTLINE
, IMAGE_LOADING_BORDER_NONE
316 } // namespace WebCore
318 #endif // RenderStyleConstants_h