2011-01-20 Ojan Vafai <ojan@chromium.org>
authorojan@chromium.org <ojan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Jan 2011 03:34:27 +0000 (03:34 +0000)
committerojan@chromium.org <ojan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Jan 2011 03:34:27 +0000 (03:34 +0000)
        Fix the review tool for image diffs. We would get a javascript error
        because image diffs don't have line numbers.

        * code-review.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76328 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 ee88f2842222c3145a34b90f8fca1db60c5a1f4b..31270550b63cabb40a86f811fb0b2ac710742d54 100644 (file)
@@ -1,3 +1,10 @@
+2011-01-20  Ojan Vafai  <ojan@chromium.org>
+
+        Fix the review tool for image diffs. We would get a javascript error
+        because image diffs don't have line numbers.
+
+        * code-review.js:
+
 2011-01-20  Ojan Vafai  <ojan@chromium.org>
 
         Reviewed by Oliver Hunt.
 2011-01-20  Ojan Vafai  <ojan@chromium.org>
 
         Reviewed by Oliver Hunt.
index b103819594b949fb652d30910273621e2f2412d8..f113c74fb1391dd798f6f7f4ee401af5189219b0 100644 (file)
@@ -417,7 +417,7 @@ body {
 }
 </style>
 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> 
 }
 </style>
 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> 
-<script src="code-review.js?version=28"></script>
+<script src="code-review.js?version=29"></script>
 EOF
 
     def self.revisionOrDescription(string)
 EOF
 
     def self.revisionOrDescription(string)
index 45b4bc8b9fff914011f80a4694388dd34bee2fe3..79b4975550869ae39cf54a7b4c79d6f7f219339e 100644 (file)
 
   function firstLine(file_diff) {
     var container = $('.LineContainer:not(.context)', file_diff)[0];
 
   function firstLine(file_diff) {
     var container = $('.LineContainer:not(.context)', file_diff)[0];
+    if (!container)
+      return 0;
+
     var from = fromLineNumber(container);
     var to = toLineNumber(container);
     return from || to;
     var from = fromLineNumber(container);
     var to = toLineNumber(container);
     return from || to;