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

Unified Diff: third_party/WebKit/Source/core/html/HTMLFrameElement.cpp

Issue 2923563003: Move container policy logic to frame owner classes. (Closed)
Patch Set: Addressing nits 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/html/HTMLFrameElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLFrameElement.cpp b/third_party/WebKit/Source/core/html/HTMLFrameElement.cpp
index 641ba2ae5ae1af3641cc9c59731b8099e18baf20..502fb031728eca9144d66aa21fb68c8feb7a94e5 100644
--- a/third_party/WebKit/Source/core/html/HTMLFrameElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLFrameElement.cpp
@@ -76,4 +76,19 @@ void HTMLFrameElement::ParseAttribute(
}
}
+Vector<WebParsedFeaturePolicyDeclaration>
+HTMLFrameElement::ConstructContainerPolicy() const {
+ // Frame elements are not allowed to enable the fullscreen feature. Add an
+ // empty whitelist for the fullscreen feature so that the framed content is
+ // unable to use the API, regardless of origin.
+ // https://fullscreen.spec.whatwg.org/#model
+ Vector<WebParsedFeaturePolicyDeclaration> container_policy;
+ WebParsedFeaturePolicyDeclaration whitelist;
+ whitelist.feature = WebFeaturePolicyFeature::kFullscreen;
+ whitelist.matches_all_origins = false;
+ whitelist.origins = Vector<WebSecurityOrigin>(0UL);
+ container_policy.push_back(whitelist);
+ return container_policy;
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLFrameElement.h ('k') | third_party/WebKit/Source/core/html/HTMLFrameElementBase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698