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

Unified Diff: third_party/WebKit/Source/platform/text/WritingMode.h

Issue 2591373003: Changed WritingMode to an enum class and renamed its members (Closed)
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/geometry/LayoutRectOutsetsTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/text/WritingMode.h
diff --git a/third_party/WebKit/Source/platform/text/WritingMode.h b/third_party/WebKit/Source/platform/text/WritingMode.h
index e59527d50d53e7a7523ba98016b5004443469481..48f38287e54b7d00e5f3eb7f7e173d00be32db64 100644
--- a/third_party/WebKit/Source/platform/text/WritingMode.h
+++ b/third_party/WebKit/Source/platform/text/WritingMode.h
@@ -33,26 +33,22 @@
namespace blink {
-enum WritingMode {
- TopToBottomWritingMode,
- RightToLeftWritingMode,
- LeftToRightWritingMode
-};
+enum class WritingMode : unsigned { HorizontalTb, VerticalRl, VerticalLr };
aazzam 2016/12/22 02:18:23 It might be worth putting a comment here explainin
// Lines have horizontal orientation; modes horizontal-tb.
inline bool isHorizontalWritingMode(WritingMode writingMode) {
- return writingMode == TopToBottomWritingMode;
+ return writingMode == WritingMode::HorizontalTb;
}
// Bottom of the line occurs earlier in the block; modes vertical-lr.
inline bool isFlippedLinesWritingMode(WritingMode writingMode) {
- return writingMode == LeftToRightWritingMode;
+ return writingMode == WritingMode::VerticalLr;
}
// Block progression increases in the opposite direction to normal; modes
// vertical-rl.
inline bool isFlippedBlocksWritingMode(WritingMode writingMode) {
- return writingMode == RightToLeftWritingMode;
+ return writingMode == WritingMode::VerticalRl;
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/platform/geometry/LayoutRectOutsetsTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698