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

Unified Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 1413093007: OOPIF: Use the same uniqueName when swapping between local and remote. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert to PS2 Created 5 years, 1 month 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/WebLocalFrameImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
index d0e9bbb04981714c12a5a1f00027e51b88fbea6a..459b87b1b7290aec6358b380602f0b87fd6c9451 100644
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
@@ -118,6 +118,7 @@
#include "core/frame/LocalDOMWindow.h"
#include "core/frame/FrameHost.h"
#include "core/frame/FrameView.h"
+#include "core/frame/RemoteFrame.h"
#include "core/frame/Settings.h"
#include "core/frame/UseCounter.h"
#include "core/html/HTMLAnchorElement.h"
@@ -1992,9 +1993,13 @@ void WebLocalFrameImpl::initializeToReplaceRemoteFrame(WebRemoteFrame* oldWebFra
OwnPtrWillBeRawPtr<FrameOwner> tempOwner = RemoteBridgeFrameOwner::create(nullptr, SandboxNone, WebFrameOwnerProperties());
RefPtrWillBeRawPtr<LocalFrame> frame = LocalFrame::create(m_frameLoaderClientImpl.get(), oldFrame->host(), tempOwner.get());
frame->setOwner(oldFrame->owner());
- frame->tree().setName(name);
setParent(oldWebFrame->parent());
setOpener(oldWebFrame->opener());
+
+ // Set the name and unique name directly.
+ // TODO(creis): Remove |name| and use the oldWebFrame's name.
+ frame->tree().setNameForReplacementFrame(name, toWebRemoteFrameImpl(oldWebFrame)->frame()->tree().uniqueName());
+
setCoreFrame(frame);
if (frame->owner() && !frame->owner()->isLocal()) {

Powered by Google App Engine
This is Rietveld 408576698