OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CSSVariableData_h | |
6 #define CSSVariableData_h | |
7 | |
8 #include "core/css/parser/CSSParserToken.h" | |
9 #include "core/css/parser/CSSParserTokenRange.h" | |
10 #include "wtf/RefCounted.h" | |
11 #include "wtf/text/WTFString.h" | |
12 | |
13 namespace blink { | |
14 | |
15 class CSSParserTokenRange; | |
16 | |
17 class CSSVariableData : public RefCounted<CSSVariableData> { | |
18 WTF_MAKE_NONCOPYABLE(CSSVariableData); | |
19 WTF_MAKE_FAST_ALLOCATED(CSSVariableData); | |
20 public: | |
21 static PassRefPtr<CSSVariableData> create(const CSSParserTokenRange& range, bool needsVariableResolution = true) | |
22 { | |
23 return adoptRef(new CSSVariableData(range, needsVariableResolution)); | |
24 } | |
25 | |
26 Vector<CSSParserToken>& tokens() { return m_tokens; } | |
27 | |
28 bool needsVariableResolution() const { return m_needsVariableResolution; } | |
29 void setNeedsVariableResolution(bool needsVariableResolution) { m_needsVaria bleResolution = needsVariableResolution; } | |
30 | |
31 String string() const { return m_string; } | |
32 private: | |
33 CSSVariableData(const CSSParserTokenRange&, bool needsVariableResolution); | |
34 | |
35 template<typename CharacterType> void consumeAndUpdateTokens(const CSSParser TokenRange&); | |
36 | |
37 String m_string; | |
38 Vector<String> m_stringPool; | |
alancutter (OOO until 2018)
2015/08/05 08:01:43
Unused member.
| |
39 Vector<CSSParserToken> m_tokens; | |
40 bool m_needsVariableResolution; | |
41 }; | |
42 | |
43 } // namespace blink | |
44 | |
45 #endif // CSSVariableData_h | |
OLD | NEW |