| Index: third_party/WebKit/Source/core/css/CSSVariableData.cpp
|
| diff --git a/third_party/WebKit/Source/core/css/CSSVariableData.cpp b/third_party/WebKit/Source/core/css/CSSVariableData.cpp
|
| index 75134d96fb3e6a8049893a2d489e8bd525513668..30c6d9c6b15e5d66f12ebce721d242ef9169046a 100644
|
| --- a/third_party/WebKit/Source/core/css/CSSVariableData.cpp
|
| +++ b/third_party/WebKit/Source/core/css/CSSVariableData.cpp
|
| @@ -4,11 +4,22 @@
|
|
|
| #include "core/css/CSSVariableData.h"
|
|
|
| +#include "core/css/parser/CSSParser.h"
|
| #include "core/css/parser/CSSParserTokenRange.h"
|
| #include "wtf/text/StringBuilder.h"
|
|
|
| namespace blink {
|
|
|
| +const StylePropertySet* CSSVariableData::propertySet()
|
| +{
|
| + ASSERT(!m_needsVariableResolution);
|
| + if (!m_cachedPropertySet) {
|
| + m_propertySet = CSSParser::parseCustomPropertySet(m_tokens);
|
| + m_cachedPropertySet = true;
|
| + }
|
| + return m_propertySet.get();
|
| +}
|
| +
|
| template<typename CharacterType> void CSSVariableData::updateTokens(const CSSParserTokenRange& range)
|
| {
|
| const CharacterType* currentOffset = m_backingString.getCharacters<CharacterType>();
|
| @@ -55,6 +66,7 @@ void CSSVariableData::consumeAndUpdateTokens(const CSSParserTokenRange& range)
|
|
|
| CSSVariableData::CSSVariableData(const CSSParserTokenRange& range, bool needsVariableResolution)
|
| : m_needsVariableResolution(needsVariableResolution)
|
| + , m_cachedPropertySet(false)
|
| {
|
| ASSERT(!range.atEnd());
|
| consumeAndUpdateTokens(range);
|
|
|