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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp

Issue 1802953003: RemoteBridgeFrameOwner: keep better track of the attached frame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Doing work in constructors is evil. Created 4 years, 9 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) 2006, 2007, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 158
159 for (ContainerNode* node = this; node; node = node->parentOrShadowHostNode() ) 159 for (ContainerNode* node = this; node; node = node->parentOrShadowHostNode() )
160 node->incrementConnectedSubframeCount(); 160 node->incrementConnectedSubframeCount();
161 } 161 }
162 162
163 void HTMLFrameOwnerElement::clearContentFrame() 163 void HTMLFrameOwnerElement::clearContentFrame()
164 { 164 {
165 if (!m_contentFrame) 165 if (!m_contentFrame)
166 return; 166 return;
167 167
168 ASSERT(m_contentFrame->owner() == this);
168 m_contentFrame = nullptr; 169 m_contentFrame = nullptr;
169 170
170 for (ContainerNode* node = this; node; node = node->parentOrShadowHostNode() ) 171 for (ContainerNode* node = this; node; node = node->parentOrShadowHostNode() )
171 node->decrementConnectedSubframeCount(); 172 node->decrementConnectedSubframeCount();
172 } 173 }
173 174
174 void HTMLFrameOwnerElement::disconnectContentFrame() 175 void HTMLFrameOwnerElement::disconnectContentFrame()
175 { 176 {
176 // FIXME: Currently we don't do this in removedFrom because this causes an 177 // FIXME: Currently we don't do this in removedFrom because this causes an
177 // unload event in the subframe which could execute script that could then 178 // unload event in the subframe which could execute script that could then
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 DEFINE_TRACE(HTMLFrameOwnerElement) 307 DEFINE_TRACE(HTMLFrameOwnerElement)
307 { 308 {
308 visitor->trace(m_contentFrame); 309 visitor->trace(m_contentFrame);
309 visitor->trace(m_widget); 310 visitor->trace(m_widget);
310 HTMLElement::trace(visitor); 311 HTMLElement::trace(visitor);
311 FrameOwner::trace(visitor); 312 FrameOwner::trace(visitor);
312 } 313 }
313 314
314 315
315 } // namespace blink 316 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698