adobe/brackets — pull request #4293 by njx (2013-06-20 07:43:57+00:00)
Title: Some preparatory work for incremental update

@dangoor

The first commit is straightforward--just adds an id->node map at the root of the DOM tree.

The second commit refactors the various edit tests to basically run them twice: once doing a full diff, the other capturing the changelist from the editor and passing that into `_updateDOM()`, making sure that we get the right tree edits in both cases. These tests still pass even though I haven't actually added the incremental update code yet, since the changelist is just ignored, so the "incremental" test is really just running the full diff again.

Not sure if you want to take that second one, but if it makes sense to you, I thought it would be good to go ahead and get this in so any new tests you write for editing functionality can follow the same pattern.

(Note that I made another change to the tests, to store any values from `previousDOM` that we want to test before actually doing the update. This is anticipating the fact that if we change the DOMUpdater in the way I suggested in my email to you, we can't compare to `previousDOM` after the update has occurred, since it will have been mutated to become the new DOM anyway.)