Title: [109204] trunk
Revision
109204
Author
[email protected]
Date
2012-02-29 00:29:38 -0800 (Wed, 29 Feb 2012)

Log Message

2012-02-28  Yury Semikhatsky  <[email protected]>

        Web Inspector: move DOM counter graphs out of experimental
        https://bugs.webkit.org/show_bug.cgi?id=79802

        Enable DOM counter graphs by default.

        Reveal nearest record from the left hand side when there is no
        record containing the point where the user clicked.

        Reviewed by Pavel Feldman.

        * inspector/front-end/Settings.js:
        (WebInspector.ExperimentsSettings):
        * inspector/front-end/TimelinePanel.js:
        (WebInspector.TimelinePanel):
        (WebInspector.TimelinePanel.prototype._endSplitterDragging):
        (WebInspector.TimelinePanel.prototype._onTimelineEventRecorded):
        (WebInspector.TimelinePanel.prototype.sidebarResized):
        (WebInspector.TimelinePanel.prototype._resetPanel):
        (WebInspector.TimelinePanel.prototype._refresh):
        (WebInspector.TimelinePanel.prototype.revealRecordAt):

2012-02-29  Yury Semikhatsky  <[email protected]>

        Web Inspector: move DOM counter graphs out of experimental
        https://bugs.webkit.org/show_bug.cgi?id=79802

        Enable DOM counter graphs by default. Rebase timeline tests so that
        the records include counters field.

        Reviewed by Pavel Feldman.

        * inspector/timeline/timeline-dom-content-loaded-event-expected.txt:
        * inspector/timeline/timeline-event-dispatch-expected.txt:
        * inspector/timeline/timeline-injected-script-eval-expected.txt:
        * inspector/timeline/timeline-layout-expected.txt:
        * inspector/timeline/timeline-load-event-expected.txt:
        * inspector/timeline/timeline-mark-timeline-expected.txt:
        * inspector/timeline/timeline-network-resource-expected.txt:
        * inspector/timeline/timeline-parse-html-expected.txt:
        * inspector/timeline/timeline-recalculate-styles-expected.txt:
        * inspector/timeline/timeline-script-tag-1-expected.txt:
        * inspector/timeline/timeline-script-tag-2-expected.txt:
        * inspector/timeline/timeline-test.js:
        * inspector/timeline/timeline-time-stamp-expected.txt:
        * platform/chromium/inspector/timeline/timeline-animation-frame-expected.txt:
        * platform/chromium/inspector/timeline/timeline-event-dispatch-expected.txt:
        * platform/chromium/inspector/timeline/timeline-layout-expected.txt:
        * platform/chromium/inspector/timeline/timeline-mark-timeline-expected.txt:
        * platform/chromium/inspector/timeline/timeline-network-resource-expected.txt:
        * platform/chromium/inspector/timeline/timeline-paint-expected.txt:
        * platform/chromium/inspector/timeline/timeline-parse-html-expected.txt:
        * platform/chromium/inspector/timeline/timeline-time-stamp-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (109203 => 109204)


