Web Inspector: drag/drop over the sidebar should load an imported file in Canvas...
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Apr 2019 18:58:27 +0000 (18:58 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Apr 2019 18:58:27 +0000 (18:58 +0000)
commitf2bb353aa6bdc2dba5845279595f5e4653fb530b
treef5cadc8d2317915e21ef75351477be87ae5d5ebb
parent2234354c31dc98ab1486667ebf0ab2b5427c8945
Web Inspector: drag/drop over the sidebar should load an imported file in Canvas/Audit tab
https://bugs.webkit.org/show_bug.cgi?id=196873
<rdar://problem/49858190>

Reviewed by Timothy Hatcher.

* UserInterface/Base/Main.js:
(WI.contentLoaded):
(WI._handleDragOver): Added.
(WI._handleDrop): Added.
(WI._dragOver): Deleted.
* UserInterface/Views/AuditTabContentView.js:
(WI.AuditTabContentView):
(WI.AuditTabContentView.prototype.async handleFileDrop): Added.
(WI.AuditTabContentView.prototype._handleDragOver): Deleted.
(WI.AuditTabContentView.prototype._handleDrop): Deleted.
* UserInterface/Views/CanvasTabContentView.js:
(WI.CanvasTabContentView):
(WI.CanvasTabContentView.prototype.async handleFileDrop): Added.
(WI.CanvasTabContentView.prototype._handleDragOver): Deleted.
(WI.CanvasTabContentView.prototype._handleDrop): Deleted.
* UserInterface/Views/TimelineTabContentView.js:
(WI.TimelineTabContentView.prototype.async handleFileDrop): Added.
Check whether the current tab is able to handle a file drop, and if so, don't prevent the
drag from occuring. This now allows the user to drop anywhere on the Web Inspector area to
import files, so long as the relevant tab is currently selected.

* UserInterface/Controllers/CanvasManager.js:
(WI.CanvasManager.prototype.async processJSON): Added.
(WI.CanvasManager.prototype.processJSON): Deleted.
* UserInterface/Controllers/TimelineManager.js:
(WI.TimelineManager.prototype.async processJSON): Added.
(WI.TimelineManager.prototype.processJSON): Deleted.
Make `async` to match other `processJSON` functions.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244278 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Base/Main.js
Source/WebInspectorUI/UserInterface/Controllers/CanvasManager.js
Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js
Source/WebInspectorUI/UserInterface/Views/AuditTabContentView.js
Source/WebInspectorUI/UserInterface/Views/CanvasTabContentView.js
Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.js