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

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

Issue 40733004: Replace compile flag with runtime check for text-underline-position (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Julien's review Created 7 years, 1 month 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 eff251b89e7a338c7acfdb81740ff6d422e87dcf..8f41b6fc7705086d40c548470aa71b6d81b54d85 100644
--- a/Source/core/css/CSSParser-in.cpp
+++ b/Source/core/css/CSSParser-in.cpp
@@ -2182,11 +2182,11 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
validPrimitive = true;
break;
-#if ENABLE(CSS3_TEXT)
- case CSSPropertyWebkitTextUnderlinePosition:
+ case CSSPropertyTextUnderlinePosition:
// auto | alphabetic | under
- return parseTextUnderlinePosition(important);
-#endif // CSS3_TEXT
+ if (RuntimeEnabledFeatures::css3TextDecorationsEnabled())
+ return parseTextUnderlinePosition(important);
+ return false;
case CSSPropertyZoom: // normal | reset | document | <number> | <percentage> | inherit
if (id == CSSValueNormal || id == CSSValueReset || id == CSSValueDocument)
@@ -9137,7 +9137,6 @@ bool CSSParser::parseTextDecoration(CSSPropertyID propId, bool important)
return false;
}
-#if ENABLE(CSS3_TEXT)
bool CSSParser::parseTextUnderlinePosition(bool important)
{
// The text-underline-position property has sintax "auto | alphabetic | [ under || [ left | right ] ]".
@@ -9150,13 +9149,15 @@ bool CSSParser::parseTextUnderlinePosition(bool important)
case CSSValueUnder:
if (m_valueList->next())
return false;
-
- addProperty(CSSPropertyWebkitTextUnderlinePosition, cssValuePool().createIdentifierValue(value->id), important);
+ addProperty(CSSPropertyTextUnderlinePosition, cssValuePool().createIdentifierValue(value->id), important);
return true;
+ default:
+ ASSERT_NOT_REACHED();
Julien - ping for review 2013/11/01 17:20:56 Note that this ASSERT will trigger, so I don't thi
+ break;
}
+
return false;
}
-#endif // CSS3_TEXT
bool CSSParser::parseTextEmphasisStyle(bool important)
{

Powered by Google App Engine
This is Rietveld 408576698