Bug 1455674 part 11. Remove nsIDOMElement use from xpidl in toolkit. r=mossop
authorBoris Zbarsky <bzbarsky@mit.edu>
Thu, 26 Apr 2018 23:36:30 -0400
changeset 472091 a19af55d0bd25817a0902b7fa771fb392cb0791b
parent 472090 67be83ace31210b4ce904d2e928ffe87618a9b15
child 472092 5add57b9a0cc9a37590bbd970ad04ad1d2f3cf7e
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmossop
bugs1455674
milestone61.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 1455674 part 11. Remove nsIDOMElement use from xpidl in toolkit. r=mossop
dom/ipc/TabParent.cpp
toolkit/components/autocomplete/nsIAutoCompletePopup.idl
toolkit/components/feeds/nsIFeedTextConstruct.idl
toolkit/components/passwordmgr/nsILoginManagerPrompter.idl
toolkit/components/typeaheadfind/nsITypeAheadFind.idl
toolkit/mozapps/extensions/amIWebInstallPrompt.idl
toolkit/mozapps/update/nsIUpdateService.idl
--- a/dom/ipc/TabParent.cpp
+++ b/dom/ipc/TabParent.cpp
@@ -2585,18 +2585,17 @@ TabParent::GetAuthPrompt(uint32_t aPromp
   // Get an auth prompter for our window so that the parenting
   // of the dialogs works as it should when using tabs.
   nsCOMPtr<nsISupports> prompt;
   rv = wwatch->GetPrompt(window, iid, getter_AddRefs(prompt));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsILoginManagerPrompter> prompter = do_QueryInterface(prompt);
   if (prompter) {
-    nsCOMPtr<nsIDOMElement> browser = do_QueryInterface(mFrameElement);
-    prompter->SetBrowser(browser);
+    prompter->SetBrowser(mFrameElement);
   }
 
   *aResult = prompt.forget().take();
   return NS_OK;
 }
 
 PColorPickerParent*
 TabParent::AllocPColorPickerParent(const nsString& aTitle,
--- a/toolkit/components/autocomplete/nsIAutoCompletePopup.idl
+++ b/toolkit/components/autocomplete/nsIAutoCompletePopup.idl
@@ -1,17 +1,18 @@
 /* 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 nsIDOMElement;
 interface nsIAutoCompleteInput;
 
+webidl Element;
+
 [scriptable, uuid(bd3c2662-a988-41ab-8c94-c15ed0e6ac7d)]
 interface nsIAutoCompletePopup : nsISupports
 {
   /*
    * The input object that the popup is currently bound to
    */
   readonly attribute nsIAutoCompleteInput input;
 
@@ -32,17 +33,17 @@ interface nsIAutoCompletePopup : nsISupp
   readonly attribute boolean popupOpen;
 
   /* 
    * Bind the popup to an input object and display it with the given coordinates
    *
    * @param input - The input object that the popup will be bound to
    * @param element - The element that the popup will be aligned with
    */
-  void openAutocompletePopup(in nsIAutoCompleteInput input, in nsIDOMElement element);
+  void openAutocompletePopup(in nsIAutoCompleteInput input, in Element element);
 
   /* 
    * Close the popup and detach from the bound input
    */
   void closePopup();
 
   /*
    * Instruct the result view to repaint itself to reflect the most current
--- a/toolkit/components/feeds/nsIFeedTextConstruct.idl
+++ b/toolkit/components/feeds/nsIFeedTextConstruct.idl
@@ -1,19 +1,19 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* 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 nsIURI;
-interface nsIDOMElement;
 
 webidl DocumentFragment;
+webidl Element;
 
 /**
  * nsIFeedTextConstructs represent feed text fields that can contain
  * one of text, HTML, or XHTML. Some extension elements also have "type"
  * parameters, and this interface could be used there as well.
  */ 
 [scriptable, uuid(fc97a2a9-d649-4494-931e-db81a156c873)]
 interface nsIFeedTextConstruct : nsISupports 
@@ -48,11 +48,11 @@ interface nsIFeedTextConstruct : nsISupp
    * and all entities decoded. If the type attribute's value is "text",
    * this function returns the value of the text attribute unchanged.
    */
   AString plainText();
 
   /**
    * Return an nsIDocumentFragment containing the text and markup.
    */
-  DocumentFragment createDocumentFragment(in nsIDOMElement element);
+  DocumentFragment createDocumentFragment(in Element element);
 };
  
