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

Unified Diff: third_party/WebKit/Source/core/css/CSSFontFace.cpp

Issue 1429713004: Implement CSS font-display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: failure does not mean loaded Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/css/CSSFontFace.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSFontFace.cpp b/third_party/WebKit/Source/core/css/CSSFontFace.cpp
index 838fb9935e9f3699dc80e6d7c990dacf32c9ad8f..41e7f8d6f6ec7a0be82911bd0c0a9ed5f246f2b8 100644
--- a/third_party/WebKit/Source/core/css/CSSFontFace.cpp
+++ b/third_party/WebKit/Source/core/css/CSSFontFace.cpp
@@ -63,6 +63,9 @@ void CSSFontFace::fontLoaded(RemoteFontFaceSource* source)
if (loadStatus() == FontFace::Loading) {
if (source->isValid()) {
setLoadStatus(FontFace::Loaded);
+ } else if (source->displayPeriod() == RemoteFontFaceSource::FailurePeriod) {
+ m_sources.clear();
+ setLoadStatus(FontFace::Error);
} else {
m_sources.removeFirst();
load();
@@ -70,15 +73,15 @@ void CSSFontFace::fontLoaded(RemoteFontFaceSource* source)
}
if (m_segmentedFontFace)
- m_segmentedFontFace->fontLoaded(this);
+ m_segmentedFontFace->fontFaceInvalidated();
}
-void CSSFontFace::fontLoadWaitLimitExceeded(RemoteFontFaceSource* source)
+void CSSFontFace::didBecomeVisibleFallback(RemoteFontFaceSource* source)
{
if (!isValid() || source != m_sources.first())
return;
if (m_segmentedFontFace)
- m_segmentedFontFace->fontLoadWaitLimitExceeded(this);
+ m_segmentedFontFace->fontFaceInvalidated();
}
PassRefPtr<SimpleFontData> CSSFontFace::getFontData(const FontDescription& fontDescription)
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSFontFace.h ('k') | third_party/WebKit/Source/core/css/CSSProperties.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698