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

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

Issue 1927283002: Improve multicol overflow rect calculation when column width is 0. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Explain what goes on in the test. Created 4 years, 7 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/LayoutTests/fast/multicol/overflowing-columns-large-gaps-expected.txt ('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 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
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/multicol/overflowing-columns-large-gaps-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698