Michael Zhou ecaf9b075c EditScreen: Show the base version of the file in a CodeMirror merge view
This adds a merge view to the inline editing screen so that users can
diff against the patch set the change edit is based on while editing.

This new functionality makes use of CodeMirror's merge view addon, which
requires Google's diff-match-patch library to be loaded. The library
implements an algorithm based on the Myers diff in JavaScript on the
client side, so there is no extra usage of Gerrit's DiffApi.

The minified diff-match-patch library is bundled with CodeMirror's merge
view addon during the build process.

By default, the merge view is disabled. This can be changed via
EditPreferencesBox. Also added a checkbox to the EditScreen header to
toggle the view.

The loading of the content of the base version is lazy - it is only
loaded when the merge view is actually used.

The documentation and tutorial on this new feature will be added in
later changes.

Screenshot: https://i.imgur.com/uNMNzjM.png

Change-Id: I5eb4af9b67bbfcb0b149965b3c818c1f6118e6de
2016-04-27 03:05:00 -04:00
..