WebKit Bugzilla
Attachment 360791 Details for
Bug 194115
: Web Inspector: Timeline Detail Views do not reset properly when new time range selection contains nothing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
[PATCH] Proposed Fix
clear-1.patch (text/plain), 3.66 KB, created by
Joseph Pecoraro
on 2019-01-31 14:59:07 PST
(
hide
)
Description:
[PATCH] Proposed Fix
Filename:
MIME Type:
Creator:
Joseph Pecoraro
Created:
2019-01-31 14:59:07 PST
Size:
3.66 KB
patch
obsolete
>diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index a738c312c28..5c810bcbe38 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,21 @@ >+2019-01-31 Joseph Pecoraro <pecoraro@apple.com> >+ >+ Web Inspector: Timeline Detail Views do not reset properly when new time range selection contains nothing >+ https://bugs.webkit.org/show_bug.cgi?id=194115 >+ <rdar://problem/47716693> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * UserInterface/Views/CPUTimelineView.js: >+ (WI.CPUTimelineView.prototype.reset): >+ (WI.CPUTimelineView.prototype.clear): >+ (WI.CPUTimelineView.prototype.layout): >+ * UserInterface/Views/MemoryTimelineView.js: >+ (WI.MemoryTimelineView.prototype.reset): >+ (WI.MemoryTimelineView.prototype.clear): >+ (WI.MemoryTimelineView.prototype.layout): >+ When there are no visible records in the selected range clear our UI. >+ > 2019-01-31 Joseph Pecoraro <pecoraro@apple.com> > > Web Inspector: Timeline graphs have drawing issues with multiple discontinuities >diff --git a/Source/WebInspectorUI/UserInterface/Views/CPUTimelineView.js b/Source/WebInspectorUI/UserInterface/Views/CPUTimelineView.js >index 741caf406ba..d7a53ce2938 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/CPUTimelineView.js >+++ b/Source/WebInspectorUI/UserInterface/Views/CPUTimelineView.js >@@ -80,6 +80,11 @@ WI.CPUTimelineView = class CPUTimelineView extends WI.TimelineView > > this._maxUsage = -Infinity; > >+ this.clear(); >+ } >+ >+ clear() >+ { > this._cpuUsageView.clear(); > } > >@@ -114,8 +119,10 @@ WI.CPUTimelineView = class CPUTimelineView extends WI.TimelineView > // 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); >- if (!visibleRecords.length) >+ if (!visibleRecords.length || (visibleRecords.length === 1 && visibleRecords[0].endTime < graphStartTime)) { >+ this.clear(); > return; >+ } > > // Update total usage chart with the last record's data. > let lastRecord = visibleRecords.lastValue; >diff --git a/Source/WebInspectorUI/UserInterface/Views/MemoryTimelineView.js b/Source/WebInspectorUI/UserInterface/Views/MemoryTimelineView.js >index c692e0beb2c..7303d8e5025 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/MemoryTimelineView.js >+++ b/Source/WebInspectorUI/UserInterface/Views/MemoryTimelineView.js >@@ -131,6 +131,11 @@ WI.MemoryTimelineView = class MemoryTimelineView extends WI.TimelineView > > this._maxSize = 0; > >+ this.clear(); >+ } >+ >+ clear() >+ { > this._cachedLegendRecord = null; > this._cachedLegendMaxSize = undefined; > this._cachedLegendCurrentSize = undefined; >@@ -183,8 +188,10 @@ WI.MemoryTimelineView = class MemoryTimelineView extends WI.TimelineView > > // FIXME: <https://webkit.org/b/153759> Web Inspector: Memory Timelines should better extend to future data > let visibleRecords = this.representedObject.recordsInTimeRange(graphStartTime, visibleEndTime, includeRecordBeforeStart); >- if (!visibleRecords.length) >+ if (!visibleRecords.length || (visibleRecords.length === 1 && visibleRecords[0].endTime < graphStartTime)) { >+ this.clear(); > return; >+ } > > // Update total usage chart with the last record's data. > let lastRecord = visibleRecords.lastValue;
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
Flags:
hi
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194115
: 360791