Closed
Bug 13688
Opened 25 years ago
Closed 25 years ago
a white-space: -moz-pre-wrap style on body causes whitespace in <head> to render
Categories
(Core :: DOM: HTML Parser, defect, P3)
Core
DOM: HTML Parser
Tracking
()
VERIFIED
FIXED
People
(Reporter: mozeditor, Assigned: rickg)
Details
Attachments
(1 file)
summary says it all. create a trivial doc with some embedded newlines in the < head> and a "white-space: -moz-pre-wrap" style on the body and note that the head newlines are rendered. This perturbs plaintext mail compose.
I need an example. I'm way to busy to be guessing at the test case you're describing.
some more data. It looks like the parser is putting some of the newlines in the body, when they clearly don't belong there. When I dump content, I see: html refcount=3< head refcount=2< title refcount=2< Text refcount=2<\r\nWhite\nSpace\nIn\nHead\n> > > body style=white-space: -moz-pre-wrap; refcount=3< Text refcount=9<\n\n\n\n\n\nfix me, troy! notice, no newlines in the body.\ n> > > I don't know who is responsible for this part of the process, the parser, or the content sink, or layout? It's unclear that the parser can know what to do with whitespace outside of <BODY>, or if the layout engine can know that some whitespace is significant in this mode and other whitespace is not.
Reporter | ||
Updated•25 years ago
|
Assignee: jfrancis → troy
Reporter | ||
Comment 4•25 years ago
|
||
here's a non-attachment test case, in case that's more useful. <html> <head <title>test case for troy</title> <!-- we've got some newlines in the head but not in the body --> </head><body style="white-space: -moz-pre-wrap; width: 72ch;">test for troy</ body></html>
Reporter | ||
Comment 5•25 years ago
|
||
hmm, friggin bugzilla rewrapped it a bit.
I see exactly what Cujo is describing. Dumping the content model there are lots of newlines inside of the body I don't know exactly who the culprit is either, but let's start with the parser...
I filed a bug on whitespace from HTML getting into body as bug 12998. One of these should be marked a dup of the other.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Fixed by discarding newlines in head, outside of <style>, <script>, etc.
Assignee | ||
Comment 10•25 years ago
|
||
Chris -- because of a different mistake I made last night, this didn't get checked in until Monday night. Please wait until at least tuesday's build to verify. Thanks.
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
Comment 11•25 years ago
|
||
Fixed in the Sept 21 build.
You need to log in
before you can comment on or make changes to this bug.
Description
•