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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2384833002: Revert of Notify the renderer if a history navigation has no subframe items. (Closed)
Patch Set: Created 4 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 | « content/renderer/render_frame_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 1e93a2f175ec05438245e5f220c16f97ba2c112e..9593e50974afa604dd63c1647cf77f3fdbc68044 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -1046,7 +1046,6 @@
render_view_(params.render_view->AsWeakPtr()),
routing_id_(params.routing_id),
proxy_routing_id_(MSG_ROUTING_NONE),
- browser_has_subtree_history_items_(false),
#if defined(ENABLE_PLUGINS)
plugin_power_saver_helper_(nullptr),
plugin_find_handler_(nullptr),
@@ -1177,11 +1176,6 @@
RenderFrameImpl* parent_frame = RenderFrameImpl::FromWebFrame(
frame_->parent());
if (parent_frame) {
- // Inherit knowledge of whether we need to consult the browser process for
- // a history item on the first navigation. This is inherited by further
- // subframes and cleared at didStopLoading.
- browser_has_subtree_history_items_ =
- parent_frame->browser_has_subtree_history_items_;
is_using_lofi_ = parent_frame->IsUsingLoFi();
effective_connection_type_ = parent_frame->getEffectiveConnectionType();
}
@@ -4836,12 +4830,6 @@
void RenderFrameImpl::didStopLoading() {
TRACE_EVENT1("navigation,rail", "RenderFrameImpl::didStopLoading",
"id", routing_id_);
-
- // Any subframes created after this point won't be considered part of the
- // current history navigation (if this was one), so we don't need to track
- // this state anymore.
- browser_has_subtree_history_items_ = false;
-
render_view_->FrameDidStopLoading(frame_);
Send(new FrameHostMsg_DidStopLoading(routing_id_));
}
@@ -4983,12 +4971,10 @@
}
// In OOPIF-enabled modes, back/forward navigations in newly created subframes
- // should be sent to the browser if there is a chance there is a matching
- // FrameNavigationEntry. If none is found (or if the browser has indicated it
- // has no subtree history items), fall back to loading the default url.
+ // should be sent to the browser in case there is a matching
+ // FrameNavigationEntry. If none is found, fall back to the default url.
if (SiteIsolationPolicy::UseSubframeNavigationEntries() &&
- info.isHistoryNavigationInNewChildFrame && is_content_initiated &&
- browser_has_subtree_history_items_) {
+ info.isHistoryNavigationInNewChildFrame && is_content_initiated) {
// Don't do this if |info| also says it is a client redirect, in which case
// JavaScript on the page is trying to interrupt the history navigation.
if (!info.isClientRedirect) {
@@ -5567,11 +5553,6 @@
: blink::WebFrameLoadType::BackForward;
should_load_request = true;
- // Remember whether we should consult the browser process for any
- // subframes created during this history navigation.
- browser_has_subtree_history_items_ =
- request_params.has_subtree_history_items;
-
// If this is marked as a same document load but we haven't committed
// anything, treat it as a new load. The browser shouldn't let this
// happen. Also treat it as a new load, if the DSN in
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698