Summary: | [EFL] [DRT] keyboard-related tests do not pass | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Mikhail Pozdnyakov <mikhail.pozdnyakov> | ||||||||
Component: | WebKit EFL | Assignee: | Mikhail Pozdnyakov <mikhail.pozdnyakov> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | gyuyoung.kim, gyuyoung.kim, lucas.de.marchi, rakuco, webkit.review.bot | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Bug Depends on: | 84710, 85479, 85485, 85503, 86836, 86837, 86838 | ||||||||||
Bug Blocks: | |||||||||||
Attachments: |
|
Description
Mikhail Pozdnyakov
2012-05-02 06:11:28 PDT
Created attachment 142660 [details]
patch
Fixes the left testcases from the list.
Comment on attachment 142660 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=142660&action=review > LayoutTests/ChangeLog:3 > + [EFL] PlatformKeyboardEventEfl implementation fix This patch implements new functionality, fix potential bug and refactoring code. Please do not mix multiple patches into a patch. > Source/WebCore/platform/efl/EflKeyboardUtilities.cpp:228 > + return "\x1b"; To be consistent with other condition, let's use String(""). > Source/WebKit/efl/WebCoreSupport/EditorClientEfl.cpp:444 > + // From GTK. Don't allow text insertion for nodes that cannot edit. It looks this condition is clear. So, it seems to me "From GTK" is not needed. (In reply to comment #2) > (From update of attachment 142660 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=142660&action=review > > > LayoutTests/ChangeLog:3 > > + [EFL] PlatformKeyboardEventEfl implementation fix > > This patch implements new functionality, fix potential bug and refactoring code. Please do not mix multiple patches into a patch. Thanks for review. Splitting it.. Created attachment 143483 [details]
patch v2 (drt changes)
Comment on attachment 143483 [details] patch v2 (drt changes) View in context: https://bugs.webkit.org/attachment.cgi?id=143483&action=review > Tools/DumpRenderTree/efl/EventSender.cpp:455 > + modifiers |= EvasKeyModifierShift; As we discussed on irc, I think we need to know why shift should be adjust into modifiers before landing this patch. (In reply to comment #5) > (From update of attachment 143483 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=143483&action=review > > > Tools/DumpRenderTree/efl/EventSender.cpp:455 > > + modifiers |= EvasKeyModifierShift; > > As we discussed on irc, I think we need to know why shift should be adjust into modifiers before landing this patch. Probable reason is that VK_ codes do not distinguish between lows and caps, and having of SHIFT modifier is the only way to understand the case Comment on attachment 143483 [details] patch v2 (drt changes) View in context: https://bugs.webkit.org/attachment.cgi?id=143483&action=review > Tools/DumpRenderTree/efl/EventSender.cpp:454 > + if ((character->length() == 1 ) && ('A' <= charCode && charCode <= 'Z')) I'm not sure if this is webkit style, personally, I would prefer operand to operator in comparison condition. For example, (charCode >= 'A' && charCode <= 'Z') >>> Tools/DumpRenderTree/efl/EventSender.cpp:455 >>> + modifiers |= EvasKeyModifierShift; >> >> As we discussed on irc, I think we need to know why shift should be adjust into modifiers before landing this patch. > > Probable reason is that VK_ codes do not distinguish between lows and caps, and having of SHIFT modifier is the only way to understand the case If Virtual key codes only can distinguish them, I'm ok. But, in my opinion, it is good to add comment for this to here. (In reply to comment #7) >> If Virtual key codes only can distinguish them Oops, wrong typing. If virtual key codes only can distinguish between lows and caps when there is shift modifier in modifier, I'm ok. (In reply to comment #8) > (In reply to comment #7) > > >> If Virtual key codes only can distinguish them > Oops, wrong typing. > > If virtual key codes only can distinguish between lows and caps when there is shift modifier in modifier, I'm ok. Here is the actual reason described: From d15ea3fef52046f49dbca9a8f7633799255c7750 Mon Sep 17 00:00:00 2001 From: "darin@apple.com" <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc> Date: Thu, 29 Nov 2007 00:43:14 +0000 Subject: [PATCH] Reviewed by Adam Roben. * DumpRenderTree/mac/EventSendingController.mm: (-[EventSendingController keyDown:withModifiers:]): Send capital letters through as lowercase letters with the shift key down rather than sending them as if they were highly unusual "capital letter keys". (In reply to comment #7) > > Tools/DumpRenderTree/efl/EventSender.cpp:454 > > + if ((character->length() == 1 ) && ('A' <= charCode && charCode <= 'Z')) > > I'm not sure if this is webkit style, personally, I would prefer operand to operator in comparison condition. For example, > (charCode >= 'A' && charCode <= 'Z') Any opinions ? Comment on attachment 143483 [details] patch v2 (drt changes) View in context: https://bugs.webkit.org/attachment.cgi?id=143483&action=review > Tools/DumpRenderTree/efl/EventSender.cpp:442 > - int charCode = JSStringGetCharactersPtr(character)[0]; > + const char charCode = JSStringGetCharactersPtr(character)[0]; Why change this? >> Tools/DumpRenderTree/efl/EventSender.cpp:454 >> + if ((character->length() == 1 ) && ('A' <= charCode && charCode <= 'Z')) > > I'm not sure if this is webkit style, personally, I would prefer operand to operator in comparison condition. For example, > (charCode >= 'A' && charCode <= 'Z') I second Gyuyoung's comment, and there's also an extra space after "1". >>>> Tools/DumpRenderTree/efl/EventSender.cpp:455 >>>> + modifiers |= EvasKeyModifierShift; >>> >>> As we discussed on irc, I think we need to know why shift should be adjust into modifiers before landing this patch. >> >> Probable reason is that VK_ codes do not distinguish between lows and caps, and having of SHIFT modifier is the only way to understand the case > > If Virtual key codes only can distinguish them, I'm ok. But, in my opinion, it is good to add comment for this to here. Adding a comment would be good for future reference. (In reply to comment #11) > (From update of attachment 143483 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=143483&action=review > > > Tools/DumpRenderTree/efl/EventSender.cpp:442 > > - int charCode = JSStringGetCharactersPtr(character)[0]; > > + const char charCode = JSStringGetCharactersPtr(character)[0]; > > Why change this? Did it to avoid unnecessary conversions each time we compare 'charCode' with a symbol. Will remove it from the patch as it is not related to actual fix of DRT. Created attachment 143814 [details]
patch v3 (fixed review comments)
(In reply to comment #10) > (In reply to comment #7) > > > Tools/DumpRenderTree/efl/EventSender.cpp:454 > > > + if ((character->length() == 1 ) && ('A' <= charCode && charCode <= 'Z')) > > > > I'm not sure if this is webkit style, personally, I would prefer operand to operator in comparison condition. For example, > > (charCode >= 'A' && charCode <= 'Z') > > Any opinions ? Let's do this way. Fixed. Comment on attachment 143814 [details]
patch v3 (fixed review comments)
Looks good, thanks.
Comment on attachment 143814 [details] patch v3 (fixed review comments) Clearing flags on attachment: 143814 Committed r118404: <http://trac.webkit.org/changeset/118404> All reviewed patches have been landed. Closing bug. |