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

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

Issue 20262002: [css3-text] Implement text-decoration property shorthand (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Julien's 2nd round review fixes Created 7 years, 5 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: Source/core/css/CSSParser-in.cpp
diff --git a/Source/core/css/CSSParser-in.cpp b/Source/core/css/CSSParser-in.cpp
index 71f660d76dc269ea797e5f132392deedbee6d87d..86ab94acb50bd3e5a2a1b27c3a43f5ae2fcf2168 100644
--- a/Source/core/css/CSSParser-in.cpp
+++ b/Source/core/css/CSSParser-in.cpp
@@ -2118,6 +2118,11 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
}
case CSSPropertyTextDecoration:
+ // Fall through to CSS2.1 implementation if runtime feature is disabled.
Julien - ping for review 2013/07/30 22:37:22 This comment could be improved if you explained wh
abinader 2013/07/31 21:24:03 Ack! Sounds better indeed.
+ 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
@@ -8885,7 +8890,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;
}

Powered by Google App Engine
This is Rietveld 408576698