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

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

Issue 1631633002: Adjust column rows' height better for their offset in the multicol container. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/Source/core/layout/LayoutMultiColumnSet.cpp ('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 d99f5ad1e269693cc494bb24a1ce52ded29273f0..bf01933fbd920b1e3e9d4a1bc5e8bf9a91cb491c 100644
--- a/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp
+++ b/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp
@@ -292,21 +292,8 @@ unsigned MultiColumnFragmentainerGroup::actualColumnCount() const
LayoutUnit MultiColumnFragmentainerGroup::heightAdjustedForRowOffset(LayoutUnit height) const
{
- // Adjust for the top offset within the content box of the multicol container (containing
- // block), unless we're in the first set. We know that the top offset for the first set will be
- // zero, but if the multicol container has non-zero top border or padding, the set's top offset
- // (initially being 0 and relative to the border box) will be negative until it has been laid
- // out. Had we used this bogus offset, we would calculate the wrong height, and risk performing
- // a wasted layout iteration. Of course all other sets (if any) have this problem in the first
- // layout pass too, but there's really nothing we can do there until the flow thread has been
- // laid out anyway.
- if (m_columnSet.previousSiblingMultiColumnSet()) {
- LayoutBlockFlow* multicolBlock = m_columnSet.multiColumnBlockFlow();
- LayoutUnit contentLogicalTop = m_columnSet.logicalTop() - multicolBlock->borderAndPaddingBefore();
- height -= contentLogicalTop;
- }
- height -= logicalTop();
- return max(height, LayoutUnit(1)); // Let's avoid zero height, as that would probably cause an infinite amount of columns to be created.
+ // Let's avoid zero height, as that would cause an infinite amount of columns to be created.
leviw_travelin_and_unemployed 2016/01/26 23:00:29 Where's the fun in that? If we can just sell the
mstensho (USE GERRIT) 2016/01/27 09:51:45 I can do that in a follow-up patch. You're right.
+ return std::max(height - logicalTop() - m_columnSet.logicalTopFromMulticolContentEdge(), LayoutUnit(1));
}
LayoutUnit MultiColumnFragmentainerGroup::calculateMaxColumnHeight() const
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutMultiColumnSet.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698