Status

()

Core
DOM
RESOLVED WORKSFORME
14 years ago
3 months ago

People

(Reporter: sicking, Assigned: sicking)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

nohref was initially implemented in bug 7304 but has since broken again. It
should be an easy fix but I'm not sure where the appropriate place to insert a
check for this attribute would be.

I'd like to remove all href/target/etc-aware code out of the imagemap code since
it just begs for bugs to keep it duplicated in there.

Anyone got any suggestions?
> It should be an easy fix but I'm not sure where the appropriate place to insert
> a check for this attribute would be.

Probably nsHTMLAreaElement::HandleDOMEvent.  It should just call
nsGenericHTMLElement::HandleDOMEvent if nohref is set.

> I'd like to remove all href/target/etc-aware code out of the imagemap code 

Where is this in imagemap code, really?  You mean the stuff in bug 234615? 
Yeah, that's gotta go.
Yeah, the stuff in bug 234615 as well as the small remainder in terms of the
implementation and callers of Area::GetHREF.

I think we need it in more then just nsHTMLAreaElement::HandleDOMEvent (well,
actually nsGenericHTMLElement::HandleDOMEventForAnchors, right?) since we want to:
A) Not follow the link when clicked on
B) Not change the cursor when hovering the link
Ah, you are indeed right, nohref is an <area> thing only so the code for it
should not live in nsGenericHTMLElement::HandleDOMEventForAnchors
QA Contact: ian → general
What needs to be done here?

Comment 6

3 months ago
WORKSFORME per https://bugzilla.mozilla.org/attachment.cgi?id=1042.
Status: NEW → RESOLVED
Last Resolved: 3 months ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.