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

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: annevk@annevk.nl
          Reporter: donjjordan@gmail.com
        QA Contact: public-webapps-bugzilla@w3.org
                CC: mike@w3.org, www-dom@w3.org

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.

Received on Wednesday, 3 December 2014 00:09:47 UTC