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

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

Issue 2644633006: Add KURL::protocolIsJavascript member function (Closed)
Patch Set: Created 3 years, 11 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) 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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 ExceptionState& exceptionState) { 248 ExceptionState& exceptionState) {
249 if (!m_frame) 249 if (!m_frame)
250 return; 250 return;
251 setLocation(url, currentWindow, enteredWindow, &exceptionState, 251 setLocation(url, currentWindow, enteredWindow, &exceptionState,
252 SetLocationPolicy::ReplaceThisFrame); 252 SetLocationPolicy::ReplaceThisFrame);
253 } 253 }
254 254
255 void Location::reload(LocalDOMWindow* currentWindow) { 255 void Location::reload(LocalDOMWindow* currentWindow) {
256 if (!m_frame) 256 if (!m_frame)
257 return; 257 return;
258 if (protocolIsJavaScript(toLocalFrame(m_frame)->document()->url())) 258 if (toLocalFrame(m_frame)->document()->url().protocolIsJavaScript())
259 return; 259 return;
260 FrameLoadType reloadType = 260 FrameLoadType reloadType =
261 RuntimeEnabledFeatures::fasterLocationReloadEnabled() 261 RuntimeEnabledFeatures::fasterLocationReloadEnabled()
262 ? FrameLoadTypeReloadMainResource 262 ? FrameLoadTypeReloadMainResource
263 : FrameLoadTypeReload; 263 : FrameLoadTypeReload;
264 m_frame->reload(reloadType, ClientRedirectPolicy::ClientRedirect); 264 m_frame->reload(reloadType, ClientRedirectPolicy::ClientRedirect);
265 } 265 }
266 266
267 void Location::setLocation(const String& url, 267 void Location::setLocation(const String& url,
268 LocalDOMWindow* currentWindow, 268 LocalDOMWindow* currentWindow,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 argv.push_back(enteredDocument->url()); 312 argv.push_back(enteredDocument->url());
313 argv.push_back(completedURL); 313 argv.push_back(completedURL);
314 activityLogger->logEvent("blinkSetAttribute", argv.size(), argv.data()); 314 activityLogger->logEvent("blinkSetAttribute", argv.size(), argv.data());
315 } 315 }
316 m_frame->navigate(*currentWindow->document(), completedURL, 316 m_frame->navigate(*currentWindow->document(), completedURL,
317 setLocationPolicy == SetLocationPolicy::ReplaceThisFrame, 317 setLocationPolicy == SetLocationPolicy::ReplaceThisFrame,
318 UserGestureStatus::None); 318 UserGestureStatus::None);
319 } 319 }
320 320
321 } // namespace blink 321 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.cpp ('k') | third_party/WebKit/Source/core/html/HTMLFormElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698