Index: Source/core/layout/MultiColumnFragmentainerGroup.cpp |
diff --git a/Source/core/layout/MultiColumnFragmentainerGroup.cpp b/Source/core/layout/MultiColumnFragmentainerGroup.cpp |
index 317ec3d63298d46cbe011bf15fb0abd0427b02e1..92dd7d46ba9ff4c71d7c5b722a5f8ef4c042c6f5 100644 |
--- a/Source/core/layout/MultiColumnFragmentainerGroup.cpp |
+++ b/Source/core/layout/MultiColumnFragmentainerGroup.cpp |
@@ -132,12 +132,14 @@ void MultiColumnFragmentainerGroup::expandToEncompassFlowThreadOverflow() |
LayoutSize MultiColumnFragmentainerGroup::flowThreadTranslationAtOffset(LayoutUnit offsetInFlowThread) const |
{ |
+ LayoutFlowThread* flowThread = m_columnSet.flowThread(); |
unsigned columnIndex = columnIndexAtOffset(offsetInFlowThread); |
LayoutRect portionRect(flowThreadPortionRectAt(columnIndex)); |
- m_columnSet.flipForWritingMode(portionRect); |
- LayoutSize translation(translationAtColumn(columnIndex)); |
- // TODO(mstensho): need a rectangle (not a point) to flip for writing mode here, once we get support for multiple rows. |
- return toLayoutPoint(translation) - portionRect.location(); |
+ flowThread->flipForWritingMode(portionRect); |
+ LayoutRect columnRect(columnRectAt(columnIndex)); |
+ m_columnSet.flipForWritingMode(columnRect); |
+ LayoutSize translationRelativeToGroup = columnRect.location() - portionRect.location(); |
+ return translationRelativeToGroup + offsetFromColumnSet() + m_columnSet.topLeftLocationOffset() - flowThread->topLeftLocationOffset(); |
} |
LayoutUnit MultiColumnFragmentainerGroup::columnLogicalTopForOffset(LayoutUnit offsetInFlowThread) const |
@@ -438,23 +440,6 @@ LayoutUnit MultiColumnFragmentainerGroup::calculateColumnHeight(BalancedColumnHe |
return m_columnHeight + m_minSpaceShortage; |
} |
-LayoutSize MultiColumnFragmentainerGroup::translationAtColumn(unsigned columnIndex) const |
-{ |
- LayoutUnit logicalTopOffset; |
- LayoutUnit logicalLeftOffset; |
- LayoutUnit columnGap = m_columnSet.columnGap(); |
- if (m_columnSet.multiColumnFlowThread()->progressionIsInline()) { |
- logicalLeftOffset = columnIndex * (m_columnSet.pageLogicalWidth() + columnGap); |
- if (!m_columnSet.style()->isLeftToRightDirection()) |
- logicalLeftOffset = -logicalLeftOffset; |
- } else { |
- logicalTopOffset = columnIndex * (m_columnHeight + columnGap); |
- } |
- |
- LayoutSize offset(logicalLeftOffset, logicalTopOffset); |
- return m_columnSet.isHorizontalWritingMode() ? offset : offset.transposedSize(); |
-} |
- |
LayoutRect MultiColumnFragmentainerGroup::columnRectAt(unsigned columnIndex) const |
{ |
LayoutUnit columnLogicalWidth = m_columnSet.pageLogicalWidth(); |