| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2007, 2008, 2011, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2007, 2008, 2011, 2012 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Research In Motion Limited. All rights reserved. | 3 * Copyright (C) 2012 Research In Motion Limited. All rights reserved. |
| 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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 return true; | 209 return true; |
| 210 | 210 |
| 211 // Allow ports 21 and 22 for FTP URLs, as Mozilla does. | 211 // Allow ports 21 and 22 for FTP URLs, as Mozilla does. |
| 212 if ((port == 21 || port == 22) && url.protocolIs("ftp")) | 212 if ((port == 21 || port == 22) && url.protocolIs("ftp")) |
| 213 return true; | 213 return true; |
| 214 | 214 |
| 215 // Allow any port number in a file URL, since the port number is ignored. | 215 // Allow any port number in a file URL, since the port number is ignored. |
| 216 if (url.protocolIs("file")) | 216 if (url.protocolIs("file")) |
| 217 return true; | 217 return true; |
| 218 | 218 |
| 219 #if PLATFORM(BLACKBERRY) | |
| 220 if (url.protocolIs("local")) | |
| 221 return true; | |
| 222 #endif | |
| 223 | |
| 224 return false; | 219 return false; |
| 225 } | 220 } |
| 226 | 221 |
| 227 String mimeTypeFromDataURL(const String& url) | 222 String mimeTypeFromDataURL(const String& url) |
| 228 { | 223 { |
| 229 ASSERT(protocolIs(url, "data")); | 224 ASSERT(protocolIs(url, "data")); |
| 230 size_t index = url.find(';'); | 225 size_t index = url.find(';'); |
| 231 if (index == notFound) | 226 if (index == notFound) |
| 232 index = url.find(','); | 227 index = url.find(','); |
| 233 if (index != notFound) { | 228 if (index != notFound) { |
| (...skipping 26 matching lines...) Expand all Loading... |
| 260 | 255 |
| 261 String KURL::elidedString() const | 256 String KURL::elidedString() const |
| 262 { | 257 { |
| 263 if (string().length() <= 1024) | 258 if (string().length() <= 1024) |
| 264 return string(); | 259 return string(); |
| 265 | 260 |
| 266 return string().left(511) + "..." + string().right(510); | 261 return string().left(511) + "..." + string().right(510); |
| 267 } | 262 } |
| 268 | 263 |
| 269 } | 264 } |
| OLD | NEW |