OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2010 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 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 return; | 241 return; |
242 setLocation(url, currentWindow, enteredWindow, &exceptionState, | 242 setLocation(url, currentWindow, enteredWindow, &exceptionState, |
243 SetLocation::ReplaceThisFrame); | 243 SetLocation::ReplaceThisFrame); |
244 } | 244 } |
245 | 245 |
246 void Location::reload(LocalDOMWindow* currentWindow) { | 246 void Location::reload(LocalDOMWindow* currentWindow) { |
247 if (!m_frame) | 247 if (!m_frame) |
248 return; | 248 return; |
249 if (protocolIsJavaScript(toLocalFrame(m_frame)->document()->url())) | 249 if (protocolIsJavaScript(toLocalFrame(m_frame)->document()->url())) |
250 return; | 250 return; |
251 m_frame->reload(FrameLoadTypeReload, ClientRedirectPolicy::ClientRedirect); | 251 FrameLoadType reloadType = |
| 252 RuntimeEnabledFeatures::fasterLocationReloadEnabled() |
| 253 ? FrameLoadTypeReloadMainResource |
| 254 : FrameLoadTypeReload; |
| 255 m_frame->reload(reloadType, ClientRedirectPolicy::ClientRedirect); |
252 } | 256 } |
253 | 257 |
254 void Location::setLocation(const String& url, | 258 void Location::setLocation(const String& url, |
255 LocalDOMWindow* currentWindow, | 259 LocalDOMWindow* currentWindow, |
256 LocalDOMWindow* enteredWindow, | 260 LocalDOMWindow* enteredWindow, |
257 ExceptionState* exceptionState, | 261 ExceptionState* exceptionState, |
258 SetLocation locationPolicy) { | 262 SetLocation locationPolicy) { |
259 DCHECK(m_frame); | 263 DCHECK(m_frame); |
260 if (!m_frame || !m_frame->host()) | 264 if (!m_frame || !m_frame->host()) |
261 return; | 265 return; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 argv.append(enteredDocument->url()); | 303 argv.append(enteredDocument->url()); |
300 argv.append(completedURL); | 304 argv.append(completedURL); |
301 activityLogger->logEvent("blinkSetAttribute", argv.size(), argv.data()); | 305 activityLogger->logEvent("blinkSetAttribute", argv.size(), argv.data()); |
302 } | 306 } |
303 m_frame->navigate(*currentWindow->document(), completedURL, | 307 m_frame->navigate(*currentWindow->document(), completedURL, |
304 locationPolicy == SetLocation::ReplaceThisFrame, | 308 locationPolicy == SetLocation::ReplaceThisFrame, |
305 UserGestureStatus::None); | 309 UserGestureStatus::None); |
306 } | 310 } |
307 | 311 |
308 } // namespace blink | 312 } // namespace blink |
OLD | NEW |