This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Web Inspector: Canvas: a recording initiated by the user should be sh…
…own immediately on completion https://bugs.webkit.org/show_bug.cgi?id=183647 <rdar://problem/38479187> Reviewed by Matt Baker. Source/WebInspectorUI: When recordings are initiated via `console.record`, we don't want to automatically show the recording after it's payload is sent to the frontend. We determine whether a recording came from the console by comparing the recording's associated canvas with the current value of `_recordingCanvas`. Previously, when stopping a recording, we would always null the value, which meant that all non-single-frame recordings (single-frame recordings are stopped by the agent after the first paint or tick after an action is performed) would be categorized as coming from the console, since `_recordingCanvas` would be null by the time the frontend recieved the payload. This patch changes it so that the nulling of `_recordingCanvas` in `stopRecording` is only done if the agent command errors. It was already the case that `_recordingCanvas` was nulled in `stopRecording`, so this patch just prevents it from being nulled too early. * UserInterface/Controllers/CanvasManager.js: (WI.CanvasManager.prototype.stopRecording): LayoutTests: * inspector/canvas/recording-2d.html: Reorder the agent calls so that the CanvasManager `_recordingCanvas` state variable has a chance to properly update after a recording is stopped. Canonical link: https://commits.webkit.org/199300@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@229620 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing 4 changed files with 42 additions and 6 deletions.