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)
commit7d48e7451aa7f9533726878d6d172def738a0b5d
tree9f16740e6c4e54055fd706f2a16c60fad8eabc49
parent6ca8641921547f5b0f61e013ecce419d99b2aa49
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: https://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