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

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

Issue 1498713002: Store custom property backing strings in resolved CSSVariableData objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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.cpp
diff --git a/third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.cpp b/third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.cpp
index f3ac5dd5a79dc716ebaf7f5dd62345550d36dfac..a522dcc5fb07d0d812f1cade7946bf343588228f 100644
--- a/third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/CSSVariableResolver.cpp
@@ -61,7 +61,7 @@ void CSSVariableResolver::resolveVariableTokensRecursive(CSSParserTokenRange ran
// relies on. Ensure it will live beyond us overwriting the RefPtr in StyleVariableData.
ASSERT(variableData->refCount() > 1);
- m_styleVariableData->setVariable(variableName, CSSVariableData::createResolved(tokens));
+ m_styleVariableData->setVariable(variableName, CSSVariableData::createResolved(tokens, variableData));
if (!context.cycleStartPoints.isEmpty()) {
if (context.cycleStartPoints.contains(variableName))
context.cycleStartPoints.remove(variableName);
@@ -143,7 +143,7 @@ void CSSVariableResolver::resolveVariableDefinitions(StyleVariableData* variable
ResolutionState context;
resolver.resolveVariableReferencesFromTokens(variable.value->tokens(), resolvedTokens, context);
- variable.value = CSSVariableData::createResolved(resolvedTokens);
+ variable.value = CSSVariableData::createResolved(resolvedTokens, variable.value);
}
}

Powered by Google App Engine
This is Rietveld 408576698