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

Unified Diff: chrome/browser/resources/options/browser_options.js

Issue 393943003: Settings page sliding transition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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 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/options/browser_options.js
diff --git a/chrome/browser/resources/options/browser_options.js b/chrome/browser/resources/options/browser_options.js
index c7bcb147c8cd40ab170006dd21461063323f6249..a9ef022813dc5703450c0df57b8d2d7135906fd0 100644
--- a/chrome/browser/resources/options/browser_options.js
+++ b/chrome/browser/resources/options/browser_options.js
@@ -73,14 +73,6 @@ cr.define('options', function() {
*/
initializationComplete_: false,
- /**
- * When a section is waiting to change its height, this will be a number.
- * Otherwise it'll be null.
- * @type {?number}
- * @private
- */
- sectionHeightChangeTimeout_: null,
-
/** @override */
initializePage: function() {
Page.prototype.initializePage.call(this);
@@ -745,13 +737,11 @@ cr.define('options', function() {
section.style.height = (showing ? 0 : container.offsetHeight) + 'px';
section.classList.add('sliding');
- if (this.sectionHeightChangeTimeout_ !== null)
- clearTimeout(this.sectionHeightChangeTimeout_);
+ // Force a style recalc before starting the animation.
+ /** @suppress {uselessCode} */
+ section.offsetHeight;
- this.sectionHeightChangeTimeout_ = setTimeout(function() {
- section.style.height = (showing ? container.offsetHeight : 0) + 'px';
- this.sectionHeightChangeTimeout_ = null;
- });
+ section.style.height = (showing ? container.offsetHeight : 0) + 'px';
},
/**
« 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