LibWeb: Update DOM cloning algorithm for declarative shadow DOM

This commit is contained in:
Andreas Kling 2024-06-25 11:06:41 +02:00 committed by Andreas Kling
commit c7d9c1c0b2
Notes: sideshowbarker 2024-07-17 09:47:09 +09:00
7 changed files with 53 additions and 34 deletions

View file

@ -140,7 +140,7 @@ public:
WebIDL::ExceptionOr<JS::NonnullGCPtr<Node>> replace_child(JS::NonnullGCPtr<Node> node, JS::NonnullGCPtr<Node> child);
JS::NonnullGCPtr<Node> clone_node(Document* document = nullptr, bool clone_children = false);
WebIDL::ExceptionOr<JS::NonnullGCPtr<Node>> clone_node(Document* document = nullptr, bool clone_children = false);
WebIDL::ExceptionOr<JS::NonnullGCPtr<Node>> clone_node_binding(bool deep);
// NOTE: This is intended for the JS bindings.
@ -198,7 +198,7 @@ public:
virtual void removed_from(Node*);
virtual void children_changed() { }
virtual void adopted_from(Document&) { }
virtual void cloned(Node&, bool) {};
virtual WebIDL::ExceptionOr<void> cloned(Node&, bool) { return {}; }
Layout::Node const* layout_node() const { return m_layout_node; }
Layout::Node* layout_node() { return m_layout_node; }