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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2741313002: Renamed WasWithinSamePage to WasWithinSameDocument. (Closed)
Patch Set: Even moar fixes Created 3 years, 9 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
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 5a7b20148ac4011cbe71da2b291f1ec54410e926..f83bc43a4ea5256a59293086c7dc8cd78ee8ed8e 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -3584,7 +3584,7 @@ void RenderFrameImpl::didCommitProvisionalLoad(
// Only update the PreviewsState and effective connection type states for new
// main frame documents. Subframes inherit from the main frame and should not
// change at commit time.
- if (is_main_frame_ && !navigation_state->WasWithinSamePage()) {
+ if (is_main_frame_ && !navigation_state->WasWithinSameDocument()) {
previews_state_ =
extra_data ? extra_data->previews_state() : PREVIEWS_OFF;
@@ -3611,9 +3611,10 @@ void RenderFrameImpl::didCommitProvisionalLoad(
return;
}
- // For new page navigations, the browser process needs to be notified of the
- // first paint of that page, so it can cancel the timer that waits for it.
- if (is_main_frame_ && !navigation_state->WasWithinSamePage()) {
+ // For navigations that change the document, the browser process needs to be
+ // notified of the first paint of that page, so it can cancel the timer that
+ // waits for it.
+ if (is_main_frame_ && !navigation_state->WasWithinSameDocument()) {
GetRenderWidget()->IncrementContentSourceId();
render_view_->QueueMessage(
new ViewHostMsg_DidFirstPaintAfterLoad(render_view_->routing_id_),
@@ -3664,8 +3665,8 @@ void RenderFrameImpl::didCommitProvisionalLoad(
for (auto& observer : render_view_->observers_)
observer.DidCommitProvisionalLoad(frame, is_new_navigation);
for (auto& observer : observers_) {
- observer.DidCommitProvisionalLoad(is_new_navigation,
- navigation_state->WasWithinSamePage());
+ observer.DidCommitProvisionalLoad(
+ is_new_navigation, navigation_state->WasWithinSameDocument());
}
if (!frame->parent()) { // Only for top frames.
@@ -4003,7 +4004,7 @@ void RenderFrameImpl::didNavigateWithinPage(
UpdateNavigationState(document_state, true /* was_within_same_page */,
Charlie Reis 2017/03/15 02:43:10 You're planning to update this (and the method nam
Eugene But (OOO till 7-30) 2017/03/15 16:16:17 Yes. There are many |SamePage| and |same_page| nam
content_initiated);
static_cast<NavigationStateImpl*>(document_state->navigation_state())
- ->set_was_within_same_page(true);
+ ->set_was_within_same_document(true);
didCommitProvisionalLoad(frame, item, commit_type);
}
@@ -4840,7 +4841,7 @@ void RenderFrameImpl::SendDidCommitProvisionalLoad(
params.render_view_routing_id = render_view_->routing_id();
params.socket_address.set_host(response.remoteIPAddress().utf8());
params.socket_address.set_port(response.remotePort());
- params.was_within_same_page = navigation_state->WasWithinSamePage();
+ params.was_within_same_document = navigation_state->WasWithinSameDocument();
WebDocument frame_document = frame->document();
// Set the origin of the frame. This will be replicated to the corresponding
@@ -5003,7 +5004,7 @@ void RenderFrameImpl::SendDidCommitProvisionalLoad(
base::IntToString(params.redirects.size()));
base::debug::SetCrashKeyValue(
"origin_mismatch_same_page",
- base::IntToString(params.was_within_same_page));
+ base::IntToString(params.was_within_same_document));
CHECK(params.origin.IsSamePhysicalOriginWith(url::Origin(params.url)))
<< " url:" << params.url << " origin:" << params.origin;
}

Powered by Google App Engine
This is Rietveld 408576698