LibWeb: Make getComputedStyle(e).getPropertyValue() see custom props

A lot of WPT tests rely on this mechanism to test unrelated things.
This commit is contained in:
Andreas Kling 2024-11-21 20:12:18 +01:00 committed by Andreas Kling
parent ea0e434d1d
commit 6dc61f895d
Notes: github-actions[bot] 2024-11-21 20:16:55 +00:00
6 changed files with 36 additions and 37 deletions

View file

@ -601,10 +601,10 @@ Optional<StyleProperty> ResolvedCSSStyleDeclaration::property(PropertyID propert
};
}
Optional<StyleProperty> ResolvedCSSStyleDeclaration::custom_property(FlyString const&) const
Optional<StyleProperty> ResolvedCSSStyleDeclaration::custom_property(FlyString const& name) const
{
dbgln("FIXME: ResolvedCSSStyleDeclaration::custom_property is not implemented");
return {};
const_cast<DOM::Document&>(m_element->document()).update_style();
return m_element->custom_properties(m_pseudo_element).get(name);
}
static WebIDL::ExceptionOr<void> cannot_modify_computed_property_error(JS::Realm& realm)