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: Rebase. 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
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 987f43e2c966951bc6e1f3cf4a3d0644d1e95c0b..f1890c6eb18f8c31a9c4399aed95a6a9e6a0a86d 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -4494,13 +4494,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()) {
dcheng 2017/02/05 09:56:08 Nit: combine with the previous if ()
+ 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