--- trunk/LayoutTests/ChangeLog	2012-02-29 08:07:16 UTC (rev 109203)
+++ trunk/LayoutTests/ChangeLog	2012-02-29 08:29:38 UTC (rev 109204)
@@ -1,3 +1,35 @@
+2012-02-29  Yury Semikhatsky  <[email protected]>
+
+        Web Inspector: move DOM counter graphs out of experimental
+        https://bugs.webkit.org/show_bug.cgi?id=79802
+
+        Enable DOM counter graphs by default. Rebase timeline tests so that
+        the records include counters field.
+
+        Reviewed by Pavel Feldman.
+
+        * inspector/timeline/timeline-dom-content-loaded-event-expected.txt:
+        * inspector/timeline/timeline-event-dispatch-expected.txt:
+        * inspector/timeline/timeline-injected-script-eval-expected.txt:
+        * inspector/timeline/timeline-layout-expected.txt:
+        * inspector/timeline/timeline-load-event-expected.txt:
+        * inspector/timeline/timeline-mark-timeline-expected.txt:
+        * inspector/timeline/timeline-network-resource-expected.txt:
+        * inspector/timeline/timeline-parse-html-expected.txt:
+        * inspector/timeline/timeline-recalculate-styles-expected.txt:
+        * inspector/timeline/timeline-script-tag-1-expected.txt:
+        * inspector/timeline/timeline-script-tag-2-expected.txt:
+        * inspector/timeline/timeline-test.js:
+        * inspector/timeline/timeline-time-stamp-expected.txt:
+        * platform/chromium/inspector/timeline/timeline-animation-frame-expected.txt:
+        * platform/chromium/inspector/timeline/timeline-event-dispatch-expected.txt:
+        * platform/chromium/inspector/timeline/timeline-layout-expected.txt:
+        * platform/chromium/inspector/timeline/timeline-mark-timeline-expected.txt:
+        * platform/chromium/inspector/timeline/timeline-network-resource-expected.txt:
+        * platform/chromium/inspector/timeline/timeline-paint-expected.txt:
+        * platform/chromium/inspector/timeline/timeline-parse-html-expected.txt:
+        * platform/chromium/inspector/timeline/timeline-time-stamp-expected.txt:
+
 2012-02-28  Csaba Osztrogonác  <[email protected]>
 
         [Qt] Unreviewed morning gardening, skip new failing tests.

Modified: trunk/LayoutTests/inspector/timeline/timeline-dom-content-loaded-event-expected.txt (109203 => 109204)


--- trunk/LayoutTests/inspector/timeline/timeline-dom-content-loaded-event-expected.txt	2012-02-29 08:07:16 UTC (rev 109203)
+++ trunk/LayoutTests/inspector/timeline/timeline-dom-content-loaded-event-expected.txt	2012-02-29 08:29:38 UTC (rev 109204)
@@ -8,6 +8,7 @@
     type : "MarkDOMContent"
     usedHeapSize : <number>
     totalHeapSize : <number>
+    counters : <object>
 }
 Page reloaded.
 

Modified: trunk/LayoutTests/inspector/timeline/timeline-event-dispatch-expected.txt (109203 => 109204)


--- trunk/LayoutTests/inspector/timeline/timeline-event-dispatch-expected.txt	2012-02-29 08:07:16 UTC (rev 109203)
+++ trunk/LayoutTests/inspector/timeline/timeline-event-dispatch-expected.txt	2012-02-29 08:29:38 UTC (rev 109204)
@@ -12,5 +12,6 @@
     type : "EventDispatch"
     usedHeapSize : <number>
     totalHeapSize : <number>
+    counters : <object>
 }
 

Modified: trunk/LayoutTests/inspector/timeline/timeline-injected-script-eval-expected.txt (109203 => 109204)


--- trunk/LayoutTests/inspector/timeline/timeline-injected-script-eval-expected.txt	2012-02-29 08:07:16 UTC (rev 109203)
+++ trunk/LayoutTests/inspector/timeline/timeline-injected-script-eval-expected.txt	2012-02-29 08:29:38 UTC (rev 109204)
@@ -12,6 +12,7 @@
     type : "FunctionCall"
     usedHeapSize : <number>
     totalHeapSize : <number>
+    counters : <object>
 }
 FunctionCall Properties:
 {
@@ -25,5 +26,6 @@
     type : "FunctionCall"
     usedHeapSize : <number>
     totalHeapSize : <number>
+    counters : <object>
 }
 

Modified: trunk/LayoutTests/inspector/timeline/timeline-layout-expected.txt (109203 => 109204)


--- trunk/LayoutTests/inspector/timeline/timeline-layout-expected.txt	2012-02-29 08:07:16 UTC (rev 109203)
+++ trunk/LayoutTests/inspector/timeline/timeline-layout-expected.txt	2012-02-29 08:29:38 UTC (rev 109204)
@@ -11,5 +11,6 @@
     type : "Layout"
     usedHeapSize : <number>
     totalHeapSize : <number>
