Index: third_party/WebKit/Source/core/style/ComputedStyle.cpp |
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.cpp b/third_party/WebKit/Source/core/style/ComputedStyle.cpp |
index 79b8d1e384a4e59c1d01349676b847b377f7a4a1..0995b29c336435646b430970c1923fa6c0fe446c 100644 |
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp |
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp |
@@ -1460,6 +1460,17 @@ void ComputedStyle::setVariable(const AtomicString& name, PassRefPtr<CSSVariable |
variables->setVariable(name, value); |
} |
+void ComputedStyle::setRegisteredInheritedProperty(const AtomicString& name, const CSSValue* parsedValue) |
+{ |
+ RefPtr<StyleVariableData>& variables = m_rareInheritedData.access()->variables; |
+ DCHECK(variables); |
+ if (!variables->hasOneRef()) |
+ variables = variables->copy(); |
+ DCHECK(!!parsedValue == !!variables->getVariable(name)); |
meade_UTC10
2016/09/06 04:52:07
I don't really understand what this check is for,
|
+ DCHECK(!(parsedValue && variables->getVariable(name)->needsVariableResolution())); |
meade_UTC10
2016/09/06 04:52:07
Is this one "you can clear a variable that still n
Timothy Loh
2016/09/06 08:21:17
Both dchecks are sanity checks about the relation
|
+ variables->setRegisteredInheritedProperty(name, parsedValue); |
+} |
+ |
void ComputedStyle::removeVariable(const AtomicString& name) |
{ |
RefPtr<StyleVariableData>& variables = m_rareInheritedData.access()->variables; |