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 971b96a413a66645468e42fcbca489bdcf1caca1..c26d07a70a309c4e1f6a9afc98d6415306062957 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,18 @@ 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 (const PropertyRegistry::Registration* registration = registry->registration(customPropertyName)) { |
+ if (variables) { |
+ const CSSValue* result = variables->registeredInheritedProperty(customPropertyName); |
+ if (result) |
+ return result; |
+ } |
+ return registration->initial(); |
+ } |
+ |
if (!variables) |
return nullptr; |