+    counters : <object>
 }
 

Modified: trunk/LayoutTests/inspector/timeline/timeline-load-event-expected.txt (109203 => 109204)


--- trunk/LayoutTests/inspector/timeline/timeline-load-event-expected.txt	2012-02-29 08:07:16 UTC (rev 109203)
+++ trunk/LayoutTests/inspector/timeline/timeline-load-event-expected.txt	2012-02-29 08:29:38 UTC (rev 109204)
@@ -9,5 +9,6 @@
     type : "MarkLoad"
     usedHeapSize : <number>
     totalHeapSize : <number>
+    counters : <object>
 }
 

Modified: trunk/LayoutTests/inspector/timeline/timeline-mark-timeline-expected.txt (109203 => 109204)


--- trunk/LayoutTests/inspector/timeline/timeline-mark-timeline-expected.txt	2012-02-29 08:07:16 UTC (rev 109203)
+++ trunk/LayoutTests/inspector/timeline/timeline-mark-timeline-expected.txt	2012-02-29 08:29:38 UTC (rev 109204)
@@ -9,5 +9,6 @@
     type : "TimeStamp"
     usedHeapSize : <number>
     totalHeapSize : <number>
+    counters : <object>
 }
 

Modified: trunk/LayoutTests/inspector/timeline/timeline-network-resource-expected.txt (109203 => 109204)


--- trunk/LayoutTests/inspector/timeline/timeline-network-resource-expected.txt	2012-02-29 08:07:16 UTC (rev 109203)
+++ trunk/LayoutTests/inspector/timeline/timeline-network-resource-expected.txt	2012-02-29 08:29:38 UTC (rev 109204)
@@ -14,6 +14,7 @@
     type : "ResourceSendRequest"
     usedHeapSize : <number>
     totalHeapSize : <number>
+    counters : <object>
 }
 
 ResourceReceiveResponse Properties:
@@ -29,6 +30,7 @@
     type : "ResourceReceiveResponse"
     usedHeapSize : <number>
     totalHeapSize : <number>
+    counters : <object>
 }
 
 ResourceFinish Properties:
@@ -41,5 +43,6 @@
     type : "ResourceFinish"
     usedHeapSize : <number>
     totalHeapSize : <number>
+    counters : <object>
 }
 

Modified: trunk/LayoutTests/inspector/timeline/timeline-parse-html-expected.txt (109203 => 109204)


--- trunk/LayoutTests/inspector/timeline/timeline-parse-html-expected.txt	2012-02-29 08:07:16 UTC (rev 109203)
+++ trunk/LayoutTests/inspector/timeline/timeline-parse-html-expected.txt	2012-02-29 08:29:38 UTC (rev 109204)
@@ -14,6 +14,7 @@
     type : "ParseHTML"
     usedHeapSize : <number>
     totalHeapSize : <number>
+    counters : <object>
 }
 ParseHTML Properties:
 {
@@ -28,5 +29,6 @@
     type : "ParseHTML"
     usedHeapSize : <number>
     totalHeapSize : <number>
+    counters : <object>
 }
 

Modified: trunk/LayoutTests/inspector/timeline/timeline-recalculate-styles-expected.txt (109203 => 109204)


--- trunk/LayoutTests/inspector/timeline/timeline-recalculate-styles-expected.txt	2012-02-29 08:07:16 UTC (rev 109203)
+++ trunk/LayoutTests/inspector/timeline/timeline-recalculate-styles-expected.txt	2012-02-29 08:29:38 UTC (rev 109204)
@@ -11,5 +11,6 @@
     type : "RecalculateStyles"
     usedHeapSize : <number>
     totalHeapSize : <number>
+    counters : <object>
 }
 

Modified: trunk/LayoutTests/inspector/timeline/timeline-script-tag-1-expected.txt (109203 => 109204)


