Title: [197039] trunk/Source/WebInspectorUI
- Revision
- 197039
- Author
- mattba...@apple.com
- Date
- 2016-02-24 12:19:47 -0800 (Wed, 24 Feb 2016)
Log Message
Web Inspector: TimelineViews should use the recording's end time when entire ruler range is selected
https://bugs.webkit.org/show_bug.cgi?id=154644
<rdar://problem/24818442>
Reviewed by Timothy Hatcher.
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView):
(WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
(WebInspector.TimelineRecordingContentView.prototype._timeRangeSelectionChanged):
Update current timeline view when entire range selected.
(WebInspector.TimelineRecordingContentView.prototype._updateTimes):
Live-update the OverviewTimelineView during recording when entire range selected.
(WebInspector.TimelineRecordingContentView.prototype._updateTimelineViewSelection):
Update timeline view start and end times. When entire range selected, use the recording
end time or current time (while capturing).
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (197038 => 197039)
--- trunk/Source/WebInspectorUI/ChangeLog 2016-02-24 18:51:58 UTC (rev 197038)
+++ trunk/Source/WebInspectorUI/ChangeLog 2016-02-24 20:19:47 UTC (rev 197039)
@@ -1,3 +1,24 @@
+2016-02-24 Matt Baker <mattba...@apple.com>
+
+ Web Inspector: TimelineViews should use the recording's end time when entire ruler range is selected
+ https://bugs.webkit.org/show_bug.cgi?id=154644
+ <rdar://problem/24818442>
+
+ Reviewed by Timothy Hatcher.
+
+ * UserInterface/Views/TimelineRecordingContentView.js:
+ (WebInspector.TimelineRecordingContentView):
+ (WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
+ (WebInspector.TimelineRecordingContentView.prototype._timeRangeSelectionChanged):
+ Update current timeline view when entire range selected.
+
+ (WebInspector.TimelineRecordingContentView.prototype._updateTimes):
+ Live-update the OverviewTimelineView during recording when entire range selected.
+
+ (WebInspector.TimelineRecordingContentView.prototype._updateTimelineViewSelection):
+ Update timeline view start and end times. When entire range selected, use the recording
+ end time or current time (while capturing).
+
2016-02-24 Timothy Hatcher <timo...@apple.com>
Follow up fix for the TimelineRuler "select all" mode to fix zeroTime.
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js (197038 => 197039)
--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js 2016-02-24 18:51:58 UTC (rev 197038)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js 2016-02-24 20:19:47 UTC (rev 197039)
@@ -336,8 +336,7 @@
this._timelineSidebarPanel.contentTreeOutlineLabel = timelineView.navigationSidebarTreeOutlineLabel;
this._timelineSidebarPanel.contentTreeOutlineScopeBar = timelineView.navigationSidebarTreeOutlineScopeBar;
- timelineView.startTime = this._timelineOverview.selectionStartTime;
- timelineView.endTime = this._timelineOverview.selectionStartTime + this._timelineOverview.selectionDuration;
+ this._updateTimelineViewSelection(timelineView);
timelineView.currentTime = this._currentTime;
}
@@ -419,6 +418,9 @@
if (this.currentTimelineView)
this.currentTimelineView.currentTime = currentTime;
+ if (this._timelineOverview.timelineRuler.entireRangeSelected)
+ this._updateTimelineViewSelection(this._overviewTimelineView);
+
this._timelineSidebarPanel.updateFilter();
// Force a layout now since we are already in an animation frame and don't need to delay it until the next.
@@ -622,8 +624,7 @@
_timeRangeSelectionChanged(event)
{
if (this.currentTimelineView) {
- this.currentTimelineView.startTime = this._timelineOverview.selectionStartTime;
- this.currentTimelineView.endTime = this._timelineOverview.selectionStartTime + this._timelineOverview.selectionDuration;
+ this._updateTimelineViewSelection(this.currentTimelineView);
if (this.currentTimelineView.representedObject.type === WebInspector.TimelineRecord.Type.RenderingFrame)
this._updateFrameSelection();
@@ -677,6 +678,25 @@
let endIndex = startIndex + this._timelineOverview.selectionDuration - 1;
this._timelineSidebarPanel.updateFrameSelection(startIndex, endIndex);
}
+
+ _updateTimelineViewSelection(timelineView)
+ {
+ let timelineRuler = this._timelineOverview.timelineRuler;
+ let entireRangeSelected = timelineRuler.entireRangeSelected;
+ let endTime = this._timelineOverview.selectionStartTime + this._timelineOverview.selectionDuration;
+
+ if (entireRangeSelected) {
+ // Clamp selection to the end of the recording (with padding), so that OverviewTimelineView
+ // displays an autosized graph without a lot of horizontal white space or tiny graph bars.
+ if (isNaN(this._recording.endTime))
+ endTime = this._currentTime;
+ else
+ endTime = Math.min(endTime, this._recording.endTime + timelineRuler.minimumSelectionDuration);
+ }
+
+ timelineView.startTime = this._timelineOverview.selectionStartTime;
+ timelineView.endTime = endTime;
+ }
};
WebInspector.TimelineRecordingContentView.SelectedTimelineTypeCookieKey = "timeline-recording-content-view-selected-timeline-type";
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes