add missing spaces; 'switch' is not a function
authorDão Gottwald <dao@mozilla.com>
Sat, 06 Feb 2010 11:40:06 +0100
changeset 37941 173248959f0187868122d4c6fad23aca6e46f3e8
parent 37940 60e5e4d06e8f7a5d638b6a03762d76d166eb0b7e
child 37942 2e9d8868efc6f44f40d29dcc129bec27792e08bc
push idunknown
push userunknown
push dateunknown
milestone1.9.3a2pre
add missing spaces; 'switch' is not a function
browser/base/content/browser-fullZoom.js
browser/base/content/test/test_contextmenu.html
browser/base/content/urlbarBindings.xml
browser/components/microsummaries/src/nsMicrosummaryService.js
browser/components/nsBrowserGlue.js
browser/components/places/content/bookmarkProperties.js
browser/components/places/content/controller.js
browser/components/places/tests/browser/browser_bookmarksProperties.js
browser/components/preferences/main.js
browser/components/safebrowsing/content/blockedSite.xhtml
--- a/browser/base/content/browser-fullZoom.js
+++ b/browser/base/content/browser-fullZoom.js
@@ -203,19 +203,19 @@ var FullZoom = {
     // the event before the event state manager has a chance to apply the zoom
     // during nsEventStateManager::PostHandleEvent.
     window.setTimeout(function (self) { self._applySettingToPref() }, 0, this);
   },
 
   // nsIObserver
 
   observe: function (aSubject, aTopic, aData) {
-    switch(aTopic) {
+    switch (aTopic) {
       case "nsPref:changed":
-        switch(aData) {
+        switch (aData) {
           case "browser.zoom.siteSpecific":
             this._siteSpecificPref =
               this._prefBranch.getBoolPref("browser.zoom.siteSpecific");
             break;
           case "browser.zoom.updateBackgroundTabs":
             this.updateBackgroundTabs =
               this._prefBranch.getBoolPref("browser.zoom.updateBackgroundTabs");
             break;
--- a/browser/base/content/test/test_contextmenu.html
+++ b/browser/base/content/test/test_contextmenu.html
@@ -134,17 +134,17 @@ function checkMenu(menu, expectedItems) 
  * (thus kicking off another cycle).
  *
  */
 function runTest(testNum) {
   // Seems we need to enable this again, or sendKeyEvent() complaints.
   netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
   ok(true, "Starting test #" + testNum);
 
-  switch(testNum) {
+  switch (testNum) {
     case 1:
         // Invoke context menu for next test.
         openContextMenuFor(text);
         break;
 
     case 2:
         // Context menu for plain text
         checkContextMenu(["context-back",         false,
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -346,17 +346,17 @@
       ]]></field>
 
       <method name="observe">
         <parameter name="aSubject"/>
         <parameter name="aTopic"/>
         <parameter name="aData"/>
         <body><![CDATA[
           if (aTopic == "nsPref:changed") {
-            switch(aData) {
+            switch (aData) {
               case "clickSelectsAll":
               case "doubleClickSelectsAll":
                 this[aData] = this._prefs.getBoolPref(aData);
                 break;
               case "autoFill":
                 this.completeDefaultIndex = this._prefs.getBoolPref(aData);
                 break;
               case "delay":
--- a/browser/components/microsummaries/src/nsMicrosummaryService.js
+++ b/browser/components/microsummaries/src/nsMicrosummaryService.js
@@ -1719,17 +1719,17 @@ MicrosummaryResource.prototype = {
 
   QueryInterface: function MSR_QueryInterface(iid) {
     if (!this.interfaces.some( function(v) { return iid.equals(v) } ))
       throw Cr.NS_ERROR_NO_INTERFACE;
 
     // nsIAuthPrompt and nsIPrompt need separate implementations because
     // their method signatures conflict.  The other interfaces we implement
     // within MicrosummaryResource itself.
-    switch(iid) {
+    switch (iid) {
     case Ci.nsIAuthPrompt:
       return this.authPrompt;
     case Ci.nsIPrompt:
       return this.prompt;
     default:
       return this;
     }
   },
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -132,17 +132,17 @@ BrowserGlue.prototype = {
     // This method can be called via [NSApplication terminate:] on Mac, which
     // ends up causing prefs not to be flushed to disk, so we need to do that
     // explicitly here. See bug 497652.
     this._prefs.QueryInterface(Ci.nsIPrefService).savePrefFile(null);
   },
 
   // nsIObserver implementation 
   observe: function BG_observe(subject, topic, data) {
-    switch(topic) {
+    switch (topic) {
       case "xpcom-shutdown":
         this._dispose();
         break;
       case "prefservice:after-app-defaults":
         this._onAppDefaults();
         break;
       case "final-ui-startup":
         this._onProfileStartup();
--- a/browser/components/places/content/bookmarkProperties.js
+++ b/browser/components/places/content/bookmarkProperties.js
@@ -191,17 +191,17 @@ var BookmarkPropertiesPanel = {
         this._defaultInsertionPoint = dialogInfo.defaultInsertionPoint;
       }
       else
         this._defaultInsertionPoint =
           new InsertionPoint(PlacesUtils.bookmarksMenuFolderId,
                              PlacesUtils.bookmarks.DEFAULT_INDEX,
                              Ci.nsITreeView.DROP_ON);
 
-      switch(dialogInfo.type) {
+      switch (dialogInfo.type) {
         case "bookmark":
           this._itemType = BOOKMARK_ITEM;
           if ("uri" in dialogInfo) {
             NS_ASSERT(dialogInfo.uri instanceof Ci.nsIURI,
                       "uri property should be a uri object");
             this._uri = dialogInfo.uri;
             if (typeof(this._title) != "string") {
               this._title = this._getURITitleFromHistory(this._uri) ||
--- a/browser/components/places/content/controller.js
+++ b/browser/components/places/content/controller.js
@@ -454,17 +454,17 @@ PlacesController.prototype = {
     for (var i=0; i < nodes.length; i++) {
       var nodeData = {};
       var node = nodes[i];
       var nodeType = node.type;
       var uri = null;
 
       // We don't use the nodeIs* methods here to avoid going through the type
       // property way too often
-      switch(nodeType) {
+      switch (nodeType) {
         case Ci.nsINavHistoryResultNode.RESULT_TYPE_QUERY:
           nodeData["query"] = true;
           if (node.parent) {
             switch (asQuery(node.parent).queryOptions.resultType) {
               case Ci.nsINavHistoryQueryOptions.RESULTS_AS_SITE_QUERY:
                 nodeData["host"] = true;
                 break;
               case Ci.nsINavHistoryQueryOptions.RESULTS_AS_DATE_SITE_QUERY:
--- a/browser/components/places/tests/browser/browser_bookmarksProperties.js
+++ b/browser/components/places/tests/browser/browser_bookmarksProperties.js
@@ -613,17 +613,17 @@ function open_properties_dialog() {
             ok(false, "An error occured during test run: " + ex.message);
           }
         });
       }, false);
     }
     ww.registerNotification(windowObserver);
 
     var command = null;
-    switch(gCurrentTest.action) {
+    switch (gCurrentTest.action) {
       case ACTION_EDIT:
         command = "placesCmd_show:info";
         break;
       case ACTION_ADD:
         if (gCurrentTest.sidebar == SIDEBAR_BOOKMARKS_ID) {
           if (gCurrentTest.itemType == TYPE_FOLDER)
             command = "placesCmd_new:folder";
           else if (gCurrentTest.itemType == TYPE_BOOKMARK)
--- a/browser/components/preferences/main.js
+++ b/browser/components/preferences/main.js
@@ -373,18 +373,17 @@ var gMainPane = {
    * indicates that it is a download folder and whose path is as determined by
    * the XPCOM directory service via the download manager's attribute 
    * defaultDownloadsDirectory.
    *
    * @throws if aFolder is not "Desktop" or "Downloads"
    */
   _getDownloadsFolder: function (aFolder)
   {
-    switch(aFolder)
-    {
+    switch (aFolder) {
       case "Desktop":
         var fileLoc = Components.classes["@mozilla.org/file/directory_service;1"]
                                     .getService(Components.interfaces.nsIProperties);
         return fileLoc.get("Desk", Components.interfaces.nsILocalFile);
       break;
       case "Downloads":
         var dnldMgr = Components.classes["@mozilla.org/download-manager;1"]
                                 .getService(Components.interfaces.nsIDownloadManager);
@@ -435,17 +434,17 @@ var gMainPane = {
   },
 
   /**
    * Returns the value for the browser.download.folderList preference.
    */
   getFolderListPref: function ()
   {
     var folderListPref = document.getElementById("browser.download.folderList");
-    switch(folderListPref.value) {
+    switch (folderListPref.value) {
       case 0: // Desktop
       case 1: // Downloads
         return folderListPref.value;
       break;
       case 2: // Custom
         var currentDirPref = document.getElementById("browser.download.dir");
         if (currentDirPref.value) {
           // Resolve to a known location if possible. We are writing out
--- a/browser/components/safebrowsing/content/blockedSite.xhtml
+++ b/browser/components/safebrowsing/content/blockedSite.xhtml
@@ -104,17 +104,17 @@
         } catch (e) {
           return getURL();
         }
       }
       
       function initPage()
       {
         // Handoff to the appropriate initializer, based on error code
-        switch(getErrorCode()) {
+        switch (getErrorCode()) {
           case "malwareBlocked" :
             initPage_malware();
             break;
           case "phishingBlocked" :
             initPage_phishing();
             break;
         }
       }