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

Unified Diff: third_party/WebKit/Source/core/css/CSSStyleSheet.cpp

Issue 2546393002: Make setNeedsActiveStyleUpdate mark treescope dirty only. (Closed)
Patch Set: Rebased Created 4 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 | « no previous file | third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/CSSStyleSheet.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSStyleSheet.cpp b/third_party/WebKit/Source/core/css/CSSStyleSheet.cpp
index ea4afe751587a5f1edde4118522c55f90b56c027..1051ee1a1846066553fb5a60c2351866bca701f6 100644
--- a/third_party/WebKit/Source/core/css/CSSStyleSheet.cpp
+++ b/third_party/WebKit/Source/core/css/CSSStyleSheet.cpp
@@ -166,13 +166,18 @@ void CSSStyleSheet::didMutate(StyleSheetUpdateType updateType) {
Document* owner = ownerDocument();
if (!owner)
return;
+ if (ownerNode() && ownerNode()->isConnected())
+ owner->styleEngine().setNeedsActiveStyleUpdate(ownerNode()->treeScope());
+
+ // TODO(rune@opera.com): resolverChanged() can be removed once stylesheet
+ // updates are async. https://crbug.com/567021
// Need FullStyleUpdate when insertRule or deleteRule,
// because StyleSheetCollection::analyzeStyleSheetChange cannot detect partial
// rule update.
StyleResolverUpdateMode updateMode =
updateType != PartialRuleUpdate ? AnalyzedStyleUpdate : FullStyleUpdate;
- owner->styleEngine().setNeedsActiveStyleUpdate(this, updateMode);
+ owner->styleEngine().resolverChanged(updateMode);
}
void CSSStyleSheet::reattachChildRuleCSSOMWrappers() {
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/ProcessingInstruction.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698