| OLD | NEW | 
|---|
| 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 Apple Inc. All rights reserv
      ed. | 5  * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
      ed. | 
| 6  * | 6  * | 
| 7  * This library is free software; you can redistribute it and/or | 7  * This library is free software; you can redistribute it and/or | 
| 8  * modify it under the terms of the GNU Library General Public | 8  * modify it under the terms of the GNU Library General Public | 
| 9  * License as published by the Free Software Foundation; either | 9  * License as published by the Free Software Foundation; either | 
| 10  * version 2 of the License, or (at your option) any later version. | 10  * version 2 of the License, or (at your option) any later version. | 
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 472 | 472 | 
| 473     // FIXME: After sending the mutation events, "this" could be destroyed. | 473     // FIXME: After sending the mutation events, "this" could be destroyed. | 
| 474     // We can prevent that by doing a "ref", but first we have to make sure | 474     // We can prevent that by doing a "ref", but first we have to make sure | 
| 475     // that no callers call with ref count == 0 and parent = 0 (as of this | 475     // that no callers call with ref count == 0 and parent = 0 (as of this | 
| 476     // writing, there are definitely callers who call that way). | 476     // writing, there are definitely callers who call that way). | 
| 477 | 477 | 
| 478     Node* prev = child->previousSibling(); | 478     Node* prev = child->previousSibling(); | 
| 479     Node* next = child->nextSibling(); | 479     Node* next = child->nextSibling(); | 
| 480     removeBetween(prev, next, child.get()); | 480     removeBetween(prev, next, child.get()); | 
| 481 | 481 | 
|  | 482     childrenChanged(false, prev, next, -1); | 
|  | 483 | 
| 482     if (child->inDocument()) | 484     if (child->inDocument()) | 
| 483         child->removedFromDocument(); | 485         child->removedFromDocument(); | 
| 484     else | 486     else | 
| 485         child->removedFromTree(true); | 487         child->removedFromTree(true); | 
| 486 | 488 | 
| 487     // Dispatch post-removal mutation events |  | 
| 488     childrenChanged(false, prev, next, -1); |  | 
| 489     dispatchSubtreeModifiedEvent(); | 489     dispatchSubtreeModifiedEvent(); | 
| 490 | 490 | 
| 491     return child; | 491     return child; | 
| 492 } | 492 } | 
| 493 | 493 | 
| 494 void ContainerNode::removeBetween(Node* previousChild, Node* nextChild, Node* ol
      dChild) | 494 void ContainerNode::removeBetween(Node* previousChild, Node* nextChild, Node* ol
      dChild) | 
| 495 { | 495 { | 
| 496     ASSERT(oldChild); | 496     ASSERT(oldChild); | 
| 497     ASSERT(oldChild->parentNode() == this); | 497     ASSERT(oldChild->parentNode() == this); | 
| 498 | 498 | 
| (...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1172     if (!document()->hasListenerType(Document::BEFORELOAD_LISTENER)) | 1172     if (!document()->hasListenerType(Document::BEFORELOAD_LISTENER)) | 
| 1173         return true; | 1173         return true; | 
| 1174 | 1174 | 
| 1175     RefPtr<ContainerNode> protector(this); | 1175     RefPtr<ContainerNode> protector(this); | 
| 1176     RefPtr<BeforeLoadEvent> beforeLoadEvent = BeforeLoadEvent::create(sourceURL)
      ; | 1176     RefPtr<BeforeLoadEvent> beforeLoadEvent = BeforeLoadEvent::create(sourceURL)
      ; | 
| 1177     dispatchEvent(beforeLoadEvent.get()); | 1177     dispatchEvent(beforeLoadEvent.get()); | 
| 1178     return !beforeLoadEvent->defaultPrevented(); | 1178     return !beforeLoadEvent->defaultPrevented(); | 
| 1179 } | 1179 } | 
| 1180 | 1180 | 
| 1181 } // namespace WebCore | 1181 } // namespace WebCore | 
| OLD | NEW | 
|---|