WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 215493
Web Inspector: use `WI.DropZoneView` instead of `handleFileDrop`
https://bugs.webkit.org/show_bug.cgi?id=215493
Summary
Web Inspector: use `WI.DropZoneView` instead of `handleFileDrop`
Devin Rousso
Reported
2020-08-13 23:33:21 PDT
`WI.DropZoneView` shows UI to indicate that something can be dropped, whereas `handleFileDrop` is invisible
Attachments
Patch
(13.42 KB, patch)
2020-08-13 23:36 PDT
,
Devin Rousso
joepeck
: review+
Details
Formatted Diff
Diff
Patch
(13.42 KB, patch)
2020-08-14 14:33 PDT
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Devin Rousso
Comment 1
2020-08-13 23:36:59 PDT
Created
attachment 406573
[details]
Patch
Joseph Pecoraro
Comment 2
2020-08-14 10:49:21 PDT
Comment on
attachment 406573
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=406573&action=review
r=me
> Source/WebInspectorUI/UserInterface/Views/AuditTabContentView.js:104 > + WI.FileUtilities.readJSON(files, (result) => WI.auditManager.processJSON(result))
Style: Semicolon.
> Source/WebInspectorUI/UserInterface/Views/GraphicsTabContentView.js:154 > + WI.FileUtilities.readJSON(files, (result) => WI.canvasManager.processJSON(result))
Style: Semicolon.
> Source/WebInspectorUI/UserInterface/Views/NetworkTabContentView.js:135 > + dropZoneShouldAppearForDragEvent(dropZone, event) > + { > + return event.dataTransfer.types.includes("Files"); > + }
Given so many of these are the same, maybe could make an alternate convenience delegate to make this pattern simpler: dropZoneShouldAppearForDragEventWithFiles() { return true; } And `WI.DropZoneView` could check this delegate first. Probably unimportant.
> Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.js:388 > + WI.FileUtilities.readJSON(files, (result) => WI.timelineManager.processJSON(result))
Style: Semicolon.
Devin Rousso
Comment 3
2020-08-14 14:29:07 PDT
Comment on
attachment 406573
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=406573&action=review
>> Source/WebInspectorUI/UserInterface/Views/AuditTabContentView.js:104 >> + WI.FileUtilities.readJSON(files, (result) => WI.auditManager.processJSON(result)) > > Style: Semicolon.
... crap
>> Source/WebInspectorUI/UserInterface/Views/GraphicsTabContentView.js:154 >> + WI.FileUtilities.readJSON(files, (result) => WI.canvasManager.processJSON(result)) > > Style: Semicolon.
crap
>> Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.js:388 >> + WI.FileUtilities.readJSON(files, (result) => WI.timelineManager.processJSON(result)) > > Style: Semicolon.
CRAP
Devin Rousso
Comment 4
2020-08-14 14:31:45 PDT
Comment on
attachment 406573
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=406573&action=review
>> Source/WebInspectorUI/UserInterface/Views/NetworkTabContentView.js:135 >> + } > > Given so many of these are the same, maybe could make an alternate convenience delegate to make this pattern simpler: > > dropZoneShouldAppearForDragEventWithFiles() > { > return true; > } > > And `WI.DropZoneView` could check this delegate first. Probably unimportant.
Eh, sure, but I think we've covered most (if not all) of the bases with this patch already, so meh. I kinda like the verbosity/explicitness :)
Devin Rousso
Comment 5
2020-08-14 14:33:08 PDT
Created
attachment 406621
[details]
Patch
EWS
Comment 6
2020-08-14 15:00:58 PDT
Committed
r265707
: <
https://trac.webkit.org/changeset/265707
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 406621
[details]
.
Radar WebKit Bug Importer
Comment 7
2020-08-14 15:01:21 PDT
<
rdar://problem/67099902
>
Greg Marriott
Comment 8
2020-08-20 23:54:31 PDT
***
Bug 215492
has been marked as a duplicate of this bug. ***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug