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 4b3a445a01c05d3f66dd0178fc146da8c41dda6f..e07e7ca27eb95e58915e90311d393e3f699b5e28 100644 |
--- a/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp |
+++ b/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp |
@@ -694,7 +694,7 @@ WebString WebRemoteFrameImpl::layerTreeAsText(bool showDebugInfo) const |
return WebString(); |
} |
-WebLocalFrame* WebRemoteFrameImpl::createLocalChild(WebTreeScopeType scope, const WebString& name, WebSandboxFlags sandboxFlags, WebFrameClient* client, WebFrame* previousSibling, const WebFrameOwnerProperties& frameOwnerProperties) |
+WebLocalFrame* WebRemoteFrameImpl::createLocalChild(WebTreeScopeType scope, const WebString& name, const WebString& uniqueName, WebSandboxFlags sandboxFlags, WebFrameClient* client, WebFrame* previousSibling, const WebFrameOwnerProperties& frameOwnerProperties) |
{ |
WebLocalFrameImpl* child = toWebLocalFrameImpl(WebLocalFrame::create(scope, client)); |
WillBeHeapHashMap<WebFrame*, OwnPtrWillBeMember<FrameOwner>>::AddResult result = |
@@ -704,7 +704,7 @@ WebLocalFrame* WebRemoteFrameImpl::createLocalChild(WebTreeScopeType scope, cons |
// result in the browser observing two navigations to about:blank (one from the initial |
// frame creation, and one from swapping it into the remote process). FrameLoader might |
// need a special initialization function for this case to avoid that duplicate navigation. |
- child->initializeCoreFrame(frame()->host(), result.storedValue->value.get(), name, nullAtom); |
+ child->initializeCoreFrame(frame()->host(), result.storedValue->value.get(), name, nullAtom, uniqueName); |
// Partially related with the above FIXME--the init() call may trigger JS dispatch. However, |
// if the parent is remote, it should never be detached synchronously... |
ASSERT(child->frame()); |
@@ -712,20 +712,24 @@ WebLocalFrame* WebRemoteFrameImpl::createLocalChild(WebTreeScopeType scope, cons |
} |
-void WebRemoteFrameImpl::initializeCoreFrame(FrameHost* host, FrameOwner* owner, const AtomicString& name, const AtomicString& fallbackName) |
+void WebRemoteFrameImpl::initializeCoreFrame(FrameHost* host, FrameOwner* owner, const AtomicString& name, const AtomicString& fallbackName, const AtomicString& uniqueName) |
{ |
setCoreFrame(RemoteFrame::create(m_frameClient.get(), host, owner)); |
frame()->createView(); |
- m_frame->tree().setName(name, fallbackName); |
+ if (uniqueName.isEmpty()) { |
+ m_frame->tree().setName(name, fallbackName); |
+ } else { |
+ m_frame->tree().setNameForReplacementFrame(name, uniqueName); |
+ } |
} |
-WebRemoteFrame* WebRemoteFrameImpl::createRemoteChild(WebTreeScopeType scope, const WebString& name, WebSandboxFlags sandboxFlags, WebRemoteFrameClient* client) |
+WebRemoteFrame* WebRemoteFrameImpl::createRemoteChild(WebTreeScopeType scope, const WebString& name, const WebString& uniqueName, WebSandboxFlags sandboxFlags, WebRemoteFrameClient* client) |
{ |
WebRemoteFrameImpl* child = toWebRemoteFrameImpl(WebRemoteFrame::create(scope, client)); |
WillBeHeapHashMap<WebFrame*, OwnPtrWillBeMember<FrameOwner>>::AddResult result = |
m_ownersForChildren.add(child, RemoteBridgeFrameOwner::create(nullptr, static_cast<SandboxFlags>(sandboxFlags), WebFrameOwnerProperties())); |
appendChild(child); |
- child->initializeCoreFrame(frame()->host(), result.storedValue->value.get(), name, nullAtom); |
+ child->initializeCoreFrame(frame()->host(), result.storedValue->value.get(), name, nullAtom, nullAtom); |
return child; |
} |