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

Unified Diff: content/common/frame_owner_properties.cc

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 side-by-side diff with in-line comments
Download patch
Index: content/common/frame_owner_properties.cc
diff --git a/content/common/frame_owner_properties.cc b/content/common/frame_owner_properties.cc
index f3de3f0921caee2dca3913804c95f2b2232b11b4..90510cbd891e80a6d66ea6de4c2a2af7395c1e42 100644
--- a/content/common/frame_owner_properties.cc
+++ b/content/common/frame_owner_properties.cc
@@ -11,7 +11,8 @@ FrameOwnerProperties::FrameOwnerProperties()
margin_width(-1),
margin_height(-1),
allow_fullscreen(false),
- allow_payment_request(false) {}
+ allow_payment_request(false),
+ is_display_none(false) {}
FrameOwnerProperties::FrameOwnerProperties(const FrameOwnerProperties& other) =
default;
@@ -23,6 +24,7 @@ FrameOwnerProperties::FrameOwnerProperties(
margin_height(web_frame_owner_properties.marginHeight),
allow_fullscreen(web_frame_owner_properties.allowFullscreen),
allow_payment_request(web_frame_owner_properties.allowPaymentRequest),
+ is_display_none(web_frame_owner_properties.isDisplayNone),
required_csp(web_frame_owner_properties.requiredCsp.utf8()),
delegated_permissions(
web_frame_owner_properties.delegatedPermissions.begin(),
@@ -39,6 +41,7 @@ blink::WebFrameOwnerProperties FrameOwnerProperties::ToWebFrameOwnerProperties()
result.marginHeight = margin_height;
result.allowFullscreen = allow_fullscreen;
result.allowPaymentRequest = allow_payment_request;
+ result.isDisplayNone = is_display_none;
result.requiredCsp = blink::WebString::fromUTF8(required_csp);
result.delegatedPermissions =
blink::WebVector<blink::WebPermissionType>(delegated_permissions);
@@ -52,6 +55,7 @@ bool FrameOwnerProperties::operator==(const FrameOwnerProperties& other) const {
margin_height == other.margin_height &&
allow_fullscreen == other.allow_fullscreen &&
allow_payment_request == other.allow_payment_request &&
+ is_display_none == other.is_display_none &&
required_csp == other.required_csp &&
std::equal(delegated_permissions.begin(), delegated_permissions.end(),
other.delegated_permissions.begin());

Powered by Google App Engine
This is Rietveld 408576698