diff --git a/Userland/Libraries/LibWeb/CSS/CSSFontFaceRule.cpp b/Userland/Libraries/LibWeb/CSS/CSSFontFaceRule.cpp index 3b632ad97d..54d83ecb3e 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSFontFaceRule.cpp +++ b/Userland/Libraries/LibWeb/CSS/CSSFontFaceRule.cpp @@ -63,7 +63,7 @@ String CSSFontFaceRule::serialized() const // 2. The result of invoking serialize a comma-separated list on performing serialize a URL or serialize a LOCAL for each source on the source list. serialize_a_comma_separated_list(builder, m_font_face.sources(), [&](StringBuilder& builder, FontFace::Source source) -> void { if (source.local_or_url.has()) { - serialize_a_url(builder, source.local_or_url.get().to_deprecated_string()); + serialize_a_url(builder, MUST(source.local_or_url.get().to_string())); } else { builder.appendff("local({})", source.local_or_url.get()); } diff --git a/Userland/Libraries/LibWeb/CSS/CSSMediaRule.cpp b/Userland/Libraries/LibWeb/CSS/CSSMediaRule.cpp index b89baad937..da212cf9ae 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSMediaRule.cpp +++ b/Userland/Libraries/LibWeb/CSS/CSSMediaRule.cpp @@ -39,7 +39,7 @@ void CSSMediaRule::visit_edges(Cell::Visitor& visitor) String CSSMediaRule::condition_text() const { - return String::from_deprecated_string(m_media->media_text().to_deprecated_string()).release_value(); + return m_media->media_text(); } void CSSMediaRule::set_condition_text(String const& text) diff --git a/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.cpp b/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.cpp index 10b1c7f7c3..792922821e 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.cpp +++ b/Userland/Libraries/LibWeb/CSS/CSSStyleDeclaration.cpp @@ -317,7 +317,7 @@ String PropertyOwningCSSStyleDeclaration::serialized() const // NOTE: There are no shorthands for custom properties. // 5. Let value be the result of invoking serialize a CSS value of declaration. - auto value = declaration.value.value->to_string().to_deprecated_string(); + auto value = declaration.value.value->to_string(); // 6. Let serialized declaration be the result of invoking serialize a CSS declaration with property name property, value value, // and the important flag set if declaration has its important flag set. @@ -419,7 +419,7 @@ JS::ThrowCompletionOr CSSStyleDeclaration::internal_get(JS::PropertyK if (property_id == CSS::PropertyID::Invalid) return Base::internal_get(name, receiver, cacheable_metadata); if (auto maybe_property = property(property_id); maybe_property.has_value()) - return { JS::PrimitiveString::create(vm(), maybe_property->value->to_string().to_deprecated_string()) }; + return { JS::PrimitiveString::create(vm(), maybe_property->value->to_string()) }; return { JS::PrimitiveString::create(vm(), String {}) }; } @@ -432,7 +432,7 @@ JS::ThrowCompletionOr CSSStyleDeclaration::internal_set(JS::PropertyKey co if (property_id == CSS::PropertyID::Invalid) return Base::internal_set(name, value, receiver, cacheable_metadata); - auto css_text = TRY(value.to_deprecated_string(vm)); + auto css_text = TRY(value.to_string(vm)); TRY(Bindings::throw_dom_exception_if_needed(vm, [&] { return set_property(property_id, css_text); })); return true; diff --git a/Userland/Libraries/LibWeb/CSS/MediaList.cpp b/Userland/Libraries/LibWeb/CSS/MediaList.cpp index bd13c92d39..1526d7f874 100644 --- a/Userland/Libraries/LibWeb/CSS/MediaList.cpp +++ b/Userland/Libraries/LibWeb/CSS/MediaList.cpp @@ -119,7 +119,7 @@ WebIDL::ExceptionOr MediaList::item_value(size_t index) const { if (index >= m_media.size()) return JS::js_undefined(); - return JS::PrimitiveString::create(vm(), m_media[index]->to_string().to_deprecated_string()); + return JS::PrimitiveString::create(vm(), m_media[index]->to_string()); } } diff --git a/Userland/Libraries/LibWeb/CSS/Serialize.cpp b/Userland/Libraries/LibWeb/CSS/Serialize.cpp index 6fa24e4ebd..c2119c4c72 100644 --- a/Userland/Libraries/LibWeb/CSS/Serialize.cpp +++ b/Userland/Libraries/LibWeb/CSS/Serialize.cpp @@ -113,7 +113,7 @@ void serialize_a_url(StringBuilder& builder, StringView url) // To serialize a URL means to create a string represented by "url(", // followed by the serialization of the URL as a string, followed by ")". builder.append("url("sv); - serialize_a_string(builder, url.to_deprecated_string()); + serialize_a_string(builder, url); builder.append(')'); } @@ -123,7 +123,7 @@ void serialize_a_local(StringBuilder& builder, StringView path) // To serialize a LOCAL means to create a string represented by "local(", // followed by the serialization of the LOCAL as a string, followed by ")". builder.append("local("sv); - serialize_a_string(builder, path.to_deprecated_string()); + serialize_a_string(builder, path); builder.append(')'); } diff --git a/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp index 1900511233..e050af5197 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp +++ b/Userland/Libraries/LibWeb/CSS/StyleComputer.cpp @@ -2374,7 +2374,7 @@ void StyleComputer::load_fonts_from_sheet(CSSStyleSheet const& sheet) for (auto& source : font_face.sources()) { // FIXME: These should be loaded relative to the stylesheet URL instead of the document URL. if (source.local_or_url.has()) - urls.append(m_document->parse_url(source.local_or_url.get().to_deprecated_string())); + urls.append(m_document->parse_url(MUST(source.local_or_url.get().to_string()))); // FIXME: Handle local() } diff --git a/Userland/Libraries/LibWeb/CSS/StyleValues/ImageStyleValue.cpp b/Userland/Libraries/LibWeb/CSS/StyleValues/ImageStyleValue.cpp index 0c56a8b969..8c50bd30c6 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleValues/ImageStyleValue.cpp +++ b/Userland/Libraries/LibWeb/CSS/StyleValues/ImageStyleValue.cpp @@ -100,7 +100,7 @@ Gfx::ImmutableBitmap const* ImageStyleValue::bitmap(size_t frame_index, Gfx::Int String ImageStyleValue::to_string() const { - return serialize_a_url(m_url.to_deprecated_string()); + return serialize_a_url(MUST(m_url.to_string())); } bool ImageStyleValue::equals(StyleValue const& other) const diff --git a/Userland/Libraries/LibWeb/CSS/StyleValues/ShadowStyleValue.cpp b/Userland/Libraries/LibWeb/CSS/StyleValues/ShadowStyleValue.cpp index 468036e2bc..14b5680c5e 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleValues/ShadowStyleValue.cpp +++ b/Userland/Libraries/LibWeb/CSS/StyleValues/ShadowStyleValue.cpp @@ -14,7 +14,7 @@ namespace Web::CSS { String ShadowStyleValue::to_string() const { StringBuilder builder; - builder.appendff("{} {} {} {} {}", m_properties.color.to_deprecated_string(), m_properties.offset_x->to_string(), m_properties.offset_y->to_string(), m_properties.blur_radius->to_string(), m_properties.spread_distance->to_string()); + builder.appendff("{} {} {} {} {}", m_properties.color.to_string(), m_properties.offset_x->to_string(), m_properties.offset_y->to_string(), m_properties.blur_radius->to_string(), m_properties.spread_distance->to_string()); if (m_properties.placement == ShadowPlacement::Inner) builder.append(" inset"sv); return MUST(builder.to_string()); diff --git a/Userland/Libraries/LibWeb/CSS/StyleValues/URLStyleValue.h b/Userland/Libraries/LibWeb/CSS/StyleValues/URLStyleValue.h index 4b7cc04184..feeb66c96c 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleValues/URLStyleValue.h +++ b/Userland/Libraries/LibWeb/CSS/StyleValues/URLStyleValue.h @@ -27,7 +27,7 @@ public: virtual String to_string() const override { - return serialize_a_url(m_url.to_deprecated_string()); + return serialize_a_url(MUST(m_url.to_string())); } private: