| 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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 Schedule(ScheduledRedirect::Create(delay, frame_->GetDocument(), url, | 403 Schedule(ScheduledRedirect::Create(delay, frame_->GetDocument(), url, |
| 404 delay <= 1)); | 404 delay <= 1)); |
| 405 } | 405 } |
| 406 } | 406 } |
| 407 | 407 |
| 408 bool NavigationScheduler::MustReplaceCurrentItem(LocalFrame* target_frame) { | 408 bool NavigationScheduler::MustReplaceCurrentItem(LocalFrame* target_frame) { |
| 409 // Non-user navigation before the page has finished firing onload should not | 409 // Non-user navigation before the page has finished firing onload should not |
| 410 // create a new back/forward item. See https://webkit.org/b/42861 for the | 410 // create a new back/forward item. See https://webkit.org/b/42861 for the |
| 411 // original motivation for this. | 411 // original motivation for this. |
| 412 if (!target_frame->GetDocument()->LoadEventFinished() && | 412 if (!target_frame->GetDocument()->LoadEventFinished() && |
| 413 !UserGestureIndicator::UtilizeUserGesture()) | 413 !UserGestureIndicator::ProcessingUserGesture()) |
| 414 return true; | 414 return true; |
| 415 | 415 |
| 416 // Navigation of a subframe during loading of an ancestor frame does not | 416 // Navigation of a subframe during loading of an ancestor frame does not |
| 417 // create a new back/forward item. The definition of "during load" is any time | 417 // create a new back/forward item. The definition of "during load" is any time |
| 418 // before all handlers for the load event have been run. See | 418 // before all handlers for the load event have been run. See |
| 419 // https://bugs.webkit.org/show_bug.cgi?id=14957 for the original motivation | 419 // https://bugs.webkit.org/show_bug.cgi?id=14957 for the original motivation |
| 420 // for this. | 420 // for this. |
| 421 Frame* parent_frame = target_frame->Tree().Parent(); | 421 Frame* parent_frame = target_frame->Tree().Parent(); |
| 422 return parent_frame && parent_frame->IsLocalFrame() && | 422 return parent_frame && parent_frame->IsLocalFrame() && |
| 423 !ToLocalFrame(parent_frame)->Loader().AllAncestorsAreComplete(); | 423 !ToLocalFrame(parent_frame)->Loader().AllAncestorsAreComplete(); |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 navigate_task_handle_.Cancel(); | 546 navigate_task_handle_.Cancel(); |
| 547 redirect_.Clear(); | 547 redirect_.Clear(); |
| 548 } | 548 } |
| 549 | 549 |
| 550 DEFINE_TRACE(NavigationScheduler) { | 550 DEFINE_TRACE(NavigationScheduler) { |
| 551 visitor->Trace(frame_); | 551 visitor->Trace(frame_); |
| 552 visitor->Trace(redirect_); | 552 visitor->Trace(redirect_); |
| 553 } | 553 } |
| 554 | 554 |
| 555 } // namespace blink | 555 } // namespace blink |
| OLD | NEW |