Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.cpp

Issue 2149893003: Rename Node::inShadowIncludingDocument() to Node::isConnected() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 if (!layoutObject() || !layoutObject()->isLayoutPart()) 142 if (!layoutObject() || !layoutObject()->isLayoutPart())
143 return nullptr; 143 return nullptr;
144 return toLayoutPart(layoutObject()); 144 return toLayoutPart(layoutObject());
145 } 145 }
146 146
147 void HTMLFrameOwnerElement::setContentFrame(Frame& frame) 147 void HTMLFrameOwnerElement::setContentFrame(Frame& frame)
148 { 148 {
149 // Make sure we will not end up with two frames referencing the same owner e lement. 149 // Make sure we will not end up with two frames referencing the same owner e lement.
150 ASSERT(!m_contentFrame || m_contentFrame->owner() != this); 150 ASSERT(!m_contentFrame || m_contentFrame->owner() != this);
151 // Disconnected frames should not be allowed to load. 151 // Disconnected frames should not be allowed to load.
152 ASSERT(inShadowIncludingDocument()); 152 ASSERT(isConnected());
153 m_contentFrame = &frame; 153 m_contentFrame = &frame;
154 154
155 for (ContainerNode* node = this; node; node = node->parentOrShadowHostNode() ) 155 for (ContainerNode* node = this; node; node = node->parentOrShadowHostNode() )
156 node->incrementConnectedSubframeCount(); 156 node->incrementConnectedSubframeCount();
157 } 157 }
158 158
159 void HTMLFrameOwnerElement::clearContentFrame() 159 void HTMLFrameOwnerElement::clearContentFrame()
160 { 160 {
161 if (!m_contentFrame) 161 if (!m_contentFrame)
162 return; 162 return;
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 DEFINE_TRACE(HTMLFrameOwnerElement) 309 DEFINE_TRACE(HTMLFrameOwnerElement)
310 { 310 {
311 visitor->trace(m_contentFrame); 311 visitor->trace(m_contentFrame);
312 visitor->trace(m_widget); 312 visitor->trace(m_widget);
313 HTMLElement::trace(visitor); 313 HTMLElement::trace(visitor);
314 FrameOwner::trace(visitor); 314 FrameOwner::trace(visitor);
315 } 315 }
316 316
317 317
318 } // namespace blink 318 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698