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

Unified Diff: Source/core/dom/DocumentStyleSheetCollection.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/dom/DocumentStyleSheetCollection.cpp
diff --git a/Source/core/dom/DocumentStyleSheetCollection.cpp b/Source/core/dom/DocumentStyleSheetCollection.cpp
index 95d2c79cb2c7a7a657e51db889583fbaf088d254..179e847832a6a6afb958ab734ee52f41ae7f9c11 100644
--- a/Source/core/dom/DocumentStyleSheetCollection.cpp
+++ b/Source/core/dom/DocumentStyleSheetCollection.cpp
@@ -158,7 +158,8 @@ bool DocumentStyleSheetCollection::updateActiveStyleSheets(StyleEngine* collecti
StyleResolverUpdateType styleResolverUpdateType;
bool requiresFullStyleRecalc;
- analyzeStyleSheetChange(updateMode, activeAuthorStyleSheets(), activeCSSStyleSheets, styleResolverUpdateType, requiresFullStyleRecalc);
+ bool requiresResetFontSelector;
+ analyzeStyleSheetChange(updateMode, activeAuthorStyleSheets(), activeCSSStyleSheets, styleResolverUpdateType, requiresFullStyleRecalc, requiresResetFontSelector);
if (styleResolverUpdateType == Reconstruct) {
document()->clearStyleResolver();
@@ -170,6 +171,8 @@ bool DocumentStyleSheetCollection::updateActiveStyleSheets(StyleEngine* collecti
styleResolver->setBuildScopedStyleTreeInDocumentOrder(false);
if (styleResolverUpdateType == Reset) {
resetAllRuleSetsInTreeScope(styleResolver);
+ if (requiresResetFontSelector)
+ styleResolver->resetFontSelector();
styleResolver->appendAuthorStyleSheets(0, activeCSSStyleSheets);
} else {
ASSERT(styleResolverUpdateType == Additive);

Powered by Google App Engine
This is Rietveld 408576698