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

Unified Diff: Source/core/rendering/RenderBlockFlow.cpp

Issue 239003003: [New Multicolumn] Temporarily changing height is scary and can easily be avoided. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBlockFlow.cpp
diff --git a/Source/core/rendering/RenderBlockFlow.cpp b/Source/core/rendering/RenderBlockFlow.cpp
index 4f94ffa1c8c1d9ef7fa14ddc6ce582adfd5151c7..53b0b8ecd5357a798c95580acb165a050c544406 100644
--- a/Source/core/rendering/RenderBlockFlow.cpp
+++ b/Source/core/rendering/RenderBlockFlow.cpp
@@ -199,10 +199,11 @@ bool RenderBlockFlow::updateLogicalWidthAndColumnWidth()
void RenderBlockFlow::checkForPaginationLogicalHeightChange(LayoutUnit& pageLogicalHeight, bool& pageLogicalHeightChanged, bool& hasSpecifiedPageLogicalHeight)
{
if (RenderMultiColumnFlowThread* flowThread = multiColumnFlowThread()) {
- updateLogicalHeight();
- pageLogicalHeightChanged = contentLogicalHeight() != flowThread->columnHeightAvailable();
- flowThread->setColumnHeightAvailable(std::max<LayoutUnit>(contentLogicalHeight(), 0));
- setLogicalHeight(0);
+ LogicalExtentComputedValues computedValues;
+ computeLogicalHeight(LayoutUnit(), logicalTop(), computedValues);
+ LayoutUnit columnHeight = computedValues.m_extent - borderAndPaddingLogicalHeight() - scrollbarLogicalHeight();
+ pageLogicalHeightChanged = columnHeight != flowThread->columnHeightAvailable();
+ flowThread->setColumnHeightAvailable(std::max<LayoutUnit>(columnHeight, 0));
} else if (hasColumns()) {
ColumnInfo* colInfo = columnInfo();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698