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

Unified Diff: Source/core/css/CSSParser-in.cpp

Issue 22414006: Revert "Revert "[css3-text] Implement text-decoration property shorthand"" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added missing skipped test to TestExpectations Created 7 years, 4 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
« no previous file with comments | « Source/core/css/CSSComputedStyleDeclaration.cpp ('k') | Source/core/css/CSSShorthands.in » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSParser-in.cpp
diff --git a/Source/core/css/CSSParser-in.cpp b/Source/core/css/CSSParser-in.cpp
index a25c6de9a71087df3afaf4d2f7f287334f9d2339..4ff8f2b5bd3f9e254626ee20656f7325da7d4362 100644
--- a/Source/core/css/CSSParser-in.cpp
+++ b/Source/core/css/CSSParser-in.cpp
@@ -2113,6 +2113,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
@@ -9013,7 +9019,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;
}
« no previous file with comments | « Source/core/css/CSSComputedStyleDeclaration.cpp ('k') | Source/core/css/CSSShorthands.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698