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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutQuote.cpp

Issue 2668903003: Replace WTF::emptyString{16Bit}() with a static global (Closed)
Patch Set: Replace WTF::emptyString{16Bit}() with a static global Created 3 years, 10 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
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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 return toLayoutTextFragment(child); 278 return toLayoutTextFragment(child);
279 } 279 }
280 280
281 return nullptr; 281 return nullptr;
282 } 282 }
283 283
284 String LayoutQuote::computeText() const { 284 String LayoutQuote::computeText() const {
285 switch (m_type) { 285 switch (m_type) {
286 case NO_OPEN_QUOTE: 286 case NO_OPEN_QUOTE:
287 case NO_CLOSE_QUOTE: 287 case NO_CLOSE_QUOTE:
288 return emptyString(); 288 return emptyString;
289 case CLOSE_QUOTE: 289 case CLOSE_QUOTE:
290 return quotesData()->getCloseQuote(m_depth - 1).impl(); 290 return quotesData()->getCloseQuote(m_depth - 1).impl();
291 case OPEN_QUOTE: 291 case OPEN_QUOTE:
292 return quotesData()->getOpenQuote(m_depth).impl(); 292 return quotesData()->getOpenQuote(m_depth).impl();
293 } 293 }
294 ASSERT_NOT_REACHED(); 294 ASSERT_NOT_REACHED();
295 return emptyString(); 295 return emptyString;
296 } 296 }
297 297
298 const QuotesData* LayoutQuote::quotesData() const { 298 const QuotesData* LayoutQuote::quotesData() const {
299 if (const QuotesData* customQuotes = style()->quotes()) 299 if (const QuotesData* customQuotes = style()->quotes())
300 return customQuotes; 300 return customQuotes;
301 301
302 if (const QuotesData* quotes = quotesDataForLanguage(style()->locale())) 302 if (const QuotesData* quotes = quotesDataForLanguage(style()->locale()))
303 return quotes; 303 return quotes;
304 304
305 return basicQuotesData(); 305 return basicQuotesData();
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 if (m_depth) 390 if (m_depth)
391 m_depth--; 391 m_depth--;
392 break; 392 break;
393 } 393 }
394 } 394 }
395 if (oldDepth != m_depth) 395 if (oldDepth != m_depth)
396 updateText(); 396 updateText();
397 } 397 }
398 398
399 } // namespace blink 399 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698