| 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 return nullptr; | 150 return nullptr; |
| 151 return toLayoutPart(layoutObject()); | 151 return toLayoutPart(layoutObject()); |
| 152 } | 152 } |
| 153 | 153 |
| 154 void HTMLFrameOwnerElement::setContentFrame(Frame& frame) { | 154 void HTMLFrameOwnerElement::setContentFrame(Frame& frame) { |
| 155 // Make sure we will not end up with two frames referencing the same owner | 155 // Make sure we will not end up with two frames referencing the same owner |
| 156 // element. | 156 // element. |
| 157 DCHECK(!m_contentFrame || m_contentFrame->owner() != this); | 157 DCHECK(!m_contentFrame || m_contentFrame->owner() != this); |
| 158 // Disconnected frames should not be allowed to load. | 158 // Disconnected frames should not be allowed to load. |
| 159 DCHECK(isConnected()); | 159 DCHECK(isConnected()); |
| 160 |
| 160 m_contentFrame = &frame; | 161 m_contentFrame = &frame; |
| 161 | 162 |
| 162 for (ContainerNode* node = this; node; node = node->parentOrShadowHostNode()) | 163 for (ContainerNode* node = this; node; node = node->parentOrShadowHostNode()) |
| 163 node->incrementConnectedSubframeCount(); | 164 node->incrementConnectedSubframeCount(); |
| 164 } | 165 } |
| 165 | 166 |
| 166 void HTMLFrameOwnerElement::clearContentFrame() { | 167 void HTMLFrameOwnerElement::clearContentFrame() { |
| 167 if (!m_contentFrame) | 168 if (!m_contentFrame) |
| 168 return; | 169 return; |
| 169 | 170 |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 } | 323 } |
| 323 | 324 |
| 324 DEFINE_TRACE(HTMLFrameOwnerElement) { | 325 DEFINE_TRACE(HTMLFrameOwnerElement) { |
| 325 visitor->trace(m_contentFrame); | 326 visitor->trace(m_contentFrame); |
| 326 visitor->trace(m_widget); | 327 visitor->trace(m_widget); |
| 327 HTMLElement::trace(visitor); | 328 HTMLElement::trace(visitor); |
| 328 FrameOwner::trace(visitor); | 329 FrameOwner::trace(visitor); |
| 329 } | 330 } |
| 330 | 331 |
| 331 } // namespace blink | 332 } // namespace blink |
| OLD | NEW |