Web Inspector: Canvas: auto-record after page load sometimes shows the wrong UI
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Apr 2019 22:41:28 +0000 (22:41 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Apr 2019 22:41:28 +0000 (22:41 +0000)
commit3aa753f8d8dca228cc0862aebd7041803339628b
treece52e01c1dae7e6f8c12efc1d65e4e94542173c9
parent6ed912bd1baf0aa5dd1da653576ed06672ff66e3
Web Inspector: Canvas: auto-record after page load sometimes shows the wrong UI
https://bugs.webkit.org/show_bug.cgi?id=196320
<rdar://problem/49356686>

Reviewed by Joseph Pecoraro.

It was previously possible that the timing of a recording being started and the preview
image being loaded would not always be in the same order.

Utilize the existing `View.prototype.layout` mechanics to ensure that updates are coalesced
and that the changes are always applied in a particular order.

* UserInterface/Views/CanvasContentView.js:
(WI.CanvasContentView):
(WI.CanvasContentView.prototype.refreshPreview): Added.
(WI.CanvasContentView.prototype.initialLayout):
(WI.CanvasContentView.prototype.layout):
(WI.CanvasContentView.prototype.shown):
(WI.CanvasContentView.prototype.attached):
(WI.CanvasContentView.prototype._refreshPixelSize):
(WI.CanvasContentView.prototype.refresh): Deleted.
(WI.CanvasContentView.prototype._recordingStarted): Deleted.
(WI.CanvasContentView.prototype._recordingProgress): Deleted.
(WI.CanvasContentView.prototype._recordingStopped): Deleted.
(WI.CanvasContentView.prototype._shaderProgramAdded): Deleted.
(WI.CanvasContentView.prototype._shaderProgramRemoved): Deleted.

* UserInterface/Views/CanvasOverviewContentView.js:
(WI.CanvasOverviewContentView.prototype._refreshPreviews):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243720 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/CanvasContentView.js
Source/WebInspectorUI/UserInterface/Views/CanvasOverviewContentView.js