Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(185)

Side by Side Diff: third_party/WebKit/Source/core/frame/LocalFrame.cpp

Issue 2318913002: Rename Document::attach/detachLayoutTree to Document::initialize/shutdown (Closed)
Patch Set: temp Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 361
362 // All done if detaching the subframes brought about a detach of this frame also. 362 // All done if detaching the subframes brought about a detach of this frame also.
363 if (!client()) 363 if (!client())
364 return; 364 return;
365 365
366 // stopAllLoaders() needs to be called after detachChildren(), because detac hChildren() 366 // stopAllLoaders() needs to be called after detachChildren(), because detac hChildren()
367 // will trigger the unload event handlers of any child frames, and those eve nt 367 // will trigger the unload event handlers of any child frames, and those eve nt
368 // handlers might start a new subresource load in this frame. 368 // handlers might start a new subresource load in this frame.
369 m_loader.stopAllLoaders(); 369 m_loader.stopAllLoaders();
370 m_loader.detach(); 370 m_loader.detach();
371 document()->detachLayoutTree(); 371 document()->shutdown();
372 // This is the earliest that scripting can be disabled: 372 // This is the earliest that scripting can be disabled:
373 // - FrameLoader::detach() can fire XHR abort events 373 // - FrameLoader::detach() can fire XHR abort events
374 // - Document::detachLayoutTree()'s deferred widget updates can run script. 374 // - Document::shutdown()'s deferred widget updates can run script.
375 ScriptForbiddenScope forbidScript; 375 ScriptForbiddenScope forbidScript;
376 m_loader.clear(); 376 m_loader.clear();
377 if (!client()) 377 if (!client())
378 return; 378 return;
379 379
380 client()->willBeDetached(); 380 client()->willBeDetached();
381 // Notify ScriptController that the frame is closing, since its cleanup ends up calling 381 // Notify ScriptController that the frame is closing, since its cleanup ends up calling
382 // back to FrameLoaderClient via WindowProxy. 382 // back to FrameLoaderClient via WindowProxy.
383 script().clearForClose(); 383 script().clearForClose();
384 setView(nullptr); 384 setView(nullptr);
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 m_frame->client()->frameBlameContext()->Enter(); 862 m_frame->client()->frameBlameContext()->Enter();
863 } 863 }
864 864
865 ScopedFrameBlamer::~ScopedFrameBlamer() 865 ScopedFrameBlamer::~ScopedFrameBlamer()
866 { 866 {
867 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) 867 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext())
868 m_frame->client()->frameBlameContext()->Leave(); 868 m_frame->client()->frameBlameContext()->Leave();
869 } 869 }
870 870
871 } // namespace blink 871 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp ('k') | third_party/WebKit/Source/core/html/HTMLSelectElementTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698