LibWeb/HTML: Return CSSStyleProperties from getComputedStyle()

Corresponds to 94fdd8ab1e
This commit is contained in:
Sam Atkins 2025-07-15 15:53:10 +01:00 committed by Jelle Raaijmakers
commit 511e282002
Notes: github-actions[bot] 2025-07-16 07:52:14 +00:00
3 changed files with 5 additions and 5 deletions

View file

@ -1272,8 +1272,8 @@ Variant<GC::Root<DOM::Event>, Empty> Window::event() const
return Empty {};
}
// https://w3c.github.io/csswg-drafts/cssom/#dom-window-getcomputedstyle
GC::Ref<CSS::CSSStyleDeclaration> Window::get_computed_style(DOM::Element& element, Optional<String> const& pseudo_element) const
// https://drafts.csswg.org/cssom/#dom-window-getcomputedstyle
GC::Ref<CSS::CSSStyleProperties> Window::get_computed_style(DOM::Element& element, Optional<String> const& pseudo_element) const
{
// 1. Let doc be elts node document.

View file

@ -204,7 +204,7 @@ public:
Variant<GC::Root<DOM::Event>, Empty> event() const;
[[nodiscard]] GC::Ref<CSS::CSSStyleDeclaration> get_computed_style(DOM::Element&, Optional<String> const& pseudo_element) const;
[[nodiscard]] GC::Ref<CSS::CSSStyleProperties> get_computed_style(DOM::Element&, Optional<String> const& pseudo_element) const;
WebIDL::ExceptionOr<GC::Ref<CSS::MediaQueryList>> match_media(String const& query);
[[nodiscard]] GC::Ref<CSS::Screen> screen();

View file

@ -71,8 +71,8 @@ interface Window : EventTarget {
// https://dom.spec.whatwg.org/#interface-window-extensions
[Replaceable] readonly attribute (Event or undefined) event; // legacy
// https://w3c.github.io/csswg-drafts/cssom/#extensions-to-the-window-interface
[NewObject] CSSStyleDeclaration getComputedStyle(Element elt, optional CSSOMString? pseudoElt);
// https://drafts.csswg.org/cssom/#extensions-to-the-window-interface
[NewObject] CSSStyleProperties getComputedStyle(Element elt, optional CSSOMString? pseudoElt);
// https://w3c.github.io/csswg-drafts/cssom-view/#extensions-to-the-window-interface
[NewObject] MediaQueryList matchMedia(CSSOMString query);