| OLD | NEW |
| 1 /* | 1 /* |
| 2 * This file is part of the WebKit project. | 2 * This file is part of the WebKit project. |
| 3 * | 3 * |
| 4 * Copyright (C) 2009 Michelangelo De Simone <micdesim@gmail.com> | 4 * Copyright (C) 2009 Michelangelo De Simone <micdesim@gmail.com> |
| 5 * Copyright (C) 2010 Google Inc. All rights reserved. | 5 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 if (atPosition == kNotFound) | 94 if (atPosition == kNotFound) |
| 95 return address; | 95 return address; |
| 96 | 96 |
| 97 if (address.find("xn--", atPosition + 1) == kNotFound) | 97 if (address.find("xn--", atPosition + 1) == kNotFound) |
| 98 return address; | 98 return address; |
| 99 | 99 |
| 100 if (!chrome()) | 100 if (!chrome()) |
| 101 return address; | 101 return address; |
| 102 | 102 |
| 103 String languages = chrome()->client().acceptLanguages(); | 103 String languages = chrome()->client().acceptLanguages(); |
| 104 String unicodeHost = blink::Platform::current()->convertIDNToUnicode(address
.substring(atPosition + 1), languages); | 104 String unicodeHost = Platform::current()->convertIDNToUnicode(address.substr
ing(atPosition + 1), languages); |
| 105 StringBuilder builder; | 105 StringBuilder builder; |
| 106 builder.append(address, 0, atPosition + 1); | 106 builder.append(address, 0, atPosition + 1); |
| 107 builder.append(unicodeHost); | 107 builder.append(unicodeHost); |
| 108 return builder.toString(); | 108 return builder.toString(); |
| 109 } | 109 } |
| 110 | 110 |
| 111 static bool isInvalidLocalPartCharacter(UChar ch) | 111 static bool isInvalidLocalPartCharacter(UChar ch) |
| 112 { | 112 { |
| 113 if (!isASCII(ch)) | 113 if (!isASCII(ch)) |
| 114 return true; | 114 return true; |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 builder.reserveCapacity(value.length()); | 311 builder.reserveCapacity(value.length()); |
| 312 for (size_t i = 0; i < addresses.size(); ++i) { | 312 for (size_t i = 0; i < addresses.size(); ++i) { |
| 313 if (i > 0) | 313 if (i > 0) |
| 314 builder.append(','); | 314 builder.append(','); |
| 315 builder.append(convertEmailAddressToUnicode(addresses[i])); | 315 builder.append(convertEmailAddressToUnicode(addresses[i])); |
| 316 } | 316 } |
| 317 return builder.toString(); | 317 return builder.toString(); |
| 318 } | 318 } |
| 319 | 319 |
| 320 } // namespace blink | 320 } // namespace blink |
| OLD | NEW |