Open
Bug 362731
Opened 18 years ago
Updated 2 years ago
[imagemap] focus ring around AREA is rendered to the right/bottom of clickable region
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
NEW
People
(Reporter: joyard.nicolas, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: testcase)
Attachments
(2 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; fr; rv:1.8.1) Gecko/20061010 Firefox/2.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; fr; rv:1.8.1) Gecko/20061010 Firefox/2.0
Image map areas (<map> and <area> HTML elements) rendering is wrong : it is shifted by 1 pixel to the left.
For example, if you create an rectangular area with coords="10,10,20,20", it will be rendered as coords="9,10,19,20".
Reproducible: Always
Steps to Reproduce:
1. Create an HTML file with the following contents:
<img src="an-image-bigger-than-20x20-pixels.png" usemap="#mymap" />
<map name="mymap">
<area shape="rect" href="www.google.com" coords="10,10,20,20" />
</map>
2. Load it in Firefox
TEST 1 (on the left of the AREA):
3. Make the mouse cursor point pixel with coordinates (9, y) on the image (top-left pixel is (0,0); y can be anything from 10 to 20 included)
TEST 2 (on the right):
3. Make the mouse cursor point pixel with coordinates (20, y) on the image (top-left pixel is (0,0); y can be anything from 10 to 20 included)
Actual Results:
TEST1: the cursor is inside the AREA, i.e. hand cursor, google link hovered.
TEST2: the cursor is out of the AREA, i.e. normal cursor, no link hovered.
Expected Results:
TEST1: the cursor should be out of the AREA, i.e. normal cursor, no link hovered.
TEST2: the cursor should be inside the AREA, i.e. hand cursor, google link hovered.
Default theme.
The bug also occurs with FireFox 1.5.
The bug also occurs under Windows 2000
Comment 1•18 years ago
|
||
Reporter, can you make a minimal testcase and attach it to this bug using the 'Create a New Attachment' link?
Reporter | ||
Comment 2•18 years ago
|
||
Weird thing: the bug is not the same on my personnal PC (where the testcase was built) and on my work PC (where the bug was originally seen and reported from), even if both have same OS (WinXP SP2 w. latest patches) and same Firefox version.
Reporter | ||
Comment 3•18 years ago
|
||
Oops, forgot a detail! What differs between the two PCs is the following:
- work PC: all areas shifted 1px to the left i.e. (x, y, z, t) is rendered as (x-1, y, z-1, t)
- personnal PC: all areas grow by 1px on the left and on the top i.e. (x, y, z, t) rendered as (x-1, y-1, z, t)
Comment 4•16 years ago
|
||
Comment 5•16 years ago
|
||
The clickable area seems to be correct but we render the focus border
1px to far on the right and bottom side. Opera and IE renders the
focus border just inside the edge of the clickable area which is
what I think we should do too. That has the advantage of not drawing
anything outside image rect and thus we don't need to worry about
the image's overflow rect. (We should restrict the focus ring so that
it is inside the image too (like Opera), but I'll file a separate bug
on that if not done already).
Severity: normal → minor
Status: UNCONFIRMED → NEW
Component: General → Layout
Ever confirmed: true
Keywords: testcase
OS: Windows XP → All
Product: Firefox → Core
QA Contact: general → layout
Hardware: PC → All
Summary: Image maps are rendered shifted by 1px to the left → [imagemap] focus ring around AREA is rendered to the right/bottom of clickable region
Updated•16 years ago
|
Assignee: nobody → mats.palmgren
Comment 6•16 years ago
|
||
Filed bug 449003 on clamping the focus ring to the image rect.
Comment 7•12 years ago
|
||
Mats, do you see the error with the latest version ?
Comment 8•12 years ago
|
||
Yes, I still see the error in Nightly on Linux.
Comment 9•2 years ago
|
||
The bug assignee is inactive on Bugzilla, so the assignee is being reset.
Assignee: MatsPalmgren_bugz → nobody
Updated•2 years ago
|
Severity: minor → S4
You need to log in
before you can comment on or make changes to this bug.
Description
•