| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |