REGRESSION (r168046): Crash in WebCore::InlineBox::renderer / WebCore::RenderFlowThre...
[WebKit-https.git] / Source / WebCore / rendering / RenderBlock.cpp
index a9fd291f4fed9e966082e827f50a8e36215dbbb2..ede343f9b259b7e94b1e608385b498dd51e959c7 100644 (file)
@@ -672,9 +672,8 @@ void RenderBlock::collapseAnonymousBoxChild(RenderBlock& parent, RenderBlock* ch
     parent.setChildrenInline(child->childrenInline());
     RenderObject* nextSibling = child->nextSibling();
 
-    RenderFlowThread* childFlowThread = child->flowThreadContainingBlock();
-    if (is<RenderNamedFlowThread>(childFlowThread))
-        downcast<RenderNamedFlowThread>(*childFlowThread).removeFlowChildInfo(child);
+    if (auto* childFlowThread = child->flowThreadContainingBlock())
+        childFlowThread->removeFlowChildInfo(child);
 
     parent.removeChildInternal(*child, child->hasLayer() ? NotifyChildren : DontNotifyChildren);
     child->moveAllChildrenTo(&parent, nextSibling, child->hasLayer());