mediawiki-extensions-Visual.../modules/ve
Catrope 031b96dd2a Make metadata reaping handle replacement operations more sanely
Before, replacement operations that both inserted and removed data at
the same time would be treated as removals followed by insertions,
so we'd reap the metadata from the affected range and move it to the
start of the range. For a pure replacement, this doesn't make any sense.

Instead, preserve the first min(insertLength, removeLength) elements in
the metadata array, then perform a pure insertion splice or a pure
removal splice for the length adjustment. Any metadata reaped in a
removal splice is restored at the offset where we started removing,
after the preserved portion.

These changes make the behavior of metadata reaping saner in general
(the previous behavior had the potential to move metadata around if it
was near a paragraph opening or closing and you converted the paragraph
to a heading), and makes the behavior match up with translateOffset(),
which is desirable for MetaList synchronization.

Change-Id: If9a1c6a7cf43ead7e3e1e8f6e081b139ca65fa53
2013-03-14 23:35:50 -07:00
..
actions Merge "Refactor convert to use isolateAndUnwrap" 2013-03-13 16:37:17 +00:00
ce Correct name of can(Node)HaveGrandchildren functions 2013-03-13 23:25:33 +00:00
dm Make metadata reaping handle replacement operations more sanely 2013-03-14 23:35:50 -07:00
init Context, frame, window, dialog and inspector refactor 2013-03-14 00:03:31 +00:00
styles Context, frame, window, dialog and inspector refactor 2013-03-14 00:03:31 +00:00
test Change MetaNodes to MetaItems 2013-03-14 23:35:50 -07:00
ui Context, frame, window, dialog and inspector refactor 2013-03-14 00:03:31 +00:00
ve.Action.js Bump copyright notice year range to -2013 over -2012 2013-02-19 15:37:34 -08:00
ve.ActionFactory.js Bump copyright notice year range to -2013 over -2012 2013-02-19 15:37:34 -08:00
ve.AnnotationSet.js Bump copyright notice year range to -2013 over -2012 2013-02-19 15:37:34 -08:00
ve.BranchNode.js Bump copyright notice year range to -2013 over -2012 2013-02-19 15:37:34 -08:00
ve.CommandRegistry.js Bump copyright notice year range to -2013 over -2012 2013-02-19 15:37:34 -08:00
ve.debug.js Bump copyright notice year range to -2013 over -2012 2013-02-19 15:37:34 -08:00
ve.Document.js Correct name of can(Node)HaveGrandchildren functions 2013-03-13 23:25:33 +00:00
ve.EventEmitter.js Bump copyright notice year range to -2013 over -2012 2013-02-19 15:37:34 -08:00
ve.Factory.js Bump copyright notice year range to -2013 over -2012 2013-02-19 15:37:34 -08:00
ve.js Added validation to ve.inheritClass 2013-02-27 18:41:59 +01:00
ve.LeafNode.js Bump copyright notice year range to -2013 over -2012 2013-02-19 15:37:34 -08:00
ve.Node.js Change MetaNodes to MetaItems 2013-03-14 23:35:50 -07:00
ve.NodeFactory.js Use static.name once for ce and dm nodes 2013-03-07 17:19:39 -08:00
ve.OrderedHashSet.js Bump copyright notice year range to -2013 over -2012 2013-02-19 15:37:34 -08:00
ve.Range.js Add ve.Range.prototype.isBackwards() 2013-02-22 17:33:23 -08:00
ve.Registry.js Bump copyright notice year range to -2013 over -2012 2013-02-19 15:37:34 -08:00
ve.Surface.js Context, frame, window, dialog and inspector refactor 2013-03-14 00:03:31 +00:00
ve.Trigger.js Bump copyright notice year range to -2013 over -2012 2013-02-19 15:37:34 -08:00
ve.TriggerRegistry.js Bump copyright notice year range to -2013 over -2012 2013-02-19 15:37:34 -08:00