Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: Source/core/layout/style/LayoutStyleConstants.h

Issue 1033943002: Rename LayoutStyle to papayawhip (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ensureComputedStyle Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/style/LayoutStyle.cpp ('k') | Source/core/layout/style/LayoutStyleTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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, 2009, 2010 Apple Inc. All rights reserved.
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public
11 * License as published by the Free Software Foundation; either
12 * version 2 of the License, or (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Library General Public License for more details.
18 *
19 * You should have received a copy of the GNU Library General Public License
20 * along with this library; see the file COPYING.LIB. If not, write to
21 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 * Boston, MA 02110-1301, USA.
23 *
24 */
25
26 #ifndef LayoutStyleConstants_h
27 #define LayoutStyleConstants_h
28
29 namespace blink {
30
31 // Sides used when drawing borders and outlines. The values should run clockwise from top.
32 enum BoxSide {
33 BSTop,
34 BSRight,
35 BSBottom,
36 BSLeft
37 };
38
39 enum StyleRecalcChange {
40 NoChange,
41 NoInherit,
42 UpdatePseudoElements,
43 Inherit,
44 Force,
45 Reattach,
46 ReattachNoLayoutObject
47 };
48
49 static const size_t PrintColorAdjustBits = 1;
50 enum PrintColorAdjust {
51 PrintColorAdjustEconomy,
52 PrintColorAdjustExact
53 };
54
55 // Static pseudo styles. Dynamic ones are produced on the fly.
56 enum PseudoId {
57 // The order must be NOP ID, public IDs, and then internal IDs.
58 // If you add or remove a public ID, you must update _pseudoBits in LayoutSt yle.
59 NOPSEUDO, FIRST_LINE, FIRST_LETTER, BEFORE, AFTER, BACKDROP, SELECTION, FIRS T_LINE_INHERITED, SCROLLBAR,
60 // Internal IDs follow:
61 SCROLLBAR_THUMB, SCROLLBAR_BUTTON, SCROLLBAR_TRACK, SCROLLBAR_TRACK_PIECE, S CROLLBAR_CORNER, RESIZER, INPUT_LIST_BUTTON,
62 // Special values follow:
63 AFTER_LAST_INTERNAL_PSEUDOID,
64 FIRST_PUBLIC_PSEUDOID = FIRST_LINE,
65 FIRST_INTERNAL_PSEUDOID = SCROLLBAR_THUMB,
66 PUBLIC_PSEUDOID_MASK = ((1 << FIRST_INTERNAL_PSEUDOID) - 1) & ~((1 << FIRST_ PUBLIC_PSEUDOID) - 1),
67 PSEUDO_ELEMENT_MASK = (1 << (BEFORE - 1)) | (1 << (AFTER - 1)) | (1 << (BACK DROP - 1))
68 };
69
70 enum ColumnFill { ColumnFillBalance, ColumnFillAuto };
71
72 enum ColumnSpan { ColumnSpanNone = 0, ColumnSpanAll };
73
74 enum EBorderCollapse { BSEPARATE = 0, BCOLLAPSE = 1 };
75
76 // These have been defined in the order of their precedence for border-collapsin g. Do
77 // not change this order! This order also must match the order in CSSValueKeywor ds.in.
78 enum EBorderStyle { BNONE, BHIDDEN, INSET, GROOVE, OUTSET, RIDGE, DOTTED, DASHED , SOLID, DOUBLE };
79
80 enum EBorderPrecedence { BOFF, BTABLE, BCOLGROUP, BCOL, BROWGROUP, BROW, BCELL } ;
81
82 enum OutlineIsAuto { AUTO_OFF = 0, AUTO_ON };
83
84 enum EPosition {
85 StaticPosition = 0,
86 RelativePosition = 1,
87 AbsolutePosition = 2,
88 // This value is required to pack our bits efficiently in LayoutObject.
89 // FIXME: Is this still true now that we've remove position: sticky.
90 FixedPosition = 6
91 };
92
93 enum EFloat {
94 NoFloat, LeftFloat, RightFloat
95 };
96
97 enum EMarginCollapse { MCOLLAPSE, MSEPARATE, MDISCARD };
98
99 // Box decoration attributes. Not inherited.
100
101 enum EBoxDecorationBreak { DSLICE, DCLONE };
102
103 // Box attributes. Not inherited.
104
105 enum EBoxSizing { CONTENT_BOX, BORDER_BOX };
106
107 // Random visual rendering model attributes. Not inherited.
108
109 enum EOverflow {
110 OVISIBLE, OHIDDEN, OSCROLL, OAUTO, OOVERLAY, OPAGEDX, OPAGEDY
111 };
112
113 enum EVerticalAlign {
114 BASELINE, MIDDLE, SUB, SUPER, TEXT_TOP,
115 TEXT_BOTTOM, TOP, BOTTOM, BASELINE_MIDDLE, LENGTH
116 };
117
118 enum EClear {
119 CNONE = 0, CLEFT = 1, CRIGHT = 2, CBOTH = 3
120 };
121
122 enum ETableLayout {
123 TAUTO, TFIXED
124 };
125
126 enum TextCombine {
127 TextCombineNone, TextCombineHorizontal
128 };
129
130 enum EFillAttachment {
131 ScrollBackgroundAttachment, LocalBackgroundAttachment, FixedBackgroundAttach ment
132 };
133
134 enum EFillBox {
135 BorderFillBox, PaddingFillBox, ContentFillBox, TextFillBox
136 };
137
138 enum EFillRepeat {
139 RepeatFill, NoRepeatFill, RoundFill, SpaceFill
140 };
141
142 enum EFillLayerType {
143 BackgroundFillLayer, MaskFillLayer
144 };
145
146 // CSS3 Background Values
147 enum EFillSizeType { Contain, Cover, SizeLength, SizeNone };
148
149 // CSS3 Background Position
150 enum BackgroundEdgeOrigin { TopEdge, RightEdge, BottomEdge, LeftEdge };
151
152 // CSS Mask Source Types
153 enum EMaskSourceType { MaskAlpha, MaskLuminance };
154
155 // Deprecated Flexible Box Properties
156
157 enum EBoxPack { Start, Center, End, Justify };
158 enum EBoxAlignment { BSTRETCH, BSTART, BCENTER, BEND, BBASELINE };
159 enum EBoxOrient { HORIZONTAL, VERTICAL };
160 enum EBoxLines { SINGLE, MULTIPLE };
161 enum EBoxDirection { BNORMAL, BREVERSE };
162
163 // CSS3 Flexbox Properties
164
165 enum EFlexDirection { FlowRow, FlowRowReverse, FlowColumn, FlowColumnReverse };
166 enum EFlexWrap { FlexNoWrap, FlexWrap, FlexWrapReverse };
167
168 enum ETextSecurity {
169 TSNONE, TSDISC, TSCIRCLE, TSSQUARE
170 };
171
172 // CSS3 User Modify Properties
173
174 enum EUserModify {
175 READ_ONLY, READ_WRITE, READ_WRITE_PLAINTEXT_ONLY
176 };
177
178 // CSS3 User Drag Values
179
180 enum EUserDrag {
181 DRAG_AUTO, DRAG_NONE, DRAG_ELEMENT
182 };
183
184 // CSS3 User Select Values
185
186 enum EUserSelect {
187 SELECT_NONE, SELECT_TEXT, SELECT_ALL
188 };
189
190 // CSS3 Image Values
191 enum ObjectFit { ObjectFitFill, ObjectFitContain, ObjectFitCover, ObjectFitNone, ObjectFitScaleDown };
192
193 // Word Break Values. Matches WinIE, rather than CSS3
194
195 enum EWordBreak {
196 NormalWordBreak, BreakAllWordBreak, BreakWordBreak
197 };
198
199 enum EOverflowWrap {
200 NormalOverflowWrap, BreakOverflowWrap
201 };
202
203 enum LineBreak {
204 LineBreakAuto, LineBreakLoose, LineBreakNormal, LineBreakStrict, LineBreakAf terWhiteSpace
205 };
206
207 enum EResize {
208 RESIZE_NONE, RESIZE_BOTH, RESIZE_HORIZONTAL, RESIZE_VERTICAL
209 };
210
211 // The order of this enum must match the order of the list style types in CSSVal ueKeywords.in.
212 enum EListStyleType {
213 Disc,
214 Circle,
215 Square,
216 DecimalListStyle,
217 DecimalLeadingZero,
218 ArabicIndic,
219 BinaryListStyle,
220 Bengali,
221 Cambodian,
222 Khmer,
223 Devanagari,
224 Gujarati,
225 Gurmukhi,
226 Kannada,
227 LowerHexadecimal,
228 Lao,
229 Malayalam,
230 Mongolian,
231 Myanmar,
232 Octal,
233 Oriya,
234 Persian,
235 Urdu,
236 Telugu,
237 Tibetan,
238 Thai,
239 UpperHexadecimal,
240 LowerRoman,
241 UpperRoman,
242 LowerGreek,
243 LowerAlpha,
244 LowerLatin,
245 UpperAlpha,
246 UpperLatin,
247 Afar,
248 EthiopicHalehameAaEt,
249 EthiopicHalehameAaEr,
250 Amharic,
251 EthiopicHalehameAmEt,
252 AmharicAbegede,
253 EthiopicAbegedeAmEt,
254 CjkEarthlyBranch,
255 CjkHeavenlyStem,
256 Ethiopic,
257 EthiopicHalehameGez,
258 EthiopicAbegede,
259 EthiopicAbegedeGez,
260 HangulConsonant,
261 Hangul,
262 LowerNorwegian,
263 Oromo,
264 EthiopicHalehameOmEt,
265 Sidama,
266 EthiopicHalehameSidEt,
267 Somali,
268 EthiopicHalehameSoEt,
269 Tigre,
270 EthiopicHalehameTig,
271 TigrinyaEr,
272 EthiopicHalehameTiEr,
273 TigrinyaErAbegede,
274 EthiopicAbegedeTiEr,
275 TigrinyaEt,
276 EthiopicHalehameTiEt,
277 TigrinyaEtAbegede,
278 EthiopicAbegedeTiEt,
279 UpperGreek,
280 UpperNorwegian,
281 Asterisks,
282 Footnotes,
283 Hebrew,
284 Armenian,
285 LowerArmenian,
286 UpperArmenian,
287 Georgian,
288 CJKIdeographic,
289 Hiragana,
290 Katakana,
291 HiraganaIroha,
292 KatakanaIroha,
293 NoneListStyle
294 };
295
296 enum QuoteType {
297 OPEN_QUOTE, CLOSE_QUOTE, NO_OPEN_QUOTE, NO_CLOSE_QUOTE
298 };
299
300 enum EAnimPlayState {
301 AnimPlayStatePlaying,
302 AnimPlayStatePaused
303 };
304
305 enum EWhiteSpace {
306 NORMAL, PRE, PRE_WRAP, PRE_LINE, NOWRAP, KHTML_NOWRAP
307 };
308
309 // The order of this enum must match the order of the text align values in CSSVa lueKeywords.in.
310 enum ETextAlign {
311 LEFT, RIGHT, CENTER, JUSTIFY, WEBKIT_LEFT, WEBKIT_RIGHT, WEBKIT_CENTER, TAST ART, TAEND,
312 };
313
314 enum ETextTransform {
315 CAPITALIZE, UPPERCASE, LOWERCASE, TTNONE
316 };
317
318 static const size_t TextDecorationBits = 4;
319 enum TextDecoration {
320 TextDecorationNone = 0x0,
321 TextDecorationUnderline = 0x1,
322 TextDecorationOverline = 0x2,
323 TextDecorationLineThrough = 0x4,
324 TextDecorationBlink = 0x8
325 };
326 inline TextDecoration operator| (TextDecoration a, TextDecoration b) { return Te xtDecoration(int(a) | int(b)); }
327 inline TextDecoration& operator|= (TextDecoration& a, TextDecoration b) { return a = a | b; }
328
329 enum TextDecorationStyle {
330 TextDecorationStyleSolid,
331 TextDecorationStyleDouble,
332 TextDecorationStyleDotted,
333 TextDecorationStyleDashed,
334 TextDecorationStyleWavy
335 };
336
337 enum TextAlignLast {
338 TextAlignLastAuto, TextAlignLastStart, TextAlignLastEnd, TextAlignLastLeft, TextAlignLastRight, TextAlignLastCenter, TextAlignLastJustify
339 };
340
341 enum TextUnderlinePosition {
342 // FIXME: Implement support for 'under left' and 'under right' values.
343 TextUnderlinePositionAuto,
344 TextUnderlinePositionUnder
345 };
346
347 enum EPageBreak {
348 PBAUTO, PBALWAYS, PBAVOID
349 };
350
351 enum EEmptyCell {
352 SHOW, HIDE
353 };
354
355 enum ECaptionSide {
356 CAPTOP, CAPBOTTOM, CAPLEFT, CAPRIGHT
357 };
358
359 enum EListStylePosition { OUTSIDE, INSIDE };
360
361 enum EVisibility { VISIBLE, HIDDEN, COLLAPSE };
362
363 enum ECursor {
364 // The following must match the order in CSSValueKeywords.in.
365 CURSOR_AUTO,
366 CURSOR_CROSS,
367 CURSOR_DEFAULT,
368 CURSOR_POINTER,
369 CURSOR_MOVE,
370 CURSOR_VERTICAL_TEXT,
371 CURSOR_CELL,
372 CURSOR_CONTEXT_MENU,
373 CURSOR_ALIAS,
374 CURSOR_PROGRESS,
375 CURSOR_NO_DROP,
376 CURSOR_NOT_ALLOWED,
377 CURSOR_ZOOM_IN,
378 CURSOR_ZOOM_OUT,
379 CURSOR_E_RESIZE,
380 CURSOR_NE_RESIZE,
381 CURSOR_NW_RESIZE,
382 CURSOR_N_RESIZE,
383 CURSOR_SE_RESIZE,
384 CURSOR_SW_RESIZE,
385 CURSOR_S_RESIZE,
386 CURSOR_W_RESIZE,
387 CURSOR_EW_RESIZE,
388 CURSOR_NS_RESIZE,
389 CURSOR_NESW_RESIZE,
390 CURSOR_NWSE_RESIZE,
391 CURSOR_COL_RESIZE,
392 CURSOR_ROW_RESIZE,
393 CURSOR_TEXT,
394 CURSOR_WAIT,
395 CURSOR_HELP,
396 CURSOR_ALL_SCROLL,
397 CURSOR_WEBKIT_GRAB,
398 CURSOR_WEBKIT_GRABBING,
399
400 // The following are handled as exceptions so don't need to match.
401 CURSOR_COPY,
402 CURSOR_NONE
403 };
404
405 // The order of this enum must match the order of the display values in CSSValue Keywords.in.
406 enum EDisplay {
407 INLINE, BLOCK, LIST_ITEM, INLINE_BLOCK,
408 TABLE, INLINE_TABLE, TABLE_ROW_GROUP,
409 TABLE_HEADER_GROUP, TABLE_FOOTER_GROUP, TABLE_ROW,
410 TABLE_COLUMN_GROUP, TABLE_COLUMN, TABLE_CELL,
411 TABLE_CAPTION, BOX, INLINE_BOX,
412 FLEX, INLINE_FLEX,
413 GRID, INLINE_GRID,
414 NONE,
415 FIRST_TABLE_DISPLAY = TABLE,
416 LAST_TABLE_DISPLAY = TABLE_CAPTION
417 };
418
419 enum EInsideLink {
420 NotInsideLink, InsideUnvisitedLink, InsideVisitedLink
421 };
422
423 enum EPointerEvents {
424 PE_NONE, PE_AUTO, PE_STROKE, PE_FILL, PE_PAINTED, PE_VISIBLE,
425 PE_VISIBLE_STROKE, PE_VISIBLE_FILL, PE_VISIBLE_PAINTED, PE_BOUNDINGBOX,
426 PE_ALL
427 };
428
429 enum ETransformStyle3D {
430 TransformStyle3DFlat, TransformStyle3DPreserve3D
431 };
432
433 enum MotionRotationType { MotionRotationAuto, MotionRotationFixed };
434
435 enum EBackfaceVisibility {
436 BackfaceVisibilityVisible, BackfaceVisibilityHidden
437 };
438
439 enum ELineClampType { LineClampLineCount, LineClampPercentage };
440
441 enum Hyphens { HyphensNone, HyphensManual, HyphensAuto };
442
443 enum ESpeak { SpeakNone, SpeakNormal, SpeakSpellOut, SpeakDigits, SpeakLiteralPu nctuation, SpeakNoPunctuation };
444
445 enum TextEmphasisFill { TextEmphasisFillFilled, TextEmphasisFillOpen };
446
447 enum TextEmphasisMark { TextEmphasisMarkNone, TextEmphasisMarkAuto, TextEmphasis MarkDot, TextEmphasisMarkCircle, TextEmphasisMarkDoubleCircle, TextEmphasisMarkT riangle, TextEmphasisMarkSesame, TextEmphasisMarkCustom };
448
449 enum TextEmphasisPosition { TextEmphasisPositionOver, TextEmphasisPositionUnder };
450
451 enum TextOrientation { TextOrientationVerticalRight, TextOrientationUpright, Tex tOrientationSideways, TextOrientationSidewaysRight };
452
453 enum TextOverflow { TextOverflowClip = 0, TextOverflowEllipsis };
454
455 enum EImageRendering { ImageRenderingAuto, ImageRenderingOptimizeSpeed, ImageRen deringOptimizeQuality, ImageRenderingOptimizeContrast, ImageRenderingPixelated } ;
456
457 enum ImageResolutionSource { ImageResolutionSpecified = 0, ImageResolutionFromIm age };
458
459 enum ImageResolutionSnap { ImageResolutionNoSnap = 0, ImageResolutionSnapPixels };
460
461 enum Order { LogicalOrder = 0, VisualOrder };
462
463 enum WrapFlow { WrapFlowAuto, WrapFlowBoth, WrapFlowStart, WrapFlowEnd, WrapFlow Maximum, WrapFlowClear };
464
465 enum WrapThrough { WrapThroughWrap, WrapThroughNone };
466
467 enum RubyPosition { RubyPositionBefore, RubyPositionAfter };
468
469 static const size_t GridAutoFlowBits = 4;
470 enum InternalGridAutoFlowAlgorithm {
471 InternalAutoFlowAlgorithmSparse = 0x1,
472 InternalAutoFlowAlgorithmDense = 0x2
473 };
474
475 enum InternalGridAutoFlowDirection {
476 InternalAutoFlowDirectionRow = 0x4,
477 InternalAutoFlowDirectionColumn = 0x8
478 };
479
480 enum GridAutoFlow {
481 AutoFlowRow = InternalAutoFlowAlgorithmSparse | InternalAutoFlowDirectionRow ,
482 AutoFlowColumn = InternalAutoFlowAlgorithmSparse | InternalAutoFlowDirection Column,
483 AutoFlowRowDense = InternalAutoFlowAlgorithmDense | InternalAutoFlowDirectio nRow,
484 AutoFlowColumnDense = InternalAutoFlowAlgorithmDense | InternalAutoFlowDirec tionColumn
485 };
486
487 enum DraggableRegionMode { DraggableRegionNone, DraggableRegionDrag, DraggableRe gionNoDrag };
488
489 static const size_t TouchActionBits = 4;
490 enum TouchAction {
491 TouchActionAuto = 0x0,
492 TouchActionNone = 0x1,
493 TouchActionPanX = 0x2,
494 TouchActionPanY = 0x4,
495 TouchActionPinchZoom = 0x8,
496 };
497 inline TouchAction operator| (TouchAction a, TouchAction b) { return TouchAction (int(a) | int(b)); }
498 inline TouchAction& operator|= (TouchAction& a, TouchAction b) { return a = a | b; }
499 inline TouchAction operator& (TouchAction a, TouchAction b) { return TouchAction (int(a) & int(b)); }
500 inline TouchAction& operator&= (TouchAction& a, TouchAction b) { return a = a & b; }
501
502 enum EIsolation { IsolationAuto, IsolationIsolate };
503
504 enum ItemPosition {
505 ItemPositionAuto,
506 ItemPositionStretch,
507 ItemPositionBaseline,
508 ItemPositionLastBaseline,
509 ItemPositionCenter,
510 ItemPositionStart,
511 ItemPositionEnd,
512 ItemPositionSelfStart,
513 ItemPositionSelfEnd,
514 ItemPositionFlexStart,
515 ItemPositionFlexEnd,
516 ItemPositionLeft,
517 ItemPositionRight
518 };
519
520 enum OverflowAlignment {
521 OverflowAlignmentDefault,
522 OverflowAlignmentTrue,
523 OverflowAlignmentSafe
524 };
525
526 enum ItemPositionType {
527 NonLegacyPosition,
528 LegacyPosition
529 };
530
531 enum ContentPosition {
532 ContentPositionAuto,
533 ContentPositionBaseline,
534 ContentPositionLastBaseline,
535 ContentPositionCenter,
536 ContentPositionStart,
537 ContentPositionEnd,
538 ContentPositionFlexStart,
539 ContentPositionFlexEnd,
540 ContentPositionLeft,
541 ContentPositionRight
542 };
543
544 enum ContentDistributionType {
545 ContentDistributionDefault,
546 ContentDistributionSpaceBetween,
547 ContentDistributionSpaceAround,
548 ContentDistributionSpaceEvenly,
549 ContentDistributionStretch
550 };
551
552 // Reasonable maximum to prevent insane font sizes from causing crashes on some platforms (such as Windows).
553 static const float maximumAllowedFontSize = 1000000.0f;
554
555 enum TextIndentLine { TextIndentFirstLine, TextIndentEachLine };
556 enum TextIndentType { TextIndentNormal, TextIndentHanging };
557
558 enum CSSBoxType { BoxMissing = 0, MarginBox, BorderBox, PaddingBox, ContentBox } ;
559
560 } // namespace blink
561
562 #endif // LayoutStyleConstants_h
OLDNEW
« no previous file with comments | « Source/core/layout/style/LayoutStyle.cpp ('k') | Source/core/layout/style/LayoutStyleTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698