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

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

Issue 15687004: Switching CSS Variables over to RuntimeEnabledFeatures (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 years, 7 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
« no previous file with comments | « Source/core/css/CSSParser.h ('k') | Source/core/css/CSSParserMode.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSParser.cpp
diff --git a/Source/core/css/CSSParser.cpp b/Source/core/css/CSSParser.cpp
index e88369dbe1cd856e65f2ca4d0023cf8cc5e6540c..3fb1a65c8ed429fe7b8c9b1969e450c2db9d1657 100644
--- a/Source/core/css/CSSParser.cpp
+++ b/Source/core/css/CSSParser.cpp
@@ -208,7 +208,6 @@ CSSParserContext::CSSParserContext(CSSParserMode mode, const KURL& baseURL)
, isCSSCustomFilterEnabled(false)
, isCSSStickyPositionEnabled(false)
, isCSSGridLayoutEnabled(false)
- , isCSSVariablesEnabled(false)
, needsSiteSpecificQuirks(false)
{
}
@@ -221,7 +220,6 @@ CSSParserContext::CSSParserContext(Document* document, const KURL& baseURL, cons
, isCSSCustomFilterEnabled(document->settings() ? document->settings()->isCSSCustomFilterEnabled() : false)
, isCSSStickyPositionEnabled(document->cssStickyPositionEnabled())
, isCSSGridLayoutEnabled(document->cssGridLayoutEnabled())
- , isCSSVariablesEnabled(document->settings() ? document->settings()->cssVariablesEnabled() : false)
, needsSiteSpecificQuirks(document->settings() ? document->settings()->needsSiteSpecificQuirks() : false)
{
}
@@ -235,7 +233,6 @@ bool operator==(const CSSParserContext& a, const CSSParserContext& b)
&& a.isCSSCustomFilterEnabled == b.isCSSCustomFilterEnabled
&& a.isCSSStickyPositionEnabled == b.isCSSStickyPositionEnabled
&& a.isCSSGridLayoutEnabled == b.isCSSGridLayoutEnabled
- && a.isCSSVariablesEnabled == b.isCSSVariablesEnabled
&& a.needsSiteSpecificQuirks == b.needsSiteSpecificQuirks;
}
@@ -3060,11 +3057,6 @@ bool CSSParser::parseFillShorthand(CSSPropertyID propId, const CSSPropertyID* pr
return true;
}
-bool CSSParser::cssVariablesEnabled() const
-{
- return m_context.isCSSVariablesEnabled;
-}
-
void CSSParser::storeVariableDeclaration(const CSSParserString& name, PassOwnPtr<CSSParserValueList> value, bool important)
{
// When CSSGrammar.y encounters an invalid declaration it passes null for the CSSParserValueList, just bail.
@@ -10000,7 +9992,7 @@ inline void CSSParser::detectDashToken(int length)
m_token = MINFUNCTION;
else if (isASCIIAlphaCaselessEqual(name[10], 'x') && isEqualToCSSIdentifier(name + 1, "webkit-ma"))
m_token = MAXFUNCTION;
- else if (cssVariablesEnabled() && isASCIIAlphaCaselessEqual(name[10], 'r') && isEqualToCSSIdentifier(name + 1, "webkit-va"))
+ else if (RuntimeEnabledFeatures::cssVariablesEnabled() && isASCIIAlphaCaselessEqual(name[10], 'r') && isEqualToCSSIdentifier(name + 1, "webkit-va"))
m_token = VARFUNCTION;
} else if (length == 12 && isEqualToCSSIdentifier(name + 1, "webkit-calc"))
m_token = CALCFUNCTION;
@@ -10445,7 +10437,7 @@ restartAfterComment:
parseIdentifier(result, resultString, hasEscape);
m_token = IDENT;
- if (cssVariablesEnabled() && detectCSSVariablesToken<SrcCharacterType>(result - tokenStart<SrcCharacterType>()))
+ if (RuntimeEnabledFeatures::cssVariablesEnabled() && detectCSSVariablesToken<SrcCharacterType>(result - tokenStart<SrcCharacterType>()))
m_token = VAR_DEFINITION;
else if (*currentCharacter<SrcCharacterType>() == '(') {
m_token = FUNCTION;
« no previous file with comments | « Source/core/css/CSSParser.h ('k') | Source/core/css/CSSParserMode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698