Index: Source/core/css/CSSStyleSheet.cpp |
diff --git a/Source/core/css/CSSStyleSheet.cpp b/Source/core/css/CSSStyleSheet.cpp |
index 05e3b212dc3c2a58cbd54bad508a09cee7a4b1b2..9737560190271c7ebc8e6aa57ef768b288dd7777 100644 |
--- a/Source/core/css/CSSStyleSheet.cpp |
+++ b/Source/core/css/CSSStyleSheet.cpp |
@@ -149,15 +149,19 @@ void CSSStyleSheet::didMutateRules() |
ASSERT(m_contents->isMutable()); |
ASSERT(m_contents->hasOneClient()); |
- didMutate(); |
+ didMutate(PartialRuleUpdate); |
} |
-void CSSStyleSheet::didMutate() |
+void CSSStyleSheet::didMutate(StyleSheetUpdateType updateType) |
{ |
Document* owner = ownerDocument(); |
if (!owner) |
return; |
- owner->modifiedStyleSheet(this); |
+ |
+ // Need FullStyleUpdate when insertRule or deleteRule, |
+ // because StyleSheetCollection::analyzeStyleSheetChange cannot detect partial rule update. |
+ StyleResolverUpdateMode updateMode = updateType != PartialRuleUpdate ? AnalyzedStyleUpdate : FullStyleUpdate; |
+ owner->modifiedStyleSheet(this, RecalcStyleDeferred, updateMode); |
} |
void CSSStyleSheet::reattachChildRuleCSSOMWrappers() |