[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

abarth at webkit.org abarth at webkit.org
Wed Dec 22 13:04:21 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit cbecfb3b1042adfc6c88a545fe3c94058cd151ea
Author: abarth at webkit.org <abarth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Sep 6 17:19:48 2010 +0000

    2010-09-06  Adam Barth  <abarth at webkit.org>
    
            [reviewtool] Tweak the ok button to cancel the comment if the comment
            is empty.  Previously we would get into a bad state where a line had a
            comment but there was no longer any way to access it.
    
            * code-review.js:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66838 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/BugsSite/ChangeLog b/BugsSite/ChangeLog
index a7d5323..ea56be1 100644
--- a/BugsSite/ChangeLog
+++ b/BugsSite/ChangeLog
@@ -1,5 +1,13 @@
 2010-09-06  Adam Barth  <abarth at webkit.org>
 
+        [reviewtool] Tweak the ok button to cancel the comment if the comment
+        is empty.  Previously we would get into a bad state where a line had a
+        comment but there was no longer any way to access it.
+
+        * code-review.js:
+
+2010-09-06  Adam Barth  <abarth at webkit.org>
+
         Reviewed by Eric Seidel.
 
         [reviewtool] Add an "ok" button that collapses review comments
diff --git a/BugsSite/code-review.js b/BugsSite/code-review.js
index d0a8ca5..b94382f 100644
--- a/BugsSite/code-review.js
+++ b/BugsSite/code-review.js
@@ -184,16 +184,22 @@
     $(document.body).prepend('<div id="comment_form" class="inactive"><div class="winter"></div><div class="lightbox"><iframe src="attachment.cgi?id=' + attachment_id + '&action=reviewform"></iframe></div></div>');
   });
 
-  $('.comment .cancel').live('click', function() {
+  function cancelComment() {
     var line_id = $(this).parentsUntil('.comment').parent().find('textarea').attr('data-comment-for');
     var line = $('#' + line_id)
     findCommentBlockFor(line).remove();
     line.removeAttr('data-has-comment');
     trimCommentContextToBefore(line);
-  });
+  }
+
+  $('.comment .cancel').live('click', cancelComment);
 
   $('.comment .ok').live('click', function() {
     var comment_textarea = $(this).parentsUntil('.comment').parent().find('textarea');
+    if (comment_textarea.val().trim() == '') {
+      cancelComment.call(this);
+      return;
+    }
     var line_id = comment_textarea.attr('data-comment-for');
     var line = $('#' + line_id)
     findCommentBlockFor(line).hide().after($('<div class="frozen-comment"></div>').text(comment_textarea.val()));

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list