Closed Bug 48256 Opened 25 years ago Closed 24 years ago

Incorrect CSS1 color inheritance [CASCADE]

Categories

(Core :: DOM: HTML Parser, defect, P3)

defect

Tracking

()

VERIFIED FIXED
mozilla0.8

People

(Reporter: waldemar, Assigned: harishd)

References

Details

(Keywords: css1, html4, Whiteboard: (py8ieh:examine))

Attachments

(3 files)

The attached HTML page renders as shown in the attached GIF using the M18 apprunner. The three links on the first line have the wrong color; they should appear as they do on the second line. On both lines the innermost element enclosing the links' text is a SPAN with a class that sets the color to light or dark red. The only difference between the two lines is the presence of an extra outermost SPAN on the first line that also sets the color to red.
Keywords: css1, nsbeta3
Attached file HTML source code
Attached image Screen shot
I think the markup is either illegal or the parser is doing something wrong. When I dump the content I see that the first case (with the outer SPAN) has Anchor -> span -> anchor -> text whereas the second case, without the outer span, has what I'd expect, anchor -> span -> text Content Dump of the links => first case: a@026BE1F0 href=#Link1 refcount=3< > span@026BF7B8 class=type-name refcount=3< a@026BF660 href=#Link1 refcount=3< Text@026BF4F0 refcount=3<Type1> > > Second case: a@026C6740 href=#Link1 refcount=3< span@026C6628 class=field-name refcount=3< Text@026C4F20 refcount=3<field2> > > When I change the outer SPAN to a DIV it all works as the reporter expects. I'm not sure, but maybe the SPAN cannot contain another SPAN so the parser is reconstituting the markup to be legal (closing and reopening tags)? CC'ing harish for a sanity check on the content. Can a SPAN contain a SPAN? Is this a residual style problem?
According to the specs, a span can contain a span.
Then this looks like a parser / residual style problem. Assigning to Harish to check out the way the content model is being formed for the two cases.
Assignee: pierre → harishd
Actually, looking at the markup some more I realize I asked the wrong question... The problem occurs when a SPAN contains an anchor. It looks like the A is closing the outer span, and then that span is being opened again inside of the A. In any case, it looks like a case of the parser trying to massage the content, and the style inheritance is changing from what was authored.
Marking nsbeta3- and futuring. Is this bug affecting high visibility sites? If not, we can probably live with it till 6.1.
Whiteboard: [nsbeta3-]
Target Milestone: --- → Future
Whiteboard: [nsbeta3-] → [nsbeta3-] (py8ieh:examine)
Summary: Incorrect CSS1 color inheritance → Incorrect CSS1 color inheritance [CASCADE]
This appears to be a parser problem with <SPAN><A><SPAN></SPAN></A></SPAN>. Adjusting component. Note <news://news.mozilla.org/39EF5A4E.BF0605BF%40alias.it> for another report/test case.
Blocks: html4.01
Component: Style System → Parser
Keywords: correctness, html4
OS: All
QA Contact: chrisd → janc
Nominating for 6.5.
Keywords: nsbeta3nsbeta1
Whiteboard: [nsbeta3-] (py8ieh:examine) → (py8ieh:examine)
Status: NEW → ASSIGNED
Target Milestone: Future → mozilla0.8
r=heikki for the patch harishd showed me. Please add the fix here as well.
Fix landed. Marking FIXED.
marking fixed for real.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
updated qa contact.
QA Contact: janc → bsharma
Verified on: build: 2001-06-04-09-Mtrunk platform: WinNT The attached html and the screen shot are similar.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: