| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 , m_contentFrame(nullptr) | 108 , m_contentFrame(nullptr) |
| 109 , m_widget(nullptr) | 109 , m_widget(nullptr) |
| 110 , m_sandboxFlags(SandboxNone) | 110 , m_sandboxFlags(SandboxNone) |
| 111 { | 111 { |
| 112 } | 112 } |
| 113 | 113 |
| 114 LayoutPart* HTMLFrameOwnerElement::layoutPart() const | 114 LayoutPart* HTMLFrameOwnerElement::layoutPart() const |
| 115 { | 115 { |
| 116 // HTMLObjectElement and HTMLEmbedElement may return arbitrary renderers | 116 // HTMLObjectElement and HTMLEmbedElement may return arbitrary renderers |
| 117 // when using fallback content. | 117 // when using fallback content. |
| 118 if (!renderer() || !renderer()->isLayoutPart()) | 118 if (!layoutObject() || !layoutObject()->isLayoutPart()) |
| 119 return nullptr; | 119 return nullptr; |
| 120 return toLayoutPart(renderer()); | 120 return toLayoutPart(layoutObject()); |
| 121 } | 121 } |
| 122 | 122 |
| 123 void HTMLFrameOwnerElement::setContentFrame(Frame& frame) | 123 void HTMLFrameOwnerElement::setContentFrame(Frame& frame) |
| 124 { | 124 { |
| 125 // Make sure we will not end up with two frames referencing the same owner e
lement. | 125 // Make sure we will not end up with two frames referencing the same owner e
lement. |
| 126 ASSERT(!m_contentFrame || m_contentFrame->owner() != this); | 126 ASSERT(!m_contentFrame || m_contentFrame->owner() != this); |
| 127 // Disconnected frames should not be allowed to load. | 127 // Disconnected frames should not be allowed to load. |
| 128 ASSERT(inDocument()); | 128 ASSERT(inDocument()); |
| 129 m_contentFrame = &frame; | 129 m_contentFrame = &frame; |
| 130 | 130 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 return; | 214 return; |
| 215 | 215 |
| 216 if (m_widget) { | 216 if (m_widget) { |
| 217 if (m_widget->parent()) | 217 if (m_widget->parent()) |
| 218 moveWidgetToParentSoon(m_widget.get(), 0); | 218 moveWidgetToParentSoon(m_widget.get(), 0); |
| 219 m_widget = nullptr; | 219 m_widget = nullptr; |
| 220 } | 220 } |
| 221 | 221 |
| 222 m_widget = widget; | 222 m_widget = widget; |
| 223 | 223 |
| 224 LayoutPart* layoutPart = toLayoutPart(renderer()); | 224 LayoutPart* layoutPart = toLayoutPart(layoutObject()); |
| 225 if (!layoutPart) | 225 if (!layoutPart) |
| 226 return; | 226 return; |
| 227 | 227 |
| 228 if (m_widget) { | 228 if (m_widget) { |
| 229 layoutPart->updateOnWidgetChange(); | 229 layoutPart->updateOnWidgetChange(); |
| 230 | 230 |
| 231 ASSERT(document().view() == layoutPart->frameView()); | 231 ASSERT(document().view() == layoutPart->frameView()); |
| 232 ASSERT(layoutPart->frameView()); | 232 ASSERT(layoutPart->frameView()); |
| 233 moveWidgetToParentSoon(m_widget.get(), layoutPart->frameView()); | 233 moveWidgetToParentSoon(m_widget.get(), layoutPart->frameView()); |
| 234 } | 234 } |
| (...skipping 29 matching lines...) Expand all Loading... |
| 264 DEFINE_TRACE(HTMLFrameOwnerElement) | 264 DEFINE_TRACE(HTMLFrameOwnerElement) |
| 265 { | 265 { |
| 266 visitor->trace(m_contentFrame); | 266 visitor->trace(m_contentFrame); |
| 267 visitor->trace(m_widget); | 267 visitor->trace(m_widget); |
| 268 HTMLElement::trace(visitor); | 268 HTMLElement::trace(visitor); |
| 269 FrameOwner::trace(visitor); | 269 FrameOwner::trace(visitor); |
| 270 } | 270 } |
| 271 | 271 |
| 272 | 272 |
| 273 } // namespace blink | 273 } // namespace blink |
| OLD | NEW |