| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/css/RemoteFontFaceSource.h" | 5 #include "core/css/RemoteFontFaceSource.h" |
| 6 | 6 |
| 7 #include "core/css/CSSCustomFontData.h" | 7 #include "core/css/CSSCustomFontData.h" |
| 8 #include "core/css/CSSFontFace.h" | 8 #include "core/css/CSSFontFace.h" |
| 9 #include "core/css/CSSFontSelector.h" | 9 #include "core/css/CSSFontSelector.h" |
| 10 #include "core/dom/Document.h" | 10 #include "core/dom/Document.h" |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 "Failed to decode downloaded font: " + m_font->url().elidedString())); | 127 "Failed to decode downloaded font: " + m_font->url().elidedString())); |
| 128 if (m_font->otsParsingMessage().length() > 1) | 128 if (m_font->otsParsingMessage().length() > 1) |
| 129 m_fontSelector->document()->addConsoleMessage(ConsoleMessage::create( | 129 m_fontSelector->document()->addConsoleMessage(ConsoleMessage::create( |
| 130 OtherMessageSource, WarningMessageLevel, | 130 OtherMessageSource, WarningMessageLevel, |
| 131 "OTS parsing error: " + m_font->otsParsingMessage())); | 131 "OTS parsing error: " + m_font->otsParsingMessage())); |
| 132 } | 132 } |
| 133 | 133 |
| 134 pruneTable(); | 134 pruneTable(); |
| 135 if (m_face) { | 135 if (m_face) { |
| 136 m_fontSelector->fontFaceInvalidated(); | 136 m_fontSelector->fontFaceInvalidated(); |
| 137 m_face->fontLoaded(this); | 137 m_face->fontLoaded(this, m_fontSelector->document()); |
| 138 } | 138 } |
| 139 } | 139 } |
| 140 | 140 |
| 141 void RemoteFontFaceSource::fontLoadShortLimitExceeded(FontResource*) { | 141 void RemoteFontFaceSource::fontLoadShortLimitExceeded(FontResource*) { |
| 142 if (m_font->isLoaded()) | 142 if (m_font->isLoaded()) |
| 143 return; | 143 return; |
| 144 | 144 |
| 145 if (m_display == FontDisplayFallback) | 145 if (m_display == FontDisplayFallback) |
| 146 switchToSwapPeriod(); | 146 switchToSwapPeriod(); |
| 147 else if (m_display == FontDisplayOptional) | 147 else if (m_display == FontDisplayOptional) |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 return Miss; | 466 return Miss; |
| 467 case FromUnknown: | 467 case FromUnknown: |
| 468 // Fall through. | 468 // Fall through. |
| 469 default: | 469 default: |
| 470 NOTREACHED(); | 470 NOTREACHED(); |
| 471 } | 471 } |
| 472 return Miss; | 472 return Miss; |
| 473 } | 473 } |
| 474 | 474 |
| 475 } // namespace blink | 475 } // namespace blink |
| OLD | NEW |