| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 #include "sky/engine/platform/text/TextStream.h" | 58 #include "sky/engine/platform/text/TextStream.h" |
| 59 #include "sky/engine/wtf/PassOwnPtr.h" | 59 #include "sky/engine/wtf/PassOwnPtr.h" |
| 60 #include "sky/engine/wtf/StdLibExtras.h" | 60 #include "sky/engine/wtf/StdLibExtras.h" |
| 61 | 61 |
| 62 namespace blink { | 62 namespace blink { |
| 63 | 63 |
| 64 inline LocalFrame::LocalFrame(FrameLoaderClient* client, FrameHost* host) | 64 inline LocalFrame::LocalFrame(FrameLoaderClient* client, FrameHost* host) |
| 65 : Frame(client, host) | 65 : Frame(client, host) |
| 66 , m_deprecatedLoader(this) | 66 , m_deprecatedLoader(this) |
| 67 , m_mojoLoader(adoptPtr(new MojoLoader(*this))) | 67 , m_mojoLoader(adoptPtr(new MojoLoader(*this))) |
| 68 , m_dart(adoptPtr(new DartController())) | |
| 69 , m_editor(Editor::create(*this)) | 68 , m_editor(Editor::create(*this)) |
| 70 , m_spellChecker(SpellChecker::create(*this)) | 69 , m_spellChecker(SpellChecker::create(*this)) |
| 71 , m_selection(FrameSelection::create(this)) | 70 , m_selection(FrameSelection::create(this)) |
| 72 , m_eventHandler(adoptPtr(new EventHandler(this))) | 71 , m_eventHandler(adoptPtr(new EventHandler(this))) |
| 73 , m_newEventHandler(adoptPtr(new NewEventHandler(*this))) | 72 , m_newEventHandler(adoptPtr(new NewEventHandler(*this))) |
| 74 , m_console(FrameConsole::create(*this)) | 73 , m_console(FrameConsole::create(*this)) |
| 75 , m_inputMethodController(InputMethodController::create(*this)) | 74 , m_inputMethodController(InputMethodController::create(*this)) |
| 76 , m_document(nullptr) | 75 , m_document(nullptr) |
| 77 { | 76 { |
| 78 if (page()) | 77 if (page()) |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 m_deprecatedLoader.closeURL(); | 114 m_deprecatedLoader.closeURL(); |
| 116 detachChildren(); | 115 detachChildren(); |
| 117 // stopAllLoaders() needs to be called after detachChildren(), because detac
hChildren() | 116 // stopAllLoaders() needs to be called after detachChildren(), because detac
hChildren() |
| 118 // will trigger the unload event handlers of any child frames, and those eve
nt | 117 // will trigger the unload event handlers of any child frames, and those eve
nt |
| 119 // handlers might start a new subresource load in this frame. | 118 // handlers might start a new subresource load in this frame. |
| 120 m_deprecatedLoader.stopAllLoaders(); | 119 m_deprecatedLoader.stopAllLoaders(); |
| 121 | 120 |
| 122 setView(nullptr); | 121 setView(nullptr); |
| 123 willDetachFrameHost(); | 122 willDetachFrameHost(); |
| 124 | 123 |
| 125 // Finish all cleanup work that might require talking to the embedder. | |
| 126 // Notify ScriptController that the frame is closing, since its cleanup ends
up calling | |
| 127 // back to FrameLoaderClient via WindowProxy. | |
| 128 dart().ClearForClose(); | |
| 129 // After this, we must no longer talk to the client since this clears | 124 // After this, we must no longer talk to the client since this clears |
| 130 // its owning reference back to our owning LocalFrame. | 125 // its owning reference back to our owning LocalFrame. |
| 131 loaderClient()->detachedFromParent(); | 126 loaderClient()->detachedFromParent(); |
| 132 clearClient(); | 127 clearClient(); |
| 133 detachFromFrameHost(); | 128 detachFromFrameHost(); |
| 134 } | 129 } |
| 135 | 130 |
| 136 void LocalFrame::setView(PassRefPtr<FrameView> view) | 131 void LocalFrame::setView(PassRefPtr<FrameView> view) |
| 137 { | 132 { |
| 138 // We the custom scroll bars as early as possible to prevent m_doc->detach() | 133 // We the custom scroll bars as early as possible to prevent m_doc->detach() |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 } | 308 } |
| 314 | 309 |
| 315 double LocalFrame::devicePixelRatio() const | 310 double LocalFrame::devicePixelRatio() const |
| 316 { | 311 { |
| 317 if (!m_host) | 312 if (!m_host) |
| 318 return 0; | 313 return 0; |
| 319 return m_host->deviceScaleFactor(); | 314 return m_host->deviceScaleFactor(); |
| 320 } | 315 } |
| 321 | 316 |
| 322 } // namespace blink | 317 } // namespace blink |
| OLD | NEW |