Chromium Code Reviews| 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'; |
| + }); |
| }); |
| }, |