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

Unified Diff: third_party/WebKit/Source/core/dom/StyleEngine.cpp

Issue 2624893003: Move the FontFaceCache stored in CSSFontSelector to be stored in Document. (Closed)
Patch Set: Add a helper function 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/dom/StyleEngine.cpp
diff --git a/third_party/WebKit/Source/core/dom/StyleEngine.cpp b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
index 57e5ed09d1b8f3abbdbbb351f6b2041c7cee00b9..b78ecc49cb75282df78d7c58ffbc5535bad96fa5 100644
--- a/third_party/WebKit/Source/core/dom/StyleEngine.cpp
+++ b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
@@ -456,7 +456,7 @@ void StyleEngine::didDetach() {
void StyleEngine::clearFontCache() {
if (m_fontSelector)
- m_fontSelector->fontFaceCache()->clearCSSConnected();
+ m_document->fontFaceCache()->clearCSSConnected();
if (m_resolver)
m_resolver->invalidateMatchedPropertiesCache();
}
@@ -480,7 +480,7 @@ void StyleEngine::removeFontFaceRules(
if (!m_fontSelector)
return;
- FontFaceCache* cache = m_fontSelector->fontFaceCache();
+ FontFaceCache* cache = m_document->fontFaceCache();
for (const auto& rule : fontFaceRules)
cache->remove(rule);
if (m_resolver)

Powered by Google App Engine
This is Rietveld 408576698