[Webkit-unassigned] [Bug 199861] Web Inspector: application/xml content not shown

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 17 12:34:50 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=199861

--- Comment #4 from Olivier Blin <olivier.blin at softathome.com> ---
Comment on attachment 374294
  --> https://bugs.webkit.org/attachment.cgi?id=374294
Patch

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

>> 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.

Ok, even if content with application/xml mimetype does not really belong to the "Document" group.

>> 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:
> ```js
>     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;
> ```

Done

Thanks for the review!

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190717/1cd090f8/attachment.html>


More information about the webkit-unassigned mailing list