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

Side by Side Diff: chrome/browser/resources/chromeos/first_run/first_run.js

Issue 2691883002: Uprefix CSS transitions in ui/ and chrome/ styles (Closed)
Patch Set: transitions only Created 3 years, 10 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 First run UI. 6 * @fileoverview First run UI.
7 */ 7 */
8 8
9 // <include src="step.js"> 9 // <include src="step.js">
10 10
(...skipping 19 matching lines...) Expand all
30 return; 30 return;
31 } 31 }
32 var transitionDuration = (opt_transitionDuration === undefined) ? 32 var transitionDuration = (opt_transitionDuration === undefined) ?
33 cr.FirstRun.getDefaultTransitionDuration() : opt_transitionDuration; 33 cr.FirstRun.getDefaultTransitionDuration() : opt_transitionDuration;
34 var style = element.style; 34 var style = element.style;
35 var oldDurationValue = style.getPropertyValue('transition-duration'); 35 var oldDurationValue = style.getPropertyValue('transition-duration');
36 style.setProperty('transition-duration', transitionDuration + 'ms'); 36 style.setProperty('transition-duration', transitionDuration + 'ms');
37 var transition = visible ? 'show-animated' : 'hide-animated'; 37 var transition = visible ? 'show-animated' : 'hide-animated';
38 classes.add(transition); 38 classes.add(transition);
39 classes.toggle('transparent'); 39 classes.toggle('transparent');
40 element.addEventListener('webkitTransitionEnd', function f() { 40 element.addEventListener('transitionend', function f() {
41 element.removeEventListener('webkitTransitionEnd', f); 41 element.removeEventListener('transitionend', f);
42 classes.remove(transition); 42 classes.remove(transition);
43 if (oldDurationValue) 43 if (oldDurationValue)
44 style.setProperty('transition-duration', oldDurationValue); 44 style.setProperty('transition-duration', oldDurationValue);
45 else 45 else
46 style.removeProperty('transition-duration'); 46 style.removeProperty('transition-duration');
47 if (opt_onFinished) 47 if (opt_onFinished)
48 opt_onFinished(); 48 opt_onFinished();
49 }); 49 });
50 ensureTransitionEndEvent(element, transitionDuration); 50 ensureTransitionEndEvent(element, transitionDuration);
51 } 51 }
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 } 270 }
271 }; 271 };
272 }); 272 });
273 273
274 /** 274 /**
275 * Initializes UI. 275 * Initializes UI.
276 */ 276 */
277 window.onload = function() { 277 window.onload = function() {
278 cr.FirstRun.initialize(); 278 cr.FirstRun.initialize();
279 }; 279 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698