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

Side by Side Diff: Source/core/frame/Frame.cpp

Issue 1128403004: Fix Frame::isMainFrame() to be compatible with provisional frames (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update stuff Created 5 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/web/WebRemoteFrameImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Simon Hausmann <hausmann@kde.org> 5 * 2000 Simon Hausmann <hausmann@kde.org>
6 * 2000 Stefan Schimanski <1Stein@gmx.de> 6 * 2000 Stefan Schimanski <1Stein@gmx.de>
7 * 2001 George Staikos <staikos@kde.org> 7 * 2001 George Staikos <staikos@kde.org>
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com>
10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 return nullptr; 109 return nullptr;
110 } 110 }
111 111
112 FrameHost* Frame::host() const 112 FrameHost* Frame::host() const
113 { 113 {
114 return m_host; 114 return m_host;
115 } 115 }
116 116
117 bool Frame::isMainFrame() const 117 bool Frame::isMainFrame() const
118 { 118 {
119 Page* page = this->page(); 119 return !tree().parent();
120 return page && this == page->mainFrame();
121 } 120 }
122 121
123 bool Frame::isLocalRoot() const 122 bool Frame::isLocalRoot() const
124 { 123 {
125 if (isRemoteFrame()) 124 if (isRemoteFrame())
126 return false; 125 return false;
127 126
128 if (!tree().parent()) 127 if (!tree().parent())
129 return true; 128 return true;
130 129
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 295
297 if (m_owner) { 296 if (m_owner) {
298 if (m_owner->isLocal()) 297 if (m_owner->isLocal())
299 toHTMLFrameOwnerElement(m_owner)->setContentFrame(*this); 298 toHTMLFrameOwnerElement(m_owner)->setContentFrame(*this);
300 } else { 299 } else {
301 page()->setMainFrame(this); 300 page()->setMainFrame(this);
302 } 301 }
303 } 302 }
304 303
305 } // namespace blink 304 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/web/WebRemoteFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698