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

Unified Diff: Source/core/css/resolver/StyleResolver.cpp

Issue 66483002: fontSelector should be reset when removing stylesheets which has @font-face rule. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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/css/resolver/StyleResolver.cpp
diff --git a/Source/core/css/resolver/StyleResolver.cpp b/Source/core/css/resolver/StyleResolver.cpp
index 907871119681fae46034bb0897fc84f90d9201a9..4f561da624b76710b37673f76e7a720c601bec63 100644
--- a/Source/core/css/resolver/StyleResolver.cpp
+++ b/Source/core/css/resolver/StyleResolver.cpp
@@ -222,6 +222,17 @@ void StyleResolver::finishAppendAuthorStyleSheets()
collectViewportRules();
}
+void StyleResolver::resetFontSelector()
+{
+ ASSERT(m_fontSelector);
+ m_fontSelector->unregisterForInvalidationCallbacks(this);
+ m_fontSelector->clearDocument();
+ invalidateMatchedPropertiesCache();
+
+ m_fontSelector = CSSFontSelector::create(&m_document);
+ m_fontSelector->registerForInvalidationCallbacks(this);
+}
+
void StyleResolver::resetAuthorStyle(const ContainerNode* scopingNode)
{
// FIXME: When chanking scoped attribute, scopingNode's hasScopedHTMLStyleChild has been already modified.

Powered by Google App Engine
This is Rietveld 408576698