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

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

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/FontFace.cpp
diff --git a/third_party/WebKit/Source/core/css/FontFace.cpp b/third_party/WebKit/Source/core/css/FontFace.cpp
index a7bb5391c6285bcfc4676f7fc424cf2899b54397..0e5afafac9369b4dff2c4776b850b93e46e4e057 100644
--- a/third_party/WebKit/Source/core/css/FontFace.cpp
+++ b/third_party/WebKit/Source/core/css/FontFace.cpp
@@ -615,9 +615,10 @@ void FontFace::initCSSFontFace(const unsigned char* data, size_t size) {
RefPtr<SharedBuffer> buffer = SharedBuffer::create(data, size);
BinaryDataFontFaceSource* source =
new BinaryDataFontFaceSource(buffer.get(), m_otsParseMessage);
- if (source->isValid())
- setLoadStatus(Loaded);
- else
+ if (source->isValid()) {
+ m_cssFontFace->setLoadStatus(Loading);
+ m_cssFontFace->setLoadStatus(Loaded);
+ } else
setError(
DOMException::create(SyntaxError, "Invalid font data in ArrayBuffer."));
m_cssFontFace->addSource(source);

Powered by Google App Engine
This is Rietveld 408576698