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

Unified Diff: third_party/WebKit/Source/core/style/ComputedStyle.h

Issue 2555923002: Changed TextDirection to an enum class and renamed its members (Closed)
Patch Set: Rebase after reopen 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
Index: third_party/WebKit/Source/core/style/ComputedStyle.h
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.h b/third_party/WebKit/Source/core/style/ComputedStyle.h
index a6e7ba13336787390864d67709d314c425abf2be..0d8eb5464937885905560ff48f14235fbfdbfa2e 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -317,7 +317,7 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
static_cast<unsigned>(initialListStyleType());
m_inheritedData.m_hasSimpleUnderline = false;
m_inheritedData.m_cursorStyle = static_cast<unsigned>(initialCursor());
- m_inheritedData.m_direction = initialDirection();
+ m_inheritedData.m_direction = static_cast<unsigned>(initialDirection());
m_inheritedData.m_rtlOrdering = static_cast<unsigned>(initialRTLOrdering());
m_inheritedData.m_insideLink = NotInsideLink;
m_inheritedData.m_writingMode = initialWritingMode();
@@ -2023,11 +2023,13 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
}
// direction
- static TextDirection initialDirection() { return LTR; }
+ static TextDirection initialDirection() { return TextDirection::Ltr; }
TextDirection direction() const {
return static_cast<TextDirection>(m_inheritedData.m_direction);
}
- void setDirection(TextDirection v) { m_inheritedData.m_direction = v; }
+ void setDirection(TextDirection v) {
+ m_inheritedData.m_direction = static_cast<unsigned>(v);
+ }
// color
static Color initialColor() { return Color::black; }
@@ -3312,7 +3314,9 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
}
// Direction utility functions.
- bool isLeftToRightDirection() const { return direction() == LTR; }
+ bool isLeftToRightDirection() const {
+ return direction() == TextDirection::Ltr;
+ }
// Perspective utility functions.
bool hasPerspective() const {
« no previous file with comments | « third_party/WebKit/Source/core/paint/ThemePainterMac.mm ('k') | third_party/WebKit/Source/core/testing/Internals.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698