Backed out changeset dddecb33b337 (bug 922160)
authorEd Morley <emorley@mozilla.com>
Wed, 23 Oct 2013 15:51:18 +0100
changeset 166635 196dfb8211f5a8d27a56c6f99655378622cd26cf
parent 166634 6817b1c1439f168abf8a9592a4a9298ef807f4f9
child 166636 0eec634d93ea987724c1a665940ff429e1c58f4e
push id428
push userbbajaj@mozilla.com
push dateTue, 28 Jan 2014 00:16:25 +0000
treeherdermozilla-release@cd72a7ff3a75 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs922160
milestone27.0a1
backs outdddecb33b3372783a61abf7f5b24cc9bafb76f6d
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset dddecb33b337 (bug 922160)
content/base/public/Element.h
content/html/content/src/HTMLBodyElement.h
dom/webidl/Document.webidl
dom/webidl/Element.webidl
dom/webidl/EventHandler.webidl
dom/webidl/HTMLElement.webidl
dom/webidl/SVGElement.webidl
dom/webidl/Window.webidl
dom/webidl/XULElement.webidl
--- a/content/base/public/Element.h
+++ b/content/base/public/Element.h
@@ -1460,29 +1460,25 @@ NS_IMETHOD GetChildElementCount(uint32_t
   *aChildElementCount = Element::ChildElementCount();                         \
   return NS_OK;                                                               \
 }                                                                             \
 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);                         \
--- a/content/html/content/src/HTMLBodyElement.h
+++ b/content/html/content/src/HTMLBodyElement.h
@@ -130,16 +130,19 @@ public:
   virtual nsMapRuleToAttributesFunc GetAttributeMappingFunction() const MOZ_OVERRIDE;
   NS_IMETHOD WalkContentStyleRules(nsRuleWalker* aRuleWalker) MOZ_OVERRIDE;
   NS_IMETHOD_(bool) IsAttributeMapped(const nsIAtom* aAttribute) const MOZ_OVERRIDE;
   virtual already_AddRefed<nsIEditor> GetAssociatedEditor() MOZ_OVERRIDE;
   virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const MOZ_OVERRIDE;
 
   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;
 
   nsRefPtr<BodyRule> mContentStyleRule;
 };
 
 } // namespace dom
