summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/DOM/Document.idl
diff options
context:
space:
mode:
authorLuke <luke.wilde@live.co.uk>2021-04-06 19:34:49 +0100
committerAndreas Kling <kling@serenityos.org>2021-04-06 21:42:00 +0200
commit5beacf08a2d578d0eb36d6320255d0f4634a1085 (patch)
treec9a269226bdd772ef6db6f012530689594dbf2e0 /Userland/Libraries/LibWeb/DOM/Document.idl
parent5b5d7857e3bb98ade11b06d2b392a7058b1487ec (diff)
downloadserenity-5beacf08a2d578d0eb36d6320255d0f4634a1085.zip
LibWeb: Make the node mutation algorithms more spec compliant
The mutation algorithms now more closely follow the spec and fixes some assertion failures in tests such as Acid3 and Dromaeo. The main thing that is missing right now is passing exceptions to the bindings layer. This is because of issue #6075. I spent a while trying to work it out and got so frustrated I just left it as a FIXME. Besides that, the algorithms bail at the appropriate points. This also makes the adopting steps in the document more spec compliant as it's needed by the insertion algorithm. While I was at it, I added the adoptNode IDL binding. This adds a bunch of ancestor/descendant checks to TreeNode as well. I moved the "remove_all_children" function to Node as it needs to use the full remove algorithm instead of simply removing it from the child list.
Diffstat (limited to 'Userland/Libraries/LibWeb/DOM/Document.idl')
-rw-r--r--Userland/Libraries/LibWeb/DOM/Document.idl2
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/Document.idl b/Userland/Libraries/LibWeb/DOM/Document.idl
index 2886bdcd3f..aacdae09f2 100644
--- a/Userland/Libraries/LibWeb/DOM/Document.idl
+++ b/Userland/Libraries/LibWeb/DOM/Document.idl
@@ -31,6 +31,8 @@ interface Document : Node {
Comment createComment(DOMString data);
Range createRange();
+ [CEReactions, ImplementedAs=adopt_node_binding] Node adoptNode(Node node);
+
[ImplementedAs=style_sheets_for_bindings] readonly attribute StyleSheetList styleSheets;
readonly attribute DOMString compatMode;