From b1e9e47fa11f608ae16bc07f97a2acf95bf80272 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 1 Jun 2012 10:36:58 +0200 Subject: Imported WebKit commit 499c84c99aa98e9870fa7eaa57db476c6d160d46 (http://svn.webkit.org/repository/webkit/trunk@119200) Weekly update :). Particularly relevant changes for Qt are the use of the WebCore image decoders and direct usage of libpng/libjpeg if available in the system. --- Source/WebCore/rendering/RenderMultiColumnBlock.h | 35 ++++++++++++++++++++--- 1 file changed, 31 insertions(+), 4 deletions(-) (limited to 'Source/WebCore/rendering/RenderMultiColumnBlock.h') 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(object); +} + +inline const RenderMultiColumnBlock* toRenderMultiColumnBlock(const RenderObject* object) +{ + ASSERT(!object || object->isRenderMultiColumnBlock()); + return static_cast(object); +} + +// This will catch anyone doing an unnecessary cast. +void toRenderMultiColumnBlock(const RenderMultiColumnBlock*); + } // namespace WebCore #endif // RenderMultiColumnBlock_h -- cgit v1.2.1