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 b84d3ecc58a913302b327dec36d660c346fc8185..374293e898c154a038231f87d6e7e1010b63b406 100644 |
--- a/third_party/WebKit/Source/core/layout/LayoutView.cpp |
+++ b/third_party/WebKit/Source/core/layout/LayoutView.cpp |
@@ -43,6 +43,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" |
@@ -188,6 +189,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()); |