Navigation: Initial history subframe navigations use BeginNavigation.
When navigating back to a frame that has subframes, we should try to
restore the subframes to their latest history item. This is currently
done by OpenURL and should be done by BeginNavigation instead.
Design doc:
https://docs.google.com/document/d/13Rqdg1HBmtfnYMUXvg7SpUl3bJisTElfyMc1Ze8hLdE/edit#
This is patch 1/2.
This patch only modifies the behavior for
IsPerNavigationMojoInterface off.
Bug: 962518
Change-Id: I40c38663f964d3b4e0b09dcbab887d91a2faf282
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1578740
Commit-Queue: Arthur Hemery <[email protected]>
Reviewed-by: Nasko Oskov <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Reviewed-by: Camille Lamy <[email protected]>
Cr-Commit-Position: refs/heads/master@{#664216}
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index bafcf9a..c82dec5 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -1174,12 +1174,8 @@
base::TimeDelta main_thread_use_time,
mojom::MhtmlSaveStatus save_status);
- // Requests that the browser process navigates to |url|. If
- // |is_history_navigation_in_new_child| is true, the browser process should
- // look for a matching FrameNavigationEntry in the last committed entry to use
- // instead of |url|.
- void OpenURL(std::unique_ptr<blink::WebNavigationInfo> info,
- bool is_history_navigation_in_new_child);
+ // Requests that the browser process navigates to |url|.
+ void OpenURL(std::unique_ptr<blink::WebNavigationInfo> info);
// Returns a ChildURLLoaderFactoryBundle which can be used to request
// subresources for this frame.
@@ -1235,7 +1231,8 @@
const CommitNavigationParams& commit_params);
// Sends a FrameHostMsg_BeginNavigation to the browser
- void BeginNavigationInternal(std::unique_ptr<blink::WebNavigationInfo> info);
+ void BeginNavigationInternal(std::unique_ptr<blink::WebNavigationInfo> info,
+ bool is_history_navigation_in_new_child_frame);
// Commit a navigation that isn't handled by the browser (e.g., an empty
// document, about:srcdoc or an MHTML archive).
@@ -1395,7 +1392,7 @@
// When this happens, the navigation will be sent back to the browser process
// so that it can be performed in cross-document fashion.
blink::mojom::CommitResult PrepareForHistoryNavigationCommit(
- FrameMsg_Navigate_Type::Value navigation_type,
+ const CommonNavigationParams& common_params,
const CommitNavigationParams& commit_params,
blink::WebHistoryItem* item_for_history_navigation,
blink::WebFrameLoadType* load_type);