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

Side by Side Diff: third_party/WebKit/Source/core/css/FontFace.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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 return "unloaded"; 355 return "unloaded";
356 case Loading: 356 case Loading:
357 return "loading"; 357 return "loading";
358 case Loaded: 358 case Loaded:
359 return "loaded"; 359 return "loaded";
360 case Error: 360 case Error:
361 return "error"; 361 return "error";
362 default: 362 default:
363 NOTREACHED(); 363 NOTREACHED();
364 } 364 }
365 return emptyString(); 365 return emptyString;
366 } 366 }
367 367
368 void FontFace::setLoadStatus(LoadStatusType status) { 368 void FontFace::setLoadStatus(LoadStatusType status) {
369 m_status = status; 369 m_status = status;
370 ASSERT(m_status != Error || m_error); 370 ASSERT(m_status != Error || m_error);
371 371
372 // When promises are resolved with 'thenables', instead of the object being 372 // When promises are resolved with 'thenables', instead of the object being
373 // returned directly, the 'then' method is executed (the resolver tries to 373 // returned directly, the 'then' method is executed (the resolver tries to
374 // resolve the thenable). This can lead to synchronous script execution, so we 374 // resolve the thenable). This can lead to synchronous script execution, so we
375 // post a task. This does not apply to promise rejection (i.e. a thenable 375 // post a task. This does not apply to promise rejection (i.e. a thenable
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 672
673 bool FontFace::hadBlankText() const { 673 bool FontFace::hadBlankText() const {
674 return m_cssFontFace->hadBlankText(); 674 return m_cssFontFace->hadBlankText();
675 } 675 }
676 676
677 bool FontFace::hasPendingActivity() const { 677 bool FontFace::hasPendingActivity() const {
678 return m_status == Loading && getExecutionContext(); 678 return m_status == Loading && getExecutionContext();
679 } 679 }
680 680
681 } // namespace blink 681 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698