Closed
Bug 721512
Opened 12 years ago
Closed 12 years ago
Widgets: Use EventUtils sendChar() and sendKey(), instead of calling synthesizeKey() directly
Categories
(Toolkit :: UI Widgets, defect)
Toolkit
UI Widgets
Tracking
()
RESOLVED
FIXED
mozilla19
People
(Reporter: karun.84, Assigned: marioalv)
References
()
Details
Attachments
(1 file, 1 obsolete file)
45.38 KB,
patch
|
enndeakin
:
review+
|
Details | Diff | Splinter Review |
Referencing bug Bug 720087, Use EventUtils sendChar() and sendKey(), instead of calling synthesizeKey() directly.
Reporter | ||
Updated•12 years ago
|
Summary: Use EventUtils sendChar() and sendKey(), instead of calling synthesizeKey() directly → Widgets: Use EventUtils sendChar() and sendKey(), instead of calling synthesizeKey() directly
Updated•12 years ago
|
Assignee: nobody → karun.84
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Version: unspecified → Trunk
Reporter | ||
Updated•12 years ago
|
Assignee: karun.84 → nobody
Updated•12 years ago
|
Status: ASSIGNED → NEW
Updated•12 years ago
|
Assignee: nobody → marioalv.mozilla
Assignee | ||
Comment 1•12 years ago
|
||
Hi everyone. I'm going to work on this bug. I've been checking the code to be changed and spotted some replacement scenarios. Also, I noticed that the function EventUtils.sendKey used in bugs related to this one takes only two parameters. I'm using this bug as an example: https://bugzilla.mozilla.org/show_bug.cgi?id=721495 Here's the patch: https://bugzilla.mozilla.org/attachment.cgi?id=591941&action=diff Where is this EventUtils.sendKey definition? Is it this one? http://mxr.mozilla.org/mozilla-central/source/testing/mochitest/tests/SimpleTest/EventUtils.js#116 These are the replacement scenarios, according to the examples: 1. { synthesizeKey("VK_DOWN", { }); }, converts to: { sendKey("DOWN"); }, 2. synthesizeKey("VK_RETURN", { }, win); converts to: { sendKey("RETURN", win); }, 3. { synthesizeKey("V", { altKey: true }); }, converts to? I suppose the function stays the same. 4. { synthesizeKey("V", { altKey: true }, win); }, converts to? I suppose the function stays the same. I was curious about why we are using that function definition with two parameters, which will prevent us to change scenarios 3 and 4. Thanks.
Assignee | ||
Comment 2•12 years ago
|
||
This is my first approach to solve this bug. I changed the calls to synthesizeKey() for calls to sendKey() and sendChar() where possible. Please let me know if some corrections need to be made. Thanks.
Attachment #665621 -
Flags: review?(sgautherie.bz)
Comment 3•12 years ago
|
||
Hi! I don't think Serge isn't a toolkit peer. This page has a list of toolkit peers you could use: https://wiki.mozilla.org/Modules/Toolkit
Assignee | ||
Updated•12 years ago
|
Attachment #665621 -
Flags: review?(sgautherie.bz) → review?(dao)
Updated•12 years ago
|
Attachment #665621 -
Flags: review?(dao) → review?(enndeakin)
Comment 4•12 years ago
|
||
> + test: function() { sendChar("H");; },
This line has two semicolons. Remove one of them.
In all the cases where sendChar is called, you should call it with the lowercase letter for the key. For example use sendChar("h") which sends the 'h' key instead of sendChar("H") which sends shift+h and could have otherwise lead to subtly differently behaviour.
Assignee | ||
Comment 5•12 years ago
|
||
Hi. Thanks for your review. I've made the changes you suggested. Please let me know if I need to change something else. Thanks.
Attachment #665621 -
Attachment is obsolete: true
Attachment #665621 -
Flags: review?(enndeakin)
Attachment #672345 -
Flags: review?(enndeakin)
Updated•12 years ago
|
Attachment #672345 -
Flags: review?(enndeakin) → review+
Comment 6•12 years ago
|
||
Pushed to try: https://tbpl.mozilla.org/?tree=Try&rev=0cfbf095c737
Assignee | ||
Comment 7•12 years ago
|
||
All try tests passed: https://tbpl.mozilla.org/?tree=Try&rev=0cfbf095c737 .
Keywords: checkin-needed
Comment 8•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/ab8ef7a28e2e
Flags: in-testsuite+
Keywords: checkin-needed
Comment 9•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/ab8ef7a28e2e
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
You need to log in
before you can comment on or make changes to this bug.
Description
•