mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-06 01:26:22 +00:00
LibWeb: Port MutationRecord from DeprecatedString to String
This commit is contained in:
parent
75133cf733
commit
da1f137967
Notes:
sideshowbarker
2024-07-16 20:44:03 +09:00
Author: https://github.com/shannonbooth
Commit: da1f137967
Pull-request: https://github.com/SerenityOS/serenity/pull/20977
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/awesomekling
4 changed files with 24 additions and 12 deletions
|
@ -16,7 +16,7 @@ class MutationRecord : public Bindings::PlatformObject {
|
|||
WEB_PLATFORM_OBJECT(MutationRecord, Bindings::PlatformObject);
|
||||
|
||||
public:
|
||||
[[nodiscard]] static 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);
|
||||
[[nodiscard]] static JS::NonnullGCPtr<MutationRecord> create(JS::Realm&, FlyString const& type, Node const& target, NodeList& added_nodes, NodeList& removed_nodes, Node* previous_sibling, Node* next_sibling, Optional<String> const& attribute_name, Optional<String> const& attribute_namespace, Optional<String> const& old_value);
|
||||
|
||||
virtual ~MutationRecord() override;
|
||||
|
||||
|
@ -26,12 +26,12 @@ public:
|
|||
NodeList const* removed_nodes() const { return m_removed_nodes; }
|
||||
Node const* previous_sibling() const { return m_previous_sibling; }
|
||||
Node const* next_sibling() const { return m_next_sibling; }
|
||||
DeprecatedString const& attribute_name() const { return m_attribute_name; }
|
||||
DeprecatedString const& attribute_namespace() const { return m_attribute_namespace; }
|
||||
DeprecatedString const& old_value() const { return m_old_value; }
|
||||
Optional<String> const& attribute_name() const { return m_attribute_name; }
|
||||
Optional<String> const& attribute_namespace() const { return m_attribute_namespace; }
|
||||
Optional<String> const& old_value() const { return m_old_value; }
|
||||
|
||||
private:
|
||||
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);
|
||||
MutationRecord(JS::Realm& realm, FlyString const& type, Node const& target, NodeList& added_nodes, NodeList& removed_nodes, Node* previous_sibling, Node* next_sibling, Optional<String> const& attribute_name, Optional<String> const& attribute_namespace, Optional<String> const& old_value);
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
@ -42,9 +42,9 @@ private:
|
|||
JS::GCPtr<NodeList> m_removed_nodes;
|
||||
JS::GCPtr<Node> m_previous_sibling;
|
||||
JS::GCPtr<Node> m_next_sibling;
|
||||
DeprecatedString m_attribute_name;
|
||||
DeprecatedString m_attribute_namespace;
|
||||
DeprecatedString m_old_value;
|
||||
Optional<String> m_attribute_name;
|
||||
Optional<String> m_attribute_namespace;
|
||||
Optional<String> m_old_value;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue