| 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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 void NavigationScheduler::schedule(PassOwnPtrWillBeRawPtr<ScheduledNavigation> r
edirect) | 386 void NavigationScheduler::schedule(PassOwnPtrWillBeRawPtr<ScheduledNavigation> r
edirect) |
| 387 { | 387 { |
| 388 ASSERT(m_frame->page()); | 388 ASSERT(m_frame->page()); |
| 389 | 389 |
| 390 // In a back/forward navigation, we sometimes restore history state to ifram
es, even though the state was generated | 390 // In a back/forward navigation, we sometimes restore history state to ifram
es, even though the state was generated |
| 391 // dynamically and JS will try to put something different in the iframe. In
this case, we will load stale things | 391 // dynamically and JS will try to put something different in the iframe. In
this case, we will load stale things |
| 392 // and/or confuse the JS when it shortly thereafter tries to schedule a loca
tion change. Let the JS have its way. | 392 // and/or confuse the JS when it shortly thereafter tries to schedule a loca
tion change. Let the JS have its way. |
| 393 // FIXME: This check seems out of place. | 393 // FIXME: This check seems out of place. |
| 394 if (!m_frame->loader().stateMachine()->committedFirstRealDocumentLoad() && m
_frame->loader().provisionalDocumentLoader()) { | 394 if (!m_frame->loader().stateMachine()->committedFirstRealDocumentLoad() && m
_frame->loader().provisionalDocumentLoader()) { |
| 395 RefPtrWillBeRawPtr<LocalFrame> protect(m_frame.get()); | 395 RefPtrWillBeRawPtr<LocalFrame> protect(m_frame.get()); |
| 396 m_frame->loader().provisionalDocumentLoader()->stopLoading(); | 396 m_frame->loader().stopAllLoaders(); |
| 397 if (!m_frame->host()) | 397 if (!m_frame->host()) |
| 398 return; | 398 return; |
| 399 } | 399 } |
| 400 | 400 |
| 401 cancel(); | 401 cancel(); |
| 402 m_redirect = redirect; | 402 m_redirect = redirect; |
| 403 startTimer(); | 403 startTimer(); |
| 404 } | 404 } |
| 405 | 405 |
| 406 void NavigationScheduler::startTimer() | 406 void NavigationScheduler::startTimer() |
| (...skipping 25 matching lines...) Expand all Loading... |
| 432 m_redirect.clear(); | 432 m_redirect.clear(); |
| 433 } | 433 } |
| 434 | 434 |
| 435 DEFINE_TRACE(NavigationScheduler) | 435 DEFINE_TRACE(NavigationScheduler) |
| 436 { | 436 { |
| 437 visitor->trace(m_frame); | 437 visitor->trace(m_frame); |
| 438 visitor->trace(m_redirect); | 438 visitor->trace(m_redirect); |
| 439 } | 439 } |
| 440 | 440 |
| 441 } // namespace blink | 441 } // namespace blink |
| OLD | NEW |