| 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 15 matching lines...) Expand all Loading... |
| 26 #include "core/dom/ExceptionCode.h" | 26 #include "core/dom/ExceptionCode.h" |
| 27 #include "core/events/Event.h" | 27 #include "core/events/Event.h" |
| 28 #include "core/frame/FrameHost.h" | 28 #include "core/frame/FrameHost.h" |
| 29 #include "core/frame/FrameView.h" | 29 #include "core/frame/FrameView.h" |
| 30 #include "core/frame/LocalFrame.h" | 30 #include "core/frame/LocalFrame.h" |
| 31 #include "core/frame/LocalFrameClient.h" | 31 #include "core/frame/LocalFrameClient.h" |
| 32 #include "core/layout/LayoutPart.h" | 32 #include "core/layout/LayoutPart.h" |
| 33 #include "core/layout/api/LayoutPartItem.h" | 33 #include "core/layout/api/LayoutPartItem.h" |
| 34 #include "core/loader/FrameLoadRequest.h" | 34 #include "core/loader/FrameLoadRequest.h" |
| 35 #include "core/loader/FrameLoader.h" | 35 #include "core/loader/FrameLoader.h" |
| 36 #include "core/page/Page.h" | |
| 37 #include "core/plugins/PluginView.h" | 36 #include "core/plugins/PluginView.h" |
| 38 #include "platform/weborigin/SecurityOrigin.h" | 37 #include "platform/weborigin/SecurityOrigin.h" |
| 39 | 38 |
| 40 namespace blink { | 39 namespace blink { |
| 41 | 40 |
| 42 typedef HeapHashMap<Member<FrameViewBase>, Member<FrameView>> | 41 typedef HeapHashMap<Member<FrameViewBase>, Member<FrameView>> |
| 43 FrameViewBaseToParentMap; | 42 FrameViewBaseToParentMap; |
| 44 static FrameViewBaseToParentMap& widgetNewParentMap() { | 43 static FrameViewBaseToParentMap& widgetNewParentMap() { |
| 45 DEFINE_STATIC_LOCAL(FrameViewBaseToParentMap, map, | 44 DEFINE_STATIC_LOCAL(FrameViewBaseToParentMap, map, |
| 46 (new FrameViewBaseToParentMap)); | 45 (new FrameViewBaseToParentMap)); |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 } | 305 } |
| 307 | 306 |
| 308 if (!document().getSecurityOrigin()->canDisplay(url)) { | 307 if (!document().getSecurityOrigin()->canDisplay(url)) { |
| 309 FrameLoader::reportLocalLoadFailed(parentFrame, url.getString()); | 308 FrameLoader::reportLocalLoadFailed(parentFrame, url.getString()); |
| 310 return false; | 309 return false; |
| 311 } | 310 } |
| 312 | 311 |
| 313 if (!SubframeLoadingDisabler::canLoadFrame(*this)) | 312 if (!SubframeLoadingDisabler::canLoadFrame(*this)) |
| 314 return false; | 313 return false; |
| 315 | 314 |
| 316 if (document().frame()->host()->subframeCount() >= Page::maxNumberOfFrames) | 315 if (document().frame()->host()->subframeCount() >= |
| 316 FrameHost::maxNumberOfFrames) |
| 317 return false; | 317 return false; |
| 318 | 318 |
| 319 FrameLoadRequest frameLoadRequest(&document(), url, "_self", | 319 FrameLoadRequest frameLoadRequest(&document(), url, "_self", |
| 320 CheckContentSecurityPolicy); | 320 CheckContentSecurityPolicy); |
| 321 | 321 |
| 322 ReferrerPolicy policy = referrerPolicyAttribute(); | 322 ReferrerPolicy policy = referrerPolicyAttribute(); |
| 323 if (policy != ReferrerPolicyDefault) | 323 if (policy != ReferrerPolicyDefault) |
| 324 frameLoadRequest.resourceRequest().setHTTPReferrer( | 324 frameLoadRequest.resourceRequest().setHTTPReferrer( |
| 325 SecurityPolicy::generateReferrer(policy, url, | 325 SecurityPolicy::generateReferrer(policy, url, |
| 326 document().outgoingReferrer())); | 326 document().outgoingReferrer())); |
| 327 | 327 |
| 328 return parentFrame->loader().client()->createFrame(frameLoadRequest, | 328 return parentFrame->loader().client()->createFrame(frameLoadRequest, |
| 329 frameName, this); | 329 frameName, this); |
| 330 } | 330 } |
| 331 | 331 |
| 332 DEFINE_TRACE(HTMLFrameOwnerElement) { | 332 DEFINE_TRACE(HTMLFrameOwnerElement) { |
| 333 visitor->trace(m_contentFrame); | 333 visitor->trace(m_contentFrame); |
| 334 visitor->trace(m_widget); | 334 visitor->trace(m_widget); |
| 335 HTMLElement::trace(visitor); | 335 HTMLElement::trace(visitor); |
| 336 FrameOwner::trace(visitor); | 336 FrameOwner::trace(visitor); |
| 337 } | 337 } |
| 338 | 338 |
| 339 } // namespace blink | 339 } // namespace blink |
| OLD | NEW |