Closed
Bug 215714
Opened 22 years ago
Closed 20 years ago
<pre> gets confused if preceded by font setting plus <p>
Categories
(Core :: DOM: HTML Parser, defect)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: craig, Assigned: harishd)
References
Details
(Keywords: testcase)
Attachments
(6 files)
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5a) Gecko/20030718
Build Identifier: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5a) Gecko/20030718
Wrapping a <pre> in a <font> setting, plus having a <p> immediately before the
<pre>, stops the <pre> working properly. Either the font setting or the <p> on
its own doesn't cause this behaviour.
Reproducible: Always
Steps to Reproduce:
1. Put this code on a page:
<font face="Verdana">
This is some text in Verdana.<p>
<pre>
| | this vertical bar should be
|-----==| directly above this one, but it's not
</pre></font>
<font face="Verdana">
This is some text in Verdana.
<pre>
| | this vertical bar really is
|-----==| directly above this one!
</pre></font>
Actual Results:
It's self-documenting: First set of vertical bars don't line up, even though
second set do.
Expected Results:
Been consistent.
Comment 1•22 years ago
|
||
Comment 2•22 years ago
|
||
WFM, 2003-08-08-22 trunk Linux
Oops. Even weirder that I thought.
That testcase gives me both sets of bars failing to line up. However, if a <p>
is inserted before the first <font> tag, then it works as I said.
Comment 4•22 years ago
|
||
Still WFM on Linux (in both Quirks and Standards mode BTW)
Comment 5•22 years ago
|
||
Confirming bug, 2003-08-10-04 trunk Win98. DOM Inspector shows:
<FONT face="Verdana">
<P>
<PRE>
<FONT face="Verdana">
...
-> Parser
Assignee: other → harishd
Status: UNCONFIRMED → NEW
Component: Layout → Parser
Ever confirmed: true
QA Contact: ian → dsirnapalli
Comment 6•22 years ago
|
||
Bug also occurs in Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.1b) Gecko/20020804
Comment 7•22 years ago
|
||
Bug also occurs on Linux, it didn't show up with the previous testcases because
my Linux box don't have the Verdana font. This testcase uses Times instead.
Updated•22 years ago
|
OS: Windows 98 → All
Thanks for checking into it, Mats.
FWIW, also occurs in Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5b) Gecko/20030810.
Comment 9•22 years ago
|
||
*** Bug 215780 has been marked as a duplicate of this bug. ***
Comment 10•22 years ago
|
||
Bug 215780 is a 4xp bug, as its URL and testcase are working on Netscape 4.79
None of these testcases here is working on Netscape 4.79
tested on Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5b) Gecko/20030810
Mozilla: testcase 1 wrong, second <pre> this vertical bar is NOT directly ...
Netscape 4.79: all testcases no bar directly above the other, all bars misaligned.
Comment 11•22 years ago
|
||
I think <pre> should switch to monospaced font, other browsers do.
Comment 12•22 years ago
|
||
Konqueror and "links -g" has it right, so I believe Mozilla to be off-beat
here.
If you remove the <style> sheet pre definition then things change to normal.
I got the problem reading
http://www.anzwers.org/free/universe/nebulae/ic1805.html which is quite
complicated, so I simplified and found the offending line.
Regards/Donald Axel - d-axel.dk.
Comment 13•22 years ago
|
||
This condition is not altered in any way if <font> or a font other than Courier
is inside the pre. Take this xml dump from for
http://www.atomicmpc.com.au/forums.asp?s=1&c=2&t=4245 example:
<PRE style="font-family: Courier,monospace;">
<FONT color="#ffffff" size="2" face="Arial">
<BR/>
[cut]
Bobbles 2 <BR/>
Bomfunk 1 <BR/>
bomfunky_1999 1 <BR/>
Bonez 1 <BR/>
BonezOfOz 1 2 <BR/>
</FONT>
</PRE>
add style="font-family: Courier, monospace;" to the <font> and it looks like it
should be.
Unfortunately, I don't think we should bother modifying html.css to force
courier, monospace by default.
Comment 14•22 years ago
|
||
M18 defaulted to the Courier font and got it right.
Comment 15•22 years ago
|
||
Comment 16•21 years ago
|
||
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Here's another example of a similar issue:
http://virtualeclipse.ca/ebtabs/bass/eb/battle7_dougertous/
This one is a bit weird: half the time it will show up in Arial (like the rest
of the site), half the time it will be properly monospaced. Refreshing the page
(sometimes multiple times) seems to fix the problem.
Going to the following site and then clicking on the second "Battle #7" link
under "EarthBound" seems to trigger it more often than not:
http://virtualeclipse.ca/ebtabs/
Comment 17•20 years ago
|
||
I'm marking this WONTFIX. This is a result of the residual style handling that
the parser does, and there is no way to not do residual style handling in this
case (and form a correct DOM).
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•