WebKit and FireFox disagree on complex Range.insertNode handling I just fixed bug 16765, at which time mitz pointed out that we might not handle all of the insertNode cases correctly yet. This bug is to track the case where the node inserted is already the endContainer node, and the node insertion causes the startContainer to split (because it's a TEXT node). Attaching test case shortly.
> Attaching test case shortly. Any update on the test case?
Created attachment 27702 [details] Additional tests for Range.insertNode ...range-insertNode-already-in-range1-expected.txt | 21 ++++++++++++ .../Range/range-insertNode-already-in-range1.html | 13 +++++++ ...range-insertNode-already-in-range2-expected.txt | 21 ++++++++++++ .../Range/range-insertNode-already-in-range2.html | 13 +++++++ ...range-insertNode-already-in-range3-expected.txt | 22 ++++++++++++ .../Range/range-insertNode-already-in-range3.html | 13 +++++++ .../range-insertNode-already-in-range1.js | 34 +++++++++++++++++++ .../range-insertNode-already-in-range2.js | 34 +++++++++++++++++++ .../range-insertNode-already-in-range3.js | 35 ++++++++++++++++++++ 9 files changed, 206 insertions(+), 0 deletions(-)
Yay git! I found the old branch and attached the commit with test cases!
Mass moving XML DOM bugs to the "DOM" Component.
Extensive test coverage is available in WPT for range.insertNode and Safari pass all tests: https://wpt.fyi/results/dom/ranges/Range-insertNode.html?label=master&label=experimental&aligned&view=subtest&q=insertNode I am going to mark this as "RESOLVED WONTFIX". Please reopen, if I am wrong. Thanks!
These tests pass in Safari 15.6, too.