| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 m_client->setOpener(0); | 71 m_client->setOpener(0); |
| 72 domWindow()->resetLocation(); | 72 domWindow()->resetLocation(); |
| 73 disconnectOwnerElement(); | 73 disconnectOwnerElement(); |
| 74 // After this, we must no longer talk to the client since this clears | 74 // After this, we must no longer talk to the client since this clears |
| 75 // its owning reference back to our owning LocalFrame. | 75 // its owning reference back to our owning LocalFrame. |
| 76 m_client->detached(type); | 76 m_client->detached(type); |
| 77 m_client = nullptr; | 77 m_client = nullptr; |
| 78 m_host = nullptr; | 78 m_host = nullptr; |
| 79 } | 79 } |
| 80 | 80 |
| 81 void Frame::detachChildren() | |
| 82 { | |
| 83 typedef HeapVector<Member<Frame>> FrameVector; | |
| 84 FrameVector childrenToDetach; | |
| 85 childrenToDetach.reserveCapacity(tree().childCount()); | |
| 86 for (Frame* child = tree().firstChild(); child; child = child->tree().nextSi
bling()) | |
| 87 childrenToDetach.append(child); | |
| 88 for (const auto& child : childrenToDetach) | |
| 89 child->detach(FrameDetachType::Remove); | |
| 90 } | |
| 91 | |
| 92 void Frame::disconnectOwnerElement() | 81 void Frame::disconnectOwnerElement() |
| 93 { | 82 { |
| 94 if (m_owner) { | 83 if (m_owner) { |
| 95 m_owner->clearContentFrame(); | 84 m_owner->clearContentFrame(); |
| 96 m_owner = nullptr; | 85 m_owner = nullptr; |
| 97 } | 86 } |
| 98 } | 87 } |
| 99 | 88 |
| 100 Page* Frame::page() const | 89 Page* Frame::page() const |
| 101 { | 90 { |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 | 306 |
| 318 ASSERT(page()); | 307 ASSERT(page()); |
| 319 | 308 |
| 320 if (m_owner) | 309 if (m_owner) |
| 321 m_owner->setContentFrame(*this); | 310 m_owner->setContentFrame(*this); |
| 322 else | 311 else |
| 323 page()->setMainFrame(this); | 312 page()->setMainFrame(this); |
| 324 } | 313 } |
| 325 | 314 |
| 326 } // namespace blink | 315 } // namespace blink |
| OLD | NEW |