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

Side by Side Diff: ui/login/account_picker/user_pod_row.js

Issue 1811113003: Reduce failsafe time for animation events. This makes the lock-time more consistent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | ui/webui/resources/js/util.js » ('j') | ui/webui/resources/js/util.js » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview User pod row implementation. 6 * @fileoverview User pod row implementation.
7 */ 7 */
8 8
9 cr.define('login', function() { 9 cr.define('login', function() {
10 /** 10 /**
(...skipping 3229 matching lines...) Expand 10 before | Expand all | Expand 10 after
3240 }, 3240 },
3241 3241
3242 /** 3242 /**
3243 * Called right after the pod row is shown. 3243 * Called right after the pod row is shown.
3244 */ 3244 */
3245 handleAfterShow: function() { 3245 handleAfterShow: function() {
3246 // Without timeout changes in pods positions will be animated even though 3246 // Without timeout changes in pods positions will be animated even though
3247 // it happened when 'flying-pods' class was disabled. 3247 // it happened when 'flying-pods' class was disabled.
3248 setTimeout(function() { 3248 setTimeout(function() {
3249 Oobe.getInstance().toggleClass('flying-pods', true); 3249 Oobe.getInstance().toggleClass('flying-pods', true);
3250 ensureTransitionEndEvent(focusedPod);
xiyuan 2016/03/18 15:37:48 We need to test |focusedPod| because |focusedPod|
jdufault 2016/03/18 17:31:56 Done.
3250 }, 0); 3251 }, 0);
3251 // Force input focus for user pod on show and once transition ends. 3252 // Force input focus for user pod on show and once transition ends.
3252 if (this.focusedPod_) { 3253 if (this.focusedPod_) {
3253 var focusedPod = this.focusedPod_; 3254 var focusedPod = this.focusedPod_;
3254 var screen = this.parentNode; 3255 var screen = this.parentNode;
3255 var self = this; 3256 var self = this;
3256 focusedPod.addEventListener('webkitTransitionEnd', function f(e) { 3257 focusedPod.addEventListener('webkitTransitionEnd', function f(e) {
3257 focusedPod.removeEventListener('webkitTransitionEnd', f); 3258 focusedPod.removeEventListener('webkitTransitionEnd', f);
3258 focusedPod.reset(true); 3259 focusedPod.reset(true);
3259 // Notify screen that it is ready. 3260 // Notify screen that it is ready.
3260 screen.onShow(); 3261 screen.onShow();
3261 }); 3262 });
3262 // Guard timer for 1 second -- it would conver all possible animations.
3263 ensureTransitionEndEvent(focusedPod, 1000);
3264 } 3263 }
3265 }, 3264 },
3266 3265
3267 /** 3266 /**
3268 * Called right before the pod row is shown. 3267 * Called right before the pod row is shown.
3269 */ 3268 */
3270 handleBeforeShow: function() { 3269 handleBeforeShow: function() {
3271 Oobe.getInstance().toggleClass('flying-pods', false); 3270 Oobe.getInstance().toggleClass('flying-pods', false);
3272 for (var event in this.listeners_) { 3271 for (var event in this.listeners_) {
3273 this.ownerDocument.addEventListener( 3272 this.ownerDocument.addEventListener(
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
3320 if (pod && pod.multiProfilesPolicyApplied) { 3319 if (pod && pod.multiProfilesPolicyApplied) {
3321 pod.userTypeBubbleElement.classList.remove('bubble-shown'); 3320 pod.userTypeBubbleElement.classList.remove('bubble-shown');
3322 } 3321 }
3323 } 3322 }
3324 }; 3323 };
3325 3324
3326 return { 3325 return {
3327 PodRow: PodRow 3326 PodRow: PodRow
3328 }; 3327 };
3329 }); 3328 });
OLDNEW
« no previous file with comments | « no previous file | ui/webui/resources/js/util.js » ('j') | ui/webui/resources/js/util.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698