Bug 820491 - Part 3: Whitespace cleanup in aboutDownloads.js. r=wesj a=lsblakk
authorBrian Nicholson <bnicholson@mozilla.com>
Mon, 14 Jan 2013 13:47:24 -0800
changeset 127213 d053fe60a0a5b36b6832804f536f59762b477915
parent 127212 ff139893a46eed0222bc87a8ec76c81bcb62ebd1
child 127214 91d5f962e5530190aa958f30e41186b8e0120e3e
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswesj, lsblakk
bugs820491
milestone20.0a2
Bug 820491 - Part 3: Whitespace cleanup in aboutDownloads.js. r=wesj a=lsblakk
mobile/android/chrome/content/aboutDownloads.js
--- a/mobile/android/chrome/content/aboutDownloads.js
+++ b/mobile/android/chrome/content/aboutDownloads.js
@@ -190,17 +190,17 @@ let Downloads = {
       while (next && this._inProgress(next.getAttribute("state")))
         next = next.nextElementSibling;
       // Move the item
       aItem.parentNode.insertBefore(aItem, next);
     } catch (ex) {
       this.logError("_moveDownloadAfterActive() " + ex);
     }
   },
-  
+
   _inProgress: function dl_inProgress(aState) {
     return [
       this._dlmgr.DOWNLOAD_NOTSTARTED,
       this._dlmgr.DOWNLOAD_QUEUED,
       this._dlmgr.DOWNLOAD_DOWNLOADING,
       this._dlmgr.DOWNLOAD_PAUSED,
       this._dlmgr.DOWNLOAD_SCANNING,
     ].indexOf(parseInt(aState)) != -1;
@@ -224,68 +224,68 @@ let Downloads = {
 
   _getDownloadSize: function dl_getDownloadSize(aSize) {
     let displaySize = DownloadUtils.convertByteUnits(aSize);
     if (displaySize[0] > 0) // [0] is size, [1] is units
       return displaySize.join("");
     else
       return gStrings.GetStringFromName("downloadState.unknownSize");
   },
-  
+
   // Not all states are displayed as-is on mobile, some are translated to a generic state
   _getState: function dl_getState(aState) {
     let str;
     switch (aState) {
       // Downloading and Scanning states show up as "Downloading"
       case this._dlmgr.DOWNLOAD_DOWNLOADING:
       case this._dlmgr.DOWNLOAD_SCANNING:
         str = this._dlmgr.DOWNLOAD_DOWNLOADING;
         break;
-        
+
       // Failed, Dirty and Blocked states show up as "Failed"
       case this._dlmgr.DOWNLOAD_FAILED:
       case this._dlmgr.DOWNLOAD_DIRTY:
       case this._dlmgr.DOWNLOAD_BLOCKED_POLICY:
       case this._dlmgr.DOWNLOAD_BLOCKED_PARENTAL:
         str = this._dlmgr.DOWNLOAD_FAILED;
         break;
-        
-      /* QUEUED and NOTSTARTED are not translated as they 
+
+      /* QUEUED and NOTSTARTED are not translated as they
          dont fall under a common state but we still need
          to display a common "status" on the UI */
-         
+
       default:
         str = aState;
     }
     return str;
   },
-  
+
   // Note: This doesn't cover all states as some of the states are translated in _getState()
   _getStateString: function dl_getStateString(aState) {
     let str;
     switch (aState) {
       case this._dlmgr.DOWNLOAD_DOWNLOADING:
         str = "downloadState.downloading";
         break;
       case this._dlmgr.DOWNLOAD_CANCELED:
         str = "downloadState.canceled";
         break;
       case this._dlmgr.DOWNLOAD_FAILED:
         str = "downloadState.failed";
         break;
       case this._dlmgr.DOWNLOAD_PAUSED:
         str = "downloadState.paused";
         break;
-        
+
       // Queued and Notstarted show up as "Starting..."
       case this._dlmgr.DOWNLOAD_QUEUED:
       case this._dlmgr.DOWNLOAD_NOTSTARTED:
         str = "downloadState.starting";
         break;
-        
+
       default:
         return "";
     }
     return gStrings.GetStringFromName(str);
   },
 
   _updateItem: function dl_updateItem(aItem, aValues) {
     for (let i in aValues) {
@@ -405,20 +405,20 @@ let Downloads = {
       aCallback(download);
     });
   },
 
   _removeItem: function dl_removeItem(aItem) {
     // Make sure we have an item to remove
     if (!aItem)
       return;
-  
+
     aItem.parentNode.removeChild(aItem);
   },
-  
+
   openDownload: function dl_openDownload(aItem) {
     this._getDownloadForElement(aItem, function(aDownload) {
       try {
         let f = aDownload.targetFile;
         if (f) f.launch();
       } catch (ex) {
         this.logError("openDownload() " + ex, aDownload);
       }