diff options
author | Patrick Scott <phanna@android.com> | 2010-05-20 11:41:22 -0400 |
---|---|---|
committer | Patrick Scott <phanna@android.com> | 2010-05-20 11:41:22 -0400 |
commit | c9aacd00d106d418276e0cacdaa82d2c51f90e66 (patch) | |
tree | 80898e1ab6e57391456e13a17b6e91aad18989e1 | |
parent | eb29d2513e86b5c64c1bbdda343cfae3cfc302b7 (diff) | |
download | external_webkit-c9aacd00d106d418276e0cacdaa82d2c51f90e66.zip external_webkit-c9aacd00d106d418276e0cacdaa82d2c51f90e66.tar.gz external_webkit-c9aacd00d106d418276e0cacdaa82d2c51f90e66.tar.bz2 |
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
-rw-r--r-- | WebCore/rendering/RenderIFrame.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
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(); |