Bug 16867 - WebKit and FireFox disagree on complex Range.insertNode handling
Summary: WebKit and FireFox disagree on complex Range.insertNode handling
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: All OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-13 17:38 PST by Eric Seidel (no email)
Modified: 2022-08-18 16:28 PDT (History)
7 users (show)

See Also:


Attachments
Additional tests for Range.insertNode (8.99 KB, patch)
2009-02-16 11:24 PST, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2008-01-13 17:38:22 PST
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.
Comment 1 Alexey Proskuryakov 2009-02-16 02:52:25 PST
> Attaching test case shortly.

Any update on the test case?
Comment 2 Eric Seidel (no email) 2009-02-16 11:24:19 PST
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(-)
Comment 3 Eric Seidel (no email) 2009-02-16 11:24:44 PST
Yay git!  I found the old branch and attached the commit with test cases!
Comment 4 Lucas Forschler 2019-02-06 09:02:48 PST
Mass moving XML DOM bugs to the "DOM" Component.
Comment 5 Ahmad Saleem 2022-08-09 10:05:39 PDT
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!
Comment 6 Alexey Proskuryakov 2022-08-18 16:28:59 PDT
These tests pass in Safari 15.6, too.