Index: Source/core/css/invalidation/StyleInvalidator.cpp |
diff --git a/Source/core/css/invalidation/StyleInvalidator.cpp b/Source/core/css/invalidation/StyleInvalidator.cpp |
index 8d506a5a375a70a155f346b035b20d8b69c84dbb..b3541844a4906bcfa133fb53971cc103db94d3dc 100644 |
--- a/Source/core/css/invalidation/StyleInvalidator.cpp |
+++ b/Source/core/css/invalidation/StyleInvalidator.cpp |
@@ -83,6 +83,8 @@ void StyleInvalidator::RecursionData::pushInvalidationSet(const DescendantInvali |
ASSERT(!m_wholeSubtreeInvalid); |
if (invalidationSet.treeBoundaryCrossing()) |
m_treeBoundaryCrossing = true; |
+ if (invalidationSet.insertionPointCrossing()) |
+ m_insertionPointCrossing = true; |
if (invalidationSet.wholeSubtreeInvalid()) { |
m_wholeSubtreeInvalid = true; |
return; |
@@ -100,6 +102,9 @@ ALWAYS_INLINE bool StyleInvalidator::RecursionData::matchesCurrentInvalidationSe |
return true; |
} |
+ if (m_insertionPointCrossing && element.isInsertionPoint()) |
+ return true; |
+ |
for (const auto& invalidationSet : m_invalidationSets) { |
if (invalidationSet->invalidatesElement(element)) |
return true; |
@@ -173,6 +178,9 @@ bool StyleInvalidator::invalidate(Element& element, StyleInvalidator::RecursionD |
} |
} |
+ if (recursionData.insertionPointCrossing() && element.isInsertionPoint()) |
+ element.setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::StyleInvalidator)); |
+ |
element.clearChildNeedsStyleInvalidation(); |
element.clearNeedsStyleInvalidation(); |