| OLD | NEW |
| 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 Loading... |
| 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(); | |
| 512 StartTimer(); | 510 StartTimer(); |
| 513 } | 511 } |
| 514 | 512 |
| 515 void NavigationScheduler::StartTimer() { | 513 void NavigationScheduler::StartTimer() { |
| 516 if (!redirect_) | 514 if (!redirect_) |
| 517 return; | 515 return; |
| 518 | 516 |
| 519 DCHECK(frame_->GetPage()); | 517 DCHECK(frame_->GetPage()); |
| 520 if (navigate_task_handle_.IsActive()) | 518 if (navigate_task_handle_.IsActive()) |
| 521 return; | 519 return; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 546 navigate_task_handle_.Cancel(); | 544 navigate_task_handle_.Cancel(); |
| 547 redirect_.Clear(); | 545 redirect_.Clear(); |
| 548 } | 546 } |
| 549 | 547 |
| 550 DEFINE_TRACE(NavigationScheduler) { | 548 DEFINE_TRACE(NavigationScheduler) { |
| 551 visitor->Trace(frame_); | 549 visitor->Trace(frame_); |
| 552 visitor->Trace(redirect_); | 550 visitor->Trace(redirect_); |
| 553 } | 551 } |
| 554 | 552 |
| 555 } // namespace blink | 553 } // namespace blink |
| OLD | NEW |