Chromium Code Reviews| Index: content/browser/frame_host/frame_tree_node.h |
| diff --git a/content/browser/frame_host/frame_tree_node.h b/content/browser/frame_host/frame_tree_node.h |
| index ac46de23c5737bedbf5e9fb7a2f4839ef1c1ab23..8c4c5f29344391148fc6bd5fa914781e2f8aef8d 100644 |
| --- a/content/browser/frame_host/frame_tree_node.h |
| +++ b/content/browser/frame_host/frame_tree_node.h |
| @@ -147,6 +147,20 @@ class CONTENT_EXPORT FrameTreeNode { |
| return has_committed_real_load_; |
| } |
| + // Returns whether the frame's owner element in the parent document is |
| + // collapsed, that is, removed from the layout as if it did not exist, as per |
| + // request by the embedder (of the content/ layer). |
| + bool is_collapsed() const { return is_collapsed_; } |
| + |
| + // Sets whether to collapse the frame's owner element in the parent document, |
| + // that is, to remove it from the layout as if it did not exist, as per |
| + // request by the embedder (of the content/ layer). Cannot be called for main |
| + // frames. |
| + // |
| + // This only has an effect for <iframe> owner elements, and is a no-op when |
| + // called on sub-frames hosted in <frame>, <object>, and <embed> elements. |
|
dcheng
2017/05/10 06:59:46
Out of curiosity, why limited only to iframe?
engedy
2017/05/15 13:35:51
For historical reasons, we ignore `display: none`
dcheng
2017/05/18 09:35:55
Probably makes sense to do this for <object> and <
engedy
2017/05/18 09:40:06
That's a good point and I agree. Let me address th
|
| + void SetCollapsed(bool collapsed); |
| + |
| // Returns the origin of the last committed page in this frame. |
| // WARNING: To get the last committed origin for a particular |
| // RenderFrameHost, use RenderFrameHost::GetLastCommittedOrigin() instead, |
| @@ -398,6 +412,9 @@ class CONTENT_EXPORT FrameTreeNode { |
| // about:blank page. |
| bool has_committed_real_load_; |
| + // Whether the frame's owner element in the parent document is collapsed. |
| + bool is_collapsed_; |
| + |
| // Track information that needs to be replicated to processes that have |
| // proxies for this frame. |
| FrameReplicationState replication_state_; |