From 2f009d983ba521a372248773cdebf84885859c3e Mon Sep 17 00:00:00 2001 From: Shannon Booth Date: Tue, 7 Nov 2023 00:29:19 +1300 Subject: [PATCH] LibWeb: Port Element::get_attribute_value from DeprecatedFlyString --- Userland/Libraries/LibWeb/DOM/Element.cpp | 2 +- Userland/Libraries/LibWeb/DOM/Element.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibWeb/DOM/Element.cpp b/Userland/Libraries/LibWeb/DOM/Element.cpp index bea7d270c1..013f8e50c1 100644 --- a/Userland/Libraries/LibWeb/DOM/Element.cpp +++ b/Userland/Libraries/LibWeb/DOM/Element.cpp @@ -155,7 +155,7 @@ DeprecatedString Element::deprecated_get_attribute(StringView name) const } // https://dom.spec.whatwg.org/#concept-element-attributes-get-value -DeprecatedString Element::get_attribute_value(StringView local_name, DeprecatedFlyString const& namespace_) const +DeprecatedString Element::get_attribute_value(FlyString const& local_name, Optional const& namespace_) const { // 1. Let attr be the result of getting an attribute given namespace, localName, and element. auto const* attribute = m_attributes->get_attribute_ns(namespace_, local_name); diff --git a/Userland/Libraries/LibWeb/DOM/Element.h b/Userland/Libraries/LibWeb/DOM/Element.h index d99d379815..e6ff684af8 100644 --- a/Userland/Libraries/LibWeb/DOM/Element.h +++ b/Userland/Libraries/LibWeb/DOM/Element.h @@ -103,7 +103,7 @@ public: // FIXME: This should be taking a 'FlyString const&' / 'Optional const&' Optional get_attribute(StringView name) const; DeprecatedString deprecated_get_attribute(StringView name) const; - DeprecatedString get_attribute_value(StringView local_name, DeprecatedFlyString const& namespace_ = {}) const; + DeprecatedString get_attribute_value(FlyString const& local_name, Optional const& namespace_ = {}) const; WebIDL::ExceptionOr set_attribute(FlyString const& name, String const& value);