void FlowThreadController::layoutRenderNamedFlowThreads() { updateFlowThreadsChainIfNecessary(); for (RenderNamedFlowThreadList::iterator iter = m_renderNamedFlowThreadList->begin(); iter != m_renderNamedFlowThreadList->end(); ++iter) { RenderNamedFlowThread* flowRenderer = *iter; flowRenderer->layoutIfNeeded(); } }
void FlowThreadController::updateFlowThreadsIntoFinalPhase() { for (auto iter = m_renderNamedFlowThreadList->rbegin(), end = m_renderNamedFlowThreadList->rend(); iter != end; ++iter) { RenderNamedFlowThread* flowRenderer = *iter; flowRenderer->layoutIfNeeded(); if (flowRenderer->needsTwoPhasesLayout()) { flowRenderer->markRegionsForOverflowLayoutIfNeeded(); flowRenderer->clearNeedsTwoPhasesLayout(); } flowRenderer->setLayoutPhase(RenderFlowThread::LayoutPhaseFinal); } }
void FlowThreadController::updateFlowThreadsIntoOverflowPhase() { for (auto iter = m_renderNamedFlowThreadList->rbegin(), end = m_renderNamedFlowThreadList->rend(); iter != end; ++iter) { RenderNamedFlowThread* flowRenderer = *iter; ASSERT(!flowRenderer->hasRegions() || flowRenderer->hasValidRegionInfo()); ASSERT(!flowRenderer->needsTwoPhasesLayout()); // In the overflow computation phase the flow threads start in the constrained phase even though optimizations didn't set the state before. flowRenderer->setLayoutPhase(RenderFlowThread::LayoutPhaseConstrained); flowRenderer->layoutIfNeeded(); flowRenderer->markRegionsForOverflowLayoutIfNeeded(); flowRenderer->setLayoutPhase(RenderFlowThread::LayoutPhaseOverflow); } }
void FlowThreadController::updateFlowThreadsIntoConstrainedPhase() { // Walk the flow chain in reverse order to update the auto-height regions and compute correct sizes for the containing regions. Only after this we can // set the flow in the constrained layout phase. for (RenderNamedFlowThreadList::reverse_iterator iter = m_renderNamedFlowThreadList->rbegin(); iter != m_renderNamedFlowThreadList->rend(); ++iter) { RenderNamedFlowThread* flowRenderer = *iter; ASSERT(!flowRenderer->hasRegions() || flowRenderer->hasValidRegionInfo()); flowRenderer->layoutIfNeeded(); if (flowRenderer->hasAutoLogicalHeightRegions()) { ASSERT(flowRenderer->needsTwoPhasesLayout()); flowRenderer->markAutoLogicalHeightRegionsForLayout(); } flowRenderer->setInConstrainedLayoutPhase(true); flowRenderer->clearNeedsTwoPhasesLayout(); } }
void FlowThreadController::layoutRenderNamedFlowThreads() { ASSERT(m_renderNamedFlowThreadList); ASSERT(isAutoLogicalHeightRegionsFlagConsistent()); // Remove the left-over flow threads. RenderNamedFlowThreadList toRemoveList; for (RenderNamedFlowThreadList::iterator iter = m_renderNamedFlowThreadList->begin(); iter != m_renderNamedFlowThreadList->end(); ++iter) { RenderNamedFlowThread* flowRenderer = *iter; if (flowRenderer->isMarkedForDestruction()) toRemoveList.add(flowRenderer); } if (toRemoveList.size() > 0) setIsRenderNamedFlowThreadOrderDirty(true); for (RenderNamedFlowThreadList::iterator iter = toRemoveList.begin(); iter != toRemoveList.end(); ++iter) { RenderNamedFlowThread* flowRenderer = *iter; m_renderNamedFlowThreadList->remove(flowRenderer); flowRenderer->destroy(); } if (isRenderNamedFlowThreadOrderDirty()) { // Arrange the thread list according to dependencies. RenderNamedFlowThreadList sortedList; for (RenderNamedFlowThreadList::iterator iter = m_renderNamedFlowThreadList->begin(); iter != m_renderNamedFlowThreadList->end(); ++iter) { RenderNamedFlowThread* flowRenderer = *iter; if (sortedList.contains(flowRenderer)) continue; flowRenderer->pushDependencies(sortedList); sortedList.add(flowRenderer); } m_renderNamedFlowThreadList->swap(sortedList); setIsRenderNamedFlowThreadOrderDirty(false); } for (RenderNamedFlowThreadList::iterator iter = m_renderNamedFlowThreadList->begin(); iter != m_renderNamedFlowThreadList->end(); ++iter) { RenderNamedFlowThread* flowRenderer = *iter; flowRenderer->layoutIfNeeded(); } }
void RenderView::layoutRenderNamedFlowThreads() { ASSERT(m_renderNamedFlowThreadList); if (isRenderNamedFlowThreadOrderDirty()) { // Arrange the thread list according to dependencies. RenderNamedFlowThreadList sortedList; for (RenderNamedFlowThreadList::iterator iter = m_renderNamedFlowThreadList->begin(); iter != m_renderNamedFlowThreadList->end(); ++iter) { RenderNamedFlowThread* flowRenderer = *iter; if (sortedList.contains(flowRenderer)) continue; flowRenderer->pushDependencies(sortedList); sortedList.add(flowRenderer); } m_renderNamedFlowThreadList->swap(sortedList); setIsRenderNamedFlowThreadOrderDirty(false); } for (RenderNamedFlowThreadList::iterator iter = m_renderNamedFlowThreadList->begin(); iter != m_renderNamedFlowThreadList->end(); ++iter) { RenderNamedFlowThread* flowRenderer = *iter; flowRenderer->layoutIfNeeded(); } }