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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutView.cpp

Issue 2564633002: Don't create layout objects for children of display-none iframes. (Closed)
Patch Set: Rebaseline. Created 3 years, 10 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: third_party/WebKit/Source/core/layout/LayoutView.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutView.cpp b/third_party/WebKit/Source/core/layout/LayoutView.cpp
index 97b8fa5a79adac5aef54633c5b53d5df226b11b3..516bcb990e322e1089549d8e9053c139573879a5 100644
--- a/third_party/WebKit/Source/core/layout/LayoutView.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutView.cpp
@@ -21,6 +21,7 @@
#include "core/layout/LayoutView.h"
+#include <inttypes.h>
#include "core/dom/Document.h"
#include "core/dom/Element.h"
#include "core/editing/FrameSelection.h"
@@ -41,6 +42,7 @@
#include "core/paint/ViewPainter.h"
#include "core/svg/SVGDocumentExtensions.h"
#include "platform/Histogram.h"
+#include "platform/RuntimeEnabledFeatures.h"
#include "platform/geometry/FloatQuad.h"
#include "platform/geometry/TransformState.h"
#include "platform/graphics/paint/PaintController.h"
@@ -48,7 +50,6 @@
#include "platform/instrumentation/tracing/TracedValue.h"
#include "public/platform/Platform.h"
#include "wtf/PtrUtil.h"
-#include <inttypes.h>
namespace blink {
@@ -187,6 +188,15 @@ bool LayoutView::isChildAllowed(LayoutObject* child,
return child->isBox();
}
+bool LayoutView::canHaveChildren() const {
+ FrameOwner* owner = frame()->owner();
+ if (!owner)
+ return true;
+ if (!RuntimeEnabledFeatures::displayNoneIFrameCreatesNoLayoutObjectEnabled())
+ return true;
+ return !owner->isDisplayNone();
+}
+
void LayoutView::layoutContent() {
ASSERT(needsLayout());
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutView.h ('k') | third_party/WebKit/Source/core/layout/VisualRectMappingTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698