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

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

Issue 2406203004: Compute registered properties after resolving high priority properties (Closed)
Patch Set: font size cycle test Created 4 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
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 "wtf/HashSet.h" 10 #include "wtf/HashSet.h"
(...skipping 17 matching lines...) Expand all
28 public: 28 public:
29 static void resolveVariableDefinitions(const StyleResolverState&); 29 static void resolveVariableDefinitions(const StyleResolverState&);
30 30
31 // Shorthand properties are not supported. 31 // Shorthand properties are not supported.
32 static const CSSValue* resolveVariableReferences( 32 static const CSSValue* resolveVariableReferences(
33 const StyleResolverState&, 33 const StyleResolverState&,
34 CSSPropertyID, 34 CSSPropertyID,
35 const CSSValue&, 35 const CSSValue&,
36 bool disallowAnimationTainted); 36 bool disallowAnimationTainted);
37 37
38 static void computeRegisteredVariables(const StyleResolverState&);
39
38 DECLARE_TRACE(); 40 DECLARE_TRACE();
39 41
40 private: 42 private:
41 CSSVariableResolver(const StyleResolverState&); 43 CSSVariableResolver(const StyleResolverState&);
42 44
43 static const CSSValue* resolvePendingSubstitutions( 45 static const CSSValue* resolvePendingSubstitutions(
44 const StyleResolverState&, 46 const StyleResolverState&,
45 CSSPropertyID, 47 CSSPropertyID,
46 const CSSPendingSubstitutionValue&, 48 const CSSPendingSubstitutionValue&,
47 bool disallowAnimationTainted); 49 bool disallowAnimationTainted);
(...skipping 27 matching lines...) Expand all
75 77
76 // These return null if the custom property is invalid. 78 // These return null if the custom property is invalid.
77 79
78 // Returns the CSSVariableData for a custom property, resolving and storing it 80 // Returns the CSSVariableData for a custom property, resolving and storing it
79 // if necessary. 81 // if necessary.
80 CSSVariableData* valueForCustomProperty(AtomicString name); 82 CSSVariableData* valueForCustomProperty(AtomicString name);
81 // Resolves the CSSVariableData from a custom property declaration. 83 // Resolves the CSSVariableData from a custom property declaration.
82 PassRefPtr<CSSVariableData> resolveCustomProperty(AtomicString name, 84 PassRefPtr<CSSVariableData> resolveCustomProperty(AtomicString name,
83 const CSSVariableData&); 85 const CSSVariableData&);
84 86
85 const StyleResolverState& m_styleResolverState;
86 StyleInheritedVariables* m_inheritedVariables; 87 StyleInheritedVariables* m_inheritedVariables;
87 StyleNonInheritedVariables* m_nonInheritedVariables; 88 StyleNonInheritedVariables* m_nonInheritedVariables;
88 Member<const PropertyRegistry> m_registry; 89 Member<const PropertyRegistry> m_registry;
89 HashSet<AtomicString> m_variablesSeen; 90 HashSet<AtomicString> m_variablesSeen;
90 // Resolution doesn't finish when a cycle is detected. Fallbacks still 91 // Resolution doesn't finish when a cycle is detected. Fallbacks still
91 // need to be tracked for additional cycles, and invalidation only 92 // need to be tracked for additional cycles, and invalidation only
92 // applies back to cycle starts. 93 // applies back to cycle starts.
93 HashSet<AtomicString> m_cycleStartPoints; 94 HashSet<AtomicString> m_cycleStartPoints;
94 }; 95 };
95 96
96 } // namespace blink 97 } // namespace blink
97 98
98 #endif // CSSVariableResolver 99 #endif // CSSVariableResolver
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698