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

Unified Diff: Source/core/dom/ShadowTreeStyleSheetCollection.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: Patch for landing 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
« no previous file with comments | « Source/core/dom/DocumentStyleSheetCollection.cpp ('k') | Source/core/dom/StyleSheetCollection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ShadowTreeStyleSheetCollection.cpp
diff --git a/Source/core/dom/ShadowTreeStyleSheetCollection.cpp b/Source/core/dom/ShadowTreeStyleSheetCollection.cpp
index 2fe7c945efa7d2fbe0acc54d8f5573210a34a258..fb883525c338cbca21bb87bd1b9b56b7520121ba 100644
--- a/Source/core/dom/ShadowTreeStyleSheetCollection.cpp
+++ b/Source/core/dom/ShadowTreeStyleSheetCollection.cpp
@@ -97,26 +97,23 @@ bool ShadowTreeStyleSheetCollection::updateActiveStyleSheets(StyleEngine* collec
Vector<RefPtr<CSSStyleSheet> > activeCSSStyleSheets;
collectStyleSheets(collections, styleSheets, activeCSSStyleSheets);
- bool requiresFullStyleRecalc = true;
-
- StyleResolverUpdateType styleResolverUpdateType;
- analyzeStyleSheetChange(updateMode, activeAuthorStyleSheets(), activeCSSStyleSheets, styleResolverUpdateType, requiresFullStyleRecalc);
+ StyleSheetChange change;
+ analyzeStyleSheetChange(updateMode, activeAuthorStyleSheets(), activeCSSStyleSheets, change);
if (StyleResolver* styleResolver = document()->styleResolverIfExists()) {
// 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.
styleResolver->setBuildScopedStyleTreeInDocumentOrder(false);
- if (styleResolverUpdateType == Reset || styleResolverUpdateType == Reconstruct) {
+ if (change.styleResolverUpdateType != Additive) {
// We should not destroy StyleResolver when we find any stylesheet update in a shadow tree.
// In this case, we will reset rulesets created from style elements in the shadow tree.
resetAllRuleSetsInTreeScope(styleResolver);
styleResolver->appendAuthorStyleSheets(0, activeCSSStyleSheets);
} else {
- ASSERT(styleResolverUpdateType == Additive);
styleResolver->appendAuthorStyleSheets(m_activeAuthorStyleSheets.size(), activeCSSStyleSheets);
}
}
- if (requiresFullStyleRecalc)
+ if (change.requiresFullStyleRecalc)
toShadowRoot(m_treeScope.rootNode())->host()->setNeedsStyleRecalc();
m_scopingNodesForStyleScoped.didRemoveScopingNodes();
@@ -124,7 +121,7 @@ bool ShadowTreeStyleSheetCollection::updateActiveStyleSheets(StyleEngine* collec
m_styleSheetsForStyleSheetList.swap(styleSheets);
updateUsesRemUnits();
- return requiresFullStyleRecalc;
+ return change.requiresFullStyleRecalc;
}
}
« no previous file with comments | « Source/core/dom/DocumentStyleSheetCollection.cpp ('k') | Source/core/dom/StyleSheetCollection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698