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

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: 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/frame/FrameOwner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 77c1366b3133990800bad1df47978b3df3500aa2..3345c0fdc8beb318535d43941143d8a39ca3e254 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -4497,13 +4497,20 @@ HTMLFrameOwnerElement* Document::localOwner() const {
void Document::willChangeFrameOwnerProperties(int marginWidth,
int marginHeight,
- ScrollbarMode scrollingMode) {
- if (!body())
- return;
-
+ ScrollbarMode scrollingMode,
+ bool isDisplayNone) {
DCHECK(frame() && frame()->owner());
FrameOwner* owner = frame()->owner();
+ if (documentElement()) {
+ if (isDisplayNone != owner->isDisplayNone()) {
+ documentElement()->lazyReattachIfAttached();
+ }
+ }
+
+ if (!body())
+ return;
+
if (marginWidth != owner->marginWidth())
body()->setIntegralAttribute(marginwidthAttr, marginWidth);
if (marginHeight != owner->marginHeight())
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/frame/FrameOwner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698