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

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, 5 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 dfad54a0e068866fcbe4036ba0de35db5def7799..6362355d5a3f09e42b11879c6db3133b754516ee 100644
--- a/chrome/browser/resources/options/browser_options.js
+++ b/chrome/browser/resources/options/browser_options.js
@@ -671,16 +671,14 @@ cr.define('options', function() {
this.addTransitionEndListener_(section);
- section.hidden = false;
section.style.height = (showing ? 0 : container.offsetHeight) + 'px';
- section.classList.add('sliding');
-
- if (this.sectionHeightChangeTimeout_ !== null)
- clearTimeout(this.sectionHeightChangeTimeout_);
+ window.requestAnimationFrame(function() {
Dan Beam 2014/07/15 23:04:15 please handle the case where a user toggles the ch
michaelpg 2014/07/15 23:18:32 will do. Does this make sense to you otherwise? I
michaelpg 2014/08/22 22:17:58 The current implementation has another bug. If you
+ section.hidden = false;
+ section.classList.add('sliding');
- this.sectionHeightChangeTimeout_ = setTimeout(function() {
- section.style.height = (showing ? container.offsetHeight : 0) + 'px';
- this.sectionHeightChangeTimeout_ = null;
+ window.requestAnimationFrame(function() {
+ 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