Title: [248254] releases/WebKitGTK/webkit-2.24
- Revision
- 248254
- Author
- [email protected]
- Date
- 2019-08-03 20:24:08 -0700 (Sat, 03 Aug 2019)
Log Message
Merge r247533 - Web Inspector: application/xml content not shown
https://bugs.webkit.org/show_bug.cgi?id=199861
Patch by Olivier Blin <[email protected]> on 2019-07-17
Reviewed by Devin Rousso.
Source/WebInspectorUI:
application/xml content from XHR requests was not shown in the
inspector, an error message was displayed instead.
application/xml content should be treated as text, since
application/xml is the standard mimetype for XML content.
Apache serves XML content with the application/xml mimetype by
default.
* UserInterface/Base/MIMETypeUtilities.js:
(WI.fileExtensionForMIMEType):
Report "xml" extension for "application/xml" mimetype.
(WI.shouldTreatMIMETypeAsText):
Treat XML files as text.
LayoutTests:
* inspector/unit-tests/mimetype-utilities-expected.txt:
* inspector/unit-tests/mimetype-utilities.html:
Test for shouldTreatMIMETypeAsText.
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.24/LayoutTests/ChangeLog (248253 => 248254)
--- releases/WebKitGTK/webkit-2.24/LayoutTests/ChangeLog 2019-08-04 03:24:05 UTC (rev 248253)
+++ releases/WebKitGTK/webkit-2.24/LayoutTests/ChangeLog 2019-08-04 03:24:08 UTC (rev 248254)
@@ -1,3 +1,14 @@
+2019-07-17 Olivier Blin <[email protected]>
+
+ Web Inspector: application/xml content not shown
+ https://bugs.webkit.org/show_bug.cgi?id=199861
+
+ Reviewed by Devin Rousso.
+
+ * inspector/unit-tests/mimetype-utilities-expected.txt:
+ * inspector/unit-tests/mimetype-utilities.html:
+ Test for shouldTreatMIMETypeAsText.
+
2019-07-08 Charlie Turner <[email protected]>
[GStreamer] media/video-volume.html broken after switching from cubic to linear scaling
Modified: releases/WebKitGTK/webkit-2.24/LayoutTests/inspector/unit-tests/mimetype-utilities-expected.txt (248253 => 248254)
--- releases/WebKitGTK/webkit-2.24/LayoutTests/inspector/unit-tests/mimetype-utilities-expected.txt 2019-08-04 03:24:05 UTC (rev 248253)
+++ releases/WebKitGTK/webkit-2.24/LayoutTests/inspector/unit-tests/mimetype-utilities-expected.txt 2019-08-04 03:24:08 UTC (rev 248254)
@@ -38,6 +38,7 @@
PASS: "application/vnd.apple.mpegurl" should be treated as text.
PASS: "image/svg+xml" should be treated as text.
PASS: "text/x-coffeescript" should be treated as text.
+PASS: "application/xml" should be treated as text.
PASS: "image/jpeg" should not be treated as text.
PASS: "image/png" should not be treated as text.
PASS: "image/gif" should not be treated as text.
Modified: releases/WebKitGTK/webkit-2.24/LayoutTests/inspector/unit-tests/mimetype-utilities.html (248253 => 248254)
--- releases/WebKitGTK/webkit-2.24/LayoutTests/inspector/unit-tests/mimetype-utilities.html 2019-08-04 03:24:05 UTC (rev 248253)
+++ releases/WebKitGTK/webkit-2.24/LayoutTests/inspector/unit-tests/mimetype-utilities.html 2019-08-04 03:24:08 UTC (rev 248254)
@@ -71,6 +71,7 @@
expectText("application/vnd.apple.mpegurl");
expectText("image/svg+xml");
expectText("text/x-coffeescript");
+ expectText("application/xml");
expectNotText("image/jpeg");
expectNotText("image/png");
Modified: releases/WebKitGTK/webkit-2.24/Source/WebInspectorUI/ChangeLog (248253 => 248254)
--- releases/WebKitGTK/webkit-2.24/Source/WebInspectorUI/ChangeLog 2019-08-04 03:24:05 UTC (rev 248253)
+++ releases/WebKitGTK/webkit-2.24/Source/WebInspectorUI/ChangeLog 2019-08-04 03:24:08 UTC (rev 248254)
@@ -1,3 +1,24 @@
+2019-07-17 Olivier Blin <[email protected]>
+
+ Web Inspector: application/xml content not shown
+ https://bugs.webkit.org/show_bug.cgi?id=199861
+
+ Reviewed by Devin Rousso.
+
+ application/xml content from XHR requests was not shown in the
+ inspector, an error message was displayed instead.
+
+ application/xml content should be treated as text, since
+ application/xml is the standard mimetype for XML content.
+ Apache serves XML content with the application/xml mimetype by
+ default.
+
+ * UserInterface/Base/MIMETypeUtilities.js:
+ (WI.fileExtensionForMIMEType):
+ Report "xml" extension for "application/xml" mimetype.
+ (WI.shouldTreatMIMETypeAsText):
+ Treat XML files as text.
+
2019-04-03 Myles C. Maxfield <[email protected]>
Remove support for -apple-trailing-word
Modified: releases/WebKitGTK/webkit-2.24/Source/WebInspectorUI/UserInterface/Base/MIMETypeUtilities.js (248253 => 248254)
--- releases/WebKitGTK/webkit-2.24/Source/WebInspectorUI/UserInterface/Base/MIMETypeUtilities.js 2019-08-04 03:24:05 UTC (rev 248253)
+++ releases/WebKitGTK/webkit-2.24/Source/WebInspectorUI/UserInterface/Base/MIMETypeUtilities.js 2019-08-04 03:24:08 UTC (rev 248254)
@@ -170,6 +170,7 @@
// Document types.
"text/html": "html",
"application/xhtml+xml": "xhtml",
+ "application/xml": "xml",
"text/xml": "xml",
// Script types.
@@ -315,16 +316,20 @@
if (mimeType.endsWith("+json") || mimeType.endsWith("+xml"))
return true;
- // Various media text mime types.
let extension = WI.fileExtensionForMIMEType(mimeType);
- if (extension === "m3u8" || extension === "m3u")
+ if (extension === "xml")
return true;
// Various script and JSON mime types.
if (extension === "js" || extension === "json")
return true;
+
+ // Various media text mime types.
+ if (extension === "m3u8" || extension === "m3u")
+ return true;
+
if (mimeType.startsWith("application/"))
- return mimeType.endsWith("script") || mimeType.endsWith("json");
+ return mimeType.endsWith("script") || mimeType.endsWith("json") || mimeType.endsWith("xml");
return false;
};
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes