Chromium Code Reviews| 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 |