Closed
Bug 737612
Opened 13 years ago
Closed 13 years ago
Range.insertNode() on a detached text node throws nonstandard exception type
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla14
People
(Reporter: ayg, Assigned: ayg)
Details
Attachments
(1 file)
2.66 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
Test-case:
data:text/html,<!DOCTYPE html>
<script>
var text = document.createTextNode("abc");
var range = document.createRange();
range.setStart(text, 1);
try {
range.insertNode(document.head);
} catch(e) {
document.documentElement.textContent = e
}
</script>
Gecko outputs
"""
[Exception... "Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIDOMRange.insertNode]" nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: http://software.hixie.ch/utilities/js/live-dom-viewer/# :: <TOP_LEVEL> :: line 7" data: no]
"""
Chrome 19 dev is a HIERARCHY_REQUEST_ERR. Opera Next 12.00 alpha is BAD_BOUNDARYPOINTS_ERR (which no longer exists). IE10 Developer Preview actually succeeds (?!?). The spec goes like Chrome:
"""
If start node is a Comment node, or a Text node whose parent is null, throw an "HierarchyRequestError" exception and terminate these steps.
"""
http://dvcs.w3.org/hg/domcore/raw-file/tip/dom-core.html#dom-range-insertnode
This causes failures here: http://w3c-test.org/webapps/DOMCore/tests/approved/Range-insertNode.html
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → ayg
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•13 years ago
|
||
Attachment #607689 -
Flags: review?(bugs)
Assignee | ||
Updated•13 years ago
|
Whiteboard: [autoland-try:-u all]
Updated•13 years ago
|
Whiteboard: [autoland-try:-u all] → [autoland-in-queue]
Comment 2•13 years ago
|
||
Autoland Patchset:
Patches: 607689
Branch: mozilla-central => try
Destination: http://hg.mozilla.org/try/pushloghtml?changeset=584e5d522b3e
Try run started, revision 584e5d522b3e. To cancel or monitor the job, see: https://tbpl.mozilla.org/?tree=Try&rev=584e5d522b3e
Updated•13 years ago
|
Attachment #607689 -
Flags: review?(bugs) → review+
Comment 3•13 years ago
|
||
Try run for 584e5d522b3e is complete.
Detailed breakdown of the results available here:
https://tbpl.mozilla.org/?tree=Try&rev=584e5d522b3e
Results (out of 179 total builds):
exception: 3
success: 143
warnings: 23
failure: 10
Builds (or logs if builds failed) available at:
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/autolanduser@mozilla.com-584e5d522b3e
Timed out after 12 hours without completing.
Updated•13 years ago
|
Whiteboard: [autoland-in-queue]
Assignee | ||
Comment 4•13 years ago
|
||
Flags: in-testsuite+
OS: Linux → All
Hardware: x86 → All
Target Milestone: --- → mozilla14
Comment 5•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Updated•12 years ago
|
Component: DOM: Traversal-Range → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•