OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 } | 218 } |
219 | 219 |
220 Widget* HTMLFrameOwnerElement::ownedWidget() const | 220 Widget* HTMLFrameOwnerElement::ownedWidget() const |
221 { | 221 { |
222 return m_widget.get(); | 222 return m_widget.get(); |
223 } | 223 } |
224 | 224 |
225 bool HTMLFrameOwnerElement::loadOrRedirectSubframe(const KURL& url, const Atomic
String& frameName, bool lockBackForwardList) | 225 bool HTMLFrameOwnerElement::loadOrRedirectSubframe(const KURL& url, const Atomic
String& frameName, bool lockBackForwardList) |
226 { | 226 { |
227 RefPtr<LocalFrame> parentFrame = document().frame(); | 227 RefPtr<LocalFrame> parentFrame = document().frame(); |
228 // FIXME(kenrb): The necessary semantics for RemoteFrames have not been work
ed out yet, but this will likely need some logic to handle them. | 228 if (contentFrame()) { |
229 if (contentFrame() && contentFrame()->isLocalFrame()) { | 229 contentFrame()->navigate(document(), url, Referrer(document().outgoingRe
ferrer(), document().referrerPolicy()), lockBackForwardList); |
230 toLocalFrame(contentFrame())->navigationScheduler().scheduleLocationChan
ge(&document(), url.string(), Referrer(document().outgoingReferrer(), document()
.referrerPolicy()), lockBackForwardList); | |
231 return true; | 230 return true; |
232 } | 231 } |
233 | 232 |
234 if (!document().securityOrigin()->canDisplay(url)) { | 233 if (!document().securityOrigin()->canDisplay(url)) { |
235 FrameLoader::reportLocalLoadFailed(parentFrame.get(), url.string()); | 234 FrameLoader::reportLocalLoadFailed(parentFrame.get(), url.string()); |
236 return false; | 235 return false; |
237 } | 236 } |
238 | 237 |
239 if (!SubframeLoadingDisabler::canLoadFrame(*this)) | 238 if (!SubframeLoadingDisabler::canLoadFrame(*this)) |
240 return false; | 239 return false; |
241 | 240 |
242 String referrer = SecurityPolicy::generateReferrerHeader(document().referrer
Policy(), url, document().outgoingReferrer()); | 241 String referrer = SecurityPolicy::generateReferrerHeader(document().referrer
Policy(), url, document().outgoingReferrer()); |
243 return parentFrame->loader().client()->createFrame(url, frameName, Referrer(
referrer, document().referrerPolicy()), this); | 242 return parentFrame->loader().client()->createFrame(url, frameName, Referrer(
referrer, document().referrerPolicy()), this); |
244 } | 243 } |
245 | 244 |
246 | 245 |
247 } // namespace blink | 246 } // namespace blink |
OLD | NEW |