LibWeb: Make element_reference optional in create_resolved_style

This commit is contained in:
Callum Law 2025-06-09 14:08:05 +12:00 committed by Tim Ledbetter
parent 610ad25555
commit fc46abb83f
Notes: github-actions[bot] 2025-06-09 11:29:50 +00:00
5 changed files with 7 additions and 8 deletions

View file

@ -4741,7 +4741,7 @@ Optional<NonnullRefPtr<CSS::CSSStyleValue const>> resolved_value(GC::Ref<DOM::No
return {};
// Retrieve resolved style value
auto resolved_css_style_declaration = CSS::CSSStyleProperties::create_resolved_style({ static_cast<DOM::Element&>(*element) });
auto resolved_css_style_declaration = CSS::CSSStyleProperties::create_resolved_style(element->realm(), DOM::ElementReference { static_cast<DOM::Element&>(*element) });
auto optional_style_property = resolved_css_style_declaration->property(property_id);
if (!optional_style_property.has_value())
return {};