| 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 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 void NavigationScheduler::schedule(ScheduledNavigation* redirect) { | 489 void NavigationScheduler::schedule(ScheduledNavigation* redirect) { |
| 490 DCHECK(m_frame->page()); | 490 DCHECK(m_frame->page()); |
| 491 | 491 |
| 492 // In a back/forward navigation, we sometimes restore history state to | 492 // In a back/forward navigation, we sometimes restore history state to |
| 493 // iframes, even though the state was generated dynamically and JS will try to | 493 // iframes, even though the state was generated dynamically and JS will try to |
| 494 // put something different in the iframe. In this case, we will load stale | 494 // put something different in the iframe. In this case, we will load stale |
| 495 // things and/or confuse the JS when it shortly thereafter tries to schedule a | 495 // things and/or confuse the JS when it shortly thereafter tries to schedule a |
| 496 // location change. Let the JS have its way. | 496 // location change. Let the JS have its way. |
| 497 // FIXME: This check seems out of place. | 497 // FIXME: This check seems out of place. |
| 498 if (!m_frame->loader().stateMachine()->committedFirstRealDocumentLoad() && | 498 if (!m_frame->loader().stateMachine()->committedFirstRealDocumentLoad() && |
| 499 m_frame->loader().provisionalDocumentLoader()) { | 499 m_frame->loader().provisionalDocumentLoader() && |
| 500 m_frame->loader().provisionalDocumentLoader()->didStart()) { |
| 500 m_frame->loader().stopAllLoaders(); | 501 m_frame->loader().stopAllLoaders(); |
| 501 if (!m_frame->host()) | 502 if (!m_frame->host()) |
| 502 return; | 503 return; |
| 503 } | 504 } |
| 504 | 505 |
| 505 cancel(); | 506 cancel(); |
| 506 m_redirect = redirect; | 507 m_redirect = redirect; |
| 507 startTimer(); | 508 startTimer(); |
| 508 } | 509 } |
| 509 | 510 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 540 m_navigateTaskHandle.cancel(); | 541 m_navigateTaskHandle.cancel(); |
| 541 m_redirect.clear(); | 542 m_redirect.clear(); |
| 542 } | 543 } |
| 543 | 544 |
| 544 DEFINE_TRACE(NavigationScheduler) { | 545 DEFINE_TRACE(NavigationScheduler) { |
| 545 visitor->trace(m_frame); | 546 visitor->trace(m_frame); |
| 546 visitor->trace(m_redirect); | 547 visitor->trace(m_redirect); |
| 547 } | 548 } |
| 548 | 549 |
| 549 } // namespace blink | 550 } // namespace blink |
| OLD | NEW |