#ifndef RenderMultiColumnFlowThread_h
#define RenderMultiColumnFlowThread_h
#include "core/rendering/RenderFlowThread.h"
namespace WebCore {
class RenderMultiColumnFlowThread FINAL : public RenderFlowThread {
public:
virtual ~RenderMultiColumnFlowThread();
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();
virtual const char* renderName() const OVERRIDE;
virtual void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop, LogicalExtentComputedValues&) const OVERRIDE;
virtual void autoGenerateRegionsToBlockOffset(LayoutUnit) OVERRIDE;
virtual LayoutUnit initialLogicalWidth() const OVERRIDE;
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;
virtual bool isPageLogicalHeightKnown() const OVERRIDE;
unsigned m_columnCount;
LayoutUnit m_columnWidth;
LayoutUnit m_columnHeightAvailable;
bool m_inBalancingPass;
bool m_needsRebalancing;
};
}
#endif