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

Unified Diff: third_party/WebKit/Source/core/loader/FrameLoader.cpp

Issue 2739203002: Initial Implementation of Iframe Attribute for Feature Policy (Part 3) (Closed)
Patch Set: Codereview: nit Created 3 years, 9 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/loader/FrameLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.cpp b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
index f1c213b5bf03e0997d45847aee93c68852bd73ef..09084e82bddc19a7d976ac4251eca9fa0d81e9c5 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -617,8 +617,13 @@ void FrameLoader::didBeginDocument() {
const WebParsedFeaturePolicy& parsedHeader = parseFeaturePolicy(
featurePolicyHeader, m_frame->securityContext()->getSecurityOrigin(),
&messages);
- m_frame->securityContext()->initializeFeaturePolicy(parsedHeader,
- parentFeaturePolicy);
+ const WebParsedFeaturePolicy& containerPolicy =
+ getContainerPolicyFromAllowedFeatures(
+ m_frame->owner()->allowedFeatures(),
+ m_frame->securityContext()->getSecurityOrigin());
+
+ m_frame->securityContext()->initializeFeaturePolicy(
+ parsedHeader, containerPolicy, parentFeaturePolicy);
for (auto& message : messages) {
m_frame->document()->addConsoleMessage(ConsoleMessage::create(
OtherMessageSource, ErrorMessageLevel,

Powered by Google App Engine
This is Rietveld 408576698