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

Side by Side Diff: third_party/WebKit/Source/core/loader/NavigationScheduler.cpp

Issue 2809733003: Move most of FrameLoader::CheckCompleted() to Document (Closed)
Patch Set: processingLoadEvent() as part of shouldComplete(), cleanup shouldComplete() Created 3 years, 8 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, 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
5 * (http://www.torchmobile.com/) 5 * (http://www.torchmobile.com/)
6 * Copyright (C) 2009 Adam Barth. All rights reserved. 6 * Copyright (C) 2009 Adam Barth. All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 if (!frame_->Loader().StateMachine()->CommittedFirstRealDocumentLoad() && 500 if (!frame_->Loader().StateMachine()->CommittedFirstRealDocumentLoad() &&
501 frame_->Loader().ProvisionalDocumentLoader() && 501 frame_->Loader().ProvisionalDocumentLoader() &&
502 frame_->Loader().ProvisionalDocumentLoader()->DidStart()) { 502 frame_->Loader().ProvisionalDocumentLoader()->DidStart()) {
503 frame_->Loader().StopAllLoaders(); 503 frame_->Loader().StopAllLoaders();
504 if (!frame_->GetPage()) 504 if (!frame_->GetPage())
505 return; 505 return;
506 } 506 }
507 507
508 Cancel(); 508 Cancel();
509 redirect_ = redirect; 509 redirect_ = redirect;
510 if (redirect_->IsLocationChange())
511 frame_->GetDocument()->SuppressLoadEvent();
Nate Chapin 2017/04/11 23:25:50 Instead of the early-exit in Document::ImplicitClo
510 StartTimer(); 512 StartTimer();
511 } 513 }
512 514
513 void NavigationScheduler::StartTimer() { 515 void NavigationScheduler::StartTimer() {
514 if (!redirect_) 516 if (!redirect_)
515 return; 517 return;
516 518
517 DCHECK(frame_->GetPage()); 519 DCHECK(frame_->GetPage());
518 if (navigate_task_handle_.IsActive()) 520 if (navigate_task_handle_.IsActive())
519 return; 521 return;
(...skipping 24 matching lines...) Expand all
544 navigate_task_handle_.Cancel(); 546 navigate_task_handle_.Cancel();
545 redirect_.Clear(); 547 redirect_.Clear();
546 } 548 }
547 549
548 DEFINE_TRACE(NavigationScheduler) { 550 DEFINE_TRACE(NavigationScheduler) {
549 visitor->Trace(frame_); 551 visitor->Trace(frame_);
550 visitor->Trace(redirect_); 552 visitor->Trace(redirect_);
551 } 553 }
552 554
553 } // namespace blink 555 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698