| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2008, 2009 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 3 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 "text/html", | 196 "text/html", |
| 197 "text/xml", | 197 "text/xml", |
| 198 "text/xsl", | 198 "text/xsl", |
| 199 "text/plain", | 199 "text/plain", |
| 200 "text/", | 200 "text/", |
| 201 "application/xml", | 201 "application/xml", |
| 202 "application/xhtml+xml", | 202 "application/xhtml+xml", |
| 203 "application/vnd.wap.xhtml+xml", | 203 "application/vnd.wap.xhtml+xml", |
| 204 "application/rss+xml", | 204 "application/rss+xml", |
| 205 "application/atom+xml", | 205 "application/atom+xml", |
| 206 "application/json", |
| 206 #if ENABLE(SVG) | 207 #if ENABLE(SVG) |
| 207 "image/svg+xml", | 208 "image/svg+xml", |
| 208 #endif | 209 #endif |
| 209 #if ENABLE(FTPDIR) | 210 #if ENABLE(FTPDIR) |
| 210 "application/x-ftp-directory", | 211 "application/x-ftp-directory", |
| 211 #endif | 212 #endif |
| 212 "multipart/x-mixed-replace" | 213 "multipart/x-mixed-replace" |
| 214 // Note: ADDING a new type here will probably render it as HTML. This ca
n |
| 215 // result in cross-site scripting. |
| 213 }; | 216 }; |
| 217 COMPILE_ASSERT(sizeof(types) / sizeof(types[0]) <= 16, |
| 218 nonimage_mime_types_must_be_less_than_or_equal_to_16); |
| 219 |
| 214 for (size_t i = 0; i < sizeof(types)/sizeof(types[0]); ++i) | 220 for (size_t i = 0; i < sizeof(types)/sizeof(types[0]); ++i) |
| 215 supportedNonImageMIMETypes->add(types[i]); | 221 supportedNonImageMIMETypes->add(types[i]); |
| 216 | 222 |
| 217 ArchiveFactory::registerKnownArchiveMIMETypes(); | 223 ArchiveFactory::registerKnownArchiveMIMETypes(); |
| 218 } | 224 } |
| 219 | 225 |
| 220 static void initializeMediaTypeMaps() | 226 static void initializeMediaTypeMaps() |
| 221 { | 227 { |
| 222 struct TypeExtensionPair { | 228 struct TypeExtensionPair { |
| 223 const char* type; | 229 const char* type; |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 return *supportedMediaMIMETypes; | 455 return *supportedMediaMIMETypes; |
| 450 } | 456 } |
| 451 | 457 |
| 452 const String& defaultMIMEType() | 458 const String& defaultMIMEType() |
| 453 { | 459 { |
| 454 DEFINE_STATIC_LOCAL(const String, defaultMIMEType, ("application/octet-strea
m")); | 460 DEFINE_STATIC_LOCAL(const String, defaultMIMEType, ("application/octet-strea
m")); |
| 455 return defaultMIMEType; | 461 return defaultMIMEType; |
| 456 } | 462 } |
| 457 | 463 |
| 458 } // namespace WebCore | 464 } // namespace WebCore |
| OLD | NEW |