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 1c0ff85aee8f97a36381be5d1437a1b91bb77953..7a2f5486be031b2c5a5c377398182889b920dd08 100644 |
--- a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp |
+++ b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp |
@@ -1948,26 +1948,17 @@ const CSSValue* ComputedStyleCSSValueMapping::get( |
const PropertyRegistry::Registration* registration = |
registry->registration(customPropertyName); |
if (registration) { |
- const CSSValue* result = nullptr; |
- if (registration->inherits()) { |
- if (StyleInheritedVariables* variables = style.inheritedVariables()) |
- result = variables->registeredVariable(customPropertyName); |
- } else { |
- if (StyleNonInheritedVariables* variables = |
- style.nonInheritedVariables()) |
- result = variables->registeredVariable(customPropertyName); |
- } |
+ const CSSValue* result = style.getRegisteredVariable( |
+ customPropertyName, registration->inherits()); |
if (result) |
return result; |
return registration->initial(); |
} |
} |
- StyleInheritedVariables* variables = style.inheritedVariables(); |
- if (!variables) |
- return nullptr; |
- |
- CSSVariableData* data = variables->getVariable(customPropertyName); |
+ bool isInheritedProperty = true; |
+ CSSVariableData* data = |
+ style.getVariable(customPropertyName, isInheritedProperty); |
if (!data) |
return nullptr; |