Bug 29665 - HitTestResults for links in image maps respond false to .isLiveLink()
Summary: HitTestResults for links in image maps respond false to .isLiveLink()
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: John Gregg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-22 17:50 PDT by John Gregg
Modified: 2013-05-10 05:57 PDT (History)
5 users (show)

See Also:


Attachments
patch for isLiveLink() (1.34 KB, patch)
2009-09-22 18:10 PDT, John Gregg
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Gregg 2009-09-22 17:50:55 PDT
HitTestResult::isLiveLink() returns false for links in image maps.  These are live links (and note that HitTestResult::absoluteLinkURL() works for area tags).

Causes Chromium bug http://code.google.com/p/chromium/issues/detail?id=16057
Comment 1 John Gregg 2009-09-22 18:10:02 PDT
Created attachment 39971 [details]
patch for isLiveLink()

patch for the above issue.
Comment 2 Darin Adler 2009-09-22 21:49:19 PDT
Comment on attachment 39971 [details]
patch for isLiveLink()

Normally we require regression tests for bug fixes. What's the user-visible symptom of this bug? Can you make a regression test?
Comment 3 John Gregg 2009-09-23 13:23:30 PDT
The one thing I've discovered is that there is an incompatibility with firefox on dragging the live areas of an image map.  

For example, with
http://www.w3schools.com/TAGS/tryit_view.asp?filename=tryhtml_areamap
firefox will let you drag the active areas as URLs and drag the rest of the image as an image; whereas safari lets you drag the inactive portions as an image, but the active areas don't respond at all.

This patch is one step to a solution to that problem, but probably doesn't have visible impact on its own.  Given that, I'll withdraw the patch until I find some way to test it, and fix the chromium bug in chromium.
Comment 4 Jeremy Orlow 2009-09-24 18:39:33 PDT
It seems like there must be some way to test this.  If there truly isn't, then explain why in the ChangeLog.  If there's a good reason, reviewers typically will be OK with the lack of a test.

Doing this just in Chromium would work, but is hacky, and won't benefit the other ports.
Comment 5 Darin Fisher (:fishd, Google) 2009-09-24 21:33:00 PDT
I don't think we have a way to write layout tests that allow you to verify calls to ChromeClient::mouseDidMoveOverElement.

DumpRenderTree's UIDelegate does not implement the mouseDidMoveOverElement selector.

I think it is a good idea to file a bug about adding such additions to DRT so that we can write layout tests for bugs like this.  I don't think that work needs to block this patch.
Comment 6 Dimitri Glazkov (Google) 2009-11-06 14:25:44 PST
I agree. Darin One, what say you?
Comment 7 Darin Adler 2009-11-09 09:49:32 PST
(In reply to comment #5)
> I think it is a good idea to file a bug about adding such additions to DRT so
> that we can write layout tests for bugs like this.  I don't think that work
> needs to block this patch.

Normally it's when we fix a bug in something that was previously non-testable that we add test engine support.

Filing a bug to say we will do it in the future is OK if someone is really working on it. But such promises often fade under the pressure of other responsibilities.

EventHandler::selectClosestWordOrLinkFromMouseEvent checks the result of isLiveLink as does DragController::mayStartDragAtEventLocation. There must be some way to test one of those. There are other dragging tests. It seems we could make a test that drags a link into a <textarea>.

I don't think we should keep this patch on hold indefinitely just for lack of a test, nor do I think we should leave the change out of the tree. We should make a test!