OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |