Bug 1270386 - Move fullscreen and pointerlock event handlers from GlobalEventHandlers to Document. r?smaug draft
authorXidorn Quan <quanxunzhen@gmail.com>
Thu, 05 May 2016 16:32:59 +1000
changeset 368659 11b3fc89d78839e795aa2a04ecf1fbe0913ce4f8
parent 368658 fe08b0d4a1d5d3bcc09e5620269cb15a8382f568
child 521354 5b13e54dbeece87cf606bd1583697c780ba56da2
push id18622
push userxquan@mozilla.com
push dateThu, 19 May 2016 09:51:44 +0000
reviewerssmaug
bugs1270386
milestone49.0a1
Bug 1270386 - Move fullscreen and pointerlock event handlers from GlobalEventHandlers to Document. r?smaug MozReview-Commit-ID: FfQhDoD5Wf3
dom/webidl/Document.webidl
dom/webidl/EventHandler.webidl
--- a/dom/webidl/Document.webidl
+++ b/dom/webidl/Document.webidl
@@ -236,16 +236,22 @@ partial interface Document {
   readonly attribute Element? fullscreenElement;
   [BinaryName="fullscreenElement", Deprecated="PrefixedFullscreenAPI"]
   readonly attribute Element? mozFullScreenElement;
 
   [Func="nsDocument::IsUnprefixedFullscreenEnabled"]
   void exitFullscreen();
   [BinaryName="exitFullscreen", Deprecated="PrefixedFullscreenAPI"]
   void mozCancelFullScreen();
+
+  // Events handlers
+  [Func="nsDocument::IsUnprefixedFullscreenEnabled"]
+  attribute EventHandler onfullscreenchange;
+  [Func="nsDocument::IsUnprefixedFullscreenEnabled"]
+  attribute EventHandler onfullscreenerror;
 };
 
 // http://dvcs.w3.org/hg/pointerlock/raw-file/default/index.html#extensions-to-the-document-interface
 partial interface Document {
     readonly attribute Element? mozPointerLockElement;
     void mozExitPointerLock ();
 };
 
--- a/dom/webidl/EventHandler.webidl
+++ b/dom/webidl/EventHandler.webidl
@@ -112,25 +112,20 @@ interface GlobalEventHandlers {
            attribute EventHandler onpointerenter;
            [Pref="dom.w3c_pointer_events.enabled"]
            attribute EventHandler onpointerleave;
            [Pref="dom.w3c_pointer_events.enabled"]
            attribute EventHandler ongotpointercapture;
            [Pref="dom.w3c_pointer_events.enabled"]
            attribute EventHandler onlostpointercapture;
 
-           // Fullscreen events handlers
-           [Func="nsDocument::IsUnprefixedFullscreenEnabled"]
-           attribute EventHandler onfullscreenchange;
-           [Func="nsDocument::IsUnprefixedFullscreenEnabled"]
-           attribute EventHandler onfullscreenerror;
+           // Mozilla-specific handlers. Unprefixed handlers live in
+           // Document rather than here.
            attribute EventHandler onmozfullscreenchange;
            attribute EventHandler onmozfullscreenerror;
-
-           // Mozilla-specific handlers
            attribute EventHandler onmozpointerlockchange;
            attribute EventHandler onmozpointerlockerror;
 };
 
 [NoInterfaceObject]
 interface WindowEventHandlers {
            attribute EventHandler onafterprint;
            attribute EventHandler onbeforeprint;