summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/core/css/computed_style_css_value_mapping.cc
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-12-10 16:19:40 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-12-10 16:01:50 +0000
commit51f6c2793adab2d864b3d2b360000ef8db1d3e92 (patch)
tree835b3b4446b012c75e80177cef9fbe6972cc7dbe /chromium/third_party/blink/renderer/core/css/computed_style_css_value_mapping.cc
parent6036726eb981b6c4b42047513b9d3f4ac865daac (diff)
downloadqtwebengine-chromium-51f6c2793adab2d864b3d2b360000ef8db1d3e92.tar.gz
BASELINE: Update Chromium to 71.0.3578.93
Change-Id: I6a32086c33670e1b033f8b10e6bf1fd4da1d105d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/third_party/blink/renderer/core/css/computed_style_css_value_mapping.cc')
-rw-r--r--chromium/third_party/blink/renderer/core/css/computed_style_css_value_mapping.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/chromium/third_party/blink/renderer/core/css/computed_style_css_value_mapping.cc b/chromium/third_party/blink/renderer/core/css/computed_style_css_value_mapping.cc
index a4908281581..4df98db90f6 100644
--- a/chromium/third_party/blink/renderer/core/css/computed_style_css_value_mapping.cc
+++ b/chromium/third_party/blink/renderer/core/css/computed_style_css_value_mapping.cc
@@ -84,6 +84,22 @@ ComputedStyleCSSValueMapping::GetVariables(const ComputedStyle& style,
}
}
+ // Registered properties with initial values are not stored explicitly on
+ // each computed style. Their initialness is instead indicated by the
+ // absence of that property on the computed style. This means that registered
+ // properties with an implicit initial value will not appear in the result of
+ // Style[Non]InheritedVariables::GetCustomPropertyNames, so we need to
+ // iterate though all registrations and add the initial values, if necessary.
+ if (registry) {
+ for (const auto& entry : *registry) {
+ if (variables.Contains(entry.key))
+ continue;
+ const CSSValue* initial = entry.value->Initial();
+ if (initial)
+ variables.Set(entry.key, initial);
+ }
+ }
+
return variables;
}