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

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

Issue 2507383002: Changed ETextAlign to an enum class and renamed its members to keywords (Closed)
Patch Set: Created 4 years, 1 month 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 c9caa60e068f85a32688b87e5d9b4974fff8a0a9..5757c0377c8c6f9ceeeffbe8908fc7e45d2b2d9a 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -367,7 +367,7 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
static_cast<unsigned>(initialListStyleType());
m_inheritedData.m_listStylePosition =
static_cast<unsigned>(initialListStylePosition());
- m_inheritedData.m_textAlign = initialTextAlign();
+ m_inheritedData.m_textAlign = static_cast<unsigned>(initialTextAlign());
m_inheritedData.m_textTransform = initialTextTransform();
m_inheritedData.m_textUnderline = false;
m_inheritedData.m_cursorStyle = static_cast<unsigned>(initialCursor());
@@ -2218,11 +2218,13 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
}
// text-align
- static ETextAlign initialTextAlign() { return TASTART; }
+ static ETextAlign initialTextAlign() { return ETextAlign::Start; }
ETextAlign textAlign() const {
return static_cast<ETextAlign>(m_inheritedData.m_textAlign);
}
- void setTextAlign(ETextAlign v) { m_inheritedData.m_textAlign = v; }
+ void setTextAlign(ETextAlign v) {
+ m_inheritedData.m_textAlign = static_cast<unsigned>(v);
+ }
// text-align-last
static TextAlignLast initialTextAlignLast() { return TextAlignLastAuto; }
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutText.cpp ('k') | third_party/WebKit/Source/core/style/ComputedStyleConstants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698