| 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 1567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1578 WebString WebLocalFrameImpl::layerTreeAsText(bool showDebugInfo) const | 1578 WebString WebLocalFrameImpl::layerTreeAsText(bool showDebugInfo) const |
| 1579 { | 1579 { |
| 1580 if (!frame()) | 1580 if (!frame()) |
| 1581 return WebString(); | 1581 return WebString(); |
| 1582 | 1582 |
| 1583 return WebString(frame()->layerTreeAsText(showDebugInfo ? LayerTreeIncludesD
ebugInfo : LayerTreeNormal)); | 1583 return WebString(frame()->layerTreeAsText(showDebugInfo ? LayerTreeIncludesD
ebugInfo : LayerTreeNormal)); |
| 1584 } | 1584 } |
| 1585 | 1585 |
| 1586 // WebLocalFrameImpl public ----------------------------------------------------
----- | 1586 // WebLocalFrameImpl public ----------------------------------------------------
----- |
| 1587 | 1587 |
| 1588 WebLocalFrame* WebLocalFrame::create(WebFrameClient* client) |
| 1589 { |
| 1590 return WebLocalFrame::create(WebTreeScopeType::Document, client); |
| 1591 } |
| 1592 |
| 1588 WebLocalFrame* WebLocalFrame::create(WebTreeScopeType scope, WebFrameClient* cli
ent) | 1593 WebLocalFrame* WebLocalFrame::create(WebTreeScopeType scope, WebFrameClient* cli
ent) |
| 1589 { | 1594 { |
| 1590 return WebLocalFrameImpl::create(scope, client); | 1595 return WebLocalFrameImpl::create(scope, client); |
| 1591 } | 1596 } |
| 1592 | 1597 |
| 1593 WebLocalFrameImpl* WebLocalFrameImpl::create(WebTreeScopeType scope, WebFrameCli
ent* client) | 1598 WebLocalFrameImpl* WebLocalFrameImpl::create(WebTreeScopeType scope, WebFrameCli
ent* client) |
| 1594 { | 1599 { |
| 1595 WebLocalFrameImpl* frame = new WebLocalFrameImpl(scope, client); | 1600 WebLocalFrameImpl* frame = new WebLocalFrameImpl(scope, client); |
| 1596 #if ENABLE(OILPAN) | 1601 #if ENABLE(OILPAN) |
| 1597 return frame; | 1602 return frame; |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1679 // during init(). Note that this may dispatch JS events; the frame may be | 1684 // during init(). Note that this may dispatch JS events; the frame may be |
| 1680 // detached after init() returns. | 1685 // detached after init() returns. |
| 1681 frame->init(); | 1686 frame->init(); |
| 1682 return frame; | 1687 return frame; |
| 1683 } | 1688 } |
| 1684 | 1689 |
| 1685 PassRefPtrWillBeRawPtr<LocalFrame> WebLocalFrameImpl::createChildFrame(const Fra
meLoadRequest& request, | 1690 PassRefPtrWillBeRawPtr<LocalFrame> WebLocalFrameImpl::createChildFrame(const Fra
meLoadRequest& request, |
| 1686 const AtomicString& name, HTMLFrameOwnerElement* ownerElement) | 1691 const AtomicString& name, HTMLFrameOwnerElement* ownerElement) |
| 1687 { | 1692 { |
| 1688 ASSERT(m_client); | 1693 ASSERT(m_client); |
| 1689 WebTreeScopeType scope = frame()->document() == ownerElement->treeScope() | 1694 WebLocalFrameImpl* webframeChild = toWebLocalFrameImpl(m_client->createChild
Frame(this, name, static_cast<WebSandboxFlags>(ownerElement->sandboxFlags()))); |
| 1690 ? WebTreeScopeType::Document | |
| 1691 : WebTreeScopeType::Shadow; | |
| 1692 WebLocalFrameImpl* webframeChild = toWebLocalFrameImpl(m_client->createChild
Frame(this, scope, name, static_cast<WebSandboxFlags>(ownerElement->sandboxFlags
()))); | |
| 1693 if (!webframeChild) | 1695 if (!webframeChild) |
| 1694 return nullptr; | 1696 return nullptr; |
| 1695 | 1697 |
| 1696 // FIXME: Using subResourceAttributeName as fallback is not a perfect | 1698 // FIXME: Using subResourceAttributeName as fallback is not a perfect |
| 1697 // solution. subResourceAttributeName returns just one attribute name. The | 1699 // solution. subResourceAttributeName returns just one attribute name. The |
| 1698 // element might not have the attribute, and there might be other attributes | 1700 // element might not have the attribute, and there might be other attributes |
| 1699 // which can identify the element. | 1701 // which can identify the element. |
| 1700 RefPtrWillBeRawPtr<LocalFrame> child = webframeChild->initializeCoreFrame(fr
ame()->host(), ownerElement, name, ownerElement->getAttribute(ownerElement->subR
esourceAttributeName())); | 1702 RefPtrWillBeRawPtr<LocalFrame> child = webframeChild->initializeCoreFrame(fr
ame()->host(), ownerElement, name, ownerElement->getAttribute(ownerElement->subR
esourceAttributeName())); |
| 1701 // Initializing the core frame may cause the new child to be detached, since | 1703 // Initializing the core frame may cause the new child to be detached, since |
| 1702 // it may dispatch a load event in the parent. | 1704 // it may dispatch a load event in the parent. |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2093 { | 2095 { |
| 2094 m_frameWidget = frameWidget; | 2096 m_frameWidget = frameWidget; |
| 2095 } | 2097 } |
| 2096 | 2098 |
| 2097 WebFrameWidgetImpl* WebLocalFrameImpl::frameWidget() const | 2099 WebFrameWidgetImpl* WebLocalFrameImpl::frameWidget() const |
| 2098 { | 2100 { |
| 2099 return m_frameWidget; | 2101 return m_frameWidget; |
| 2100 } | 2102 } |
| 2101 | 2103 |
| 2102 } // namespace blink | 2104 } // namespace blink |
| OLD | NEW |