Closed Bug 368564 Opened 18 years ago Closed 14 years ago

Problem with SPAN background when paragraphs are inside it.

Categories

(Core :: DOM: HTML Parser, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED

People

(Reporter: manixrock, Unassigned)

Details

(Keywords: testcase, Whiteboard: [fixed by the HTML5 parser])

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1

In the following code the letters A and C have a blue background, while the B letter has a white background, tough they should all have a blue background:

<span style="background: #AADDFF; color: red;">A<p><br></p>B<p><br></p>C</span>

I realize it's not a conventional use of the tags, but it's the best way I have found to force IE to display contigious BR tags inside a IFRAME (a more complicated setup, long story :P), and now have run into this problem here.
P.S.: I couldn't find a better place to post it then in General, but it might be better to have special(DOM?) section for these kind of bugs.

Reproducible: Always

Steps to Reproduce:
1. copy the code in the Details section in a new .html file
2. open it in a firefox window
3. look at it
Actual Results:  
The background is white for the "B" letter.

Expected Results:  
The background should be blue for all three letters.
Keywords: css1, dom2
Summary: Problem with SPAN background when a combination of #TEXT, P and BR elements is used. → Problem with SPAN background when paragraphs are inside it.
Version: unspecified → 2.0 Branch
A clearer cause of the problem might be this section:

<span style="background: #AADDFF; color: red;">A<p>m</p>B<p>n</p>C<p>p</p>D</span>

I see the A and D have a blue background, while all the other letters have a white background.
Keywords: testcase
Component: General → Layout
Keywords: css1, dom2
Product: Firefox → Core
QA Contact: general → layout
Version: 2.0 Branch → 1.8 Branch
You're right, p inside span is higly invalid.

However, we're using quirks mode here and that should more or less resemble what authors intended (or rather, what IE and the others do).
Status: UNCONFIRMED → NEW
Component: Layout → HTML: Parser
Ever confirmed: true
OS: Windows XP → All
QA Contact: layout → parser
Hardware: x86 → All
Whiteboard: DUPEME?
Version: 1.8 Branch → Trunk
The remaining part of comment 1 is not a parser bug, and I'm pretty sure it isn't a spec violation in layout, either.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: DUPEME? → [fixed by the HTML5 parser]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: