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

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

Issue 82583005: Use removeFontFace to avoid resetting fontSelector. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added 2 layout tests Created 7 years 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: Source/core/dom/StyleEngine.cpp
diff --git a/Source/core/dom/StyleEngine.cpp b/Source/core/dom/StyleEngine.cpp
index 48d06dd193fe9eb069ce282c67915eb11d683441..84afe041493ae368e54ce1855845c30868871532 100644
--- a/Source/core/dom/StyleEngine.cpp
+++ b/Source/core/dom/StyleEngine.cpp
@@ -572,6 +572,16 @@ void StyleEngine::resetFontSelector()
}
}
+void StyleEngine::removeFontFaceRules(const Vector<const StyleRuleFontFace*>& fontFaceRules)
+{
+ if (!m_fontSelector)
+ return;
+ for (unsigned i = 0; i < fontFaceRules.size(); ++i)
+ m_fontSelector->removeFontFaceRule(fontFaceRules[i]);
+ if (m_resolver)
+ m_resolver->invalidateMatchedPropertiesCache();
+}
+
void StyleEngine::markTreeScopeDirty(TreeScope& scope)
{
if (scope == m_document) {

Powered by Google App Engine
This is Rietveld 408576698