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

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: Fixed a typo in static function compileUnderlineOffset signature / Rebase Created 7 years, 2 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 5ff95aea31b978239861ca626693c385e0310184..56462895524a6baa235b642d6a6a47535f4f786b 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 ] ]".
@@ -9151,12 +9150,14 @@ bool CSSParser::parseTextUnderlinePosition(bool important)
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;
Julien - ping for review 2013/10/31 22:54:07 Do we need this line if we implement a default cas
abinader 2013/11/01 12:16:42 Sounds redundant, indeed. I've put an ASSERT_NOT_R
}
-#endif // CSS3_TEXT
bool CSSParser::parseTextEmphasisStyle(bool important)
{

Powered by Google App Engine
This is Rietveld 408576698