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 if (!m_frame) | 241 if (!m_frame) |
242 return; | 242 return; |
243 if (protocolIsJavaScript(m_frame->document()->url())) | 243 if (protocolIsJavaScript(m_frame->document()->url())) |
244 return; | 244 return; |
245 m_frame->reload(NormalReload, ClientRedirect); | 245 m_frame->reload(NormalReload, ClientRedirect); |
246 } | 246 } |
247 | 247 |
248 void Location::setLocation(const String& url, LocalDOMWindow* callingWindow, Loc
alDOMWindow* enteredWindow) | 248 void Location::setLocation(const String& url, LocalDOMWindow* callingWindow, Loc
alDOMWindow* enteredWindow) |
249 { | 249 { |
250 ASSERT(m_frame); | 250 ASSERT(m_frame); |
251 LocalFrame* frame = m_frame->loader().findFrameForNavigation(nullAtom, calli
ngWindow->document()); | 251 Frame* frame = m_frame->findFrameForNavigation(nullAtom, *callingWindow->fra
me()); |
252 if (!frame) | 252 if (!frame || !frame->isLocalFrame()) |
253 return; | 253 return; |
254 // FIXME: setLocation() probably belongs on DOMWindow, since you can trigger | 254 // FIXME: setLocation() probably belongs on DOMWindow, since you can trigger |
255 // navigations across different origins. | 255 // navigations across different origins. |
256 frame->localDOMWindow()->setLocation(url, callingWindow, enteredWindow); | 256 toLocalFrame(frame)->localDOMWindow()->setLocation(url, callingWindow, enter
edWindow); |
257 } | 257 } |
258 | 258 |
259 } // namespace blink | 259 } // namespace blink |
OLD | NEW |