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

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

Issue 1965003002: Don't update subframes on parent frame commits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
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