| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /* | 5 /* |
| 6 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 6 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 7 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
| 10 * | 10 * |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 break; | 172 break; |
| 173 case blink::WebInitialCommitInChildFrame: | 173 case blink::WebInitialCommitInChildFrame: |
| 174 UpdateForInitialLoadInChildFrame(frame, item); | 174 UpdateForInitialLoadInChildFrame(frame, item); |
| 175 break; | 175 break; |
| 176 case blink::WebHistoryInertCommit: | 176 case blink::WebHistoryInertCommit: |
| 177 // Even for inert commits (e.g., location.replace, client redirects), make | 177 // Even for inert commits (e.g., location.replace, client redirects), make |
| 178 // sure the current entry gets updated, if there is one. | 178 // sure the current entry gets updated, if there is one. |
| 179 if (current_entry_) { | 179 if (current_entry_) { |
| 180 if (HistoryEntry::HistoryNode* node = | 180 if (HistoryEntry::HistoryNode* node = |
| 181 current_entry_->GetHistoryNodeForFrame(frame)) { | 181 current_entry_->GetHistoryNodeForFrame(frame)) { |
| 182 if (!navigation_within_page) | |
| 183 node->RemoveChildren(); | |
| 184 node->set_item(item); | 182 node->set_item(item); |
| 185 } | 183 } |
| 186 } | 184 } |
| 187 break; | 185 break; |
| 188 default: | 186 default: |
| 189 NOTREACHED() << "Invalid commit type: " << commit_type; | 187 NOTREACHED() << "Invalid commit type: " << commit_type; |
| 190 } | 188 } |
| 191 } | 189 } |
| 192 | 190 |
| 193 HistoryEntry* HistoryController::GetCurrentEntry() { | 191 HistoryEntry* HistoryController::GetCurrentEntry() { |
| (...skipping 27 matching lines...) Expand all Loading... |
| 221 if (!current_entry_) { | 219 if (!current_entry_) { |
| 222 current_entry_.reset( | 220 current_entry_.reset( |
| 223 new HistoryEntry(new_item, target_frame->GetRoutingID())); | 221 new HistoryEntry(new_item, target_frame->GetRoutingID())); |
| 224 } else { | 222 } else { |
| 225 current_entry_.reset(current_entry_->CloneAndReplace( | 223 current_entry_.reset(current_entry_->CloneAndReplace( |
| 226 new_item, clone_children_of_target, target_frame, render_view_)); | 224 new_item, clone_children_of_target, target_frame, render_view_)); |
| 227 } | 225 } |
| 228 } | 226 } |
| 229 | 227 |
| 230 } // namespace content | 228 } // namespace content |
| OLD | NEW |