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

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

Issue 1156473002: Refactor FrameLoader loading interface (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 6 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
« no previous file with comments | « Source/core/frame/FrameTypes.h ('k') | Source/core/frame/LocalFrame.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 Document* activeDocument = toDocument(context); 117 Document* activeDocument = toDocument(context);
118 if (!activeDocument) 118 if (!activeDocument)
119 return; 119 return;
120 120
121 if (!activeDocument->frame() || !activeDocument->frame()->canNavigate(*m_fra me)) 121 if (!activeDocument->frame() || !activeDocument->frame()->canNavigate(*m_fra me))
122 return; 122 return;
123 123
124 if (distance) 124 if (distance)
125 m_frame->loader().client()->navigateBackForward(distance); 125 m_frame->loader().client()->navigateBackForward(distance);
126 else 126 else
127 m_frame->reload(NormalReload, ClientRedirect); 127 m_frame->reload(FrameLoadTypeReload, ClientRedirect);
128 } 128 }
129 129
130 KURL History::urlForState(const String& urlString) 130 KURL History::urlForState(const String& urlString)
131 { 131 {
132 Document* document = m_frame->document(); 132 Document* document = m_frame->document();
133 133
134 if (urlString.isNull()) 134 if (urlString.isNull())
135 return document->url(); 135 return document->url();
136 if (urlString.isEmpty()) 136 if (urlString.isEmpty())
137 return document->baseURL(); 137 return document->baseURL();
(...skipping 14 matching lines...) Expand all
152 } 152 }
153 153
154 HistoryScrollRestorationType restorationType = ScrollRestorationAuto; 154 HistoryScrollRestorationType restorationType = ScrollRestorationAuto;
155 if (RuntimeEnabledFeatures::scrollRestorationEnabled() && options.scrollRest oration() == "manual") 155 if (RuntimeEnabledFeatures::scrollRestorationEnabled() && options.scrollRest oration() == "manual")
156 restorationType = ScrollRestorationManual; 156 restorationType = ScrollRestorationManual;
157 157
158 m_frame->loader().updateForSameDocumentNavigation(fullURL, SameDocumentNavig ationHistoryApi, data, restorationType, type); 158 m_frame->loader().updateForSameDocumentNavigation(fullURL, SameDocumentNavig ationHistoryApi, data, restorationType, type);
159 } 159 }
160 160
161 } // namespace blink 161 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/frame/FrameTypes.h ('k') | Source/core/frame/LocalFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698