RenderMultiColumnBlock.h [plain text]
#ifndef RenderMultiColumnBlock_h
#define RenderMultiColumnBlock_h
#include "RenderBlock.h"
namespace WebCore {
class RenderMultiColumnFlowThread;
class RenderMultiColumnBlock : public RenderBlock {
public:
RenderMultiColumnBlock(Element*);
LayoutUnit columnHeightAvailable() const { return m_columnHeightAvailable; }
LayoutUnit columnWidth() const { return m_columnWidth; }
unsigned columnCount() const { return m_columnCount; }
RenderMultiColumnFlowThread* flowThread() const { return m_flowThread; }
bool requiresBalancing() const { return !m_columnHeightAvailable; }
private:
virtual bool isRenderMultiColumnBlock() const { return true; }
virtual const char* renderName() const;
virtual RenderObject* layoutSpecialExcludedChild(bool relayoutChildren) OVERRIDE;
virtual void styleDidChange(StyleDifference, const RenderStyle*) OVERRIDE;
virtual bool updateLogicalWidthAndColumnWidth() OVERRIDE;
virtual void checkForPaginationLogicalHeightChange(LayoutUnit& pageLogicalHeight, bool& pageLogicalHeightChanged, bool& hasSpecifiedPageLogicalHeight) OVERRIDE;
virtual bool relayoutForPagination(bool hasSpecifiedPageLogicalHeight, LayoutUnit pageLogicalHeight, LayoutStateMaintainer&) OVERRIDE;
virtual void addChild(RenderObject* newChild, RenderObject* beforeChild = 0) OVERRIDE;
void computeColumnCountAndWidth();
void ensureColumnSets();
RenderMultiColumnFlowThread* m_flowThread;
unsigned m_columnCount; LayoutUnit m_columnWidth; LayoutUnit m_columnHeightAvailable; bool m_inBalancingPass; };
inline RenderMultiColumnBlock* toRenderMultiColumnBlock(RenderObject* object)
{
ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderMultiColumnBlock());
return static_cast<RenderMultiColumnBlock*>(object);
}
inline const RenderMultiColumnBlock* toRenderMultiColumnBlock(const RenderObject* object)
{
ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderMultiColumnBlock());
return static_cast<const RenderMultiColumnBlock*>(object);
}
void toRenderMultiColumnBlock(const RenderMultiColumnBlock*);
}
#endif // RenderMultiColumnBlock_h