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

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

Issue 2873503002: NOT YET READY: Improve granularity of window namespaces in Blink.
Patch Set: Rebasing... Created 3 years, 6 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 | « third_party/WebKit/Source/core/loader/EmptyClients.cpp ('k') | third_party/WebKit/Source/core/page/Page.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/page/FrameTree.cpp
diff --git a/third_party/WebKit/Source/core/page/FrameTree.cpp b/third_party/WebKit/Source/core/page/FrameTree.cpp
index d12d5c443e8b242f6b72f5b4889b337ea1a5d9d9..9fd8fbdc26a8dc2b6c0ec9f3c7ba4dc471e51e78 100644
--- a/third_party/WebKit/Source/core/page/FrameTree.cpp
+++ b/third_party/WebKit/Source/core/page/FrameTree.cpp
@@ -23,6 +23,7 @@
#include "core/dom/Document.h"
#include "core/frame/FrameClient.h"
#include "core/frame/LocalFrame.h"
+#include "core/frame/LocalFrameClient.h"
#include "core/frame/LocalFrameView.h"
#include "core/frame/RemoteFrame.h"
#include "core/frame/RemoteFrameView.h"
@@ -198,8 +199,7 @@ Frame* FrameTree::Find(const AtomicString& name) const {
}
// Search the entire tree of each of the other pages in this namespace.
- // FIXME: Is random order OK?
- for (const Page* other_page : Page::OrdinaryPages()) {
+ for (const Page* other_page : page->RelatedPages()) {
if (other_page == page || other_page->IsClosing())
continue;
for (Frame* frame = other_page->MainFrame(); frame;
@@ -209,7 +209,8 @@ Frame* FrameTree::Find(const AtomicString& name) const {
}
}
- return nullptr;
+ // Ask the embedder as a fallback.
+ return ToLocalFrame(this_frame_)->Client()->FindFrame(name);
}
bool FrameTree::IsDescendantOf(const Frame* ancestor) const {
« no previous file with comments | « third_party/WebKit/Source/core/loader/EmptyClients.cpp ('k') | third_party/WebKit/Source/core/page/Page.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698