--- trunk/LayoutTests/inspector/timeline/timeline-script-tag-1-expected.txt	2012-02-29 08:07:16 UTC (rev 109203)
+++ trunk/LayoutTests/inspector/timeline/timeline-script-tag-1-expected.txt	2012-02-29 08:29:38 UTC (rev 109204)
@@ -18,6 +18,7 @@
     type : "EvaluateScript"
     usedHeapSize : <number>
     totalHeapSize : <number>
+    counters : <object>
 }
 ParseHTML
 

Modified: trunk/LayoutTests/inspector/timeline/timeline-script-tag-2-expected.txt (109203 => 109204)


--- trunk/LayoutTests/inspector/timeline/timeline-script-tag-2-expected.txt	2012-02-29 08:07:16 UTC (rev 109203)
+++ trunk/LayoutTests/inspector/timeline/timeline-script-tag-2-expected.txt	2012-02-29 08:29:38 UTC (rev 109204)
@@ -13,5 +13,6 @@
     type : "EvaluateScript"
     usedHeapSize : <number>
     totalHeapSize : <number>
+    counters : <object>
 }
 

Modified: trunk/LayoutTests/inspector/timeline/timeline-test.js (109203 => 109204)


--- trunk/LayoutTests/inspector/timeline/timeline-test.js	2012-02-29 08:07:16 UTC (rev 109203)
+++ trunk/LayoutTests/inspector/timeline/timeline-test.js	2012-02-29 08:29:38 UTC (rev 109204)
@@ -13,7 +13,8 @@
     usedHeapSize: "formatAsTypeName",
     totalHeapSize: "formatAsTypeName",
     mimeType: "formatAsTypeName",
-    id: "formatAsTypeName"
+    id: "formatAsTypeName",
+    counters: "formatAsTypeName"
 };
 
 InspectorTest.startTimeline = function(callback)

Modified: trunk/LayoutTests/inspector/timeline/timeline-time-stamp-expected.txt (109203 => 109204)


--- trunk/LayoutTests/inspector/timeline/timeline-time-stamp-expected.txt	2012-02-29 08:07:16 UTC (rev 109203)
+++ trunk/LayoutTests/inspector/timeline/timeline-time-stamp-expected.txt	2012-02-29 08:29:38 UTC (rev 109204)
@@ -9,5 +9,6 @@
     type : "TimeStamp"
     usedHeapSize : <number>
     totalHeapSize : <number>
+    counters : <object>
 }
 

Modified: trunk/LayoutTests/platform/chromium/inspector/timeline/timeline-animation-frame-expected.txt (109203 => 109204)


--- trunk/LayoutTests/platform/chromium/inspector/timeline/timeline-animation-frame-expected.txt	2012-02-29 08:07:16 UTC (rev 109203)
+++ trunk/LayoutTests/platform/chromium/inspector/timeline/timeline-animation-frame-expected.txt	2012-02-29 08:29:38 UTC (rev 109204)
@@ -10,6 +10,7 @@
     type : "RequestAnimationFrame"
     usedHeapSize : <number>
     totalHeapSize : <number>
+    counters : <object>
 }
 FireAnimationFrame Properties:
 {
@@ -22,6 +23,7 @@
     type : "FireAnimationFrame"
     usedHeapSize : <number>
     totalHeapSize : <number>
+    counters : <object>
 }
 CancelAnimationFrame Properties:
 {
@@ -33,5 +35,6 @@
     type : "CancelAnimationFrame"
     usedHeapSize : <number>
     totalHeapSize : <number>
+    counters : <object>
 }
 

Modified: trunk/LayoutTests/platform/chromium/inspector/timeline/timeline-event-dispatch-expected.txt (109203 => 109204)


--- trunk/LayoutTests/platform/chromium/inspector/timeline/timeline-event-dispatch-expected.txt	2012-02-29 08:07:16 UTC (rev 109203)
+++ trunk/LayoutTests/platform/chromium/inspector/timeline/timeline-event-dispatch-expected.txt	2012-02-29 08:29:38 UTC (rev 109204)
@@ -12,5 +12,6 @@
     type : "EventDispatch"
     usedHeapSize : <number>
     totalHeapSize : <number>
