Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(645)

Side by Side Diff: Source/core/rendering/RenderQuote.cpp

Issue 560273004: Use AtomicString API directly (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add more Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/html/HTMLTextAreaElement.cpp ('k') | Source/core/svg/SVGHKernElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 { "zu", 0x201c, 0x201d, 0x2018, 0x2019, 0 }, 236 { "zu", 0x201c, 0x201d, 0x2018, 0x2019, 0 },
237 }; 237 };
238 238
239 const QuotesData* quotesDataForLanguage(const AtomicString& lang) 239 const QuotesData* quotesDataForLanguage(const AtomicString& lang)
240 { 240 {
241 if (lang.isNull()) 241 if (lang.isNull())
242 return 0; 242 return 0;
243 243
244 // This could be just a hash table, but doing that adds 200k to RenderQuote. o 244 // This could be just a hash table, but doing that adds 200k to RenderQuote. o
245 Language* languagesEnd = languages + WTF_ARRAY_LENGTH(languages); 245 Language* languagesEnd = languages + WTF_ARRAY_LENGTH(languages);
246 CString lowercaseLang = lang.string().lower().utf8(); 246 CString lowercaseLang = lang.lower().utf8();
247 Language key = { lowercaseLang.data(), 0, 0, 0, 0, 0 }; 247 Language key = { lowercaseLang.data(), 0, 0, 0, 0, 0 };
248 Language* match = std::lower_bound(languages, languagesEnd, key); 248 Language* match = std::lower_bound(languages, languagesEnd, key);
249 if (match == languagesEnd || strcmp(match->lang, key.lang)) 249 if (match == languagesEnd || strcmp(match->lang, key.lang))
250 return 0; 250 return 0;
251 251
252 if (!match->data) 252 if (!match->data)
253 match->data = QuotesData::create(match->open1, match->close1, match->ope n2, match->close2).leakRef(); 253 match->data = QuotesData::create(match->open1, match->close1, match->ope n2, match->close2).leakRef();
254 254
255 return match->data; 255 return match->data;
256 } 256 }
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 if (m_depth) 386 if (m_depth)
387 m_depth--; 387 m_depth--;
388 break; 388 break;
389 } 389 }
390 } 390 }
391 if (oldDepth != m_depth) 391 if (oldDepth != m_depth)
392 updateText(); 392 updateText();
393 } 393 }
394 394
395 } // namespace blink 395 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/HTMLTextAreaElement.cpp ('k') | Source/core/svg/SVGHKernElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698