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

Unified Diff: third_party/WebKit/Source/core/html/HTMLPlugInElement.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/HTMLPlugInElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp b/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp
index ac7486f55342d8957df7796e55916d950660b6b2..fa4d00af1c6abf2dcae6f9ce78a58f556d744fc4 100644
--- a/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp
@@ -268,6 +268,22 @@ bool HTMLPlugInElement::ShouldAccelerate() const {
return plugin && plugin->PlatformLayer();
}
+Vector<WebParsedFeaturePolicyDeclaration>
+HTMLPlugInElement::ConstructContainerPolicy() const {
+ // Plugin elements (<object> and <embed>) are not allowed to enable the
+ // fullscreen feature. Add an empty whitelist for the fullscreen feature so
+ // that the nested browsing context 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;
+}
+
void HTMLPlugInElement::DetachLayoutTree(const AttachContext& context) {
// Update the FrameViewBase the next time we attach (detaching destroys the
// plugin).

Powered by Google App Engine
This is Rietveld 408576698