2011-01-13 Ojan Vafai <ojan@chromium.org>
authorojan@chromium.org <ojan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Jan 2011 23:52:42 +0000 (23:52 +0000)
committerojan@chromium.org <ojan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Jan 2011 23:52:42 +0000 (23:52 +0000)
commitf8f6bc581f218d6c9b3825de76d677f0adafd6f9
tree9f16740e6c4e54055fd706f2a16c60fad8eabc49
parentdbe91107fbf287d17df02198a1d5db2a550f6c1c
2011-01-13  Ojan Vafai  <ojan@chromium.org>

        Reviewed by Adam Barth.

        add container divs for diff blocks
        https://bugs.webkit.org/show_bug.cgi?id=52400

        This will help simplify a lot of code in code-review.js
        and make side-by-side diffs better (i.e. put removed lines
        to the left of corresponding added lines).

        Also, allow for running the JS from a local file. Now you can modify code-review.js
        to point to a local file and then run:
        ruby prettify.rb < foo.diff > foo.html

        foo.html will load a dummy code review matching foo.diff.

        Before structure:
        Line
        Line remove
        Line add
        Line add
        Line

        After structure:
        DiffBlock
          DiffBlockPart shared
            Line shared
        DiffBlock
          DiffBlockPart remove
            Line remove
          DiffBlockPart add
            Line add
            Line add
        DiffBlock
          DiffBlockPart shared
            Line shared

        * PrettyPatch/PrettyPatch.rb:
        * code-review.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75747 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Websites/bugs.webkit.org/ChangeLog
Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb
Websites/bugs.webkit.org/code-review.js