1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 13:27:35 +00:00

LibWeb: Use Optional<FlyString> const& in Element and NamedNodeMap

This is enabled with the newly added IDL generator support for
FlyStrings.
This commit is contained in:
Shannon Booth 2024-01-02 23:49:13 +13:00 committed by Andreas Kling
parent 8ba3caf6ab
commit 285bca1633
6 changed files with 28 additions and 70 deletions

View file

@ -92,8 +92,7 @@ public:
Optional<FlyString> const& namespace_uri() const { return m_qualified_name.namespace_(); }
bool has_attribute(FlyString const& name) const;
// FIXME: This should be taking a 'Optional<FlyString> const&'
bool has_attribute_ns(Optional<String> const& namespace_, FlyString const& name) const;
bool has_attribute_ns(Optional<FlyString> const& namespace_, FlyString const& name) const;
bool has_attributes() const;
ByteString deprecated_attribute(FlyString const& name) const { return deprecated_get_attribute(name); }
@ -105,8 +104,7 @@ public:
WebIDL::ExceptionOr<void> set_attribute(FlyString const& name, String const& value);
// FIXME: This should be taking an Optional<FlyString>
WebIDL::ExceptionOr<void> set_attribute_ns(Optional<String> const& namespace_, FlyString const& qualified_name, FlyString const& value);
WebIDL::ExceptionOr<void> set_attribute_ns(Optional<FlyString> const& namespace_, FlyString const& qualified_name, FlyString const& value);
void set_attribute_value(FlyString const& local_name, ByteString const& value, Optional<FlyString> const& prefix = {}, Optional<FlyString> const& namespace_ = {});
WebIDL::ExceptionOr<JS::GCPtr<Attr>> set_attribute_node(Attr&);
WebIDL::ExceptionOr<JS::GCPtr<Attr>> set_attribute_node_ns(Attr&);