From 6789a2dd8ed597f3885a94c0d5e41792d66c22a2 Mon Sep 17 00:00:00 2001 From: Shannon Booth Date: Wed, 6 Sep 2023 14:52:53 +1200 Subject: [PATCH] LibWeb: Port ShadowRoot interface from DeprecatedString to String --- Userland/Libraries/LibWeb/DOM/ShadowRoot.cpp | 2 +- Userland/Libraries/LibWeb/DOM/ShadowRoot.h | 2 +- Userland/Libraries/LibWeb/DOM/ShadowRoot.idl | 2 +- Userland/Libraries/LibWeb/DOMParsing/InnerHTML.cpp | 2 +- Userland/Libraries/LibWeb/DOMParsing/InnerHTML.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Userland/Libraries/LibWeb/DOM/ShadowRoot.cpp b/Userland/Libraries/LibWeb/DOM/ShadowRoot.cpp index cb665951ef..3e55aca37c 100644 --- a/Userland/Libraries/LibWeb/DOM/ShadowRoot.cpp +++ b/Userland/Libraries/LibWeb/DOM/ShadowRoot.cpp @@ -44,7 +44,7 @@ WebIDL::ExceptionOr ShadowRoot::inner_html() const } // https://w3c.github.io/DOM-Parsing/#dom-innerhtml-innerhtml -WebIDL::ExceptionOr ShadowRoot::set_inner_html(DeprecatedString const& markup) +WebIDL::ExceptionOr ShadowRoot::set_inner_html(StringView markup) { TRY(DOMParsing::inner_html_setter(*this, markup)); diff --git a/Userland/Libraries/LibWeb/DOM/ShadowRoot.h b/Userland/Libraries/LibWeb/DOM/ShadowRoot.h index 6a00aa27f9..8e74628d0a 100644 --- a/Userland/Libraries/LibWeb/DOM/ShadowRoot.h +++ b/Userland/Libraries/LibWeb/DOM/ShadowRoot.h @@ -27,7 +27,7 @@ public: virtual EventTarget* get_parent(Event const&) override; WebIDL::ExceptionOr inner_html() const; - WebIDL::ExceptionOr set_inner_html(DeprecatedString const&); + WebIDL::ExceptionOr set_inner_html(StringView); private: ShadowRoot(Document&, Element& host, Bindings::ShadowRootMode); diff --git a/Userland/Libraries/LibWeb/DOM/ShadowRoot.idl b/Userland/Libraries/LibWeb/DOM/ShadowRoot.idl index 325ee168fa..3403c58bc2 100644 --- a/Userland/Libraries/LibWeb/DOM/ShadowRoot.idl +++ b/Userland/Libraries/LibWeb/DOM/ShadowRoot.idl @@ -2,7 +2,7 @@ #import // https://dom.spec.whatwg.org/#shadowroot -[Exposed=Window, UseDeprecatedAKString] +[Exposed=Window] interface ShadowRoot : DocumentFragment { readonly attribute ShadowRootMode mode; // FIXME: readonly attribute boolean delegatesFocus; diff --git a/Userland/Libraries/LibWeb/DOMParsing/InnerHTML.cpp b/Userland/Libraries/LibWeb/DOMParsing/InnerHTML.cpp index cefafb2d8f..f880a2106b 100644 --- a/Userland/Libraries/LibWeb/DOMParsing/InnerHTML.cpp +++ b/Userland/Libraries/LibWeb/DOMParsing/InnerHTML.cpp @@ -32,7 +32,7 @@ WebIDL::ExceptionOr> parse_fragment(Depr } // https://w3c.github.io/DOM-Parsing/#dom-innerhtml-innerhtml -WebIDL::ExceptionOr inner_html_setter(JS::NonnullGCPtr context_object, DeprecatedString const& value) +WebIDL::ExceptionOr inner_html_setter(JS::NonnullGCPtr context_object, StringView value) { // 1. Let context element be the context object's host if the context object is a ShadowRoot object, or the context object otherwise. // (This is handled in Element and ShadowRoot) diff --git a/Userland/Libraries/LibWeb/DOMParsing/InnerHTML.h b/Userland/Libraries/LibWeb/DOMParsing/InnerHTML.h index c80f439613..de2f618d4a 100644 --- a/Userland/Libraries/LibWeb/DOMParsing/InnerHTML.h +++ b/Userland/Libraries/LibWeb/DOMParsing/InnerHTML.h @@ -14,7 +14,7 @@ namespace Web::DOMParsing { // https://w3c.github.io/DOM-Parsing/#dom-innerhtml-innerhtml -WebIDL::ExceptionOr inner_html_setter(JS::NonnullGCPtr context_object, DeprecatedString const& value); +WebIDL::ExceptionOr inner_html_setter(JS::NonnullGCPtr context_object, StringView value); WebIDL::ExceptionOr> parse_fragment(DeprecatedString const& markup, DOM::Element& context_element);