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

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

Issue 2883033003: Propagate inert state to OOPIFs when a modal dialog is active (Closed)
Patch Set: nit 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
« no previous file with comments | « third_party/WebKit/Source/core/frame/Frame.h ('k') | third_party/WebKit/Source/core/frame/LocalFrame.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « third_party/WebKit/Source/core/frame/Frame.h ('k') | third_party/WebKit/Source/core/frame/LocalFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698