Index: Source/WebCore/rendering/RenderFrameBase.cpp |
diff --git a/Source/WebCore/rendering/RenderFrameBase.cpp b/Source/WebCore/rendering/RenderFrameBase.cpp |
index f2be9f647a233fc7072daf33557780e3fd11929a..a0cab7bc07b671c30c2ac9dde042ea47c6605ac8 100644 |
--- a/Source/WebCore/rendering/RenderFrameBase.cpp |
+++ b/Source/WebCore/rendering/RenderFrameBase.cpp |
@@ -32,7 +32,7 @@ |
#include "RenderView.h" |
namespace WebCore { |
- |
+ |
RenderFrameBase::RenderFrameBase(Element* element) |
: RenderPart(element) |
{ |
@@ -52,54 +52,4 @@ inline bool shouldExpandFrame(LayoutUnit width, LayoutUnit height, bool hasFixed |
return true; |
} |
-void RenderFrameBase::layoutWithFlattening(bool hasFixedWidth, bool hasFixedHeight) |
-{ |
- FrameView* childFrameView = toFrameView(widget()); |
- RenderView* childRoot = childFrameView ? childFrameView->frame()->contentRenderer() : 0; |
- |
- if (!childRoot || !shouldExpandFrame(width(), height(), hasFixedWidth, hasFixedHeight)) { |
- updateWidgetPosition(); |
- if (childFrameView) |
- childFrameView->layout(); |
- setNeedsLayout(false); |
- return; |
- } |
- |
- // need to update to calculate min/max correctly |
- updateWidgetPosition(); |
- |
- // if scrollbars are off, and the width or height are fixed |
- // we obey them and do not expand. With frame flattening |
- // no subframe much ever become scrollable. |
- |
- HTMLFrameElementBase* element = static_cast<HTMLFrameElementBase*>(node()); |
- bool isScrollable = element->scrollingMode() != ScrollbarAlwaysOff; |
- |
- // consider iframe inset border |
- int hBorder = borderLeft() + borderRight(); |
- int vBorder = borderTop() + borderBottom(); |
- |
- // make sure minimum preferred width is enforced |
- if (isScrollable || !hasFixedWidth) { |
- setWidth(max(width(), childRoot->minPreferredLogicalWidth() + hBorder)); |
- // update again to pass the new width to the child frame |
- updateWidgetPosition(); |
- childFrameView->layout(); |
- } |
- |
- // expand the frame by setting frame height = content height |
- if (isScrollable || !hasFixedHeight || childRoot->isFrameSet()) |
- setHeight(max<LayoutUnit>(height(), childFrameView->contentsHeight() + vBorder)); |
- if (isScrollable || !hasFixedWidth || childRoot->isFrameSet()) |
- setWidth(max<LayoutUnit>(width(), childFrameView->contentsWidth() + hBorder)); |
- |
- updateWidgetPosition(); |
- |
- ASSERT(!childFrameView->layoutPending()); |
- ASSERT(!childRoot->needsLayout()); |
- ASSERT(!childRoot->firstChild() || !childRoot->firstChild()->firstChild() || !childRoot->firstChild()->firstChild()->needsLayout()); |
- |
- setNeedsLayout(false); |
-} |
- |
} |