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

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

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