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

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: Add new layout tests. Created 4 years 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 f211a982b81cdf218b5e0441a5a251c52b194d3a..0daccaf3c403177d8f3a02ada90ec7e15f1083c4 100644
--- a/third_party/WebKit/Source/core/layout/LayoutView.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutView.cpp
@@ -188,6 +188,13 @@ bool LayoutView::isChildAllowed(LayoutObject* child,
return child->isBox();
}
+bool LayoutView::canHaveChildren() const {
+ FrameOwner* owner = frame()->owner();
+ if (!owner)
+ return true;
+ return !owner->isDisplayNone();
+}
+
void LayoutView::layoutContent() {
ASSERT(needsLayout());

Powered by Google App Engine
This is Rietveld 408576698