diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/core/css/css_computed_style_declaration.cc')
-rw-r--r-- | chromium/third_party/blink/renderer/core/css/css_computed_style_declaration.cc | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/chromium/third_party/blink/renderer/core/css/css_computed_style_declaration.cc b/chromium/third_party/blink/renderer/core/css/css_computed_style_declaration.cc index 5af1c199552..163d827584a 100644 --- a/chromium/third_party/blink/renderer/core/css/css_computed_style_declaration.cc +++ b/chromium/third_party/blink/renderer/core/css/css_computed_style_declaration.cc @@ -29,12 +29,13 @@ #include "third_party/blink/renderer/core/css/css_primitive_value.h" #include "third_party/blink/renderer/core/css/css_primitive_value_mappings.h" #include "third_party/blink/renderer/core/css/css_property_id_templates.h" +#include "third_party/blink/renderer/core/css/css_property_names.h" #include "third_party/blink/renderer/core/css/css_selector.h" #include "third_party/blink/renderer/core/css/css_variable_data.h" #include "third_party/blink/renderer/core/css/parser/css_parser.h" +#include "third_party/blink/renderer/core/css/properties/css_property_ref.h" #include "third_party/blink/renderer/core/css/style_engine.h" #include "third_party/blink/renderer/core/css/zoom_adjusted_pixel_value.h" -#include "third_party/blink/renderer/core/css_property_names.h" #include "third_party/blink/renderer/core/dom/document.h" #include "third_party/blink/renderer/core/dom/pseudo_element.h" #include "third_party/blink/renderer/core/frame/use_counter.h" @@ -182,6 +183,8 @@ CSSValueID CssIdentifierForFontSizeKeyword(int keyword_size) { void LogUnimplementedPropertyID(const CSSProperty& property) { DEFINE_STATIC_LOCAL(HashSet<CSSPropertyID>, property_id_set, ()); + if (property.PropertyID() == CSSPropertyVariable) + return; if (!property_id_set.insert(property.PropertyID()).is_new_entry) return; @@ -304,16 +307,8 @@ const CSSValue* CSSComputedStyleDeclaration::GetPropertyCSSValue( if (!styled_node) return nullptr; - styled_node->GetDocument().UpdateStyleAndLayoutTreeForNode(styled_node); - - const ComputedStyle* style = ComputeComputedStyle(); - if (!style) - return nullptr; - // Don't use styled_node in case it was discarded or replaced in - // UpdateStyleAndLayoutTreeForNode. - return ComputedStyleCSSValueMapping::Get( - custom_property_name, *style, - StyledNode()->GetDocument().GetPropertyRegistry()); + CSSPropertyRef ref(custom_property_name, styled_node->GetDocument()); + return GetPropertyCSSValue(ref.GetProperty()); } HeapHashMap<AtomicString, Member<const CSSValue>> |