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

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

Issue 2871703002: Revert of Simplify FrameLoader::Clear(), remove FrameLoader::check_timer_ (Closed)
Patch Set: Created 3 years, 7 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
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();
181 } 179 }
182 180
183 void HTMLFrameOwnerElement::DisconnectContentFrame() { 181 void HTMLFrameOwnerElement::DisconnectContentFrame() {
184 // FIXME: Currently we don't do this in removedFrom because this causes an 182 // FIXME: Currently we don't do this in removedFrom because this causes an
185 // unload event in the subframe which could execute script that could then 183 // unload event in the subframe which could execute script that could then
186 // reach up into this document and then attempt to look back down. We should 184 // reach up into this document and then attempt to look back down. We should
187 // see if this behavior is really needed as Gecko does not allow this. 185 // see if this behavior is really needed as Gecko does not allow this.
188 if (Frame* frame = ContentFrame()) { 186 if (Frame* frame = ContentFrame()) {
189 frame->Detach(FrameDetachType::kRemove); 187 frame->Detach(FrameDetachType::kRemove);
190 } 188 }
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 } 371 }
374 372
375 DEFINE_TRACE(HTMLFrameOwnerElement) { 373 DEFINE_TRACE(HTMLFrameOwnerElement) {
376 visitor->Trace(content_frame_); 374 visitor->Trace(content_frame_);
377 visitor->Trace(widget_); 375 visitor->Trace(widget_);
378 HTMLElement::Trace(visitor); 376 HTMLElement::Trace(visitor);
379 FrameOwner::Trace(visitor); 377 FrameOwner::Trace(visitor);
380 } 378 }
381 379
382 } // namespace blink 380 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp ('k') | third_party/WebKit/Source/core/loader/FrameLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698