Closed
Bug 103833
Opened 23 years ago
Closed 21 years ago
[FIX]no newline with preformatted text when there is quotation mark at the end of the line
Categories
(Core :: DOM: HTML Parser, defect, P2)
Tracking
()
RESOLVED
FIXED
mozilla1.8alpha1
People
(Reporter: schulz, Assigned: bzbarsky)
References
()
Details
(Keywords: testcase)
Attachments
(2 files)
73 bytes,
text/html
|
Details | |
2.02 KB,
patch
|
choess
:
review+
peterv
:
superreview+
|
Details | Diff | Splinter Review |
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20010913
BuildID: 2001091311
In the page at http://www.newsaktuell.be/en/story.htx?nr=200001868 there is a
preformatted text with a fixed line length (69 characters).
Mozilla takes the line following an line with ending on a quotation mark and put
it on the same line (see middle of the page).
The problem can also reproduced with Netscape 6.1 on Linux and WinNT.
Reproducible: Always
Steps to Reproduce:
1.load URL http://www.newsaktuell.be/en/story.htx?nr=200001868
2.
3.
Assignee | ||
Comment 1•23 years ago
|
||
Looks like " eats the following ^M
Over to parser.
Assignee: attinasi → harishd
Status: UNCONFIRMED → NEW
Component: Layout → Parser
Ever confirmed: true
QA Contact: petersen → moied
[was 1.1alpha]
Target Milestone: mozilla1.1alpha → Future
Updated•22 years ago
|
Assignee | ||
Comment 6•21 years ago
|
||
Assignee: harishd → bzbarsky
Assignee | ||
Comment 7•21 years ago
|
||
Comment on attachment 146386 [details] [diff] [review]
Fix
So the deal here is that ReadWhitespace() will just leave a lone \r as is, and
the caller (CWhitespaceToken::Consume()) will strip out \r's.
I decided to do this instead of appending on every \n or \r (which would allow
caller to not strip), because I suspect this is faster for pages using \r\n or
\n as newline separator....
Attachment #146386 -
Flags: superreview?(peterv)
Attachment #146386 -
Flags: review?(choess)
Assignee | ||
Updated•21 years ago
|
Priority: P3 → P2
Summary: no newline with preformatted text when there is quotation mark at the end of the line → [FIX]no newline with preformatted text when there is quotation mark at the end of the line
Target Milestone: Future → mozilla1.8alpha
Comment 8•21 years ago
|
||
Comment on attachment 146386 [details] [diff] [review]
Fix
> Index: htmlparser/src/nsScanner.cpp
> ===================================================================
> while(!done && current != end) {
> switch(theChar) {
> case '\n':
> case '\r': ++aNewlinesSkipped;
> - case ' ' :
> - case '\b':
> - case '\t':
> {
Maybe move |++aNewlinesSkipped;| inside the brace?
I don't know much about this code, but couldn't you just replace that lone CR
with an LF?
It's a bit of a shame that the two ReadWhitespace functions now have different
behaviour.
Attachment #146386 -
Flags: superreview?(peterv) → superreview+
Assignee | ||
Comment 9•21 years ago
|
||
> Maybe move |++aNewlinesSkipped;| inside the brace?
Will do.
> couldn't you just replace that lone CR with an LF?
Yes, but the iterator math needed to make sure this is done right didn't seem
worth the trouble...
> It's a bit of a shame that the two ReadWhitespace functions now have different
> behaviour.
The other function just sets iterators, so the only way to change its behavior
would be to actually modify the underying scanner buffer.... that seemed scary.
Frankly, we should write a separate view source tokenizer (been talked about
much) and remove that other function from here.
Updated•21 years ago
|
Attachment #146386 -
Flags: review?(choess) → review+
Assignee | ||
Comment 10•21 years ago
|
||
Checked in.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 11•20 years ago
|
||
*** Bug 150981 has been marked as a duplicate of this bug. ***
You need to log in
before you can comment on or make changes to this bug.
Description
•