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

Side by Side Diff: third_party/WebKit/Source/web/RemoteFrameOwner.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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be found 2 // Use of this source code is governed by a BSD-style license that can be found
3 // in the LICENSE file. 3 // in the LICENSE file.
4 4
5 #include "web/RemoteFrameOwner.h" 5 #include "web/RemoteFrameOwner.h"
6 6
7 #include "core/frame/LocalFrame.h" 7 #include "core/frame/LocalFrame.h"
8 #include "public/web/WebFrameClient.h" 8 #include "public/web/WebFrameClient.h"
9 #include "web/WebLocalFrameImpl.h" 9 #include "web/WebLocalFrameImpl.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 RemoteFrameOwner::RemoteFrameOwner( 13 RemoteFrameOwner::RemoteFrameOwner(
14 SandboxFlags flags, 14 SandboxFlags flags,
15 const WebFrameOwnerProperties& frameOwnerProperties) 15 const WebFrameOwnerProperties& frameOwnerProperties)
16 : m_sandboxFlags(flags), 16 : m_sandboxFlags(flags),
17 m_scrolling( 17 m_scrolling(
18 static_cast<ScrollbarMode>(frameOwnerProperties.scrollingMode)), 18 static_cast<ScrollbarMode>(frameOwnerProperties.scrollingMode)),
19 m_marginWidth(frameOwnerProperties.marginWidth), 19 m_marginWidth(frameOwnerProperties.marginWidth),
20 m_marginHeight(frameOwnerProperties.marginHeight), 20 m_marginHeight(frameOwnerProperties.marginHeight),
21 m_allowFullscreen(frameOwnerProperties.allowFullscreen), 21 m_allowFullscreen(frameOwnerProperties.allowFullscreen),
22 m_allowPaymentRequest(frameOwnerProperties.allowPaymentRequest), 22 m_allowPaymentRequest(frameOwnerProperties.allowPaymentRequest),
23 m_isDisplayNone(frameOwnerProperties.isDisplayNone),
23 m_csp(frameOwnerProperties.requiredCsp) {} 24 m_csp(frameOwnerProperties.requiredCsp) {}
24 25
25 DEFINE_TRACE(RemoteFrameOwner) { 26 DEFINE_TRACE(RemoteFrameOwner) {
26 visitor->trace(m_frame); 27 visitor->trace(m_frame);
27 FrameOwner::trace(visitor); 28 FrameOwner::trace(visitor);
28 } 29 }
29 30
30 void RemoteFrameOwner::setScrollingMode( 31 void RemoteFrameOwner::setScrollingMode(
31 WebFrameOwnerProperties::ScrollingMode mode) { 32 WebFrameOwnerProperties::ScrollingMode mode) {
32 m_scrolling = static_cast<ScrollbarMode>(mode); 33 m_scrolling = static_cast<ScrollbarMode>(mode);
33 } 34 }
34 35
35 void RemoteFrameOwner::setContentFrame(Frame& frame) { 36 void RemoteFrameOwner::setContentFrame(Frame& frame) {
36 m_frame = &frame; 37 m_frame = &frame;
37 } 38 }
38 39
39 void RemoteFrameOwner::clearContentFrame() { 40 void RemoteFrameOwner::clearContentFrame() {
40 DCHECK_EQ(m_frame->owner(), this); 41 DCHECK_EQ(m_frame->owner(), this);
41 m_frame = nullptr; 42 m_frame = nullptr;
42 } 43 }
43 44
44 void RemoteFrameOwner::dispatchLoad() { 45 void RemoteFrameOwner::dispatchLoad() {
45 WebLocalFrameImpl* webFrame = 46 WebLocalFrameImpl* webFrame =
46 WebLocalFrameImpl::fromFrame(toLocalFrame(*m_frame)); 47 WebLocalFrameImpl::fromFrame(toLocalFrame(*m_frame));
47 webFrame->client()->dispatchLoad(); 48 webFrame->client()->dispatchLoad();
48 } 49 }
49 50
50 } // namespace blink 51 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698