2011-01-20 Ojan Vafai <ojan@chromium.org>
authorojan@chromium.org <ojan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Jan 2011 20:32:22 +0000 (20:32 +0000)
committerojan@chromium.org <ojan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Jan 2011 20:32:22 +0000 (20:32 +0000)
        Reviewed by Adam Barth.

        fix goofup in http://trac.webkit.org/changeset/76082
        https://bugs.webkit.org/show_bug.cgi?id=52830

        We were showing the revision number of the patch at the bottom
        of the diff and expanding from the bottom of the diff would fail.

        Also, removed an unused variable and scoped queries appropriatly
        to the file_diff they should have been operating on.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76271 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Websites/bugs.webkit.org/ChangeLog
Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb
Websites/bugs.webkit.org/code-review.js

index 8d3e4733b77c8b275c2879b306f6a21a0580a1ef..5eb210a55b609b8c1888e7735327fb76efa63170 100644 (file)
@@ -1,3 +1,19 @@
+2011-01-20  Ojan Vafai  <ojan@chromium.org>
+
+        Reviewed by Adam Barth.
+
+        fix goofup in http://trac.webkit.org/changeset/76082
+        https://bugs.webkit.org/show_bug.cgi?id=52830
+
+        We were showing the revision number of the patch at the bottom
+        of the diff and expanding from the bottom of the diff would fail.
+
+        Also, removed an unused variable and scoped queries appropriatly
+        to the file_diff they should have been operating on.
+
+        * PrettyPatch/PrettyPatch.rb:
+        * code-review.js:
+
 2011-01-19  Ojan Vafai  <ojan@chromium.org>
 
         Reviewed by Adam Barth.
index 61774b290349701a1faf8443378c63af3f077f94..16935bb2e00ee4fa9d2309b09b314aba3e6f8280 100644 (file)
@@ -408,12 +408,16 @@ body {
   top: -11%;
 }
 
+.revision {
+  display: none;
+}
+
 .clear_float {
     clear: both;
 }
 </style>
 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> 
-<script src="code-review.js?version=25"></script>
+<script src="code-review.js?version=26"></script>
 EOF
 
     def self.revisionOrDescription(string)
index 8e85d3f5759f45d946244bebcd133c40ab2a069e..10b522c7ab6283791813501e2d94e78d60774de2 100644 (file)
 
     var expand_bar_index = 0;
     if (!$(first_line).hasClass('add') && !$(first_line).hasClass('remove'))
-      $('h1', file_diff).after(expandBarHtml(file_name, BELOW))
+      $('h1', file_diff).after(expandBarHtml(BELOW))
 
-    $('br').replaceWith(expandBarHtml(file_name));
+    $('br', file_diff).replaceWith(expandBarHtml());
 
     var last_line = file_diff.querySelector('.LineContainer:last-of-type');
     // Some patches for new files somehow end up with an empty context line at the end
     // with a from line number of 0. Don't show expand links in that case either.
     if (!$(last_line).hasClass('add') && !$(last_line).hasClass('remove') && fromLineNumber(last_line) != 0)
-      $(file_diff).append(expandBarHtml(file_name, ABOVE));
+      $('.revision', file_diff).before(expandBarHtml(ABOVE));
   }
 
-  function expandBarHtml(file_name, opt_direction) {
+  function expandBarHtml(opt_direction) {
     var html = '<div class="ExpandBar">' +
         '<div class="ExpandArea Expand' + ABOVE + '"></div>' +
         '<div class="ExpandLinkContainer LinkContainer"><span class="ExpandText">expand: </span>';