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

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

Issue 2709013007: Allow flow thread portion logical bottom to be above its logical top. (Closed)
Patch Set: Add clarifying comment in logicalHeightInFlowThread() 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
Index: third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.h b/third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.h
index d92d9735c62f0033389ae67afca5a111720a167c..d07984a01fb7951c58245dd9aabb9df54dd0501f 100644
--- a/third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.h
+++ b/third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.h
@@ -149,7 +149,10 @@ class CORE_EXPORT LayoutMultiColumnSet : public LayoutBlockFlow {
LayoutUnit logicalTopInFlowThread() const;
LayoutUnit logicalBottomInFlowThread() const;
LayoutUnit logicalHeightInFlowThread() const {
- return logicalBottomInFlowThread() - logicalTopInFlowThread();
+ // Due to negative margins, logical bottom may actually end up above logical
+ // top, but we never want to return negative logical heights.
+ return (logicalBottomInFlowThread() - logicalTopInFlowThread())
+ .clampNegativeToZero();
}
// Return the amount of flow thread contents that the specified fragmentainer

Powered by Google App Engine
This is Rietveld 408576698