Bug 66722

Summary: title attribute ignored in imagemaps
Product: [Applications] konqueror Reporter: Riku Voipio <nchip>
Component: khtml rendererAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Fix imagemap titles not displayed
useable testcase
better patch
corrected patch

Description Riku Voipio 2003-10-27 23:52:54 UTC
Version:            (using KDE KDE 3.1.4)
Installed from:    Debian testing/unstable Packages

from debian BTS bug number 131545

--
When using an image map in an image (<img> or <input type=image>), konqueror
ignores the title attributes in the area definitions.

Example:

<map name=bla>
<area shape=rect coords=0,0,9,10 title=left>
<area shape=rect coords=10,0,19,10 title=center href="somewhere">
<area shape=rect coords=20,0,30,10 title=right nohref>
</map>

<img src=image.gif usemap="#bla"> x
<img src=image.gif usemap="#bla" title=default> x
<form action=bla>
<input type=image src=image.gif usemap="#bla"> x
<input type=image src=image.gif usemap="#bla" title=default> x
</form>

--

another example: http://www.netlantis.org/wwwbin/graph.pl?type=as&as=AS8434
hovering mouse over the AS number boxes gives details about the AS in mozilla.
Comment 1 Dominique Devriese 2003-12-20 18:16:48 UTC
confirmed on Debian KDE 3.1.3

this bug was also reported as the following debian bug:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=131545
Comment 2 bj 2004-06-27 04:11:10 UTC
Created attachment 6486 [details]
Fix imagemap titles not displayed

Yipeee! After 3 days of desperate trial & errors, I came up with a fix for that
bug!!! Far from perfect, and only working for local maps, perhaps even crashing
in some cases, but it is a really good start (only 11 lines)! (Just commiting
in case my computer crashes). I will try to come with a better version in a few
days unless someone wants to take care of it.
Comment 3 bj 2004-06-28 01:00:10 UTC
The new patch, that also works when several images use the same map has been submitted on the kfm-devel mailing list:
http://lists.kde.org/?l=kfm-devel&m=108837692810720&w=2

Waiting for feedback.
Comment 4 Leo Savernik 2004-07-21 21:52:19 UTC
Created attachment 6774 [details]
useable testcase

This is the inline test case changed to be suitable for testing (and not
produce seemingly correct results).
Comment 5 Leo Savernik 2004-07-21 23:14:23 UTC
Created attachment 6777 [details]
better patch

This patch does the same as attachment 6486 [details], but eliminates the O(n) behaviour.
Comment 6 Leo Savernik 2004-07-22 13:27:39 UTC
Created attachment 6783 [details]
corrected patch

forgot to include the changes to html_imageimpl.h
Comment 7 Leo Savernik 2004-07-28 00:12:12 UTC
CVS commit by savernik: 

Make title attribute work on image maps.

I'm closing this bug despite image maps not being supported on input elements.
This is because <input type=image> has no support for imagemaps at all yet.

CCMAIL: 66722-done@bugs.kde.org


  M +13 -0     ChangeLog   1.270
  M +5 -0      khtml_part.cpp   1.1013
  M +15 -2     khtml_part.h   1.261
  M +80 -11    khtmlview.cpp   1.650
  M +3 -1      khtmlview.h   1.211
  M +3 -1      html/html_imageimpl.h   1.67
  M +1 -0      xml/dom_docimpl.cpp   1.286
  M +4 -2      xml/dom_nodeimpl.h   1.160