| 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 1503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1514 WebTreeScopeType scope = frame()->document() == ownerElement->treeScope() | 1514 WebTreeScopeType scope = frame()->document() == ownerElement->treeScope() |
| 1515 ? WebTreeScopeType::Document | 1515 ? WebTreeScopeType::Document |
| 1516 : WebTreeScopeType::Shadow; | 1516 : WebTreeScopeType::Shadow; |
| 1517 WebFrameOwnerProperties ownerProperties(ownerElement->scrollingMode(), owner
Element->marginWidth(), ownerElement->marginHeight(), ownerElement->allowFullscr
een(), ownerElement->delegatedPermissions()); | 1517 WebFrameOwnerProperties ownerProperties(ownerElement->scrollingMode(), owner
Element->marginWidth(), ownerElement->marginHeight(), ownerElement->allowFullscr
een(), ownerElement->delegatedPermissions()); |
| 1518 // FIXME: Using subResourceAttributeName as fallback is not a perfect | 1518 // FIXME: Using subResourceAttributeName as fallback is not a perfect |
| 1519 // solution. subResourceAttributeName returns just one attribute name. The | 1519 // solution. subResourceAttributeName returns just one attribute name. The |
| 1520 // element might not have the attribute, and there might be other attributes | 1520 // element might not have the attribute, and there might be other attributes |
| 1521 // which can identify the element. | 1521 // which can identify the element. |
| 1522 AtomicString uniqueName = frame()->tree().calculateUniqueNameForNewChildFram
e( | 1522 AtomicString uniqueName = frame()->tree().calculateUniqueNameForNewChildFram
e( |
| 1523 name, ownerElement->getAttribute(ownerElement->subResourceAttributeName(
))); | 1523 name, ownerElement->getAttribute(ownerElement->subResourceAttributeName(
))); |
| 1524 WebLocalFrameImpl* webframeChild = toWebLocalFrameImpl(m_client->createChild
Frame(this, scope, name, uniqueName, static_cast<WebSandboxFlags>(ownerElement->
getSandboxFlags()), ownerProperties)); | 1524 WebLocalFrameImpl* webframeChild; |
| 1525 { |
| 1526 TRACE_EVENT0("blink", "WebLocalFrameImpl::createChildframe sync IPC"); |
| 1527 webframeChild = toWebLocalFrameImpl(m_client->createChildFrame(this, sco
pe, name, uniqueName, static_cast<WebSandboxFlags>(ownerElement->getSandboxFlags
()), ownerProperties)); |
| 1528 } |
| 1525 if (!webframeChild) | 1529 if (!webframeChild) |
| 1526 return nullptr; | 1530 return nullptr; |
| 1527 | 1531 |
| 1528 webframeChild->initializeCoreFrame(frame()->host(), ownerElement, name, uniq
ueName); | 1532 webframeChild->initializeCoreFrame(frame()->host(), ownerElement, name, uniq
ueName); |
| 1529 // Initializing the core frame may cause the new child to be detached, since | 1533 // Initializing the core frame may cause the new child to be detached, since |
| 1530 // it may dispatch a load event in the parent. | 1534 // it may dispatch a load event in the parent. |
| 1531 if (!webframeChild->parent()) | 1535 if (!webframeChild->parent()) |
| 1532 return nullptr; | 1536 return nullptr; |
| 1533 | 1537 |
| 1534 // If we're moving in the back/forward list, we might want to replace the co
ntent | 1538 // If we're moving in the back/forward list, we might want to replace the co
ntent |
| (...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2143 { | 2147 { |
| 2144 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); | 2148 frame()->loader().forceSandboxFlags(static_cast<SandboxFlags>(flags)); |
| 2145 } | 2149 } |
| 2146 | 2150 |
| 2147 void WebLocalFrameImpl::clearActiveFindMatch() | 2151 void WebLocalFrameImpl::clearActiveFindMatch() |
| 2148 { | 2152 { |
| 2149 ensureTextFinder().clearActiveFindMatch(); | 2153 ensureTextFinder().clearActiveFindMatch(); |
| 2150 } | 2154 } |
| 2151 | 2155 |
| 2152 } // namespace blink | 2156 } // namespace blink |
| OLD | NEW |