Chromium Code Reviews| Index: chrome/browser/resources/settings/settings_main/settings_main.js |
| diff --git a/chrome/browser/resources/settings/settings_main/settings_main.js b/chrome/browser/resources/settings/settings_main/settings_main.js |
| index b8a061845bc8925ee9705f08eeb277b6da89e888..f6805363bd988cd7795e4770dad5824a7e090583 100644 |
| --- a/chrome/browser/resources/settings/settings_main/settings_main.js |
| +++ b/chrome/browser/resources/settings/settings_main/settings_main.js |
| @@ -63,10 +63,28 @@ Polymer({ |
| document.addEventListener('toggle-advanced-page', function(e) { |
| this.showAdvancedPage_ = e.detail; |
| this.isAdvancedMenuOpen_ = e.detail; |
| + if (this.showAdvancedPage_) { |
| + scrollWhenReady( |
| + function() { |
| + return this.shadowRoot.querySelector('settings-advanced-page'); |
|
michaelpg
2016/06/16 03:45:59
this.$$('...')
dschuyler
2016/06/16 20:14:21
Done.
|
| + }.bind(this), |
| + function() { |
| + return this.shadowRoot.querySelector('#toggleContainer'); |
|
michaelpg
2016/06/16 03:45:59
this.$$('...')
dschuyler
2016/06/16 20:14:21
Done.
|
| + }.bind(this)); |
| + } |
| }.bind(this)); |
| }, |
| /** |
| + * @param {boolean} opened Whether the menu is expanded. |
| + * @return {string} Which icon to use. |
| + * @private |
| + * */ |
| + arrowState_: function(opened) { |
| + return opened ? 'settings:arrow-drop-up' : 'cr:arrow-drop-down'; |
| + }, |
| + |
| + /** |
| * @param {!SettingsRoute} newRoute |
| * @private |
| */ |
| @@ -83,7 +101,7 @@ Polymer({ |
| (this.isAdvancedMenuOpen_ && this.showAdvancedToggle_) || |
| newRoute.page == 'advanced'; |
| - this.$.pageContainer.style.height = isSubpage ? '100%' : ''; |
| + this.style.height = isSubpage ? '100%' : ''; |
| }, |
| /** @private */ |