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

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: Fix in sync with Blink and modified the test case a bit 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 01cb2bcc0b8b7a0153100818c456cd04afde8a79..3280bd387900b38a91025bfe45113f61be831caa 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -3559,11 +3559,14 @@ 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.
- document_state->navigation_state()->set_transition_type(
- PAGE_TRANSITION_AUTO_SUBFRAME);
+ } else {
Charlie Reis 2013/10/02 15:45:49 Style nit: Why move away from "else if"?
nasko 2013/10/02 23:06:46 Intermediate steps where I had more statements. Fi
+ if (ds->replacesCurrentHistoryItem()) {
+ // Subframe navigations, which don't add session history items must be
Charlie Reis 2013/10/02 15:45:49 nit: "navigations, which" -> "navigations that" (n
nasko 2013/10/02 23:06:46 Done.
+ // 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);
+ }
}
FOR_EACH_OBSERVER(
« 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