Open Bug 156653 Opened 22 years ago Updated 2 years ago

[quirks]No background color on transparent GIF in SPAN element

Categories

(Core :: Layout: Block and Inline, defect)

defect

Tracking

()

People

(Reporter: ndm, Unassigned)

Details

Attachments

(4 files, 1 obsolete file)

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.0) Gecko/20020530
BuildID:    2002053012

If a SPAN element surrounds a transparent GIF but nothing else, the background
color doesn't show up.  If something else is put into the SPAN such as ' '
then the background color does show up.  In the code below, the background color
shows up in the first SPAN, but not the second.  (In Internet Explorer, it shows
up in both.)

Reproducible: Always
Steps to Reproduce:
1. Run the code example below.

Actual Results:  Background color shows up on first transparent GIF but not second.

Expected Results:  Background color should show up on both transparent GIFs.

Code example that demonstrates the problem:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML LANG="EN-US"><HEAD><META HTTP-EQUIV="Content-Type"
 CONTENT="text/html; charset=iso-8859-1">
 <TITLE>Missing background color in SPAN element</TITLE>
</HEAD><BODY BGCOLOR="#FFFFFF">

<P>This transparent GIF has a background color:
<SPAN STYLE="background-color:red">&nbsp;<IMG
SRC='http://metamath.planetmirror.com/mpegif/bbr.gif' ALIGN=TOP></SPAN> (good)

<P>This transparent GIF has no background color in Mozilla 1.0:
<SPAN STYLE="background-color:red"><IMG
SRC='http://metamath.planetmirror.com/mpegif/bbr.gif' ALIGN=TOP></SPAN> (bad)

</BODY></HTML>
Could you attach the gif in question to this bug using
http://bugzilla.mozilla.org/attachment.cgi?bugid=156653&action=enter ?
Attached file same in almost-standards (obsolete) —
Attachment #90787 - Attachment is obsolete: true
Looks like a problem with the quirks inline box model.....  the problem
disappears in standards mode, but not in almost-standards or quirks -- in those
the height of the <span> is 0, leading to the observed behavior. Should it not
be the height of the image instead?
Severity: minor → normal
Status: UNCONFIRMED → NEW
Component: Browser-General → Layout
Ever confirmed: true
OS: Windows XP → All
Hardware: PC → All
Summary: No background color on transparent GIF in SPAN element → [quirks]No background color on transparent GIF in SPAN element
reassign for real...
Assignee: Matti → attinasi
QA Contact: asa → petersen
Priority: -- → P3
Target Milestone: --- → Future
.
Assignee: attinasi → block-and-inline
Component: Layout → Layout: Block & Inline
Priority: P3 → --
QA Contact: petersen → ian
Target Milestone: Future → ---
(In reply to comment #6)
> Created an attachment (id=90788) [edit]
> almost-standards for real
> 

Excellent example of bug 201198
Depends on: 201198
No longer depends on: 201198
Assignee: layout.block-and-inline → nobody
QA Contact: ian → layout.block-and-inline
Confirmed on both Firefox 3.6.x and Minefield 4.02bpre (Windows XP Pro SP3).

Works OK on both IE7 and Google Chrome 5.x.
Note that I suspect this should be wontfix.  The inline layout quirks are there for a reason; messing with them doesn't seem worthwhile unless it simplifies the code without breaking pages.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: