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

Everywhere: Rename {Deprecated => Byte}String

This commit un-deprecates DeprecatedString, and repurposes it as a byte
string.
As the null state has already been removed, there are no other
particularly hairy blockers in repurposing this type as a byte string
(what it _really_ is).

This commit is auto-generated:
  $ xs=$(ack -l \bDeprecatedString\b\|deprecated_string AK Userland \
    Meta Ports Ladybird Tests Kernel)
  $ perl -pie 's/\bDeprecatedString\b/ByteString/g;
    s/deprecated_string/byte_string/g' $xs
  $ clang-format --style=file -i \
    $(git diff --name-only | grep \.cpp\|\.h)
  $ gn format $(git ls-files '*.gn' '*.gni')
This commit is contained in:
Ali Mohammad Pur 2023-12-16 17:49:34 +03:30 committed by Ali Mohammad Pur
parent 38d62563b3
commit 5e1499d104
1615 changed files with 10257 additions and 10257 deletions

View file

@ -6,7 +6,7 @@
#pragma once
#include <AK/DeprecatedString.h>
#include <AK/ByteString.h>
#include <LibWeb/ARIA/ARIAMixin.h>
#include <LibWeb/Bindings/ElementPrototype.h>
#include <LibWeb/Bindings/Intrinsics.h>
@ -82,7 +82,7 @@ public:
// NOTE: This is for the JS bindings
FlyString const& tag_name() const { return html_uppercased_qualified_name(); }
DeprecatedString deprecated_tag_name() const { return html_uppercased_qualified_name().to_deprecated_fly_string(); }
ByteString deprecated_tag_name() const { return html_uppercased_qualified_name().to_deprecated_fly_string(); }
Optional<FlyString> const& prefix() const { return m_qualified_name.prefix(); }
@ -97,19 +97,19 @@ public:
bool has_attributes() const;
// FIXME: This should be taking a 'FlyString const&'
DeprecatedString deprecated_attribute(StringView name) const { return deprecated_get_attribute(name); }
ByteString deprecated_attribute(StringView name) const { return deprecated_get_attribute(name); }
Optional<String> attribute(StringView name) const { return get_attribute(name); }
// FIXME: This should be taking a 'FlyString const&' / 'Optional<FlyString> const&'
Optional<String> get_attribute(StringView name) const;
DeprecatedString deprecated_get_attribute(StringView name) const;
DeprecatedString get_attribute_value(FlyString const& local_name, Optional<FlyString> const& namespace_ = {}) const;
ByteString deprecated_get_attribute(StringView name) const;
ByteString get_attribute_value(FlyString const& local_name, Optional<FlyString> const& namespace_ = {}) const;
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);
void set_attribute_value(FlyString const& local_name, DeprecatedString const& value, Optional<FlyString> const& prefix = {}, Optional<FlyString> const& namespace_ = {});
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&);
@ -140,7 +140,7 @@ public:
void for_each_attribute(Function<void(Attr const&)>) const;
void for_each_attribute(Function<void(FlyString const&, DeprecatedString const&)>) const;
void for_each_attribute(Function<void(FlyString const&, ByteString const&)>) const;
bool has_class(FlyString const&, CaseSensitivity = CaseSensitivity::CaseSensitive) const;
Vector<FlyString> const& class_names() const { return m_classes; }
@ -179,7 +179,7 @@ public:
Layout::NodeWithStyle* layout_node();
Layout::NodeWithStyle const* layout_node() const;
DeprecatedString name() const { return deprecated_attribute(HTML::AttributeNames::name); }
ByteString name() const { return deprecated_attribute(HTML::AttributeNames::name); }
CSS::StyleProperties* computed_css_values() { return m_computed_css_values.ptr(); }
CSS::StyleProperties const* computed_css_values() const { return m_computed_css_values.ptr(); }
@ -395,7 +395,7 @@ private:
void invalidate_style_after_attribute_change(FlyString const& attribute_name);
WebIDL::ExceptionOr<JS::GCPtr<Node>> insert_adjacent(DeprecatedString const& where, JS::NonnullGCPtr<Node> node);
WebIDL::ExceptionOr<JS::GCPtr<Node>> insert_adjacent(ByteString const& where, JS::NonnullGCPtr<Node> node);
void enqueue_an_element_on_the_appropriate_element_queue();