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 827e58b58954e306467a324ed87013581aaeaf2e..737666817f4ed6fc50e866eb595cea7b2cd9adb0 100644 |
--- a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp |
+++ b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp |
@@ -1356,13 +1356,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(); |