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

Side by Side Diff: Source/core/dom/Node.cpp

Issue 948793003: Fix inconsistent frame detach behavior of ContainerNode::parserRemoveChild. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 2240 matching lines...) Expand 10 before | Expand all | Expand 10 after
2251 { 2251 {
2252 ASSERT(isContainerNode()); 2252 ASSERT(isContainerNode());
2253 ensureRareData().incrementConnectedSubframeCount(amount); 2253 ensureRareData().incrementConnectedSubframeCount(amount);
2254 } 2254 }
2255 2255
2256 void Node::decrementConnectedSubframeCount(unsigned amount) 2256 void Node::decrementConnectedSubframeCount(unsigned amount)
2257 { 2257 {
2258 rareData()->decrementConnectedSubframeCount(amount); 2258 rareData()->decrementConnectedSubframeCount(amount);
2259 } 2259 }
2260 2260
2261 void Node::updateAncestorConnectedSubframeCountForRemoval() const
2262 {
2263 unsigned count = connectedSubframeCount();
2264
2265 if (!count)
2266 return;
2267
2268 for (Node* node = parentOrShadowHostNode(); node; node = node->parentOrShado wHostNode())
2269 node->decrementConnectedSubframeCount(count);
Yuta Kitamura 2015/02/23 07:54:41 Simply removing this function makes the "connected
kouhei (in TOK) 2015/02/23 11:51:29 HTMLFrameOwnerElement::clearContentFrame does this
2270 }
2271
2272 void Node::updateAncestorConnectedSubframeCountForInsertion() const 2261 void Node::updateAncestorConnectedSubframeCountForInsertion() const
2273 { 2262 {
2274 unsigned count = connectedSubframeCount(); 2263 unsigned count = connectedSubframeCount();
2275 2264
2276 if (!count) 2265 if (!count)
2277 return; 2266 return;
2278 2267
2279 for (Node* node = parentOrShadowHostNode(); node; node = node->parentOrShado wHostNode()) 2268 for (Node* node = parentOrShadowHostNode(); node; node = node->parentOrShado wHostNode())
2280 node->incrementConnectedSubframeCount(count); 2269 node->incrementConnectedSubframeCount(count);
2281 } 2270 }
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
2438 node->showTreeForThis(); 2427 node->showTreeForThis();
2439 } 2428 }
2440 2429
2441 void showNodePath(const blink::Node* node) 2430 void showNodePath(const blink::Node* node)
2442 { 2431 {
2443 if (node) 2432 if (node)
2444 node->showNodePathForThis(); 2433 node->showNodePathForThis();
2445 } 2434 }
2446 2435
2447 #endif 2436 #endif
OLDNEW
« LayoutTests/fast/frames/resources/reparent-iframe.html ('K') | « Source/core/dom/Node.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698