ws cleanup mobile
authordougt@dougt-ubuntu
Thu, 22 May 2008 15:12:08 -0700
branchmobile
changeset 64717 036fb69a2e73da75a3f4c8282da4b8bd24c5f189
parent 64716 5440b8355e0e42f2822e172eedf5757229be53ca
child 64718 b3f5f2cb5bab2c6da9173688e6cd3ff866d62485
push idunknown
push userunknown
push dateunknown
ws cleanup
mobile/chrome/content/browser.js
--- a/mobile/chrome/content/browser.js
+++ b/mobile/chrome/content/browser.js
@@ -416,44 +416,43 @@ function fskey(aEvent) {
   }
 }
 */
 var SpeedCache = function(maxsize) {
     this.init(maxsize);
 }
 
 SpeedCache.prototype = {
-    _items   : null,
-    _maxsize : 1,
-
-    init: function(maxsize) {
-
-	if (maxsize <= 0) maxsize = 1;
-	this._items = new Array(maxsize);
-	this._count = 0;
-
-	for (x = 0; x < maxsize; x++) {
+  _items   : null,
+  _maxsize : 1,
+  
+  init: function(maxsize) {
+    
+    if (maxsize <= 0) maxsize = 1;
+    this._items = new Array(maxsize);
+    this._count = 0;
+    
+    for (var x = 0; x < maxsize; x++)
 	    this._items[x] = 0;
-	}
-    },
-
-    addSpeed: function(speed){
-	var index = this._count % this._items.length;
-	this._items[index] = speed;
-	this._count++;
-    },
-
-    getAverage: function() {
-	var maxsize = this._items.length;
-	var sum = 0;
-	for (x = 0; x < maxsize; x++) {
+  },
+  
+  addSpeed: function(speed){
+    var index = this._count % this._items.length;
+    this._items[index] = speed;
+    this._count++;
+  },
+  
+  getAverage: function() {
+    var maxsize = this._items.length;
+    var sum = 0;
+    for (x = 0; x < maxsize; x++) {
 	    sum += this._items[x];
-	}
-	return sum / maxsize;
-    },
+    }
+    return sum / maxsize;
+  },
 }
 
 var MouseController = function(browser) {
   this.init(browser);
 }
 
 MouseController.prototype = {
   _browser: null,