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

Unified Diff: Source/core/css/FontLoader.cpp

Issue 321403003: Notify font loads via FontLoader (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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/core/css/FontLoader.h ('k') | Source/core/css/RemoteFontFaceSource.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/FontLoader.cpp
diff --git a/Source/core/css/FontLoader.cpp b/Source/core/css/FontLoader.cpp
index 20528ea4443a5f05c6043108a7ef98456a4b6226..189c37cf93c37d6fbc89ef659c8e25ff6ec25444 100644
--- a/Source/core/css/FontLoader.cpp
+++ b/Source/core/css/FontLoader.cpp
@@ -5,13 +5,15 @@
#include "config.h"
#include "core/css/FontLoader.h"
+#include "core/css/CSSFontSelector.h"
#include "core/fetch/FontResource.h"
#include "core/fetch/ResourceFetcher.h"
namespace WebCore {
-FontLoader::FontLoader(ResourceFetcher* resourceFetcher)
+FontLoader::FontLoader(CSSFontSelector* fontSelector, ResourceFetcher* resourceFetcher)
: m_beginLoadingTimer(this, &FontLoader::beginLoadTimerFired)
+ , m_fontSelector(fontSelector)
, m_resourceFetcher(resourceFetcher)
{
}
@@ -63,8 +65,14 @@ void FontLoader::loadPendingFonts()
// that were just loaded.
}
+void FontLoader::fontFaceInvalidated()
+{
+ if (m_fontSelector)
+ m_fontSelector->fontFaceInvalidated();
+}
+
#if !ENABLE(OILPAN)
-void FontLoader::clearResourceFetcher()
+void FontLoader::clearResourceFetcherAndFontSelector()
{
if (!m_resourceFetcher) {
ASSERT(m_fontsToBeginLoading.isEmpty());
@@ -74,12 +82,14 @@ void FontLoader::clearResourceFetcher()
m_beginLoadingTimer.stop();
m_fontsToBeginLoading.clear();
m_resourceFetcher = nullptr;
+ m_fontSelector = nullptr;
}
#endif
void FontLoader::trace(Visitor* visitor)
{
visitor->trace(m_resourceFetcher);
+ visitor->trace(m_fontSelector);
}
} // namespace WebCore
« no previous file with comments | « Source/core/css/FontLoader.h ('k') | Source/core/css/RemoteFontFaceSource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698