Bug 148773 - Range.deleteContents cannot delete DocType
Summary: Range.deleteContents cannot delete DocType
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
Keywords: InRadar
Depends on:
Reported: 2015-09-03 19:14 PDT by Ryosuke Niwa
Modified: 2015-09-17 08:51 PDT (History)
8 users (show)

See Also:

Patch (6.26 KB, patch)
2015-09-16 19:50 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2015-09-03 19:14:21 PDT
<!DOCTYPE html>

var range = document.createRange();
range.setStart(document, 0);
range.setEnd(document, 1);


throws an exception because we attempt to insert a DOCTYPE into a document fragment inside Range::processContents but it shouldn't.

This bug was found by the newly added test: LayoutTests/http/tests/w3c/dom/ranges/Range-deleteContents.html
Comment 1 Radar WebKit Bug Importer 2015-09-03 19:14:56 PDT
Comment 2 Chris Dumez 2015-09-16 19:50:45 PDT
Created attachment 261355 [details]
Comment 3 Chris Dumez 2015-09-17 08:51:21 PDT
Comment on attachment 261355 [details]

Clearing flags on attachment: 261355

Committed r189914: <http://trac.webkit.org/changeset/189914>
Comment 4 Chris Dumez 2015-09-17 08:51:27 PDT
All reviewed patches have been landed.  Closing bug.