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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 return DOMURLUtilsReadOnly::search(url()); | 108 return DOMURLUtilsReadOnly::search(url()); |
109 } | 109 } |
110 | 110 |
111 String Location::origin() const | 111 String Location::origin() const |
112 { | 112 { |
113 if (!m_frame) | 113 if (!m_frame) |
114 return String(); | 114 return String(); |
115 return DOMURLUtilsReadOnly::origin(url()); | 115 return DOMURLUtilsReadOnly::origin(url()); |
116 } | 116 } |
117 | 117 |
118 PassRefPtr<DOMStringList> Location::ancestorOrigins() const | 118 PassRefPtrWillBeRawPtr<DOMStringList> Location::ancestorOrigins() const |
119 { | 119 { |
120 RefPtr<DOMStringList> origins = DOMStringList::create(); | 120 RefPtrWillBeRawPtr<DOMStringList> origins = DOMStringList::create(); |
121 if (!m_frame) | 121 if (!m_frame) |
122 return origins.release(); | 122 return origins.release(); |
123 for (LocalFrame* frame = m_frame->tree().parent(); frame; frame = frame->tre
e().parent()) | 123 for (LocalFrame* frame = m_frame->tree().parent(); frame; frame = frame->tre
e().parent()) |
124 origins->append(frame->document()->securityOrigin()->toString()); | 124 origins->append(frame->document()->securityOrigin()->toString()); |
125 return origins.release(); | 125 return origins.release(); |
126 } | 126 } |
127 | 127 |
128 String Location::hash() const | 128 String Location::hash() const |
129 { | 129 { |
130 if (!m_frame) | 130 if (!m_frame) |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 void Location::setLocation(const String& url, DOMWindow* callingWindow, DOMWindo
w* enteredWindow) | 242 void Location::setLocation(const String& url, DOMWindow* callingWindow, DOMWindo
w* enteredWindow) |
243 { | 243 { |
244 ASSERT(m_frame); | 244 ASSERT(m_frame); |
245 LocalFrame* frame = m_frame->loader().findFrameForNavigation(nullAtom, calli
ngWindow->document()); | 245 LocalFrame* frame = m_frame->loader().findFrameForNavigation(nullAtom, calli
ngWindow->document()); |
246 if (!frame) | 246 if (!frame) |
247 return; | 247 return; |
248 frame->domWindow()->setLocation(url, callingWindow, enteredWindow); | 248 frame->domWindow()->setLocation(url, callingWindow, enteredWindow); |
249 } | 249 } |
250 | 250 |
251 } // namespace WebCore | 251 } // namespace WebCore |
OLD | NEW |