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 7c15bb9eff5b67c009a33ad3deafc67deafa5151..a581eaf4dc4d752f73284704d1d9887a2cf96738 100644 |
--- a/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp |
+++ b/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp |
@@ -267,10 +267,15 @@ void MultiColumnFragmentainerGroup::collectLayerFragments(PaintLayerFragments& f |
LayoutRect MultiColumnFragmentainerGroup::calculateOverflow() const |
{ |
- unsigned columnCount = actualColumnCount(); |
- if (!columnCount) |
- return LayoutRect(); |
- return columnRectAt(columnCount - 1); |
+ // Note that we just return the bounding rectangle of the column boxes here. We currently don't |
+ // examine overflow caused by the actual content that ends up in each column. |
+ LayoutRect overflowRect; |
+ if (unsigned columnCount = actualColumnCount()) { |
+ overflowRect = columnRectAt(0); |
+ if (columnCount > 1) |
+ overflowRect.uniteEvenIfEmpty(columnRectAt(columnCount - 1)); |
+ } |
+ return overflowRect; |
} |
unsigned MultiColumnFragmentainerGroup::actualColumnCount() const |