Closed
Bug 726500
Opened 13 years ago
Closed 12 years ago
'space' on watched event list should watch/unwatch selected event
Categories
(Other Applications :: DOM Inspector, defect)
Other Applications
DOM Inspector
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: surkov, Assigned: foss)
References
Details
(Keywords: access)
Attachments
(1 file, 4 obsolete files)
(deleted),
patch
|
foss
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Reporter | ||
Updated•13 years ago
|
Component: Disability Access APIs → DOM Inspector
Product: Core → Other Applications
QA Contact: accessibility-apis → dom-inspector
Assignee | ||
Comment 1•12 years ago
|
||
Explanations at the code.
I'm sorry if there are any language error. I am not an English speaker, but if any is found, I will fix it.
Thank you for reviewing it.
Attachment #631560 -
Flags: review?(neil)
Assignee | ||
Comment 2•12 years ago
|
||
There were some tabs instead of spaces.
Attachment #631560 -
Attachment is obsolete: true
Attachment #631560 -
Flags: review?(neil)
Attachment #631565 -
Flags: review?(neil)
Comment 3•12 years ago
|
||
Comment on attachment 631565 [details] [diff] [review]
removing tabs from patch
You're duplicating code, which is wrong. Instead, the getCellValue and setCellValue methods of mWatchView already do the right thing. All you need is the right row index and column.
Attachment #631565 -
Flags: review?(neil) → review-
Assignee | ||
Comment 4•12 years ago
|
||
Could you take a look into this new patch, Neil? Thank you.
The function that is called when a key is pressed has been changed to onKeyPressed to make it easier any future related modification.
A problem I found when testing the patch was when only one child event is unwatched and then SPACE key is pressed, it becomes watched -as expected- but the parent doesn't change to watched. At the setCellValue() function, it seems that the only case it should be changed is when parent is checked and child is unchecked. Is this a bug?
Attachment #631565 -
Attachment is obsolete: true
Attachment #631768 -
Flags: review?(neil)
Assignee | ||
Comment 5•12 years ago
|
||
Comment on attachment 631768 [details] [diff] [review]
patch 2
There is a line which is longer that the 80 characters limit.
Attachment #631768 -
Flags: review?(neil)
Assignee | ||
Comment 6•12 years ago
|
||
Line length in attachment 631768 [details] [diff] [review] corrected and removed unnecessary invalidate() call.
Attachment #631768 -
Attachment is obsolete: true
Attachment #631771 -
Flags: review?(neil)
Comment 7•12 years ago
|
||
Comment on attachment 631771 [details] [diff] [review]
patch 3
>+ onKeyPressed: function onKeyPressed(anEvent)
Nobody else calls it anEvent. Please rename it to aEvent. (Same below.)
>+ this.toggleEventWatching = function watchview_toggleEventWatching(anEvent)
[My preference would have been for toggleEventWatched]
>+ var cols = this.mTree.columns;
>+ var colWatch = cols.getColumnFor(document.getElementById("welIsWatched"));
Actually it's a lot easier than that, just use
var colWatched = this.mTree.columns.welIsWatched;
>+ var cws = (!this.getCellValue(idx, colWatch)).toString();
>+
>+ // setCellValue() needs the new value to be passed as a string.
>+ this.setCellValue(idx, colWatch, cws);
I wish there was a better way to write this...
Perhaps renaming "cws" to "newValue" would make the code more readable.
Also move the .toString() to the setCellValue line like this:
var newValue = !this.getCellValue(idx, colWatched);
// setCellValue() needs the new value to be passed as a string.
this.setCellValue(idx, colWatched, newValue.toString());
> onselect="viewer.onWatchViewItemSelected();"
>+ onkeypress="viewer.onKeyPressed(event);"
Maybe "onWatchViewKeyPressed" would be better?
Asking surkov for feedback on my variable renaming suggestions.
Attachment #631771 -
Flags: feedback?(surkov.alexander)
Assignee | ||
Comment 8•12 years ago
|
||
I realized that the event object is in fact not needed in the toggleEventWatched() function, so it is now removed. Waiting for Alexander feedback.
Reporter | ||
Updated•12 years ago
|
Attachment #631771 -
Attachment is patch: true
Reporter | ||
Comment 9•12 years ago
|
||
Comment on attachment 631771 [details] [diff] [review]
patch 3
Review of attachment 631771 [details] [diff] [review]:
-----------------------------------------------------------------
> Asking surkov for feedback on my variable renaming suggestions.
I agree on each suggestion
>>+ onKeyPressed: function onKeyPressed(anEvent)
> Nobody else calls it anEvent. Please rename it to aEvent. (Same below.)
right, because 'a' is not an indefinite article but a first letter of 'argument' I believe
Attachment #631771 -
Flags: feedback?(surkov.alexander) → feedback+
Comment 10•12 years ago
|
||
Comment on attachment 631771 [details] [diff] [review]
patch 3
OK, r=me with my comment #7 changes addressed. Thanks!
Attachment #631771 -
Flags: review?(neil) → review+
Assignee | ||
Comment 11•12 years ago
|
||
I think this is the way to attach a patch when it has been reviewed ok except it needed some changes.
Attachment #631771 -
Attachment is obsolete: true
Attachment #631849 -
Flags: review+
Assignee | ||
Updated•12 years ago
|
Attachment #631849 -
Attachment description: patch 4 → patch 4. reviewed in comment 7
Assignee | ||
Comment 12•12 years ago
|
||
I addressed the problems in comment 7. Furthermore, I removed the unneeded call to invalidate(). This last change wasn't in the reviewed patch 3, if it is ok, could you check-in patch 4, please Neil? Thank you.
Assignee | ||
Updated•12 years ago
|
Keywords: checkin-needed
Comment 13•12 years ago
|
||
(In reply to Javi Rueda from comment #12)
> I addressed the problems in comment 7. Furthermore, I removed the unneeded
> call to invalidate(). This last change wasn't in the reviewed patch 3
Actually patch 3 had already removed the call, so that's OK anyway.
Comment 14•12 years ago
|
||
Pushed dom-inspector changeset 2d993155b488.
Assignee: nobody → leofigueres
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Updated•12 years ago
|
Keywords: checkin-needed → #relman/triage/defer-to-group
Updated•12 years ago
|
Keywords: #relman/triage/defer-to-group
Updated•12 years ago
|
Blocks: DOMi2.0.13
You need to log in
before you can comment on or make changes to this bug.
Description
•