Closed Bug 12998 Opened 25 years ago Closed 25 years ago

body has extra text node (whitespace) at beginning

Categories

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

x86
Linux
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: dbaron, Assigned: rickg)

Details

(Whiteboard: [TESTCASE])

Attachments

(2 files)

DESCRIPTION:  You seem to be putting any whitespace that occurs before the
beginning of the body element into the beginning of the body element.  This
causes body.firstChild to incorrectly be an [object Text] when the body start
tag is immediately followed by a start tag for another element.

STEPS TO REPRODUCE:  Load attached test case (possibly twice due to some script
bugs these days).  Look in the text window for output from dump().

ACTUAL RESULTS: [object Text]

EXPECTED RESULTS: [object HTMLParagraphElement]

DOES NOT WORK CORRECTLY ON:
 * Linux, viewer, 1999-08-30-01-M10

ADDITIONAL INFORMATION:
I will attach a second test case with no whitespace before the beginning of the
body element that does give the desired results, and shows that whitespace
before the beginning of body is the culprit.

I don't know how hard this is to fix while maintaining backward compatibility,
but in theory you should handle correct documents correctly.
Whiteboard: [TESTCASE]
Moving all non-DOM[012], non-crash bugs to M15.
I will check (sometime) to see if this is fixed, and, if it is, mark it a
duplicate of bug 13688.
Assignee: vidur → rickg
Stealing this one.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
This appears to have been fixed by earlier improvements to the parsing engine
that deal with how ws/nl sequences before the body are treated.
Mass update of qa contact
QA Contact: gerardok → janc
Component: DOM Level 1 → DOM Core
QA contact Update
QA Contact: janc → desale
Updating QA contact to Shivakiran Tummala.
QA Contact: desale → stummala
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.

Attachment

General

Created:
Updated:
Size: