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

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

Issue 1694133002: Simplify CSS variables resolution logic [2 of 2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: split up Created 4 years, 10 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 bb740d87184c906ff91e4cc7d5c190cc88096305..790afed178a90e5391e896949072e7a4e7a74c5c 100644
--- a/third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.h
+++ b/third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.h
@@ -14,6 +14,7 @@
namespace blink {
class CSSParserTokenRange;
+class CSSVariableData;
class CSSVariableReferenceValue;
class StyleResolverState;
class StyleVariableData;
@@ -28,12 +29,15 @@ public:
private:
CSSVariableResolver(StyleVariableData*);
- CSSVariableResolver(StyleVariableData*, AtomicString& variable);
// Returns false if we encounter a reference to an invalid variable with no fallback
bool resolveFallback(CSSParserTokenRange, Vector<CSSParserToken>& result);
- bool resolveVariableTokensRecursive(CSSParserTokenRange, Vector<CSSParserToken>& result);
- bool resolveVariableReferencesFromTokens(CSSParserTokenRange tokens, Vector<CSSParserToken>& result);
+ bool resolveVariableReference(CSSParserTokenRange, Vector<CSSParserToken>& result);
+ bool resolveTokenRange(CSSParserTokenRange, Vector<CSSParserToken>& result);
+
+ // Returns null if the custom property is invalid
+ CSSVariableData* valueForCustomProperty(AtomicString name);
+ PassRefPtr<CSSVariableData> resolveCustomProperty(AtomicString name, const CSSVariableData&);
StyleVariableData* m_styleVariableData;
HashSet<AtomicString> m_variablesSeen;

Powered by Google App Engine
This is Rietveld 408576698