Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1127)

Unified Diff: Source/core/layout/LayoutBlockFlow.cpp

Issue 1092453003: [New Multicolumn] Disallow multicol on ruby elements. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/multicol/ruby-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « LayoutTests/fast/multicol/ruby-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698