Chromium Code Reviews| Index: Source/web/WebRemoteFrameImpl.cpp |
| diff --git a/Source/web/WebRemoteFrameImpl.cpp b/Source/web/WebRemoteFrameImpl.cpp |
| index d06b510b246c92fa65573bebdfc337034905cd59..6a6c830cd3808bbe06d31bdf770a0fbec0401f8c 100644 |
| --- a/Source/web/WebRemoteFrameImpl.cpp |
| +++ b/Source/web/WebRemoteFrameImpl.cpp |
| @@ -41,10 +41,7 @@ public: |
| return false; |
| } |
| - virtual SandboxFlags sandboxFlags() const override |
| - { |
| - return m_sandboxFlags; |
| - } |
| + virtual SandboxFlags sandboxFlags() const override; |
| void setSandboxFlags(SandboxFlags flags) |
| { |
| @@ -68,6 +65,18 @@ RemoteBridgeFrameOwner::RemoteBridgeFrameOwner(PassRefPtrWillBeRawPtr<WebLocalFr |
| { |
| } |
| +SandboxFlags RemoteBridgeFrameOwner::sandboxFlags() const |
| +{ |
| + SandboxFlags flags = m_sandboxFlags; |
| + // Frames need to inherit the sandbox flags of their parent frame. |
|
dcheng
2015/01/16 19:11:19
It this covered by any of our current tests?
alexmos
2015/01/17 02:54:42
LayoutTests/http/tests/security/sandbox-inherit-to
|
| + Frame* parentFrame = m_frame->frame()->tree().parent(); |
| + if (parentFrame) { |
| + ASSERT(parentFrame->isRemoteFrame()); |
| + flags |= toRemoteFrame(parentFrame)->securityContext()->sandboxFlags(); |
| + } |
| + return flags; |
| +} |
| + |
| void RemoteBridgeFrameOwner::trace(Visitor* visitor) |
| { |
| visitor->trace(m_frame); |
| @@ -798,12 +807,6 @@ WebString WebRemoteFrameImpl::layerTreeAsText(bool showDebugInfo) const |
| return WebString(); |
| } |
| -// FIXME(alexmos): This will go away once the Chromium side is updated to pass sandbox flags. |
| -WebLocalFrame* WebRemoteFrameImpl::createLocalChild(const WebString& name, WebFrameClient* client) |
| -{ |
| - return createLocalChild(name, WebSandboxFlags::None, client); |
| -} |
| - |
| WebLocalFrame* WebRemoteFrameImpl::createLocalChild(const WebString& name, WebSandboxFlags sandboxFlags, WebFrameClient* client) |
| { |
| WebLocalFrameImpl* child = toWebLocalFrameImpl(WebLocalFrame::create(client)); |