Index: Source/core/css/CSSParser-in.cpp |
diff --git a/Source/core/css/CSSParser-in.cpp b/Source/core/css/CSSParser-in.cpp |
index 048699a5869b59d72a67db754faa483aba12ed32..edbc75075ee64421e897194648fb9f368b0c3791 100644 |
--- a/Source/core/css/CSSParser-in.cpp |
+++ b/Source/core/css/CSSParser-in.cpp |
@@ -2114,6 +2114,12 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important) |
} |
case CSSPropertyTextDecoration: |
+ // Fall through 'text-decoration-line' parsing if CSS 3 Text Decoration |
+ // is disabled to match CSS 2.1 rules for parsing 'text-decoration'. |
+ if (RuntimeEnabledFeatures::css3TextDecorationsEnabled()) { |
+ // [ <text-decoration-line> || <text-decoration-style> || <text-decoration-color> ] | inherit |
+ return parseShorthand(CSSPropertyTextDecoration, textDecorationShorthand(), important); |
+ } |
case CSSPropertyWebkitTextDecorationsInEffect: |
case CSSPropertyTextDecorationLine: |
// none | [ underline || overline || line-through || blink ] | inherit |
@@ -9029,7 +9035,8 @@ bool CSSParser::parseTextDecoration(CSSPropertyID propId, bool important) |
value = m_valueList->next(); |
} |
- if (list->length() && isValid) { |
+ // Values are either valid or in shorthand scope. |
+ if (list->length() && (isValid || inShorthand())) { |
addTextDecorationProperty(propId, list.release(), important); |
return true; |
} |