Closed Bug 206229 Opened 22 years ago Closed 15 years ago

<span> handled differently than other inline elements when overlapped

Categories

(Core :: DOM: HTML Parser, enhancement)

x86
Windows 98
enhancement
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: ernestcline, Unassigned)

Details

(Keywords: testcase)

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.3.1) Gecko/20030425 Build Identifier: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.3.1) Gecko/20030425 I was playing around with some invalid HTML to see what Mozilla would make of it. I tried the following: <div> T <b>T <i>T <span>T <u>T</b> T</i> T </span> T</u> T </div> The effect of <span> was terminated by the </b> altho <i> and <u> were not. Granted, this is invlaid HTML, but it would seem to me that <span> should be treated the same as <b> and <i> when trying to parse this. As a point of comparison, IE treats <span> the same as the other inline elements in this case, continuing the effect of <span> until </span> is encountered. Since this is dealing with invalid HTML, I can't argue that what Mozilla is doing is wrong, only that it is inconsistent and and that it is different from how IE handles it. Reproducible: Always Steps to Reproduce: 1. Create an example HTML document with overlaping inline elements. 2. Display it in the browser. Actual Results: Mozilla parsed the given example as if it had been the following valid HTML: <div> T <b>T <i>T <span>T <u>T</u></span></i></b><i><u> T</u></i><u> T T</u> T </div> Expected Results: Mozilla should parse the example as if were the following valid HTML: <div> T <b>T <i>T <span>T <u>T</u></span></i></b><i><span><u> T</u></span></i><span><u> T</u></span></u> T</u> T </div>
AFAIK, that's intentional; "residual style" is/was intended only for presentational elements, so that people trying to wrap blocks in <font>, <b>, etc. would still get that styling. I think this is WONTFIX; harish?
Attached file simplified testcase
Re-tested Mozilla 1.8a2 build 2004062508 on WinME this is still a problem. Testcase attached. Needs decision whether to fix this behaviour to be consistent or not.
Changing status to NEW.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: testcase
<span style="background-color:green;"> <img src="http://img.photobucket.com/albums/v448/sunose/small_world_nature_4.gif"> </span> IE 6.01 render is expect. but FireFox 1.0 (include PR,rc1) render is not expect. because the gif is transparence format picture. so is this a bug?
Assignee: harishd → nobody
QA Contact: dsirnapalli → parser
WONTFIXing per HTML5. If you disagree, please file a bug against the HTML5 spec in W3C's Bugzilla and cite sites that need <span> to behave like <font>.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: