Chromium Code Reviews| Index: third_party/WebKit/Source/core/frame/Frame.cpp |
| diff --git a/third_party/WebKit/Source/core/frame/Frame.cpp b/third_party/WebKit/Source/core/frame/Frame.cpp |
| index 0e153cdd345344c72190f0d1ca3e259aa6ea1e1b..f2f0b194263094abcfb9dd8d8421754f96e574c2 100644 |
| --- a/third_party/WebKit/Source/core/frame/Frame.cpp |
| +++ b/third_party/WebKit/Source/core/frame/Frame.cpp |
| @@ -193,6 +193,19 @@ bool Frame::IsFeatureEnabled(WebFeaturePolicyFeature feature) const { |
| return feature_policy->IsFeatureEnabled(feature); |
| } |
| +void Frame::SetOwner(FrameOwner* owner) { |
| + owner_ = owner; |
| + UpdateInertIfPossible(); |
| +} |
| + |
| +void Frame::UpdateInertIfPossible() { |
|
alexmos
2017/06/16 02:17:57
Is the "IfPossible" conveying that we only need to
kenrb
2017/06/19 19:26:23
Not exactly, the 'IfPossible' is because the Frame
alexmos
2017/06/20 18:46:10
Acknowledged.
|
| + if (owner_ && owner_->IsLocal()) { |
| + ToHTMLFrameOwnerElement(owner_)->UpdateDistribution(); |
| + if (ToHTMLFrameOwnerElement(owner_)->IsInert()) |
| + SetIsInert(true); |
| + } |
| +} |
| + |
| Frame::Frame(FrameClient* client, |
| Page& page, |
| FrameOwner* owner, |