Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 cr.define('options', function() { | 5 cr.define('options', function() { |
| 6 ///////////////////////////////////////////////////////////////////////////// | 6 ///////////////////////////////////////////////////////////////////////////// |
| 7 // OptionsPage class: | 7 // OptionsPage class: |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * Base class for options page. | 10 * Base class for options page. |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 117 page.willHidePage(); | 117 page.willHidePage(); |
| 118 } | 118 } |
| 119 | 119 |
| 120 var prevVisible = false; | 120 var prevVisible = false; |
| 121 | 121 |
| 122 // Update visibilities to show only the hierarchy of the target page. | 122 // Update visibilities to show only the hierarchy of the target page. |
| 123 for (var name in this.registeredPages) { | 123 for (var name in this.registeredPages) { |
| 124 var page = this.registeredPages[name]; | 124 var page = this.registeredPages[name]; |
| 125 if (!page.parentPage && isRootPageLocked) | 125 if (!page.parentPage && isRootPageLocked) |
| 126 continue; | 126 continue; |
| 127 prevVisible = page.visible; | 127 if (name == pageName) |
| 128 prevVisible = page.visible; | |
|
Finnur
2011/10/20 10:00:59
For this change I don't have enough context to jud
csilv
2011/10/20 17:49:13
This was the bug that was causing searches to fail
| |
| 128 page.visible = name == pageName || | 129 page.visible = name == pageName || |
| 129 (!document.documentElement.classList.contains('hide-menu') && | 130 (!document.documentElement.classList.contains('hide-menu') && |
| 130 page.isAncestorOfPage(targetPage)); | 131 page.isAncestorOfPage(targetPage)); |
| 131 } | 132 } |
| 132 | 133 |
| 133 // Update the history and current location. | 134 // Update the history and current location. |
| 134 if (updateHistory) | 135 if (updateHistory) |
| 135 this.updateHistoryState_(); | 136 this.updateHistoryState_(); |
| 136 | 137 |
| 137 // Always update the page title. | 138 // Always update the page title. |
| (...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1058 canShowPage: function() { | 1059 canShowPage: function() { |
| 1059 return true; | 1060 return true; |
| 1060 }, | 1061 }, |
| 1061 }; | 1062 }; |
| 1062 | 1063 |
| 1063 // Export | 1064 // Export |
| 1064 return { | 1065 return { |
| 1065 OptionsPage: OptionsPage | 1066 OptionsPage: OptionsPage |
| 1066 }; | 1067 }; |
| 1067 }); | 1068 }); |
| OLD | NEW |