Closed Bug 11321 Opened 27 years ago Closed 26 years ago

appending a TD to a TR causes incorrect frame creation

Categories

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

x86
Linux
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: rcv64032, Assigned: karnaze)

Details

(Whiteboard: [TESTCASE] crashes just as described)

Attachments

(2 files)

<HTML> <BODY> <SCRIPT> tbl = document.body.appendChild(document.createElement("TABLE")); alert("Appending TR to TABLE"); tr = tbl.appendChild(document.createElement("TR")); alert("Creating TD"); tmp_td = document.createElement("TD") alert("Appending TD to TR"); td1 = tr.appendChild(tmp_td); // <-- Causes Crash alert("Adding text"); td1_text = td1.appendChild(document.createTextNode("testing")); </SCRIPT> </BODY> </HTML>
Attached file testcase
QA Contact: gerardok → janc
Whiteboard: [TESTCASE] crashes just as described
On the 19990805 M9 Win98 build, nothing happens when I click the button on the original testcase. It seems like maybe alert() isn't working. Anyway, I created a new non-alert()-calling version of the testcase. Bang! This one crashes.
Severity: normal → critical
Priority: P3 → P1
Target Milestone: M11
Crashes are all M11/P1/critical.
Assignee: vidur → karnaze
Summary: appending a TD to a TR causes a crash → appending a TD to a TR causes incorrect frame creation
The good news is that we don't crash anymore. The bad news is that there are frame construction problems with tables in specific cases. The test cases included above create a reasonable content subtree, but it seems like the inner text frame is created incorrectly. The test does work, however, if the entire table subtree is created before appending it to the document i.e. the script is changed to: function run(){ tbl = document.createElement("TABLE"); alert("Appending TR to TABLE"); tr = tbl.appendChild(document.createElement("TR")); alert("Creating TD"); tmp_td = document.createElement("TD") alert("Appending TD to TR"); td1 = tr.appendChild(tmp_td); // <-- Causes Crash alert("Adding text"); td1_text = td1.appendChild(document.createTextNode("testing")); document.body.appendChild(tbl); }
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Fixed with latest checkin.
Status: RESOLVED → VERIFIED
verified
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: