summaryrefslogtreecommitdiff
path: root/Source/WebCore/rendering/RenderMultiColumnSet.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-06-01 10:36:58 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-06-01 10:36:58 +0200
commitb1e9e47fa11f608ae16bc07f97a2acf95bf80272 (patch)
treec88c45e80c9c44506e7cdf9a3bb39ebf82a8cd5b /Source/WebCore/rendering/RenderMultiColumnSet.cpp
parentbe01689f43cf6882cf670d33df49ead1f570c53a (diff)
downloadqtwebkit-b1e9e47fa11f608ae16bc07f97a2acf95bf80272.tar.gz
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.
Diffstat (limited to 'Source/WebCore/rendering/RenderMultiColumnSet.cpp')
-rw-r--r--Source/WebCore/rendering/RenderMultiColumnSet.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/Source/WebCore/rendering/RenderMultiColumnSet.cpp b/Source/WebCore/rendering/RenderMultiColumnSet.cpp
index 437aa4264..b25222415 100644
--- a/Source/WebCore/rendering/RenderMultiColumnSet.cpp
+++ b/Source/WebCore/rendering/RenderMultiColumnSet.cpp
@@ -25,14 +25,41 @@
#include "config.h"
#include "RenderMultiColumnSet.h"
+#include "RenderMultiColumnBlock.h"
namespace WebCore {
RenderMultiColumnSet::RenderMultiColumnSet(Node* node, RenderFlowThread* flowThread)
: RenderRegionSet(node, flowThread)
+ , m_columnCount(1)
+ , m_columnWidth(ZERO_LAYOUT_UNIT)
+ , m_columnHeight(ZERO_LAYOUT_UNIT)
{
}
+void RenderMultiColumnSet::computeLogicalWidth()
+{
+ // Our logical width starts off matching the column block itself.
+ // This width will be fixed up after the flow thread lays out once it is determined exactly how many
+ // columns we ended up holding.
+ // FIXME: When we add regions support, we'll start it off at the width of the multi-column
+ // block in that particular region.
+ setLogicalWidth(parentBox()->contentLogicalWidth());
+
+ RenderMultiColumnBlock* parentBlock = toRenderMultiColumnBlock(parent());
+ setColumnWidthAndCount(parentBlock->columnWidth(), parentBlock->columnCount()); // FIXME: This will eventually vary if we are contained inside regions.
+}
+
+void RenderMultiColumnSet::computeLogicalHeight()
+{
+ // Make sure our column height is up to date.
+ RenderMultiColumnBlock* parentBlock = toRenderMultiColumnBlock(parent());
+ setColumnHeight(parentBlock->columnHeight()); // FIXME: Once we make more than one column set, this will become variable.
+
+ // Our logical height is always just the height of our columns.
+ setLogicalHeight(columnHeight());
+}
+
const char* RenderMultiColumnSet::renderName() const
{
return "RenderMultiColumnSet";