Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1867)

Unified Diff: chrome/browser/resources/chromeos/login/screen_error_message.js

Issue 10827398: [cros] Fix error message screen hiding when not animated. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/login/screen_error_message.js
diff --git a/chrome/browser/resources/chromeos/login/screen_error_message.js b/chrome/browser/resources/chromeos/login/screen_error_message.js
index 9b9341c5e28df0f65e8715a0cf073652a24ac3dd..144374a613f6becf4a127631a523cdafd431e2c5 100644
--- a/chrome/browser/resources/chromeos/login/screen_error_message.js
+++ b/chrome/browser/resources/chromeos/login/screen_error_message.js
@@ -144,10 +144,10 @@ cr.define('login', function() {
/**
* Shows or hides offline message based on network on/offline state.
- * @param {Integer} state Current state of the network (see NET_STATE).
+ * @param {number} state Current state of the network (see NET_STATE).
* @param {string} network Name of the current network.
* @param {string} reason Reason the callback was called.
- * @param {int} lastNetworkType Last active network type.
+ * @param {number} lastNetworkType Last active network type.
*/
updateState_: function(state, network, reason, lastNetworkType) {
var currentScreen = Oobe.getInstance().currentScreen;
@@ -260,12 +260,16 @@ cr.define('login', function() {
offlineMessage.onBeforeHide();
offlineMessage.classList.add('faded');
- offlineMessage.addEventListener('webkitTransitionEnd',
- function f(e) {
- offlineMessage.removeEventListener('webkitTransitionEnd', f);
- if (offlineMessage.classList.contains('faded'))
- offlineMessage.classList.add('hidden');
- });
+ if (offlineMessage.classList.contains('animated')) {
+ offlineMessage.addEventListener('webkitTransitionEnd',
+ function f(e) {
+ offlineMessage.removeEventListener('webkitTransitionEnd', f);
+ if (offlineMessage.classList.contains('faded'))
+ offlineMessage.classList.add('hidden');
+ });
+ } else {
+ offlineMessage.classList.add('hidden');
+ }
currentScreen.classList.remove('hidden');
currentScreen.classList.remove('faded');
@@ -293,10 +297,10 @@ cr.define('login', function() {
/**
* Network state changed callback.
- * @param {Integer} state Current state of the network (see NET_STATE).
+ * @param {number} state Current state of the network (see NET_STATE).
* @param {string} network Name of the current network.
* @param {string} reason Reason the callback was called.
- * @param {int} lastNetworkType Last active network type.
+ * @param {number} lastNetworkType Last active network type.
*/
ErrorMessageScreen.updateState = function(
state, network, reason, lastNetworkType) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698