Bug 154594
| Summary: | new Range().createContextualFragment() throws DOM Exception 9 | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | besworks <russell> |
| Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | cdumez |
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | All | ||
| OS: | All | ||
besworks
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.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Chris Dumez
I am about to fix this via Bug 154627.
*** This bug has been marked as a duplicate of bug 154627 ***