Chromium Code Reviews| 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 16 matching lines...) Expand all Loading... | |
| 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/layout/LayoutPart.h" | 31 #include "core/layout/LayoutPart.h" |
| 32 #include "core/layout/api/LayoutPartItem.h" | 32 #include "core/layout/api/LayoutPartItem.h" |
| 33 #include "core/loader/FrameLoadRequest.h" | 33 #include "core/loader/FrameLoadRequest.h" |
| 34 #include "core/loader/FrameLoader.h" | 34 #include "core/loader/FrameLoader.h" |
| 35 #include "core/loader/FrameLoaderClient.h" | 35 #include "core/loader/FrameLoaderClient.h" |
| 36 #include "core/plugins/PluginView.h" | 36 #include "core/plugins/PluginView.h" |
| 37 #include "platform/RuntimeEnabledFeatures.h" | |
| 37 #include "platform/weborigin/SecurityOrigin.h" | 38 #include "platform/weborigin/SecurityOrigin.h" |
| 38 | 39 |
| 39 namespace blink { | 40 namespace blink { |
| 40 | 41 |
| 41 typedef HeapHashMap<Member<Widget>, Member<FrameView>> WidgetToParentMap; | 42 typedef HeapHashMap<Member<Widget>, Member<FrameView>> WidgetToParentMap; |
| 42 static WidgetToParentMap& widgetNewParentMap() | 43 static WidgetToParentMap& widgetNewParentMap() |
| 43 { | 44 { |
| 44 DEFINE_STATIC_LOCAL(WidgetToParentMap, map, (new WidgetToParentMap)); | 45 DEFINE_STATIC_LOCAL(WidgetToParentMap, map, (new WidgetToParentMap)); |
| 45 return map; | 46 return map; |
| 46 } | 47 } |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 321 | 322 |
| 322 if (document().frame()->host()->subframeCount() >= FrameHost::maxNumberOfFra mes) | 323 if (document().frame()->host()->subframeCount() >= FrameHost::maxNumberOfFra mes) |
| 323 return false; | 324 return false; |
| 324 | 325 |
| 325 FrameLoadRequest frameLoadRequest(&document(), url, "_self", CheckContentSec urityPolicy); | 326 FrameLoadRequest frameLoadRequest(&document(), url, "_self", CheckContentSec urityPolicy); |
| 326 | 327 |
| 327 ReferrerPolicy policy = referrerPolicyAttribute(); | 328 ReferrerPolicy policy = referrerPolicyAttribute(); |
| 328 if (policy != ReferrerPolicyDefault) | 329 if (policy != ReferrerPolicyDefault) |
| 329 frameLoadRequest.resourceRequest().setHTTPReferrer(SecurityPolicy::gener ateReferrer(policy, url, document().outgoingReferrer())); | 330 frameLoadRequest.resourceRequest().setHTTPReferrer(SecurityPolicy::gener ateReferrer(policy, url, document().outgoingReferrer())); |
| 330 | 331 |
| 332 if (RuntimeEnabledFeatures::embedderCSPEnforcementEnabled() && hasAttribute( HTMLNames::cspAttr) && !getAttribute(HTMLNames::cspAttr).isNull()) { | |
| 333 frameLoadRequest.resourceRequest().setHTTPHeaderField(HTTPNames::Embeddi ng_CSP, getAttribute(HTMLNames::cspAttr)); | |
| 334 } | |
|
Mike West
2016/09/27 12:14:50
I think this is going to end up being the wrong pl
| |
| 335 | |
| 331 return parentFrame->loader().client()->createFrame(frameLoadRequest, frameNa me, this); | 336 return parentFrame->loader().client()->createFrame(frameLoadRequest, frameNa me, this); |
| 332 } | 337 } |
| 333 | 338 |
| 334 DEFINE_TRACE(HTMLFrameOwnerElement) | 339 DEFINE_TRACE(HTMLFrameOwnerElement) |
| 335 { | 340 { |
| 336 visitor->trace(m_contentFrame); | 341 visitor->trace(m_contentFrame); |
| 337 visitor->trace(m_widget); | 342 visitor->trace(m_widget); |
| 338 HTMLElement::trace(visitor); | 343 HTMLElement::trace(visitor); |
| 339 FrameOwner::trace(visitor); | 344 FrameOwner::trace(visitor); |
| 340 } | 345 } |
| 341 | 346 |
| 342 | 347 |
| 343 } // namespace blink | 348 } // namespace blink |
| OLD | NEW |