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 7150161af7458d9391d1995fa79bcc6cdbf432e2..6c1c303137d5a831574a2d56cab74fd785dc64f4 100644 |
| --- a/chrome/browser/resources/settings/settings_main/settings_main.js |
| +++ b/chrome/browser/resources/settings/settings_main/settings_main.js |
| @@ -112,13 +112,14 @@ Polymer({ |
| this.inSubpage_ = newRoute.subpage.length > 0; |
| this.style.height = this.inSubpage_ ? '100%' : ''; |
| - if (newRoute.page == 'about') { |
| + if (newRoute.inSubtreeOf(settings.Route.ABOUT)) { |
|
michaelpg
2016/07/28 23:22:32
so, what we care about is what is the *root* of ne
tommycli
2016/07/29 00:03:35
So... I would create a 'root', except that we also
michaelpg
2016/07/29 00:21:12
in a later CL, you mean? Why do we want to get rid
michaelpg
2016/07/29 00:29:14
just realized I'm conflating .section and .subpage
tommycli
2016/07/29 18:23:43
Hey, I thought about the variety of things you sai
michaelpg
2016/07/29 20:28:53
"The contains(other) method must return true if ot
|
| this.showPages_ = {about: true, basic: false, advanced: false}; |
| } else { |
| this.showPages_ = { |
| about: false, |
| - basic: newRoute.page == 'basic' || !this.inSubpage_, |
| - advanced: newRoute.page == 'advanced' || |
| + basic: |
| + newRoute.inSubtreeOf(settings.Route.BASIC) || !this.inSubpage_, |
| + advanced: newRoute.inSubtreeOf(settings.Route.ADVANCED) || |
| (!this.inSubpage_ && this.advancedToggleExpanded_), |
| }; |