mediawiki-extensions-Visual.../modules/ve/test/dm
Catrope 04516bb02e Whitespace preservation was broken after the first run
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
2013-04-17 11:28:05 +00:00
..
lineardata Fix a bug where trimOuterSpaceFromRange() didn't trim an all-whitespace range 2013-04-03 16:58:51 -07:00
nodes Bump copyright notice year range to -2013 over -2012 2013-02-19 15:37:34 -08:00
ve.dm.AnnotationSet.test.js Store data in LinearData class with an index-value store for objects 2013-03-30 10:06:34 +00:00
ve.dm.BranchNode.test.js Correct name of can(Node)HaveGrandchildren functions 2013-03-13 23:25:33 +00:00
ve.dm.Converter.test.js Whitespace preservation was broken after the first run 2013-04-17 11:28:05 +00:00
ve.dm.Document.test.js Store data in LinearData class with an index-value store for objects 2013-03-30 10:06:34 +00:00
ve.dm.DocumentSynchronizer.test.js Store data in LinearData class with an index-value store for objects 2013-03-30 10:06:34 +00:00
ve.dm.example.js Hybridise MWTemplateNode 2013-04-14 02:34:18 +00:00
ve.dm.IndexValueStore.test.js Store data in LinearData class with an index-value store for objects 2013-03-30 10:06:34 +00: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 Store data in LinearData class with an index-value store for objects 2013-03-30 10:06:34 +00:00
ve.dm.MetaList.test.js Fix MetaList tests, were totally broken 2013-04-09 12:46:04 +01:00
ve.dm.ModelRegistry.test.js Fix ModelRegistry bugs 2013-04-08 18:05:34 -07:00
ve.dm.Node.test.js Correct name of can(Node)HaveGrandchildren functions 2013-03-13 23:25:33 +00: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 Bump copyright notice year range to -2013 over -2012 2013-02-19 15:37:34 -08:00
ve.dm.SurfaceFragment.test.js Store data in LinearData class with an index-value store for objects 2013-03-30 10:06:34 +00:00
ve.dm.Transaction.test.js Image node refactor 2013-04-10 14:56:08 -07:00
ve.dm.TransactionProcessor.test.js Test: Fix 404 errors in example images. 2013-04-02 23:52:02 +02:00