news.com.com - bad nesting of SPAN and P tags

RESOLVED INVALID

Status

RESOLVED INVALID
16 years ago
4 years ago

People

(Reporter: mentin, Unassigned)

Tracking

({top500})

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(2 attachments)

(Reporter)

Description

16 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3b) Gecko/20021229
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3b) Gecko/20021229

At this CNET page, all the text in the left column with dark green background is
wtite in IE. In Mozilla, the text in first paragraph is white and text in others
is black.

Reproducible: Always

Steps to Reproduce:
1. Open http://news.com.com/2009-1001-978164.html?tag=fd_lede2_hed


Actual Results:  
Text is black

Expected Results:  
Text is white

This seems to be caused by improper nesting of <p> and <span> tags. I created a
little repro below. In IE both TEXT1 and TEXT2 are on yellow background, in
Mozilla only TEXT1.

<html>

<HEAD>
    <STYLE type="text/css">
      .Q { background-color: yellow; }
    </STYLE>
  </TITLE>
</HEAD>

<body>
<p>
<span class="Q">TEXT 1</p>
<p>TEXT 2</p>
</span>
</body>

</html>
Parser.  No way for layout to do anything different with the content model we 
create...

For what it's worth, I think IE's rendering is pretty broken and that ours is 
more correct given that markup....
Assignee: font → harishd
Component: Layout: Fonts and Text → Parser
OS: Windows XP → All
QA Contact: ian → moied
Hardware: PC → All

Comment 2

16 years ago
I think Mozilla doing fine: span is inline-object, wich mean that it it "text"
stuff, and </p> are finished current text-line. BTW, this is bad code -- End tag
 required for span (http://www.w3.org/TR/REC-html40/struct/global.html#h-7.5.4)
I don't think parser can reasonably cope with this in a different way. ->Tech Evang
Assignee: harishd → susiew
Component: Parser → US General
Product: Browser → Tech Evangelism
QA Contact: moied → zach
Version: Trunk → unspecified

Comment 4

16 years ago
This may be related:

From http://davebarry.blogspot.com:

<html>

<!-- snip -->

<style>
<!--
.date {FONT-FAMILY:Verdana, Geneva, Arial;  FONT-SIZE: 12px; COLOR:#000000;
FONT-WEIGHT:bold; }
.post {FONT-FAMILY:Verdana, Geneva, Arial; FONT-SIZE: 11px; COLOR:#000000; }
.time {FONT-FAMILY:Verdana, Geneva, Arial; FONT-SIZE: 9px; COLOR:#000000; }
.archive {FONT-SIZE: 9px; COLOR:#000000; }
-->
</style>

<!-- snip -->

<blockquote><a name="88103340"><span class="post"><b>FORNIA NEWS
UPDATE</b><br><p>The local TV morning news here had a <i>detailed</i> report
today on the fact that this is the 50th anniversary of <a
href="http://www.peepresearch.org/">peeps</a>.  </span></a><br>

<!-- snip -->

Everything before the "peeps" link renders normally, but then the "peeps" is
rendered in a default font. Similar behavior was noticed in other posts on the
page, where everything after the link and before the end of the span was
rendered in the default font, rather than the div font. Related?...
Status: UNCONFIRMED → NEW
Ever confirmed: true

Updated

16 years ago
Keywords: evang500

Comment 5

16 years ago
I also hit the problem on Dave Barry's blog (comment 4) and filed it as bug 205749.

Comment 6

16 years ago
tech evang june 2003 reorg
Assignee: susiew → english-us
QA Contact: zach → english-us

Updated

16 years ago
Summary: Formatting of nested SPAN and P tags - broken? → news.com.com - bad nesting of SPAN and P tags

Updated

14 years ago
Keywords: top500
still broken

Comment 8

7 years ago
This bug is still here. However, as per comment 2, I'm not sure this is a real bug.

I'm going to attach a pair of testcases, just for reference.

P.S.1 FYI WebKit (Google Chrome 15) behaves the same as Firefox while Trident (IE8) and Presto (Opera 11.5x) behave different.

P.S.2 Firebug incorrectly places the </span> tag.

Comment 9

7 years ago
Created attachment 564936 [details]
Testcase showing the problem

As per comment 7

Comment 10

7 years ago
Created attachment 564937 [details]
Testacase OK

As per comment 7.
domain doesn't exist anymore
Assignee: english-us → nobody
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Component: English US → Desktop
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.