summaryrefslogtreecommitdiff
path: root/Source/WebCore/rendering/RenderMultiColumnBlock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/rendering/RenderMultiColumnBlock.cpp')
-rw-r--r--Source/WebCore/rendering/RenderMultiColumnBlock.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/Source/WebCore/rendering/RenderMultiColumnBlock.cpp b/Source/WebCore/rendering/RenderMultiColumnBlock.cpp
index d29055e68..d7f43ff50 100644
--- a/Source/WebCore/rendering/RenderMultiColumnBlock.cpp
+++ b/Source/WebCore/rendering/RenderMultiColumnBlock.cpp
@@ -25,6 +25,7 @@
#include "config.h"
#include "RenderMultiColumnBlock.h"
+#include "RenderMultiColumnFlowThread.h"
using namespace std;
@@ -32,6 +33,7 @@ namespace WebCore {
RenderMultiColumnBlock::RenderMultiColumnBlock(Node* node)
: RenderBlock(node)
+ , m_flowThread(0)
, m_columnCount(1)
, m_columnWidth(0)
{
@@ -73,6 +75,22 @@ bool RenderMultiColumnBlock::recomputeLogicalWidth()
return relayoutChildren;
}
+void RenderMultiColumnBlock::addChild(RenderObject* newChild, RenderObject* beforeChild)
+{
+ if (!m_flowThread) {
+ m_flowThread = new (renderArena()) RenderMultiColumnFlowThread(document());
+ m_flowThread->setStyle(RenderStyle::createAnonymousStyleWithDisplay(style(), BLOCK));
+ RenderBlock::addChild(m_flowThread); // Always put the flow thread at the end.
+ }
+
+ // Column sets are siblings of the flow thread. All children designed to be in the columns, however, are part
+ // of the flow thread itself.
+ if (newChild->isRenderMultiColumnSet())
+ RenderBlock::addChild(newChild, beforeChild);
+ else
+ m_flowThread->addChild(newChild, beforeChild);
+}
+
const char* RenderMultiColumnBlock::renderName() const
{
if (isFloating())