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

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2564633002: Don't create layout objects for children of display-none iframes. (Closed)
Patch Set: Comments from esprehn. 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/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 733298fd28a216b3496cf0b0ba58fabbf04d3dc4..cd929dc69c5fd5979c526928a7be13e77c63a3da 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -4458,13 +4458,21 @@ HTMLFrameOwnerElement* Document::localOwner() const {
void Document::willChangeFrameOwnerProperties(int marginWidth,
int marginHeight,
- ScrollbarMode scrollingMode) {
- if (!body())
+ ScrollbarMode scrollingMode,
+ bool isDisplayNone) {
+ if (!documentElement())
return;
DCHECK(frame() && frame()->owner());
FrameOwner* owner = frame()->owner();
+ if (isDisplayNone != owner->isDisplayNone()) {
+ documentElement()->lazyReattachIfAttached();
+ }
+
+ if (!body())
+ return;
+
if (marginWidth != owner->marginWidth())
body()->setIntegralAttribute(marginwidthAttr, marginWidth);
if (marginHeight != owner->marginHeight())

Powered by Google App Engine
This is Rietveld 408576698