Bug 829072 part 3. Move the event handlers that are shared by HTMLBodyElement, HTMLFramesetElement, and Window onto a WindowEventHandlers interface that can be on the RHS of 'implements'. r=peterv
authorBoris Zbarsky <bzbarsky@mit.edu>
Tue, 29 Jan 2013 08:44:00 -0500
changeset 130086 ac96e7915fb41ec082f62e30c59e38fa05fbb334
parent 130085 a3a09614f5327f84df72be65aab5a0c82507d4fb
child 130087 9f934db4606ab209ceaa702129f1318934cd8aba
push id2323
push userbbajaj@mozilla.com
push dateMon, 01 Apr 2013 19:47:02 +0000
treeherdermozilla-beta@7712be144d91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspeterv
bugs829072
milestone21.0a1
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
Bug 829072 part 3. Move the event handlers that are shared by HTMLBodyElement, HTMLFramesetElement, and Window onto a WindowEventHandlers interface that can be on the RHS of 'implements'. r=peterv
dom/webidl/EventHandler.webidl
dom/webidl/HTMLBodyElement.webidl
dom/webidl/HTMLFrameSetElement.webidl
--- a/dom/webidl/EventHandler.webidl
+++ b/dom/webidl/EventHandler.webidl
@@ -148,8 +148,46 @@ interface NodeEventHandlers {
            attribute EventHandler onerror;
            [SetterThrows]
            attribute EventHandler onfocus;
            [SetterThrows]
            attribute EventHandler onload;
            [SetterThrows]
            attribute EventHandler onscroll;
 };
+
+[NoInterfaceObject]
+interface WindowEventHandlers {
+           [SetterThrows]
+           attribute EventHandler onafterprint;
+           [SetterThrows]
+           attribute EventHandler onbeforeprint;
+           [SetterThrows]
+           attribute BeforeUnloadEventHandler 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;
+           [SetterThrows]
+           attribute EventHandler onhashchange;
+           [SetterThrows]
+           attribute EventHandler onmessage;
+           [SetterThrows]
+           attribute EventHandler onoffline;
+           [SetterThrows]
+           attribute EventHandler ononline;
+           [SetterThrows]
+           attribute EventHandler onpagehide;
+           [SetterThrows]
+           attribute EventHandler onpageshow;
+           [SetterThrows]
+           attribute EventHandler onpopstate;
+           [SetterThrows]
+           attribute EventHandler onresize;
+           //(Not implemented)[SetterThrows]
+           //(Not implemented)attribute EventHandler onstorage;
+           [SetterThrows]
+           attribute EventHandler onunload;
+};
--- a/dom/webidl/HTMLBodyElement.webidl
+++ b/dom/webidl/HTMLBodyElement.webidl
@@ -7,54 +7,20 @@
  * http://www.whatwg.org/specs/web-apps/current-work/
  *
  * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
  * Opera Software ASA. You are granted a license to use, reproduce
  * and create derivative works of this document.
  */
 
 interface HTMLBodyElement : HTMLElement {
-  [SetterThrows]
-  attribute EventHandler onafterprint;
-  [SetterThrows]
-  attribute EventHandler onbeforeprint;
-  [SetterThrows]
-  attribute BeforeUnloadEventHandler onbeforeunload;
-  //[SetterThrows]
-  //attribute EventHandler onblur;
-  //[SetterThrows]
-  //attribute OnErrorEventHandler onerror;
-  //[SetterThrows]
-  //attribute EventHandler onfocus;
-  [SetterThrows]
-  attribute EventHandler onhashchange;
-  //[SetterThrows]
-  //attribute EventHandler onload;
-  [SetterThrows]
-  attribute EventHandler onmessage;
-  [SetterThrows]
-  attribute EventHandler onoffline;
-  [SetterThrows]
-  attribute EventHandler ononline;
-  [SetterThrows]
-  attribute EventHandler onpopstate;
-  [SetterThrows]
-  attribute EventHandler onpagehide;
-  [SetterThrows]
-  attribute EventHandler onpageshow;
-  [SetterThrows]
-  attribute EventHandler onresize;
-  //[SetterThrows]
-  //attribute EventHandler onscroll;
-  //[SetterThrows]
-  //attribute EventHandler onstorage;
-  [SetterThrows]
-  attribute EventHandler onunload;
 };
 
 partial interface HTMLBodyElement {
   [TreatNullAs=EmptyString, SetterThrows] attribute DOMString text;
   [TreatNullAs=EmptyString, SetterThrows] attribute DOMString link;
   [TreatNullAs=EmptyString, SetterThrows] attribute DOMString vLink;
   [TreatNullAs=EmptyString, SetterThrows] attribute DOMString aLink;
   [TreatNullAs=EmptyString, SetterThrows] attribute DOMString bgColor;
   [SetterThrows]                          attribute DOMString background;
 };
+
+HTMLBodyElement implements WindowEventHandlers;
--- a/dom/webidl/HTMLFrameSetElement.webidl
+++ b/dom/webidl/HTMLFrameSetElement.webidl
@@ -11,44 +11,11 @@
  * and create derivative works of this document.
  */
 
 interface HTMLFrameSetElement : HTMLElement {
   [SetterThrows]
   attribute DOMString cols;
   [SetterThrows]
   attribute DOMString rows;
-  [SetterThrows]
-  attribute EventHandler onafterprint;
-  [SetterThrows]
-  attribute EventHandler onbeforeprint;
-  [SetterThrows]
-  attribute BeforeUnloadEventHandler onbeforeunload;
-  //[SetterThrows]
-  //attribute EventHandler onblur;
-  //[SetterThrows]
-  //attribute EventHandler onerror;
-  //[SetterThrows]
-  //attribute EventHandler onfocus;
-  [SetterThrows]
-  attribute EventHandler onhashchange;
-  //attribute EventHandler onload;
-  [SetterThrows]
-  attribute EventHandler onmessage;
-  [SetterThrows]
-  attribute EventHandler onoffline;
-  [SetterThrows]
-  attribute EventHandler ononline;
-  [SetterThrows]
-  attribute EventHandler onpagehide;
-  [SetterThrows]
-  attribute EventHandler onpageshow;
-  [SetterThrows]
-  attribute EventHandler onpopstate;
-  [SetterThrows]
-  attribute EventHandler onresize;
-  //[SetterThrows]
-  //attribute EventHandler onscroll;
-  //[SetterThrows]
-  //attribute EventHandler onstorage;
-  [SetterThrows]
-  attribute EventHandler onunload;
 };
+
+HTMLFrameSetElement implements WindowEventHandlers;