WebKit Bugzilla
Attachment 369026 Details for
Bug 197440
: Web Inspector: Timelines: CPU/memory timeline bars sometimes don't draw correctly and jump around on scrolling
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197440-20190503171404.patch (text/plain), 22.46 KB, created by
Devin Rousso
on 2019-05-03 17:14:05 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Devin Rousso
Created:
2019-05-03 17:14:05 PDT
Size:
22.46 KB
patch
obsolete
>diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index 97206c896b10ddf3ad958b68b3f8bce3e8085713..5eb1954164a135e3bd821a02486ee823dff85fb9 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,53 @@ >+2019-05-03 Devin Rousso <drousso@apple.com> >+ >+ Web Inspector: Timelines: CPU/memory timeline bars sometimes don't draw correctly and jump around on scrolling >+ https://bugs.webkit.org/show_bug.cgi?id=197440 >+ <rdar://problem/46886315> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * UserInterface/Models/Timeline.js: >+ (WI.Timeline.prototype.recordsInTimeRange): >+ (WI.Timeline.prototype.recordsOverlappingTimeRange): Deleted. >+ Merge `recordsOverlappingTimeRange` into `recordsInTimeRange` by accepting an options object >+ that determines whether to include the record before/after the first/last record that are >+ at all overlapping the range. >+ >+ * UserInterface/Models/CPUTimelineRecord.js: >+ (WI.CPUTimelineRecord): >+ (WI.CPUTimelineRecord.get samplingRatePerSecond): Added. >+ (WI.CPUTimelineRecord.prototype.adjustStartTimeToLastRecord): Added. >+ * UserInterface/Models/MemoryTimelineRecord.js: >+ (WI.MemoryTimelineRecord): >+ (WI.MemoryTimelineRecord.get samplingRatePerSecond): Added. >+ (WI.MemoryTimelineRecord.prototype.adjustStartTimeToLastRecord): Added. >+ Adjust the `startTime` of the record by the sampling rate (which is 500ms). >+ >+ * UserInterface/Models/CPUTimeline.js: Added. >+ (WI.CPUTimeline.prototype.addRecord): >+ * UserInterface/Models/MemoryTimeline.js: >+ (WI.MemoryTimeline.prototype.addRecord): Added. >+ Adjust the `startTime` of the new record to be equal to the `endTime` of the last record. >+ >+ * UserInterface/Views/TimelineOverview.js: >+ (WI.TimelineOverview.prototype._recordSelected): >+ * UserInterface/Views/CPUTimelineView.js: >+ (WI.CPUTimelineView.prototype.layout): >+ (WI.CPUTimelineView.prototype._computeStatisticsData): >+ * UserInterface/Views/CPUTimelineOverviewGraph.js: >+ (WI.CPUTimelineOverviewGraph.prototype.layout): >+ (WI.CPUTimelineOverviewGraph.prototype._handleChartClick): >+ (WI.CPUTimelineOverviewGraph.prototype.get samplingRatePerSecond): Deleted. >+ (WI.CPUTimelineOverviewGraph.prototype.layout.yScaleForRecord): Deleted. >+ >+ * UserInterface/Views/MemoryTimelineView.js: >+ (WI.MemoryTimelineView.prototype.layout): >+ * UserInterface/Views/MemoryTimelineOverviewGraph.js: >+ (WI.MemoryTimelineOverviewGraph.prototype.layout): >+ >+ * UserInterface/Main.html: >+ * UserInterface/Test.html: >+ > 2019-05-03 Devin Rousso <drousso@apple.com> > > Web Inspector: DOM: rename "low power" to "display composited" >diff --git a/Source/WebInspectorUI/UserInterface/Main.html b/Source/WebInspectorUI/UserInterface/Main.html >index 981655ebeaa2a36747f06ae2298e5f06d2126539..6b4d613704ff5ba6123df03cac09cf917ac413ee 100644 >--- a/Source/WebInspectorUI/UserInterface/Main.html >+++ b/Source/WebInspectorUI/UserInterface/Main.html >@@ -356,6 +356,7 @@ > <script src="Models/Branch.js"></script> > <script src="Models/Breakpoint.js"></script> > <script src="Models/CPUInstrument.js"></script> >+ <script src="Models/CPUTimeline.js"></script> > <script src="Models/CPUTimelineRecord.js"></script> > <script src="Models/CSSCompletions.js"></script> > <script src="Models/CSSKeywordCompletions.js"></script> >diff --git a/Source/WebInspectorUI/UserInterface/Models/CPUTimeline.js b/Source/WebInspectorUI/UserInterface/Models/CPUTimeline.js >new file mode 100644 >index 0000000000000000000000000000000000000000..b57b039fc2a0a9657f5e284b1c585b8da0c18796 >--- /dev/null >+++ b/Source/WebInspectorUI/UserInterface/Models/CPUTimeline.js >@@ -0,0 +1,38 @@ >+/* >+ * Copyright (C) 2019 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+WI.CPUTimeline = class CPUTimeline extends WI.Timeline >+{ >+ // Public >+ >+ addRecord(record) >+ { >+ let lastRecord = this.records.lastValue; >+ >+ super.addRecord(record); >+ >+ record.adjustStartTimeToLastRecord(lastRecord); >+ } >+}; >diff --git a/Source/WebInspectorUI/UserInterface/Models/CPUTimelineRecord.js b/Source/WebInspectorUI/UserInterface/Models/CPUTimelineRecord.js >index 2166891e16f828a378c3e98a66920fb9b852e22e..112b713c979e9a15dbac9509fc2673f235c7bc5a 100644 >--- a/Source/WebInspectorUI/UserInterface/Models/CPUTimelineRecord.js >+++ b/Source/WebInspectorUI/UserInterface/Models/CPUTimelineRecord.js >@@ -27,7 +27,7 @@ WI.CPUTimelineRecord = class CPUTimelineRecord extends WI.TimelineRecord > { > constructor({timestamp, usage, threads}) > { >- super(WI.TimelineRecord.Type.CPU, timestamp, timestamp); >+ super(WI.TimelineRecord.Type.CPU, timestamp - CPUTimelineRecord.samplingRatePerSecond, timestamp); > > console.assert(typeof timestamp === "number"); > console.assert(typeof usage === "number"); >@@ -68,6 +68,14 @@ WI.CPUTimelineRecord = class CPUTimelineRecord extends WI.TimelineRecord > } > } > >+ // Static >+ >+ static get samplingRatePerSecond() >+ { >+ // 500ms. This matches the ResourceUsageThread sampling frequency in the backend. >+ return 0.5; >+ } >+ > // Import / Export > > static fromJSON(json) >@@ -95,4 +103,11 @@ WI.CPUTimelineRecord = class CPUTimelineRecord extends WI.TimelineRecord > get workerThreadUsage() { return this._workerThreadUsage; } > get unknownThreadUsage() { return this._unknownThreadUsage; } > get workersData() { return this._workersData; } >+ >+ adjustStartTimeToLastRecord(lastRecord) >+ { >+ console.assert(lastRecord instanceof CPUTimelineRecord); >+ console.assert(this._startTime >= lastRecord.endTime); >+ this._startTime = lastRecord.endTime; >+ } > }; >diff --git a/Source/WebInspectorUI/UserInterface/Models/MemoryTimeline.js b/Source/WebInspectorUI/UserInterface/Models/MemoryTimeline.js >index a2f109b46c528d315a466ff453f9006b08e4735d..08070343cf8f32e14dd8e623949352cea36ff185 100644 >--- a/Source/WebInspectorUI/UserInterface/Models/MemoryTimeline.js >+++ b/Source/WebInspectorUI/UserInterface/Models/MemoryTimeline.js >@@ -46,6 +46,15 @@ WI.MemoryTimeline = class MemoryTimeline extends WI.Timeline > > this._pressureEvents = []; > } >+ >+ addRecord(record) >+ { >+ let lastRecord = this.records.lastValue; >+ >+ super.addRecord(record); >+ >+ record.adjustStartTimeToLastRecord(lastRecord); >+ } > }; > > WI.MemoryTimeline.Event = { >diff --git a/Source/WebInspectorUI/UserInterface/Models/MemoryTimelineRecord.js b/Source/WebInspectorUI/UserInterface/Models/MemoryTimelineRecord.js >index 1e37b9a48aed3624933b45184784f3dfa1e26a05..787bedc3da218c7f21229e9493bdfab155fa3d5b 100644 >--- a/Source/WebInspectorUI/UserInterface/Models/MemoryTimelineRecord.js >+++ b/Source/WebInspectorUI/UserInterface/Models/MemoryTimelineRecord.js >@@ -27,7 +27,7 @@ WI.MemoryTimelineRecord = class MemoryTimelineRecord extends WI.TimelineRecord > { > constructor(timestamp, categories) > { >- super(WI.TimelineRecord.Type.Memory, timestamp, timestamp); >+ super(WI.TimelineRecord.Type.Memory, timestamp - MemoryTimelineRecord.samplingRatePerSecond, timestamp); > > console.assert(typeof timestamp === "number"); > console.assert(categories instanceof Array); >@@ -43,6 +43,12 @@ WI.MemoryTimelineRecord = class MemoryTimelineRecord extends WI.TimelineRecord > > // Static > >+ static get samplingRatePerSecond() >+ { >+ // 500ms. This matches the ResourceUsageThread sampling frequency in the backend. >+ return 0.5; >+ } >+ > static memoryCategoriesFromProtocol(categories) > { > let javascriptSize = 0; >@@ -102,4 +108,11 @@ WI.MemoryTimelineRecord = class MemoryTimelineRecord extends WI.TimelineRecord > get timestamp() { return this._timestamp; } > get categories() { return this._categories; } > get totalSize() { return this._totalSize; } >+ >+ adjustStartTimeToLastRecord(lastRecord) >+ { >+ console.assert(lastRecord instanceof MemoryTimelineRecord); >+ console.assert(this._startTime >= lastRecord.endTime); >+ this._startTime = lastRecord.endTime; >+ } > }; >diff --git a/Source/WebInspectorUI/UserInterface/Models/Timeline.js b/Source/WebInspectorUI/UserInterface/Models/Timeline.js >index 0be7ec5a77edc70cef940108bdfa07b44caea349..70b5433ef4cef1046e1bc3f0124071b5bf9fa864 100644 >--- a/Source/WebInspectorUI/UserInterface/Models/Timeline.js >+++ b/Source/WebInspectorUI/UserInterface/Models/Timeline.js >@@ -41,6 +41,9 @@ WI.Timeline = class Timeline extends WI.Object > if (type === WI.TimelineRecord.Type.Network) > return new WI.NetworkTimeline(type); > >+ if (type === WI.TimelineRecord.Type.CPU) >+ return new WI.CPUTimeline(type); >+ > if (type === WI.TimelineRecord.Type.Memory) > return new WI.MemoryTimeline(type); > >@@ -111,20 +114,9 @@ WI.Timeline = class Timeline extends WI.Object > return (before < after) ? recordBefore : recordAfter; > } > >- recordsOverlappingTimeRange(startTime, endTime) >+ recordsInTimeRange(startTime, endTime, {includeRecordBeforeStart, includeRecordAfterEnd} = {}) > { > let lowerIndex = this._records.lowerBound(startTime, (time, record) => time - record.endTime); >- let upperIndex = this._records.upperBound(endTime, (time, record) => time - record.startTime); >- >- return this._records.slice(lowerIndex, upperIndex); >- } >- >- recordsInTimeRange(startTime, endTime, includeRecordBeforeStart) >- { >- let lowerIndex = this._records.lowerBound(startTime, (time, record) => time - record.startTime); >- let upperIndex = this._records.upperBound(endTime, (time, record) => time - record.startTime); >- >- // Include the record right before the start time. > if (includeRecordBeforeStart && lowerIndex > 0) { > lowerIndex--; > >@@ -137,6 +129,10 @@ WI.Timeline = class Timeline extends WI.Object > } > } > >+ let upperIndex = this._records.upperBound(endTime, (time, record) => time - record.startTime); >+ if (includeRecordAfterEnd && upperIndex < this._records.length - 1) >+ ++upperIndex; >+ > return this._records.slice(lowerIndex, upperIndex); > } > >diff --git a/Source/WebInspectorUI/UserInterface/Test.html b/Source/WebInspectorUI/UserInterface/Test.html >index 06f0be2f76d5cb400e9d1cdf08b77dcdaf0c34b8..e710ec6573d8e7477437ab779baf2be8150ace1f 100644 >--- a/Source/WebInspectorUI/UserInterface/Test.html >+++ b/Source/WebInspectorUI/UserInterface/Test.html >@@ -118,6 +118,7 @@ > > <script src="Models/Breakpoint.js"></script> > <script src="Models/CPUInstrument.js"></script> >+ <script src="Models/CPUTimeline.js"></script> > <script src="Models/CPUTimelineRecord.js"></script> > <script src="Models/CSSCompletions.js"></script> > <script src="Models/CSSKeywordCompletions.js"></script> >diff --git a/Source/WebInspectorUI/UserInterface/Views/CPUTimelineOverviewGraph.js b/Source/WebInspectorUI/UserInterface/Views/CPUTimelineOverviewGraph.js >index 087a4a6bf3f600a582809bdf05b0d18b61131c26..024314cf703b28f17fed42c053f57eb1e5d78e83 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/CPUTimelineOverviewGraph.js >+++ b/Source/WebInspectorUI/UserInterface/Views/CPUTimelineOverviewGraph.js >@@ -56,14 +56,6 @@ WI.CPUTimelineOverviewGraph = class CPUTimelineOverviewGraph extends WI.Timeline > this._processRecord(record); > } > >- // Static >- >- static get samplingRatePerSecond() >- { >- // 500ms. This matches the ResourceUsageThread sampling frequency in the backend. >- return 0.5; >- } >- > // Protected > > get height() >@@ -115,22 +107,18 @@ WI.CPUTimelineOverviewGraph = class CPUTimelineOverviewGraph extends WI.Timeline > return (size / maxCapacity) * height; > } > >- const includeRecordBeforeStart = true; >- let visibleRecords = this._cpuTimeline.recordsInTimeRange(graphStartTime, visibleEndTime, includeRecordBeforeStart); >+ let visibleRecords = this._cpuTimeline.recordsInTimeRange(graphStartTime, visibleEndTime, { >+ includeRecordBeforeStart: true, >+ }); > if (!visibleRecords.length) > return; > >- function yScaleForRecord(record) { >- return yScale(record.usage); >- } >- >- let intervalWidth = CPUTimelineOverviewGraph.samplingRatePerSecond / secondsPerPixel; > const minimumDisplayHeight = 4; > > for (let record of visibleRecords) { > let additionalClass = record === this.selectedRecord ? "selected" : undefined; >- let w = intervalWidth; >- let x = xScale(record.startTime - CPUTimelineOverviewGraph.samplingRatePerSecond); >+ let w = (record.endTime - record.startTime) / secondsPerPixel; >+ let x = xScale(record.startTime); > let h1 = Math.max(minimumDisplayHeight, yScale(record.mainThreadUsage)); > let h2 = Math.max(minimumDisplayHeight, yScale(record.mainThreadUsage + record.workerThreadUsage)); > let h3 = Math.max(minimumDisplayHeight, yScale(record.usage)); >@@ -199,7 +187,7 @@ WI.CPUTimelineOverviewGraph = class CPUTimelineOverviewGraph extends WI.Timeline > let graphStartTime = this.startTime; > > let clickTime = graphStartTime + graphClickTime; >- let record = this._cpuTimeline.closestRecordTo(clickTime + (CPUTimelineOverviewGraph.samplingRatePerSecond / 2)); >+ let record = this._cpuTimeline.closestRecordTo(clickTime); > if (!record) > return; > >diff --git a/Source/WebInspectorUI/UserInterface/Views/CPUTimelineView.js b/Source/WebInspectorUI/UserInterface/Views/CPUTimelineView.js >index 1513d4eaca5465a11e439d34258c973cf81f8637..a57f317f8ac79f7f7cbbe3beb2269812edb9bb47 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/CPUTimelineView.js >+++ b/Source/WebInspectorUI/UserInterface/Views/CPUTimelineView.js >@@ -445,14 +445,15 @@ WI.CPUTimelineView = class CPUTimelineView extends WI.TimelineView > let discontinuities = this._recording.discontinuitiesInTimeRange(graphStartTime, visibleEndTime); > let originalDiscontinuities = discontinuities.slice(); > >- // Don't include the record before the graph start if the graph start is within a gap. >- let includeRecordBeforeStart = !discontinuities.length || discontinuities[0].startTime > graphStartTime; >- let visibleRecords = this.representedObject.recordsInTimeRange(graphStartTime, visibleEndTime, includeRecordBeforeStart); >+ let visibleRecords = this.representedObject.recordsInTimeRange(graphStartTime, visibleEndTime, { >+ includeRecordBeforeStart: !discontinuities.length || discontinuities[0].startTime > graphStartTime, >+ }); > if (!visibleRecords.length || (visibleRecords.length === 1 && visibleRecords[0].endTime < graphStartTime)) { > this.clear(); > return; > } > >+ > this._secondsPerPixelInLayout = secondsPerPixel; > this._visibleRecordsInLayout = visibleRecords; > this._discontinuitiesInLayout = discontinuities.slice(); >@@ -1161,8 +1162,6 @@ WI.CPUTimelineView = class CPUTimelineView extends WI.TimelineView > // with the data available to the frontend and is quite accurate for most > // Main Thread activity. > >- const includeRecordBeforeStart = true; >- > function incrementTypeCount(map, key) { > let entry = map.get(key); > if (entry) >@@ -1183,7 +1182,7 @@ WI.CPUTimelineView = class CPUTimelineView extends WI.TimelineView > let possibleRepeatingTimers = new Set; > > let scriptTimeline = this._recording.timelineForRecordType(WI.TimelineRecord.Type.Script); >- let scriptRecords = scriptTimeline ? scriptTimeline.recordsInTimeRange(startTime, endTime, includeRecordBeforeStart) : []; >+ let scriptRecords = scriptTimeline ? scriptTimeline.recordsInTimeRange(startTime, endTime, {includeRecordBeforeStart: true}) : []; > scriptRecords = scriptRecords.filter((record) => { > // Return true for event types that define script entries/exits. > // Return false for events with no time ranges or if they are contained in other events. >@@ -1249,7 +1248,7 @@ WI.CPUTimelineView = class CPUTimelineView extends WI.TimelineView > }); > > let layoutTimeline = this._recording.timelineForRecordType(WI.TimelineRecord.Type.Layout); >- let layoutRecords = layoutTimeline ? layoutTimeline.recordsInTimeRange(startTime, endTime, includeRecordBeforeStart) : []; >+ let layoutRecords = layoutTimeline ? layoutTimeline.recordsInTimeRange(startTime, endTime, {includeRecordBeforeStart: true}) : []; > layoutRecords = layoutRecords.filter((record) => { > switch (record.eventType) { > case WI.LayoutTimelineRecord.EventType.RecalculateStyles: >diff --git a/Source/WebInspectorUI/UserInterface/Views/MemoryTimelineOverviewGraph.js b/Source/WebInspectorUI/UserInterface/Views/MemoryTimelineOverviewGraph.js >index 496092fff701f06d60e3937ca9067663502c117b..f2722874c5d9534d0b3b001817391417886142d4 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/MemoryTimelineOverviewGraph.js >+++ b/Source/WebInspectorUI/UserInterface/Views/MemoryTimelineOverviewGraph.js >@@ -138,11 +138,10 @@ WI.MemoryTimelineOverviewGraph = class MemoryTimelineOverviewGraph extends WI.Ti > > let discontinuities = this.timelineOverview.discontinuitiesInTimeRange(graphStartTime, visibleEndTime); > >- // Don't include the record before the graph start if the graph start is within a gap. >- let includeRecordBeforeStart = !discontinuities.length || discontinuities[0].startTime > graphStartTime; >- >- // FIXME: <https://webkit.org/b/153759> Web Inspector: Memory Timelines should better extend to future data >- let visibleRecords = this._memoryTimeline.recordsInTimeRange(graphStartTime, visibleEndTime, includeRecordBeforeStart); >+ let visibleRecords = this._memoryTimeline.recordsInTimeRange(graphStartTime, visibleEndTime, { >+ includeRecordBeforeStart: !discontinuities.length || discontinuities[0].startTime > graphStartTime, >+ includeRecordAfterEnd: true, >+ }); > if (!visibleRecords.length) > return; > >diff --git a/Source/WebInspectorUI/UserInterface/Views/MemoryTimelineView.js b/Source/WebInspectorUI/UserInterface/Views/MemoryTimelineView.js >index 5172770f54666ecdd1922861ca1d2856ffcd71b5..209bbdc6bb1b890f738a1e7c4409a029785cdb3e 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/MemoryTimelineView.js >+++ b/Source/WebInspectorUI/UserInterface/Views/MemoryTimelineView.js >@@ -197,11 +197,10 @@ WI.MemoryTimelineView = class MemoryTimelineView extends WI.TimelineView > > let discontinuities = this._recording.discontinuitiesInTimeRange(graphStartTime, visibleEndTime); > >- // Don't include the record before the graph start if the graph start is within a gap. >- let includeRecordBeforeStart = !discontinuities.length || discontinuities[0].startTime > graphStartTime; >- >- // FIXME: <https://webkit.org/b/153759> Web Inspector: Memory Timelines should better extend to future data >- let visibleRecords = this.representedObject.recordsInTimeRange(graphStartTime, visibleEndTime, includeRecordBeforeStart); >+ let visibleRecords = this.representedObject.recordsOverlappingTimeRange(graphStartTime, visibleEndTime, { >+ includeRecordBeforeStart: !discontinuities.length || discontinuities[0].startTime > graphStartTime, >+ includeRecordAfterEnd: true, >+ }); > if (!visibleRecords.length || (visibleRecords.length === 1 && visibleRecords[0].endTime < graphStartTime)) { > this.clear(); > return; >diff --git a/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js b/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js >index 3cec4fb77e7fe2697a0e0a5c60e4e37d886783b7..7c04f89c0a127bcc4d8ba7628a09a83b051c784e 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js >+++ b/Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js >@@ -784,12 +784,7 @@ WI.TimelineOverview = class TimelineOverview extends WI.View > > let startTime = firstRecord instanceof WI.RenderingFrameTimelineRecord ? firstRecord.frameIndex : firstRecord.startTime; > let endTime = lastRecord instanceof WI.RenderingFrameTimelineRecord ? lastRecord.frameIndex : lastRecord.endTime; >- >- if (firstRecord instanceof WI.CPUTimelineRecord) { >- let selectionPadding = WI.CPUTimelineOverviewGraph.samplingRatePerSecond * 2.25; >- this.selectionStartTime = startTime - selectionPadding - (WI.CPUTimelineOverviewGraph.samplingRatePerSecond / 2); >- this.selectionDuration = endTime - startTime + (selectionPadding * 2); >- } else if (startTime < this.selectionStartTime || endTime > this.selectionStartTime + this.selectionDuration) { >+ if (startTime < this.selectionStartTime || endTime > this.selectionStartTime + this.selectionDuration || firstRecord instanceof WI.CPUTimelineRecord) { > let selectionPadding = this.secondsPerPixel * 10; > this.selectionStartTime = startTime - selectionPadding; > this.selectionDuration = endTime - startTime + (selectionPadding * 2);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197440
:
368617
|
369026
|
369033
|
369053
|
370184
|
370186