Open
Bug 722264
Opened 14 years ago
Updated 3 years ago
libeditor: Use EventUtils sendChar() and sendKey(), instead of calling synthesizeKey() directly
Categories
(Core :: DOM: Editor, defect)
Core
DOM: Editor
Tracking
()
NEW
mozilla13
People
(Reporter: karun.84, Unassigned)
References
()
Details
Attachments
(1 file, 2 obsolete files)
|
20.83 KB,
patch
|
ehsan.akhgari
:
review+
sgautherie
:
feedback+
|
Details | Diff | Splinter Review |
sendChar() and sendKey() are higher level functions. SynthesiseKey should be replaced with these. Referencing Bug 720087.
| Reporter | ||
Updated•14 years ago
|
Assignee: nobody → karun.84
Updated•14 years ago
|
Version: unspecified → Trunk
Updated•14 years ago
|
Status: NEW → ASSIGNED
| Reporter | ||
Comment 1•14 years ago
|
||
This patch replaces synthesiseKey in libeditor with sendChar and sendKey, except for cases where synthesisKey is needed.
| Reporter | ||
Comment 2•14 years ago
|
||
Comment on attachment 594498 [details] [diff] [review]
Patch for this bug to replace synthesizeKey with sendKey and sendChar
For review. I am not sure who should review this bug.
Attachment #594498 -
Flags: review?
Comment 3•14 years ago
|
||
Comment on attachment 594498 [details] [diff] [review]
Patch for this bug to replace synthesizeKey with sendKey and sendChar
Review of attachment 594498 [details] [diff] [review]:
-----------------------------------------------------------------
All good. Just use sendString() too.
::: editor/libeditor/html/tests/test_bug484181.html
@@ +55,1 @@
> }
for() + sendChar() -> sendString()
::: editor/libeditor/html/tests/test_bug551704.html
@@ +62,5 @@
> }
>
> function typeBCDEF_chars() {
> + sendChar("b");
> + sendChar("c");
multiple sendChar() -> sendString()
@@ +66,5 @@
> + sendChar("c");
> + sendKey("ENTER");
> + sendChar("d");
> + sendChar("e");
> + sendChar("f");
multiple sendChar() -> sendString()
::: editor/libeditor/html/tests/test_contenteditable_text_input_handling.html
@@ +125,5 @@
>
> if (aFocus && aFocus._isFocusable) {
> + sendChar("A");
> + sendChar("B");
> + sendChar("C");
multiple sendChar() -> sendString()
Attachment #594498 -
Flags: review? → feedback+
Comment 4•14 years ago
|
||
I'd be happy to review your patch when you address Serge's comments.
| Reporter | ||
Comment 5•14 years ago
|
||
I have replaced multiple sequential uses of sendChar with sendString in this version of the patch.
Attachment #594498 -
Attachment is obsolete: true
| Reporter | ||
Updated•14 years ago
|
Attachment #596376 -
Flags: review?(ehsan)
Comment 6•14 years ago
|
||
Comment on attachment 596376 [details] [diff] [review]
Patch for this bug to replace synthesizeKey with sendKey and sendChar, and sendString
Review of attachment 596376 [details] [diff] [review]:
-----------------------------------------------------------------
::: editor/libeditor/html/tests/test_bug484181.html
@@ +50,5 @@
> sel.selectAllChildren(edit);
> sel.collapseToEnd();
>
> for (var i = 0; i < str.length; ++i) {
> + sendChar(str[i]);
You missed to use sendSring() here.
::: editor/libeditor/html/tests/test_bug592592.html
@@ +30,5 @@
> window.getSelection().collapse(ed.firstChild, 1);
>
> // Press space
> + sendChar(" ");
> + //sendKey("SPACE");
Don't add this extra commented out code.
Attachment #596376 -
Flags: review?(ehsan)
| Reporter | ||
Comment 7•14 years ago
|
||
I have fixed the problems that was raised in this patch.
Attachment #596376 -
Attachment is obsolete: true
Attachment #602597 -
Flags: review?
Updated•14 years ago
|
Attachment #602597 -
Flags: review?(ehsan)
Attachment #602597 -
Flags: review?
Attachment #602597 -
Flags: feedback+
Comment 8•14 years ago
|
||
Comment on attachment 602597 [details] [diff] [review]
Patch for this bug to replace synthesizeKey with sendKey and sendChar, and sendString
NB: This patch misses test_bug514156.html for example. But it is a good first part nonetheless.
| Reporter | ||
Comment 9•14 years ago
|
||
(In reply to Serge Gautherie (:sgautherie) from comment #8)
> Comment on attachment 602597 [details] [diff] [review]
>
> NB: This patch misses test_bug514156.html for example. But it is a good
> first part nonetheless.
Yes, this is missed as when I change it to sendKey and sendChar the tests for this file fails, and it appears that this file maybe dependent on synthesiseKey, but I have not yet determined why.
Updated•14 years ago
|
Attachment #602597 -
Flags: review?(ehsan) → review+
Comment 10•14 years ago
|
||
Thanks for your patch, Karun! Have you tested this on the try server? If yes, then please mark the patch as checkin?.
Updated•14 years ago
|
Whiteboard: [autoland-try: -u mochitests]
Target Milestone: --- → mozilla13
Updated•14 years ago
|
Whiteboard: [autoland-try: -u mochitests] → [autoland-try: -u mochitest-3,mochitest-o]
Updated•14 years ago
|
Whiteboard: [autoland-try: -u mochitest-3,mochitest-o] → [autoland-in-queue]
Comment 11•14 years ago
|
||
Autoland Patchset:
Patches: 602597
Branch: mozilla-central => try
Patch 602597 could not be applied to mozilla-central.
abort: bad hunk #1 @@ -25,45 +25,46 @@ SimpleTest.waitForExplicitFinish();
(46 45 46 46)
Patchset could not be applied and pushed.
Updated•14 years ago
|
Whiteboard: [autoland-in-queue]
| Reporter | ||
Updated•14 years ago
|
Assignee: karun.84 → nobody
Comment 13•7 years ago
|
||
No assignee, updating the status.
Updated•3 years ago
|
Severity: minor → S4
You need to log in
before you can comment on or make changes to this bug.
Description
•