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

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: Properly set AUTO_SUBFRAME transition type on subframe navigations Created 7 years, 3 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 c7f9a0eb92b9993838a58f96540c8f57065f679e..035cf4a5356dadc535d5ae1e160ce179b0d10db1 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -3549,9 +3549,11 @@ 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() ||
+ !frame->hasCommittedRealDocument()) {
darin (slow to review) 2013/09/20 22:09:38 I'm having a hard time understanding what the hasC
nasko 2013/09/20 22:30:00 The problem with solely relying on replacesCurrent
+ // Subframe navigations, which 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