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

Unified Diff: third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.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/MultiColumnFragmentainerGroup.h
diff --git a/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.h b/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.h
index 3cd5bba85dee25a2d99765777f493b93f2cc1f56..f3f29ac94984384cd4d23a24916d6910392da5ed 100644
--- a/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.h
+++ b/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.h
@@ -63,14 +63,19 @@ class MultiColumnFragmentainerGroup {
return m_logicalBottomInFlowThread;
}
void setLogicalBottomInFlowThread(LayoutUnit logicalBottomInFlowThread) {
- ASSERT(logicalBottomInFlowThread >= m_logicalTopInFlowThread);
m_logicalBottomInFlowThread = logicalBottomInFlowThread;
}
- // The height of our flow thread portion
+ // The height of the flow thread portion for the entire fragmentainer group.
LayoutUnit logicalHeightInFlowThread() const {
- return m_logicalBottomInFlowThread - m_logicalTopInFlowThread;
+ // Due to negative margins, logical bottom may actually end up above logical
+ // top, but we never want to return negative logical heights.
+ return (m_logicalBottomInFlowThread - m_logicalTopInFlowThread)
+ .clampNegativeToZero();
}
+ // The height of the flow thread portion for the specified fragmentainer.
+ // The last fragmentainer may not be using all available space.
+ LayoutUnit logicalHeightInFlowThreadAt(unsigned columnIndex) const;
void resetColumnHeight();
bool recalculateColumnHeight(LayoutMultiColumnSet&);

Powered by Google App Engine
This is Rietveld 408576698