mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-25 14:56:20 +00:00
7c1623d915
Avoid making a copy of the entire data array by using `doc.data` and `doc.data.getLength()` instead of `doc.getData()` and `doc.getData().length`. Get rid of some unnecessary conditionals in `Transaction.newFromWrap`: the `tx.pushReplace()` and `tx.pushRetain()` methods will already gracefully no-op if the replaced/retained region is empty; we don't need to add extra control flow to handle that case. Clarify offset math in `Transaction.newFromWrap`. Fix a minor bug in `Transaction.newFromInsertion`: the final retain didn't account for the length of the removed region, if `doc.fixupInsertion` creates one. (This usually doesn't happen.) Remove an inaccurate TODO in `Transaction.pushReplaceMetadata()` -- it is no longer a straight copy/paste of `Transaction.pushReplace`, so a refactor isn't really called for. Change-Id: I7d86a2449978365d69d4a5ed43116c2e9945475d |
||
---|---|---|
.. | ||
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 |