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

Side by Side Diff: content/renderer/history_controller.cc

Issue 1954213003: Don't update subframes on parent frame commits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 years, 7 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 | « content/browser/frame_host/navigation_controller_impl_browsertest.cc ('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 // 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
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
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
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_controller_impl_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698