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

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: added TODO comment for implementing allow* attributes in the container policy parser 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 fb58d814551a6589b30934132951f675c5dea082..3c3f95806323b1ab967e0de6c3bd9b6bcdd91516 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -599,8 +599,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