| 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 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 | 579 |
| 580 for (int i = 0; i < srcLength; i++) { | 580 for (int i = 0; i < srcLength; i++) { |
| 581 // An item in the list either specifies a string (local font name) or a URL | 581 // An item in the list either specifies a string (local font name) or a URL |
| 582 // (remote font to download). | 582 // (remote font to download). |
| 583 const CSSFontFaceSrcValue& item = toCSSFontFaceSrcValue(srcList->item(i)); | 583 const CSSFontFaceSrcValue& item = toCSSFontFaceSrcValue(srcList->item(i)); |
| 584 CSSFontFaceSource* source = nullptr; | 584 CSSFontFaceSource* source = nullptr; |
| 585 | 585 |
| 586 if (!item.isLocal()) { | 586 if (!item.isLocal()) { |
| 587 const Settings* settings = document ? document->settings() : nullptr; | 587 const Settings* settings = document ? document->settings() : nullptr; |
| 588 bool allowDownloading = | 588 bool allowDownloading = |
| 589 settings && settings->downloadableBinaryFontsEnabled(); | 589 settings && settings->GetDownloadableBinaryFontsEnabled(); |
| 590 if (allowDownloading && item.isSupportedFormat() && document) { | 590 if (allowDownloading && item.isSupportedFormat() && document) { |
| 591 FontResource* fetched = item.fetch(document); | 591 FontResource* fetched = item.fetch(document); |
| 592 if (fetched) { | 592 if (fetched) { |
| 593 CSSFontSelector* fontSelector = | 593 CSSFontSelector* fontSelector = |
| 594 document->styleEngine().fontSelector(); | 594 document->styleEngine().fontSelector(); |
| 595 source = new RemoteFontFaceSource( | 595 source = new RemoteFontFaceSource( |
| 596 fetched, fontSelector, CSSValueToFontDisplay(m_display.get())); | 596 fetched, fontSelector, CSSValueToFontDisplay(m_display.get())); |
| 597 } | 597 } |
| 598 } | 598 } |
| 599 } else { | 599 } else { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 644 | 644 |
| 645 bool FontFace::hadBlankText() const { | 645 bool FontFace::hadBlankText() const { |
| 646 return m_cssFontFace->hadBlankText(); | 646 return m_cssFontFace->hadBlankText(); |
| 647 } | 647 } |
| 648 | 648 |
| 649 bool FontFace::hasPendingActivity() const { | 649 bool FontFace::hasPendingActivity() const { |
| 650 return m_status == Loading && getExecutionContext(); | 650 return m_status == Loading && getExecutionContext(); |
| 651 } | 651 } |
| 652 | 652 |
| 653 } // namespace blink | 653 } // namespace blink |
| OLD | NEW |