[Webkit-unassigned] [Bug 54636] New: Image Map doesnt update region when dynamically altering an area
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Feb 17 04:48:04 PST 2011
https://bugs.webkit.org/show_bug.cgi?id=54636
Summary: Image Map doesnt update region when dynamically
altering an area
Product: WebKit
Version: 528+ (Nightly build)
Platform: PC
OS/Version: Windows Vista
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: HTML DOM
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: bz at purplex.co.uk
If you create an image map with an area, and then you change the coordinates for that area after you have moved the mouse over it, then the area will not update to the new coordinates.
In the following example, there is a single area to the left of the image. If you click on it, the area should move to the right, but it doesn't.
<img ismap usemap="#map1" style="width:200; height:100"/>
<map name="map1">
<area id="area1" shape="rect" coords="0,0,100,100" href="#" title="xx"/ onclick="document.getElementById ('area1').coords = '100,0,200,100'">
</map>
I believe the bug lies in HTMLAreaElement.cpp in the mapMouseEvent() function.
It only recreates the region for the area if the associated image size changes.
If I resize the image as in the code below, then it works.
<img id="image1" ismap usemap="#map1" style="width:200; height:100"/>
<map name="map1">
<area id="area1" shape="rect" coords="0,0,100,100" href="#" title="xx"/ onclick="document.getElementById ('area1').coords = '100,0,200,100'; document.getElementById ('image1').style.width = 201">
</map>
The code needs changing to recalculate the region when the shape type or coordinates of the area have changed since the last call.
i.e. add a recalculate flag that gets set when either of these attributes change.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list