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

Side by Side Diff: Source/core/css/CSSVariableData.h

Issue 1192983003: CSS Custom Properties (Variables) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Missing file :( Created 5 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698