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

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

Issue 2854853006: Simplify FrameLoader::Clear(), remove FrameLoader::check_timer_ (Closed)
Patch Set: Move EnableEval(), remove unneeded(?) Clear() calls 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();
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698