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

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

Issue 2743053003: [Reland #1] Don't create layout objects for children of display-none iframes. (Closed)
Patch Set: Fix DOM object leaks. Diff this against Patch Set 10. Created 3 years, 9 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 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 29 matching lines...) Expand all
40 void renderFallbackContent() override {} 40 void renderFallbackContent() override {}
41 41
42 AtomicString browsingContextContainerName() const override { 42 AtomicString browsingContextContainerName() const override {
43 return m_browsingContextContainerName; 43 return m_browsingContextContainerName;
44 } 44 }
45 ScrollbarMode scrollingMode() const override { return m_scrolling; } 45 ScrollbarMode scrollingMode() const override { return m_scrolling; }
46 int marginWidth() const override { return m_marginWidth; } 46 int marginWidth() const override { return m_marginWidth; }
47 int marginHeight() const override { return m_marginHeight; } 47 int marginHeight() const override { return m_marginHeight; }
48 bool allowFullscreen() const override { return m_allowFullscreen; } 48 bool allowFullscreen() const override { return m_allowFullscreen; }
49 bool allowPaymentRequest() const override { return m_allowPaymentRequest; } 49 bool allowPaymentRequest() const override { return m_allowPaymentRequest; }
50 bool isDisplayNone() const override { return m_isDisplayNone; }
50 AtomicString csp() const override { return m_csp; } 51 AtomicString csp() const override { return m_csp; }
51 const WebVector<mojom::blink::PermissionName>& delegatedPermissions() 52 const WebVector<mojom::blink::PermissionName>& delegatedPermissions()
52 const override { 53 const override {
53 return m_delegatedPermissions; 54 return m_delegatedPermissions;
54 } 55 }
55 const WebVector<WebFeaturePolicyFeature>& allowedFeatures() const override { 56 const WebVector<WebFeaturePolicyFeature>& allowedFeatures() const override {
56 return m_allowedFeatures; 57 return m_allowedFeatures;
57 } 58 }
58 59
59 void setBrowsingContextContainerName(const WebString& name) { 60 void setBrowsingContextContainerName(const WebString& name) {
60 m_browsingContextContainerName = name; 61 m_browsingContextContainerName = name;
61 } 62 }
62 void setScrollingMode(WebFrameOwnerProperties::ScrollingMode); 63 void setScrollingMode(WebFrameOwnerProperties::ScrollingMode);
63 void setMarginWidth(int marginWidth) { m_marginWidth = marginWidth; } 64 void setMarginWidth(int marginWidth) { m_marginWidth = marginWidth; }
64 void setMarginHeight(int marginHeight) { m_marginHeight = marginHeight; } 65 void setMarginHeight(int marginHeight) { m_marginHeight = marginHeight; }
65 void setAllowFullscreen(bool allowFullscreen) { 66 void setAllowFullscreen(bool allowFullscreen) {
66 m_allowFullscreen = allowFullscreen; 67 m_allowFullscreen = allowFullscreen;
67 } 68 }
68 void setAllowPaymentRequest(bool allowPaymentRequest) { 69 void setAllowPaymentRequest(bool allowPaymentRequest) {
69 m_allowPaymentRequest = allowPaymentRequest; 70 m_allowPaymentRequest = allowPaymentRequest;
70 } 71 }
72 void setIsDisplayNone(bool isDisplayNone) { m_isDisplayNone = isDisplayNone; }
71 void setCsp(const WebString& csp) { m_csp = csp; } 73 void setCsp(const WebString& csp) { m_csp = csp; }
72 void setDelegatedpermissions( 74 void setDelegatedpermissions(
73 const WebVector<mojom::blink::PermissionName>& delegatedPermissions) { 75 const WebVector<mojom::blink::PermissionName>& delegatedPermissions) {
74 m_delegatedPermissions = delegatedPermissions; 76 m_delegatedPermissions = delegatedPermissions;
75 } 77 }
76 void setAllowedFeatures( 78 void setAllowedFeatures(
77 const WebVector<WebFeaturePolicyFeature>& allowedFeatures) { 79 const WebVector<WebFeaturePolicyFeature>& allowedFeatures) {
78 m_allowedFeatures = allowedFeatures; 80 m_allowedFeatures = allowedFeatures;
79 } 81 }
80 82
81 DECLARE_VIRTUAL_TRACE(); 83 DECLARE_VIRTUAL_TRACE();
82 84
83 private: 85 private:
84 RemoteFrameOwner(SandboxFlags, const WebFrameOwnerProperties&); 86 RemoteFrameOwner(SandboxFlags, const WebFrameOwnerProperties&);
85 87
86 // Intentionally private to prevent redundant checks when the type is 88 // Intentionally private to prevent redundant checks when the type is
87 // already HTMLFrameOwnerElement. 89 // already HTMLFrameOwnerElement.
88 bool isLocal() const override { return false; } 90 bool isLocal() const override { return false; }
89 bool isRemote() const override { return true; } 91 bool isRemote() const override { return true; }
90 92
91 Member<Frame> m_frame; 93 Member<Frame> m_frame;
92 SandboxFlags m_sandboxFlags; 94 SandboxFlags m_sandboxFlags;
93 AtomicString m_browsingContextContainerName; 95 AtomicString m_browsingContextContainerName;
94 ScrollbarMode m_scrolling; 96 ScrollbarMode m_scrolling;
95 int m_marginWidth; 97 int m_marginWidth;
96 int m_marginHeight; 98 int m_marginHeight;
97 bool m_allowFullscreen; 99 bool m_allowFullscreen;
98 bool m_allowPaymentRequest; 100 bool m_allowPaymentRequest;
101 bool m_isDisplayNone;
99 WebString m_csp; 102 WebString m_csp;
100 WebVector<mojom::blink::PermissionName> m_delegatedPermissions; 103 WebVector<mojom::blink::PermissionName> m_delegatedPermissions;
101 WebVector<WebFeaturePolicyFeature> m_allowedFeatures; 104 WebVector<WebFeaturePolicyFeature> m_allowedFeatures;
102 }; 105 };
103 106
104 DEFINE_TYPE_CASTS(RemoteFrameOwner, 107 DEFINE_TYPE_CASTS(RemoteFrameOwner,
105 FrameOwner, 108 FrameOwner,
106 owner, 109 owner,
107 owner->isRemote(), 110 owner->isRemote(),
108 owner.isRemote()); 111 owner.isRemote());
109 112
110 } // namespace blink 113 } // namespace blink
111 114
112 #endif // RemoteFrameOwner_h 115 #endif // RemoteFrameOwner_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698