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

Side by Side Diff: third_party/WebKit/Source/core/frame/History.cpp

Issue 2772753002: Change FrameLoadTypeReload to take FrameLoadTypeReloadMainResource's behavior (Closed)
Patch Set: rebase error fix (replace newly added ReloadMainResource) 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 return; 145 return;
146 } 146 }
147 147
148 if (delta) { 148 if (delta) {
149 frame()->loader().client()->navigateBackForward(delta); 149 frame()->loader().client()->navigateBackForward(delta);
150 } else { 150 } else {
151 // We intentionally call reload() for the current frame if delta is zero. 151 // We intentionally call reload() for the current frame if delta is zero.
152 // Otherwise, navigation happens on the root frame. 152 // Otherwise, navigation happens on the root frame.
153 // This behavior is designed in the following spec. 153 // This behavior is designed in the following spec.
154 // https://html.spec.whatwg.org/multipage/browsers.html#dom-history-go 154 // https://html.spec.whatwg.org/multipage/browsers.html#dom-history-go
155 frame()->reload(FrameLoadTypeReloadMainResource, 155 frame()->reload(FrameLoadTypeReload, ClientRedirectPolicy::ClientRedirect);
156 ClientRedirectPolicy::ClientRedirect);
157 } 156 }
158 } 157 }
159 158
160 void History::pushState(PassRefPtr<SerializedScriptValue> data, 159 void History::pushState(PassRefPtr<SerializedScriptValue> data,
161 const String& title, 160 const String& title,
162 const String& url, 161 const String& url,
163 ExceptionState& exceptionState) { 162 ExceptionState& exceptionState) {
164 stateObjectAdded(std::move(data), title, url, scrollRestorationInternal(), 163 stateObjectAdded(std::move(data), title, url, scrollRestorationInternal(),
165 FrameLoadTypeStandard, exceptionState); 164 FrameLoadTypeStandard, exceptionState);
166 } 165 }
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 frame()->document()->url().elidedString() + "'."); 224 frame()->document()->url().elidedString() + "'.");
226 return; 225 return;
227 } 226 }
228 227
229 frame()->loader().updateForSameDocumentNavigation( 228 frame()->loader().updateForSameDocumentNavigation(
230 fullURL, SameDocumentNavigationHistoryApi, std::move(data), 229 fullURL, SameDocumentNavigationHistoryApi, std::move(data),
231 restorationType, type, frame()->document()); 230 restorationType, type, frame()->document());
232 } 231 }
233 232
234 } // namespace blink 233 } // namespace blink
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | third_party/WebKit/Source/core/frame/LocalFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698