mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:27:45 +00:00
LibWeb: Port MutationRecord types to FlyString
Co-authored-by: Luke Wilde <lukew@serenityos.org>
This commit is contained in:
parent
db2ba5f1d9
commit
8a8340b3cd
6 changed files with 14 additions and 12 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/FlyString.h>
|
||||
#include <LibWeb/Bindings/PlatformObject.h>
|
||||
|
||||
namespace Web::DOM {
|
||||
|
@ -15,11 +16,11 @@ class MutationRecord : public Bindings::PlatformObject {
|
|||
WEB_PLATFORM_OBJECT(MutationRecord, Bindings::PlatformObject);
|
||||
|
||||
public:
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<MutationRecord>> create(JS::Realm&, DeprecatedFlyString const& type, Node const& target, NodeList& added_nodes, NodeList& removed_nodes, Node* previous_sibling, Node* next_sibling, DeprecatedString const& attribute_name, DeprecatedString const& attribute_namespace, DeprecatedString const& old_value);
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<MutationRecord>> create(JS::Realm&, FlyString const& type, Node const& target, NodeList& added_nodes, NodeList& removed_nodes, Node* previous_sibling, Node* next_sibling, DeprecatedString const& attribute_name, DeprecatedString const& attribute_namespace, DeprecatedString const& old_value);
|
||||
|
||||
virtual ~MutationRecord() override;
|
||||
|
||||
DeprecatedFlyString const& type() const { return m_type; }
|
||||
FlyString const& type() const { return m_type; }
|
||||
Node const* target() const { return m_target; }
|
||||
NodeList const* added_nodes() const { return m_added_nodes; }
|
||||
NodeList const* removed_nodes() const { return m_removed_nodes; }
|
||||
|
@ -30,12 +31,12 @@ public:
|
|||
DeprecatedString const& old_value() const { return m_old_value; }
|
||||
|
||||
private:
|
||||
MutationRecord(JS::Realm& realm, DeprecatedFlyString const& type, Node const& target, NodeList& added_nodes, NodeList& removed_nodes, Node* previous_sibling, Node* next_sibling, DeprecatedString const& attribute_name, DeprecatedString const& attribute_namespace, DeprecatedString const& old_value);
|
||||
MutationRecord(JS::Realm& realm, FlyString const& type, Node const& target, NodeList& added_nodes, NodeList& removed_nodes, Node* previous_sibling, Node* next_sibling, DeprecatedString const& attribute_name, DeprecatedString const& attribute_namespace, DeprecatedString const& old_value);
|
||||
|
||||
virtual JS::ThrowCompletionOr<void> initialize(JS::Realm&) override;
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
DeprecatedFlyString m_type;
|
||||
FlyString m_type;
|
||||
JS::GCPtr<Node const> m_target;
|
||||
JS::GCPtr<NodeList> m_added_nodes;
|
||||
JS::GCPtr<NodeList> m_removed_nodes;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue