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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 childrenToDetach.reserveCapacity(tree().childCount()); | 107 childrenToDetach.reserveCapacity(tree().childCount()); |
108 for (Frame* child = tree().firstChild(); child; child = child->tree().nextSi
bling()) | 108 for (Frame* child = tree().firstChild(); child; child = child->tree().nextSi
bling()) |
109 childrenToDetach.append(child); | 109 childrenToDetach.append(child); |
110 for (const auto& child : childrenToDetach) | 110 for (const auto& child : childrenToDetach) |
111 child->detach(FrameDetachType::Remove); | 111 child->detach(FrameDetachType::Remove); |
112 } | 112 } |
113 | 113 |
114 void Frame::disconnectOwnerElement() | 114 void Frame::disconnectOwnerElement() |
115 { | 115 { |
116 if (m_owner) { | 116 if (m_owner) { |
117 if (m_owner->isLocal()) | 117 m_owner->clearContentFrame(); |
118 toHTMLFrameOwnerElement(m_owner)->clearContentFrame(); | 118 m_owner = nullptr; |
119 } | 119 } |
120 m_owner = nullptr; | |
121 } | 120 } |
122 | 121 |
123 Page* Frame::page() const | 122 Page* Frame::page() const |
124 { | 123 { |
125 if (m_host) | 124 if (m_host) |
126 return &m_host->page(); | 125 return &m_host->page(); |
127 return nullptr; | 126 return nullptr; |
128 } | 127 } |
129 | 128 |
130 FrameHost* Frame::host() const | 129 FrameHost* Frame::host() const |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 , m_isLoading(false) | 301 , m_isLoading(false) |
303 { | 302 { |
304 InstanceCounters::incrementCounter(InstanceCounters::FrameCounter); | 303 InstanceCounters::incrementCounter(InstanceCounters::FrameCounter); |
305 | 304 |
306 ASSERT(page()); | 305 ASSERT(page()); |
307 | 306 |
308 #ifndef NDEBUG | 307 #ifndef NDEBUG |
309 frameCounter().increment(); | 308 frameCounter().increment(); |
310 #endif | 309 #endif |
311 | 310 |
312 if (m_owner) { | 311 if (m_owner) |
313 if (m_owner->isLocal()) | 312 m_owner->setContentFrame(*this); |
314 toHTMLFrameOwnerElement(m_owner)->setContentFrame(*this); | 313 else |
315 } else { | |
316 page()->setMainFrame(this); | 314 page()->setMainFrame(this); |
317 } | |
318 } | 315 } |
319 | 316 |
320 } // namespace blink | 317 } // namespace blink |
OLD | NEW |