diff options
Diffstat (limited to 'Source/WebCore/rendering/RenderMultiColumnBlock.h')
-rw-r--r-- | Source/WebCore/rendering/RenderMultiColumnBlock.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/Source/WebCore/rendering/RenderMultiColumnBlock.h b/Source/WebCore/rendering/RenderMultiColumnBlock.h index 58850c334..f4408ae98 100644 --- a/Source/WebCore/rendering/RenderMultiColumnBlock.h +++ b/Source/WebCore/rendering/RenderMultiColumnBlock.h @@ -35,21 +35,26 @@ class RenderMultiColumnFlowThread; class RenderMultiColumnBlock : public RenderBlock { public: - RenderMultiColumnBlock(Node*); - - LayoutUnit columnHeight() const { return m_columnHeight; } - void setColumnHeight(LayoutUnit columnHeight) { m_columnHeight = columnHeight; } + 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; @@ -64,18 +69,19 @@ private: 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. + LayoutUnit m_columnHeightAvailable; // Total height available to columns, or 0 if auto. + bool m_inBalancingPass; // Set when relayouting for column balancing. }; inline RenderMultiColumnBlock* toRenderMultiColumnBlock(RenderObject* object) { - ASSERT(!object || object->isRenderMultiColumnBlock()); + ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderMultiColumnBlock()); return static_cast<RenderMultiColumnBlock*>(object); } inline const RenderMultiColumnBlock* toRenderMultiColumnBlock(const RenderObject* object) { - ASSERT(!object || object->isRenderMultiColumnBlock()); + ASSERT_WITH_SECURITY_IMPLICATION(!object || object->isRenderMultiColumnBlock()); return static_cast<const RenderMultiColumnBlock*>(object); } |