| 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 current_entry_->GetItemForFrame(render_frame); | 138 current_entry_->GetItemForFrame(render_frame); |
| 139 if (new_item.isNull()) | 139 if (new_item.isNull()) |
| 140 return; | 140 return; |
| 141 | 141 |
| 142 if (old_item.isNull() || | 142 if (old_item.isNull() || |
| 143 new_item.itemSequenceNumber() != old_item.itemSequenceNumber()) { | 143 new_item.itemSequenceNumber() != old_item.itemSequenceNumber()) { |
| 144 if (!old_item.isNull() && | 144 if (!old_item.isNull() && |
| 145 new_item.documentSequenceNumber() == | 145 new_item.documentSequenceNumber() == |
| 146 old_item.documentSequenceNumber()) { | 146 old_item.documentSequenceNumber()) { |
| 147 same_document_loads.push_back(std::make_pair(frame, new_item)); | 147 same_document_loads.push_back(std::make_pair(frame, new_item)); |
| 148 |
| 149 // Returning here (and omitting child frames which have also changed) is |
| 150 // wrong, but not returning here is worse. See the discussion in |
| 151 // NavigationControllerImpl::FindFramesToNavigate for more information. |
| 152 return; |
| 148 } else { | 153 } else { |
| 149 different_document_loads.push_back(std::make_pair(frame, new_item)); | 154 different_document_loads.push_back(std::make_pair(frame, new_item)); |
| 150 // For a different document, the subframes will be destroyed, so there's | 155 // For a different document, the subframes will be destroyed, so there's |
| 151 // no need to consider them. | 156 // no need to consider them. |
| 152 return; | 157 return; |
| 153 } | 158 } |
| 154 } | 159 } |
| 155 | 160 |
| 156 for (WebFrame* child = frame->firstChild(); child; | 161 for (WebFrame* child = frame->firstChild(); child; |
| 157 child = child->nextSibling()) { | 162 child = child->nextSibling()) { |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 bool clone_children_of_target) { | 283 bool clone_children_of_target) { |
| 279 if (!current_entry_) { | 284 if (!current_entry_) { |
| 280 current_entry_.reset(new HistoryEntry(new_item)); | 285 current_entry_.reset(new HistoryEntry(new_item)); |
| 281 } else { | 286 } else { |
| 282 current_entry_.reset(current_entry_->CloneAndReplace( | 287 current_entry_.reset(current_entry_->CloneAndReplace( |
| 283 new_item, clone_children_of_target, target_frame, render_view_)); | 288 new_item, clone_children_of_target, target_frame, render_view_)); |
| 284 } | 289 } |
| 285 } | 290 } |
| 286 | 291 |
| 287 } // namespace content | 292 } // namespace content |
| OLD | NEW |