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 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 if (!frame_->Loader().StateMachine()->CommittedFirstRealDocumentLoad() && | 502 if (!frame_->Loader().StateMachine()->CommittedFirstRealDocumentLoad() && |
503 frame_->Loader().ProvisionalDocumentLoader() && | 503 frame_->Loader().ProvisionalDocumentLoader() && |
504 frame_->Loader().ProvisionalDocumentLoader()->DidStart()) { | 504 frame_->Loader().ProvisionalDocumentLoader()->DidStart()) { |
505 frame_->Loader().StopAllLoaders(); | 505 frame_->Loader().StopAllLoaders(); |
506 if (!frame_->GetPage()) | 506 if (!frame_->GetPage()) |
507 return; | 507 return; |
508 } | 508 } |
509 | 509 |
510 Cancel(); | 510 Cancel(); |
511 redirect_ = redirect; | 511 redirect_ = redirect; |
| 512 if (redirect_->IsLocationChange()) |
| 513 frame_->GetDocument()->SuppressLoadEvent(); |
512 StartTimer(); | 514 StartTimer(); |
513 } | 515 } |
514 | 516 |
515 void NavigationScheduler::StartTimer() { | 517 void NavigationScheduler::StartTimer() { |
516 if (!redirect_) | 518 if (!redirect_) |
517 return; | 519 return; |
518 | 520 |
519 DCHECK(frame_->GetPage()); | 521 DCHECK(frame_->GetPage()); |
520 if (navigate_task_handle_.IsActive()) | 522 if (navigate_task_handle_.IsActive()) |
521 return; | 523 return; |
(...skipping 24 matching lines...) Expand all Loading... |
546 navigate_task_handle_.Cancel(); | 548 navigate_task_handle_.Cancel(); |
547 redirect_.Clear(); | 549 redirect_.Clear(); |
548 } | 550 } |
549 | 551 |
550 DEFINE_TRACE(NavigationScheduler) { | 552 DEFINE_TRACE(NavigationScheduler) { |
551 visitor->Trace(frame_); | 553 visitor->Trace(frame_); |
552 visitor->Trace(redirect_); | 554 visitor->Trace(redirect_); |
553 } | 555 } |
554 | 556 |
555 } // namespace blink | 557 } // namespace blink |
OLD | NEW |