mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibWeb: Port Attr interface from DeprecatedString to String
There are an unfortunate number of DeprecatedString conversions required here, but these should all fall away and look much more pretty again when other places are also ported away from DeprecatedString. Leaves only the Element IDL interface left :^)
This commit is contained in:
committed by
Andreas Kling
parent
a41f23a0fc
commit
3bd04d2c58
Notes:
sideshowbarker
2024-07-18 03:20:18 +09:00
Author: https://github.com/shannonbooth Commit: https://github.com/SerenityOS/serenity/commit/3bd04d2c58 Pull-request: https://github.com/SerenityOS/serenity/pull/21174 Reviewed-by: https://github.com/awesomekling
@@ -74,21 +74,22 @@ class Element
|
||||
public:
|
||||
virtual ~Element() override;
|
||||
|
||||
DeprecatedFlyString const& qualified_name() const { return m_qualified_name.as_string(); }
|
||||
DeprecatedFlyString qualified_name() const { return m_qualified_name.as_string().to_deprecated_fly_string(); }
|
||||
DeprecatedString const& html_uppercased_qualified_name() const { return m_html_uppercased_qualified_name; }
|
||||
|
||||
virtual FlyString node_name() const final { return MUST(FlyString::from_deprecated_fly_string(html_uppercased_qualified_name())); }
|
||||
DeprecatedFlyString const& local_name() const { return m_qualified_name.local_name(); }
|
||||
DeprecatedFlyString local_name() const { return m_qualified_name.local_name().to_deprecated_fly_string(); }
|
||||
|
||||
// NOTE: This is for the JS bindings
|
||||
DeprecatedString const& tag_name() const { return html_uppercased_qualified_name(); }
|
||||
|
||||
DeprecatedFlyString const& prefix() const { return m_qualified_name.prefix(); }
|
||||
DeprecatedFlyString prefix() const { return m_qualified_name.deprecated_prefix(); }
|
||||
void set_prefix(DeprecatedFlyString const& value);
|
||||
|
||||
DeprecatedFlyString const& namespace_() const { return m_qualified_name.namespace_(); }
|
||||
DeprecatedFlyString namespace_() const { return m_qualified_name.deprecated_namespace_(); }
|
||||
|
||||
// NOTE: This is for the JS bindings
|
||||
DeprecatedFlyString const& namespace_uri() const { return namespace_(); }
|
||||
DeprecatedFlyString namespace_uri() const { return namespace_(); }
|
||||
|
||||
bool has_attribute(DeprecatedFlyString const& name) const;
|
||||
bool has_attribute_ns(DeprecatedFlyString namespace_, DeprecatedFlyString const& name) const;
|
||||
|
||||
Reference in New Issue
Block a user