void RenderFlowThread::computeLogicalHeight(LayoutUnit, LayoutUnit logicalTop, LogicalExtentComputedValues& computedValues) const { computedValues.m_position = logicalTop; computedValues.m_extent = 0; for (RenderMultiColumnSetList::const_iterator iter = m_multiColumnSetList.begin(); iter != m_multiColumnSetList.end(); ++iter) { RenderMultiColumnSet* columnSet = *iter; computedValues.m_extent += columnSet->logicalHeightOfAllFlowThreadContent(); } }
void RenderFlowThread::updateRegionsFlowThreadPortionRect() { LayoutUnit logicalHeight = 0; // FIXME: Optimize not to clear the interval all the time. This implies manually managing the tree nodes lifecycle. m_multiColumnSetIntervalTree.clear(); m_multiColumnSetIntervalTree.initIfNeeded(); for (RenderMultiColumnSetList::iterator iter = m_multiColumnSetList.begin(); iter != m_multiColumnSetList.end(); ++iter) { RenderMultiColumnSet* columnSet = *iter; LayoutUnit columnSetLogicalWidth = columnSet->pageLogicalWidth(); LayoutUnit columnSetLogicalHeight = std::min<LayoutUnit>(RenderFlowThread::maxLogicalHeight() - logicalHeight, columnSet->logicalHeightOfAllFlowThreadContent()); LayoutRect columnSetRect(style()->direction() == LTR ? LayoutUnit() : logicalWidth() - columnSetLogicalWidth, logicalHeight, columnSetLogicalWidth, columnSetLogicalHeight); columnSet->setFlowThreadPortionRect(isHorizontalWritingMode() ? columnSetRect : columnSetRect.transposedRect()); m_multiColumnSetIntervalTree.add(MultiColumnSetIntervalTree::createInterval(logicalHeight, logicalHeight + columnSetLogicalHeight, columnSet)); logicalHeight += columnSetLogicalHeight; } }