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 19f3072b0fe9baa230a89d1f91bdd70e69daf7f3..23d3b172a14fb8cf40de6a0d323e4f1704f79f85 100644 |
--- a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp |
+++ b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp |
@@ -53,6 +53,7 @@ |
#include "core/css/CSSURIValue.h" |
#include "core/css/CSSValueList.h" |
#include "core/css/CSSValuePair.h" |
+#include "core/css/PropertyRegistry.h" |
#include "core/layout/LayoutBlock.h" |
#include "core/layout/LayoutBox.h" |
#include "core/layout/LayoutGrid.h" |
@@ -1633,9 +1634,21 @@ static EBreak mapToColumnBreakValue(EBreak genericBreakValue) |
} |
} |
-const CSSValue* ComputedStyleCSSValueMapping::get(const AtomicString customPropertyName, const ComputedStyle& style) |
+const CSSValue* ComputedStyleCSSValueMapping::get(const AtomicString customPropertyName, const ComputedStyle& style, const PropertyRegistry* registry) |
{ |
StyleVariableData* variables = style.variables(); |
+ if (registry) { |
+ const PropertyRegistry::Registration* registration = registry->registration(customPropertyName); |
+ if (registration) { |
+ if (variables) { |
+ const CSSValue* result = variables->registeredInheritedProperty(customPropertyName); |
+ if (result) |
+ return result; |
+ } |
+ return registration->initial(); |
+ } |
+ } |
+ |
if (!variables) |
return nullptr; |