diff --git a/content/events/src/nsDOMEvent.cpp b/content/events/src/nsDOMEvent.cpp index 565f9829e0b9..bf0cfb2d33de 100644 --- a/content/events/src/nsDOMEvent.cpp +++ b/content/events/src/nsDOMEvent.cpp @@ -1237,6 +1237,9 @@ nsDOMEvent::SetEventType(const nsAString& aEventTypeArg) else if (atom == nsLayoutAtoms::onclick && mEvent->eventStructType == NS_MOUSE_EVENT) { mEvent->message = NS_MOUSE_LEFT_CLICK; } + else if (atom == nsLayoutAtoms::ondblclick && mEvent->eventStructType == NS_MOUSE_EVENT) { + mEvent->message = NS_MOUSE_LEFT_DOUBLECLICK; + } else if (atom == nsLayoutAtoms::onmouseover && mEvent->eventStructType == NS_MOUSE_EVENT) { mEvent->message = NS_MOUSE_ENTER_SYNTH; } diff --git a/dom/src/base/nsDOMClassInfo.cpp b/dom/src/base/nsDOMClassInfo.cpp index a19426816522..d7dfb46b0837 100644 --- a/dom/src/base/nsDOMClassInfo.cpp +++ b/dom/src/base/nsDOMClassInfo.cpp @@ -857,6 +857,7 @@ jsval nsDOMClassInfo::sName_id = JSVAL_VOID; jsval nsDOMClassInfo::sOnmousedown_id = JSVAL_VOID; jsval nsDOMClassInfo::sOnmouseup_id = JSVAL_VOID; jsval nsDOMClassInfo::sOnclick_id = JSVAL_VOID; +jsval nsDOMClassInfo::sOndblclick_id = JSVAL_VOID; jsval nsDOMClassInfo::sOncontextmenu_id = JSVAL_VOID; jsval nsDOMClassInfo::sOnmouseover_id = JSVAL_VOID; jsval nsDOMClassInfo::sOnmouseout_id = JSVAL_VOID; @@ -959,6 +960,7 @@ nsDOMClassInfo::DefineStaticJSVals(JSContext *cx) SET_JSVAL_TO_STRING(sOnmousedown_id, cx, "onmousedown"); SET_JSVAL_TO_STRING(sOnmouseup_id, cx, "onmouseup"); SET_JSVAL_TO_STRING(sOnclick_id, cx, "onclick"); + SET_JSVAL_TO_STRING(sOndblclick_id, cx, "ondblclick"); SET_JSVAL_TO_STRING(sOncontextmenu_id, cx, "oncontextmenu"); SET_JSVAL_TO_STRING(sOnmouseover_id, cx, "onmouseover"); SET_JSVAL_TO_STRING(sOnmouseout_id, cx, "onmouseout"); @@ -2796,6 +2798,7 @@ nsDOMClassInfo::ShutDown() sOnmousedown_id = JSVAL_VOID; sOnmouseup_id = JSVAL_VOID; sOnclick_id = JSVAL_VOID; + sOndblclick_id = JSVAL_VOID; sOncontextmenu_id = JSVAL_VOID; sOnmouseover_id = JSVAL_VOID; sOnmouseout_id = JSVAL_VOID; @@ -4445,6 +4448,8 @@ nsEventReceiverSH::ReallyIsEventName(jsval id, jschar aFirstChar) return ((id == sOnchange_id) || (id == sOnclick_id) || (id == sOncontextmenu_id)); + case 'd' : + return id == sOndblclick_id; case 'l' : return id == sOnload_id; case 'p' : diff --git a/dom/src/base/nsDOMClassInfo.h b/dom/src/base/nsDOMClassInfo.h index 4d50ec4ee080..a0d6fef37b5e 100644 --- a/dom/src/base/nsDOMClassInfo.h +++ b/dom/src/base/nsDOMClassInfo.h @@ -226,6 +226,7 @@ protected: static jsval sOnmousedown_id; static jsval sOnmouseup_id; static jsval sOnclick_id; + static jsval sOndblclick_id; static jsval sOncontextmenu_id; static jsval sOnmouseover_id; static jsval sOnmouseout_id;