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

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

Issue 2809063002: WIP Support var() references in registered custom property keyframes (Closed)
Patch Set: Rebased Created 3 years, 6 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
OLDNEW
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 #ifndef CSSVariableResolver_h 5 #ifndef CSSVariableResolver_h
6 #define CSSVariableResolver_h 6 #define CSSVariableResolver_h
7 7
8 #include "core/CSSPropertyNames.h" 8 #include "core/CSSPropertyNames.h"
9 #include "core/css/parser/CSSParserToken.h" 9 #include "core/css/parser/CSSParserToken.h"
10 #include "platform/wtf/HashSet.h" 10 #include "platform/wtf/HashSet.h"
11 #include "platform/wtf/text/AtomicString.h" 11 #include "platform/wtf/text/AtomicString.h"
12 #include "platform/wtf/text/AtomicStringHash.h" 12 #include "platform/wtf/text/AtomicStringHash.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 class CSSCustomPropertyDeclaration;
16 class CSSParserTokenRange; 17 class CSSParserTokenRange;
17 class CSSPendingSubstitutionValue; 18 class CSSPendingSubstitutionValue;
18 class CSSVariableData; 19 class CSSVariableData;
19 class CSSVariableReferenceValue; 20 class CSSVariableReferenceValue;
21 class PropertyRegistration;
20 class PropertyRegistry; 22 class PropertyRegistry;
21 class StyleResolverState; 23 class StyleResolverState;
22 class StyleInheritedVariables; 24 class StyleInheritedVariables;
23 class StyleNonInheritedVariables; 25 class StyleNonInheritedVariables;
24 26
25 class CSSVariableResolver { 27 class CSSVariableResolver {
26 STACK_ALLOCATED(); 28 STACK_ALLOCATED();
27 29
28 public: 30 public:
29 CSSVariableResolver(const StyleResolverState&); 31 CSSVariableResolver(const StyleResolverState&);
30 32
33 const CSSValue* ResolveRegisteredCustomPropertyAnimationKeyframe(
34 const PropertyRegistration&,
35 const CSSCustomPropertyDeclaration& keyframe);
36
31 void ResolveVariableDefinitions(); 37 void ResolveVariableDefinitions();
32 38
33 // Shorthand properties are not supported. 39 // Shorthand properties are not supported.
34 const CSSValue* ResolveVariableReferences(CSSPropertyID, 40 const CSSValue* ResolveVariableReferences(CSSPropertyID,
35 const CSSValue&, 41 const CSSValue&,
36 bool disallow_animation_tainted); 42 bool disallow_animation_tainted);
37 43
38 void ComputeRegisteredVariables(); 44 void ComputeRegisteredVariables();
39 45
40 private: 46 private:
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 HashSet<AtomicString> variables_seen_; 95 HashSet<AtomicString> variables_seen_;
90 // Resolution doesn't finish when a cycle is detected. Fallbacks still 96 // Resolution doesn't finish when a cycle is detected. Fallbacks still
91 // need to be tracked for additional cycles, and invalidation only 97 // need to be tracked for additional cycles, and invalidation only
92 // applies back to cycle starts. 98 // applies back to cycle starts.
93 HashSet<AtomicString> cycle_start_points_; 99 HashSet<AtomicString> cycle_start_points_;
94 }; 100 };
95 101
96 } // namespace blink 102 } // namespace blink
97 103
98 #endif // CSSVariableResolver 104 #endif // CSSVariableResolver
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698