summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/DOM/Node.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-07-12 23:13:57 +0200
committerAndreas Kling <kling@serenityos.org>2022-07-12 23:17:17 +0200
commit3ee5bdcfb7828755f052a3b018f8471fcf03c93b (patch)
tree199cc5283f700de6531ecc22b0234ca1c298822d /Userland/Libraries/LibWeb/DOM/Node.h
parent7d7d5f0b1b61c2939e26d059c62cdf2d2c3add64 (diff)
downloadserenity-3ee5bdcfb7828755f052a3b018f8471fcf03c93b.zip
LibWeb: Traverse shadow-including subtree when adopting DOM nodes
This takes care of two FIXMEs and fixes an issue on Google Docs where we'd mix boxes from different documents in the same layout tree. (This happened because shadow trees remained attached to their old document when their host was adopted.)
Diffstat (limited to 'Userland/Libraries/LibWeb/DOM/Node.h')
-rw-r--r--Userland/Libraries/LibWeb/DOM/Node.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/Node.h b/Userland/Libraries/LibWeb/DOM/Node.h
index d30275ef5c..8cd3ffb2c9 100644
--- a/Userland/Libraries/LibWeb/DOM/Node.h
+++ b/Userland/Libraries/LibWeb/DOM/Node.h
@@ -231,6 +231,10 @@ public:
void queue_mutation_record(FlyString const& type, String attribute_name, String attribute_namespace, String old_value, NonnullRefPtr<NodeList> added_nodes, NonnullRefPtr<NodeList> removed_nodes, Node* previous_sibling, Node* next_sibling);
+ // https://dom.spec.whatwg.org/#concept-shadow-including-descendant
+ template<typename Callback>
+ IterationDecision for_each_shadow_including_descendant(Callback);
+
protected:
Node(Document&, NodeType);