Changeset 74101 in webkit
- Timestamp:
- Dec 15, 2010 1:47:12 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r74100 r74101 1 2010-12-15 Emil Eklund <eae@chromium.org> 2 3 Reviewed by Adam Barth. 4 5 Added test for infinite loop in ContainerNode::willRemoveChildren. 6 https://bugs.webkit.org/show_bug.cgi?id=51079 7 8 * fast/dom/containerNode-expected.txt: Added. 9 * fast/dom/containerNode.html: Added. 10 1 11 2010-12-15 Csaba Osztrogonác <ossy@webkit.org> 2 12 -
trunk/WebCore/ChangeLog
r74099 r74101 1 2010-12-15 Emil Eklund <eae@chromium.org> 2 3 Reviewed by Adam Barth. 4 5 Change ContainerNode::willRemoveChildren to not fire mutation events for children 6 added as a result of a mutation event, thereby avoiding an infinite loop. 7 https://bugs.webkit.org/show_bug.cgi?id=51079 8 9 Test: fast/dom/containerNode.html 10 11 * dom/ContainerNode.cpp: 12 (WebCore::willRemoveChildren): Don't fire mutation events for children added during a mutation event. 13 1 14 2010-12-14 Dan Bernstein <mitz@apple.com> 2 15 -
trunk/WebCore/dom/ContainerNode.cpp
r73690 r74101 380 380 container->document()->incDOMTreeVersion(); 381 381 382 // FIXME: Adding new children from event handlers can cause an infinite loop here. 383 for (RefPtr<Node> child = container->firstChild(); child; child = child->nextSibling()) { 382 NodeVector children; 383 for (Node* n = container->firstChild(); n; n = n->nextSibling()) 384 children.append(n); 385 386 for (NodeVector::const_iterator it = children.begin(); it != children.end(); it++) { 387 Node* child = it->get(); 384 388 // fire removed from document mutation events. 385 dispatchChildRemovalEvents(child .get());389 dispatchChildRemovalEvents(child); 386 390 child->willRemove(); 387 391 }
Note: See TracChangeset
for help on using the changeset viewer.