Closed
Bug 16585
Opened 25 years ago
Closed 24 years ago
insertBefore, replaceChild, and appendChild should throw exception if given ancestor
Categories
(Core :: DOM: Core & HTML, defect, P3)
Core
DOM: Core & HTML
Tracking
()
VERIFIED
FIXED
M15
People
(Reporter: dbaron, Assigned: vidur)
References
()
Details
(Whiteboard: [HAVE FIX])
Attachments
(2 files)
DESCRIPTION: If one attempts to use insertBefore() to insert an element's ancestor as a child of that element (which would thus remove the ancestor from the tree), a HIERARCHY_REQUEST_ERROR should be thrown. This is currently not happening, and, depending on which element you're using, this can cause a crash. STEPS TO REPRODUCE: * load attached test case * hit test ACTUAL RESULTS: * either crash or one line of red output EXPECTED RESULTS: * green output DOES NOT WORK CORRECTLY ON: * Linux, apprunner, 1999-10-15-11-M11 ADDITIONAL INFORMATION: The test case that causes the crash does so by removing the body element from the tree (or otherwise messing it up somehow). I haven't tested this with appendChild(), etc., but there could be similar problems.
Reporter | ||
Comment 1•25 years ago
|
||
Reporter | ||
Comment 2•25 years ago
|
||
Reporter | ||
Updated•25 years ago
|
Reporter | ||
Comment 3•25 years ago
|
||
Note to myself: I should update the test page once this is fixed by adding the crash-causing test back in.
Reporter | ||
Comment 4•25 years ago
|
||
replaceChild() causes the same problem.
Reporter | ||
Updated•25 years ago
|
Severity: critical → normal
Reporter | ||
Comment 5•25 years ago
|
||
I made the removing body node causing a crash a separate bug - bug 16585. However, the first test case here shouldn't remove the body node. It should throw an exception. Reducing severity to normal.
Reporter | ||
Comment 7•25 years ago
|
||
appendChild() has the same problem.
Reporter | ||
Updated•25 years ago
|
Severity: normal → major
Summary: insertBefore should throw exception if given ancestor → insertBefore, replaceChild, and appendChild should throw exception if given ancestor
Reporter | ||
Comment 8•25 years ago
|
||
Retitling and raising to major since this can really mess up the document tree...
Assignee | ||
Comment 9•25 years ago
|
||
In an attempt to get my bug list in order again, marking all the bugs I have currently as ASSIGNED.
Comment 10•25 years ago
|
||
I've got a fix for this one, I'm working with Vidur on getting it checked in.
OS: Linux → All
Hardware: PC → All
Assignee | ||
Updated•25 years ago
|
Target Milestone: M15
Assignee | ||
Updated•25 years ago
|
Whiteboard: [HAVE FIX]
Comment 11•24 years ago
|
||
The fix for this is checked in, marking FIXED.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Updated•24 years ago
|
Component: DOM Level 1 → DOM Core
Comment 15•23 years ago
|
||
verified on windows 2000 for build 2001-07-09-09 marking as verified...
Status: RESOLVED → VERIFIED
Component: DOM: Core → DOM: Core & HTML
QA Contact: stummala → general
You need to log in
before you can comment on or make changes to this bug.
Description
•