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

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

Issue 2878853002: Make CSSVariableResolver's interface object based instead of static functions (Closed)
Patch Set: rebased Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.h
diff --git a/third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.h b/third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.h
index fe5baa0205196c778417ff90776ca5613ed38f5a..dbb8a821b4ad55e9ab8b9e77311b7046b72848a8 100644
--- a/third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.h
+++ b/third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.h
@@ -26,30 +26,25 @@ class CSSVariableResolver {
STACK_ALLOCATED();
public:
- static void ResolveVariableDefinitions(const StyleResolverState&);
+ CSSVariableResolver(const StyleResolverState&);
+
+ void ResolveVariableDefinitions();
// Shorthand properties are not supported.
- static const CSSValue* ResolveVariableReferences(
- const StyleResolverState&,
- CSSPropertyID,
- const CSSValue&,
- bool disallow_animation_tainted);
+ const CSSValue* ResolveVariableReferences(CSSPropertyID,
+ const CSSValue&,
+ bool disallow_animation_tainted);
- static void ComputeRegisteredVariables(const StyleResolverState&);
+ void ComputeRegisteredVariables();
private:
- CSSVariableResolver(const StyleResolverState&);
-
- static const CSSValue* ResolvePendingSubstitutions(
- const StyleResolverState&,
+ const CSSValue* ResolvePendingSubstitutions(
CSSPropertyID,
const CSSPendingSubstitutionValue&,
bool disallow_animation_tainted);
- static const CSSValue* ResolveVariableReferences(
- const StyleResolverState&,
- CSSPropertyID,
- const CSSVariableReferenceValue&,
- bool disallow_animation_tainted);
+ const CSSValue* ResolveVariableReferences(CSSPropertyID,
+ const CSSVariableReferenceValue&,
+ bool disallow_animation_tainted);
// These return false if we encounter a reference to an invalid variable with
// no fallback.
@@ -87,6 +82,7 @@ class CSSVariableResolver {
PassRefPtr<CSSVariableData> ResolveCustomProperty(AtomicString name,
const CSSVariableData&);
+ const StyleResolverState& state_;
StyleInheritedVariables* inherited_variables_;
StyleNonInheritedVariables* non_inherited_variables_;
Member<const PropertyRegistry> registry_;

Powered by Google App Engine
This is Rietveld 408576698