diff --git a/content/base/public/Element.h b/content/base/public/Element.h index 0cd88e9814a5..5a280dc56a8b 100644 --- a/content/base/public/Element.h +++ b/content/base/public/Element.h @@ -1471,28 +1471,6 @@ NS_IMETHOD MozRemove() MOZ_FINAL \ nsINode::Remove(); \ return NS_OK; \ } \ -using nsINode::GetOnmouseenter; \ -using nsINode::SetOnmouseenter; \ -NS_IMETHOD GetOnmouseenter(JSContext* cx, JS::Value* aOnmouseenter) MOZ_FINAL \ -{ \ - return Element::GetOnmouseenter(cx, aOnmouseenter); \ -} \ -NS_IMETHOD SetOnmouseenter(JSContext* cx, \ - const JS::Value& aOnmouseenter) MOZ_FINAL \ -{ \ - return Element::SetOnmouseenter(cx, aOnmouseenter); \ -} \ -using nsINode::GetOnmouseleave; \ -using nsINode::SetOnmouseleave; \ -NS_IMETHOD GetOnmouseleave(JSContext* cx, JS::Value* aOnmouseleave) MOZ_FINAL \ -{ \ - return Element::GetOnmouseleave(cx, aOnmouseleave); \ -} \ -NS_IMETHOD SetOnmouseleave(JSContext* cx, \ - const JS::Value& aOnmouseleave) MOZ_FINAL \ -{ \ - return Element::SetOnmouseleave(cx, aOnmouseleave); \ -} \ NS_IMETHOD GetClientRects(nsIDOMClientRectList** _retval) MOZ_FINAL \ { \ *_retval = Element::GetClientRects().get(); \ diff --git a/content/base/public/nsINode.h b/content/base/public/nsINode.h index 374d5dd351d5..7f19d4f8f5c8 100644 --- a/content/base/public/nsINode.h +++ b/content/base/public/nsINode.h @@ -1709,9 +1709,7 @@ public: */ #define EVENT(name_, id_, type_, struct_) \ mozilla::dom::EventHandlerNonNull* GetOn##name_(); \ - void SetOn##name_(mozilla::dom::EventHandlerNonNull* listener); \ - NS_IMETHOD GetOn##name_(JSContext *cx, JS::Value *vp); \ - NS_IMETHOD SetOn##name_(JSContext *cx, const JS::Value &v); + void SetOn##name_(mozilla::dom::EventHandlerNonNull* listener); #define TOUCH_EVENT EVENT #define DOCUMENT_ONLY_EVENT EVENT #include "nsEventNameList.h" diff --git a/content/base/public/nsIXMLHttpRequest.idl b/content/base/public/nsIXMLHttpRequest.idl index 4a195c12f097..5ea99210820e 100644 --- a/content/base/public/nsIXMLHttpRequest.idl +++ b/content/base/public/nsIXMLHttpRequest.idl @@ -19,13 +19,6 @@ interface nsIDOMBlob; [scriptable, builtinclass, uuid(ac97e161-9f1d-4163-adc9-e9a59e18682c)] interface nsIXMLHttpRequestEventTarget : nsIDOMEventTarget { // event handler attributes - [implicit_jscontext] attribute jsval onabort; - [implicit_jscontext] attribute jsval onerror; - [implicit_jscontext] attribute jsval onload; - [implicit_jscontext] attribute jsval onloadstart; - [implicit_jscontext] attribute jsval onprogress; - [implicit_jscontext] attribute jsval ontimeout; - [implicit_jscontext] attribute jsval onloadend; }; [scriptable, builtinclass, uuid(df3796fa-d98a-4185-9dda-d2f2b56a5d38)] diff --git a/content/base/src/nsINode.cpp b/content/base/src/nsINode.cpp index 2c3815d9b70e..7cf4f1852873 100644 --- a/content/base/src/nsINode.cpp +++ b/content/base/src/nsINode.cpp @@ -2198,21 +2198,6 @@ nsINode::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const if (elm) { \ elm->SetEventHandler(nsGkAtoms::on##name_, EmptyString(), handler); \ } \ - } \ - NS_IMETHODIMP nsINode::GetOn##name_(JSContext *cx, JS::Value *vp) { \ - EventHandlerNonNull* h = GetOn##name_(); \ - vp->setObjectOrNull(h ? h->Callable().get() : nullptr); \ - return NS_OK; \ - } \ - NS_IMETHODIMP nsINode::SetOn##name_(JSContext *cx, const JS::Value &v) { \ - nsRefPtr handler; \ - JSObject *callable; \ - if (v.isObject() && \ - JS_ObjectIsCallable(cx, callable = &v.toObject())) { \ - handler = new EventHandlerNonNull(callable); \ - } \ - SetOn##name_(handler); \ - return NS_OK; \ } #define TOUCH_EVENT EVENT #define DOCUMENT_ONLY_EVENT EVENT diff --git a/content/base/src/nsXMLHttpRequest.cpp b/content/base/src/nsXMLHttpRequest.cpp index 1abd47205ea4..1988a5494d78 100644 --- a/content/base/src/nsXMLHttpRequest.cpp +++ b/content/base/src/nsXMLHttpRequest.cpp @@ -247,14 +247,6 @@ NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) NS_IMPL_ADDREF_INHERITED(nsXHREventTarget, nsDOMEventTargetHelper) NS_IMPL_RELEASE_INHERITED(nsXHREventTarget, nsDOMEventTargetHelper) -NS_IMPL_EVENT_HANDLER(nsXHREventTarget, loadstart) -NS_IMPL_EVENT_HANDLER(nsXHREventTarget, progress) -NS_IMPL_EVENT_HANDLER(nsXHREventTarget, abort) -NS_IMPL_EVENT_HANDLER(nsXHREventTarget, error) -NS_IMPL_EVENT_HANDLER(nsXHREventTarget, load) -NS_IMPL_EVENT_HANDLER(nsXHREventTarget, timeout) -NS_IMPL_EVENT_HANDLER(nsXHREventTarget, loadend) - void nsXHREventTarget::DisconnectFromOwner() { diff --git a/content/html/content/src/HTMLBodyElement.cpp b/content/html/content/src/HTMLBodyElement.cpp index aba1ff45f6e7..e555b934c525 100644 --- a/content/html/content/src/HTMLBodyElement.cpp +++ b/content/html/content/src/HTMLBodyElement.cpp @@ -485,32 +485,6 @@ HTMLBodyElement::IsEventAttributeName(nsIAtom *aName) // nsGenericHTMLElement::GetOnError returns // already_AddRefed while other getters return // EventHandlerNonNull*, so allow passing in the type to use here. -#define FORWARDED_EVENT_HELPER(name_, forwardto_, type_, getter_type_) \ - NS_IMETHODIMP \ - HTMLBodyElement::GetOn##name_(JSContext *cx, JS::Value *vp) \ - { \ - getter_type_ h = forwardto_::GetOn##name_(); \ - vp->setObjectOrNull(h ? h->Callable().get() : nullptr); \ - return NS_OK; \ - } \ - NS_IMETHODIMP \ - HTMLBodyElement::SetOn##name_(JSContext *cx, const JS::Value &v) \ - { \ - nsRefPtr handler; \ - JSObject *callable; \ - if (v.isObject() && \ - JS_ObjectIsCallable(cx, callable = &v.toObject())) { \ - handler = new type_(callable); \ - } \ - forwardto_::SetOn##name_(handler); \ - return NS_OK; \ - } -#define FORWARDED_EVENT(name_, id_, type_, struct_) \ - FORWARDED_EVENT_HELPER(name_, nsGenericHTMLElement, EventHandlerNonNull, \ - EventHandlerNonNull*) -#define ERROR_EVENT(name_, id_, type_, struct_) \ - FORWARDED_EVENT_HELPER(name_, nsGenericHTMLElement, \ - EventHandlerNonNull, nsCOMPtr) #define WINDOW_EVENT_HELPER(name_, type_) \ type_* \ HTMLBodyElement::GetOn##name_() \ @@ -534,8 +508,7 @@ HTMLBodyElement::IsEventAttributeName(nsIAtom *aName) nsCOMPtr supports = do_QueryInterface(win); \ nsGlobalWindow* globalWin = nsGlobalWindow::FromSupports(supports); \ return globalWin->SetOn##name_(handler); \ - } \ - FORWARDED_EVENT_HELPER(name_, HTMLBodyElement, type_, type_*) + } #define WINDOW_EVENT(name_, id_, type_, struct_) \ WINDOW_EVENT_HELPER(name_, EventHandlerNonNull) #define BEFOREUNLOAD_EVENT(name_, id_, type_, struct_) \ @@ -544,9 +517,6 @@ HTMLBodyElement::IsEventAttributeName(nsIAtom *aName) #undef BEFOREUNLOAD_EVENT #undef WINDOW_EVENT #undef WINDOW_EVENT_HELPER -#undef ERROR_EVENT -#undef FORWARDED_EVENT -#undef FORWARDED_EVENT_HELPER #undef EVENT } // namespace dom diff --git a/content/html/content/src/HTMLBodyElement.h b/content/html/content/src/HTMLBodyElement.h index 7c3595e51b19..4c0b43a1cf70 100644 --- a/content/html/content/src/HTMLBodyElement.h +++ b/content/html/content/src/HTMLBodyElement.h @@ -55,9 +55,6 @@ public: // Event listener stuff; we need to declare only the ones we need to // forward to window that don't come from nsIDOMHTMLBodyElement. #define EVENT(name_, id_, type_, struct_) /* nothing; handled by the shim */ -#define FORWARDED_EVENT(name_, id_, type_, struct_) \ - NS_IMETHOD GetOn##name_(JSContext *cx, JS::Value *vp); \ - NS_IMETHOD SetOn##name_(JSContext *cx, const JS::Value &v); #define WINDOW_EVENT_HELPER(name_, type_) \ type_* GetOn##name_(); \ void SetOn##name_(type_* handler); @@ -69,7 +66,6 @@ public: #undef BEFOREUNLOAD_EVENT #undef WINDOW_EVENT #undef WINDOW_EVENT_HELPER -#undef FORWARDED_EVENT #undef EVENT void GetText(nsString& aText) diff --git a/content/html/content/src/HTMLFrameSetElement.cpp b/content/html/content/src/HTMLFrameSetElement.cpp index efbbfcdb9f2d..1ef25a9940ed 100644 --- a/content/html/content/src/HTMLFrameSetElement.cpp +++ b/content/html/content/src/HTMLFrameSetElement.cpp @@ -345,32 +345,6 @@ HTMLFrameSetElement::IsEventAttributeName(nsIAtom *aName) // nsGenericHTMLElement::GetOnError returns // already_AddRefed while other getters return // EventHandlerNonNull*, so allow passing in the type to use here. -#define FORWARDED_EVENT_HELPER(name_, forwardto_, type_, getter_type_) \ - NS_IMETHODIMP \ - HTMLFrameSetElement::GetOn##name_(JSContext *cx, JS::Value *vp) \ - { \ - getter_type_ h = forwardto_::GetOn##name_(); \ - vp->setObjectOrNull(h ? h->Callable().get() : nullptr); \ - return NS_OK; \ - } \ - NS_IMETHODIMP \ - HTMLFrameSetElement::SetOn##name_(JSContext *cx, const JS::Value &v) \ - { \ - nsRefPtr handler; \ - JSObject *callable; \ - if (v.isObject() && \ - JS_ObjectIsCallable(cx, callable = &v.toObject())) { \ - handler = new type_(callable); \ - } \ - forwardto_::SetOn##name_(handler); \ - return NS_OK; \ - } -#define FORWARDED_EVENT(name_, id_, type_, struct_) \ - FORWARDED_EVENT_HELPER(name_, nsGenericHTMLElement, EventHandlerNonNull, \ - EventHandlerNonNull*) -#define ERROR_EVENT(name_, id_, type_, struct_) \ - FORWARDED_EVENT_HELPER(name_, nsGenericHTMLElement, \ - EventHandlerNonNull, nsCOMPtr) #define WINDOW_EVENT_HELPER(name_, type_) \ type_* \ HTMLFrameSetElement::GetOn##name_() \ @@ -394,8 +368,7 @@ HTMLFrameSetElement::IsEventAttributeName(nsIAtom *aName) nsCOMPtr supports = do_QueryInterface(win); \ nsGlobalWindow* globalWin = nsGlobalWindow::FromSupports(supports); \ return globalWin->SetOn##name_(handler); \ - } \ - FORWARDED_EVENT_HELPER(name_, HTMLFrameSetElement, type_, type_*) + } #define WINDOW_EVENT(name_, id_, type_, struct_) \ WINDOW_EVENT_HELPER(name_, EventHandlerNonNull) #define BEFOREUNLOAD_EVENT(name_, id_, type_, struct_) \ @@ -404,9 +377,6 @@ HTMLFrameSetElement::IsEventAttributeName(nsIAtom *aName) #undef BEFOREUNLOAD_EVENT #undef WINDOW_EVENT #undef WINDOW_EVENT_HELPER -#undef ERROR_EVENT -#undef FORWARDED_EVENT -#undef FORWARDED_EVENT_HELPER #undef EVENT } // namespace dom diff --git a/content/html/content/src/HTMLFrameSetElement.h b/content/html/content/src/HTMLFrameSetElement.h index 5936fdaefd11..261b5d4c4549 100644 --- a/content/html/content/src/HTMLFrameSetElement.h +++ b/content/html/content/src/HTMLFrameSetElement.h @@ -85,9 +85,6 @@ public: // Event listener stuff; we need to declare only the ones we need to // forward to window that don't come from nsIDOMHTMLFrameSetElement. #define EVENT(name_, id_, type_, struct_) /* nothing; handled by the superclass */ -#define FORWARDED_EVENT(name_, id_, type_, struct_) \ - NS_IMETHOD GetOn##name_(JSContext *cx, JS::Value *vp); \ - NS_IMETHOD SetOn##name_(JSContext *cx, const JS::Value &v); #define WINDOW_EVENT_HELPER(name_, type_) \ type_* GetOn##name_(); \ void SetOn##name_(type_* handler); @@ -99,7 +96,6 @@ public: #undef BEFOREUNLOAD_EVENT #undef WINDOW_EVENT #undef WINDOW_EVENT_HELPER -#undef FORWARDED_EVENT #undef EVENT // These override the SetAttr methods in nsGenericHTMLElement (need diff --git a/dom/base/nsScreen.cpp b/dom/base/nsScreen.cpp index 63ec0ba4ea88..f9a9c7b6188b 100644 --- a/dom/base/nsScreen.cpp +++ b/dom/base/nsScreen.cpp @@ -81,8 +81,6 @@ NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper) NS_IMPL_ADDREF_INHERITED(nsScreen, nsDOMEventTargetHelper) NS_IMPL_RELEASE_INHERITED(nsScreen, nsDOMEventTargetHelper) -NS_IMPL_EVENT_HANDLER(nsScreen, mozorientationchange) - int32_t nsScreen::GetPixelDepth(ErrorResult& aRv) { diff --git a/dom/interfaces/base/nsIDOMScreen.idl b/dom/interfaces/base/nsIDOMScreen.idl index a981996dd207..111c1954920f 100644 --- a/dom/interfaces/base/nsIDOMScreen.idl +++ b/dom/interfaces/base/nsIDOMScreen.idl @@ -5,7 +5,7 @@ #include "nsIDOMEventTarget.idl" -[scriptable, builtinclass, uuid(310a1d9a-4271-4d85-9e35-9dae6683b2c1)] +[scriptable, builtinclass, uuid(bcdf4ce4-9785-4e31-a851-1d51ea16da20)] interface nsIDOMScreen : nsIDOMEventTarget { readonly attribute long top; @@ -27,8 +27,6 @@ interface nsIDOMScreen : nsIDOMEventTarget [binaryname(SlowMozOrientation)] readonly attribute DOMString mozOrientation; - [implicit_jscontext] attribute jsval onmozorientationchange; - /** * Lock the screen to the specified orientations(s). This method returns true * if the lock was acquired successfully, and false otherwise. diff --git a/dom/interfaces/core/nsIDOMElement.idl b/dom/interfaces/core/nsIDOMElement.idl index fb7ecd551993..e7471968770d 100644 --- a/dom/interfaces/core/nsIDOMElement.idl +++ b/dom/interfaces/core/nsIDOMElement.idl @@ -15,7 +15,7 @@ interface nsIDOMMozNamedAttrMap; * http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#interface-element */ -[scriptable, uuid(c3646b5d-a07d-470a-8e40-784459833c9f)] +[scriptable, uuid(989422ef-120d-4d29-8a56-6aa2505a8b02)] interface nsIDOMElement : nsIDOMNode { readonly attribute DOMString tagName; @@ -80,12 +80,6 @@ interface nsIDOMElement : nsIDOMNode [binaryname(MozRemove)] void remove(); - - // HTML - [implicit_jscontext] attribute jsval onmouseenter; - [implicit_jscontext] attribute jsval onmouseleave; - - // CSSOM View /** * Retrieve a list of rectangles, one for each CSS border-box associated with diff --git a/dom/interfaces/html/nsIDOMHTMLBodyElement.idl b/dom/interfaces/html/nsIDOMHTMLBodyElement.idl index 488137a98ad4..4e63a3a61c4c 100644 --- a/dom/interfaces/html/nsIDOMHTMLBodyElement.idl +++ b/dom/interfaces/html/nsIDOMHTMLBodyElement.idl @@ -20,7 +20,7 @@ * http://www.whatwg.org/specs/web-apps/current-work/ */ -[scriptable, uuid(cc19f3c8-82fe-4337-8174-d4cde5bedcee)] +[scriptable, uuid(068630db-2c00-43dd-b167-495757a88236)] interface nsIDOMHTMLBodyElement : nsISupports { attribute DOMString aLink; @@ -29,23 +29,4 @@ interface nsIDOMHTMLBodyElement : nsISupports attribute DOMString link; attribute DOMString text; attribute DOMString vLink; - - [implicit_jscontext] attribute jsval onafterprint; - [implicit_jscontext] attribute jsval onbeforeprint; - [implicit_jscontext] attribute jsval onbeforeunload; - [implicit_jscontext] attribute jsval onhashchange; - [implicit_jscontext] attribute jsval onmessage; - [implicit_jscontext] attribute jsval onoffline; - [implicit_jscontext] attribute jsval ononline; - [implicit_jscontext] attribute jsval onpagehide; - [implicit_jscontext] attribute jsval onpageshow; - [implicit_jscontext] attribute jsval onpopstate; - // Not supported yet - // [implicit_jscontext] attribute jsval onredo; - [implicit_jscontext] attribute jsval onresize; - // Not supported yet - // [implicit_jscontext] attribute jsval onstorage; - // Not supported yet - // [implicit_jscontext] attribute jsval onundo; - [implicit_jscontext] attribute jsval onunload; }; diff --git a/dom/interfaces/html/nsIDOMHTMLFrameSetElement.idl b/dom/interfaces/html/nsIDOMHTMLFrameSetElement.idl index 21be13197aa0..4b0fcbcf646f 100644 --- a/dom/interfaces/html/nsIDOMHTMLFrameSetElement.idl +++ b/dom/interfaces/html/nsIDOMHTMLFrameSetElement.idl @@ -20,28 +20,9 @@ * http://www.whatwg.org/specs/web-apps/current-work/ */ -[scriptable, uuid(aea59d1c-ff6f-4b26-88dc-2f9b4be1a138)] +[scriptable, uuid(14b29269-c387-4cff-8463-b0871ca0be3a)] interface nsIDOMHTMLFrameSetElement : nsISupports { attribute DOMString cols; attribute DOMString rows; - - [implicit_jscontext] attribute jsval onafterprint; - [implicit_jscontext] attribute jsval onbeforeprint; - [implicit_jscontext] attribute jsval onbeforeunload; - [implicit_jscontext] attribute jsval onhashchange; - [implicit_jscontext] attribute jsval onmessage; - [implicit_jscontext] attribute jsval onoffline; - [implicit_jscontext] attribute jsval ononline; - [implicit_jscontext] attribute jsval onpagehide; - [implicit_jscontext] attribute jsval onpageshow; - [implicit_jscontext] attribute jsval onpopstate; - // Not supported yet - // [implicit_jscontext] attribute jsval onredo; - [implicit_jscontext] attribute jsval onresize; - // Not supported yet - // [implicit_jscontext] attribute jsval onstorage; - // Not supported yet - // [implicit_jscontext] attribute jsval onundo; - [implicit_jscontext] attribute jsval onunload; };