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 13 matching lines...) Expand all Loading... |
24 * You should have received a copy of the GNU Library General Public License | 24 * You should have received a copy of the GNU Library General Public License |
25 * along with this library; see the file COPYING.LIB. If not, write to | 25 * along with this library; see the file COPYING.LIB. If not, write to |
26 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 26 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
27 * Boston, MA 02110-1301, USA. | 27 * Boston, MA 02110-1301, USA. |
28 */ | 28 */ |
29 | 29 |
30 #include "core/frame/LocalFrame.h" | 30 #include "core/frame/LocalFrame.h" |
31 | 31 |
32 #include "bindings/core/v8/ScriptController.h" | 32 #include "bindings/core/v8/ScriptController.h" |
33 #include "core/InstrumentingAgents.h" | 33 #include "core/InstrumentingAgents.h" |
| 34 #include "core/dom/ChildFrameDisconnector.h" |
34 #include "core/dom/DocumentType.h" | 35 #include "core/dom/DocumentType.h" |
35 #include "core/dom/StyleChangeReason.h" | 36 #include "core/dom/StyleChangeReason.h" |
36 #include "core/editing/EditingUtilities.h" | 37 #include "core/editing/EditingUtilities.h" |
37 #include "core/editing/Editor.h" | 38 #include "core/editing/Editor.h" |
38 #include "core/editing/FrameSelection.h" | 39 #include "core/editing/FrameSelection.h" |
39 #include "core/editing/InputMethodController.h" | 40 #include "core/editing/InputMethodController.h" |
40 #include "core/editing/serializers/Serialization.h" | 41 #include "core/editing/serializers/Serialization.h" |
41 #include "core/editing/spellcheck/SpellChecker.h" | 42 #include "core/editing/spellcheck/SpellChecker.h" |
42 #include "core/events/Event.h" | 43 #include "core/events/Event.h" |
43 #include "core/fetch/ResourceFetcher.h" | 44 #include "core/fetch/ResourceFetcher.h" |
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 return m_script->getWindowProxyManager(); | 455 return m_script->getWindowProxyManager(); |
455 } | 456 } |
456 | 457 |
457 bool LocalFrame::shouldClose() | 458 bool LocalFrame::shouldClose() |
458 { | 459 { |
459 // TODO(dcheng): This should be fixed to dispatch beforeunload events to | 460 // TODO(dcheng): This should be fixed to dispatch beforeunload events to |
460 // both local and remote frames. | 461 // both local and remote frames. |
461 return m_loader.shouldClose(); | 462 return m_loader.shouldClose(); |
462 } | 463 } |
463 | 464 |
| 465 void LocalFrame::detachChildren() |
| 466 { |
| 467 DCHECK(m_loader.stateMachine()->creatingInitialEmptyDocument() || document()
); |
| 468 |
| 469 if (Document* document = this->document()) |
| 470 ChildFrameDisconnector(*document).disconnect(); |
| 471 } |
| 472 |
464 void LocalFrame::setDOMWindow(LocalDOMWindow* domWindow) | 473 void LocalFrame::setDOMWindow(LocalDOMWindow* domWindow) |
465 { | 474 { |
466 // Oilpan: setDOMWindow() cannot be used when finalizing. Which | 475 // Oilpan: setDOMWindow() cannot be used when finalizing. Which |
467 // is acceptable as its actions are either not needed or handled | 476 // is acceptable as its actions are either not needed or handled |
468 // by other means -- | 477 // by other means -- |
469 // | 478 // |
470 // - LocalFrameLifecycleObserver::willDetachFrameHost() will have | 479 // - LocalFrameLifecycleObserver::willDetachFrameHost() will have |
471 // signalled the Inspector frameWindowDiscarded() notifications. | 480 // signalled the Inspector frameWindowDiscarded() notifications. |
472 // We assume that all LocalFrames are detached, where that notification | 481 // We assume that all LocalFrames are detached, where that notification |
473 // will have been done. | 482 // will have been done. |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
866 m_frame->client()->frameBlameContext()->Enter(); | 875 m_frame->client()->frameBlameContext()->Enter(); |
867 } | 876 } |
868 | 877 |
869 ScopedFrameBlamer::~ScopedFrameBlamer() | 878 ScopedFrameBlamer::~ScopedFrameBlamer() |
870 { | 879 { |
871 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) | 880 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) |
872 m_frame->client()->frameBlameContext()->Leave(); | 881 m_frame->client()->frameBlameContext()->Leave(); |
873 } | 882 } |
874 | 883 |
875 } // namespace blink | 884 } // namespace blink |
OLD | NEW |