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

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

Issue 1691003003: Remaining page height should never be 0 when told to AssociateWithLatterPage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/LayoutTests/fast/multicol/infinitely-tall-content-in-outer-crash-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/LayoutMultiColumnSet.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.cpp b/third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.cpp
index 33d90096ac510166caea24d724db83010000a380..14746b86ea35367464c59976618c85a7c317cd31 100644
--- a/third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.cpp
@@ -88,6 +88,13 @@ LayoutUnit LayoutMultiColumnSet::pageRemainingLogicalHeightForOffset(LayoutUnit
// question (i.e. no remaining space), rather than being part of the latter (i.e. one whole
// column length of remaining space).
remainingLogicalHeight = intMod(remainingLogicalHeight, pageLogicalHeight);
+ } else if (!remainingLogicalHeight) {
+ // When pageBoundaryRule is AssociateWithLatterPage, we should never return 0, because if
+ // there's no space left, it means that we should be at a column boundary, in which case we
+ // should return the amount of space remaining in the *next* column. But this is not true if
+ // the offset is "infinite" (saturated), so allow this to happen in that case.
+ ASSERT(offsetInFlowThread.mightBeSaturated());
+ remainingLogicalHeight = pageLogicalHeight;
}
return remainingLogicalHeight;
}
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/multicol/infinitely-tall-content-in-outer-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698