[Webkit-unassigned] [Bug 47916] New: selectAllChildren & extractContents does not extract all contents

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 19 11:36:37 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=47916

           Summary: selectAllChildren & extractContents does not extract
                    all contents
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: rniwa at webkit.org
                CC: darin at apple.com, tony at chromium.org,
                    jparent at google.com, ojan at chromium.org,
                    enrica at apple.com


window.getSelection().selectAllChildren(test);
window.getSelection().getRangeAt(0).extractContents();

does not extract all the contents in test because we canonicalize the selection.

For example, if div was:
<div id="test"><a href="http://webkit.org/">hello</a></div>

The above script results in
<div id="test"><a href="http://webkit.org/"></a></div>

because the endContainer of getRangeAt(0) is "hello" (TextNode).

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list