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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 } | 232 } |
233 | 233 |
234 Widget* HTMLFrameOwnerElement::ownedWidget() const | 234 Widget* HTMLFrameOwnerElement::ownedWidget() const |
235 { | 235 { |
236 return m_widget.get(); | 236 return m_widget.get(); |
237 } | 237 } |
238 | 238 |
239 bool HTMLFrameOwnerElement::loadOrRedirectSubframe(const KURL& url, const Atomic
String& frameName, bool lockBackForwardList) | 239 bool HTMLFrameOwnerElement::loadOrRedirectSubframe(const KURL& url, const Atomic
String& frameName, bool lockBackForwardList) |
240 { | 240 { |
241 RefPtrWillBeRawPtr<LocalFrame> parentFrame = document().frame(); | 241 RefPtrWillBeRawPtr<LocalFrame> parentFrame = document().frame(); |
242 // FIXME(kenrb): The necessary semantics for RemoteFrames have not been work
ed out yet, but this will likely need some logic to handle them. | 242 if (contentFrame()) { |
243 if (contentFrame() && contentFrame()->isLocalFrame()) { | 243 contentFrame()->navigate(document(), url, Referrer(document().outgoingRe
ferrer(), document().referrerPolicy()), lockBackForwardList); |
244 toLocalFrame(contentFrame())->navigationScheduler().scheduleLocationChan
ge(&document(), url.string(), Referrer(document().outgoingReferrer(), document()
.referrerPolicy()), lockBackForwardList); | |
245 return true; | 244 return true; |
246 } | 245 } |
247 | 246 |
248 if (!document().securityOrigin()->canDisplay(url)) { | 247 if (!document().securityOrigin()->canDisplay(url)) { |
249 FrameLoader::reportLocalLoadFailed(parentFrame.get(), url.string()); | 248 FrameLoader::reportLocalLoadFailed(parentFrame.get(), url.string()); |
250 return false; | 249 return false; |
251 } | 250 } |
252 | 251 |
253 if (!SubframeLoadingDisabler::canLoadFrame(*this)) | 252 if (!SubframeLoadingDisabler::canLoadFrame(*this)) |
254 return false; | 253 return false; |
255 | 254 |
256 String referrer = SecurityPolicy::generateReferrerHeader(document().referrer
Policy(), url, document().outgoingReferrer()); | 255 String referrer = SecurityPolicy::generateReferrerHeader(document().referrer
Policy(), url, document().outgoingReferrer()); |
257 return parentFrame->loader().client()->createFrame(url, frameName, Referrer(
referrer, document().referrerPolicy()), this); | 256 return parentFrame->loader().client()->createFrame(url, frameName, Referrer(
referrer, document().referrerPolicy()), this); |
258 } | 257 } |
259 | 258 |
260 void HTMLFrameOwnerElement::trace(Visitor* visitor) | 259 void HTMLFrameOwnerElement::trace(Visitor* visitor) |
261 { | 260 { |
262 visitor->trace(m_contentFrame); | 261 visitor->trace(m_contentFrame); |
263 HTMLElement::trace(visitor); | 262 HTMLElement::trace(visitor); |
264 FrameOwner::trace(visitor); | 263 FrameOwner::trace(visitor); |
265 } | 264 } |
266 | 265 |
267 | 266 |
268 } // namespace blink | 267 } // namespace blink |
OLD | NEW |