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

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: OK, so trybots are not fond of binary files - removing Mac expectation for repaint-text-decoration-… 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 34dd18efbdea92296545d9998f2df73fd9c40c57..0895dd7bcfc1d14a0225a75a043f524e6766a2df 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.
+ 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
@@ -8813,7 +8818,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())) {
Julien - ping for review 2013/07/27 01:46:35 Is it totally right to allow an empty list of keyw
abinader 2013/07/28 04:21:52 If I understood your question correctly, you are q
Julien - ping for review 2013/07/29 18:53:11 Ah, that's not really what I meant (sorry for bein
abinader 2013/07/29 21:15:32 Ah, I see your point now :) no, this function is n
addTextDecorationProperty(propId, list.release(), important);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698