mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-25 23:05:35 +00:00
ccef625a08
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 |
||
---|---|---|
.. | ||
annotations | ||
lineardata | ||
metaitems | ||
nodes | ||
ve.dm.Annotation.js | ||
ve.dm.AnnotationFactory.js | ||
ve.dm.AnnotationSet.js | ||
ve.dm.BranchNode.js | ||
ve.dm.Converter.js | ||
ve.dm.DataString.js | ||
ve.dm.Document.js | ||
ve.dm.DocumentSlice.js | ||
ve.dm.DocumentSynchronizer.js | ||
ve.dm.IndexValueStore.js | ||
ve.dm.InternalList.js | ||
ve.dm.js | ||
ve.dm.LeafNode.js | ||
ve.dm.LinearData.js | ||
ve.dm.MetaItem.js | ||
ve.dm.MetaItemFactory.js | ||
ve.dm.MetaList.js | ||
ve.dm.Model.js | ||
ve.dm.ModelRegistry.js | ||
ve.dm.Node.js | ||
ve.dm.NodeFactory.js | ||
ve.dm.Surface.js | ||
ve.dm.SurfaceFragment.js | ||
ve.dm.Transaction.js | ||
ve.dm.TransactionProcessor.js |