| 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 }, | 194 }, |
| 195 | 195 |
| 196 /** | 196 /** |
| 197 * @param {boolean} checkCategories | 197 * @param {boolean} checkCategories |
| 198 * @param {boolean=} userGesture | 198 * @param {boolean=} userGesture |
| 199 */ | 199 */ |
| 200 _selectAllClicked: function(checkCategories, userGesture) | 200 _selectAllClicked: function(checkCategories, userGesture) |
| 201 { | 201 { |
| 202 var childNodes = this._categoriesElement.childNodes; | 202 var childNodes = this._categoriesElement.childNodes; |
| 203 for (var i = 0, length = childNodes.length; i < length; ++i) | 203 for (var i = 0, length = childNodes.length; i < length; ++i) |
| 204 childNodes[i].firstChild.checked = checkCategories; | 204 childNodes[i].checkboxElement.checked = checkCategories; |
| 205 this._currentCategoriesCount = checkCategories ? this._sortedCategories.
length : 0; | 205 this._currentCategoriesCount = checkCategories ? this._sortedCategories.
length : 0; |
| 206 this._selectedCategoriesUpdated(userGesture); | 206 this._selectedCategoriesUpdated(userGesture); |
| 207 }, | 207 }, |
| 208 | 208 |
| 209 _categoryClicked: function(event) | 209 _categoryClicked: function(event) |
| 210 { | 210 { |
| 211 this._currentCategoriesCount += event.target.checked ? 1 : -1; | 211 this._currentCategoriesCount += event.target.checked ? 1 : -1; |
| 212 this._selectAllCheckboxElement.checked = this._currentCategoriesCount ==
= this._sortedCategories.length; | 212 this._selectAllCheckboxElement.checked = this._currentCategoriesCount ==
= this._sortedCategories.length; |
| 213 this._selectedCategoriesUpdated(true); | 213 this._selectedCategoriesUpdated(true); |
| 214 }, | 214 }, |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 }, | 300 }, |
| 301 | 301 |
| 302 _updateButton: function() | 302 _updateButton: function() |
| 303 { | 303 { |
| 304 this._launchButton.textContent = this._auditRunning ? WebInspector.UIStr
ing("Stop") : WebInspector.UIString("Run"); | 304 this._launchButton.textContent = this._auditRunning ? WebInspector.UIStr
ing("Stop") : WebInspector.UIString("Run"); |
| 305 this._launchButton.disabled = !this._currentCategoriesCount; | 305 this._launchButton.disabled = !this._currentCategoriesCount; |
| 306 }, | 306 }, |
| 307 | 307 |
| 308 __proto__: WebInspector.VBox.prototype | 308 __proto__: WebInspector.VBox.prototype |
| 309 } | 309 } |
| OLD | NEW |