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

Unified Diff: sky/engine/core/dom/ShadowTreeStyleSheetCollection.cpp

Issue 774953002: Always Reconstruct when stylesheets change. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 | « sky/engine/core/dom/ShadowTreeStyleSheetCollection.h ('k') | sky/engine/core/dom/StyleElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/dom/ShadowTreeStyleSheetCollection.cpp
diff --git a/sky/engine/core/dom/ShadowTreeStyleSheetCollection.cpp b/sky/engine/core/dom/ShadowTreeStyleSheetCollection.cpp
index e220f4c409a70dcbf312f4c3752d51905b6ccfc0..0936baaa2857fe5fbcda198facc9dd0de5c4909b 100644
--- a/sky/engine/core/dom/ShadowTreeStyleSheetCollection.cpp
+++ b/sky/engine/core/dom/ShadowTreeStyleSheetCollection.cpp
@@ -58,27 +58,20 @@ void ShadowTreeStyleSheetCollection::collectStyleSheets(StyleEngine* engine, Sty
}
}
-void ShadowTreeStyleSheetCollection::updateActiveStyleSheets(StyleEngine* engine, StyleResolverUpdateMode updateMode)
+void ShadowTreeStyleSheetCollection::updateActiveStyleSheets(StyleEngine* engine)
{
StyleSheetCollection collection;
collectStyleSheets(engine, collection);
- StyleSheetChange change;
- analyzeStyleSheetChange(updateMode, collection, change);
-
if (StyleResolver* styleResolver = engine->resolver()) {
- 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.
- styleResolver->resetAuthorStyle(treeScope());
- styleResolver->removePendingAuthorStyleSheets(m_activeAuthorStyleSheets);
- styleResolver->lazyAppendAuthorStyleSheets(0, collection.activeAuthorStyleSheets());
- } else {
- styleResolver->lazyAppendAuthorStyleSheets(m_activeAuthorStyleSheets.size(), collection.activeAuthorStyleSheets());
- }
+ // 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.
+ styleResolver->resetAuthorStyle(treeScope());
+ styleResolver->removePendingAuthorStyleSheets(m_activeAuthorStyleSheets);
+ styleResolver->lazyAppendAuthorStyleSheets(0, collection.activeAuthorStyleSheets());
}
- if (change.requiresFullStyleRecalc)
- toShadowRoot(treeScope().rootNode()).host()->setNeedsStyleRecalc(SubtreeStyleChange);
+
+ toShadowRoot(treeScope().rootNode()).host()->setNeedsStyleRecalc(SubtreeStyleChange);
collection.swap(*this);
updateUsesRemUnits();
« no previous file with comments | « sky/engine/core/dom/ShadowTreeStyleSheetCollection.h ('k') | sky/engine/core/dom/StyleElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698