Changeset 247533 in webkit
- Timestamp:
- Jul 17, 2019 1:39:29 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r247530 r247533 1 2019-07-17 Olivier Blin <olivier.blin@softathome.com> 2 3 Web Inspector: application/xml content not shown 4 https://bugs.webkit.org/show_bug.cgi?id=199861 5 6 Reviewed by Devin Rousso. 7 8 * inspector/unit-tests/mimetype-utilities-expected.txt: 9 * inspector/unit-tests/mimetype-utilities.html: 10 Test for shouldTreatMIMETypeAsText. 11 1 12 2019-07-17 Daniel Bates <dabates@apple.com> 2 13 -
trunk/LayoutTests/inspector/unit-tests/mimetype-utilities-expected.txt
r239343 r247533 39 39 PASS: "image/svg+xml" should be treated as text. 40 40 PASS: "text/x-coffeescript" should be treated as text. 41 PASS: "application/xml" should be treated as text. 41 42 PASS: "image/jpeg" should not be treated as text. 42 43 PASS: "image/png" should not be treated as text. -
trunk/LayoutTests/inspector/unit-tests/mimetype-utilities.html
r239343 r247533 72 72 expectText("image/svg+xml"); 73 73 expectText("text/x-coffeescript"); 74 expectText("application/xml"); 74 75 75 76 expectNotText("image/jpeg"); -
trunk/Source/WebInspectorUI/ChangeLog
r247492 r247533 1 2019-07-17 Olivier Blin <olivier.blin@softathome.com> 2 3 Web Inspector: application/xml content not shown 4 https://bugs.webkit.org/show_bug.cgi?id=199861 5 6 Reviewed by Devin Rousso. 7 8 application/xml content from XHR requests was not shown in the 9 inspector, an error message was displayed instead. 10 11 application/xml content should be treated as text, since 12 application/xml is the standard mimetype for XML content. 13 Apache serves XML content with the application/xml mimetype by 14 default. 15 16 * UserInterface/Base/MIMETypeUtilities.js: 17 (WI.fileExtensionForMIMEType): 18 Report "xml" extension for "application/xml" mimetype. 19 (WI.shouldTreatMIMETypeAsText): 20 Treat XML files as text. 21 1 22 2019-07-16 Nikita Vasilyev <nvasilyev@apple.com> 2 23 -
trunk/Source/WebInspectorUI/UserInterface/Base/MIMETypeUtilities.js
r239343 r247533 171 171 "text/html": "html", 172 172 "application/xhtml+xml": "xhtml", 173 "application/xml": "xml", 173 174 "text/xml": "xml", 174 175 … … 316 317 return true; 317 318 318 // Various media text mime types.319 319 let extension = WI.fileExtensionForMIMEType(mimeType); 320 if (extension === " m3u8" || extension === "m3u")320 if (extension === "xml") 321 321 return true; 322 322 … … 324 324 if (extension === "js" || extension === "json") 325 325 return true; 326 327 // Various media text mime types. 328 if (extension === "m3u8" || extension === "m3u") 329 return true; 330 326 331 if (mimeType.startsWith("application/")) 327 return mimeType.endsWith("script") || mimeType.endsWith("json") ;332 return mimeType.endsWith("script") || mimeType.endsWith("json") || mimeType.endsWith("xml"); 328 333 329 334 return false;
Note: See TracChangeset
for help on using the changeset viewer.