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

Unified Diff: Source/core/rendering/RenderMultiColumnFlowThread.h

Issue 179993006: [New multicol] Eliminate the need for RenderMultiColumnBlock. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Code review Created 6 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: Source/core/rendering/RenderMultiColumnFlowThread.h
diff --git a/Source/core/rendering/RenderMultiColumnFlowThread.h b/Source/core/rendering/RenderMultiColumnFlowThread.h
index 45b4d9301a8561906a4ef8f8cb282d8406a75126..6687de791962b7db6b537dfaf7e86641ca6971fd 100644
--- a/Source/core/rendering/RenderMultiColumnFlowThread.h
+++ b/Source/core/rendering/RenderMultiColumnFlowThread.h
@@ -35,7 +35,18 @@ class RenderMultiColumnFlowThread FINAL : public RenderFlowThread {
public:
virtual ~RenderMultiColumnFlowThread();
- static RenderMultiColumnFlowThread* createAnonymous(Document*);
+ static RenderMultiColumnFlowThread* createAnonymous(Document&, RenderStyle* parentStyle);
+
+ RenderBlockFlow* multiColumnBlockFlow() const { return toRenderBlockFlow(parent()); }
+ unsigned columnCount() const { return m_columnCount; }
+ LayoutUnit columnWidth() const { return m_columnWidth; }
+ LayoutUnit columnHeightAvailable() const { return m_columnHeightAvailable; }
+ void setColumnHeightAvailable(LayoutUnit available) { m_columnHeightAvailable = available; }
+ bool requiresBalancing() const { return !columnHeightAvailable() || multiColumnBlockFlow()->style()->columnFill() == ColumnFillBalance; }
+
+ void layoutColumns(bool relayoutChildren, SubtreeLayoutScope&);
+ bool computeColumnCountAndWidth();
+ bool recalculateColumnHeights();
private:
RenderMultiColumnFlowThread();
@@ -47,6 +58,12 @@ private:
virtual void setPageBreak(LayoutUnit offset, LayoutUnit spaceShortage) OVERRIDE;
virtual void updateMinimumPageHeight(LayoutUnit offset, LayoutUnit minHeight) OVERRIDE;
virtual bool addForcedRegionBreak(LayoutUnit, RenderObject* breakChild, bool isBefore, LayoutUnit* offsetBreakAdjustment = 0) OVERRIDE;
+
+ unsigned m_columnCount; // The used value of column-count
+ LayoutUnit m_columnWidth; // The used value of column-width
+ LayoutUnit m_columnHeightAvailable; // Total height available to columns, or 0 if auto.
+ bool m_inBalancingPass; // Set when relayouting for column balancing.
+ bool m_needsRebalancing;
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698