Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Side by Side Diff: Source/WebCore/loader/HistoryController.cpp

Issue 7945015: Merge 95259 - Fragment navigations should interrupt a provisional load of a different document (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/874/
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/WebCore/loader/FrameLoader.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/WebCore/loader/FrameLoader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698