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

Unified Diff: chrome/browser/resources/print_preview/print_preview_animations.js

Issue 139963002: Call el.offsetHeight; to force update of computed style. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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/print_preview/print_preview_animations.js
diff --git a/chrome/browser/resources/print_preview/print_preview_animations.js b/chrome/browser/resources/print_preview/print_preview_animations.js
index 7455a385f5c860924fa1563252c3e7d2ad6edb7b..fffe46a2d45ad52175790801b757ecba0ab44c58 100644
--- a/chrome/browser/resources/print_preview/print_preview_animations.js
+++ b/chrome/browser/resources/print_preview/print_preview_animations.js
@@ -64,10 +64,10 @@ function fadeOutElement(el) {
el.style.height = 'auto';
var height = el.offsetHeight;
el.style.height = height + 'px';
- var animName = addAnimation('');
+ el.offsetHeight; // Should force an update of the computed style.
Noam Samuel 2014/01/15 22:08:44 Should this have a TODO attached to it to remove i
var eventTracker = new EventTracker();
eventTracker.add(el, 'webkitTransitionEnd',
- onFadeOutTransitionEnd.bind(el, animName, eventTracker),
+ onFadeOutTransitionEnd.bind(el, eventTracker),
false);
el.classList.add('closing');
el.classList.remove('visible');
@@ -75,16 +75,14 @@ function fadeOutElement(el) {
/**
* Executes when a fade out animation ends.
- * @param {string} animationName The name of the animation to be removed.
* @param {EventTracker} eventTracker The |EventTracker| object that was used
* for adding this listener.
* @param {WebkitTransitionEvent} event The event that triggered this listener.
* @this {HTMLElement} The element where the transition occurred.
*/
-function onFadeOutTransitionEnd(animationName, eventTracker, event) {
+function onFadeOutTransitionEnd(eventTracker, event) {
if (event.propertyName != 'height')
return;
- fadeInOutCleanup(animationName);
eventTracker.remove(this, 'webkitTransitionEnd');
this.hidden = true;
}
« 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