Index: Source/core/layout/LayoutBlockFlow.cpp |
diff --git a/Source/core/layout/LayoutBlockFlow.cpp b/Source/core/layout/LayoutBlockFlow.cpp |
index eefe84afaa54d6ede41a6162b7669b3f7f2d46f3..820ac1f0e3e61311e98aee460e60da71113a18b1 100644 |
--- a/Source/core/layout/LayoutBlockFlow.cpp |
+++ b/Source/core/layout/LayoutBlockFlow.cpp |
@@ -3099,8 +3099,17 @@ void LayoutBlockFlow::createOrDestroyMultiColumnFlowThreadIfNeeded(const Compute |
if (type == NoFlowThread || multiColumnFlowThread()) |
return; |
+ // Ruby elements manage child insertion in a special way, and would mess up insertion of the |
+ // flow thread. The flow thread needs to be a direct child of the multicol block (|this|). |
+ if (isRuby()) |
+ return; |
+ |
LayoutMultiColumnFlowThread* flowThread = createMultiColumnFlowThread(type); |
addChild(flowThread); |
+ |
+ // Check that addChild() put the flow thread as a direct child, and didn't do fancy things. |
+ ASSERT(flowThread->parent() == this); |
+ |
flowThread->populate(); |
LayoutBlockFlowRareData& rareData = ensureRareData(); |
ASSERT(!rareData.m_multiColumnFlowThread); |