Web Inspector: discontinuous recordings should have discontinuities in the timeline...
authormattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 4 Jun 2016 21:09:55 +0000 (21:09 +0000)
committermattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 4 Jun 2016 21:09:55 +0000 (21:09 +0000)
commitd442969017edc9fc9c638529f4c2733ca93ae97c
tree44b5d2711d902b9c3fd8d0b5171558068952f8eb
parenta7d4a81bcc6565705cf1cfbda8fc7afdec850355
Web Inspector: discontinuous recordings should have discontinuities in the timeline memory graph
https://bugs.webkit.org/show_bug.cgi?id=158052
<rdar://problem/26516695>

Reviewed by Joseph Pecoraro.

Add gaps to the overview and category line charts where discontinuities
exist in the timeline recording.

* UserInterface/Models/Timeline.js:
(WebInspector.Timeline.prototype.recordsInTimeRange):
Replaces `_visibleRecords` methods found in various views.

* UserInterface/Models/TimelineRecording.js:
(WebInspector.TimelineRecording.prototype.reset):
(WebInspector.TimelineRecording.prototype.addDiscontinuity):
(WebInspector.TimelineRecording.prototype.discontinuitiesInTimeRange):
Allow discontinuities to be added to the recording, and have a means to
look up gaps within a time range.

* UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
(WebInspector.HeapAllocationsTimelineOverviewGraph.prototype._visibleRecords): Deleted.
Replaced by Timeline helper method.

* UserInterface/Views/MemoryTimelineOverviewGraph.js:
(WebInspector.MemoryTimelineOverviewGraph.prototype.layout.insertDiscontinuity):
(WebInspector.MemoryTimelineOverviewGraph.prototype.layout):
Insert zero-points into the chart at discontinuity boundaries to create
gaps. Data points for records immediately before or after a gap are extended
to the edge of the discontinuity.

(WebInspector.MemoryTimelineOverviewGraph.prototype._visibleRecords): Deleted.
Replaced by Timeline helper method.

* UserInterface/Views/MemoryTimelineView.js:
(WebInspector.MemoryTimelineView.prototype.layout):
Insert zero-points into each category chart at discontinuity boundaries
to create gaps.

Insert zero-points into the chart to create gaps.
(WebInspector.MemoryTimelineView.prototype._visibleRecords): Deleted.
Replaced by Timeline helper method.

* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview.prototype.discontinuitiesInTimeRange):
Forward to the TimelineRecording, which isn't exposed to clients.

* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView):
(WebInspector.TimelineRecordingContentView.prototype._capturingStarted):
(WebInspector.TimelineRecordingContentView.prototype._capturingStopped):
(WebInspector.TimelineRecordingContentView.prototype._recordingReset):
Track discontinuities (recording stop followed by a start) and add them
to the current recording.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201686 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Models/Timeline.js
Source/WebInspectorUI/UserInterface/Models/TimelineRecording.js
Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js
Source/WebInspectorUI/UserInterface/Views/MemoryTimelineOverviewGraph.js
Source/WebInspectorUI/UserInterface/Views/MemoryTimelineView.js
Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js
Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js