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

Side by Side Diff: chrome/browser/resources/print_preview/print_preview_animations.js

Issue 585573002: Remove debug condition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Counter used to give webkit animations unique names. 5 // Counter used to give webkit animations unique names.
6 var animationCounter = 0; 6 var animationCounter = 0;
7 7
8 var animationEventTracker_ = new EventTracker(); 8 var animationEventTracker_ = new EventTracker();
9 9
10 function addAnimation(code) { 10 function addAnimation(code) {
(...skipping 30 matching lines...) Expand all
41 * animation. 41 * animation.
42 */ 42 */
43 function fadeInElement(el, opt_justShow) { 43 function fadeInElement(el, opt_justShow) {
44 if (el.classList.contains('visible')) 44 if (el.classList.contains('visible'))
45 return; 45 return;
46 el.classList.remove('closing'); 46 el.classList.remove('closing');
47 el.hidden = false; 47 el.hidden = false;
48 el.setAttribute('aria-hidden', 'false'); 48 el.setAttribute('aria-hidden', 'false');
49 el.style.height = 'auto'; 49 el.style.height = 'auto';
50 var height = el.offsetHeight; 50 var height = el.offsetHeight;
51 if (opt_justShow && false) { 51 if (opt_justShow) {
52 el.style.height = ''; 52 el.style.height = '';
53 el.style.opacity = ''; 53 el.style.opacity = '';
54 } else { 54 } else {
55 el.style.height = height + 'px'; 55 el.style.height = height + 'px';
56 var animName = addAnimation(getFadeInAnimationCode(height)); 56 var animName = addAnimation(getFadeInAnimationCode(height));
57 animationEventTracker_.add( 57 animationEventTracker_.add(
58 el, 'webkitAnimationEnd', onFadeInAnimationEnd.bind(el), false); 58 el, 'webkitAnimationEnd', onFadeInAnimationEnd.bind(el), false);
59 el.style.webkitAnimationName = animName; 59 el.style.webkitAnimationName = animName;
60 } 60 }
61 el.classList.add('visible'); 61 el.classList.add('visible');
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 while (el.childNodes.length > 0) 182 while (el.childNodes.length > 0)
183 div.appendChild(el.firstChild); 183 div.appendChild(el.firstChild);
184 el.appendChild(div); 184 el.appendChild(div);
185 } 185 }
186 186
187 div.className = ''; 187 div.className = '';
188 div.classList.add('collapsible'); 188 div.classList.add('collapsible');
189 for (var i = 0; i < classes.length; i++) 189 for (var i = 0; i < classes.length; i++)
190 div.classList.add(classes[i]); 190 div.classList.add(classes[i]);
191 } 191 }
OLDNEW
« 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