Bug 1455676 part 9. Mostly remove use of nsIDOMNode from mobile/. r=snorp
authorBoris Zbarsky <bzbarsky@mit.edu>
Tue, 29 May 2018 22:58:49 -0400
changeset 474609 62ece2b265ab958e1550c306116aa1384c6d8c0d
parent 474608 7e614633875401c627ef19e8e70ed3ccb97a7a80
child 474610 94ab3582901b8d609673c34239605b30e3e2e8a8
push id9374
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:43:20 +0000
treeherdermozilla-beta@160e085dfb0b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp
bugs1455676
milestone62.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 1455676 part 9. Mostly remove use of nsIDOMNode from mobile/. r=snorp
mobile/android/chrome/content/browser.js
mobile/android/components/SessionStore.idl
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -3148,17 +3148,17 @@ var NativeWindow = {
       return this.makeURI(url, null, this.makeURI(base)).displaySpec;
     },
 
     makeURI: function makeURI(aURL, aOriginCharset, aBaseURI) {
       return Services.io.newURI(aURL, aOriginCharset, aBaseURI);
     },
 
     _getLink: function(aElement) {
-      if (aElement.nodeType == Ci.nsIDOMNode.ELEMENT_NODE &&
+      if (aElement.nodeType == aElement.ELEMENT_NODE &&
           ((ChromeUtils.getClassName(aElement) === "HTMLAnchorElement" && aElement.href) ||
            (ChromeUtils.getClassName(aElement) === "HTMLAreaElement" && aElement.href) ||
            ChromeUtils.getClassName(aElement) === "HTMLLinkElement" ||
            aElement.getAttributeNS(kXLinkNamespace, "type") == "simple")) {
         try {
           let url = this._getLinkURL(aElement);
           return Services.io.newURI(url);
         } catch (e) {}
@@ -4886,17 +4886,17 @@ var BrowserEventHandler = {
                                                                                  target.ownerDocument.nodePrincipal,
                                                                                  null);
       } catch (e) {}
     }
     this._doTapHighlight(target);
   },
 
   _getLinkURI: function(aElement) {
-    if (aElement.nodeType == Ci.nsIDOMNode.ELEMENT_NODE &&
+    if (aElement.nodeType == aElement.ELEMENT_NODE &&
         ((ChromeUtils.getClassName(aElement) === "HTMLAnchorElement" && aElement.href) ||
          (ChromeUtils.getClassName(aElement) === "HTMLAreaElement" && aElement.href))) {
       try {
         return Services.io.newURI(aElement.href);
       } catch (e) {}
     }
     return null;
   },
--- a/mobile/android/components/SessionStore.idl
+++ b/mobile/android/components/SessionStore.idl
@@ -1,16 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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/. */
 
 #include "nsISupports.idl"
 
 interface nsIDOMWindow;
-interface nsIDOMNode;
+
+webidl Node;
 
 /**
  * nsISessionStore keeps track of the current browsing state.
  *
  * The nsISessionStore API operates mostly on browser windows and the browser
  * tabs contained in them.
  */
 
@@ -36,23 +37,23 @@ interface nsISessionStore : nsISupports
    */
   jsval getClosedTabs(in nsIDOMWindow aWindow);
 
   /**
    * @param aWindow is the browser window to reopen a closed tab in.
    * @param aCloseTabData is the data of the tab to be restored.
    * @returns a reference to the reopened tab.
    */
-  nsIDOMNode undoCloseTab(in nsIDOMWindow aWindow, in jsval aCloseTabData);
+  Node undoCloseTab(in nsIDOMWindow aWindow, in jsval aCloseTabData);
 
   /**
    * @param aWindow is the browser window associated with the closed tab.
    * @param aIndex  is the index of the closed tab to be removed (FIFO ordered).
    */
-  nsIDOMNode forgetClosedTab(in nsIDOMWindow aWindow, in unsigned long aIndex);
+  Node forgetClosedTab(in nsIDOMWindow aWindow, in unsigned long aIndex);
 
   /**
    * Whether the "Undo close tab" message should be shown or not after a tab has been closed.
    */
  readonly attribute boolean canUndoLastCloseTab;
 
   /**
    * @param aTab is the browser tab to get the value for.