Index: third_party/WebKit/Source/core/frame/LocalFrame.cpp |
diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.cpp b/third_party/WebKit/Source/core/frame/LocalFrame.cpp |
index dda32e052122cb60e977bd3e2bb2bfc961f29205..a510a48c9b3f59deba9d573eb75ac5c62f28dea9 100644 |
--- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp |
+++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp |
@@ -571,6 +571,22 @@ void LocalFrame::DidChangeVisibilityState() { |
Frame::DidChangeVisibilityState(); |
} |
+void LocalFrame::SetIsInert(bool inert) { |
+ is_inert_ = inert; |
+ PropagateInertToChildFrames(); |
+} |
+ |
+void LocalFrame::PropagateInertToChildFrames() { |
+ for (Frame* child = Tree().FirstChild(); child; |
+ child = child->Tree().NextSibling()) { |
+ if (child->Owner()) { |
+ DCHECK(child->Owner()->IsLocal()); |
+ child->SetIsInert(is_inert_ || |
+ ToHTMLFrameOwnerElement(child->Owner())->IsInert()); |
+ } |
+ } |
+} |
+ |
LocalFrame& LocalFrame::LocalFrameRoot() const { |
const LocalFrame* cur_frame = this; |
while (cur_frame && cur_frame->Tree().Parent() && |
@@ -899,6 +915,7 @@ inline LocalFrame::LocalFrame(LocalFrameClient* client, |
page_zoom_factor_(ParentPageZoomFactor(this)), |
text_zoom_factor_(ParentTextZoomFactor(this)), |
in_view_source_mode_(false), |
+ is_inert_(false), |
interface_provider_(interface_provider), |
interface_registry_(interface_registry) { |
if (IsLocalRoot()) { |