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

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

Issue 1459023002: Compositor Animation Timelines: Fix frame swapping tests in WebFrameTest.cpp (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Plumb it from detach method instead. Created 5 years, 1 month 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 visitor->trace(m_treeNode); 85 visitor->trace(m_treeNode);
86 visitor->trace(m_host); 86 visitor->trace(m_host);
87 visitor->trace(m_owner); 87 visitor->trace(m_owner);
88 visitor->trace(m_client); 88 visitor->trace(m_client);
89 } 89 }
90 90
91 void Frame::detach(FrameDetachType type) 91 void Frame::detach(FrameDetachType type)
92 { 92 {
93 ASSERT(m_client); 93 ASSERT(m_client);
94 m_client->setOpener(0); 94 m_client->setOpener(0);
95
96 if (type == FrameDetachType::Swap && isMainFrame() && page())
dcheng 2015/11/19 05:09:56 I don't think page() can ever be null here. An inv
loyso (OOO) 2015/11/26 06:22:52 Acknowledged.
97 page()->willSwapMainFrame();
98
95 domWindow()->resetLocation(); 99 domWindow()->resetLocation();
96 disconnectOwnerElement(); 100 disconnectOwnerElement();
97 // After this, we must no longer talk to the client since this clears 101 // After this, we must no longer talk to the client since this clears
98 // its owning reference back to our owning LocalFrame. 102 // its owning reference back to our owning LocalFrame.
99 m_client->detached(type); 103 m_client->detached(type);
100 m_client = nullptr; 104 m_client = nullptr;
101 m_host = nullptr; 105 m_host = nullptr;
102 } 106 }
103 107
104 void Frame::detachChildren() 108 void Frame::detachChildren()
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 317
314 if (m_owner) { 318 if (m_owner) {
315 if (m_owner->isLocal()) 319 if (m_owner->isLocal())
316 toHTMLFrameOwnerElement(m_owner)->setContentFrame(*this); 320 toHTMLFrameOwnerElement(m_owner)->setContentFrame(*this);
317 } else { 321 } else {
318 page()->setMainFrame(this); 322 page()->setMainFrame(this);
319 } 323 }
320 } 324 }
321 325
322 } // namespace blink 326 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698