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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
289 { | 289 { |
290 // Non-user navigation before the page has finished firing onload should not create a new back/forward item. | 290 // Non-user navigation before the page has finished firing onload should not create a new back/forward item. |
291 // See https://webkit.org/b/42861 for the original motivation for this. | 291 // See https://webkit.org/b/42861 for the original motivation for this. |
292 if (!UserGestureIndicator::processingUserGesture() && !targetFrame->document ()->loadEventFinished()) | 292 if (!UserGestureIndicator::processingUserGesture() && !targetFrame->document ()->loadEventFinished()) |
293 return true; | 293 return true; |
294 | 294 |
295 // From the HTML5 spec for location.assign(): | 295 // From the HTML5 spec for location.assign(): |
296 // "If the browsing context's session history contains only one Document, | 296 // "If the browsing context's session history contains only one Document, |
297 // and that was the about:blank Document created when the browsing context | 297 // and that was the about:blank Document created when the browsing context |
298 // was created, then the navigation must be done with replacement enabled. " | 298 // was created, then the navigation must be done with replacement enabled. " |
299 if (!targetFrame->loader().stateMachine()->committedMultipleRealLoads() | 299 // if (!targetFrame->loader().stateMachine()->committedMultipleRealLoads() |
Charlie Reis
2015/06/09 07:14:18
I'll remove this if you think this approach is san
Charlie Reis
2015/06/11 16:43:48
Done.
| |
300 && equalIgnoringCase(targetFrame->document()->url(), blankURL())) | 300 // && equalIgnoringCase(targetFrame->document()->url(), blankURL())) |
301 return true; | 301 // return true; |
302 | 302 |
303 // Navigation of a subframe during loading of an ancestor frame does not cre ate a new back/forward item. | 303 // Navigation of a subframe during loading of an ancestor frame does not cre ate a new back/forward item. |
304 // The definition of "during load" is any time before all handlers for the l oad event have been run. | 304 // The definition of "during load" is any time before all handlers for the l oad event have been run. |
305 // See https://bugs.webkit.org/show_bug.cgi?id=14957 for the original motiva tion for this. | 305 // See https://bugs.webkit.org/show_bug.cgi?id=14957 for the original motiva tion for this. |
306 Frame* parentFrame = targetFrame->tree().parent(); | 306 Frame* parentFrame = targetFrame->tree().parent(); |
307 return parentFrame && parentFrame->isLocalFrame() && !toLocalFrame(parentFra me)->loader().allAncestorsAreComplete(); | 307 return parentFrame && parentFrame->isLocalFrame() && !toLocalFrame(parentFra me)->loader().allAncestorsAreComplete(); |
308 } | 308 } |
309 | 309 |
310 void NavigationScheduler::scheduleLocationChange(Document* originDocument, const String& url, bool lockBackForwardList) | 310 void NavigationScheduler::scheduleLocationChange(Document* originDocument, const String& url, bool lockBackForwardList) |
311 { | 311 { |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
416 m_redirect.clear(); | 416 m_redirect.clear(); |
417 } | 417 } |
418 | 418 |
419 DEFINE_TRACE(NavigationScheduler) | 419 DEFINE_TRACE(NavigationScheduler) |
420 { | 420 { |
421 visitor->trace(m_frame); | 421 visitor->trace(m_frame); |
422 visitor->trace(m_redirect); | 422 visitor->trace(m_redirect); |
423 } | 423 } |
424 | 424 |
425 } // namespace blink | 425 } // namespace blink |
OLD | NEW |