Changeset 56997 in webkit
- Timestamp:
- Apr 2, 2010 5:17:17 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r56994 r56997 1 2010-04-02 Ilya Tikhonovsky <loislo@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 WebInspector: Timeline Overview pane should support short records filtering. 6 https://bugs.webkit.org/show_bug.cgi?id=37020 7 8 * English.lproj/localizedStrings.js: 9 * inspector/front-end/TimelineOverviewPane.js: 10 (WebInspector.TimelineOverviewPane.prototype.update.markTimeline): 11 (WebInspector.TimelineOverviewPane.prototype.update): 12 * inspector/front-end/TimelinePanel.js: 13 (WebInspector.TimelinePanel): 14 (WebInspector.TimelinePanel.prototype._createStatusbarButtons): 15 (WebInspector.TimelinePanel.prototype._toggleFilterButtonClicked): 16 (WebInspector.TimelinePanel.prototype._refresh): 17 (WebInspector.TimelinePanel.prototype._addToRecordsWindow): 18 (WebInspector.TimelinePanel.FormattedRecord.prototype.isLong): 19 1 20 2010-04-02 Laszlo Gombos <laszlo.1.gombos@nokia.com> 2 21 -
trunk/WebCore/inspector/front-end/TimelineOverviewPane.js
r55530 r56997 93 93 } 94 94 95 96 95 WebInspector.TimelineOverviewPane.prototype = { 97 96 _onCheckboxClicked: function (category, event) { … … 104 103 }, 105 104 106 update: function(records) 107 { 105 update: function(records, showShortEvents) 106 { 107 this._showShortEvents = showShortEvents; 108 108 // Clear summary bars. 109 109 var timelines = {}; … … 129 129 function markTimeline(record) 130 130 { 131 if (!(this._showShortEvents || record.isLong())) 132 return; 131 133 var percentages = this._overviewCalculator.computeBarGraphPercentages(record); 132 134 -
trunk/WebCore/inspector/front-end/TimelinePanel.js
r56789 r56997 77 77 this._itemsGraphsElement.appendChild(this._bottomGapElement); 78 78 79 this._createStatusbarButtons();80 81 79 this._rootRecord = this._createRootRecord(); 82 80 this._sendRequestRecords = {}; … … 85 83 this._calculator = new WebInspector.TimelineCalculator(); 86 84 this._calculator._showShortEvents = false; 85 var shortRecordThresholdTitle = Number.secondsToString(WebInspector.TimelinePanel.shortRecordThreshold, WebInspector.UIString.bind(WebInspector)); 86 this._showShortRecordsTitleText = WebInspector.UIString("Show the records that are shorter than %s", shortRecordThresholdTitle); 87 this._hideShortRecordsTitleText = WebInspector.UIString("Hide the records that are shorter than %s", shortRecordThresholdTitle); 88 this._createStatusbarButtons(); 89 87 90 this._boundariesAreValid = true; 88 91 this._scrollTop = 0; … … 94 97 this._calculator._showShortEvents = this.toggleFilterButton.toggled; 95 98 } 99 100 WebInspector.TimelinePanel.shortRecordThreshold = 0.015; 96 101 97 102 WebInspector.TimelinePanel.prototype = { … … 160 165 this.clearButton.addEventListener("click", this._clearPanel.bind(this), false); 161 166 162 this.toggleFilterButton = new WebInspector.StatusBarButton( WebInspector.UIString("Hide short records"), "timeline-filter-status-bar-item");167 this.toggleFilterButton = new WebInspector.StatusBarButton(this._hideShortRecordsTitleText, "timeline-filter-status-bar-item"); 163 168 this.toggleFilterButton.addEventListener("click", this._toggleFilterButtonClicked.bind(this), false); 164 169 … … 186 191 this.toggleFilterButton.toggled = !this.toggleFilterButton.toggled; 187 192 this._calculator._showShortEvents = this.toggleFilterButton.toggled; 188 this.toggleFilterButton.element.title = this._calculator._showShortEvents ? WebInspector.UIString("Hide short records") : WebInspector.UIString("Show short records");193 this.toggleFilterButton.element.title = this._calculator._showShortEvents ? this._hideShortRecordsTitleText : this._showShortRecordsTitleText; 189 194 this._scheduleRefresh(true); 190 195 }, … … 352 357 } 353 358 354 if (!this._boundariesAreValid) 355 this._overviewPane.update(this._rootRecord.children); 359 this._overviewPane.update(this._rootRecord.children, this._calculator._showShortEvents); 356 360 this._refreshRecords(!this._boundariesAreValid); 357 361 this._updateRecordsCounter(); … … 373 377 _addToRecordsWindow: function(record, recordsWindow, parentIsCollapsed) 374 378 { 375 if (!this._calculator._showShortEvents && !record. _isLongEvent())379 if (!this._calculator._showShortEvents && !record.isLong()) 376 380 return; 377 381 var percentages = this._calculator.computeBarGraphPercentages(record); … … 758 762 759 763 WebInspector.TimelinePanel.FormattedRecord.prototype = { 760 _isLongEvent: function() 761 { 762 const shortEventLength = 0.015; 763 return (this._lastChildEndTime - this.startTime) > shortEventLength; 764 isLong: function() 765 { 766 return (this._lastChildEndTime - this.startTime) > WebInspector.TimelinePanel.shortRecordThreshold; 764 767 }, 765 768
Note: See TracChangeset
for help on using the changeset viewer.