| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009 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 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 } | 517 } |
| 518 } | 518 } |
| 519 | 519 |
| 520 void HistoryController::recursiveUpdateForSameDocumentNavigation() | 520 void HistoryController::recursiveUpdateForSameDocumentNavigation() |
| 521 { | 521 { |
| 522 // The frame that navigated will now have a null provisional item. | 522 // The frame that navigated will now have a null provisional item. |
| 523 // Ignore it and its children. | 523 // Ignore it and its children. |
| 524 if (!m_provisionalItem) | 524 if (!m_provisionalItem) |
| 525 return; | 525 return; |
| 526 | 526 |
| 527 // The provisional item may represent a different pending navigation. |
| 528 // Don't commit it if it isn't a same document navigation. |
| 529 if (m_currentItem && !m_currentItem->shouldDoSameDocumentNavigationTo(m_prov
isionalItem.get())) |
| 530 return; |
| 531 |
| 527 // Commit the provisional item. | 532 // Commit the provisional item. |
| 528 m_frameLoadComplete = false; | 533 m_frameLoadComplete = false; |
| 529 m_previousItem = m_currentItem; | 534 m_previousItem = m_currentItem; |
| 530 m_currentItem = m_provisionalItem; | 535 m_currentItem = m_provisionalItem; |
| 531 m_provisionalItem = 0; | 536 m_provisionalItem = 0; |
| 532 | 537 |
| 533 // Iterate over the rest of the tree. | 538 // Iterate over the rest of the tree. |
| 534 for (Frame* child = m_frame->tree()->firstChild(); child; child = child->tre
e()->nextSibling()) | 539 for (Frame* child = m_frame->tree()->firstChild(); child; child = child->tre
e()->nextSibling()) |
| 535 child->loader()->history()->recursiveUpdateForSameDocumentNavigation(); | 540 child->loader()->history()->recursiveUpdateForSameDocumentNavigation(); |
| 536 } | 541 } |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 838 m_currentItem->setURLString(urlString); | 843 m_currentItem->setURLString(urlString); |
| 839 m_currentItem->setTitle(title); | 844 m_currentItem->setTitle(title); |
| 840 m_currentItem->setStateObject(stateObject); | 845 m_currentItem->setStateObject(stateObject); |
| 841 | 846 |
| 842 ASSERT(m_frame->page()); | 847 ASSERT(m_frame->page()); |
| 843 addVisitedLink(m_frame->page(), KURL(ParsedURLString, urlString)); | 848 addVisitedLink(m_frame->page(), KURL(ParsedURLString, urlString)); |
| 844 m_frame->loader()->client()->updateGlobalHistory(); | 849 m_frame->loader()->client()->updateGlobalHistory(); |
| 845 } | 850 } |
| 846 | 851 |
| 847 } // namespace WebCore | 852 } // namespace WebCore |
| OLD | NEW |