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); |
} |