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

Side by Side Diff: third_party/WebKit/public/web/WebFrameOwnerProperties.h

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

Powered by Google App Engine
This is Rietveld 408576698