--- a/toolkit/components/passwordmgr/nsILoginManagerPrompter.idl
+++ b/toolkit/components/passwordmgr/nsILoginManagerPrompter.idl
@@ -1,19 +1,20 @@
 /* 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 nsILoginInfo;
-interface nsIDOMElement;
 interface nsIDOMWindow;
 
+webidl Element;
+
 [scriptable, uuid(425f73b9-b2db-4e8a-88c5-9ac2512934ce)]
 interface nsILoginManagerPrompter : nsISupports {
   /**
    * Initialize the prompter. Must be called before using other interfaces.
    *
    * @param aWindow
    *        The window in which the user is doing some login-related action that's
    *        resulting in a need to prompt them for something. The prompt
@@ -29,17 +30,17 @@ interface nsILoginManagerPrompter : nsIS
    *        corresponding browser element needs to be set using setBrowser.
    */
   void init(in nsIDOMWindow aWindow);
 
   /**
    * The browser this prompter is being created for.
    * This is required if the init function received a chrome window as argument.
    */
-  attribute nsIDOMElement browser;
+  attribute Element browser;
 
   /**
    * The opener that was used to open the window passed to init.
    * The opener can be used to determine in which window the prompt
    * should be shown. Must be a content window that is not a frame window,
    * make sure to pass the top window using e.g. window.top.
    */
   attribute nsIDOMWindow opener;
--- a/toolkit/components/typeaheadfind/nsITypeAheadFind.idl
+++ b/toolkit/components/typeaheadfind/nsITypeAheadFind.idl
@@ -1,17 +1,17 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* 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/. */
 
 
 /********************************* #includes *********************************/
 
-#include "domstubs.idl"                 // nsIDOMElement, nsIDOMWindow
+#include "domstubs.idl"                 // nsIDOMRange
 #include "nsISupports.idl"              // nsISupports
 
 
 /******************************** Declarations *******************************/
 
 interface mozIDOMWindow;
 interface nsIDocShell;
 
--- a/toolkit/mozapps/extensions/amIWebInstallPrompt.idl
+++ b/toolkit/mozapps/extensions/amIWebInstallPrompt.idl
@@ -1,18 +1,19 @@
 /* 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 nsIDOMElement;
 interface nsIURI;
 interface nsIVariant;
 
+webidl Element;
+
 /**
  * amIWebInstallPrompt is used, if available, by the default implementation of 
  * amIWebInstallInfo to display a confirmation UI to the user before running
  * installs.
  */
 [scriptable, uuid(386906f1-4d18-45bf-bc81-5dcd68e42c3b)]
 interface amIWebInstallPrompt : nsISupports
 {
@@ -23,12 +24,12 @@ interface amIWebInstallPrompt : nsISuppo
    *         The browser that triggered the installs
    * @param  aUri
    *         The URI of the site that triggered the installs
    * @param  aInstalls
    *         The AddonInstalls that were requested
    * @param  aCount
    *         The number of AddonInstalls
    */
-  void confirm(in nsIDOMElement aBrowser, in nsIURI aUri,
+  void confirm(in Element aBrowser, in nsIURI aUri,
                [array, size_is(aCount)] in nsIVariant aInstalls,
                [optional] in uint32_t aCount);
 };
--- a/toolkit/mozapps/update/nsIUpdateService.idl
+++ b/toolkit/mozapps/update/nsIUpdateService.idl
@@ -1,23 +1,24 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* 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 nsIDOMDocument;
-interface nsIDOMElement;
 interface nsIDOMWindow;
 interface nsIRequest;
 interface nsIRequestObserver;
 interface nsISimpleEnumerator;
 interface nsIFile;
 
+webidl Element;
+webidl Document;
+
 /**
  * An interface that describes an object representing a patch file that can
  * be downloaded and applied to a version of this application so that it
  * can be updated.
  */
 [scriptable, uuid(dc8fb8a9-3a53-4031-9469-2a5197ea30e7)]
 interface nsIUpdatePatch : nsISupports
 {
@@ -65,17 +66,17 @@ interface nsIUpdatePatch : nsISupports
   attribute boolean selected;
 
   /**
    * Serializes this patch object into a DOM Element
    * @param   updates
    *          The document to serialize into
    * @returns The DOM Element created by the serialization process
    */
-  nsIDOMElement serialize(in nsIDOMDocument updates);
+  Element serialize(in Document updates);
 };
 
 /**
  * An interface that describes an object representing an available update to
  * the current application - this update may have several available patches
  * from which one must be selected to download and install, for example we
  * might select a binary difference patch first and attempt to apply that,
  * then if the application process fails fall back to downloading a complete
@@ -217,17 +218,17 @@ interface nsIUpdate : nsISupports
   nsIUpdatePatch getPatchAt(in unsigned long index);
 
   /**
    * Serializes this update object into a DOM Element
    * @param   updates
    *          The document to serialize into
    * @returns The DOM Element created by the serialization process
    */
-  nsIDOMElement serialize(in nsIDOMDocument updates);
+  Element serialize(in Document updates);
 };
 
 /**
  * An interface describing an object that listens to the progress of an update
  * check operation. This object is notified as the check continues, finishes
  * and if it has an error.
  */
 [scriptable, uuid(4aa2b4bb-39ea-407b-98ff-89f19134d4c0)]