Index: Source/core/dom/Element.cpp |
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp |
index 1997e9d06bbfe6c070e576ec7ed8cd2d48d31677..c19f22870d364f717767a9dbcc67b0d3911e9c03 100644 |
--- a/Source/core/dom/Element.cpp |
+++ b/Source/core/dom/Element.cpp |
@@ -2801,7 +2801,7 @@ void Element::willModifyAttribute(const QualifiedName& name, const AtomicString& |
} |
if (oldValue != newValue) { |
- if (inActiveDocument()) |
+ if (inActiveDocument() && document().styleResolver() && styleChangeType() < SubtreeStyleChange) |
document().ensureStyleResolver().ensureUpdatedRuleFeatureSet().scheduleStyleInvalidationForAttributeChange(name, *this); |
if (isUpgradedCustomElement()) |