From c9aacd00d106d418276e0cacdaa82d2c51f90e66 Mon Sep 17 00:00:00 2001 From: Patrick Scott Date: Thu, 20 May 2010 11:41:22 -0400 Subject: Fix the infinite loop when flatten iframes. Somehow javascript can cause a layout of the parent renderer in the middle of the FrameView's layout. Bug: 2614175 Change-Id: I37ed3d2e88de1762715e0d0712549d8fab0f12d2 --- WebCore/rendering/RenderIFrame.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'WebCore') diff --git a/WebCore/rendering/RenderIFrame.cpp b/WebCore/rendering/RenderIFrame.cpp index 90cac14..146e028 100644 --- a/WebCore/rendering/RenderIFrame.cpp +++ b/WebCore/rendering/RenderIFrame.cpp @@ -58,9 +58,7 @@ void RenderIFrame::calcHeight() updateWidgetPosition(); // Layout to get the content height - do { - view->layout(); - } while (view->layoutPending() || root->needsLayout()); + view->layout(); int extraHeight = paddingTop() + paddingBottom() + borderTop() + borderBottom(); setHeight(max(width(), view->contentsHeight() + extraHeight)); @@ -110,9 +108,7 @@ void RenderIFrame::calcWidth() updateWidgetPosition(); // Layout to get the content width - do { - view->layout(); - } while (view->layoutPending() || root->needsLayout()); + view->layout(); setWidth(max(width(), view->contentsWidth() + extraWidth)); @@ -208,9 +204,7 @@ void RenderIFrame::layout() } // Layout the view. - do { - view->layout(); - } while (view->layoutPending() || root->needsLayout()); + view->layout(); int contentHeight = view->contentsHeight(); int contentWidth = view->contentsWidth(); -- cgit v1.1