Summary: | [EFL] [DRT] Feeding key events with invalid keyName | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Sudarsana Nagineni (babu) <naginenis> | ||||||
Component: | WebKit EFL | Assignee: | Sudarsana Nagineni (babu) <naginenis> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | gyuyoung.kim, lucas.de.marchi, pnormand, rakuco, tonikitoo, webkit.review.bot | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Sudarsana Nagineni (babu)
2012-04-12 11:13:31 PDT
Created attachment 136942 [details]
Patch
Using CString to keep the keyName valid within scope of KeyEventInfo
Comment on attachment 136942 [details]
Patch
Makes sense, thanks.
Comment on attachment 136942 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=136942&action=review > Tools/DumpRenderTree/efl/EventSender.cpp:437 > const CString cCharacter = character.get()->ustring().utf8(); > const char* keyName = (location == DomKeyLocationNumpad) ? keyPadNameFromJSValue(character.get()) : keyNameFromJSValue(character.get()); > - if (!keyName) > - keyName = cCharacter.data(); > > - return new KeyEventInfo(keyName, modifiers); > + return new KeyEventInfo(keyName ? CString(keyName) : cCharacter, modifiers); Seems like keyPadNameFromJSValue() should return a CString now. That would simplify this code block, I think. (In reply to comment #3) > (From update of attachment 136942 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=136942&action=review > > > Tools/DumpRenderTree/efl/EventSender.cpp:437 > > const CString cCharacter = character.get()->ustring().utf8(); > > const char* keyName = (location == DomKeyLocationNumpad) ? keyPadNameFromJSValue(character.get()) : keyNameFromJSValue(character.get()); > > - if (!keyName) > > - keyName = cCharacter.data(); > > > > - return new KeyEventInfo(keyName, modifiers); > > + return new KeyEventInfo(keyName ? CString(keyName) : cCharacter, modifiers); > > Seems like keyPadNameFromJSValue() should return a CString now. That would simplify this code block, I think. Thanks for your review Philippe. Yes, it simplifies the code. I will update the patch. Created attachment 137335 [details] Patch fixed review comment #3. Comment on attachment 137335 [details] Patch Clearing flags on attachment: 137335 Committed r114250: <http://trac.webkit.org/changeset/114250> All reviewed patches have been landed. Closing bug. |