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

Side by Side Diff: third_party/WebKit/Source/web/RemoteFrameOwner.h

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 #ifndef RemoteFrameOwner_h 5 #ifndef RemoteFrameOwner_h
6 #define RemoteFrameOwner_h 6 #define RemoteFrameOwner_h
7 7
8 #include "core/frame/FrameOwner.h" 8 #include "core/frame/FrameOwner.h"
9 #include "platform/scroll/ScrollTypes.h" 9 #include "platform/scroll/ScrollTypes.h"
10 #include "public/web/WebFrameOwnerProperties.h" 10 #include "public/web/WebFrameOwnerProperties.h"
(...skipping 24 matching lines...) Expand all
35 void setSandboxFlags(SandboxFlags flags) { m_sandboxFlags = flags; } 35 void setSandboxFlags(SandboxFlags flags) { m_sandboxFlags = flags; }
36 void dispatchLoad() override; 36 void dispatchLoad() override;
37 // TODO(dcheng): Implement. 37 // TODO(dcheng): Implement.
38 bool canRenderFallbackContent() const override { return false; } 38 bool canRenderFallbackContent() const override { return false; }
39 void renderFallbackContent() override {} 39 void renderFallbackContent() override {}
40 ScrollbarMode scrollingMode() const override { return m_scrolling; } 40 ScrollbarMode scrollingMode() const override { return m_scrolling; }
41 int marginWidth() const override { return m_marginWidth; } 41 int marginWidth() const override { return m_marginWidth; }
42 int marginHeight() const override { return m_marginHeight; } 42 int marginHeight() const override { return m_marginHeight; }
43 bool allowFullscreen() const override { return m_allowFullscreen; } 43 bool allowFullscreen() const override { return m_allowFullscreen; }
44 bool allowPaymentRequest() const override { return m_allowPaymentRequest; } 44 bool allowPaymentRequest() const override { return m_allowPaymentRequest; }
45 bool isDisplayNone() const override { return m_isDisplayNone; }
45 AtomicString csp() const override { return m_csp; } 46 AtomicString csp() const override { return m_csp; }
46 const WebVector<WebPermissionType>& delegatedPermissions() const override { 47 const WebVector<WebPermissionType>& delegatedPermissions() const override {
47 return m_delegatedPermissions; 48 return m_delegatedPermissions;
48 } 49 }
49 50
50 void setScrollingMode(WebFrameOwnerProperties::ScrollingMode); 51 void setScrollingMode(WebFrameOwnerProperties::ScrollingMode);
51 void setMarginWidth(int marginWidth) { m_marginWidth = marginWidth; } 52 void setMarginWidth(int marginWidth) { m_marginWidth = marginWidth; }
52 void setMarginHeight(int marginHeight) { m_marginHeight = marginHeight; } 53 void setMarginHeight(int marginHeight) { m_marginHeight = marginHeight; }
53 void setAllowFullscreen(bool allowFullscreen) { 54 void setAllowFullscreen(bool allowFullscreen) {
54 m_allowFullscreen = allowFullscreen; 55 m_allowFullscreen = allowFullscreen;
55 } 56 }
56 void setAllowPaymentRequest(bool allowPaymentRequest) { 57 void setAllowPaymentRequest(bool allowPaymentRequest) {
57 m_allowPaymentRequest = allowPaymentRequest; 58 m_allowPaymentRequest = allowPaymentRequest;
58 } 59 }
60 void setIsDisplayNone(bool isDisplayNone) { m_isDisplayNone = isDisplayNone; }
59 void setCsp(const WebString& csp) { m_csp = csp; } 61 void setCsp(const WebString& csp) { m_csp = csp; }
60 void setDelegatedpermissions( 62 void setDelegatedpermissions(
61 const WebVector<WebPermissionType>& delegatedPermissions) { 63 const WebVector<WebPermissionType>& delegatedPermissions) {
62 m_delegatedPermissions = delegatedPermissions; 64 m_delegatedPermissions = delegatedPermissions;
63 } 65 }
64 66
65 DECLARE_VIRTUAL_TRACE(); 67 DECLARE_VIRTUAL_TRACE();
66 68
67 private: 69 private:
68 RemoteFrameOwner(SandboxFlags, const WebFrameOwnerProperties&); 70 RemoteFrameOwner(SandboxFlags, const WebFrameOwnerProperties&);
69 71
70 // Intentionally private to prevent redundant checks when the type is 72 // Intentionally private to prevent redundant checks when the type is
71 // already HTMLFrameOwnerElement. 73 // already HTMLFrameOwnerElement.
72 bool isLocal() const override { return false; } 74 bool isLocal() const override { return false; }
73 bool isRemote() const override { return true; } 75 bool isRemote() const override { return true; }
74 76
75 Member<Frame> m_frame; 77 Member<Frame> m_frame;
76 SandboxFlags m_sandboxFlags; 78 SandboxFlags m_sandboxFlags;
77 ScrollbarMode m_scrolling; 79 ScrollbarMode m_scrolling;
78 int m_marginWidth; 80 int m_marginWidth;
79 int m_marginHeight; 81 int m_marginHeight;
80 bool m_allowFullscreen; 82 bool m_allowFullscreen;
81 bool m_allowPaymentRequest; 83 bool m_allowPaymentRequest;
84 bool m_isDisplayNone;
82 WebString m_csp; 85 WebString m_csp;
83 WebVector<WebPermissionType> m_delegatedPermissions; 86 WebVector<WebPermissionType> m_delegatedPermissions;
84 }; 87 };
85 88
86 DEFINE_TYPE_CASTS(RemoteFrameOwner, 89 DEFINE_TYPE_CASTS(RemoteFrameOwner,
87 FrameOwner, 90 FrameOwner,
88 owner, 91 owner,
89 owner->isRemote(), 92 owner->isRemote(),
90 owner.isRemote()); 93 owner.isRemote());
91 94
92 } // namespace blink 95 } // namespace blink
93 96
94 #endif // RemoteFrameOwner_h 97 #endif // RemoteFrameOwner_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698