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

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

Issue 2394273006: Add CSS support for text-decoration-skip (Closed)
Patch Set: Histograms typo fixed, DCHECK Created 4 years, 2 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 fec10203173ff8cebf0275591c6d2c04a838e830..b80fcb869d8d85f524fc2adb4951684aea6834b0 100644
--- a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
+++ b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
@@ -1121,6 +1121,18 @@ static CSSValue* valueForTextDecorationStyle(
return CSSInitialValue::create();
}
+static CSSValue* valueForTextDecorationSkip(
+ TextDecorationSkip textDecorationSkip) {
+ CSSValueList* list = CSSValueList::createSpaceSeparated();
+ if (textDecorationSkip & TextDecorationSkipObjects)
+ list->append(*CSSIdentifierValue::create(CSSValueObjects));
+ if (textDecorationSkip & TextDecorationSkipInk)
+ list->append(*CSSIdentifierValue::create(CSSValueInk));
+
+ DCHECK(list->length());
+ return list;
+}
+
static CSSValue* touchActionFlagsToCSSValue(TouchAction touchAction) {
CSSValueList* list = CSSValueList::createSpaceSeparated();
if (touchAction == TouchActionAuto) {
@@ -2674,6 +2686,8 @@ const CSSValue* ComputedStyleCSSValueMapping::get(
// Fall through.
case CSSPropertyTextDecorationLine:
return renderTextDecorationFlagsToCSSValue(style.getTextDecoration());
+ case CSSPropertyTextDecorationSkip:
+ return valueForTextDecorationSkip(style.getTextDecorationSkip());
case CSSPropertyTextDecorationStyle:
return valueForTextDecorationStyle(style.getTextDecorationStyle());
case CSSPropertyTextDecorationColor:

Powered by Google App Engine
This is Rietveld 408576698