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

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

Issue 2610593002: Make CSSFontFace::setLoadStatus post a task (Closed)
Patch Set: Change loading logic for fonts from array buffers Created 3 years, 11 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
Index: third_party/WebKit/Source/core/css/CSSFontFace.h
diff --git a/third_party/WebKit/Source/core/css/CSSFontFace.h b/third_party/WebKit/Source/core/css/CSSFontFace.h
index 8d217faa73d6c46b1b4d6412aaa6cb7890038af5..676f3f4920155aa161620b2f46473a5a1bc7a300 100644
--- a/third_party/WebKit/Source/core/css/CSSFontFace.h
+++ b/third_party/WebKit/Source/core/css/CSSFontFace.h
@@ -51,7 +51,8 @@ class CORE_EXPORT CSSFontFace final
CSSFontFace(FontFace* fontFace, Vector<UnicodeRange>& ranges)
: m_ranges(adoptRef(new UnicodeRangeSet(ranges))),
m_segmentedFontFace(nullptr),
- m_fontFace(fontFace) {
+ m_fontFace(fontFace),
+ m_loadStatus(FontFace::Unloaded) {
ASSERT(m_fontFace);
}
@@ -73,25 +74,25 @@ class CORE_EXPORT CSSFontFace final
PassRefPtr<SimpleFontData> getFontData(const FontDescription&);
- FontFace::LoadStatusType loadStatus() const {
- return m_fontFace->loadStatus();
- }
+ FontFace::LoadStatusType loadStatus() const { return m_loadStatus; }
bool maybeLoadFont(const FontDescription&, const String&);
bool maybeLoadFont(const FontDescription&, const FontDataForRangeSet&);
void load();
void load(const FontDescription&);
+ void setLoadStatus(FontFace::LoadStatusType);
bool hadBlankText() { return isValid() && m_sources.first()->hadBlankText(); }
DECLARE_TRACE();
private:
- void setLoadStatus(FontFace::LoadStatusType);
+ void setLoadStatusHelper(FontFace::LoadStatusType);
RefPtr<UnicodeRangeSet> m_ranges;
Member<CSSSegmentedFontFace> m_segmentedFontFace;
HeapDeque<Member<CSSFontFaceSource>> m_sources;
Member<FontFace> m_fontFace;
+ FontFace::LoadStatusType m_loadStatus;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698