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

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

Issue 2883033003: Propagate inert state to OOPIFs when a modal dialog is active (Closed)
Patch Set: alexmos comments addressed 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/Frame.h
diff --git a/third_party/WebKit/Source/core/frame/Frame.h b/third_party/WebKit/Source/core/frame/Frame.h
index dde57604ead2e4bee5f30088a22f35878153e8ab..b0edb2a6220d644a4b144aad09c27d337ee90985 100644
--- a/third_party/WebKit/Source/core/frame/Frame.h
+++ b/third_party/WebKit/Source/core/frame/Frame.h
@@ -98,7 +98,7 @@ class CORE_EXPORT Frame : public GarbageCollectedFinalized<Frame> {
bool IsLocalRoot() const;
FrameOwner* Owner() const;
- void SetOwner(FrameOwner* owner) { owner_ = owner; }
+ void SetOwner(FrameOwner*);
HTMLFrameOwnerElement* DeprecatedLocalOwner() const;
DOMWindow* DomWindow() const { return dom_window_; }
@@ -154,6 +154,12 @@ class CORE_EXPORT Frame : public GarbageCollectedFinalized<Frame> {
// the given frame.
bool IsFeatureEnabled(WebFeaturePolicyFeature) const;
+ // Called to make a frame inert or non-inert. A frame is inert when there
+ // is a modal dialog displayed within an ancestor frame, and this frame
+ // itself is not within the dialog.
+ virtual void SetIsInert(bool) = 0;
+ void UpdateInertIfPossible();
+
protected:
Frame(FrameClient*, Page&, FrameOwner*, WindowProxyManager*);
@@ -167,6 +173,10 @@ class CORE_EXPORT Frame : public GarbageCollectedFinalized<Frame> {
FrameLifecycle lifecycle_;
+ // This is set to true if this is a subframe, and the frame element in the
+ // parent frame's document becomes inert.
alexmos 2017/06/20 18:46:10 nit: Can we also explicitly say that it is always
kenrb 2017/06/22 15:33:35 Done.
+ bool is_inert_ = false;
+
private:
Member<FrameClient> client_;
const Member<WindowProxyManager> window_proxy_manager_;

Powered by Google App Engine
This is Rietveld 408576698