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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 return nullptr; | 152 return nullptr; |
153 return ToLayoutPart(GetLayoutObject()); | 153 return ToLayoutPart(GetLayoutObject()); |
154 } | 154 } |
155 | 155 |
156 void HTMLFrameOwnerElement::SetContentFrame(Frame& frame) { | 156 void HTMLFrameOwnerElement::SetContentFrame(Frame& frame) { |
157 // Make sure we will not end up with two frames referencing the same owner | 157 // Make sure we will not end up with two frames referencing the same owner |
158 // element. | 158 // element. |
159 DCHECK(!content_frame_ || content_frame_->Owner() != this); | 159 DCHECK(!content_frame_ || content_frame_->Owner() != this); |
160 // Disconnected frames should not be allowed to load. | 160 // Disconnected frames should not be allowed to load. |
161 DCHECK(isConnected()); | 161 DCHECK(isConnected()); |
| 162 |
162 content_frame_ = &frame; | 163 content_frame_ = &frame; |
163 | 164 |
164 for (ContainerNode* node = this; node; node = node->ParentOrShadowHostNode()) | 165 for (ContainerNode* node = this; node; node = node->ParentOrShadowHostNode()) |
165 node->IncrementConnectedSubframeCount(); | 166 node->IncrementConnectedSubframeCount(); |
166 } | 167 } |
167 | 168 |
168 void HTMLFrameOwnerElement::ClearContentFrame() { | 169 void HTMLFrameOwnerElement::ClearContentFrame() { |
169 if (!content_frame_) | 170 if (!content_frame_) |
170 return; | 171 return; |
171 | 172 |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 } | 343 } |
343 | 344 |
344 DEFINE_TRACE(HTMLFrameOwnerElement) { | 345 DEFINE_TRACE(HTMLFrameOwnerElement) { |
345 visitor->Trace(content_frame_); | 346 visitor->Trace(content_frame_); |
346 visitor->Trace(widget_); | 347 visitor->Trace(widget_); |
347 HTMLElement::Trace(visitor); | 348 HTMLElement::Trace(visitor); |
348 FrameOwner::Trace(visitor); | 349 FrameOwner::Trace(visitor); |
349 } | 350 } |
350 | 351 |
351 } // namespace blink | 352 } // namespace blink |
OLD | NEW |