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

Unified Diff: third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp

Issue 2845773002: Make TextDecoration an enum class. (Closed)
Patch Set: Rebase Created 3 years, 7 months 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/ComputedStyleCSSValueMapping.cpp
diff --git a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
index 1daf561861fb978098871d665ddc317d8e39a536..0b624fd6dcdafd7ffeca70bcaf6c3178fba1cbc5 100644
--- a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
+++ b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
@@ -1133,14 +1133,15 @@ static LayoutRect SizingBox(const LayoutObject* layout_object) {
: box->ComputedCSSContentBoxRect();
}
-static CSSValue* RenderTextDecorationFlagsToCSSValue(int text_decoration) {
+static CSSValue* RenderTextDecorationFlagsToCSSValue(
+ TextDecoration text_decoration) {
// Blink value is ignored.
CSSValueList* list = CSSValueList::CreateSpaceSeparated();
- if (text_decoration & kTextDecorationUnderline)
+ if (EnumHasFlags(text_decoration, TextDecoration::kUnderline))
list->Append(*CSSIdentifierValue::Create(CSSValueUnderline));
- if (text_decoration & kTextDecorationOverline)
+ if (EnumHasFlags(text_decoration, TextDecoration::kOverline))
list->Append(*CSSIdentifierValue::Create(CSSValueOverline));
- if (text_decoration & kTextDecorationLineThrough)
+ if (EnumHasFlags(text_decoration, TextDecoration::kLineThrough))
list->Append(*CSSIdentifierValue::Create(CSSValueLineThrough));
if (!list->length())

Powered by Google App Engine
This is Rietveld 408576698