| OLD | NEW |
| 1 /** | 1 /** |
| 2 * Copyright (C) 2011 Nokia Inc. All rights reserved. | 2 * Copyright (C) 2011 Nokia Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 {"zh-hant", 0x300c, 0x300d, 0x300e, 0x300f, 0}, | 227 {"zh-hant", 0x300c, 0x300d, 0x300e, 0x300f, 0}, |
| 228 {"zu", 0x201c, 0x201d, 0x2018, 0x2019, 0}, | 228 {"zu", 0x201c, 0x201d, 0x2018, 0x2019, 0}, |
| 229 }; | 229 }; |
| 230 | 230 |
| 231 const QuotesData* QuotesDataForLanguage(const AtomicString& lang) { | 231 const QuotesData* QuotesDataForLanguage(const AtomicString& lang) { |
| 232 if (lang.IsNull()) | 232 if (lang.IsNull()) |
| 233 return nullptr; | 233 return nullptr; |
| 234 | 234 |
| 235 // This could be just a hash table, but doing that adds 200k to LayoutQuote.o | 235 // This could be just a hash table, but doing that adds 200k to LayoutQuote.o |
| 236 Language* languages_end = g_languages + WTF_ARRAY_LENGTH(g_languages); | 236 Language* languages_end = g_languages + WTF_ARRAY_LENGTH(g_languages); |
| 237 CString lowercase_lang = lang.Lower().Utf8(); | 237 CString lowercase_lang = lang.DeprecatedLower().Utf8(); |
| 238 Language key = {lowercase_lang.Data(), 0, 0, 0, 0, 0}; | 238 Language key = {lowercase_lang.Data(), 0, 0, 0, 0, 0}; |
| 239 Language* match = std::lower_bound(g_languages, languages_end, key); | 239 Language* match = std::lower_bound(g_languages, languages_end, key); |
| 240 if (match == languages_end || strcmp(match->lang, key.lang)) | 240 if (match == languages_end || strcmp(match->lang, key.lang)) |
| 241 return nullptr; | 241 return nullptr; |
| 242 | 242 |
| 243 if (!match->data) | 243 if (!match->data) |
| 244 match->data = QuotesData::Create(match->open1, match->close1, match->open2, | 244 match->data = QuotesData::Create(match->open1, match->close1, match->open2, |
| 245 match->close2) | 245 match->close2) |
| 246 .LeakRef(); | 246 .LeakRef(); |
| 247 | 247 |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 if (depth_) | 395 if (depth_) |
| 396 depth_--; | 396 depth_--; |
| 397 break; | 397 break; |
| 398 } | 398 } |
| 399 } | 399 } |
| 400 if (old_depth != depth_) | 400 if (old_depth != depth_) |
| 401 UpdateText(); | 401 UpdateText(); |
| 402 } | 402 } |
| 403 | 403 |
| 404 } // namespace blink | 404 } // namespace blink |
| OLD | NEW |