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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 | 169 |
170 void HTMLFrameOwnerElement::ClearContentFrame() { | 170 void HTMLFrameOwnerElement::ClearContentFrame() { |
171 if (!content_frame_) | 171 if (!content_frame_) |
172 return; | 172 return; |
173 | 173 |
174 DCHECK_EQ(content_frame_->Owner(), this); | 174 DCHECK_EQ(content_frame_->Owner(), this); |
175 content_frame_ = nullptr; | 175 content_frame_ = nullptr; |
176 | 176 |
177 for (ContainerNode* node = this; node; node = node->ParentOrShadowHostNode()) | 177 for (ContainerNode* node = this; node; node = node->ParentOrShadowHostNode()) |
178 node->DecrementConnectedSubframeCount(); | 178 node->DecrementConnectedSubframeCount(); |
| 179 |
| 180 GetDocument().CheckCompleted(); |
179 } | 181 } |
180 | 182 |
181 void HTMLFrameOwnerElement::DisconnectContentFrame() { | 183 void HTMLFrameOwnerElement::DisconnectContentFrame() { |
182 // FIXME: Currently we don't do this in removedFrom because this causes an | 184 // FIXME: Currently we don't do this in removedFrom because this causes an |
183 // unload event in the subframe which could execute script that could then | 185 // unload event in the subframe which could execute script that could then |
184 // reach up into this document and then attempt to look back down. We should | 186 // reach up into this document and then attempt to look back down. We should |
185 // see if this behavior is really needed as Gecko does not allow this. | 187 // see if this behavior is really needed as Gecko does not allow this. |
186 if (Frame* frame = ContentFrame()) { | 188 if (Frame* frame = ContentFrame()) { |
187 frame->Detach(FrameDetachType::kRemove); | 189 frame->Detach(FrameDetachType::kRemove); |
188 } | 190 } |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 } | 373 } |
372 | 374 |
373 DEFINE_TRACE(HTMLFrameOwnerElement) { | 375 DEFINE_TRACE(HTMLFrameOwnerElement) { |
374 visitor->Trace(content_frame_); | 376 visitor->Trace(content_frame_); |
375 visitor->Trace(widget_); | 377 visitor->Trace(widget_); |
376 HTMLElement::Trace(visitor); | 378 HTMLElement::Trace(visitor); |
377 FrameOwner::Trace(visitor); | 379 FrameOwner::Trace(visitor); |
378 } | 380 } |
379 | 381 |
380 } // namespace blink | 382 } // namespace blink |
OLD | NEW |