Bug 209424 (bearded-imagemap)

undisplayed <object> with usemap gets link-image border anyway

RESOLVED FIXED

Status

()

Core
CSS Parsing and Computation
--
minor
RESOLVED FIXED
14 years ago
3 years ago

People

(Reporter: Robin Lionheart, Unassigned)

Tracking

({testcase})

Trunk
testcase
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(2 attachments)

(Reporter)

Description

14 years ago
On my Objects test page, I combine cascading object content types with image maps.

Mozilla renders one of the alternate markup images and handles the image map
fine, but, it produced an extra border around the lower corners and bottom side
of the image, giving it a sort of beard. It's easier to see than to describe.
See attached screen shot.
(Reporter)

Comment 1

14 years ago
Created attachment 125659 [details]
Screenshot of bug
We're displaying the PNG, and the extra border is the border you get when you
treat the OBJECT for the TIFF as an inline element and put a border on it.

This is because of the following rule in html.css.

*|*:-moz-any-link img, img[usemap], object[usemap] {
  border: 2px solid;
}

We need a way of preventing this rule from applying to objects that are ignored.
.
Assignee: other → dbaron
Status: UNCONFIRMED → NEW
Component: Layout → Style System
Ever confirmed: true
Summary: Beard when image map is in alternate markup of image map → object with usemap that can't be displayed gets link-image border anyway
Created attachment 125660 [details]
simplified testcase

The relevant part of http://www.robinlionheart.com/stds/html4/objects.html ,
slightly simplified.
OS: Windows XP → All
Hardware: PC → All
(Reporter)

Updated

14 years ago
Summary: object with usemap that can't be displayed gets link-image border anyway → undisplayed <object> with usemap gets link-image border anyway
(Reporter)

Updated

14 years ago
Alias: bearded-imagemap
Depends on: 11011

Updated

14 years ago
Keywords: testcase

Comment 5

14 years ago
This bug is also visible in:
  http://odin.himinbi.org/covers/

The page contains svg images in object tags with pngs (also in object tags)
nested inside. The svgs are 400x400, but the pngs are various sizes. There are
borders around all the objects in the page and you can see the 400x400 borders
around the non rendered svgs through some of the ongs (which have transparent
backgrounds).
So now that bug 11011 is fixed, we could fix this, somewhat.  I'm considering
something like this:

*|*:-moz-any-link
img:not(:-moz-broken):not(:-moz-user-disabled):not(:-moz-suppressed),
img:not(:-moz-broken):not(:-moz-user-disabled):not(:-moz-suppressed)[usemap],
object:not(:-moz-broken):not(:-moz-user-disabled):not(:-moz-suppressed)[usemap] {
  border: 2px solid;
}

This will also not show the border on broken images that we're showing a
placeholder for, though.  I don't see an obvious way around that, unfortunately.
Assignee: dbaron → nobody
QA Contact: ian → style-system

Comment 7

5 years ago
This bug was last visible in Firefox 3.6 and is WORKSFORME since the switch to the html5 engine (bug 373864), but should it be marked as that or FIXED while the dependant bugs are about html4.01 and are still open?
Whiteboard: [fixed by the HTML5 parser]
Fixed in HTML5 parser, closing
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
How did the HTML5 parser fix this?  I'd think it's more likely fixed by the complete removal of the border style.
@dbaron - I'm rounding up old <object> bugs and resolved this based on Mardeg's comment and works-for-me.  Looking at this more, you're right, this was fixed by removing the faulty rule entirely.
Whiteboard: [fixed by the HTML5 parser]
You need to log in before you can comment on or make changes to this bug.