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

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

Issue 2769263004: Remove Frame::host() method (Closed)
Patch Set: Created 3 years, 9 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 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 // In a back/forward navigation, we sometimes restore history state to 489 // In a back/forward navigation, we sometimes restore history state to
490 // iframes, even though the state was generated dynamically and JS will try to 490 // iframes, even though the state was generated dynamically and JS will try to
491 // put something different in the iframe. In this case, we will load stale 491 // put something different in the iframe. In this case, we will load stale
492 // things and/or confuse the JS when it shortly thereafter tries to schedule a 492 // things and/or confuse the JS when it shortly thereafter tries to schedule a
493 // location change. Let the JS have its way. 493 // location change. Let the JS have its way.
494 // FIXME: This check seems out of place. 494 // FIXME: This check seems out of place.
495 if (!m_frame->loader().stateMachine()->committedFirstRealDocumentLoad() && 495 if (!m_frame->loader().stateMachine()->committedFirstRealDocumentLoad() &&
496 m_frame->loader().provisionalDocumentLoader() && 496 m_frame->loader().provisionalDocumentLoader() &&
497 m_frame->loader().provisionalDocumentLoader()->didStart()) { 497 m_frame->loader().provisionalDocumentLoader()->didStart()) {
498 m_frame->loader().stopAllLoaders(); 498 m_frame->loader().stopAllLoaders();
499 if (!m_frame->host()) 499 if (!m_frame->page())
500 return; 500 return;
501 } 501 }
502 502
503 cancel(); 503 cancel();
504 m_redirect = redirect; 504 m_redirect = redirect;
505 startTimer(); 505 startTimer();
506 } 506 }
507 507
508 void NavigationScheduler::startTimer() { 508 void NavigationScheduler::startTimer() {
509 if (!m_redirect) 509 if (!m_redirect)
(...skipping 28 matching lines...) Expand all
538 m_navigateTaskHandle.cancel(); 538 m_navigateTaskHandle.cancel();
539 m_redirect.clear(); 539 m_redirect.clear();
540 } 540 }
541 541
542 DEFINE_TRACE(NavigationScheduler) { 542 DEFINE_TRACE(NavigationScheduler) {
543 visitor->trace(m_frame); 543 visitor->trace(m_frame);
544 visitor->trace(m_redirect); 544 visitor->trace(m_redirect);
545 } 545 }
546 546
547 } // namespace blink 547 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698