--- a/dom/webidl/Document.webidl
+++ b/dom/webidl/Document.webidl
@@ -134,16 +134,18 @@ partial interface Document {
   //(HTML only)boolean queryCommandSupported(DOMString commandId);
   //(HTML only)DOMString queryCommandValue(DOMString commandId);
   //(Not implemented)readonly attribute HTMLCollection commands;
 
   // special event handler IDL attributes that only apply to Document objects
   [LenientThis] attribute EventHandler onreadystatechange;
 
   // Gecko extensions?
+  [LenientThis] attribute EventHandler onmouseenter;
+  [LenientThis] attribute EventHandler onmouseleave;
                 attribute EventHandler onwheel;
                 attribute EventHandler oncopy;
                 attribute EventHandler oncut;
                 attribute EventHandler onpaste;
                 attribute EventHandler onbeforescriptexecute;
                 attribute EventHandler onafterscriptexecute;
   /**
    * True if this document is synthetic : stand alone image, video, audio file,
@@ -328,11 +330,11 @@ partial interface Document {
 // Extension to give chrome JS the ability to determine when a document was
 // created to satisfy an iframe with srcdoc attribute.
 partial interface Document {
   [ChromeOnly] readonly attribute boolean isSrcdocDocument;
 };
 
 Document implements XPathEvaluator;
 Document implements GlobalEventHandlers;
+Document implements NodeEventHandlers;
 Document implements TouchEventHandlers;
 Document implements ParentNode;
-Document implements OnErrorEventHandlerForNodes;
--- a/dom/webidl/Element.webidl
+++ b/dom/webidl/Element.webidl
@@ -66,16 +66,20 @@ interface Element : Node {
    *       font size inflation data for the element's _primary frame_, not the
    *       element itself, but for most purposes, this should be sufficient.
    */
   [ChromeOnly]
   readonly attribute float fontSizeInflation;
 
   // Mozilla specific stuff
 
+  [LenientThis]
+           attribute EventHandler onmouseenter;
+  [LenientThis]
+           attribute EventHandler onmouseleave;
            attribute EventHandler onwheel;
 
   // Selectors API
   /**
    * Returns whether this element would be selected by the given selector
    * string.
    *
    * See <http://dev.w3.org/2006/webapi/selectors-api2/#matchesselector>
--- a/dom/webidl/EventHandler.webidl
+++ b/dom/webidl/EventHandler.webidl
@@ -10,119 +10,117 @@
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 [TreatNonCallableAsNull]
 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;
 
 [TreatNonCallableAsNull]
 callback OnErrorEventHandlerNonNull = boolean ((Event or DOMString) event, optional DOMString source, optional unsigned long lineno, optional unsigned long column);
 typedef OnErrorEventHandlerNonNull? OnErrorEventHandler;
 
 [NoInterfaceObject]
 interface GlobalEventHandlers {
            attribute EventHandler onabort;
-           attribute EventHandler onblur;
-// We think the spec is wrong here. See OnErrorEventHandlerForNodes/Window
-// below.
-//         attribute OnErrorEventHandler onerror;
-           attribute EventHandler onfocus;
+           //(Not implemented)[SetterThrows]
            //(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;
            attribute EventHandler ondrop;
            attribute EventHandler ondurationchange;
            attribute EventHandler onemptied;
            attribute EventHandler onended;
            attribute EventHandler oninput;
            attribute EventHandler oninvalid;
            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;
            attribute EventHandler onplaying;
            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;
            attribute EventHandler onsuspend;
            attribute EventHandler ontimeupdate;
            attribute EventHandler onvolumechange;
            attribute EventHandler onwaiting;
 
            // Mozilla-specific handlers
            attribute EventHandler onmozfullscreenchange;
            attribute EventHandler onmozfullscreenerror;
            attribute EventHandler onmozpointerlockchange;
            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;
            attribute EventHandler ononline;
            attribute EventHandler onpagehide;
            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;
-//};
--- a/dom/webidl/HTMLElement.webidl
+++ b/dom/webidl/HTMLElement.webidl
@@ -106,12 +106,12 @@ interface TouchEventHandlers {
            attribute EventHandler ontouchenter;
   [Func="nsGenericHTMLElement::TouchEventsEnabled"]
            attribute EventHandler ontouchleave;
   [Func="nsGenericHTMLElement::TouchEventsEnabled"]
            attribute EventHandler ontouchcancel;
 };
 
 HTMLElement implements GlobalEventHandlers;
+HTMLElement implements NodeEventHandlers;
 HTMLElement implements TouchEventHandlers;
-HTMLElement implements OnErrorEventHandlerForNodes;
 
 interface HTMLUnknownElement : HTMLElement {};
--- a/dom/webidl/SVGElement.webidl
+++ b/dom/webidl/SVGElement.webidl
@@ -28,10 +28,10 @@ interface SVGElement : Element {
   readonly attribute SVGElement? viewportElement;
 
            attribute EventHandler oncopy;
            attribute EventHandler oncut;
            attribute EventHandler onpaste;
 };
 
 SVGElement implements GlobalEventHandlers;
+SVGElement implements NodeEventHandlers;
 SVGElement implements TouchEventHandlers;
-SVGElement implements OnErrorEventHandlerForNodes;
--- a/dom/webidl/Window.webidl
+++ b/dom/webidl/Window.webidl
@@ -3,10 +3,8 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is:
  * https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/RequestAnimationFrame/Overview.html
  */
 
 callback FrameRequestCallback = void (DOMHighResTimeStamp time);
-
-//Window implements OnErrorEventHandlerForWindow;
--- a/dom/webidl/XULElement.webidl
+++ b/dom/webidl/XULElement.webidl
@@ -123,11 +123,11 @@ interface MozFrameLoaderOwner {
   [ChromeOnly]
   readonly attribute MozFrameLoader? frameLoader;
 
   [ChromeOnly, Throws]
   void swapFrameLoaders(XULElement aOtherOwner);
 };
 
 XULElement implements GlobalEventHandlers;
+XULElement implements NodeEventHandlers;
 XULElement implements TouchEventHandlers;
 XULElement implements MozFrameLoaderOwner;
-XULElement implements OnErrorEventHandlerForNodes;