Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Unified Diff: third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp

Issue 2711003005: Merge overflowRectForFlowThreadPortion() into flowThreadPortionOverflowRectAt(). (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp
diff --git a/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp b/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp
index ceba040700e23c28d2256d79b7bb1c2f2fc751b9..f29232ca564f7363fdfd2fa271cad9869bf5a584 100644
--- a/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp
+++ b/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp
@@ -446,22 +446,28 @@ LayoutRect MultiColumnFragmentainerGroup::flowThreadPortionOverflowRectAt(
bool isLastColumnInMulticolContainer =
isLastColumnInRow && this == &m_columnSet.lastFragmentainerGroup() &&
!m_columnSet.nextSiblingMultiColumnSet();
- // Calculate the overflow rectangle, based on the flow thread's, clipped at
- // column logical top/bottom unless it's the first/last column.
- LayoutRect overflowRect = m_columnSet.overflowRectForFlowThreadPortion(
- portionRect, isFirstColumnInMulticolContainer,
- isLastColumnInMulticolContainer);
-
- // Avoid overflowing into neighboring columns, by clipping in the middle of
- // adjacent column gaps. Also make sure that we avoid rounding errors.
+ // Calculate the overflow rectangle. It will be clipped at the logical top
+ // and bottom of the column box, unless it's the first or last column in the
+ // multicol container, in which case it should allow overflow. It will also
+ // be clipped in the middle of adjacent column gaps. Care is taken here to
+ // avoid rounding errors.
+ LayoutRect overflowRect(LayoutRect::infiniteIntRect());
LayoutUnit columnGap = m_columnSet.columnGap();
if (m_columnSet.isHorizontalWritingMode()) {
+ if (!isFirstColumnInMulticolContainer)
+ overflowRect.shiftYEdgeTo(portionRect.y());
+ if (!isLastColumnInMulticolContainer)
+ overflowRect.shiftMaxYEdgeTo(portionRect.maxY());
if (!isLeftmostColumn)
overflowRect.shiftXEdgeTo(portionRect.x() - columnGap / 2);
if (!isRightmostColumn)
overflowRect.shiftMaxXEdgeTo(portionRect.maxX() + columnGap -
columnGap / 2);
} else {
+ if (!isFirstColumnInMulticolContainer)
+ overflowRect.shiftXEdgeTo(portionRect.x());
+ if (!isLastColumnInMulticolContainer)
+ overflowRect.shiftMaxXEdgeTo(portionRect.maxX());
if (!isLeftmostColumn)
overflowRect.shiftYEdgeTo(portionRect.y() - columnGap / 2);
if (!isRightmostColumn)
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698