| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 */ | 380 */ |
| 381 WebInspector.CountersGraph.CounterUI = function(memoryCountersPane, title, curre
ntValueLabel, graphColor, counter, formatter) | 381 WebInspector.CountersGraph.CounterUI = function(memoryCountersPane, title, curre
ntValueLabel, graphColor, counter, formatter) |
| 382 { | 382 { |
| 383 this._memoryCountersPane = memoryCountersPane; | 383 this._memoryCountersPane = memoryCountersPane; |
| 384 this.counter = counter; | 384 this.counter = counter; |
| 385 this._formatter = formatter || Number.withThousandsSeparator; | 385 this._formatter = formatter || Number.withThousandsSeparator; |
| 386 var container = memoryCountersPane._infoWidget.element.createChild("div", "m
emory-counter-selector-info"); | 386 var container = memoryCountersPane._infoWidget.element.createChild("div", "m
emory-counter-selector-info"); |
| 387 | 387 |
| 388 this._setting = WebInspector.settings.createSetting("timelineCountersGraph-"
+ title, true); | 388 this._setting = WebInspector.settings.createSetting("timelineCountersGraph-"
+ title, true); |
| 389 this._filter = new WebInspector.ToolbarCheckbox(title, title, this._setting)
; | 389 this._filter = new WebInspector.ToolbarCheckbox(title, title, this._setting)
; |
| 390 this._filter.inputElement.classList.add("-theme-preserve"); |
| 390 var color = WebInspector.Color.parse(graphColor).setAlpha(0.5).asString(WebI
nspector.Color.Format.RGBA); | 391 var color = WebInspector.Color.parse(graphColor).setAlpha(0.5).asString(WebI
nspector.Color.Format.RGBA); |
| 391 if (color) { | 392 if (color) { |
| 392 this._filter.element.backgroundColor = color; | 393 this._filter.element.backgroundColor = color; |
| 393 this._filter.element.borderColor = "transparent"; | 394 this._filter.element.borderColor = "transparent"; |
| 394 } | 395 } |
| 395 this._filter.inputElement.addEventListener("click", this._toggleCounterGraph
.bind(this)); | 396 this._filter.inputElement.addEventListener("click", this._toggleCounterGraph
.bind(this)); |
| 396 container.appendChild(this._filter.element); | 397 container.appendChild(this._filter.element); |
| 397 this._range = this._filter.element.createChild("span", "range"); | 398 this._range = this._filter.element.createChild("span", "range"); |
| 398 | 399 |
| 399 this._value = memoryCountersPane._currentValuesBar.createChild("span", "memo
ry-counter-value"); | 400 this._value = memoryCountersPane._currentValuesBar.createChild("span", "memo
ry-counter-value"); |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 627 | 628 |
| 628 /** | 629 /** |
| 629 * @override | 630 * @override |
| 630 * @return {number} | 631 * @return {number} |
| 631 */ | 632 */ |
| 632 boundarySpan: function() | 633 boundarySpan: function() |
| 633 { | 634 { |
| 634 return this._maximumBoundary - this._minimumBoundary; | 635 return this._maximumBoundary - this._minimumBoundary; |
| 635 } | 636 } |
| 636 } | 637 } |
| OLD | NEW |