mediawiki-extensions-Visual.../modules/ve/test/dm
Roan Kattouw ccef625a08 Rewrite MetaList.onTransact
The previous implementation couldn't deal with transactions that
replaced both data and metadata at the same time (rather than replacing
data while moving metadata around), and extending its approach to
deal with that case would have made it much more complex.

So I rewrote the algorithm from scratch. The previous implementation
scheduled deferred moves for existing items, but immediately processed
insertions and removals. This is problematic for replacements and
maintaining the order in the binary search list. So instead, this new
implementation builds an array representing what the new item list
should be, then processes insertions, removals and moves in the correct
order to achieve that state.

It looks like the previous implementation didn't always work correctly,
which was masked because the test suite passed full=false to
assertItemsMatchMetadata(). This rewrite fixes this.

Also remove setMove/applyMove from MetaItem, because we don't need them
anymore and they're evil anyway; and add isAttached(), because the new
algorithm needs it.

Change-Id: I899d2b3c94c2cfa55823879bca95456750f64382
2013-09-11 15:29:28 -07:00
..
lineardata getAnnotationsFromRange should only ignore non-content data 2013-08-21 22:32:34 +01:00
nodes The great directory split of 2013 2013-07-02 20:51:38 -07:00
ve.dm.AnnotationSet.test.js Rename index to offset in AnnotationSet 2013-07-26 23:04:01 +00:00
ve.dm.BranchNode.test.js Kill getOffsetFromNode() with fire 2013-05-09 17:26:22 -07:00
ve.dm.Converter.test.js ve.copy: Remove obsolete copyArray and copyObject 2013-07-30 01:44:22 +02:00
ve.dm.Document.test.js Remove no-insertion metadata corner case from ve.dm.Transaction.pushReplace(). 2013-09-06 01:07:37 +00:00
ve.dm.DocumentSynchronizer.test.js Code style fixes 2013-05-06 12:36:52 +01:00
ve.dm.example.js Correctly preserve metadata in Transaction.newFromUnwrap. 2013-09-06 01:06:59 +00:00
ve.dm.IndexValueStore.test.js Preserve location of reference body within key 2013-06-10 02:54:26 +00:00
ve.dm.InternalList.test.js Always give references names. Ignore if used once. 2013-08-28 12:47:33 -07:00
ve.dm.LeafNode.test.js Store data in LinearData class with an index-value store for objects 2013-03-30 10:06:34 +00:00
ve.dm.LinearData.test.js ve.copy: Remove obsolete copyArray and copyObject 2013-07-30 01:44:22 +02:00
ve.dm.MetaList.test.js Rewrite MetaList.onTransact 2013-09-11 15:29:28 -07:00
ve.dm.Model.test.js jshint: Fix trailing comma 2013-06-05 13:00:49 +02:00
ve.dm.ModelRegistry.test.js Fix ModelRegistry bugs 2013-04-08 18:05:34 -07:00
ve.dm.Node.test.js jshint: Fix trailing comma 2013-06-05 13:00:49 +02:00
ve.dm.NodeFactory.test.js Correct name of can(Node)HaveGrandchildren functions 2013-03-13 23:25:33 +00:00
ve.dm.Surface.test.js Only undo on MWMetaDialog close if small stack is non-empty 2013-06-18 16:55:03 +01:00
ve.dm.SurfaceFragment.test.js ve.copy: Remove obsolete copyArray and copyObject 2013-07-30 01:44:22 +02:00
ve.dm.Transaction.test.js Remove no-insertion metadata corner case from ve.dm.Transaction.pushReplace(). 2013-09-06 01:07:37 +00:00
ve.dm.TransactionProcessor.test.js Fix processing of double metadata replacements 2013-09-11 15:26:12 -07:00