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() { |
+ if (owner_ && owner_->IsLocal()) { |
+ ToHTMLFrameOwnerElement(owner_)->UpdateDistribution(); |
+ if (ToHTMLFrameOwnerElement(owner_)->IsInert()) |
+ SetIsInert(true); |
+ } |
+} |
+ |
Frame::Frame(FrameClient* client, |
Page& page, |
FrameOwner* owner, |