Changeset 118670 in webkit
- Timestamp:
- May 28, 2012, 3:20:35 AM (14 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
inspector/front-end/MemoryStatistics.js (modified) (3 diffs)
-
inspector/front-end/TimelinePanel.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r118668 r118670 1 2012-05-28 Yury Semikhatsky <yurys@chromium.org> 2 3 Web Inspector: dom counters graphs vanish on switching between timeline views 4 https://bugs.webkit.org/show_bug.cgi?id=87628 5 6 Reviewed by Vsevolod Vlasov. 7 8 MemoryStatistics object now listens to the TimelineModel events instead of being 9 populated by timeline panel. This behavior mathes that of the overview pane. 10 11 * inspector/front-end/MemoryStatistics.js: 12 (WebInspector.MemoryStatistics.prototype.addTimlineEvent): 13 * inspector/front-end/TimelinePanel.js: 14 (WebInspector.TimelinePanel.prototype._onTimelineEventRecorded): 15 (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline): 16 1 17 2012-05-28 Marcus Bulach <bulach@chromium.org> 2 18 -
trunk/Source/WebCore/inspector/front-end/MemoryStatistics.js
r113177 r118670 31 31 /** 32 32 * @param {WebInspector.TimelinePanel} timelinePanel 33 * @param {WebInspector.TimelineModel} model 33 34 * @param {number} sidebarWidth 34 35 * @constructor 35 36 */ 36 WebInspector.MemoryStatistics = function(timelinePanel, sidebarWidth)37 WebInspector.MemoryStatistics = function(timelinePanel, model, sidebarWidth) 37 38 { 38 39 this._timelinePanel = timelinePanel; 39 40 this._counters = []; 41 42 model.addEventListener(WebInspector.TimelineModel.Events.RecordAdded, this._onRecordAdded, this); 43 model.addEventListener(WebInspector.TimelineModel.Events.RecordsCleared, this._onRecordsCleared, this); 40 44 41 45 this._containerAnchor = timelinePanel.element.lastChild; … … 208 212 209 213 WebInspector.MemoryStatistics.prototype = { 210 reset: function()214 _onRecordsCleared: function() 211 215 { 212 216 this._counters = []; … … 252 256 }, 253 257 254 addTimlineEvent: function(event)258 _onRecordAdded: function(event) 255 259 { 256 260 var counters = event.data["counters"]; -
trunk/Source/WebCore/inspector/front-end/TimelinePanel.js
r114740 r118670 62 62 this._timelineMemorySplitter.addEventListener("mousedown", this._startSplitterDragging.bind(this), false); 63 63 this._timelineMemorySplitter.addStyleClass("hidden"); 64 this._memoryStatistics = new WebInspector.MemoryStatistics(this, this. splitView.preferredSidebarWidth());64 this._memoryStatistics = new WebInspector.MemoryStatistics(this, this._model, this.splitView.preferredSidebarWidth()); 65 65 WebInspector.settings.memoryCounterGraphsHeight = WebInspector.settings.createSetting("memoryCounterGraphsHeight", 150); 66 66 … … 483 483 this._innerAddRecordToTimeline(event.data, this._rootRecord()); 484 484 this._scheduleRefresh(false); 485 486 if (event.data["counters"])487 this._memoryStatistics.addTimlineEvent(event);488 485 }, 489 486 … … 538 535 this._closeRecordDetails(); 539 536 this._allRecordsCount = 0; 540 this._memoryStatistics.reset();541 537 }, 542 538
Note:
See TracChangeset
for help on using the changeset viewer.