Index: Source/core/dom/DocumentStyleSheetCollection.cpp |
diff --git a/Source/core/dom/DocumentStyleSheetCollection.cpp b/Source/core/dom/DocumentStyleSheetCollection.cpp |
index 87a308caa7766e66ea0fdd1b73a2de36a0d256eb..be92fe1a6762d84e040da2d5d70304289426c687 100644 |
--- a/Source/core/dom/DocumentStyleSheetCollection.cpp |
+++ b/Source/core/dom/DocumentStyleSheetCollection.cpp |
@@ -158,6 +158,7 @@ bool DocumentStyleSheetCollection::updateActiveStyleSheets(StyleEngine* engine, |
if (change.styleResolverUpdateType == Reconstruct) { |
engine->clearResolver(); |
+ engine->resetFontSelector(); |
} else if (StyleResolver* styleResolver = engine->resolverIfExists()) { |
// FIXME: We might have already had styles in child treescope. In this case, we cannot use buildScopedStyleTreeInDocumentOrder. |
// Need to change "false" to some valid condition. |
@@ -166,12 +167,14 @@ bool DocumentStyleSheetCollection::updateActiveStyleSheets(StyleEngine* engine, |
ASSERT(change.styleResolverUpdateType == Reset || change.styleResolverUpdateType == ResetStyleResolverAndFontSelector); |
resetAllRuleSetsInTreeScope(styleResolver); |
if (change.styleResolverUpdateType == ResetStyleResolverAndFontSelector) |
- styleResolver->resetFontSelector(); |
+ engine->resetFontSelector(); |
styleResolver->removePendingAuthorStyleSheets(m_activeAuthorStyleSheets); |
styleResolver->lazyAppendAuthorStyleSheets(0, collection.activeAuthorStyleSheets()); |
} else { |
styleResolver->lazyAppendAuthorStyleSheets(m_activeAuthorStyleSheets.size(), collection.activeAuthorStyleSheets()); |
} |
+ } else if (change.styleResolverUpdateType == ResetStyleResolverAndFontSelector) { |
+ engine->resetFontSelector(); |
} |
m_scopingNodesForStyleScoped.didRemoveScopingNodes(); |
collection.swap(*this); |