summaryrefslogtreecommitdiff
path: root/Source/WebCore/rendering/RenderMultiColumnBlock.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/rendering/RenderMultiColumnBlock.h')
-rw-r--r--Source/WebCore/rendering/RenderMultiColumnBlock.h35
1 files changed, 31 insertions, 4 deletions
diff --git a/Source/WebCore/rendering/RenderMultiColumnBlock.h b/Source/WebCore/rendering/RenderMultiColumnBlock.h
index 833c9bf71..bfbfb380b 100644
--- a/Source/WebCore/rendering/RenderMultiColumnBlock.h
+++ b/Source/WebCore/rendering/RenderMultiColumnBlock.h
@@ -37,24 +37,51 @@ class RenderMultiColumnBlock : public RenderBlock {
public:
RenderMultiColumnBlock(Node*);
+ LayoutUnit columnHeight() const { return m_columnHeight; }
+ void setColumnHeight(LayoutUnit columnHeight) { m_columnHeight = columnHeight; }
+
+ LayoutUnit columnWidth() const { return m_columnWidth; }
+ unsigned columnCount() const { return m_columnCount; }
+
private:
+ virtual bool isRenderMultiColumnBlock() const { return true; }
+
virtual const char* renderName() const;
- virtual bool recomputeLogicalWidth();
- void computeColumnCountAndWidth();
+ virtual bool recomputeLogicalWidth() 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* flowThread() const { return m_flowThread; }
-private:
RenderMultiColumnFlowThread* m_flowThread;
-
unsigned m_columnCount; // The default column count/width that are based off our containing block width. These values represent only the default,
LayoutUnit m_columnWidth; // since a multi-column block that is split across variable width pages or regions will have different column counts and widths in each.
// These values will be cached (eventually) for multi-column blocks.
+ LayoutUnit m_columnHeight; // The current column height.
};
+inline RenderMultiColumnBlock* toRenderMultiColumnBlock(RenderObject* object)
+{
+ ASSERT(!object || object->isRenderMultiColumnBlock());
+ return static_cast<RenderMultiColumnBlock*>(object);
+}
+
+inline const RenderMultiColumnBlock* toRenderMultiColumnBlock(const RenderObject* object)
+{
+ ASSERT(!object || object->isRenderMultiColumnBlock());
+ return static_cast<const RenderMultiColumnBlock*>(object);
+}
+
+// This will catch anyone doing an unnecessary cast.
+void toRenderMultiColumnBlock(const RenderMultiColumnBlock*);
+
} // namespace WebCore
#endif // RenderMultiColumnBlock_h