Closed Bug 5141 Opened 26 years ago Closed 26 years ago

Node.parent should be null for standalone nodes

Categories

(Core :: DOM: Core & HTML, defect, P3)

x86
Windows NT
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: waterson, Assigned: vidur)

Details

Attachments

(1 file)

The current implementation of nsGenericElement::GetParent() returns an "anonymous" document fragment for standalone DOM nodes, which is not correct according to the most recent spec.
Added a test case.
Status: NEW → ASSIGNED
Target Milestone: M5
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Fix checked in on 4/16. The implementation now matches the spec. Note that I modified the test to be a HTML file: <body> <script> function foo() { var baz = document.createElement('img'); dump('baz.parentNode == ' + baz.parentNode + '\n'); } </script> <form> <input type="button" value="Press me" onclick="foo();"> </form> </body>
Status: RESOLVED → VERIFIED
Verified on 7/28 build.
RCS file: /cvsroot/mozilla/testing/mochitest/tests/test_bug5141.html,v done Checking in test_bug5141.html; /cvsroot/mozilla/testing/mochitest/tests/test_bug5141.html,v <-- test_bug5141.html initial revision: 1.1 done
Flags: in-testsuite+
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: