Web Inspector: Timeline current time marker does not start moving when starting recor...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Oct 2015 21:38:46 +0000 (21:38 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Oct 2015 21:38:46 +0000 (21:38 +0000)
commit4ea7feefe477befee94ee08583530121e9219092
treef28844cc9ac4c5ec05b371a924dca6d70d6bb11e
parentdcfecc97075bd3765d55dcacf41209ecdf87cd9c
Web Inspector: Timeline current time marker does not start moving when starting recording after just opening inspector
https://bugs.webkit.org/show_bug.cgi?id=150178

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2015-10-27
Reviewed by Brian Burg.

* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype.capturingStarted):
* UserInterface/Models/TimelineRecording.js:
(WebInspector.TimelineRecording.prototype.initializeTimeBoundsIfNecessary):
For a recording to start updating current time the recording itself
must have a start time. Provide a setter so that the start time can
be set without waiting for a timeline record. For example the
timestamp that the frontend receives when it starts a recording.

* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype._startUpdatingCurrentTime):
When we have a startTime number (new backends) always use it as the current time.
Previously we were only doing this if current time was NaN, which would be when
re-starting a recording after it had stopped, but not for the initial recording
after opening the inspector.

* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler.prototype.updateLayout):
Even if we do not need to create new time dividers we may need to perform
other updates like update the current time marker. So do work before bailing.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191639 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js
Source/WebInspectorUI/UserInterface/Models/TimelineRecording.js
Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js
Source/WebInspectorUI/UserInterface/Views/TimelineRuler.js