diff options
author | Konstantin Tokarev <annulen@yandex.ru> | 2016-09-28 16:39:37 +0300 |
---|---|---|
committer | Konstantin Tokarev <annulen@yandex.ru> | 2017-02-02 12:31:01 +0000 |
commit | 9daf1655d7e4eaaa6ed5f44055a4b4fd399fd25c (patch) | |
tree | 322337ad0acbc75732f916376ec6d36e7ec0e5bc /Source/WebCore/page/FrameView.cpp | |
parent | 6882a04fb36642862b11efe514251d32070c3d65 (diff) | |
download | qtwebkit-9daf1655d7e4eaaa6ed5f44055a4b4fd399fd25c.tar.gz |
Imported WebKit commit eb954cdcf58f9b915b2fcb6f8e4cb3a60650a4f3
Change-Id: I8dda875c38075d43b76fe3a21acb0ffa102bb82d
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Diffstat (limited to 'Source/WebCore/page/FrameView.cpp')
-rw-r--r-- | Source/WebCore/page/FrameView.cpp | 10 |
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; } |