summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/page/FrameView.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/page/FrameView.cpp')
-rw-r--r--Source/WebCore/page/FrameView.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/WebCore/page/FrameView.cpp b/Source/WebCore/page/FrameView.cpp
index e1dd28906..4bae77613 100644
--- a/Source/WebCore/page/FrameView.cpp
+++ b/Source/WebCore/page/FrameView.cpp
@@ -2649,7 +2649,9 @@ void FrameView::scheduleRelayoutOfSubtree(RenderElement& newRelayoutRoot)
ASSERT(!renderView.documentBeingDestroyed());
ASSERT(frame().view() == this);
- if (renderView.needsLayout()) {
+ // When m_layoutRoot is already set, ignore the renderView's needsLayout bit
+ // since we need to resolve the conflict between the m_layoutRoot and newRelayoutRoot layouts.
+ if (renderView.needsLayout() && !m_layoutRoot) {
m_layoutRoot = &newRelayoutRoot;
convertSubtreeLayoutToFullLayout();
return;
@@ -2657,7 +2659,7 @@ void FrameView::scheduleRelayoutOfSubtree(RenderElement& newRelayoutRoot)
if (!layoutPending() && m_layoutSchedulingEnabled) {
std::chrono::milliseconds delay = renderView.document().minimumLayoutDelay();
- ASSERT(!newRelayoutRoot.container() || !newRelayoutRoot.container()->needsLayout());
+ ASSERT(!newRelayoutRoot.container() || is<RenderView>(newRelayoutRoot.container()) || !newRelayoutRoot.container()->needsLayout());
m_layoutRoot = &newRelayoutRoot;
InspectorInstrumentation::didInvalidateLayout(frame());
m_delayedLayout = delay.count();
@@ -2678,7 +2680,7 @@ void FrameView::scheduleRelayoutOfSubtree(RenderElement& newRelayoutRoot)
if (isObjectAncestorContainerOf(m_layoutRoot, &newRelayoutRoot)) {
// Keep the current root.
newRelayoutRoot.markContainingBlocksForLayout(ScheduleRelayout::No, m_layoutRoot);
- ASSERT(!m_layoutRoot->container() || !m_layoutRoot->container()->needsLayout());
+ ASSERT(!m_layoutRoot->container() || is<RenderView>(m_layoutRoot->container()) || !m_layoutRoot->container()->needsLayout());
return;
}
@@ -2686,7 +2688,7 @@ void FrameView::scheduleRelayoutOfSubtree(RenderElement& newRelayoutRoot)
// Re-root at newRelayoutRoot.
m_layoutRoot->markContainingBlocksForLayout(ScheduleRelayout::No, &newRelayoutRoot);
m_layoutRoot = &newRelayoutRoot;
- ASSERT(!m_layoutRoot->container() || !m_layoutRoot->container()->needsLayout());
+ ASSERT(!m_layoutRoot->container() || is<RenderView>(m_layoutRoot->container()) || !m_layoutRoot->container()->needsLayout());
InspectorInstrumentation::didInvalidateLayout(frame());
return;
}