Title: [205349] trunk/Source/WebInspectorUI
Revision
205349
Author
[email protected]
Date
2016-09-02 10:46:14 -0700 (Fri, 02 Sep 2016)

Log Message

Web Inspector: NetworkTimelineOverviewGraph.MinimumBarPaddingTime is undefined
https://bugs.webkit.org/show_bug.cgi?id=161510

Patch by Johan K. Jensen <[email protected]> on 2016-09-02
Reviewed by Brian Burg.

* UserInterface/Views/NetworkTimelineOverviewGraph.js:
(WebInspector.NetworkTimelineOverviewGraph.prototype._networkTimelineRecordAdded):
(WebInspector.NetworkTimelineOverviewGraph):
Calculate the minimumBarPaddingTime in similar ways to TimelineRecordBar,
by using MinimumWidthPixel, MinimumMarginPixel and MinimumDurationPerPixel as the secondsPerPixel value.

* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview):
Make Minimum/MaximumDurationPerPixel public properties.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (205348 => 205349)


--- trunk/Source/WebInspectorUI/ChangeLog	2016-09-02 17:36:29 UTC (rev 205348)
+++ trunk/Source/WebInspectorUI/ChangeLog	2016-09-02 17:46:14 UTC (rev 205349)
@@ -1,3 +1,20 @@
+2016-09-02  Johan K. Jensen  <[email protected]>
+
+        Web Inspector: NetworkTimelineOverviewGraph.MinimumBarPaddingTime is undefined
+        https://bugs.webkit.org/show_bug.cgi?id=161510
+
+        Reviewed by Brian Burg.
+
+        * UserInterface/Views/NetworkTimelineOverviewGraph.js:
+        (WebInspector.NetworkTimelineOverviewGraph.prototype._networkTimelineRecordAdded):
+        (WebInspector.NetworkTimelineOverviewGraph):
+        Calculate the minimumBarPaddingTime in similar ways to TimelineRecordBar,
+        by using MinimumWidthPixel, MinimumMarginPixel and MinimumDurationPerPixel as the secondsPerPixel value.
+
+        * UserInterface/Views/TimelineOverview.js:
+        (WebInspector.TimelineOverview):
+        Make Minimum/MaximumDurationPerPixel public properties.
+
 2016-09-01  Devin Rousso  <[email protected]>
 
         Web Inspector: Add visual indicator for shadow content in DOM tree

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTimelineOverviewGraph.js (205348 => 205349)


--- trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTimelineOverviewGraph.js	2016-09-02 17:36:29 UTC (rev 205348)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTimelineOverviewGraph.js	2016-09-02 17:46:14 UTC (rev 205349)
@@ -114,6 +114,8 @@
             return a.startTime - b.startTime;
         }
 
+        let minimumBarPaddingTime = WebInspector.TimelineOverview.MinimumDurationPerPixel * (WebInspector.TimelineRecordBar.MinimumWidthPixels + WebInspector.TimelineRecordBar.MinimumMarginPixels)
+
         // Try to find a row that has room and does not overlap a previous record.
         var foundRowForRecord = false;
         for (var i = 0; i < this._timelineRecordGridRows.length; ++i) {
@@ -120,7 +122,7 @@
             var rowRecords = this._timelineRecordGridRows[i];
             var lastRecord = rowRecords.lastValue;
 
-            if (!lastRecord || lastRecord.endTime + WebInspector.NetworkTimelineOverviewGraph.MinimumBarPaddingTime <= resourceTimelineRecord.startTime) {
+            if (!lastRecord || lastRecord.endTime + minimumBarPaddingTime <= resourceTimelineRecord.startTime) {
                 insertObjectIntoSortedArray(resourceTimelineRecord, rowRecords, compareByStartTime);
                 this._nextDumpRow = i + 1;
                 foundRowForRecord = true;
@@ -135,7 +137,7 @@
                 var lastRecord = rowRecords.lastValue;
                 console.assert(lastRecord);
 
-                if (lastRecord.activeStartTime + WebInspector.NetworkTimelineOverviewGraph.MinimumBarPaddingTime <= resourceTimelineRecord.startTime) {
+                if (lastRecord.activeStartTime + minimumBarPaddingTime <= resourceTimelineRecord.startTime) {
                     insertObjectIntoSortedArray(resourceTimelineRecord, rowRecords, compareByStartTime);
                     this._nextDumpRow = i + 1;
                     foundRowForRecord = true;

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js (205348 => 205349)


--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js	2016-09-02 17:36:29 UTC (rev 205348)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js	2016-09-02 17:46:14 UTC (rev 205349)
@@ -31,7 +31,7 @@
 
         console.assert(timelineRecording instanceof WebInspector.TimelineRecording);
 
-        this._timelinesViewModeSettings = this._createViewModeSettings(WebInspector.TimelineOverview.ViewMode.Timelines, 0.0001, 60, 0.01, 0, 15);
+        this._timelinesViewModeSettings = this._createViewModeSettings(WebInspector.TimelineOverview.ViewMode.Timelines, WebInspector.TimelineOverview.MinimumDurationPerPixel, WebInspector.TimelineOverview.MaximumDurationPerPixel, 0.01, 0, 15);
         this._instrumentTypes = WebInspector.TimelineManager.availableTimelineTypes();
 
         if (WebInspector.FPSInstrument.supported()) {
@@ -995,6 +995,8 @@
 
 WebInspector.TimelineOverview.ScrollDeltaDenominator = 500;
 WebInspector.TimelineOverview.EditInstrumentsStyleClassName = "edit-instruments";
+WebInspector.TimelineOverview.MinimumDurationPerPixel = 0.0001;
+WebInspector.TimelineOverview.MaximumDurationPerPixel = 60;
 
 WebInspector.TimelineOverview.ViewMode = {
     Timelines: "timeline-overview-view-mode-timelines",
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to