Web Inspector: empty timeline should not use previous timeline's zoom interval
authormattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 16 May 2015 03:47:09 +0000 (03:47 +0000)
committermattbaker@apple.com <mattbaker@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 16 May 2015 03:47:09 +0000 (03:47 +0000)
commit26980b138d312a3ac49f226916669868914d5141
treeb3f2dcf7bf44a7198fbbf87513ca8d41f03c1804
parent4d209a527e6aca1c450f931a40436ca6f0c4a3ba
Web Inspector: empty timeline should not use previous timeline's zoom interval
https://bugs.webkit.org/show_bug.cgi?id=132754

Reviewed by Joseph Pecoraro.

When a timeline recording is started in response to a provisional load, TimelineManager should check whether
the main resource url is changing before loading a new timeline recording. If the main resource is changing,
set the selection start, selection duration, and duration-per-pixel settings of the TimelineOverview to their
default values.

* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager):
(WebInspector.TimelineManager.prototype.isCapturingPageReload):
(WebInspector.TimelineManager.prototype.capturingStopped):
(WebInspector.TimelineManager.prototype.pageDidLoad):
(WebInspector.TimelineManager.prototype._startAutoCapturing):
Added a property for checking whether auto capture was triggered by a page reload.

* UserInterface/Views/LinearTimelineOverview.js:
(WebInspector.LinearTimelineOverview):
Increase default selection time to 15 seconds.

* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview):
Reset selection and zoom if TimelineManager isn't capturing in response to a page reload.

(WebInspector.TimelineOverview.prototype.reset):
Reset selection and zoom.

(WebInspector.TimelineOverview.prototype._timeRangeSelectionChanged):
(WebInspector.TimelineOverview.prototype._resetSelection):
Added a helper function for resetting selection and zoom to their default values.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@184429 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js
Source/WebInspectorUI/UserInterface/Views/LinearTimelineOverview.js
Source/WebInspectorUI/UserInterface/Views/TimelineOverview.js