Index: third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp |
diff --git a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp |
index 4f41f9a1f3e5d2d0e5374cee545bd78942b6560b..ef53f27a56d352cc1dcfff3777105ba4edc59bd8 100644 |
--- a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp |
+++ b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp |
@@ -1357,13 +1357,25 @@ static PassRefPtrWillBeRawPtr<CSSValue> valueForScrollSnapCoordinate(const Vecto |
PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(const AtomicString customPropertyName, const ComputedStyle& style) |
{ |
- CSSVariableData* data = style.variables()->getVariable(customPropertyName); |
+ StyleVariableData* variables = style.variables(); |
+ if (!variables) |
+ return nullptr; |
+ |
+ CSSVariableData* data = variables->getVariable(customPropertyName); |
if (!data) |
return nullptr; |
return CSSCustomPropertyDeclaration::create(customPropertyName, data); |
} |
+const HashMap<AtomicString, RefPtr<CSSVariableData>>* ComputedStyleCSSValueMapping::getVariables(const ComputedStyle& style) |
+{ |
+ StyleVariableData* variables = style.variables(); |
+ if (variables) |
+ return variables->getVariables(); |
+ return nullptr; |
+} |
+ |
PassRefPtrWillBeRawPtr<CSSValue> ComputedStyleCSSValueMapping::get(CSSPropertyID propertyID, const ComputedStyle& style, const LayoutObject* layoutObject, Node* styledNode, bool allowVisitedStyle) |
{ |
const SVGComputedStyle& svgStyle = style.svgStyle(); |