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

Side by Side Diff: Source/core/page/Location.cpp

Issue 18548003: Rename ExceptionCode constants to use the names in the spec (2/3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/page/History.cpp ('k') | Source/core/page/PerformanceUserTiming.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 return; 150 return;
151 setLocation(url, activeWindow, firstWindow); 151 setLocation(url, activeWindow, firstWindow);
152 } 152 }
153 153
154 void Location::setProtocol(DOMWindow* activeWindow, DOMWindow* firstWindow, cons t String& protocol, ExceptionCode& ec) 154 void Location::setProtocol(DOMWindow* activeWindow, DOMWindow* firstWindow, cons t String& protocol, ExceptionCode& ec)
155 { 155 {
156 if (!m_frame) 156 if (!m_frame)
157 return; 157 return;
158 KURL url = m_frame->document()->url(); 158 KURL url = m_frame->document()->url();
159 if (!url.setProtocol(protocol)) { 159 if (!url.setProtocol(protocol)) {
160 ec = SYNTAX_ERR; 160 ec = SyntaxError;
161 return; 161 return;
162 } 162 }
163 setLocation(url.string(), activeWindow, firstWindow); 163 setLocation(url.string(), activeWindow, firstWindow);
164 } 164 }
165 165
166 void Location::setHost(DOMWindow* activeWindow, DOMWindow* firstWindow, const St ring& host) 166 void Location::setHost(DOMWindow* activeWindow, DOMWindow* firstWindow, const St ring& host)
167 { 167 {
168 if (!m_frame) 168 if (!m_frame)
169 return; 169 return;
170 KURL url = m_frame->document()->url(); 170 KURL url = m_frame->document()->url();
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 { 266 {
267 ASSERT(m_frame); 267 ASSERT(m_frame);
268 // We call findFrameForNavigation to handle the case of a seamless iframe co rrectly. 268 // We call findFrameForNavigation to handle the case of a seamless iframe co rrectly.
269 Frame* frame = m_frame->loader()->findFrameForNavigation(String(), activeWin dow->document()); 269 Frame* frame = m_frame->loader()->findFrameForNavigation(String(), activeWin dow->document());
270 if (!frame) 270 if (!frame)
271 return; 271 return;
272 frame->document()->domWindow()->setLocation(url, activeWindow, firstWindow); 272 frame->document()->domWindow()->setLocation(url, activeWindow, firstWindow);
273 } 273 }
274 274
275 } // namespace WebCore 275 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/page/History.cpp ('k') | Source/core/page/PerformanceUserTiming.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698