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

Unified Diff: third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp

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/css/resolver/StyleBuilderCustom.cpp
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp b/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
index 5aac5401ae8a793861212943a5b3cfd370c10f9c..a32acd73177428e1ecc8af92d6a37da71502e5db 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
@@ -509,14 +509,17 @@ void StyleBuilderFunctions::applyValueCSSPropertyTextAlign(
state.style()->setTextAlign(state.parentStyle()->textAlign());
else
state.style()->setTextAlign(identValue.convertTo<ETextAlign>());
- } else if (state.parentStyle()->textAlign() == TASTART)
- state.style()->setTextAlign(
- state.parentStyle()->isLeftToRightDirection() ? LEFT : RIGHT);
- else if (state.parentStyle()->textAlign() == TAEND)
- state.style()->setTextAlign(
- state.parentStyle()->isLeftToRightDirection() ? RIGHT : LEFT);
- else
+ } else if (state.parentStyle()->textAlign() == ETextAlign::Start) {
+ state.style()->setTextAlign(state.parentStyle()->isLeftToRightDirection()
+ ? ETextAlign::Left
+ : ETextAlign::Right);
+ } else if (state.parentStyle()->textAlign() == ETextAlign::End) {
+ state.style()->setTextAlign(state.parentStyle()->isLeftToRightDirection()
+ ? ETextAlign::Right
+ : ETextAlign::Left);
+ } else {
state.style()->setTextAlign(state.parentStyle()->textAlign());
+ }
}
void StyleBuilderFunctions::applyInheritCSSPropertyTextIndent(

Powered by Google App Engine
This is Rietveld 408576698