+    counters : <object>
 }
 

Modified: trunk/LayoutTests/platform/chromium/inspector/timeline/timeline-layout-expected.txt (109203 => 109204)


--- trunk/LayoutTests/platform/chromium/inspector/timeline/timeline-layout-expected.txt	2012-02-29 08:07:16 UTC (rev 109203)
+++ trunk/LayoutTests/platform/chromium/inspector/timeline/timeline-layout-expected.txt	2012-02-29 08:29:38 UTC (rev 109204)
@@ -12,5 +12,6 @@
     type : "Layout"
     usedHeapSize : <number>
     totalHeapSize : <number>
+    counters : <object>
 }
 

Modified: trunk/LayoutTests/platform/chromium/inspector/timeline/timeline-mark-timeline-expected.txt (109203 => 109204)


--- trunk/LayoutTests/platform/chromium/inspector/timeline/timeline-mark-timeline-expected.txt	2012-02-29 08:07:16 UTC (rev 109203)
+++ trunk/LayoutTests/platform/chromium/inspector/timeline/timeline-mark-timeline-expected.txt	2012-02-29 08:29:38 UTC (rev 109204)
@@ -10,5 +10,6 @@
     type : "TimeStamp"
     usedHeapSize : <number>
     totalHeapSize : <number>
+    counters : <object>
 }
 

Modified: trunk/LayoutTests/platform/chromium/inspector/timeline/timeline-network-resource-expected.txt (109203 => 109204)


--- trunk/LayoutTests/platform/chromium/inspector/timeline/timeline-network-resource-expected.txt	2012-02-29 08:07:16 UTC (rev 109203)
+++ trunk/LayoutTests/platform/chromium/inspector/timeline/timeline-network-resource-expected.txt	2012-02-29 08:29:38 UTC (rev 109204)
@@ -15,6 +15,7 @@
     type : "ResourceSendRequest"
     usedHeapSize : <number>
     totalHeapSize : <number>
+    counters : <object>
 }
 
 ResourceReceiveResponse Properties:
@@ -30,6 +31,7 @@
     type : "ResourceReceiveResponse"
     usedHeapSize : <number>
     totalHeapSize : <number>
+    counters : <object>
 }
 
 ResourceFinish Properties:
@@ -42,5 +44,6 @@
     type : "ResourceFinish"
     usedHeapSize : <number>
     totalHeapSize : <number>
+    counters : <object>
 }
 

Modified: trunk/LayoutTests/platform/chromium/inspector/timeline/timeline-paint-expected.txt (109203 => 109204)


--- trunk/LayoutTests/platform/chromium/inspector/timeline/timeline-paint-expected.txt	2012-02-29 08:07:16 UTC (rev 109203)
+++ trunk/LayoutTests/platform/chromium/inspector/timeline/timeline-paint-expected.txt	2012-02-29 08:29:38 UTC (rev 109204)
@@ -15,5 +15,6 @@
     type : "Paint"
     usedHeapSize : <number>
     totalHeapSize : <number>
+    counters : <object>
 }
 

Modified: trunk/LayoutTests/platform/chromium/inspector/timeline/timeline-parse-html-expected.txt (109203 => 109204)


--- trunk/LayoutTests/platform/chromium/inspector/timeline/timeline-parse-html-expected.txt	2012-02-29 08:07:16 UTC (rev 109203)
+++ trunk/LayoutTests/platform/chromium/inspector/timeline/timeline-parse-html-expected.txt	2012-02-29 08:29:38 UTC (rev 109204)
@@ -15,6 +15,7 @@
     type : "ParseHTML"
     usedHeapSize : <number>
     totalHeapSize : <number>
+    counters : <object>
 }
 ParseHTML Properties:
 {
@@ -30,5 +31,6 @@
     type : "ParseHTML"
     usedHeapSize : <number>
     totalHeapSize : <number>
+    counters : <object>
 }
 

