| 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 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 counterElement.id = id; | 405 counterElement.id = id; |
| 406 counterElement.textContent = count; | 406 counterElement.textContent = count; |
| 407 }, | 407 }, |
| 408 | 408 |
| 409 /** | 409 /** |
| 410 * @param {number} errors | 410 * @param {number} errors |
| 411 * @param {number} warnings | 411 * @param {number} warnings |
| 412 */ | 412 */ |
| 413 setErrorAndWarningCounts: function(errors, warnings) | 413 setErrorAndWarningCounts: function(errors, warnings) |
| 414 { | 414 { |
| 415 if (this._errors === errors && this._warnings === warnings) |
| 416 return; |
| 417 this._errors = errors; |
| 418 this._warnings = warnings; |
| 415 this._errorWarningCountElement.classList.toggle("hidden", !errors && !wa
rnings); | 419 this._errorWarningCountElement.classList.toggle("hidden", !errors && !wa
rnings); |
| 416 this._errorWarningCountElement.removeChildren(); | 420 this._errorWarningCountElement.removeChildren(); |
| 417 | 421 |
| 418 this._createImagedCounterElementIfNeeded(errors, "error-count", "error-i
con-small"); | 422 this._createImagedCounterElementIfNeeded(errors, "error-count", "error-i
con-small"); |
| 419 this._createImagedCounterElementIfNeeded(warnings, "warning-count", "war
ning-icon-small"); | 423 this._createImagedCounterElementIfNeeded(warnings, "warning-count", "war
ning-icon-small"); |
| 420 | 424 |
| 421 var errorString = errors ? WebInspector.UIString("%d error%s", errors,
errors > 1 ? "s" : "") : ""; | 425 var errorString = errors ? WebInspector.UIString("%d error%s", errors,
errors > 1 ? "s" : "") : ""; |
| 422 var warningString = warnings ? WebInspector.UIString("%d warning%s", wa
rnings, warnings > 1 ? "s" : "") : ""; | 426 var warningString = warnings ? WebInspector.UIString("%d warning%s", wa
rnings, warnings > 1 ? "s" : "") : ""; |
| 423 var commaString = errors && warnings ? ", " : ""; | 427 var commaString = errors && warnings ? ", " : ""; |
| 424 this._errorWarningCountElement.title = errorString + commaString + warni
ngString; | 428 this._errorWarningCountElement.title = errorString + commaString + warni
ngString; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 window.addEventListener("scroll", this._onScrollBound, false); | 505 window.addEventListener("scroll", this._onScrollBound, false); |
| 502 else | 506 else |
| 503 window.removeEventListener("scroll", this._onScrollBound, false); | 507 window.removeEventListener("scroll", this._onScrollBound, false); |
| 504 | 508 |
| 505 WebInspector.VBox.prototype.doResize.call(this); | 509 WebInspector.VBox.prototype.doResize.call(this); |
| 506 this._onScroll(); | 510 this._onScroll(); |
| 507 }, | 511 }, |
| 508 | 512 |
| 509 __proto__: WebInspector.VBox.prototype | 513 __proto__: WebInspector.VBox.prototype |
| 510 }; | 514 }; |
| OLD | NEW |