void RenderNamedFlowThread::pushDependencies(RenderNamedFlowThreadList& list) { for (RenderNamedFlowThreadCountedSet::iterator iter = m_layoutBeforeThreadsSet.begin(); iter != m_layoutBeforeThreadsSet.end(); ++iter) { RenderNamedFlowThread* flowThread = (*iter).first; if (list.contains(flowThread)) continue; flowThread->pushDependencies(list); list.add(flowThread); } }
void RenderNamedFlowThread::pushDependencies(RenderNamedFlowThreadList& list) { for (auto& flowThreadPair : m_layoutBeforeThreadsSet) { auto& flowThread = flowThreadPair.key; if (list.contains(flowThread)) continue; flowThread->pushDependencies(list); list.add(flowThread); } }
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(); } }
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(); } }