RESOLVED FIXED 84710
[EFL] [DRT] EventSender doesn't provide correct key string
https://bugs.webkit.org/show_bug.cgi?id=84710
Summary [EFL] [DRT] EventSender doesn't provide correct key string
Sudarsana Nagineni (babu)
Reported 2012-04-24 05:16:32 PDT
EventSender doesn't provide correct key string for special keys(e.g. function keys/arrow keys/space)
Attachments
patch (4.75 KB, patch)
2012-04-29 18:55 PDT, Kangil Han
no flags
patch (5.21 KB, patch)
2012-04-29 23:52 PDT, Kangil Han
no flags
patch (6.80 KB, patch)
2012-04-30 05:05 PDT, Kangil Han
no flags
Patch (7.24 KB, patch)
2012-05-08 18:57 PDT, Kangil Han
no flags
Patch (7.24 KB, patch)
2012-05-08 19:16 PDT, Kangil Han
no flags
Patch (10.05 KB, patch)
2012-05-14 02:04 PDT, Kangil Han
no flags
Kangil Han
Comment 1 2012-04-29 18:55:15 PDT
Gyuyoung Kim
Comment 2 2012-04-29 23:29:16 PDT
Comment on attachment 139411 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=139411&action=review > LayoutTests/ChangeLog:8 > + Non-visible key string, i.e. right arrow key, shouldn't be displayed on the input field. I don't understand what is problem in this description. > Tools/DumpRenderTree/efl/EventSender.cpp:107 > + KeyEventInfo(const CString& keyName, EvasKeyModifier modifiers, Eina_Bool hasVisibleString) Please do not use Eina_Bool. > Tools/DumpRenderTree/efl/EventSender.cpp:116 > + Eina_Bool hasVisibleString; We decided to use standard boolean instead of Eina_Bool except for public APIs. > Tools/DumpRenderTree/efl/EventSender.cpp:447 > + return new KeyEventInfo(character.get()->ustring().utf8(), modifiers, EINA_TRUE); Use true instead of EINA_TRUE. > Tools/DumpRenderTree/efl/EventSender.cpp:449 > + return new KeyEventInfo(keyName, modifiers, EINA_FALSE); ditto.
Kangil Han
Comment 3 2012-04-29 23:52:44 PDT
Kangil Han
Comment 4 2012-04-29 23:54:19 PDT
Thanks for reviewing! I've fixed all mentioned parts.
Kangil Han
Comment 5 2012-04-30 05:05:22 PDT
Sudarsana Nagineni (babu)
Comment 6 2012-05-02 06:31:49 PDT
Comment on attachment 139431 [details] patch Could you please rebase and upload this?
Kangil Han
Comment 7 2012-05-02 06:41:57 PDT
Yes, I will as soon as BUG 78559 is landed. ;)
Kangil Han
Comment 8 2012-05-08 18:57:13 PDT
Kangil Han
Comment 9 2012-05-08 18:58:52 PDT
Rebase done. :)
Kangil Han
Comment 10 2012-05-08 19:16:32 PDT
Kangil Han
Comment 11 2012-05-08 19:17:49 PDT
Rebase again since chromium-ews complained about device space. :)
Kangil Han
Comment 12 2012-05-08 23:38:36 PDT
gyuyoung, rakuco : Could I please get informal review on this patch? Thanks!
Gyuyoung Kim
Comment 13 2012-05-08 23:57:44 PDT
Comment on attachment 140851 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=140851&action=review > Tools/DumpRenderTree/efl/EventSender.cpp:387 > + return CString(); Hmm, why do you return CString() instead of character->ustring().utf8()? It looks we need to return character itself when character is not supported by this function. > Tools/DumpRenderTree/efl/EventSender.cpp:451 > + return CString(); ditto.
Kangil Han
Comment 14 2012-05-09 00:31:47 PDT
In this case, blank string indicates pressed key is not a character. So 'character->ustring().utf8()' is happened when creating KeyEventInfo. (In reply to comment #13) > (From update of attachment 140851 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=140851&action=review > > > Tools/DumpRenderTree/efl/EventSender.cpp:387 > > + return CString(); > > Hmm, why do you return CString() instead of character->ustring().utf8()? It looks we need to return character itself when character is not supported by this function. > > > Tools/DumpRenderTree/efl/EventSender.cpp:451 > > + return CString(); > > ditto.
Kangil Han
Comment 15 2012-05-10 06:21:57 PDT
gyuyoung : Any more comment(s)?
Raphael Kubo da Costa (:rakuco)
Comment 16 2012-05-12 19:52:15 PDT
Comment on attachment 140851 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=140851&action=review > Source/WebCore/ChangeLog:14 > + (WebCore::singleCharacterString): Please mention what is being changed and why here. > Tools/DumpRenderTree/efl/EventSender.cpp:481 > + if (keyName.isNull()) > + return new KeyEventInfo(character.get()->ustring().utf8(), modifiers, true); > + if (keyName == "Return" || keyName == "Tab" || keyName == "BackSpace" || keyName == "space") > + return new KeyEventInfo(keyName, modifiers, true); > + > + return new KeyEventInfo(keyName, modifiers, false); This change of logic here is very confusing, it took me a while to figure out what the code was supposed to do. The code should be more explicit in what it does. My suggestion: add another CString member, `keyString' (or something better) to KeyEventInfo which is then passed as the 4th parameter to evas_event_feed_key_{down,up} so you don't need to put additional meaning into keyName itself. You can even make keyPadNameFromJSValue and keyNameFromJSValue return a KeyEventInfo themselves if that makes the code more simple.
Kangil Han
Comment 17 2012-05-14 02:04:45 PDT
Kangil Han
Comment 18 2012-05-14 02:08:04 PDT
(In reply to comment #16) > (From update of attachment 140851 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=140851&action=review > > > Source/WebCore/ChangeLog:14 > > + (WebCore::singleCharacterString): > > Please mention what is being changed and why here. > > > Tools/DumpRenderTree/efl/EventSender.cpp:481 > > + if (keyName.isNull()) > > + return new KeyEventInfo(character.get()->ustring().utf8(), modifiers, true); > > + if (keyName == "Return" || keyName == "Tab" || keyName == "BackSpace" || keyName == "space") > > + return new KeyEventInfo(keyName, modifiers, true); > > + > > + return new KeyEventInfo(keyName, modifiers, false); > > This change of logic here is very confusing, it took me a while to figure out what the code was supposed to do. The code should be more explicit in what it does. > > My suggestion: add another CString member, `keyString' (or something better) to KeyEventInfo which is then passed as the 4th parameter to evas_event_feed_key_{down,up} so you don't need to put additional meaning into keyName itself. You can even make keyPadNameFromJSValue and keyNameFromJSValue return a KeyEventInfo themselves if that makes the code more simple. Good suggestion rakuco! Thanks! Please review my latest patch if I've got your idea. :)
Kangil Han
Comment 19 2012-05-15 07:12:55 PDT
rakuco: Could I please get your review?
Raphael Kubo da Costa (:rakuco)
Comment 20 2012-05-15 07:29:32 PDT
Comment on attachment 141667 [details] Patch Looks good now, thank you. If it does not cause any regression in other tests, informal r+.
WebKit Review Bot
Comment 21 2012-05-15 22:05:45 PDT
Comment on attachment 141667 [details] Patch Clearing flags on attachment: 141667 Committed r117218: <http://trac.webkit.org/changeset/117218>
WebKit Review Bot
Comment 22 2012-05-15 22:05:50 PDT
All reviewed patches have been landed. Closing bug.
Dominik Röttsches (drott)
Comment 23 2012-05-16 01:07:28 PDT
There was another bug marked as blocked by this issue in test_expectations.txt // EventSender doesn't provide correct key string BUGWK84710 : fast/forms/textarea-type-spaces.html = TEXT resulting in an unexpected pass. I am removing that line from test_expectations.txt in gardening bug 86584.
Kangil Han
Comment 24 2012-05-16 01:24:00 PDT
drott: Thanks!
Note You need to log in before you can comment on or make changes to this bug.