| 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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 if (!m_frame) | 234 if (!m_frame) |
| 235 return; | 235 return; |
| 236 // Note: We call LocalDOMWindow::setLocation directly here because replace()
always operates on the current frame. | 236 // Note: We call LocalDOMWindow::setLocation directly here because replace()
always operates on the current frame. |
| 237 // FIXME: setLocation() probably belongs on DOMWindow, since you can trigger | 237 // FIXME: setLocation() probably belongs on DOMWindow, since you can trigger |
| 238 // navigations across different origins. | 238 // navigations across different origins. |
| 239 m_frame->localDOMWindow()->setLocation(url, callingWindow, enteredWindow, Lo
ckHistoryAndBackForwardList); | 239 m_frame->localDOMWindow()->setLocation(url, callingWindow, enteredWindow, Lo
ckHistoryAndBackForwardList); |
| 240 } | 240 } |
| 241 | 241 |
| 242 void Location::reload(LocalDOMWindow* callingWindow) | 242 void Location::reload(LocalDOMWindow* callingWindow) |
| 243 { | 243 { |
| 244 printf("reload\n"); fflush(stdout); |
| 244 if (!m_frame) | 245 if (!m_frame) |
| 245 return; | 246 return; |
| 246 if (protocolIsJavaScript(m_frame->document()->url())) | 247 if (protocolIsJavaScript(m_frame->document()->url())) |
| 247 return; | 248 return; |
| 248 m_frame->navigationScheduler().scheduleReload(); | 249 m_frame->navigationScheduler().scheduleReload(); |
| 249 } | 250 } |
| 250 | 251 |
| 251 void Location::setLocation(const String& url, LocalDOMWindow* callingWindow, Loc
alDOMWindow* enteredWindow) | 252 void Location::setLocation(const String& url, LocalDOMWindow* callingWindow, Loc
alDOMWindow* enteredWindow) |
| 252 { | 253 { |
| 253 ASSERT(m_frame); | 254 ASSERT(m_frame); |
| 254 LocalFrame* frame = m_frame->loader().findFrameForNavigation(nullAtom, calli
ngWindow->document()); | 255 LocalFrame* frame = m_frame->loader().findFrameForNavigation(nullAtom, calli
ngWindow->document()); |
| 255 if (!frame) | 256 if (!frame) |
| 256 return; | 257 return; |
| 257 // FIXME: setLocation() probably belongs on DOMWindow, since you can trigger | 258 // FIXME: setLocation() probably belongs on DOMWindow, since you can trigger |
| 258 // navigations across different origins. | 259 // navigations across different origins. |
| 259 frame->localDOMWindow()->setLocation(url, callingWindow, enteredWindow); | 260 frame->localDOMWindow()->setLocation(url, callingWindow, enteredWindow); |
| 260 } | 261 } |
| 261 | 262 |
| 262 } // namespace blink | 263 } // namespace blink |
| OLD | NEW |