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

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

Issue 1424913003: Don't set bogus height on new fragmentainer groups initially. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase master Created 5 years, 1 month 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/MultiColumnFragmentainerGroup.h ('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 e9246bf7bd30e607c1fce5cfde75f7ec404f4a6b..09c64a8814ec41c5e7fc820a1dbf7126e76f5c4c 100644
--- a/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp
+++ b/third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.cpp
@@ -39,20 +39,12 @@ LayoutUnit MultiColumnFragmentainerGroup::blockOffsetInEnclosingFlowThread() con
return logicalTop() + m_columnSet.logicalTop() + m_columnSet.multiColumnFlowThread()->blockOffsetInEnclosingFlowThread();
}
-bool MultiColumnFragmentainerGroup::heightIsAuto() const
-{
- // Only the last row may have auto height, and thus be balanced. There are no good reasons to
- // balance the preceding rows, and that could potentially lead to an insane number of layout
- // passes as well.
- return isLastGroup() && m_columnSet.heightIsAuto();
-}
-
void MultiColumnFragmentainerGroup::resetColumnHeight()
{
m_maxColumnHeight = calculateMaxColumnHeight();
LayoutMultiColumnFlowThread* flowThread = m_columnSet.multiColumnFlowThread();
- if (heightIsAuto()) {
+ if (m_columnSet.heightIsAuto()) {
LayoutMultiColumnFlowThread* enclosingFlowThread = flowThread->enclosingFlowThread();
if (enclosingFlowThread && enclosingFlowThread->isPageLogicalHeightKnown()) {
// Even if height is auto, we set an initial height, in order to tell how much content
@@ -72,7 +64,10 @@ bool MultiColumnFragmentainerGroup::recalculateColumnHeight(BalancedColumnHeight
m_maxColumnHeight = calculateMaxColumnHeight();
- if (heightIsAuto()) {
+ // Only the last row may have auto height, and thus be balanced. There are no good reasons to
+ // balance the preceding rows, and that could potentially lead to an insane number of layout
+ // passes as well.
+ if (isLastGroup() && m_columnSet.heightIsAuto()) {
LayoutUnit newColumnHeight = calculateColumnHeight(calculationMode);
setAndConstrainColumnHeight(newColumnHeight);
// After having calculated an initial column height, the multicol container typically needs at
« no previous file with comments | « third_party/WebKit/Source/core/layout/MultiColumnFragmentainerGroup.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698