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

Unified Diff: content/renderer/render_view_impl.cc

Issue 15294012: Fix initial erroneous navigation in iframe to not add history entry. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing nits. Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/errorpage_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_view_impl.cc
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 01cb2bcc0b8b7a0153100818c456cd04afde8a79..a4d43bb16d0915a2ec2bd4c7acbfc599aca58d7b 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -3559,9 +3559,10 @@ void RenderViewImpl::didStartProvisionalLoad(WebFrame* frame) {
if (is_top_most) {
navigation_gesture_ = WebUserGestureIndicator::isProcessingUserGesture() ?
NavigationGestureUser : NavigationGestureAuto;
- } else if (frame->parent()->isLoading()) {
- // Take note of AUTO_SUBFRAME loads here, so that we can know how to
- // load an error page. See didFailProvisionalLoad.
+ } else if (ds->replacesCurrentHistoryItem()) {
+ // Subframe navigations that don't add session history items must be
+ // marked with AUTO_SUBFRAME. See also didFailProvisionalLoad for how we
+ // handle loading of error pages.
document_state->navigation_state()->set_transition_type(
PAGE_TRANSITION_AUTO_SUBFRAME);
}
« no previous file with comments | « chrome/browser/errorpage_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698