Changeset 229620 in webkit
- Timestamp:
- Mar 14, 2018 10:54:53 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r229617 r229620 1 2018-03-14 Devin Rousso <webkit@devinrousso.com> 2 3 Web Inspector: Canvas: a recording initiated by the user should be shown immediately on completion 4 https://bugs.webkit.org/show_bug.cgi?id=183647 5 <rdar://problem/38479187> 6 7 Reviewed by Matt Baker. 8 9 * inspector/canvas/recording-2d.html: 10 Reorder the agent calls so that the CanvasManager `_recordingCanvas` state variable has a 11 chance to properly update after a recording is stopped. 12 1 13 2018-03-14 Ryan Haddad <ryanhaddad@apple.com> 2 14 -
trunk/LayoutTests/inspector/canvas/recording-2d.html
r225884 r229620 509 509 510 510 ++eventCount; 511 if (eventCount == 1) 511 if (eventCount == 1) { 512 512 InspectorTest.pass("A recording should have been started and stopped once."); 513 else if (eventCount >= 2) { 513 514 WI.canvasManager.startRecording(canvas); 515 WI.canvasManager.stopRecording(); 516 } else if (eventCount >= 2) { 514 517 InspectorTest.pass("A recording should have been started and stopped twice."); 515 518 … … 519 522 } 520 523 WI.canvasManager.addEventListener(WI.CanvasManager.Event.RecordingStopped, handleRecordingStopped); 521 522 WI.canvasManager.startRecording(canvas);523 WI.canvasManager.stopRecording();524 524 525 525 WI.canvasManager.startRecording(canvas); -
trunk/Source/WebInspectorUI/ChangeLog
r229543 r229620 1 2018-03-14 Devin Rousso <webkit@devinrousso.com> 2 3 Web Inspector: Canvas: a recording initiated by the user should be shown immediately on completion 4 https://bugs.webkit.org/show_bug.cgi?id=183647 5 <rdar://problem/38479187> 6 7 Reviewed by Matt Baker. 8 9 When recordings are initiated via `console.record`, we don't want to automatically show the 10 recording after it's payload is sent to the frontend. We determine whether a recording came 11 from the console by comparing the recording's associated canvas with the current value of 12 `_recordingCanvas`. Previously, when stopping a recording, we would always null the value, 13 which meant that all non-single-frame recordings (single-frame recordings are stopped by 14 the agent after the first paint or tick after an action is performed) would be categorized 15 as coming from the console, since `_recordingCanvas` would be null by the time the frontend 16 recieved the payload. 17 18 This patch changes it so that the nulling of `_recordingCanvas` in `stopRecording` is only 19 done if the agent command errors. It was already the case that `_recordingCanvas` was nulled 20 in `stopRecording`, so this patch just prevents it from being nulled too early. 21 22 * UserInterface/Controllers/CanvasManager.js: 23 (WI.CanvasManager.prototype.stopRecording): 24 1 25 2018-03-12 Jon Davis <jond@apple.com> 2 26 -
trunk/Source/WebInspectorUI/UserInterface/Controllers/CanvasManager.js
r225587 r229620 111 111 112 112 let canvas = this._recordingCanvas; 113 this._recordingCanvas = null;114 113 115 114 CanvasAgent.stopRecording(canvas.identifier, (error) => { … … 118 117 119 118 console.error(error); 119 this._recordingCanvas = null; 120 120 this.dispatchEventToListeners(WI.CanvasManager.Event.RecordingStopped, {canvas, recording: null}); 121 121 });
Note: See TracChangeset
for help on using the changeset viewer.