| 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 return DOMURLUtilsReadOnly::hash(url()); | 134 return DOMURLUtilsReadOnly::hash(url()); |
| 135 } | 135 } |
| 136 | 136 |
| 137 void Location::setHref(DOMWindow* activeWindow, DOMWindow* firstWindow, const St
ring& url) | 137 void Location::setHref(DOMWindow* activeWindow, DOMWindow* firstWindow, const St
ring& url) |
| 138 { | 138 { |
| 139 if (!m_frame) | 139 if (!m_frame) |
| 140 return; | 140 return; |
| 141 setLocation(url, activeWindow, firstWindow); | 141 setLocation(url, activeWindow, firstWindow); |
| 142 } | 142 } |
| 143 | 143 |
| 144 void Location::setProtocol(DOMWindow* activeWindow, DOMWindow* firstWindow, cons
t String& protocol, ExceptionState& es) | 144 void Location::setProtocol(DOMWindow* activeWindow, DOMWindow* firstWindow, cons
t String& protocol, ExceptionState& exceptionState) |
| 145 { | 145 { |
| 146 if (!m_frame) | 146 if (!m_frame) |
| 147 return; | 147 return; |
| 148 KURL url = m_frame->document()->url(); | 148 KURL url = m_frame->document()->url(); |
| 149 if (!url.setProtocol(protocol)) { | 149 if (!url.setProtocol(protocol)) { |
| 150 es.throwDOMException(SyntaxError, ExceptionMessages::failedToSet("protoc
ol", "Location", "'" + protocol + "' is an invalid protocol.")); | 150 exceptionState.throwDOMException(SyntaxError, ExceptionMessages::failedT
oSet("protocol", "Location", "'" + protocol + "' is an invalid protocol.")); |
| 151 return; | 151 return; |
| 152 } | 152 } |
| 153 setLocation(url.string(), activeWindow, firstWindow); | 153 setLocation(url.string(), activeWindow, firstWindow); |
| 154 } | 154 } |
| 155 | 155 |
| 156 void Location::setHost(DOMWindow* activeWindow, DOMWindow* firstWindow, const St
ring& host) | 156 void Location::setHost(DOMWindow* activeWindow, DOMWindow* firstWindow, const St
ring& host) |
| 157 { | 157 { |
| 158 if (!m_frame) | 158 if (!m_frame) |
| 159 return; | 159 return; |
| 160 KURL url = m_frame->document()->url(); | 160 KURL url = m_frame->document()->url(); |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 { | 244 { |
| 245 ASSERT(m_frame); | 245 ASSERT(m_frame); |
| 246 // We call findFrameForNavigation to handle the case of a seamless iframe co
rrectly. | 246 // We call findFrameForNavigation to handle the case of a seamless iframe co
rrectly. |
| 247 Frame* frame = m_frame->loader().findFrameForNavigation(String(), activeWind
ow->document()); | 247 Frame* frame = m_frame->loader().findFrameForNavigation(String(), activeWind
ow->document()); |
| 248 if (!frame) | 248 if (!frame) |
| 249 return; | 249 return; |
| 250 frame->domWindow()->setLocation(url, activeWindow, firstWindow); | 250 frame->domWindow()->setLocation(url, activeWindow, firstWindow); |
| 251 } | 251 } |
| 252 | 252 |
| 253 } // namespace WebCore | 253 } // namespace WebCore |
| OLD | NEW |