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

Unified Diff: Source/core/frame/Frame.cpp

Issue 348833005: [DO NOT COMMIT] Random hacks to unblock work on replication. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: More random hacks, including also dcheng's https://codereview.chromium.org/346403002 Created 6 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 | « Source/core/frame/Frame.h ('k') | Source/core/frame/FrameView.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/Frame.cpp
diff --git a/Source/core/frame/Frame.cpp b/Source/core/frame/Frame.cpp
index 52813512bddfb80d0136b76830dcb1c1b229ae0c..b6c43ba338388c588ec383fd8d5e5647424a9fcd 100644
--- a/Source/core/frame/Frame.cpp
+++ b/Source/core/frame/Frame.cpp
@@ -181,7 +181,17 @@ void Frame::detachFromFrameHost()
bool Frame::isMainFrame() const
{
Page* page = this->page();
- return page && this == page->mainFrame();
+ return (page && this == page->mainFrame()) || isLocalRoot();
+}
+
+bool Frame::isLocalRoot() const {
+ if (isRemoteFrame())
+ return false;
+
+ if (!tree().parent())
+ return true;
+
+ return tree().parent()->isRemoteFrame();
}
void Frame::disconnectOwnerElement()
« no previous file with comments | « Source/core/frame/Frame.h ('k') | Source/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698