| Index: content/renderer/render_frame_impl.cc
|
| diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
| index a6bc2b485497d530a0f55e16f3a075a4d4b10e74..c862b83fb3e181047b823a4fafd296c4949ed704 100644
|
| --- a/content/renderer/render_frame_impl.cc
|
| +++ b/content/renderer/render_frame_impl.cc
|
| @@ -2529,7 +2529,7 @@
|
| // new navigation.
|
| navigation_state->set_request_committed(true);
|
|
|
| - SendDidCommitProvisionalLoad(frame, commit_type);
|
| + SendDidCommitProvisionalLoad(frame);
|
|
|
| // Check whether we have new encoding name.
|
| UpdateEncoding(frame, frame->view()->pageEncoding().utf8());
|
| @@ -3577,9 +3577,7 @@
|
| }
|
|
|
| // Tell the embedding application that the URL of the active page has changed.
|
| -void RenderFrameImpl::SendDidCommitProvisionalLoad(
|
| - blink::WebFrame* frame,
|
| - blink::WebHistoryCommitType commit_type) {
|
| +void RenderFrameImpl::SendDidCommitProvisionalLoad(blink::WebFrame* frame) {
|
| DCHECK(!frame_ || frame_ == frame);
|
| WebDataSource* ds = frame->dataSource();
|
| DCHECK(ds);
|
| @@ -3642,7 +3640,7 @@
|
| render_view_->navigation_gesture_ = NavigationGestureUnknown;
|
|
|
| // Make navigation state a part of the DidCommitProvisionalLoad message so
|
| - // that committed entry has it at all times.
|
| + // that commited entry has it at all times.
|
| HistoryEntry* entry = render_view_->history_controller()->GetCurrentEntry();
|
| if (entry)
|
| params.page_state = HistoryEntryToPageState(entry);
|
| @@ -3747,12 +3745,13 @@
|
| // Subframe navigation: the type depends on whether this navigation
|
| // generated a new session history entry. When they do generate a session
|
| // history entry, it means the user initiated the navigation and we should
|
| - // mark it as such.
|
| - bool is_history_navigation = commit_type == blink::WebBackForwardCommit;
|
| - if (is_history_navigation || ds->replacesCurrentHistoryItem())
|
| + // mark it as such. This test checks if this is the first time
|
| + // SendDidCommitProvisionalLoad has been called since WillNavigateToURL was
|
| + // called to initiate the load.
|
| + if (render_view_->page_id_ > render_view_->last_page_id_sent_to_browser_)
|
| + params.transition = ui::PAGE_TRANSITION_MANUAL_SUBFRAME;
|
| + else
|
| params.transition = ui::PAGE_TRANSITION_AUTO_SUBFRAME;
|
| - else
|
| - params.transition = ui::PAGE_TRANSITION_MANUAL_SUBFRAME;
|
|
|
| DCHECK(!navigation_state->history_list_was_cleared());
|
| params.history_list_was_cleared = false;
|
| @@ -3762,6 +3761,10 @@
|
| if (!is_swapped_out())
|
| Send(new FrameHostMsg_DidCommitProvisionalLoad(routing_id_, params));
|
| }
|
| +
|
| + render_view_->last_page_id_sent_to_browser_ =
|
| + std::max(render_view_->last_page_id_sent_to_browser_,
|
| + render_view_->page_id_);
|
|
|
| // If we end up reusing this WebRequest (for example, due to a #ref click),
|
| // we don't want the transition type to persist. Just clear it.
|
|
|