Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
| 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) | 3 * (C) 2000 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2000 Dirk Mueller (mueller@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. | 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) | 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/) | 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 23 * | 23 * |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef ComputedStyleConstants_h | 26 #ifndef ComputedStyleConstants_h |
| 27 #define ComputedStyleConstants_h | 27 #define ComputedStyleConstants_h |
| 28 | 28 |
| 29 #include <cstddef> | 29 #include <cstddef> |
| 30 | 30 |
| 31 namespace blink { | 31 namespace blink { |
| 32 | 32 |
| 33 // TODO(sashab): Change these enums to enum classes with an unsigned underlying | |
| 34 // type. Enum classes provide better type safety, and forcing an unsigned | |
| 35 // underlying type prevents msvc from interpreting enums as negative numbers. | |
| 36 // See: crbug.com/628043 | |
| 37 | |
| 33 // Sides used when drawing borders and outlines. The values should run clockwise from top. | 38 // Sides used when drawing borders and outlines. The values should run clockwise from top. |
| 34 enum BoxSide { | 39 enum BoxSide { |
| 35 BSTop, | 40 BSTop, |
| 36 BSRight, | 41 BSRight, |
| 37 BSBottom, | 42 BSBottom, |
| 38 BSLeft | 43 BSLeft |
| 39 }; | 44 }; |
| 40 | 45 |
| 41 enum StyleRecalcChange { | 46 enum StyleRecalcChange { |
| 42 NoChange, | 47 NoChange, |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 379 enum EEmptyCells { | 384 enum EEmptyCells { |
| 380 EmptyCellsShow, EmptyCellsHide | 385 EmptyCellsShow, EmptyCellsHide |
| 381 }; | 386 }; |
| 382 | 387 |
| 383 enum ECaptionSide { | 388 enum ECaptionSide { |
| 384 CaptionSideTop, CaptionSideBottom, CaptionSideLeft, CaptionSideRight | 389 CaptionSideTop, CaptionSideBottom, CaptionSideLeft, CaptionSideRight |
| 385 }; | 390 }; |
| 386 | 391 |
| 387 enum EListStylePosition { ListStylePositionOutside, ListStylePositionInside }; | 392 enum EListStylePosition { ListStylePositionOutside, ListStylePositionInside }; |
| 388 | 393 |
| 389 enum EVisibility { VISIBLE, HIDDEN, COLLAPSE }; | 394 enum class EVisibility : unsigned { Visible, Hidden, Collapse }; |
|
esprehn
2016/08/02 02:37:44
Do the static_asserts for size fail if you leave o
sashab
2016/08/02 06:02:39
No, ComputedStyle does have a style check but from
| |
| 390 | 395 |
| 391 enum ECursor { | 396 enum ECursor { |
| 392 // The following must match the order in CSSValueKeywords.in. | 397 // The following must match the order in CSSValueKeywords.in. |
| 393 CURSOR_AUTO, | 398 CURSOR_AUTO, |
| 394 CURSOR_CROSS, | 399 CURSOR_CROSS, |
| 395 CURSOR_DEFAULT, | 400 CURSOR_DEFAULT, |
| 396 CURSOR_POINTER, | 401 CURSOR_POINTER, |
| 397 CURSOR_MOVE, | 402 CURSOR_MOVE, |
| 398 CURSOR_VERTICAL_TEXT, | 403 CURSOR_VERTICAL_TEXT, |
| 399 CURSOR_CELL, | 404 CURSOR_CELL, |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 613 | 618 |
| 614 enum AutoRepeatType { | 619 enum AutoRepeatType { |
| 615 NoAutoRepeat, | 620 NoAutoRepeat, |
| 616 AutoFill, | 621 AutoFill, |
| 617 AutoFit | 622 AutoFit |
| 618 }; | 623 }; |
| 619 | 624 |
| 620 } // namespace blink | 625 } // namespace blink |
| 621 | 626 |
| 622 #endif // ComputedStyleConstants_h | 627 #endif // ComputedStyleConstants_h |
| OLD | NEW |