<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:zalan@apple.com" title="zalan <zalan@apple.com>"> <span class="fn">zalan</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - ASSERTION FAILED: canHaveChildren() || canHaveGeneratedChildren() in WebCore::RenderElement::insertChildInternal"
href="https://bugs.webkit.org/show_bug.cgi?id=123331">bug 123331</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>zalan@apple.com
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - ASSERTION FAILED: canHaveChildren() || canHaveGeneratedChildren() in WebCore::RenderElement::insertChildInternal"
href="https://bugs.webkit.org/show_bug.cgi?id=123331#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - ASSERTION FAILED: canHaveChildren() || canHaveGeneratedChildren() in WebCore::RenderElement::insertChildInternal"
href="https://bugs.webkit.org/show_bug.cgi?id=123331">bug 123331</a>
from <span class="vcard"><a class="email" href="mailto:zalan@apple.com" title="zalan <zalan@apple.com>"> <span class="fn">zalan</span></a>
</span></b>
<pre>This is funny. We assert on attaching the fragment because the _fragment_ can't have children. We force the fragment no-child policy too early while the fragment itself is being added.
diff --git a/Source/WebCore/rendering/RenderBlockFlow.cpp b/Source/WebCore/rendering/RenderBlockFlow.cpp
index 03f756c..5c62e13 100644
--- a/Source/WebCore/rendering/RenderBlockFlow.cpp
+++ b/Source/WebCore/rendering/RenderBlockFlow.cpp
@@ -3150,9 +3150,9 @@ void RenderBlockFlow::createRenderNamedFlowFragmentIfNeeded()
// FIXME: Multicolumn regions not yet supported (<a href="http://dev.w3.org/csswg/css-regions/#multi-column-regions">http://dev.w3.org/csswg/css-regions/#multi-column-regions</a>)
if (style().isDisplayRegionType() && style().hasFlowFrom() && !style().specifiesColumns()) {
RenderNamedFlowFragment* flowFragment = new RenderNamedFlowFragment(document(), RenderNamedFlowFragment::createStyle(style()));
+ addChild(flowFragment);
flowFragment->initializeStyle();
setRenderNamedFlowFragment(flowFragment);
- addChild(renderNamedFlowFragment());
}
}</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>