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()); |