Bug 1193637 - Use IsMap() in HTMLImageElement::PreHandleEvent; r=mrbkap
This commit is contained in:
@@ -469,12 +469,8 @@ HTMLImageElement::PreHandleEvent(EventChainPreVisitor& aVisitor)
|
||||
// twice, once by the image frame for the map and once by the Anchor
|
||||
// element. (bug 39723)
|
||||
WidgetMouseEvent* mouseEvent = aVisitor.mEvent->AsMouseEvent();
|
||||
if (mouseEvent && mouseEvent->IsLeftClickEvent()) {
|
||||
bool isMap = false;
|
||||
GetIsMap(&isMap);
|
||||
if (isMap) {
|
||||
aVisitor.mEventStatus = nsEventStatus_eConsumeNoDefault;
|
||||
}
|
||||
if (mouseEvent && mouseEvent->IsLeftClickEvent() && IsMap()) {
|
||||
aVisitor.mEventStatus = nsEventStatus_eConsumeNoDefault;
|
||||
}
|
||||
return nsGenericHTMLElement::PreHandleEvent(aVisitor);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user