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 |