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

Side by Side Diff: third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.h

Issue 1192983003: CSS Custom Properties (Variables) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Post-merge Created 5 years, 2 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 CSSVariableResolver_h
6 #define CSSVariableResolver_h
7
8 #include "core/CSSPropertyNames.h"
9 #include "core/css/parser/CSSParserToken.h"
10 #include "wtf/HashSet.h"
11 #include "wtf/text/AtomicString.h"
12 #include "wtf/text/AtomicStringHash.h"
13
14 namespace blink {
15
16 class CSSPrimitiveValue;
17 class StyleResolverState;
18 class StyleVariableData;
19
20 // TODO(leviw): Refactor to not just use static methods, and instead have privat e members.
Timothy Loh 2015/09/30 02:09:28 What's wrong with static methods?
21 class CSSVariableResolver {
22 public:
23 static void resolveVariableDefinitions(StyleResolverState&);
24 static void resolveAndApplyVariableReferences(StyleResolverState&, CSSProper tyID, const CSSPrimitiveValue&);
25
26 private:
27 CSSVariableResolver(StyleVariableData*);
28 CSSVariableResolver(StyleVariableData*, AtomicString& variable);
29
30 unsigned resolveVariableTokensRecursive(Vector<CSSParserToken>&, unsigned st artOffset);
31 void resolveVariableReferencesFromTokens(Vector<CSSParserToken>& tokens);
32
33 StyleVariableData* m_styleVariableData;
34 HashSet<AtomicString> m_variablesSeen;
35 bool m_cycleDetected;
36 };
37
38 } // namespace blink
39
40 #endif // CSSVariableResolver
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698