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

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

Issue 2883033003: Propagate inert state to OOPIFs when a modal dialog is active (Closed)
Patch Set: Restore earlier approach + UpdateDistribution() Created 3 years, 6 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.h
diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.h b/third_party/WebKit/Source/core/frame/LocalFrame.h
index a0435f267707bbb6ec6879d5f1906d2200954a3a..9de1968ba2ac8f68c2492762743f5be03714722f 100644
--- a/third_party/WebKit/Source/core/frame/LocalFrame.h
+++ b/third_party/WebKit/Source/core/frame/LocalFrame.h
@@ -125,6 +125,9 @@ class CORE_EXPORT LocalFrame final : public Frame,
void PrintNavigationWarning(const String&) override;
bool PrepareForCommit() override;
void DidChangeVisibilityState() override;
+ // This sets the is_inert_ flag and also recurses through this frame's
+ // subtree, updating the inert bit on all descendant frames.
+ void SetIsInert(bool) override;
void DetachChildren();
void DocumentAttached();
@@ -252,6 +255,8 @@ class CORE_EXPORT LocalFrame final : public Frame,
std::unique_ptr<WebURLLoader> CreateURLLoader();
+ bool IsInert() const { return is_inert_; }
alexmos 2017/06/16 02:17:58 Is this used anywhere? I might've missed it, but
kenrb 2017/06/19 19:26:23 Yes, in Node::IsInert().
alexmos 2017/06/20 18:46:10 Acknowledged.
+
using FrameInitCallback = void (*)(LocalFrame*);
// Allows for the registration of a callback that is invoked whenever a new
// LocalFrame is initialized. Callbacks are executed in the order that they
@@ -292,6 +297,8 @@ class CORE_EXPORT LocalFrame final : public Frame,
bool CanNavigateWithoutFramebusting(const Frame&, String& error_reason);
+ void PropagateInertToChildFrames();
+
std::unique_ptr<WebFrameScheduler> frame_scheduler_;
mutable FrameLoader loader_;
@@ -318,6 +325,8 @@ class CORE_EXPORT LocalFrame final : public Frame,
bool in_view_source_mode_;
+ bool is_inert_;
+
Member<CoreProbeSink> probe_sink_;
Member<PerformanceMonitor> performance_monitor_;

Powered by Google App Engine
This is Rietveld 408576698