Index: chrome/browser/resources/sync_setup_overlay.js |
diff --git a/chrome/browser/resources/sync_setup_overlay.js b/chrome/browser/resources/sync_setup_overlay.js |
index bd91bb4dca236e0779e9365e53696475062d8f7e..a6c2d31377fc210d1d0586905c994b54b3bb2c10 100644 |
--- a/chrome/browser/resources/sync_setup_overlay.js |
+++ b/chrome/browser/resources/sync_setup_overlay.js |
@@ -538,10 +538,16 @@ cr.define('options', function() { |
this.showOverlay_(); |
}, |
+ /** |
+ * Changes the visibility of throbbers on this page. |
+ * @param {boolean} visible Whether or not to set all throbber nodes |
+ * visible. |
+ */ |
setThrobbersVisible_: function(visible) { |
var throbbers = document.getElementsByClassName("throbber"); |
- for (var i = 0; i < throbbers.length; i++) |
- throbbers[i].style.visibility = visible ? "visible" : "hidden"; |
+ var visibleOrHidden = visible ? "visible" : "hidden"; |
Evan Stade
2011/11/15 17:45:19
revert the changes to this function
Dan Beam
2011/11/15 18:37:13
OK, I can, but why? I removed the loop invariant
Evan Stade
2011/11/15 22:46:41
you can leave the docs and the indentation change.
Dan Beam
2011/11/16 00:09:53
Done. Crankshaft should optimize the loop invaria
|
+ for (var i = 0, l = throbbers.length; i < l; ++i) |
+ throbbers[i].style.visibility = visibleOrHidden; |
}, |
loginSetFocus_: function() { |
@@ -744,7 +750,7 @@ cr.define('options', function() { |
$('captcha-value').disabled = true; |
$('access-code').disabled = true; |
- $('logging-in-throbber').style.visibility = "visible"; |
+ this.setThrobbersVisible_(true); |
var f = $('gaia-login-form'); |
var email = $('gaia-email'); |