Bug 1628928 - Composer throbber doesn't work. r=frg DONTBUILD
authorIan Neal <iann_cvs@blueyonder.co.uk>
Fri, 10 Apr 2020 02:33:36 +0100
changeset 38975 9b45aa35f1041089c57ba61b7b7061a5df7da9c5
parent 38974 f0b4e54336899ce27ebdaba4ad99d6f3ee9efcbd
child 38976 4fc9cddb1dedf6b59112c0799d100860d62d775f
push id401
push userclokep@gmail.com
push dateMon, 01 Jun 2020 20:41:59 +0000
reviewersfrg
bugs1628928
Bug 1628928 - Composer throbber doesn't work. r=frg DONTBUILD
editor/ui/composer/content/ComposerCommands.js
editor/ui/composer/content/editor.xhtml
suite/extensions/debugQA/content/debugQATextEditorShell.xul
--- a/editor/ui/composer/content/ComposerCommands.js
+++ b/editor/ui/composer/content/ComposerCommands.js
@@ -1163,24 +1163,26 @@ var gEditorOutputProgressListener = {
     // Detect start of file upload of any file:
     // (We ignore any START messages after gPersistObj says publishing is finished
     if (
       aStateFlags & nsIWebProgressListener.STATE_START &&
       gPersistObj &&
       requestSpec &&
       gPersistObj.currentState != gPersistObj.PERSIST_STATE_FINISHED
     ) {
+      document.getElementById("navigator-throbber").setAttribute("busy", "true");
       try {
         // Add url to progress dialog's list showing each file uploading
         gProgressDialog.SetProgressStatus(GetFilename(requestSpec), "busy");
       } catch (e) {}
     }
 
     // Detect end of file upload of any file:
     if (aStateFlags & nsIWebProgressListener.STATE_STOP) {
+      document.getElementById("navigator-throbber").removeAttribute("busy");
       // ignore aStatus == kErrorBindingAborted; check http response for possible errors
       try {
         // check http channel for response: 200 range is ok; other ranges are not
         var httpChannel = aRequest.QueryInterface(Ci.nsIHttpChannel);
         var httpResponse = httpChannel.responseStatus;
         if (httpResponse < 200 || httpResponse >= 300) {
           // Not a real error but enough to pass check below.
           aStatus = httpResponse;
--- a/editor/ui/composer/content/editor.xhtml
+++ b/editor/ui/composer/content/editor.xhtml
@@ -278,18 +278,17 @@
     <toolbarbutton id="spellingButton"/>
     <toolbaritem id="throbber-box"
                  class="toolbaritem-noline"
                  removable="true"
                  align="center">
       <button id="navigator-throbber"
               oncommand="goClickThrobber('editor.throbber.url', event);"
               onclick="checkForMiddleClick(this, event);"
-              tooltiptext="&throbber.tooltip2;"
-              busy="false"/>
+              tooltiptext="&throbber.tooltip2;"/>
     </toolbaritem>
   </toolbar>
 
   <toolbarset id="customToolbars" context="toolbar-context-menu"/>
 
   <toolbarpalette id="EditToolbarPalette"/>
 
   <toolbar id="FormatToolbar"
--- a/suite/extensions/debugQA/content/debugQATextEditorShell.xul
+++ b/suite/extensions/debugQA/content/debugQATextEditorShell.xul
@@ -61,17 +61,16 @@
     <commandset id="composerEditMenuItems"/>
     <commandset id="composerSaveMenuItems"/>
     <commandset id="composerMenuItems"/>
     <commandset id="tasksCommands"/>
   </commandset>
 
   <!-- broadcaster nodes are appended here from the overlays -->
   <broadcasterset id="editorBroadcasters">
-    <broadcaster id="Editor:Throbber" busy="false"/>
     <broadcaster id="args"
                  value="chrome://debugqa/content/EditorInitPagePlain.html"/>
   </broadcasterset>
 
   <broadcasterset id="mainBroadcasterSet"/>
 
   <!-- keys are appended from the overlay -->
   <keyset id="editorKeys">
@@ -189,21 +188,11 @@
 
   <statusbar id="status-bar"
              class="chromeclass-status">
     <statusbarpanel id="component-bar"/>
     <statusbarpanel id="statusText"
                     label="&statusText.label;"
                     flex="1"
                     crop="right"/>
-    <statusbarpanel id="statusbar-progresspanel"
-                    class="statusbarpanel-progress"
-                    collapsed="true">
-      <progressmeter id="statusbar-icon"
-                     class="progressmeter-statusbar"
-                     mode="normal"
-                     value="0">
-        <observes element="Editor:Throbber" attribute="busy"/>
-      </progressmeter>
-    </statusbarpanel>
     <statusbarpanel id="offline-status" class="statusbarpanel-iconic"/>
   </statusbar>
 </window>