From 511e282002640e231b69d8cdb8ee6ca06504d929 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Tue, 15 Jul 2025 15:53:10 +0100 Subject: [PATCH] LibWeb/HTML: Return CSSStyleProperties from getComputedStyle() Corresponds to https://github.com/w3c/csswg-drafts/commit/94fdd8ab1e7fa6c9ee098cbf1ee22e8f3911636b --- Libraries/LibWeb/HTML/Window.cpp | 4 ++-- Libraries/LibWeb/HTML/Window.h | 2 +- Libraries/LibWeb/HTML/Window.idl | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Libraries/LibWeb/HTML/Window.cpp b/Libraries/LibWeb/HTML/Window.cpp index 70ecad674cf..84eb671edf6 100644 --- a/Libraries/LibWeb/HTML/Window.cpp +++ b/Libraries/LibWeb/HTML/Window.cpp @@ -1272,8 +1272,8 @@ Variant, Empty> Window::event() const return Empty {}; } -// https://w3c.github.io/csswg-drafts/cssom/#dom-window-getcomputedstyle -GC::Ref Window::get_computed_style(DOM::Element& element, Optional const& pseudo_element) const +// https://drafts.csswg.org/cssom/#dom-window-getcomputedstyle +GC::Ref Window::get_computed_style(DOM::Element& element, Optional const& pseudo_element) const { // 1. Let doc be elt’s node document. diff --git a/Libraries/LibWeb/HTML/Window.h b/Libraries/LibWeb/HTML/Window.h index e0b76d7f00e..71eae6495c0 100644 --- a/Libraries/LibWeb/HTML/Window.h +++ b/Libraries/LibWeb/HTML/Window.h @@ -204,7 +204,7 @@ public: Variant, Empty> event() const; - [[nodiscard]] GC::Ref get_computed_style(DOM::Element&, Optional const& pseudo_element) const; + [[nodiscard]] GC::Ref get_computed_style(DOM::Element&, Optional const& pseudo_element) const; WebIDL::ExceptionOr> match_media(String const& query); [[nodiscard]] GC::Ref screen(); diff --git a/Libraries/LibWeb/HTML/Window.idl b/Libraries/LibWeb/HTML/Window.idl index cd1e11585ab..511a879d01b 100644 --- a/Libraries/LibWeb/HTML/Window.idl +++ b/Libraries/LibWeb/HTML/Window.idl @@ -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);