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