Index: Source/core/dom/Document.cpp |
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp |
index 6a667cfd1a5a36dd378835223417c4b711400472..d04d081bd0a333ae5e0f42b780c3d6e1690a54c7 100644 |
--- a/Source/core/dom/Document.cpp |
+++ b/Source/core/dom/Document.cpp |
@@ -1767,8 +1767,10 @@ void Document::recalcStyle(StyleRecalcChange change) |
m_inStyleRecalc = false; |
// Pseudo element removal and similar may only work with these flags still set. Reset them after the style recalc. |
- if (m_styleResolver) |
+ if (m_styleResolver) { |
m_styleSheetCollections->resetCSSFeatureFlags(m_styleResolver->ruleFeatureSet()); |
+ m_styleResolver->clearStyleSharingList(); |
+ } |
if (frameView) { |
frameView->resumeScheduledEvents(); |
@@ -2054,6 +2056,8 @@ void Document::detach(const AttachContext& context) |
unscheduleStyleRecalc(); |
+ clearStyleResolver(); |
+ |
if (render) |
render->destroy(); |