Chromium Code Reviews| 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..5b3292d347fe214a74d3cfa6aabb875d0a0aaf84 100644 |
| --- a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp |
| +++ b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp |
| @@ -1121,6 +1121,19 @@ 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)); |
| + |
| + if (!list->length()) |
| + return CSSIdentifierValue::create(CSSValueObjects); |
|
Timothy Loh
2016/10/11 00:00:33
Maybe better to DCHECK(list->length()) for now ins
drott
2016/10/11 07:15:27
Done.
|
| + return list; |
| +} |
| + |
| static CSSValue* touchActionFlagsToCSSValue(TouchAction touchAction) { |
| CSSValueList* list = CSSValueList::createSpaceSeparated(); |
| if (touchAction == TouchActionAuto) { |
| @@ -2674,6 +2687,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: |