Index: Source/core/rendering/RenderView.cpp |
diff --git a/Source/core/rendering/RenderView.cpp b/Source/core/rendering/RenderView.cpp |
index feeeccb7e38f565502ad9553602c7424ab7411e0..c4b5bde40859b56b11798c98a54fe6b5d9dea358 100644 |
--- a/Source/core/rendering/RenderView.cpp |
+++ b/Source/core/rendering/RenderView.cpp |
@@ -31,11 +31,9 @@ |
#include "core/page/Page.h" |
#include "core/rendering/ColumnInfo.h" |
#include "core/rendering/CompositedLayerMapping.h" |
-#include "core/rendering/FlowThreadController.h" |
#include "core/rendering/GraphicsContextAnnotator.h" |
#include "core/rendering/HitTestResult.h" |
#include "core/rendering/LayoutRectRecorder.h" |
-#include "core/rendering/RenderFlowThread.h" |
#include "core/rendering/RenderGeometryMap.h" |
#include "core/rendering/RenderLayer.h" |
#include "core/rendering/RenderLayerCompositor.h" |
@@ -173,9 +171,6 @@ void RenderView::layoutContent(const LayoutState& state) |
if (m_frameView->partialLayout().isStopping()) |
return; |
- if (hasRenderNamedFlowThreads()) |
- flowThreadController()->layoutRenderNamedFlowThreads(); |
- |
#ifndef NDEBUG |
checkLayoutState(state); |
#endif |
@@ -198,22 +193,8 @@ static RenderBox* enclosingSeamlessRenderer(const Document& doc) |
return ownerElement->renderBox(); |
} |
-void RenderView::addChild(RenderObject* newChild, RenderObject* beforeChild) |
-{ |
- // Seamless iframes are considered part of an enclosing render flow thread from the parent document. This is necessary for them to look |
- // up regions in the parent document during layout. |
- if (newChild && !newChild->isRenderFlowThread()) { |
- RenderBox* seamlessBox = enclosingSeamlessRenderer(document()); |
- if (seamlessBox && seamlessBox->flowThreadContainingBlock()) |
- newChild->setFlowThreadState(seamlessBox->flowThreadState()); |
- } |
- RenderBlock::addChild(newChild, beforeChild); |
-} |
- |
bool RenderView::initializeLayoutState(LayoutState& state) |
{ |
- bool isSeamlessAncestorInFlowThread = false; |
- |
// FIXME: May be better to push a clip and avoid issuing offscreen repaints. |
state.m_clipped = false; |
@@ -239,62 +220,11 @@ bool RenderView::initializeLayoutState(LayoutState& state) |
LayoutSize offsetDelta = seamlessLayoutState->m_pageOffset - iFrameOffset; |
state.m_pageOffset = offsetDelta; |
- |
- // Set the current render flow thread to point to our ancestor. This will allow the seamless document to locate the correct |
- // regions when doing a layout. |
- if (seamlessAncestor->flowThreadContainingBlock()) { |
- flowThreadController()->setCurrentRenderFlowThread(seamlessAncestor->view()->flowThreadController()->currentRenderFlowThread()); |
- isSeamlessAncestorInFlowThread = true; |
- } |
} |
// FIXME: We need to make line grids and exclusions work with seamless iframes as well here. Basically all layout state information needs |
// to propagate here and not just pagination information. |
- return isSeamlessAncestorInFlowThread; |
-} |
- |
-// The algorithm below assumes this is a full layout. In case there are previously computed values for regions, supplemental steps are taken |
-// to ensure the results are the same as those obtained from a full layout (i.e. the auto-height regions from all the flows are marked as needing |
-// layout). |
-// 1. The flows are laid out from the outer flow to the inner flow. This successfully computes the outer non-auto-height regions size so the |
-// inner flows have the necessary information to correctly fragment the content. |
-// 2. The flows are laid out from the inner flow to the outer flow. After an inner flow is laid out it goes into the constrained layout phase |
-// and marks the auto-height regions they need layout. This means the outer flows will relayout if they depend on regions with auto-height regions |
-// belonging to inner flows. This step will correctly set the computedAutoHeight for the auto-height regions. It's possible for non-auto-height |
-// regions to relayout if they depend on auto-height regions. This will invalidate the inner flow threads and mark them as needing layout. |
-// 3. The last step is to do one last layout if there are pathological dependencies between non-auto-height regions and auto-height regions |
-// as detected in the previous step. |
-void RenderView::layoutContentInAutoLogicalHeightRegions(const LayoutState& state) |
-{ |
- if (!m_frameView->partialLayout().isStopping()) { |
- // Disable partial layout for any two-pass layout algorithm. |
- m_frameView->partialLayout().reset(); |
- } |
- |
- // We need to invalidate all the flows with auto-height regions if one such flow needs layout. |
- // If none is found we do a layout a check back again afterwards. |
- if (!flowThreadController()->updateFlowThreadsNeedingLayout()) { |
- // Do a first layout of the content. In some cases more layouts are not needed (e.g. only flows with non-auto-height regions have changed). |
- layoutContent(state); |
- |
- // If we find no named flow needing a two step layout after the first layout, exit early. |
- // Otherwise, initiate the two step layout algorithm and recompute all the flows. |
- if (!flowThreadController()->updateFlowThreadsNeedingTwoStepLayout()) |
- return; |
- } |
- |
- // Layout to recompute all the named flows with auto-height regions. |
- layoutContent(state); |
- |
- // Propagate the computed auto-height values upwards. |
- // Non-auto-height regions may invalidate the flow thread because they depended on auto-height regions, but that's ok. |
- flowThreadController()->updateFlowThreadsIntoConstrainedPhase(); |
- |
- // Do one last layout that should update the auto-height regions found in the main flow |
- // and solve pathological dependencies between regions (e.g. a non-auto-height region depending |
- // on an auto-height one). |
- if (needsLayout()) |
- layoutContent(state); |
+ return false; |
} |
void RenderView::layout() |
@@ -331,15 +261,12 @@ void RenderView::layout() |
return; |
LayoutState state; |
- bool isSeamlessAncestorInFlowThread = initializeLayoutState(state); |
+ initializeLayoutState(state); |
m_pageLogicalHeightChanged = false; |
m_layoutState = &state; |
- if (checkTwoPassLayoutForAutoHeightRegions()) |
- layoutContentInAutoLogicalHeightRegions(state); |
- else |
- layoutContent(state); |
+ layoutContent(state); |
if (m_frameView->partialLayout().isStopping()) { |
m_layoutState = 0; |
@@ -351,9 +278,6 @@ void RenderView::layout() |
#endif |
m_layoutState = 0; |
clearNeedsLayout(); |
- |
- if (isSeamlessAncestorInFlowThread) |
- flowThreadController()->setCurrentRenderFlowThread(0); |
} |
void RenderView::mapLocalToContainer(const RenderLayerModelObject* repaintContainer, TransformState& transformState, MapCoordinatesFlags mode, bool* wasFixed) const |
@@ -1031,7 +955,6 @@ void RenderView::pushLayoutState(RenderObject* root) |
ASSERT(m_layoutStateDisableCount == 0); |
ASSERT(m_layoutState == 0); |
- pushLayoutStateForCurrentFlowThread(root); |
m_layoutState = new LayoutState(root); |
} |
@@ -1083,55 +1006,6 @@ void RenderView::setIsInWindow(bool isInWindow) |
m_compositor->setIsInWindow(isInWindow); |
} |
-void RenderView::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle) |
-{ |
- RenderBlock::styleDidChange(diff, oldStyle); |
- if (hasRenderNamedFlowThreads()) |
- flowThreadController()->styleDidChange(); |
-} |
- |
-bool RenderView::hasRenderNamedFlowThreads() const |
-{ |
- return m_flowThreadController && m_flowThreadController->hasRenderNamedFlowThreads(); |
-} |
- |
-bool RenderView::checkTwoPassLayoutForAutoHeightRegions() const |
-{ |
- return hasRenderNamedFlowThreads() && m_flowThreadController->hasFlowThreadsWithAutoLogicalHeightRegions(); |
-} |
- |
-FlowThreadController* RenderView::flowThreadController() |
-{ |
- if (!m_flowThreadController) |
- m_flowThreadController = FlowThreadController::create(this); |
- |
- return m_flowThreadController.get(); |
-} |
- |
-void RenderView::pushLayoutStateForCurrentFlowThread(const RenderObject* object) |
-{ |
- if (!m_flowThreadController) |
- return; |
- |
- RenderFlowThread* currentFlowThread = m_flowThreadController->currentRenderFlowThread(); |
- if (!currentFlowThread) |
- return; |
- |
- currentFlowThread->pushFlowThreadLayoutState(object); |
-} |
- |
-void RenderView::popLayoutStateForCurrentFlowThread() |
-{ |
- if (!m_flowThreadController) |
- return; |
- |
- RenderFlowThread* currentFlowThread = m_flowThreadController->currentRenderFlowThread(); |
- if (!currentFlowThread) |
- return; |
- |
- currentFlowThread->popFlowThreadLayoutState(); |
-} |
- |
IntervalArena* RenderView::intervalArena() |
{ |
if (!m_intervalArena) |