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

Unified Diff: Source/core/page/FrameTree.cpp

Issue 218693003: Generate FrameTree::uniqueName with a URL attribute value. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove unload handler Created 6 years, 9 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
« no previous file with comments | « Source/core/page/FrameTree.h ('k') | Source/web/WebFrameImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/FrameTree.cpp
diff --git a/Source/core/page/FrameTree.cpp b/Source/core/page/FrameTree.cpp
index ba484fed8f5815e721338fb61f635661cfb2fd31..e0e8a9708d1e853a89732f02f63274c6881168cd 100644
--- a/Source/core/page/FrameTree.cpp
+++ b/Source/core/page/FrameTree.cpp
@@ -53,7 +53,7 @@ FrameTree::~FrameTree()
child->setView(nullptr);
}
-void FrameTree::setName(const AtomicString& name)
+void FrameTree::setName(const AtomicString& name, const AtomicString& fallbackName)
{
m_name = name;
if (!parent()) {
@@ -61,7 +61,7 @@ void FrameTree::setName(const AtomicString& name)
return;
}
m_uniqueName = AtomicString(); // Remove our old frame name so it's not considered in uniqueChildName.
- m_uniqueName = parent()->tree().uniqueChildName(name);
+ m_uniqueName = parent()->tree().uniqueChildName(name.isEmpty() ? fallbackName : name);
}
LocalFrame* FrameTree::parent() const
« no previous file with comments | « Source/core/page/FrameTree.h ('k') | Source/web/WebFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698