Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(287)

Unified Diff: components/mime_util/mime_util.cc

Issue 2135753002: Update supported javascript mimetypes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix another layout test Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/html/script-allowed-types-languages.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mime_util/mime_util.cc
diff --git a/components/mime_util/mime_util.cc b/components/mime_util/mime_util.cc
index 06f9b523783ee4f6e4bddb93eb4d8dc558b76e4d..ee7d8a991e720811edf1b0df0cb4d411a2ff8693 100644
--- a/components/mime_util/mime_util.cc
+++ b/components/mime_util/mime_util.cc
@@ -36,26 +36,24 @@ const char* const kSupportedImageTypes[] = {"image/jpeg",
"image/x-xbitmap", // xbm
"image/x-png"};
-// Mozilla 1.8 and WinIE 7 both accept text/javascript and text/ecmascript.
-// Mozilla 1.8 accepts application/javascript, application/ecmascript, and
-// application/x-javascript, but WinIE 7 doesn't.
-// WinIE 7 accepts text/javascript1.1 - text/javascript1.3, text/jscript, and
-// text/livescript, but Mozilla 1.8 doesn't.
-// Mozilla 1.8 allows leading and trailing whitespace, but WinIE 7 doesn't.
-// Mozilla 1.8 and WinIE 7 both accept the empty string, but neither accept a
-// whitespace-only string.
-// We want to accept all the values that either of these browsers accept, but
-// not other values.
+// Firefox 47 accepts all of the values in
asanka 2016/07/08 22:52:09 At this point we should be keeping this list in sy
Charlie Harrison 2016/07/11 14:43:32 Is the link to the whatwg spec not sufficient here
asanka 2016/07/11 14:52:39 Yup. That's sufficient. To clarify, I was referri
+// https://html.spec.whatwg.org/#javascript-mime-type, so we should too.
const char* const kSupportedJavascriptTypes[] = {"text/javascript",
asanka 2016/07/08 22:52:09 Sort to match spec.
Charlie Harrison 2016/07/11 14:43:32 Done.
"text/ecmascript",
"application/javascript",
"application/ecmascript",
"application/x-javascript",
+ "application/x-ecmascript",
+ "text/javascript1.0",
"text/javascript1.1",
"text/javascript1.2",
"text/javascript1.3",
+ "text/javascript1.4",
+ "text/javascript1.5",
"text/jscript",
- "text/livescript"};
+ "text/livescript",
+ "text/x-ecmascript",
+ "text/x-javascript"};
// These types are excluded from the logic that allows all text/ types because
// while they are technically text, it's very unlikely that a user expects to
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/html/script-allowed-types-languages.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698