Modified: trunk/LayoutTests/platform/chromium/inspector/timeline/timeline-time-stamp-expected.txt (109203 => 109204)


--- trunk/LayoutTests/platform/chromium/inspector/timeline/timeline-time-stamp-expected.txt	2012-02-29 08:07:16 UTC (rev 109203)
+++ trunk/LayoutTests/platform/chromium/inspector/timeline/timeline-time-stamp-expected.txt	2012-02-29 08:29:38 UTC (rev 109204)
@@ -10,5 +10,6 @@
     type : "TimeStamp"
     usedHeapSize : <number>
     totalHeapSize : <number>
+    counters : <object>
 }
 

Modified: trunk/Source/WebCore/ChangeLog (109203 => 109204)


--- trunk/Source/WebCore/ChangeLog	2012-02-29 08:07:16 UTC (rev 109203)
+++ trunk/Source/WebCore/ChangeLog	2012-02-29 08:29:38 UTC (rev 109204)
@@ -1,3 +1,26 @@
+2012-02-28  Yury Semikhatsky  <[email protected]>
+
+        Web Inspector: move DOM counter graphs out of experimental
+        https://bugs.webkit.org/show_bug.cgi?id=79802
+
+        Enable DOM counter graphs by default.
+
+        Reveal nearest record from the left hand side when there is no
+        record containing the point where the user clicked.
+
+        Reviewed by Pavel Feldman.
+
+        * inspector/front-end/Settings.js:
+        (WebInspector.ExperimentsSettings):
+        * inspector/front-end/TimelinePanel.js:
+        (WebInspector.TimelinePanel):
+        (WebInspector.TimelinePanel.prototype._endSplitterDragging):
+        (WebInspector.TimelinePanel.prototype._onTimelineEventRecorded):
+        (WebInspector.TimelinePanel.prototype.sidebarResized):
+        (WebInspector.TimelinePanel.prototype._resetPanel):
+        (WebInspector.TimelinePanel.prototype._refresh):
+        (WebInspector.TimelinePanel.prototype.revealRecordAt):
+
 2012-02-28  MORITA Hajime  <[email protected]>
 
         [Refactoring] Shadow related attach paths should be in ShadowTree.

Modified: trunk/Source/WebCore/inspector/front-end/Settings.js (109203 => 109204)


--- trunk/Source/WebCore/inspector/front-end/Settings.js	2012-02-29 08:07:16 UTC (rev 109203)
+++ trunk/Source/WebCore/inspector/front-end/Settings.js	2012-02-29 08:29:38 UTC (rev 109204)
@@ -175,7 +175,6 @@
     
     // Add currently running experiments here.
     this.sourceFrameAlwaysEditable = this._createExperiment("sourceFrameAlwaysEditable", "Make resources always editable");
-    this.showMemoryCounters = this._createExperiment("showMemoryCounters", "Show memory counters in Timeline panel");
     this.timelineStartAtZero = this._createExperiment("timelineStartAtZero", "Enable start at zero mode in Timeline panel");
     // FIXME: Enable http/tests/inspector/indexeddb/resources-panel.html when removed from experiments.
     this.showIndexedDB = this._createExperiment("showIndexedDB", "Show IndexedDB in Resources panel");

Modified: trunk/Source/WebCore/inspector/front-end/TimelinePanel.js (109203 => 109204)


--- trunk/Source/WebCore/inspector/front-end/TimelinePanel.js	2012-02-29 08:07:16 UTC (rev 109203)
+++ trunk/Source/WebCore/inspector/front-end/TimelinePanel.js	2012-02-29 08:29:38 UTC (rev 109204)
@@ -55,15 +55,13 @@
     this._containerElement.id = "timeline-container";
     this._containerElement.addEventListener("scroll", this._onScroll.bind(this), false);
 
-    if (WebInspector.experimentsSettings.showMemoryCounters.isEnabled()) {
-        this._timelineMemorySplitter = this.element.createChild("div");
-        this._timelineMemorySplitter.id = "timeline-memory-splitter";
-        this._timelineMemorySplitter.addEventListener("mousedown", this._startSplitterDragging.bind(this), false);
-        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);
-    }
+    this._timelineMemorySplitter = this.element.createChild("div");
+    this._timelineMemorySplitter.id = "timeline-memory-splitter";
+    this._timelineMemorySplitter.addEventListener("mousedown", this._startSplitterDragging.bind(this), false);
+    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);
     this.sidebarTree.appendChild(itemsTreeElement);
@@ -79,8 +77,7 @@
     this._itemsGraphsElement.id = "timeline-graphs";
     this._itemsGraphsElement.addEventListener("mousewheel", this._overviewPane.scrollWindow.bind(this._overviewPane), true);
     this._containerContentElement.appendChild(this._timelineGrid.element);
-    if (this._memoryStatistics)
-        this._memoryStatistics.setMainTimelineGrid(this._timelineGrid);
+    this._memoryStatistics.setMainTimelineGrid(this._timelineGrid);
 
     this._topGapElement = document.createElement("div");
     this._topGapElement.className = "timeline-gap";
@@ -161,8 +158,7 @@
     {
         delete this._dragOffset;
         WebInspector.elementDragEnd(event);
-        if (this._memoryStatistics)
-            this._memoryStatistics.show();
+        this._memoryStatistics.show();
         WebInspector.settings.memoryCounterGraphsHeight.set(this.splitView.element.offsetHeight);
     },
 
@@ -376,8 +372,6 @@
 
     _timelinesOverviewModeChanged: function(event)
     {
-        if (!this._memoryStatistics)
-            return;
         var shouldShowMemory = event.data ="" WebInspector.TimelineOverviewPane.Mode.Memory;
         if (shouldShowMemory === this._memoryStatistics.visible())
             return;
@@ -456,7 +450,7 @@
         this._innerAddRecordToTimeline(event.data, this._rootRecord());
         this._scheduleRefresh(false);
 
-        if (this._memoryStatistics && event.data["counters"])
+        if (event.data["counters"])
             this._memoryStatistics.addTimlineEvent(event);
     },
 
@@ -477,9 +471,7 @@
         this._overviewPane.sidebarResized(width);
         // Min width = <number of buttons on the left> * 31
         this.statusBarFilters.style.left = Math.max((this.statusBarItems.length + 2) * 31, width) + "px";
-
-        if (this._memoryStatistics)
-            this._memoryStatistics.setSidebarWidth(width);
+        this._memoryStatistics.setSidebarWidth(width);
     },
 
     onResize: function()
@@ -508,8 +500,7 @@
         this._adjustScrollPosition(0);
         this._closeRecordDetails();
         this._allRecordsCount = 0;
-        if (this._memoryStatistics)
-            this._memoryStatistics.reset();
+        this._memoryStatistics.reset();
     },
 
     elementsToRestoreScrollPositionsFor: function()
@@ -571,7 +562,7 @@
         this._updateRecordsCounter(recordsInWindowCount);
         if(!this._boundariesAreValid)
             this._updateEventDividers();
-        if (this._memoryStatistics && this._memoryStatistics.visible())
+        if (this._memoryStatistics.visible())
             this._memoryStatistics.refresh();
         this._boundariesAreValid = true;
     },
@@ -595,10 +586,14 @@
         var recordsInWindow = this._presentationModel.filteredRecords();
         var recordToReveal;
         for (var i = 0; i < recordsInWindow.length; ++i) {
-            if (recordsInWindow[i].containsTime(time)) {
-                recordToReveal = recordsInWindow[i];
+            var record = recordsInWindow[i];
+            if (record.containsTime(time)) {
+                recordToReveal = record;
                 break;
             }
+            // If there is no record containing the time than use the latest one before that time.
+            if (!recordToReveal || record.endTime < time && recordToReveal.endTime < record.endTime)
+                recordToReveal = record;
         }
 
         // The record ends before the window left bound so scroll to the top.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to