Dragging/Dropping an image/font over a non-overridden resource content view should automatically create a local override for that resource, populate it's content with the dragged/dropped file, and show it. This saves the user from having to click on the "Create Local Override" navigation item for non-text resources (which aren't editable in Web Inspector anyways, so they'd have to drag/drop).
Created attachment 380937 [details] Patch
Comment on attachment 380937 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=380937&action=review r=me > Source/WebInspectorUI/UserInterface/Views/DropZoneView.js:75 > + set text(text) Might as well add a getter? > Source/WebInspectorUI/UserInterface/Views/ResourceContentView.js:70 > + this._importLocalResourceOverrideButtonNavigationItem.enabled = true; I assume enabled is the default. Maybe this line can be removed. > Source/WebInspectorUI/UserInterface/Views/ResourceContentView.js:77 > this._removeLocalResourceOverrideButtonNavigationItem.enabled = true; Probably this one too then.
Comment on attachment 380937 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=380937&action=review >> Source/WebInspectorUI/UserInterface/Views/DropZoneView.js:75 >> + set text(text) > > Might as well add a getter? I'd rather wait until it's actually needed. We have a lot of getters all over that aren't ever used, and just add code "bloat". Plus, I kinda like the idea of "preventing" callers from getting data out of a `WI.DropZoneView` (at least from the API surface), as it's not really a place where one should be keeping data.
Created attachment 380996 [details] Patch
Comment on attachment 380996 [details] Patch Clearing flags on attachment: 380996 Committed r251144: <https://trac.webkit.org/changeset/251144>
All reviewed patches have been landed. Closing bug.
<rdar://problem/56296743>