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

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

Issue 267903003: [New Multicolumn] Remove RenderRegionSet. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 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 | « Source/core/rendering/RenderMultiColumnSet.h ('k') | Source/core/rendering/RenderRegion.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderMultiColumnSet.cpp
diff --git a/Source/core/rendering/RenderMultiColumnSet.cpp b/Source/core/rendering/RenderMultiColumnSet.cpp
index 01711123b4832c8d39ff2a6cd0ea71dad9bf1853..a758019954245c6c58c7685908d31f85bd67b6b7 100644
--- a/Source/core/rendering/RenderMultiColumnSet.cpp
+++ b/Source/core/rendering/RenderMultiColumnSet.cpp
@@ -35,7 +35,7 @@ using namespace std;
namespace WebCore {
RenderMultiColumnSet::RenderMultiColumnSet(RenderFlowThread* flowThread)
- : RenderRegionSet(0, flowThread)
+ : RenderRegion(0, flowThread)
, m_computedColumnCount(1)
, m_computedColumnWidth(0)
, m_computedColumnHeight(0)
@@ -286,6 +286,23 @@ void RenderMultiColumnSet::prepareForLayout()
m_minimumColumnHeight = 0;
}
+void RenderMultiColumnSet::expandToEncompassFlowThreadContentsIfNeeded()
+{
+ ASSERT(multiColumnFlowThread()->lastMultiColumnSet() == this);
+ LayoutRect rect(flowThreadPortionRect());
+
+ // Get the offset within the flow thread in its block progression direction. Then get the
+ // flow thread's remaining logical height including its overflow and expand our rect
+ // to encompass that remaining height and overflow. The idea is that we will generate
+ // additional columns and pages to hold that overflow, since people do write bad
+ // content like <body style="height:0px"> in multi-column layouts.
+ bool isHorizontal = flowThread()->isHorizontalWritingMode();
+ LayoutUnit logicalTopOffset = isHorizontal ? rect.y() : rect.x();
+ LayoutRect layoutRect = flowThread()->layoutOverflowRect();
+ LayoutUnit logicalHeightWithOverflow = (isHorizontal ? layoutRect.maxY() : layoutRect.maxX()) - logicalTopOffset;
+ setFlowThreadPortionRect(LayoutRect(rect.x(), rect.y(), isHorizontal ? rect.width() : logicalHeightWithOverflow, isHorizontal ? logicalHeightWithOverflow : rect.height()));
+}
+
void RenderMultiColumnSet::computeLogicalHeight(LayoutUnit, LayoutUnit logicalTop, LogicalExtentComputedValues& computedValues) const
{
computedValues.m_extent = m_computedColumnHeight;
« no previous file with comments | « Source/core/rendering/RenderMultiColumnSet.h ('k') | Source/core/rendering/RenderRegion.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698