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

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

Issue 26900006: Rename Node::willBeDeletedFrom() to willBeDeletedFromDocument() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 liveNodeSet.remove(this); 287 liveNodeSet.remove(this);
288 #endif 288 #endif
289 289
290 if (hasRareData()) 290 if (hasRareData())
291 clearRareData(); 291 clearRareData();
292 292
293 RELEASE_ASSERT(!renderer()); 293 RELEASE_ASSERT(!renderer());
294 294
295 if (!isContainerNode()) { 295 if (!isContainerNode()) {
296 if (Document* document = documentInternal()) 296 if (Document* document = documentInternal())
297 willBeDeletedFrom(document); 297 willBeDeletedFrom(*document);
298 } 298 }
299 299
300 if (m_previous) 300 if (m_previous)
301 m_previous->setNextSibling(0); 301 m_previous->setNextSibling(0);
302 if (m_next) 302 if (m_next)
303 m_next->setPreviousSibling(0); 303 m_next->setPreviousSibling(0);
304 304
305 m_treeScope->guardDeref(); 305 m_treeScope->guardDeref();
306 306
307 InspectorCounters::decrementCounter(InspectorCounters::NodeCounter); 307 InspectorCounters::decrementCounter(InspectorCounters::NodeCounter);
308 } 308 }
309 309
310 void Node::willBeDeletedFrom(Document* document) 310 void Node::willBeDeletedFrom(Document& document)
311 { 311 {
312 if (hasEventTargetData()) { 312 if (hasEventTargetData()) {
313 if (document) 313 document.didRemoveEventTargetNode(this);
314 document->didRemoveEventTargetNode(this);
315 clearEventTargetData(); 314 clearEventTargetData();
316 } 315 }
317 316
318 if (document) { 317 if (AXObjectCache* cache = document.existingAXObjectCache())
319 if (AXObjectCache* cache = document->existingAXObjectCache()) 318 cache->remove(this);
320 cache->remove(this);
321 }
322 } 319 }
323 320
324 NodeRareData* Node::rareData() const 321 NodeRareData* Node::rareData() const
325 { 322 {
326 ASSERT_WITH_SECURITY_IMPLICATION(hasRareData()); 323 ASSERT_WITH_SECURITY_IMPLICATION(hasRareData());
327 return static_cast<NodeRareData*>(m_data.m_rareData); 324 return static_cast<NodeRareData*>(m_data.m_rareData);
328 } 325 }
329 326
330 NodeRareData* Node::ensureRareData() 327 NodeRareData* Node::ensureRareData()
331 { 328 {
(...skipping 2302 matching lines...) Expand 10 before | Expand all | Expand 10 after
2634 node->showTreeForThis(); 2631 node->showTreeForThis();
2635 } 2632 }
2636 2633
2637 void showNodePath(const WebCore::Node* node) 2634 void showNodePath(const WebCore::Node* node)
2638 { 2635 {
2639 if (node) 2636 if (node)
2640 node->showNodePathForThis(); 2637 node->showNodePathForThis();
2641 } 2638 }
2642 2639
2643 #endif 2640 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698