diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp index 703b90672a5..d6922197ff9 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.cpp +++ b/Userland/Libraries/LibWeb/DOM/Document.cpp @@ -415,7 +415,7 @@ WebIDL::ExceptionOr Document::write(Vector const& string StringBuilder builder; builder.join(""sv, strings); - return run_the_document_write_steps(builder.to_deprecated_string()); + return run_the_document_write_steps(builder.string_view()); } // https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-document-writeln @@ -425,11 +425,11 @@ WebIDL::ExceptionOr Document::writeln(Vector const& stri builder.join(""sv, strings); builder.append("\n"sv); - return run_the_document_write_steps(builder.to_deprecated_string()); + return run_the_document_write_steps(builder.string_view()); } // https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#document-write-steps -WebIDL::ExceptionOr Document::run_the_document_write_steps(DeprecatedString input) +WebIDL::ExceptionOr Document::run_the_document_write_steps(StringView input) { // 1. If document is an XML document, then throw an "InvalidStateError" DOMException. if (m_type == Type::XML) diff --git a/Userland/Libraries/LibWeb/DOM/Document.h b/Userland/Libraries/LibWeb/DOM/Document.h index 309ee6ea7b2..af48acf6572 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.h +++ b/Userland/Libraries/LibWeb/DOM/Document.h @@ -546,7 +546,7 @@ private: void evaluate_media_rules(); - WebIDL::ExceptionOr run_the_document_write_steps(DeprecatedString); + WebIDL::ExceptionOr run_the_document_write_steps(StringView); void queue_intersection_observer_task(); void queue_an_intersection_observer_entry(IntersectionObserver::IntersectionObserver&, HighResolutionTime::DOMHighResTimeStamp time, JS::NonnullGCPtr root_bounds, JS::NonnullGCPtr bounding_client_rect, JS::NonnullGCPtr intersection_rect, bool is_intersecting, double intersection_ratio, JS::NonnullGCPtr target); diff --git a/Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.cpp b/Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.cpp index aa58a28c0ba..4f03857f549 100644 --- a/Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.cpp +++ b/Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.cpp @@ -2799,7 +2799,7 @@ HTMLTokenizer::HTMLTokenizer(StringView input, DeprecatedString const& encoding) m_source_positions.empend(0u, 0u); } -void HTMLTokenizer::insert_input_at_insertion_point(DeprecatedString const& input) +void HTMLTokenizer::insert_input_at_insertion_point(StringView input) { auto utf8_iterator_byte_offset = m_utf8_view.byte_offset_of(m_utf8_iterator); diff --git a/Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.h b/Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.h index 0ab9a2f2d7e..43a8bd86056 100644 --- a/Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.h +++ b/Userland/Libraries/LibWeb/HTML/Parser/HTMLTokenizer.h @@ -126,7 +126,7 @@ public: DeprecatedString source() const { return m_decoded_input; } - void insert_input_at_insertion_point(DeprecatedString const& input); + void insert_input_at_insertion_point(StringView input); void insert_eof(); bool is_eof_inserted();