Index: Source/core/dom/Document.cpp |
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp |
index 02b5ef780e77abab724e690ba8da10d86669dae1..985a67b013956848aa1c5624613260bbdb9f81bf 100644 |
--- a/Source/core/dom/Document.cpp |
+++ b/Source/core/dom/Document.cpp |
@@ -1757,8 +1757,10 @@ void Document::recalcStyle(StyleChange 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(); |
@@ -2006,6 +2008,8 @@ void Document::detach(const AttachContext& context) |
unscheduleStyleRecalc(); |
+ clearStyleResolver(); |
+ |
if (render) |
render->destroy(); |