| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/css/CSSVariableData.h" | 5 #include "core/css/CSSVariableData.h" |
| 6 | 6 |
| 7 #include "core/css/CSSSyntaxDescriptor.h" |
| 7 #include "core/css/parser/CSSParser.h" | 8 #include "core/css/parser/CSSParser.h" |
| 8 #include "core/css/parser/CSSParserTokenRange.h" | 9 #include "core/css/parser/CSSParserTokenRange.h" |
| 9 #include "wtf/text/StringBuilder.h" | 10 #include "wtf/text/StringBuilder.h" |
| 10 #include "wtf/text/StringView.h" | 11 #include "wtf/text/StringView.h" |
| 11 | 12 |
| 12 namespace blink { | 13 namespace blink { |
| 13 | 14 |
| 14 StylePropertySet* CSSVariableData::propertySet() | 15 StylePropertySet* CSSVariableData::propertySet() |
| 15 { | 16 { |
| 16 ASSERT(!m_needsVariableResolution); | 17 ASSERT(!m_needsVariableResolution); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 } | 61 } |
| 61 | 62 |
| 62 CSSVariableData::CSSVariableData(const CSSParserTokenRange& range, bool needsVar
iableResolution) | 63 CSSVariableData::CSSVariableData(const CSSParserTokenRange& range, bool needsVar
iableResolution) |
| 63 : m_needsVariableResolution(needsVariableResolution) | 64 : m_needsVariableResolution(needsVariableResolution) |
| 64 , m_cachedPropertySet(false) | 65 , m_cachedPropertySet(false) |
| 65 { | 66 { |
| 66 ASSERT(!range.atEnd()); | 67 ASSERT(!range.atEnd()); |
| 67 consumeAndUpdateTokens(range); | 68 consumeAndUpdateTokens(range); |
| 68 } | 69 } |
| 69 | 70 |
| 71 const CSSValue* CSSVariableData::parseForSyntax(const CSSSyntaxDescriptor& synta
x) const |
| 72 { |
| 73 DCHECK(!needsVariableResolution()); |
| 74 return syntax.parse(tokenRange()); |
| 75 } |
| 76 |
| 70 } // namespace blink | 77 } // namespace blink |
| OLD | NEW |