| Index: third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp b/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp
|
| index 90d7742c2a7a0d82a13e9e5e742135dd53aa0b32..2cfc5dfd836357cf62361671fb490107be566475 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp
|
| @@ -204,11 +204,12 @@ DOMWindow* HTMLFrameOwnerElement::contentWindow() const {
|
|
|
| void HTMLFrameOwnerElement::SetSandboxFlags(SandboxFlags flags) {
|
| sandbox_flags_ = flags;
|
| - // Don't notify about updates if contentFrame() is null, for example when
|
| + // Don't notify about updates if ContentFrame() is null, for example when
|
| // the subframe hasn't been created yet.
|
| - if (ContentFrame())
|
| - GetDocument().GetFrame()->Loader().Client()->DidChangeSandboxFlags(
|
| - ContentFrame(), flags);
|
| + if (ContentFrame()) {
|
| + GetDocument().GetFrame()->Loader().Client()->DidChangeFramePolicy(
|
| + ContentFrame(), sandbox_flags_, container_policy_);
|
| + }
|
| }
|
|
|
| bool HTMLFrameOwnerElement::IsKeyboardFocusable() const {
|
| @@ -223,12 +224,24 @@ void HTMLFrameOwnerElement::DisposeWidgetSoon(FrameViewBase* frame_view_base) {
|
| frame_view_base->Dispose();
|
| }
|
|
|
| +void HTMLFrameOwnerElement::UpdateContainerPolicy() {
|
| + container_policy_ = GetContainerPolicyFromAllowedFeatures(
|
| + AllowedFeatures(), GetOriginForFeaturePolicy());
|
| + // Don't notify about updates if ContentFrame() is null, for example when
|
| + // the subframe hasn't been created yet.
|
| + if (ContentFrame()) {
|
| + GetDocument().GetFrame()->Loader().Client()->DidChangeFramePolicy(
|
| + ContentFrame(), sandbox_flags_, container_policy_);
|
| + }
|
| +}
|
| +
|
| void HTMLFrameOwnerElement::FrameOwnerPropertiesChanged() {
|
| - // Don't notify about updates if contentFrame() is null, for example when
|
| + // Don't notify about updates if ContentFrame() is null, for example when
|
| // the subframe hasn't been created yet.
|
| - if (ContentFrame())
|
| + if (ContentFrame()) {
|
| GetDocument().GetFrame()->Loader().Client()->DidChangeFrameOwnerProperties(
|
| this);
|
| + }
|
| }
|
|
|
| void HTMLFrameOwnerElement::DispatchLoad() {
|
| @@ -241,6 +254,10 @@ HTMLFrameOwnerElement::AllowedFeatures() const {
|
| return features;
|
| }
|
|
|
| +const WebParsedFeaturePolicy& HTMLFrameOwnerElement::ContainerPolicy() const {
|
| + return container_policy_;
|
| +}
|
| +
|
| Document* HTMLFrameOwnerElement::getSVGDocument(
|
| ExceptionState& exception_state) const {
|
| Document* doc = contentDocument();
|
| @@ -309,6 +326,8 @@ bool HTMLFrameOwnerElement::LoadOrRedirectSubframe(
|
| const KURL& url,
|
| const AtomicString& frame_name,
|
| bool replace_current_item) {
|
| + UpdateContainerPolicy();
|
| +
|
| LocalFrame* parent_frame = GetDocument().GetFrame();
|
| if (ContentFrame()) {
|
| ContentFrame()->Navigate(GetDocument(), url, replace_current_item,
|
|
|