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

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

Issue 2714943004: Move unique name generation and tracking into //content. (Closed)
Patch Set: . Created 3 years, 10 months 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 a95f10fc30b00e4b0c321788ff8a452a85917c96..46500bb8b23d9f7ea1be08f6dbe8c6aebedd1967 100644
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
@@ -542,10 +542,6 @@ void WebLocalFrameImpl::close() {
m_selfKeepAlive.clear();
}
-WebString WebLocalFrameImpl::uniqueName() const {
- return frame()->tree().uniqueName();
-}
-
WebString WebLocalFrameImpl::assignedName() const {
return frame()->tree().name();
}
@@ -1512,11 +1508,8 @@ WebLocalFrameImpl* WebLocalFrameImpl::createProvisional(
LocalFrame* frame = LocalFrame::create(webFrame->m_localFrameClientImpl.get(),
oldFrame->host(), tempOwner,
interfaceProvider, interfaceRegistry);
- // Set the name and unique name directly, bypassing any of the normal logic
- // to calculate unique name.
- frame->tree().setPrecalculatedName(
- toWebRemoteFrameImpl(oldWebFrame)->frame()->tree().name(),
- toWebRemoteFrameImpl(oldWebFrame)->frame()->tree().uniqueName());
+ frame->tree().setName(
+ toWebRemoteFrameImpl(oldWebFrame)->frame()->tree().name());
webFrame->setCoreFrame(frame);
frame->setOwner(oldFrame->owner());
@@ -1588,11 +1581,10 @@ void WebLocalFrameImpl::setCoreFrame(LocalFrame* frame) {
void WebLocalFrameImpl::initializeCoreFrame(FrameHost* host,
FrameOwner* owner,
- const AtomicString& name,
- const AtomicString& uniqueName) {
+ const AtomicString& name) {
setCoreFrame(LocalFrame::create(m_localFrameClientImpl.get(), host, owner,
m_interfaceProvider, m_interfaceRegistry));
- frame()->tree().setPrecalculatedName(name, uniqueName);
+ frame()->tree().setName(name);
// We must call init() after m_frame is assigned because it is referenced
// during init(). Note that this may dispatch JS events; the frame may be
// detached after init() returns.
@@ -1634,19 +1626,16 @@ LocalFrame* WebLocalFrameImpl::createChildFrame(
// solution. subResourceAttributeName returns just one attribute name. The
// element might not have the attribute, and there might be other attributes
// which can identify the element.
- AtomicString uniqueName = frame()->tree().calculateUniqueNameForNewChildFrame(
- name,
- ownerElement->getAttribute(ownerElement->subResourceAttributeName()));
WebLocalFrameImpl* webframeChild =
toWebLocalFrameImpl(m_client->createChildFrame(
- this, scope, name, uniqueName,
+ this, scope, name,
+ ownerElement->getAttribute(ownerElement->subResourceAttributeName()),
static_cast<WebSandboxFlags>(ownerElement->getSandboxFlags()),
ownerProperties));
if (!webframeChild)
return nullptr;
- webframeChild->initializeCoreFrame(frame()->host(), ownerElement, name,
- uniqueName);
+ webframeChild->initializeCoreFrame(frame()->host(), ownerElement, name);
// Initializing the core frame may cause the new child to be detached, since
// it may dispatch a load event in the parent.
if (!webframeChild->parent())

Powered by Google App Engine
This is Rietveld 408576698