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

Unified Diff: third_party/WebKit/Source/core/frame/LocalFrame.cpp

Issue 2883033003: Propagate inert state to OOPIFs when a modal dialog is active (Closed)
Patch Set: Rebase only Created 3 years, 7 months 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: 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..b3297edb99563f732b7429501c1bdabc8ec51f70 100644
--- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
@@ -571,6 +571,18 @@ void LocalFrame::DidChangeVisibilityState() {
Frame::DidChangeVisibilityState();
}
+void LocalFrame::SetIsInert(bool inert) {
dmazzoni 2017/05/19 18:58:19 Do you think it would be more clear to separate th
kenrb 2017/05/31 18:32:00 Done.
+ is_inert_ = inert;
+ for (Frame* child = Tree().FirstChild(); child;
+ child = child->Tree().NextSibling()) {
+ if (child->Owner()) {
+ DCHECK(child->Owner()->IsLocal());
+ child->SetIsInert(inert ||
+ ToHTMLFrameOwnerElement(child->Owner())->IsInert());
+ }
+ }
+}
+
LocalFrame& LocalFrame::LocalFrameRoot() const {
const LocalFrame* cur_frame = this;
while (cur_frame && cur_frame->Tree().Parent() &&
@@ -899,6 +911,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()) {

Powered by Google App Engine
This is Rietveld 408576698