OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 1488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1499 } | 1499 } |
1500 | 1500 |
1501 LocalFrame* WebLocalFrameImpl::createChildFrame(const FrameLoadRequest& request, | 1501 LocalFrame* WebLocalFrameImpl::createChildFrame(const FrameLoadRequest& request, |
1502 const AtomicString& name, HTMLFrameOwnerElement* ownerElement) | 1502 const AtomicString& name, HTMLFrameOwnerElement* ownerElement) |
1503 { | 1503 { |
1504 DCHECK(m_client); | 1504 DCHECK(m_client); |
1505 TRACE_EVENT0("blink", "WebLocalFrameImpl::createChildframe"); | 1505 TRACE_EVENT0("blink", "WebLocalFrameImpl::createChildframe"); |
1506 WebTreeScopeType scope = frame()->document() == ownerElement->treeScope() | 1506 WebTreeScopeType scope = frame()->document() == ownerElement->treeScope() |
1507 ? WebTreeScopeType::Document | 1507 ? WebTreeScopeType::Document |
1508 : WebTreeScopeType::Shadow; | 1508 : WebTreeScopeType::Shadow; |
1509 WebFrameOwnerProperties ownerProperties(ownerElement->scrollingMode(), owner
Element->marginWidth(), ownerElement->marginHeight(), ownerElement->allowFullscr
een()); | 1509 WebFrameOwnerProperties ownerProperties(ownerElement->scrollingMode(), owner
Element->marginWidth(), ownerElement->marginHeight(), ownerElement->allowFullscr
een(), *ownerElement->delegatedPermissions()); |
1510 // FIXME: Using subResourceAttributeName as fallback is not a perfect | 1510 // FIXME: Using subResourceAttributeName as fallback is not a perfect |
1511 // solution. subResourceAttributeName returns just one attribute name. The | 1511 // solution. subResourceAttributeName returns just one attribute name. The |
1512 // element might not have the attribute, and there might be other attributes | 1512 // element might not have the attribute, and there might be other attributes |
1513 // which can identify the element. | 1513 // which can identify the element. |
1514 AtomicString uniqueName = frame()->tree().calculateUniqueNameForNewChildFram
e( | 1514 AtomicString uniqueName = frame()->tree().calculateUniqueNameForNewChildFram
e( |
1515 name, ownerElement->getAttribute(ownerElement->subResourceAttributeName(
))); | 1515 name, ownerElement->getAttribute(ownerElement->subResourceAttributeName(
))); |
1516 WebLocalFrameImpl* webframeChild = toWebLocalFrameImpl(m_client->createChild
Frame(this, scope, name, uniqueName, static_cast<WebSandboxFlags>(ownerElement->
getSandboxFlags()), ownerProperties)); | 1516 WebLocalFrameImpl* webframeChild = toWebLocalFrameImpl(m_client->createChild
Frame(this, scope, name, uniqueName, static_cast<WebSandboxFlags>(ownerElement->
getSandboxFlags()), ownerProperties)); |
1517 if (!webframeChild) | 1517 if (!webframeChild) |
1518 return nullptr; | 1518 return nullptr; |
1519 | 1519 |
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2090 return WebSandboxFlags::None; | 2090 return WebSandboxFlags::None; |
2091 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags(
)); | 2091 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags(
)); |
2092 } | 2092 } |
2093 | 2093 |
2094 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags) | 2094 void WebLocalFrameImpl::forceSandboxFlags(WebSandboxFlags flags) |
2095 { | 2095 { |
2096 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); | 2096 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); |
2097 } | 2097 } |
2098 | 2098 |
2099 } // namespace blink | 2099 } // namespace blink |
OLD | NEW |