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

Unified Diff: Source/core/rendering/RenderIFrame.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
« no previous file with comments | « Source/core/rendering/RenderIFrame.h ('k') | Source/core/rendering/RenderPart.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderIFrame.cpp
diff --git a/Source/core/rendering/RenderIFrame.cpp b/Source/core/rendering/RenderIFrame.cpp
index ae116ac5254ab0d3c5081792642561d06cd78bf8..36205b125db7ba775960349364012c0639cd4136 100644
--- a/Source/core/rendering/RenderIFrame.cpp
+++ b/Source/core/rendering/RenderIFrame.cpp
@@ -37,9 +37,9 @@
namespace WebCore {
using namespace HTMLNames;
-
+
RenderIFrame::RenderIFrame(Element* element)
- : RenderFrameBase(element)
+ : RenderPart(element)
{
}
@@ -57,7 +57,7 @@ bool RenderIFrame::isInlineBlockOrInlineTable() const
LayoutUnit RenderIFrame::minPreferredLogicalWidth() const
{
if (!isSeamless())
- return RenderFrameBase::minPreferredLogicalWidth();
+ return RenderPart::minPreferredLogicalWidth();
RenderView* childRoot = contentRootRenderer();
if (!childRoot)
@@ -69,7 +69,7 @@ LayoutUnit RenderIFrame::minPreferredLogicalWidth() const
LayoutUnit RenderIFrame::maxPreferredLogicalWidth() const
{
if (!isSeamless())
- return RenderFrameBase::maxPreferredLogicalWidth();
+ return RenderPart::maxPreferredLogicalWidth();
RenderView* childRoot = contentRootRenderer();
if (!childRoot)
@@ -85,7 +85,7 @@ bool RenderIFrame::isSeamless() const
bool RenderIFrame::requiresLayer() const
{
- return RenderFrameBase::requiresLayer() || style()->resize() != RESIZE_NONE;
+ return RenderPart::requiresLayer() || style()->resize() != RESIZE_NONE;
}
RenderView* RenderIFrame::contentRootRenderer() const
@@ -96,35 +96,6 @@ RenderView* RenderIFrame::contentRootRenderer() const
return childFrameView ? childFrameView->frame()->contentRenderer() : 0;
}
-bool RenderIFrame::flattenFrame() const
-{
- if (!node() || !node()->hasTagName(iframeTag))
- return false;
-
- HTMLIFrameElement* element = static_cast<HTMLIFrameElement*>(node());
- Frame* frame = element->document()->frame();
-
- if (isSeamless())
- return false; // Seamless iframes are already "flat", don't try to flatten them.
-
- bool enabled = frame && frame->settings() && frame->settings()->frameFlatteningEnabled();
-
- if (!enabled || !frame->page())
- return false;
-
- if (style()->width().isFixed() && style()->height().isFixed()) {
- // Do not flatten iframes with scrolling="no".
- if (element->scrollingMode() == ScrollbarAlwaysOff)
- return false;
- if (style()->width().value() <= 0 || style()->height().value() <= 0)
- return false;
- }
-
- // Do not flatten offscreen inner frames during frame flattening, as flattening might make them visible.
- IntRect boundingRect = absoluteBoundingBoxRectIgnoringTransforms();
- return boundingRect.maxX() > 0 && boundingRect.maxY() > 0;
-}
-
void RenderIFrame::layoutSeamlessly()
{
updateLogicalWidth();
@@ -162,9 +133,6 @@ void RenderIFrame::layout()
updateLogicalWidth();
// No kids to layout as a replaced element.
updateLogicalHeight();
-
- if (flattenFrame())
- layoutWithFlattening(style()->width().isFixed(), style()->height().isFixed());
}
m_overflow.clear();
« no previous file with comments | « Source/core/rendering/RenderIFrame.h ('k') | Source/core/rendering/RenderPart.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698