[Webkit-unassigned] [Bug 154594] New: new Range().createContextualFragment() throws DOM Exception 9

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 23 10:26:15 PST 2016


            Bug ID: 154594
           Summary: new Range().createContextualFragment() throws DOM
                    Exception 9
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: HTML DOM
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: russell at besworks.net

After creating a Range object using the constructor the createContextualFragment method throws DOM Exception 9 rather than returning a DocumentFragment object as expected.

If Range.setStart and Range.setEnd are called to set the Range's boundaries then createContextualFragment works as expected.

Looking at Range.cpp I can see that createContextualFragment checks if startContainer is an HTMLElement but the Range constructor sets startContainer as the global document object which is an HTMLDocument and therefore fails this check.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160223/5a5b8acd/attachment.html>

More information about the webkit-unassigned mailing list