Title: [109109] trunk/Source/WebCore
- Revision
- 109109
- Author
- [email protected]
- Date
- 2012-02-28 08:27:25 -0800 (Tue, 28 Feb 2012)
Log Message
Web Inspector: preserve memory counters size after frontend reopening
https://bugs.webkit.org/show_bug.cgi?id=79792
Clear collected counter values when timeline panel is reset. Persist
timeline grid/counters splitter position to restore it when front-end
is opened next time.
Reviewed by Pavel Feldman.
* inspector/front-end/MemoryStatistics.js:
(WebInspector.MemoryStatistics.prototype.reset):
* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel):
(WebInspector.TimelinePanel.prototype._setSplitterPosition):
(WebInspector.TimelinePanel.prototype._resetPanel):
* inspector/front-end/timelinePanel.css:
(#counter-values-bar):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (109108 => 109109)
--- trunk/Source/WebCore/ChangeLog 2012-02-28 16:27:09 UTC (rev 109108)
+++ trunk/Source/WebCore/ChangeLog 2012-02-28 16:27:25 UTC (rev 109109)
@@ -1,3 +1,23 @@
+2012-02-28 Yury Semikhatsky <[email protected]>
+
+ Web Inspector: preserve memory counters size after frontend reopening
+ https://bugs.webkit.org/show_bug.cgi?id=79792
+
+ Clear collected counter values when timeline panel is reset. Persist
+ timeline grid/counters splitter position to restore it when front-end
+ is opened next time.
+
+ Reviewed by Pavel Feldman.
+
+ * inspector/front-end/MemoryStatistics.js:
+ (WebInspector.MemoryStatistics.prototype.reset):
+ * inspector/front-end/TimelinePanel.js:
+ (WebInspector.TimelinePanel):
+ (WebInspector.TimelinePanel.prototype._setSplitterPosition):
+ (WebInspector.TimelinePanel.prototype._resetPanel):
+ * inspector/front-end/timelinePanel.css:
+ (#counter-values-bar):
+
2012-02-28 Pavel Feldman <[email protected]>
Web Inspector: move filtering of the timeline records into the presentation model.
Modified: trunk/Source/WebCore/inspector/front-end/MemoryStatistics.js (109108 => 109109)
--- trunk/Source/WebCore/inspector/front-end/MemoryStatistics.js 2012-02-28 16:27:09 UTC (rev 109108)
+++ trunk/Source/WebCore/inspector/front-end/MemoryStatistics.js 2012-02-28 16:27:25 UTC (rev 109109)
@@ -207,6 +207,11 @@
WebInspector.MemoryStatistics.prototype = {
+ reset: function()
+ {
+ this._counters = [];
+ },
+
setMainTimelineGrid: function(timelineGrid)
{
this._mainTimelineGrid = timelineGrid;
Modified: trunk/Source/WebCore/inspector/front-end/TimelinePanel.js (109108 => 109109)
--- trunk/Source/WebCore/inspector/front-end/TimelinePanel.js 2012-02-28 16:27:09 UTC (rev 109108)
+++ trunk/Source/WebCore/inspector/front-end/TimelinePanel.js 2012-02-28 16:27:25 UTC (rev 109109)
@@ -63,6 +63,7 @@
this._timelineMemorySplitter.addStyleClass("hidden");
this._memoryStatistics = new WebInspector.MemoryStatistics(this, this.splitView.preferredSidebarWidth());
this._overviewPane.addEventListener(WebInspector.TimelineOverviewPane.Events.ModeChanged, this._timelinesOverviewModeChanged, this);
+ WebInspector.settings.memoryCounterGraphsHeight = WebInspector.settings.createSetting("memoryCounterGraphsHeight", 150);
}
var itemsTreeElement = new WebInspector.SidebarSectionTreeElement(WebInspector.UIString("RECORDS"), {}, true);
@@ -163,6 +164,7 @@
WebInspector.elementDragEnd(event);
if (this._memoryStatistics)
this._memoryStatistics.show();
+ WebInspector.settings.memoryCounterGraphsHeight.set(this.splitView.element.offsetHeight);
},
_setSplitterPosition: function(top)
@@ -388,7 +390,7 @@
this._timelineMemorySplitter.removeStyleClass("hidden");
this._memoryStatistics.show();
this.splitView.element.style.bottom = "auto";
- this._setSplitterPosition(600);
+ this._setSplitterPosition(WebInspector.settings.memoryCounterGraphsHeight.get());
}
this._refresh();
},
@@ -506,6 +508,8 @@
this._adjustScrollPosition(0);
this._closeRecordDetails();
this._allRecordsCount = 0;
+ if (this._memoryStatistics)
+ this._memoryStatistics.reset();
},
elementsToRestoreScrollPositionsFor: function()
Modified: trunk/Source/WebCore/inspector/front-end/timelinePanel.css (109108 => 109109)
--- trunk/Source/WebCore/inspector/front-end/timelinePanel.css 2012-02-28 16:27:09 UTC (rev 109108)
+++ trunk/Source/WebCore/inspector/front-end/timelinePanel.css 2012-02-28 16:27:25 UTC (rev 109109)
@@ -599,6 +599,7 @@
#counter-values-bar {
border-bottom: solid 1px lightgray;
+ min-height: 15px;
}
.timeline-overview-start-at-zero-bars {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes