Bug 53554 - make draft comments focusable
Summary: make draft comments focusable
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Ojan Vafai
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-01 16:54 PST by Ojan Vafai
Modified: 2011-02-01 22:03 PST (History)
1 user (show)

See Also:


Attachments
Patch (3.26 KB, patch)
2011-02-01 16:55 PST, Ojan Vafai
abarth: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ojan Vafai 2011-02-01 16:54:26 PST
make draft comments focusable
Comment 1 Ojan Vafai 2011-02-01 16:55:57 PST
Created attachment 80856 [details]
Patch
Comment 2 Adam Barth 2011-02-01 21:30:05 PST
Comment on attachment 80856 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=80856&action=review

This is fine, but consider the comments below.  BTW, I love j/k.  :)

> Websites/bugs.webkit.org/code-review.js:1280
> -      if (node.hasClass(className)) {
> +      if (focus_type == FOCUS_TYPE.COMMENT && (node.hasClass('frozenComment') || node.hasClass('previousComment')) ||
> +          focus_type == FOCUS_TYPE.DIFF_BLOCK && node.hasClass('DiffBlock')) {

I'd just pass in a function that you call at this branch.  That stops this code from having to know about all the different types.
Comment 3 Ojan Vafai 2011-02-01 22:00:34 PST
Committed r77363: <http://trac.webkit.org/changeset/77363>
Comment 4 Ojan Vafai 2011-02-01 22:03:17 PST
Comment on attachment 80856 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=80856&action=review

>> Websites/bugs.webkit.org/code-review.js:1280
>> +          focus_type == FOCUS_TYPE.DIFF_BLOCK && node.hasClass('DiffBlock')) {
> 
> I'd just pass in a function that you call at this branch.  That stops this code from having to know about all the different types.

Done. That's much better.