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

Side by Side Diff: third_party/WebKit/public/web/WebFrameOwnerProperties.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 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 #ifndef WebFrameOwnerProperties_h 5 #ifndef WebFrameOwnerProperties_h
6 #define WebFrameOwnerProperties_h 6 #define WebFrameOwnerProperties_h
7 7
8 #include "../platform/WebFeaturePolicy.h" 8 #include "../platform/WebFeaturePolicy.h"
9 #include "../platform/WebString.h" 9 #include "../platform/WebString.h"
10 #include "../platform/WebVector.h" 10 #include "../platform/WebVector.h"
11 #include "third_party/WebKit/public/platform/modules/permissions/permission.mojo m-shared.h" 11 #include "third_party/WebKit/public/platform/modules/permissions/permission.mojo m-shared.h"
12 12
13 #include <algorithm> 13 #include <algorithm>
14 14
15 namespace blink { 15 namespace blink {
16 16
17 struct WebFrameOwnerProperties { 17 struct WebFrameOwnerProperties {
18 enum class ScrollingMode { Auto, AlwaysOff, AlwaysOn, Last = AlwaysOn }; 18 enum class ScrollingMode { Auto, AlwaysOff, AlwaysOn, Last = AlwaysOn };
19 19
20 WebString name; // browsing context container's name 20 WebString name; // browsing context container's name
21 ScrollingMode scrollingMode; 21 ScrollingMode scrollingMode;
22 int marginWidth; 22 int marginWidth;
23 int marginHeight; 23 int marginHeight;
24 bool allowFullscreen; 24 bool allowFullscreen;
25 bool allowPaymentRequest; 25 bool allowPaymentRequest;
26 bool isDisplayNone;
26 WebString requiredCsp; 27 WebString requiredCsp;
27 WebVector<mojom::PermissionName> delegatedPermissions; 28 WebVector<mojom::PermissionName> delegatedPermissions;
28 29
29 public: 30 public:
30 WebVector<WebFeaturePolicyFeature> allowedFeatures; 31 WebVector<WebFeaturePolicyFeature> allowedFeatures;
31 32
32 WebFrameOwnerProperties() 33 WebFrameOwnerProperties()
33 : scrollingMode(ScrollingMode::Auto), 34 : scrollingMode(ScrollingMode::Auto),
34 marginWidth(-1), 35 marginWidth(-1),
35 marginHeight(-1), 36 marginHeight(-1),
36 allowFullscreen(false), 37 allowFullscreen(false),
37 allowPaymentRequest(false) {} 38 allowPaymentRequest(false),
39 isDisplayNone(false) {}
38 40
39 #if INSIDE_BLINK 41 #if INSIDE_BLINK
40 WebFrameOwnerProperties( 42 WebFrameOwnerProperties(
41 const WebString& name, 43 const WebString& name,
42 ScrollbarMode scrollingMode, 44 ScrollbarMode scrollingMode,
43 int marginWidth, 45 int marginWidth,
44 int marginHeight, 46 int marginHeight,
45 bool allowFullscreen, 47 bool allowFullscreen,
46 bool allowPaymentRequest, 48 bool allowPaymentRequest,
49 bool isDisplayNone,
47 const WebString& requiredCsp, 50 const WebString& requiredCsp,
48 const WebVector<mojom::PermissionName>& delegatedPermissions, 51 const WebVector<mojom::PermissionName>& delegatedPermissions,
49 const WebVector<WebFeaturePolicyFeature>& allowedFeatures) 52 const WebVector<WebFeaturePolicyFeature>& allowedFeatures)
50 : name(name), 53 : name(name),
51 scrollingMode(static_cast<ScrollingMode>(scrollingMode)), 54 scrollingMode(static_cast<ScrollingMode>(scrollingMode)),
52 marginWidth(marginWidth), 55 marginWidth(marginWidth),
53 marginHeight(marginHeight), 56 marginHeight(marginHeight),
54 allowFullscreen(allowFullscreen), 57 allowFullscreen(allowFullscreen),
55 allowPaymentRequest(allowPaymentRequest), 58 allowPaymentRequest(allowPaymentRequest),
59 isDisplayNone(isDisplayNone),
56 requiredCsp(requiredCsp), 60 requiredCsp(requiredCsp),
57 delegatedPermissions(delegatedPermissions), 61 delegatedPermissions(delegatedPermissions),
58 allowedFeatures(allowedFeatures) {} 62 allowedFeatures(allowedFeatures) {}
59 #endif 63 #endif
60 }; 64 };
61 65
62 } // namespace blink 66 } // namespace blink
63 67
64 #endif 68 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698