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..a990ac619e898b1a7964920bee1a37c50d6d51a7 100644 |
--- a/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp |
+++ b/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp |
@@ -15,6 +15,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 +432,14 @@ void WebRemoteFrameImpl::setReplicatedFeaturePolicyHeader( |
Frame* parentFrame = frame()->client()->parent(); |
parentFeaturePolicy = parentFrame->securityContext()->getFeaturePolicy(); |
} |
- frame()->securityContext()->initializeFeaturePolicy(parsedHeader, |
- parentFeaturePolicy); |
+ WebParsedFeaturePolicy containerPolicy; |
+ if (frame() && frame()->owner()) { |
+ containerPolicy = getContainerPolicyFromAllowedFeatures( |
+ frame()->owner()->allowedFeatures(), |
+ frame()->securityContext()->getSecurityOrigin()); |
+ } |
+ frame()->securityContext()->initializeFeaturePolicy( |
+ parsedHeader, containerPolicy, parentFeaturePolicy); |
} |
} |