REGRESSION (r182215): Reproducible crash at drawsvg.org due to reentrant layout
[WebKit-https.git] / Source / WebCore / page / FrameView.cpp
index 2a898802b7777d83805611d98f1b823b4ca1a6f9..abc63bfc8555ac3dc7f1f3ca15433dd42f77dbc3 100644 (file)
@@ -1131,13 +1131,9 @@ inline void FrameView::forceLayoutParentViewIfNeeded()
     // FrameView for a layout. After that the RenderEmbeddedObject (ownerRenderer) carries the
     // correct size, which RenderSVGRoot::computeReplacedLogicalWidth/Height rely on, when laying
     // out for the first time, or when the RenderSVGRoot size has changed dynamically (eg. via <script>).
-    Ref<FrameView> frameView(ownerRenderer->view().frameView());
 
-    // Mark the owner renderer as needing layout.
     ownerRenderer->setNeedsLayoutAndPrefWidthsRecalc();
-
-    // Synchronously enter layout, to layout the view containing the host object/embed/iframe.
-    frameView->layout();
+    ownerRenderer->view().frameView().scheduleRelayout();
 }
 
 void FrameView::layout(bool allowSubtree)