Chromium Code Reviews| Index: Source/core/css/FontLoader.cpp |
| diff --git a/Source/core/css/FontLoader.cpp b/Source/core/css/FontLoader.cpp |
| index 20528ea4443a5f05c6043108a7ef98456a4b6226..59ed66226ade0baa88a994ffe90b0177f79d67e4 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,6 +65,12 @@ void FontLoader::loadPendingFonts() |
| // that were just loaded. |
| } |
| +void FontLoader::fontFaceInvalidated() |
| +{ |
| + if (m_fontSelector) |
| + m_fontSelector->fontFaceInvalidated(); |
| +} |
| + |
| #if !ENABLE(OILPAN) |
| void FontLoader::clearResourceFetcher() |
|
bashi
2014/06/18 07:27:45
nit: we might want to rename this method.
Kunihiko Sakamoto
2014/06/18 08:21:25
Renamed to clearResourceFetcherAndFontSelector (co
|
| { |
| @@ -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 |