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

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 #2 (rebased) 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
« no previous file with comments | « Source/core/css/CSSParser.h ('k') | Source/core/css/CSSPrimitiveValueMappings.h » ('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 dd8f4b221df1a9a9cd446d453fa9cb52dd61ff79..a63d5b7043425d4dfc131493b100dad8254f18ad 100644
--- a/Source/core/css/CSSParser-in.cpp
+++ b/Source/core/css/CSSParser-in.cpp
@@ -2181,11 +2181,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)
@@ -9132,7 +9132,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 ] ]".
@@ -9145,13 +9144,12 @@ 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:
+ return false;
}
- return false;
}
-#endif // CSS3_TEXT
bool CSSParser::parseTextEmphasisStyle(bool important)
{
« no previous file with comments | « Source/core/css/CSSParser.h ('k') | Source/core/css/CSSPrimitiveValueMappings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698