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

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

Issue 14706011: Revert 150468 "Switching CSS Variables over to RuntimeEnabledFea..." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: 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 | « trunk/Source/core/css/CSSParser.h ('k') | trunk/Source/core/css/CSSParserMode.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/Source/core/css/CSSParser.cpp
===================================================================
--- trunk/Source/core/css/CSSParser.cpp (revision 150485)
+++ trunk/Source/core/css/CSSParser.cpp (working copy)
@@ -245,6 +245,7 @@
, isCSSCustomFilterEnabled(false)
, isCSSStickyPositionEnabled(false)
, isCSSGridLayoutEnabled(false)
+ , isCSSVariablesEnabled(false)
, needsSiteSpecificQuirks(false)
{
}
@@ -257,6 +258,7 @@
, 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)
{
}
@@ -270,6 +272,7 @@
&& a.isCSSCustomFilterEnabled == b.isCSSCustomFilterEnabled
&& a.isCSSStickyPositionEnabled == b.isCSSStickyPositionEnabled
&& a.isCSSGridLayoutEnabled == b.isCSSGridLayoutEnabled
+ && a.isCSSVariablesEnabled == b.isCSSVariablesEnabled
&& a.needsSiteSpecificQuirks == b.needsSiteSpecificQuirks;
}
@@ -3111,6 +3114,11 @@
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.
@@ -10039,7 +10047,7 @@
m_token = MINFUNCTION;
else if (isASCIIAlphaCaselessEqual(name[10], 'x') && isEqualToCSSIdentifier(name + 1, "webkit-ma"))
m_token = MAXFUNCTION;
- else if (RuntimeEnabledFeatures::cssVariablesEnabled() && isASCIIAlphaCaselessEqual(name[10], 'r') && isEqualToCSSIdentifier(name + 1, "webkit-va"))
+ else if (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;
@@ -10474,7 +10482,7 @@
parseIdentifier(result, resultString, hasEscape);
m_token = IDENT;
- if (RuntimeEnabledFeatures::cssVariablesEnabled() && isEqualToCSSIdentifier(tokenStart<SrcCharacterType>() + 1, "webkit-var") && tokenStart<SrcCharacterType>()[11] == '-' && isIdentifierStartAfterDash(tokenStart<SrcCharacterType>() + 12))
+ if (cssVariablesEnabled() && isEqualToCSSIdentifier(tokenStart<SrcCharacterType>() + 1, "webkit-var") && tokenStart<SrcCharacterType>()[11] == '-' && isIdentifierStartAfterDash(tokenStart<SrcCharacterType>() + 12))
m_token = VAR_DEFINITION;
else if (*currentCharacter<SrcCharacterType>() == '(') {
m_token = FUNCTION;
« no previous file with comments | « trunk/Source/core/css/CSSParser.h ('k') | trunk/Source/core/css/CSSParserMode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698