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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 child->notifyMutationObserversNodeWillDetach(); | 330 child->notifyMutationObserversNodeWillDetach(); |
331 #endif | 331 #endif |
332 | 332 |
333 dispatchChildRemovalEvents(child); | 333 dispatchChildRemovalEvents(child); |
334 child->document()->nodeWillBeRemoved(child); // e.g. mutation event listener
can create a new range. | 334 child->document()->nodeWillBeRemoved(child); // e.g. mutation event listener
can create a new range. |
335 child->willRemove(); | 335 child->willRemove(); |
336 } | 336 } |
337 | 337 |
338 static void willRemoveChildren(ContainerNode* container) | 338 static void willRemoveChildren(ContainerNode* container) |
339 { | 339 { |
340 container->document()->nodeChildrenWillBeRemoved(container); | |
341 | |
342 NodeVector children; | 340 NodeVector children; |
343 getChildNodes(container, children); | 341 getChildNodes(container, children); |
344 | 342 |
| 343 container->document()->nodeChildrenWillBeRemoved(container); |
| 344 |
345 #if ENABLE(MUTATION_OBSERVERS) | 345 #if ENABLE(MUTATION_OBSERVERS) |
346 ChildListMutationScope mutation(container); | 346 ChildListMutationScope mutation(container); |
347 #endif | 347 #endif |
348 | 348 |
349 for (NodeVector::const_iterator it = children.begin(); it != children.end();
it++) { | 349 for (NodeVector::const_iterator it = children.begin(); it != children.end();
it++) { |
350 Node* child = it->get(); | 350 Node* child = it->get(); |
351 | 351 |
352 #if ENABLE(MUTATION_OBSERVERS) | 352 #if ENABLE(MUTATION_OBSERVERS) |
353 mutation.willRemoveChild(child); | 353 mutation.willRemoveChild(child); |
354 child->notifyMutationObserversNodeWillDetach(); | 354 child->notifyMutationObserversNodeWillDetach(); |
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
994 if (shouldLazyAttach) | 994 if (shouldLazyAttach) |
995 child->lazyAttach(); | 995 child->lazyAttach(); |
996 else | 996 else |
997 child->attach(); | 997 child->attach(); |
998 } | 998 } |
999 | 999 |
1000 dispatchChildInsertionEvents(child); | 1000 dispatchChildInsertionEvents(child); |
1001 } | 1001 } |
1002 | 1002 |
1003 } // namespace WebCore | 1003 } // namespace WebCore |
OLD | NEW |