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

Unified Diff: Source/core/css/parser/CSSParserValues.h

Issue 1192983003: CSS Custom Properties (Variables) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: with missing files Created 5 years, 6 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/parser/CSSParserValues.h
diff --git a/Source/core/css/parser/CSSParserValues.h b/Source/core/css/parser/CSSParserValues.h
index 0b760f1c510c1c80821ddb17d9dfcf286d1e92d8..4504a07631224c7e69ea2ad5b9cbefbdb52b3372 100644
--- a/Source/core/css/parser/CSSParserValues.h
+++ b/Source/core/css/parser/CSSParserValues.h
@@ -48,6 +48,7 @@ struct CSSParserValue {
UChar32 start;
UChar32 end;
} m_unicodeRange;
+ CSSVariableData* variableData;
alancutter (OOO until 2018) 2015/06/26 06:56:07 We want to remove CSSParserValues eventually and o
};
enum {
Operator = 0x100000,
@@ -58,6 +59,8 @@ struct CSSParserValue {
DimensionList = 0x100006,
// Represents a unicode range by a pair of UChar32 values
UnicodeRange = 0x100007,
+ // Reperesents a copy of part of a CSSTokenizer::Scope for defining and resolving variables
+ VariableValue = 0x100008,
};
int unit;
@@ -74,7 +77,7 @@ public:
: m_current(0)
{
}
- CSSParserValueList(CSSParserTokenRange, bool& usesRemUnits);
+ CSSParserValueList(CSSParserTokenRange, bool& usesRemUnits, bool& usesVariables);
~CSSParserValueList();
void addValue(const CSSParserValue&);
@@ -101,8 +104,10 @@ public:
void clearAndLeakValues() { m_values.clear(); m_current = 0;}
void destroyAndClear();
-
private:
+ void checkForVariableReferencesOrDestroyAndClear(const CSSParserTokenRange& originalRange);
+ void consumeVariableValue(const CSSParserTokenRange&);
+
unsigned m_current;
Vector<CSSParserValue, 4> m_values;
};
@@ -202,6 +207,6 @@ inline void CSSParserValue::setFromValueList(PassOwnPtr<CSSParserValueList> valu
isInt = false;
}
-}
+};
#endif

Powered by Google App Engine
This is Rietveld 408576698