[Bug 27488] New: Steps 14-5 and 17-5 of the DOM 4 Range cloning algorithm appear to be incorrect.

[email protected]
Newsgroups gmane.comp.web.dom.general
Message-ID <[email protected]/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=27488

            Bug ID: 27488
           Summary: Steps 14-5 and 17-5 of the DOM 4 Range cloning
                    algorithm appear to be incorrect.
           Product: WebAppsWG
           Version: unspecified
          Hardware: PC
                OS: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DOM
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
                CC: [email protected], [email protected]

Step 14 reads in part:

<snip>
14. Otherwise, if first partially contained child is not null:
    1. Let *clone* be a clone of first partially contained child.
    2. Append *clone* to *fragment*.
    3. Let *subrange* be a new range whose start is....
    4. Let *subfragment* be the result of cloning *subrange*.
    5. Append *subfragment* to *fragment*.
</snip>

And step 17 reads in part:

<snip>
17. Otherwise, if last partially contained child is not null:
    1. Let *clone* be a clone of last partially contained child.
    2. Append *clone* to *fragment*.
    3. Let *subrange* be a new range whose start is....
    4. Let *subfragmen*t be the result of cloning *subrange*.
    5. Append *subfragment* to *fragment*.
</snip>

Shouldn't sub-step 5 in both cases read "Append *subfragment* to *clone*"? The
subfragment needs to be appended to the clone created in steps 1 and 2. 
Otherwise, the hierarchy of the cloned range is lost.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.