mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 00:30:44 +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 |
||
---|---|---|
.. | ||
jquery | ||
jquery.uls | ||
oojs | ||
qunit | ||
rangy | ||
unicodejs | ||
ve | ||
ve-mw |