| 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 setView(nullptr); | 117 setView(nullptr); |
| 118 loader().clear(); | 118 loader().clear(); |
| 119 setDOMWindow(nullptr); | 119 setDOMWindow(nullptr); |
| 120 | 120 |
| 121 // FIXME: What to do here... some of this is redundant with ~Frame. | 121 // FIXME: What to do here... some of this is redundant with ~Frame. |
| 122 HashSet<FrameDestructionObserver*>::iterator stop = m_destructionObservers.e
nd(); | 122 HashSet<FrameDestructionObserver*>::iterator stop = m_destructionObservers.e
nd(); |
| 123 for (HashSet<FrameDestructionObserver*>::iterator it = m_destructionObserver
s.begin(); it != stop; ++it) | 123 for (HashSet<FrameDestructionObserver*>::iterator it = m_destructionObserver
s.begin(); it != stop; ++it) |
| 124 (*it)->frameDestroyed(); | 124 (*it)->frameDestroyed(); |
| 125 } | 125 } |
| 126 | 126 |
| 127 void LocalFrame::detach() |
| 128 { |
| 129 // A lot of the following steps can result in the current frame being |
| 130 // detached, so protect a reference to it. |
| 131 RefPtr<LocalFrame> protect(this); |
| 132 m_loader.stopAllLoaders(); |
| 133 m_loader.closeURL(); |
| 134 detachChildren(); |
| 135 // stopAllLoaders() needs to be called after detachChildren(), because detac
hChildren() |
| 136 // will trigger the unload event handlers of any child frames, and those eve
nt |
| 137 // handlers might start a new subresource load in this frame. |
| 138 m_loader.stopAllLoaders(); |
| 139 m_loader.detachFromParent(); |
| 140 } |
| 141 |
| 127 bool LocalFrame::inScope(TreeScope* scope) const | 142 bool LocalFrame::inScope(TreeScope* scope) const |
| 128 { | 143 { |
| 129 ASSERT(scope); | 144 ASSERT(scope); |
| 130 Document* doc = document(); | 145 Document* doc = document(); |
| 131 if (!doc) | 146 if (!doc) |
| 132 return false; | 147 return false; |
| 133 // FIXME: This check is broken in for OOPI. | 148 // FIXME: This check is broken in for OOPI. |
| 134 HTMLFrameOwnerElement* owner = doc->ownerElement(); | 149 HTMLFrameOwnerElement* owner = doc->ownerElement(); |
| 135 if (!owner) | 150 if (!owner) |
| 136 return false; | 151 return false; |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 LocalFrame* LocalFrame::localFrameRoot() | 660 LocalFrame* LocalFrame::localFrameRoot() |
| 646 { | 661 { |
| 647 LocalFrame* curFrame = this; | 662 LocalFrame* curFrame = this; |
| 648 while (curFrame && curFrame->tree().parent() && curFrame->tree().parent()->i
sLocalFrame()) | 663 while (curFrame && curFrame->tree().parent() && curFrame->tree().parent()->i
sLocalFrame()) |
| 649 curFrame = toLocalFrame(curFrame->tree().parent()); | 664 curFrame = toLocalFrame(curFrame->tree().parent()); |
| 650 | 665 |
| 651 return curFrame; | 666 return curFrame; |
| 652 } | 667 } |
| 653 | 668 |
| 654 } // namespace blink | 669 } // namespace blink |
| OLD | NEW |