Closed Bug 234614 Opened 21 years ago Closed 6 years ago

nohref is broken

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: sicking, Assigned: sicking)

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?
WORKSFORME per https://bugzilla.mozilla.org/attachment.cgi?id=1042.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.