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

Unified Diff: Source/platform/fonts/SegmentedFontData.cpp

Issue 171823002: Make text visible when font loading takes longer than 3 seconds (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/fonts/SegmentedFontData.h ('k') | Source/platform/fonts/SimpleFontData.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/SegmentedFontData.cpp
diff --git a/Source/platform/fonts/SegmentedFontData.cpp b/Source/platform/fonts/SegmentedFontData.cpp
index 629a0b2d3c64afee67e85d267a9348df03d21b53..c81e5c80b9d7af4d549575c8176f62624137563a 100644
--- a/Source/platform/fonts/SegmentedFontData.cpp
+++ b/Source/platform/fonts/SegmentedFontData.cpp
@@ -73,15 +73,15 @@ bool SegmentedFontData::isLoading() const
return false;
}
-// Returns true only if all of the sub fonts are loadingFallback.
+// Returns true if any of the sub fonts are loadingFallback.
bool SegmentedFontData::isLoadingFallback() const
{
Vector<FontDataRange>::const_iterator end = m_ranges.end();
for (Vector<FontDataRange>::const_iterator it = m_ranges.begin(); it != end; ++it) {
- if (!it->fontData()->isLoadingFallback())
- return false;
+ if (it->fontData()->isLoadingFallback())
+ return true;
}
- return true;
+ return false;
}
bool SegmentedFontData::isSegmented() const
@@ -89,6 +89,16 @@ bool SegmentedFontData::isSegmented() const
return true;
}
+bool SegmentedFontData::shouldSkipDrawing() const
+{
+ Vector<FontDataRange>::const_iterator end = m_ranges.end();
+ for (Vector<FontDataRange>::const_iterator it = m_ranges.begin(); it != end; ++it) {
+ if (it->fontData()->shouldSkipDrawing())
+ return true;
+ }
+ return false;
+}
+
#ifndef NDEBUG
String SegmentedFontData::description() const
{
« no previous file with comments | « Source/platform/fonts/SegmentedFontData.h ('k') | Source/platform/fonts/SimpleFontData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698