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

Unified Diff: third_party/WebKit/Source/web/WebRemoteFrameImpl.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/web/WebRemoteFrameImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp b/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp
index c4f8498d80cb7ecca3e832e800f12b167c7befd4..a139b6122267e6529d22fcbcd0a4e74db8b9989c 100644
--- a/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp
@@ -4,6 +4,7 @@
#include "web/WebRemoteFrameImpl.h"
+#include <v8/include/v8.h>
#include "bindings/core/v8/DOMWrapperWorld.h"
#include "bindings/core/v8/WindowProxy.h"
#include "core/dom/Fullscreen.h"
@@ -15,6 +16,7 @@
#include "core/html/HTMLFrameOwnerElement.h"
#include "core/layout/LayoutObject.h"
#include "core/page/Page.h"
+#include "platform/feature_policy/FeaturePolicy.h"
#include "platform/heap/Handle.h"
#include "public/platform/WebFeaturePolicy.h"
#include "public/platform/WebFloatRect.h"
@@ -431,8 +433,12 @@ void WebRemoteFrameImpl::setReplicatedFeaturePolicyHeader(
Frame* parentFrame = frame()->client()->parent();
parentFeaturePolicy = parentFrame->securityContext()->getFeaturePolicy();
}
- frame()->securityContext()->initializeFeaturePolicy(parsedHeader,
- parentFeaturePolicy);
+ const WebParsedFeaturePolicy containerPolicy =
+ getContainerPolicyFromAllowedFeatures(
+ frame()->owner()->allowedFeatures(),
+ frame()->securityContext()->getSecurityOrigin());
+ frame()->securityContext()->initializeFeaturePolicy(
+ parsedHeader, containerPolicy, parentFeaturePolicy);
}
}

Powered by Google App Engine
This is Rietveld 408576698