OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |