[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198
ojan at chromium.org
ojan at chromium.org
Mon Feb 21 00:37:01 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit 57ed9ed60c5918bdb08bba87be45fbc02989849a
Author: ojan at chromium.org <ojan at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Feb 2 06:00:17 2011 +0000
2011-02-01 Ojan Vafai <ojan at chromium.org>
Reviewed by Adam Barth.
make draft comments focusable
https://bugs.webkit.org/show_bug.cgi?id=53554
Makes frozen draft comments focusable. The ones that are currently being edited are not.
I'm on the fence whether they should be, but this seems good enough for now.
* code-review.js:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77363 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Websites/bugs.webkit.org/ChangeLog b/Websites/bugs.webkit.org/ChangeLog
index 6dc492f..f40eea6 100644
--- a/Websites/bugs.webkit.org/ChangeLog
+++ b/Websites/bugs.webkit.org/ChangeLog
@@ -2,6 +2,18 @@
Reviewed by Adam Barth.
+ make draft comments focusable
+ https://bugs.webkit.org/show_bug.cgi?id=53554
+
+ Makes frozen draft comments focusable. The ones that are currently being edited are not.
+ I'm on the fence whether they should be, but this seems good enough for now.
+
+ * code-review.js:
+
+2011-02-01 Ojan Vafai <ojan at chromium.org>
+
+ Reviewed by Adam Barth.
+
avoid jitter when loading the comments to a patch
https://bugs.webkit.org/show_bug.cgi?id=53570
diff --git a/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb b/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb
index ba10936..6ac98d2 100644
--- a/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb
+++ b/Websites/bugs.webkit.org/PrettyPatch/PrettyPatch.rb
@@ -417,7 +417,7 @@ body {
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
-<script src="code-review.js?version=32"></script>
+<script src="code-review.js?version=33"></script>
EOF
def self.revisionOrDescription(string)
diff --git a/Websites/bugs.webkit.org/code-review.js b/Websites/bugs.webkit.org/code-review.js
index f5f4b44..acbcc48 100644
--- a/Websites/bugs.webkit.org/code-review.js
+++ b/Websites/bugs.webkit.org/code-review.js
@@ -1259,11 +1259,12 @@ var CODE_REVIEW_UNITTEST;
$(document).scrollTop(node.addClass('focused').position().top - window.innerHeight / 2);
}
- function focusNext(className, is_backward) {
- var focusable_nodes = $('.previousComment,.DiffBlock').filter(function() {
- return ($(this).hasClass('previousComment') || $('.add,.remove', this).size());
+ function focusNext(filter, direction) {
+ var focusable_nodes = $('.frozenComment,.previousComment,.DiffBlock').filter(function() {
+ return ($(this).hasClass('frozenComment') || $(this).hasClass('previousComment') || $('.add,.remove', this).size());
});
+ var is_backward = direction == DIRECTION.BACKWARD;
var index = focusable_nodes.index($('.focused'));
if (index == -1 && is_backward)
index = focusable_nodes.length;
@@ -1272,18 +1273,28 @@ var CODE_REVIEW_UNITTEST;
var end = is_backward ? -1 : focusable_nodes.size();
for (var i = index + offset; i != end; i = i + offset) {
var node = $(focusable_nodes[i]);
- if (node.hasClass(className)) {
+ if (filter(node)) {
focusOn(node);
return;
}
}
}
+ var DIRECTION = {FORWARD: 1, BACKWARD: 2};
+
var kCharCodeForN = 'n'.charCodeAt(0);
var kCharCodeForP = 'p'.charCodeAt(0);
var kCharCodeForJ = 'j'.charCodeAt(0);
var kCharCodeForK = 'k'.charCodeAt(0);
+ function isComment(node) {
+ return node.hasClass('frozenComment') || node.hasClass('previousComment');
+ }
+
+ function isDiffBlock(node) {
+ return node.hasClass('DiffBlock');
+ }
+
$('body').live('keypress', function() {
// FIXME: There's got to be a better way to avoid seeing these keypress
// events.
@@ -1292,19 +1303,19 @@ var CODE_REVIEW_UNITTEST;
switch (event.charCode) {
case kCharCodeForN:
- focusNext('previousComment', false);
+ focusNext(isComment, DIRECTION.FORWARD);
break;
case kCharCodeForP:
- focusNext('previousComment', true);
+ focusNext(isComment, DIRECTION.BACKWARD);
break;
case kCharCodeForJ:
- focusNext('DiffBlock', false);
+ focusNext(isDiffBlock, DIRECTION.FORWARD);
break;
case kCharCodeForK:
- focusNext('DiffBlock', true);
+ focusNext(isDiffBlock, DIRECTION.BACKWARD);
break;
}
});
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list