| Index: Source/core/css/parser/CSSParserValues.h
|
| diff --git a/Source/core/css/parser/CSSParserValues.h b/Source/core/css/parser/CSSParserValues.h
|
| index a08b4c3fd6d60a09548e7eb117d4e94e0fa41fbb..9fcc59f7994791a16c3b5c3173a0f28976b27471 100644
|
| --- a/Source/core/css/parser/CSSParserValues.h
|
| +++ b/Source/core/css/parser/CSSParserValues.h
|
| @@ -32,6 +32,7 @@ namespace blink {
|
|
|
| class QualifiedName;
|
| class CSSParserTokenRange;
|
| +class CSSTokenizerScope;
|
|
|
| struct CSSParserString {
|
| void init(const LChar* characters, unsigned length)
|
| @@ -98,6 +99,8 @@ struct CSSParserString {
|
| operator String() const { return is8Bit() ? String(m_data.characters8, m_length) : StringImpl::create8BitIfPossible(m_data.characters16, m_length); }
|
| operator AtomicString() const { return is8Bit() ? AtomicString(m_data.characters8, m_length) : AtomicString(m_data.characters16, m_length); }
|
|
|
| + bool isFunction() const { return length() > 0 && (*this)[length() - 1] == '('; }
|
| +
|
| union {
|
| const LChar* characters8;
|
| const UChar* characters16;
|
| @@ -123,6 +126,7 @@ struct CSSParserValue {
|
| UChar32 start;
|
| UChar32 end;
|
| } m_unicodeRange;
|
| + CSSVariableData* variableData;
|
| };
|
| enum {
|
| Operator = 0x100000,
|
| @@ -134,6 +138,8 @@ struct CSSParserValue {
|
| DimensionList = 0x100006,
|
| // Represents a unicode range by a pair of UChar32 values
|
| UnicodeRange = 0x100007,
|
| + // Reperesents a copy of part of a CSSTokenizerScope for defining and resolving variables
|
| + VariableValue = 0x100008,
|
| };
|
| int unit;
|
|
|
| @@ -150,7 +156,7 @@ public:
|
| : m_current(0)
|
| {
|
| }
|
| - CSSParserValueList(CSSParserTokenRange, bool& usesRemUnits);
|
| + CSSParserValueList(CSSParserTokenRange, bool& usesRemUnits, bool& usesVariables);
|
| ~CSSParserValueList();
|
|
|
| void addValue(const CSSParserValue&);
|
| @@ -177,8 +183,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;
|
| };
|
| @@ -278,6 +286,6 @@ inline void CSSParserValue::setFromValueList(PassOwnPtr<CSSParserValueList> valu
|
| isInt = false;
|
| }
|
|
|
| -}
|
| +};
|
|
|
| #endif
|
|
|