body has extra text node (whitespace) at beginning

VERIFIED FIXED in M15

Status

()

Core
DOM: Core & HTML
P3
normal
VERIFIED FIXED
19 years ago
10 months ago

People

(Reporter: dbaron, Assigned: rickg)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [TESTCASE])

Attachments

(2 attachments)

(Reporter)

Description

19 years ago
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.
(Reporter)

Comment 1

19 years ago
Created attachment 1496 [details]
testcase described in bug
(Reporter)

Updated

19 years ago
Whiteboard: [TESTCASE]
(Reporter)

Comment 2

19 years ago
Created attachment 1497 [details]
test case giving desired results by removing whitespace before <body>
Moving all non-DOM[012], non-crash bugs to M15.
(Reporter)

Comment 4

18 years ago
See bug 13688.
(Reporter)

Comment 5

18 years ago
I will check (sometime) to see if this is fixed, and, if it is, mark it a
duplicate of bug 13688.
(Assignee)

Updated

18 years ago
Assignee: vidur → rickg
(Assignee)

Comment 6

18 years ago
Stealing this one.
(Assignee)

Updated

18 years ago
Status: NEW → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED
(Assignee)

Comment 7

18 years ago
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.

Comment 8

17 years ago
Mass update of qa contact
QA Contact: gerardok → janc
Component: DOM Level 1 → DOM Core

Comment 9

17 years ago
QA contact Update
QA Contact: janc → desale

Comment 10

17 years ago
Updating QA contact to Shivakiran Tummala.
QA Contact: desale → stummala

Comment 11

17 years ago
verified
Status: RESOLVED → VERIFIED

Updated

9 years ago
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.