Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(273)

Unified Diff: Source/WebCore/rendering/RenderFrameBase.cpp

Issue 13963006: Remove frame flattening support as Chromium has no intention of using it (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
-}
-
}

Powered by Google App Engine
This is Rietveld 408576698