Bug 59343 - ContainerNode::insertedIntoDocument and ::willRemove don't handle self modifying trees
: ContainerNode::insertedIntoDocument and ::willRemove don't handle self modify...
Status: ASSIGNED
: WebKit
WebCore JavaScript
: 528+ (Nightly build)
: All All
: P2 Normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2011-04-25 14:15 PST by
Modified: 2011-04-25 15:53 PST (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2011-04-25 14:15:36 PST
If during an insert or delete node operation, the modification of one node causes a change in one or more other nodes.  Typically this can happen due to script execution as part of the insertion / deletion node notification.

The current implementation, checked in with <http://trac.webkit.org/changeset/84701>, will stop processing at the first child sibling node that was modified and subsequent siblings will not be notified of the insertion or deletion.  The immediately prior code traversed the node tree in question and created a vector of nodes and then notified the collected nodes of the insertion or deletion.  This ended up notifying secondarily modified nodes of the insertion.  while the current code "under" notifies, the prior code "over" notifies.

The proposal is to travers the node tree and queue up all modifying operations and then process those modifying operations for all nodes still at the same location in the node tree.