Bug 202957

Summary: Web Inspector: Local Resource Overrides: automatically create an image/font local override when dragging content over a non-overridden resource
Product: WebKit Reporter: Devin Rousso <hi>
Component: Web InspectorAssignee: Devin Rousso <hi>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, hi, inspector-bugzilla-changes, joepeck, lingcherd_ho, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch none

Devin Rousso
Reported 2019-10-14 15:05:46 PDT
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).
Attachments
Patch (31.72 KB, patch)
2019-10-14 16:40 PDT, Devin Rousso
no flags
Patch (31.95 KB, patch)
2019-10-15 09:53 PDT, Devin Rousso
no flags
Devin Rousso
Comment 1 2019-10-14 16:40:43 PDT
Joseph Pecoraro
Comment 2 2019-10-14 19:11:45 PDT
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.
Devin Rousso
Comment 3 2019-10-15 09:52:42 PDT
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.
Devin Rousso
Comment 4 2019-10-15 09:53:42 PDT
WebKit Commit Bot
Comment 5 2019-10-15 10:15:47 PDT
Comment on attachment 380996 [details] Patch Clearing flags on attachment: 380996 Committed r251144: <https://trac.webkit.org/changeset/251144>
WebKit Commit Bot
Comment 6 2019-10-15 10:15:48 PDT
All reviewed patches have been landed. Closing bug.
Ling Ho
Comment 7 2019-10-15 15:28:38 PDT
Note You need to log in before you can comment on or make changes to this bug.