зеркало из https://github.com/mozilla/gecko-dev.git
Bug 922160 - Bring EventHandler.webidl more in line with the spec, remove NodeEventHandlers. r=bz.
--HG-- extra : rebase_source : 9cfba32241add4c79d67fb0323178228b00bf631
This commit is contained in:
Родитель
57e0597683
Коммит
20d1345d89
2
CLOBBER
2
CLOBBER
|
@ -18,4 +18,4 @@
|
|||
# Modifying this file will now automatically clobber the buildbot machines \o/
|
||||
#
|
||||
|
||||
Bug 899574 needed a clobber on every platform because we can't have nice things
|
||||
Bug 922160 needs a clobber due to WebIDL binding dependency issues (bug 928195).
|
||||
|
|
|
@ -1465,6 +1465,8 @@ 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); \
|
||||
|
@ -1474,6 +1476,8 @@ NS_IMETHOD SetOnmouseenter(JSContext* cx, \
|
|||
{ \
|
||||
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); \
|
||||
|
|
|
@ -135,9 +135,6 @@ public:
|
|||
|
||||
virtual bool IsEventAttributeName(nsIAtom* aName) MOZ_OVERRIDE;
|
||||
|
||||
private:
|
||||
nsresult GetColorHelper(nsIAtom* aAtom, nsAString& aColor);
|
||||
|
||||
protected:
|
||||
virtual JSObject* WrapNode(JSContext *aCx,
|
||||
JS::Handle<JSObject*> aScope) MOZ_OVERRIDE;
|
||||
|
|
|
@ -139,8 +139,6 @@ partial interface Document {
|
|||
[LenientThis] attribute EventHandler onreadystatechange;
|
||||
|
||||
// Gecko extensions?
|
||||
[LenientThis] attribute EventHandler onmouseenter;
|
||||
[LenientThis] attribute EventHandler onmouseleave;
|
||||
attribute EventHandler onwheel;
|
||||
attribute EventHandler oncopy;
|
||||
attribute EventHandler oncut;
|
||||
|
@ -335,6 +333,6 @@ partial interface Document {
|
|||
|
||||
Document implements XPathEvaluator;
|
||||
Document implements GlobalEventHandlers;
|
||||
Document implements NodeEventHandlers;
|
||||
Document implements TouchEventHandlers;
|
||||
Document implements ParentNode;
|
||||
Document implements OnErrorEventHandlerForNodes;
|
||||
|
|
|
@ -71,10 +71,6 @@ interface Element : Node {
|
|||
|
||||
// Mozilla specific stuff
|
||||
|
||||
[LenientThis]
|
||||
attribute EventHandler onmouseenter;
|
||||
[LenientThis]
|
||||
attribute EventHandler onmouseleave;
|
||||
attribute EventHandler onwheel;
|
||||
|
||||
// Selectors API
|
||||
|
|
|
@ -15,6 +15,8 @@ callback EventHandlerNonNull = any (Event event);
|
|||
typedef EventHandlerNonNull? EventHandler;
|
||||
|
||||
[TreatNonCallableAsNull]
|
||||
// https://www.w3.org/Bugs/Public/show_bug.cgi?id=23489
|
||||
//callback OnBeforeUnloadEventHandlerNonNull = DOMString (Event event);
|
||||
callback OnBeforeUnloadEventHandlerNonNull = DOMString? (Event event);
|
||||
typedef OnBeforeUnloadEventHandlerNonNull? OnBeforeUnloadEventHandler;
|
||||
|
||||
|
@ -25,21 +27,24 @@ typedef OnErrorEventHandlerNonNull? OnErrorEventHandler;
|
|||
[NoInterfaceObject]
|
||||
interface GlobalEventHandlers {
|
||||
attribute EventHandler onabort;
|
||||
//(Not implemented)[SetterThrows]
|
||||
attribute EventHandler onblur;
|
||||
// We think the spec is wrong here. See OnErrorEventHandlerForNodes/Window
|
||||
// below.
|
||||
// attribute OnErrorEventHandler onerror;
|
||||
attribute EventHandler onfocus;
|
||||
//(Not implemented)attribute EventHandler oncancel;
|
||||
attribute EventHandler oncanplay;
|
||||
attribute EventHandler oncanplaythrough;
|
||||
attribute EventHandler onchange;
|
||||
attribute EventHandler onclick;
|
||||
//(Not implemented)[SetterThrows]
|
||||
//(Not implemented)attribute EventHandler onclose;
|
||||
attribute EventHandler oncontextmenu;
|
||||
//(Not implemented)[SetterThrows]
|
||||
//(Not implemented)attribute EventHandler oncuechange;
|
||||
attribute EventHandler ondblclick;
|
||||
attribute EventHandler ondrag;
|
||||
attribute EventHandler ondragend;
|
||||
attribute EventHandler ondragenter;
|
||||
//(Not implemented)attribute EventHandler ondragexit;
|
||||
attribute EventHandler ondragleave;
|
||||
attribute EventHandler ondragover;
|
||||
attribute EventHandler ondragstart;
|
||||
|
@ -52,15 +57,17 @@ interface GlobalEventHandlers {
|
|||
attribute EventHandler onkeydown;
|
||||
attribute EventHandler onkeypress;
|
||||
attribute EventHandler onkeyup;
|
||||
attribute EventHandler onload;
|
||||
attribute EventHandler onloadeddata;
|
||||
attribute EventHandler onloadedmetadata;
|
||||
attribute EventHandler onloadstart;
|
||||
attribute EventHandler onmousedown;
|
||||
[LenientThis] attribute EventHandler onmouseenter;
|
||||
[LenientThis] attribute EventHandler onmouseleave;
|
||||
attribute EventHandler onmousemove;
|
||||
attribute EventHandler onmouseout;
|
||||
attribute EventHandler onmouseover;
|
||||
attribute EventHandler onmouseup;
|
||||
//(Not implemented)[SetterThrows]
|
||||
//(Not implemented)attribute EventHandler onmousewheel;
|
||||
attribute EventHandler onpause;
|
||||
attribute EventHandler onplay;
|
||||
|
@ -68,11 +75,11 @@ interface GlobalEventHandlers {
|
|||
attribute EventHandler onprogress;
|
||||
attribute EventHandler onratechange;
|
||||
attribute EventHandler onreset;
|
||||
attribute EventHandler onscroll;
|
||||
attribute EventHandler onseeked;
|
||||
attribute EventHandler onseeking;
|
||||
attribute EventHandler onselect;
|
||||
attribute EventHandler onshow;
|
||||
//(Not implemented)[SetterThrows]
|
||||
//(Not implemented)attribute EventHandler onsort;
|
||||
attribute EventHandler onstalled;
|
||||
attribute EventHandler onsubmit;
|
||||
|
@ -88,30 +95,11 @@ interface GlobalEventHandlers {
|
|||
attribute EventHandler onmozpointerlockerror;
|
||||
};
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface NodeEventHandlers {
|
||||
attribute EventHandler onblur;
|
||||
// We think the spec is wrong here.
|
||||
// attribute OnErrorEventHandler onerror;
|
||||
attribute EventHandler onerror;
|
||||
attribute EventHandler onfocus;
|
||||
attribute EventHandler onload;
|
||||
attribute EventHandler onscroll;
|
||||
};
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface WindowEventHandlers {
|
||||
attribute EventHandler onafterprint;
|
||||
attribute EventHandler onbeforeprint;
|
||||
attribute OnBeforeUnloadEventHandler onbeforeunload;
|
||||
// For now, onerror comes from NodeEventHandlers
|
||||
// When we convert Window to WebIDL this may need to change.
|
||||
// [SetterThrows]
|
||||
// attribute OnErrorEventHandler onerror;
|
||||
//(Not implemented)[SetterThrows]
|
||||
//(Not implemented)attribute EventHandler onfullscreenchange;
|
||||
//(Not implemented)[SetterThrows]
|
||||
//(Not implemented)attribute EventHandler onfullscreenerror;
|
||||
attribute EventHandler onhashchange;
|
||||
attribute EventHandler onmessage;
|
||||
attribute EventHandler onoffline;
|
||||
|
@ -120,7 +108,21 @@ interface WindowEventHandlers {
|
|||
attribute EventHandler onpageshow;
|
||||
attribute EventHandler onpopstate;
|
||||
attribute EventHandler onresize;
|
||||
//(Not implemented)[SetterThrows]
|
||||
//(Not implemented)attribute EventHandler onstorage;
|
||||
attribute EventHandler onunload;
|
||||
};
|
||||
|
||||
// The spec has |attribute OnErrorEventHandler onerror;| on
|
||||
// GlobalEventHandlers, and calls the handler differently depending on
|
||||
// whether an ErrorEvent was fired. We don't do that, and until we do we'll
|
||||
// need to distinguish between onerror on Window or on nodes.
|
||||
|
||||
[NoInterfaceObject]
|
||||
interface OnErrorEventHandlerForNodes {
|
||||
attribute EventHandler onerror;
|
||||
};
|
||||
|
||||
//[NoInterfaceObject]
|
||||
//interface OnErrorEventHandlerForWindow {
|
||||
// attribute OnErrorEventHandler onerror;
|
||||
//};
|
||||
|
|
|
@ -111,7 +111,7 @@ interface TouchEventHandlers {
|
|||
};
|
||||
|
||||
HTMLElement implements GlobalEventHandlers;
|
||||
HTMLElement implements NodeEventHandlers;
|
||||
HTMLElement implements TouchEventHandlers;
|
||||
HTMLElement implements OnErrorEventHandlerForNodes;
|
||||
|
||||
interface HTMLUnknownElement : HTMLElement {};
|
||||
|
|
|
@ -33,5 +33,5 @@ interface SVGElement : Element {
|
|||
};
|
||||
|
||||
SVGElement implements GlobalEventHandlers;
|
||||
SVGElement implements NodeEventHandlers;
|
||||
SVGElement implements TouchEventHandlers;
|
||||
SVGElement implements OnErrorEventHandlerForNodes;
|
||||
|
|
|
@ -8,3 +8,5 @@
|
|||
*/
|
||||
|
||||
callback FrameRequestCallback = void (DOMHighResTimeStamp time);
|
||||
|
||||
//Window implements OnErrorEventHandlerForWindow;
|
||||
|
|
|
@ -128,6 +128,6 @@ interface MozFrameLoaderOwner {
|
|||
};
|
||||
|
||||
XULElement implements GlobalEventHandlers;
|
||||
XULElement implements NodeEventHandlers;
|
||||
XULElement implements TouchEventHandlers;
|
||||
XULElement implements MozFrameLoaderOwner;
|
||||
XULElement implements OnErrorEventHandlerForNodes;
|
||||
|
|
Загрузка…
Ссылка в новой задаче