Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 166 this._updateButton(); | 166 this._updateButton(); |
| 167 this._toggleUIComponents(this._auditRunning); | 167 this._toggleUIComponents(this._auditRunning); |
| 168 }, | 168 }, |
| 169 | 169 |
| 170 /** | 170 /** |
| 171 * @param {boolean} disable | 171 * @param {boolean} disable |
| 172 */ | 172 */ |
| 173 _toggleUIComponents: function(disable) | 173 _toggleUIComponents: function(disable) |
| 174 { | 174 { |
| 175 this._selectAllCheckboxElement.disabled = disable; | 175 this._selectAllCheckboxElement.disabled = disable; |
| 176 this._categoriesElement.disabled = disable; | 176 for (var child = this._categoriesElement.firstChild; child; child = chil d.nextSibling) |
|
lushnikov
2015/06/22 13:51:12
why iterate over dom?
| |
| 177 child.checkboxElement.disabled = disable; | |
| 177 this._auditPresentStateElement.disabled = disable; | 178 this._auditPresentStateElement.disabled = disable; |
| 178 this._auditReloadedStateElement.disabled = disable; | 179 this._auditReloadedStateElement.disabled = disable; |
| 179 }, | 180 }, |
| 180 | 181 |
| 181 _launchButtonClicked: function(event) | 182 _launchButtonClicked: function(event) |
| 182 { | 183 { |
| 183 if (this._auditRunning) { | 184 if (this._auditRunning) { |
| 184 this._launchButton.disabled = true; | 185 this._launchButton.disabled = true; |
| 185 this._progressIndicator.cancel(); | 186 this._progressIndicator.cancel(); |
| 186 return; | 187 return; |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 300 }, | 301 }, |
| 301 | 302 |
| 302 _updateButton: function() | 303 _updateButton: function() |
| 303 { | 304 { |
| 304 this._launchButton.textContent = this._auditRunning ? WebInspector.UIStr ing("Stop") : WebInspector.UIString("Run"); | 305 this._launchButton.textContent = this._auditRunning ? WebInspector.UIStr ing("Stop") : WebInspector.UIString("Run"); |
| 305 this._launchButton.disabled = !this._currentCategoriesCount; | 306 this._launchButton.disabled = !this._currentCategoriesCount; |
| 306 }, | 307 }, |
| 307 | 308 |
| 308 __proto__: WebInspector.VBox.prototype | 309 __proto__: WebInspector.VBox.prototype |
| 309 } | 310 } |
| OLD | NEW |