mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-25 14:56:20 +00:00
04516bb02e
The first run of getDomFromData() would preserve whitespace just fine, but it blanked out the .veInternal.whitespace[1] element in certain cases, contaminating the linear model and making the whitespace data inconsistent. Subsequent runs of getDomFromData() would then refuse to serialize that whitespace because the information about it was inconsistent. In getDomFromData(), we sometimes unset .veInternal.whitespace[1] (i.e. set it to undefined) to prevent double processing. Because we're potentially going to modify .veInternal, don't assign it by reference, but copy the object. Added tests asserting that the linear model is unchanged after calling getDomFromData(), because that function should never modify linear model data. This test failed in 4 cases (all whitespace-related) before I added the copyObject() call. Bug: 43543 Change-Id: Ic4c93510518163894201a693ab50331413715967 |
||
---|---|---|
.. | ||
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.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 |