| 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. (http://www.t
     orchmobile.com/) | 4  * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
     orchmobile.com/) | 
| 5  * Copyright (C) 2009 Adam Barth. All rights reserved. | 5  * Copyright (C) 2009 Adam Barth. All rights reserved. | 
| 6  * | 6  * | 
| 7  * Redistribution and use in source and binary forms, with or without | 7  * Redistribution and use in source and binary forms, with or without | 
| 8  * modification, are permitted provided that the following conditions | 8  * modification, are permitted provided that the following conditions | 
| 9  * are met: | 9  * are met: | 
| 10  * | 10  * | 
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 316 | 316 | 
| 317     // We want a new back/forward list item if the refresh timeout is > 1 second
     . | 317     // We want a new back/forward list item if the refresh timeout is > 1 second
     . | 
| 318     if (!m_redirect || delay <= m_redirect->delay()) | 318     if (!m_redirect || delay <= m_redirect->delay()) | 
| 319         schedule(ScheduledRedirect::create(delay, m_frame->document(), url, dela
     y <= 1)); | 319         schedule(ScheduledRedirect::create(delay, m_frame->document(), url, dela
     y <= 1)); | 
| 320 } | 320 } | 
| 321 | 321 | 
| 322 bool NavigationScheduler::mustReplaceCurrentItem(LocalFrame* targetFrame) | 322 bool NavigationScheduler::mustReplaceCurrentItem(LocalFrame* targetFrame) | 
| 323 { | 323 { | 
| 324     // Non-user navigation before the page has finished firing onload should not
      create a new back/forward item. | 324     // Non-user navigation before the page has finished firing onload should not
      create a new back/forward item. | 
| 325     // See https://webkit.org/b/42861 for the original motivation for this. | 325     // See https://webkit.org/b/42861 for the original motivation for this. | 
| 326     if (!UserGestureIndicator::processingUserGesture() && !targetFrame->document
     ()->loadEventFinished()) | 326     if (!targetFrame->document()->loadEventFinished() && !UserGestureIndicator::
     utilizeUserGesture()) | 
| 327         return true; | 327         return true; | 
| 328 | 328 | 
| 329     // Navigation of a subframe during loading of an ancestor frame does not cre
     ate a new back/forward item. | 329     // Navigation of a subframe during loading of an ancestor frame does not cre
     ate a new back/forward item. | 
| 330     // The definition of "during load" is any time before all handlers for the l
     oad event have been run. | 330     // The definition of "during load" is any time before all handlers for the l
     oad event have been run. | 
| 331     // See https://bugs.webkit.org/show_bug.cgi?id=14957 for the original motiva
     tion for this. | 331     // See https://bugs.webkit.org/show_bug.cgi?id=14957 for the original motiva
     tion for this. | 
| 332     Frame* parentFrame = targetFrame->tree().parent(); | 332     Frame* parentFrame = targetFrame->tree().parent(); | 
| 333     return parentFrame && parentFrame->isLocalFrame() && !toLocalFrame(parentFra
     me)->loader().allAncestorsAreComplete(); | 333     return parentFrame && parentFrame->isLocalFrame() && !toLocalFrame(parentFra
     me)->loader().allAncestorsAreComplete(); | 
| 334 } | 334 } | 
| 335 | 335 | 
| 336 void NavigationScheduler::scheduleLocationChange(Document* originDocument, const
      String& url, bool replacesCurrentItem) | 336 void NavigationScheduler::scheduleLocationChange(Document* originDocument, const
      String& url, bool replacesCurrentItem) | 
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 445     m_redirect.clear(); | 445     m_redirect.clear(); | 
| 446 } | 446 } | 
| 447 | 447 | 
| 448 DEFINE_TRACE(NavigationScheduler) | 448 DEFINE_TRACE(NavigationScheduler) | 
| 449 { | 449 { | 
| 450     visitor->trace(m_frame); | 450     visitor->trace(m_frame); | 
| 451     visitor->trace(m_redirect); | 451     visitor->trace(m_redirect); | 
| 452 } | 452 } | 
| 453 | 453 | 
| 454 } // namespace blink | 454 } // namespace blink | 
| OLD | NEW | 
|---|