[webkit-reviews] review granted: [Bug 215493] Web Inspector: use `WI.DropZoneView` instead of `handleFileDrop` : [Attachment 406573] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 14 10:49:21 PDT 2020


Joseph Pecoraro <joepeck at webkit.org> has granted Devin Rousso
<drousso at apple.com>'s request for review:
Bug 215493: Web Inspector: use `WI.DropZoneView` instead of `handleFileDrop`
https://bugs.webkit.org/show_bug.cgi?id=215493

Attachment 406573: Patch

https://bugs.webkit.org/attachment.cgi?id=406573&action=review




--- Comment #2 from Joseph Pecoraro <joepeck at webkit.org> ---
Comment on attachment 406573
  --> https://bugs.webkit.org/attachment.cgi?id=406573
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.


More information about the webkit-reviews mailing list