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

Side by Side Diff: third_party/WebKit/Source/web/WebFrame.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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "public/web/WebFrame.h" 5 #include "public/web/WebFrame.h"
6 6
7 #include "bindings/core/v8/WindowProxyManager.h" 7 #include "bindings/core/v8/WindowProxyManager.h"
8 #include "core/HTMLNames.h" 8 #include "core/HTMLNames.h"
9 #include "core/frame/FrameHost.h" 9 #include "core/frame/FrameHost.h"
10 #include "core/frame/FrameView.h" 10 #include "core/frame/FrameView.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 // for frames with a remote owner. 142 // for frames with a remote owner.
143 RemoteFrameOwner* owner = toRemoteFrameOwner(toImplBase()->frame()->owner()); 143 RemoteFrameOwner* owner = toRemoteFrameOwner(toImplBase()->frame()->owner());
144 DCHECK(owner); 144 DCHECK(owner);
145 145
146 Frame* frame = toImplBase()->frame(); 146 Frame* frame = toImplBase()->frame();
147 DCHECK(frame); 147 DCHECK(frame);
148 148
149 if (frame->isLocalFrame()) { 149 if (frame->isLocalFrame()) {
150 toLocalFrame(frame)->document()->willChangeFrameOwnerProperties( 150 toLocalFrame(frame)->document()->willChangeFrameOwnerProperties(
151 properties.marginWidth, properties.marginHeight, 151 properties.marginWidth, properties.marginHeight,
152 static_cast<ScrollbarMode>(properties.scrollingMode)); 152 static_cast<ScrollbarMode>(properties.scrollingMode),
153 properties.isDisplayNone);
153 } 154 }
154 155
155 owner->setBrowsingContextContainerName(properties.name); 156 owner->setBrowsingContextContainerName(properties.name);
156 owner->setScrollingMode(properties.scrollingMode); 157 owner->setScrollingMode(properties.scrollingMode);
157 owner->setMarginWidth(properties.marginWidth); 158 owner->setMarginWidth(properties.marginWidth);
158 owner->setMarginHeight(properties.marginHeight); 159 owner->setMarginHeight(properties.marginHeight);
159 owner->setAllowFullscreen(properties.allowFullscreen); 160 owner->setAllowFullscreen(properties.allowFullscreen);
160 owner->setAllowPaymentRequest(properties.allowPaymentRequest); 161 owner->setAllowPaymentRequest(properties.allowPaymentRequest);
162 owner->setIsDisplayNone(properties.isDisplayNone);
161 owner->setCsp(properties.requiredCsp); 163 owner->setCsp(properties.requiredCsp);
162 owner->setDelegatedpermissions(properties.delegatedPermissions); 164 owner->setDelegatedpermissions(properties.delegatedPermissions);
163 } 165 }
164 166
165 WebFrame* WebFrame::opener() const { 167 WebFrame* WebFrame::opener() const {
166 return m_opener; 168 return m_opener;
167 } 169 }
168 170
169 void WebFrame::setOpener(WebFrame* opener) { 171 void WebFrame::setOpener(WebFrame* opener) {
170 if (m_opener) 172 if (m_opener)
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 // m_opener is a weak reference. 322 // m_opener is a weak reference.
321 frame->m_openedFrameTracker->traceFrames(visitor); 323 frame->m_openedFrameTracker->traceFrames(visitor);
322 } 324 }
323 325
324 void WebFrame::clearWeakFrames(Visitor* visitor) { 326 void WebFrame::clearWeakFrames(Visitor* visitor) {
325 if (!isFrameAlive(m_opener)) 327 if (!isFrameAlive(m_opener))
326 m_opener = nullptr; 328 m_opener = nullptr;
327 } 329 }
328 330
329 } // namespace blink 331 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698