Bug 1455578 - Remove obsolete nsIXULBrowserWindow::setJSStatus. r=bz
authorDão Gottwald <dao@mozilla.com>
Fri, 20 Apr 2018 12:55:14 +0200
changeset 468319 1382278840ed09f08a9ebf47576b190cd433dcbd
parent 468223 e166407fe8b08f49f5fe7529048493676d158b63
child 468320 8350c61c629e186cf52be47afca865c0558b83f3
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs1455578
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 1455578 - Remove obsolete nsIXULBrowserWindow::setJSStatus. r=bz MozReview-Commit-ID: 6m7AQIvouIi
browser/base/content/browser.js
dom/base/nsGlobalWindowOuter.cpp
dom/ipc/TabParent.cpp
toolkit/components/browser/nsIWebBrowserChrome.idl
toolkit/content/tests/chrome/findbar_window.xul
xpfe/appshell/nsContentTreeOwner.cpp
xpfe/appshell/nsIXULBrowserWindow.idl
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -4516,20 +4516,16 @@ var XULBrowserWindow = {
     delete this.isImage;
     return this.isImage = document.getElementById("isImage");
   },
   get canViewSource() {
     delete this.canViewSource;
     return this.canViewSource = document.getElementById("canViewSource");
   },
 
-  setJSStatus() {
-    // unsupported
-  },
-
   forceInitialBrowserNonRemote(aOpener) {
     gBrowser.updateBrowserRemoteness(gBrowser.initialBrowser, false, { opener: aOpener });
   },
 
   setDefaultStatus(status) {
     this.defaultStatus = status;
     StatusPanel.update();
   },
--- a/dom/base/nsGlobalWindowOuter.cpp
+++ b/dom/base/nsGlobalWindowOuter.cpp
@@ -3058,29 +3058,18 @@ nsGlobalWindowOuter::GetStatusOuter(nsAS
   aStatus = mStatus;
 }
 
 void
 nsGlobalWindowOuter::SetStatusOuter(const nsAString& aStatus)
 {
   mStatus = aStatus;
 
-  /*
-   * If caller is not chrome, prevent propagating window.status to the UI by
-   * exiting early.
-   */
-  if (!nsContentUtils::LegacyIsCallerChromeOrNativeCode()) {
-    return;
-  }
-
-  nsCOMPtr<nsIWebBrowserChrome> browserChrome = GetWebBrowserChrome();
-  if (browserChrome) {
-    browserChrome->SetStatus(nsIWebBrowserChrome::STATUS_SCRIPT,
-                             PromiseFlatString(aStatus).get());
-  }
+  // We don't support displaying window.status in the UI, so there's nothing
+  // left to do here.
 }
 
 void
 nsGlobalWindowOuter::GetNameOuter(nsAString& aName)
 {
   if (mDocShell) {
     mDocShell->GetName(aName);
   }
--- a/dom/ipc/TabParent.cpp
+++ b/dom/ipc/TabParent.cpp
@@ -1809,19 +1809,16 @@ mozilla::ipc::IPCResult
 TabParent::RecvSetStatus(const uint32_t& aType, const nsString& aStatus)
 {
   nsCOMPtr<nsIXULBrowserWindow> xulBrowserWindow = GetXULBrowserWindow();
   if (!xulBrowserWindow) {
     return IPC_OK();
   }
 
   switch (aType) {
-   case nsIWebBrowserChrome::STATUS_SCRIPT:
-    xulBrowserWindow->SetJSStatus(aStatus);
-    break;
    case nsIWebBrowserChrome::STATUS_LINK:
     xulBrowserWindow->SetOverLink(aStatus, nullptr);
     break;
   }
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult
--- a/toolkit/components/browser/nsIWebBrowserChrome.idl
+++ b/toolkit/components/browser/nsIWebBrowserChrome.idl
@@ -12,17 +12,16 @@ interface nsIDocShellTreeItem;
 /**
  * nsIWebBrowserChrome corresponds to the top-level, outermost window
  * containing an embedded Gecko web browser.
  */
 
 [scriptable, uuid(E8C414C4-DC38-4BA3-AB4E-EC4CBBE22907)]
 interface nsIWebBrowserChrome : nsISupports
 {
-    const unsigned long STATUS_SCRIPT         = 0x00000001;
     const unsigned long STATUS_LINK           = 0x00000003;
 
     /**
      * Called when the status text in the chrome needs to be updated.
      * @param statusType indicates what is setting the text
      * @param status status string. null is an acceptable value meaning
      *               no status.
      */
--- a/toolkit/content/tests/chrome/findbar_window.xul
+++ b/toolkit/content/tests/chrome/findbar_window.xul
@@ -44,18 +44,16 @@
       QueryInterface: function(aIID) {
         if (aIID.Equals(Ci.nsIXULBrowserWindow) ||
             aIID.Equals(Ci.nsISupports))
          return this;
 
         throw Cr.NS_NOINTERFACE;
       },
 
-      setJSStatus: function() { },
-
       setOverLink: function(aStatusText, aLink) {
         gStatusText = aStatusText;
       },
 
       onBeforeLinkTraversal: function() { }
     };
 
     var imports = ["SimpleTest", "ok", "is", "info"];
--- a/xpfe/appshell/nsContentTreeOwner.cpp
+++ b/xpfe/appshell/nsContentTreeOwner.cpp
@@ -445,19 +445,16 @@ NS_IMETHODIMP nsContentTreeOwner::SetSta
 
   nsCOMPtr<nsIXULBrowserWindow> xulBrowserWindow;
   mXULWindow->GetXULBrowserWindow(getter_AddRefs(xulBrowserWindow));
 
   if (xulBrowserWindow)
   {
     switch(aStatusType)
     {
-    case STATUS_SCRIPT:
-      xulBrowserWindow->SetJSStatus(aStatusText);
-      break;
     case STATUS_LINK:
       {
         nsCOMPtr<nsIDOMElement> element = do_QueryInterface(aStatusContext);
         xulBrowserWindow->SetOverLink(aStatusText, element);
         break;
       }
     }
   }
--- a/xpfe/appshell/nsIXULBrowserWindow.idl
+++ b/xpfe/appshell/nsIXULBrowserWindow.idl
@@ -22,21 +22,16 @@ interface mozIDOMWindowProxy;
  * The nsIXULBrowserWindow supplies the methods that may be called from the
  * internals of the browser area to tell the containing xul window to update
  * its ui. 
  */
 [scriptable, uuid(a8675fa9-c8b4-4350-9803-c38f344a9e38)]
 interface nsIXULBrowserWindow : nsISupports
 {
   /**
-   * Sets the status according to JS' version of status.
-   */
-  void setJSStatus(in AString status);
-
-  /**
    * Tells the object implementing this function what link we are currently
    * over.
    */
   void setOverLink(in AString link, in nsIDOMElement element);
 
   /**
    * Determines the appropriate target for a link.
    */