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

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

Issue 87503003: Moving fontSelector from StyleResolver to StyleEngine. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Reverted hasAnyFontFaceRule 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/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);

Powered by Google App Engine
This is Rietveld 408576698