Closed
Bug 295646
Opened 20 years ago
Closed 20 years ago
Trailing whitespace is lost
Categories
(Core :: DOM: HTML Parser, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: mrbkap, Assigned: mrbkap)
References
()
Details
Attachments
(1 file, 1 obsolete file)
1.49 KB,
patch
|
bzbarsky
:
review+
bzbarsky
:
superreview+
shaver
:
approval1.8b3+
|
Details | Diff | Splinter Review |
Whitespace at the end of a document is chopped of because nobody bothers
checking the scanner's mIncremental member and not returning kEOF if it's not
incremental (as all of the other tokens do).
Patch in a second.
Assignee | ||
Comment 1•20 years ago
|
||
This checks if we're really at the end of the document, and if we are, doesn't
discard the trailing whitespace.
Attachment #184634 -
Flags: superreview?(bzbarsky)
Attachment #184634 -
Flags: review?(bzbarsky)
Assignee | ||
Updated•20 years ago
|
Status: NEW → ASSIGNED
![]() |
||
Comment 2•20 years ago
|
||
Comment on attachment 184634 [details] [diff] [review]
patch v1
is haveCR guaranteed to have a non-bogus value even if nothing was consumed?
Assignee | ||
Comment 3•20 years ago
|
||
By the time we get to CWhitespaceToken::Consume(), we know that there is at
least one whitespace char in the scanner. Therefore, the Peek() in
nsScanner::ReadWhitespace() will succeed, and aHaveCR is set appropriately. I'll
change ReadWhitespace() to make sure to initialize aHaveCR in the second
iteration of this patch.
Assignee | ||
Updated•20 years ago
|
Attachment #184634 -
Flags: superreview?(bzbarsky)
Attachment #184634 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 4•20 years ago
|
||
As it turns out, nsScanner::ReadWhitespace(), *does* initialize its out
parameter. This patch also fixes CNewlineToken to not lose trailing newlines.
Assignee | ||
Updated•20 years ago
|
Attachment #184634 -
Attachment is obsolete: true
Attachment #184700 -
Flags: review?(rbs)
![]() |
||
Comment 5•20 years ago
|
||
Comment on attachment 184700 [details] [diff] [review]
patch v2
r+sr=bzbarsky
Attachment #184700 -
Flags: superreview+
Attachment #184700 -
Flags: review?(rbs)
Attachment #184700 -
Flags: review+
Assignee | ||
Comment 6•20 years ago
|
||
Comment on attachment 184700 [details] [diff] [review]
patch v2
This patch fixes a couple of problems with composer's Insert -> HTML, and also
prevents the loss of trailing whitespace/newlines.
Attachment #184700 -
Flags: approval1.8b3?
Comment 7•20 years ago
|
||
Comment on attachment 184700 [details] [diff] [review]
patch v2
a=shaver
Attachment #184700 -
Flags: approval1.8b3? → approval1.8b3+
Assignee | ||
Comment 8•20 years ago
|
||
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•