[webkit-reviews] review granted: [Bug 199861] Web Inspector: application/xml content not shown : [Attachment 374294] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 17 09:04:27 PDT 2019

Devin Rousso <drousso at apple.com> has granted Olivier Blin
<olivier.blin at softathome.com>'s request for review:
Bug 199861: Web Inspector: application/xml content not shown

Attachment 374294: Patch


--- Comment #2 from Devin Rousso <drousso at apple.com> ---
Comment on attachment 374294
  --> https://bugs.webkit.org/attachment.cgi?id=374294

View in context: https://bugs.webkit.org/attachment.cgi?id=374294&action=review

r=me, nice catch!  If need someone else to cq+ (or r+ again), just let me know.

> Source/WebInspectorUI/UserInterface/Base/MIMETypeUtilities.js:290
> +	   "application/xml": "xml",

We already have a mapping above for "text/xml" (>173), so please move just this
line to be after that.

> Source/WebInspectorUI/UserInterface/Base/MIMETypeUtilities.js:325
> +    if (extension === "js" || extension === "json" || extension === "xml")

This shouldn't be added to this `if`, as it doesn't apply to the comment.  If
anything, I'd restructure a bit of this function:
    let extension = WI.fileExtensionForMIMEType(mimeType);
    if (extension === "xml")
	return true;

    // Various script/JSON mime types.
    if (extension === "js" || extension === "json")
	return true;

    // Various media text mime types.
    if (extension === "m3u8" || extension === "m3u")
	return true;

More information about the webkit-reviews mailing list