| 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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 } | 300 } |
| 301 | 301 |
| 302 if (!document().getSecurityOrigin()->canDisplay(url)) { | 302 if (!document().getSecurityOrigin()->canDisplay(url)) { |
| 303 FrameLoader::reportLocalLoadFailed(parentFrame, url.getString()); | 303 FrameLoader::reportLocalLoadFailed(parentFrame, url.getString()); |
| 304 return false; | 304 return false; |
| 305 } | 305 } |
| 306 | 306 |
| 307 if (!SubframeLoadingDisabler::canLoadFrame(*this)) | 307 if (!SubframeLoadingDisabler::canLoadFrame(*this)) |
| 308 return false; | 308 return false; |
| 309 | 309 |
| 310 if (document().frame()->host()->subframeCount() >= Page::maxNumberOfFrames) | 310 if (document().frame()->page()->subframeCount() >= Page::maxNumberOfFrames) |
| 311 return false; | 311 return false; |
| 312 | 312 |
| 313 FrameLoadRequest frameLoadRequest(&document(), url, "_self", | 313 FrameLoadRequest frameLoadRequest(&document(), url, "_self", |
| 314 CheckContentSecurityPolicy); | 314 CheckContentSecurityPolicy); |
| 315 | 315 |
| 316 ReferrerPolicy policy = referrerPolicyAttribute(); | 316 ReferrerPolicy policy = referrerPolicyAttribute(); |
| 317 if (policy != ReferrerPolicyDefault) | 317 if (policy != ReferrerPolicyDefault) |
| 318 frameLoadRequest.resourceRequest().setHTTPReferrer( | 318 frameLoadRequest.resourceRequest().setHTTPReferrer( |
| 319 SecurityPolicy::generateReferrer(policy, url, | 319 SecurityPolicy::generateReferrer(policy, url, |
| 320 document().outgoingReferrer())); | 320 document().outgoingReferrer())); |
| 321 | 321 |
| 322 return parentFrame->loader().client()->createFrame(frameLoadRequest, | 322 return parentFrame->loader().client()->createFrame(frameLoadRequest, |
| 323 frameName, this); | 323 frameName, this); |
| 324 } | 324 } |
| 325 | 325 |
| 326 DEFINE_TRACE(HTMLFrameOwnerElement) { | 326 DEFINE_TRACE(HTMLFrameOwnerElement) { |
| 327 visitor->trace(m_contentFrame); | 327 visitor->trace(m_contentFrame); |
| 328 visitor->trace(m_widget); | 328 visitor->trace(m_widget); |
| 329 HTMLElement::trace(visitor); | 329 HTMLElement::trace(visitor); |
| 330 FrameOwner::trace(visitor); | 330 FrameOwner::trace(visitor); |
| 331 } | 331 } |
| 332 | 332 |
| 333 } // namespace blink | 333 } // namespace blink |
| OLD | NEW |