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

Side by Side Diff: third_party/WebKit/Source/core/style/ComputedStyleConstants.h

Issue 2181953004: Changed ComputedStyle's EVisibility to be an enum class and fixed naming (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_move_computedstyle_around
Patch Set: Rebase Created 4 years, 4 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
OLDNEW
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
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
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 // TODO(sashab): Add a static_assert when this is used in bitfields to ensure it
395 // uses unsigned as the underlying type.
396 enum class EVisibility : unsigned { Visible, Hidden, Collapse };
tkent 2016/08/10 01:11:33 Can you drop 'E' prefix from enum type names in yo
sashab 2016/08/10 01:14:51 Sure, so just to clarify: enum class Visibility :
tkent 2016/08/10 01:18:43 Exactly!
390 397
391 enum ECursor { 398 enum ECursor {
392 // The following must match the order in CSSValueKeywords.in. 399 // The following must match the order in CSSValueKeywords.in.
393 CURSOR_AUTO, 400 CURSOR_AUTO,
394 CURSOR_CROSS, 401 CURSOR_CROSS,
395 CURSOR_DEFAULT, 402 CURSOR_DEFAULT,
396 CURSOR_POINTER, 403 CURSOR_POINTER,
397 CURSOR_MOVE, 404 CURSOR_MOVE,
398 CURSOR_VERTICAL_TEXT, 405 CURSOR_VERTICAL_TEXT,
399 CURSOR_CELL, 406 CURSOR_CELL,
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 620
614 enum AutoRepeatType { 621 enum AutoRepeatType {
615 NoAutoRepeat, 622 NoAutoRepeat,
616 AutoFill, 623 AutoFill,
617 AutoFit 624 AutoFit
618 }; 625 };
619 626
620 } // namespace blink 627 } // namespace blink
621 628
622 #endif // ComputedStyleConstants_h 629 #endif // ComputedStyleConstants_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.cpp ('k') | third_party/WebKit/Source/core/svg/SVGUseElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698