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

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: Remove unnecessary enum Created 5 years, 5 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/CSSTokenizer.h"
9 #include "wtf/RefCounted.h"
10 #include "wtf/text/WTFString.h"
11
12 namespace blink {
13
14 class CSSParserTokenRange;
15
16 class CSSVariableData : public RefCounted<CSSVariableData> {
17 WTF_MAKE_NONCOPYABLE(CSSVariableData);
18 WTF_MAKE_FAST_ALLOCATED(CSSVariableData);
19 public:
20 static PassRefPtr<CSSVariableData> create(const CSSParserTokenRange& range, bool needsVariableResolution = true)
21 {
22 return adoptRef(new CSSVariableData(range, needsVariableResolution));
23 }
24
25 Vector<CSSParserToken>& tokens() { return m_tokens; }
26
27 bool needsVariableResolution() const { return m_needsVariableResolution; }
28 void setNeedsVariableResolution(bool needsVariableResolution) { m_needsVaria bleResolution = needsVariableResolution; }
29
30 String string() const { return m_string; }
31 private:
32 CSSVariableData(const CSSParserTokenRange&, bool needsVariableResolution);
33
34 template<typename CharacterType> void consumeAndUpdateTokens(const CSSParser TokenRange&);
35
36 String m_string;
37 Vector<String> m_stringPool;
38 Vector<CSSParserToken> m_tokens;
39 bool m_needsVariableResolution : 1;
40 bool m_important : 1;
alancutter (OOO until 2018) 2015/07/14 06:12:57 Is m_important ever used? Shouldn't this bool be p
41 };
42
43 } // namespace blink
44
45 #endif // CSSVariableData_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698