| 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 if (!layoutObject() || !layoutObject()->isLayoutPart()) | 146 if (!layoutObject() || !layoutObject()->isLayoutPart()) |
| 147 return nullptr; | 147 return nullptr; |
| 148 return toLayoutPart(layoutObject()); | 148 return toLayoutPart(layoutObject()); |
| 149 } | 149 } |
| 150 | 150 |
| 151 void HTMLFrameOwnerElement::setContentFrame(Frame& frame) | 151 void HTMLFrameOwnerElement::setContentFrame(Frame& frame) |
| 152 { | 152 { |
| 153 // Make sure we will not end up with two frames referencing the same owner e
lement. | 153 // Make sure we will not end up with two frames referencing the same owner e
lement. |
| 154 ASSERT(!m_contentFrame || m_contentFrame->owner() != this); | 154 ASSERT(!m_contentFrame || m_contentFrame->owner() != this); |
| 155 // Disconnected frames should not be allowed to load. | 155 // Disconnected frames should not be allowed to load. |
| 156 ASSERT(inDocument()); | 156 ASSERT(inShadowIncludingDocument()); |
| 157 m_contentFrame = &frame; | 157 m_contentFrame = &frame; |
| 158 | 158 |
| 159 for (ContainerNode* node = this; node; node = node->parentOrShadowHostNode()
) | 159 for (ContainerNode* node = this; node; node = node->parentOrShadowHostNode()
) |
| 160 node->incrementConnectedSubframeCount(); | 160 node->incrementConnectedSubframeCount(); |
| 161 } | 161 } |
| 162 | 162 |
| 163 void HTMLFrameOwnerElement::clearContentFrame() | 163 void HTMLFrameOwnerElement::clearContentFrame() |
| 164 { | 164 { |
| 165 if (!m_contentFrame) | 165 if (!m_contentFrame) |
| 166 return; | 166 return; |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 DEFINE_TRACE(HTMLFrameOwnerElement) | 307 DEFINE_TRACE(HTMLFrameOwnerElement) |
| 308 { | 308 { |
| 309 visitor->trace(m_contentFrame); | 309 visitor->trace(m_contentFrame); |
| 310 visitor->trace(m_widget); | 310 visitor->trace(m_widget); |
| 311 HTMLElement::trace(visitor); | 311 HTMLElement::trace(visitor); |
| 312 FrameOwner::trace(visitor); | 312 FrameOwner::trace(visitor); |
| 313 } | 313 } |
| 314 | 314 |
| 315 | 315 |
| 316 } // namespace blink | 316 } // namespace blink |
| OLD | NEW |