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

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: Added 2 changes in mac files 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 0778caa67470408c0df6021301a70ee6808cf03e..0bc8db0e4acedcd1419c9a5e90f2c54baecfaa61 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -360,7 +360,7 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
m_inheritedData.m_textAlign = static_cast<unsigned>(initialTextAlign());
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_whiteSpace = static_cast<unsigned>(initialWhiteSpace());
m_inheritedData.m_rtlOrdering = static_cast<unsigned>(initialRTLOrdering());
m_inheritedData.m_boxDirection =
@@ -2070,11 +2070,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; }
@@ -3418,7 +3420,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 {

Powered by Google App Engine
This is Rietveld 408576698