Index: Source/core/rendering/RenderFlowThread.cpp |
diff --git a/Source/core/rendering/RenderFlowThread.cpp b/Source/core/rendering/RenderFlowThread.cpp |
index 81710f994efdc5b256c40ea66dcdc0642b6b6194..20ec90755d1aa0be47ede3ad779614b1855e392e 100644 |
--- a/Source/core/rendering/RenderFlowThread.cpp |
+++ b/Source/core/rendering/RenderFlowThread.cpp |
@@ -90,7 +90,7 @@ void RenderFlowThread::validateRegions() |
} |
updateLogicalWidth(); // Called to get the maximum logical width for the columnSet. |
- updateRegionsFlowThreadPortionRect(); |
+ generateColumnSetIntervalTree(); |
} |
void RenderFlowThread::mapRectToPaintInvalidationBacking(const LayoutLayerModelObject* paintInvalidationContainer, LayoutRect& rect, const PaintInvalidationState* paintInvalidationState) const |
@@ -166,26 +166,13 @@ RenderRegion* RenderFlowThread::lastRegion() const |
return m_multiColumnSetList.last(); |
} |
-void RenderFlowThread::updateRegionsFlowThreadPortionRect() |
+void RenderFlowThread::generateColumnSetIntervalTree() |
{ |
- 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->logicalHeightInFlowThread()); |
- |
- 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; |
- } |
+ for (auto columnSet : m_multiColumnSetList) |
Julien - ping for review
2015/02/11 07:25:29
I assume this doesn't do a deep copy behind the sc
mstensho (USE GERRIT)
2015/02/11 09:49:55
Correct. No copying.
|
+ m_multiColumnSetIntervalTree.add(MultiColumnSetIntervalTree::createInterval(columnSet->logicalTopInFlowThread(), columnSet->logicalBottomInFlowThread(), columnSet)); |
} |
void RenderFlowThread::collectLayerFragments(LayerFragments& layerFragments, const LayoutRect& layerBoundingBox, const LayoutRect& dirtyRect) |