Changeset 110061 in webkit


Ignore:
Timestamp:
Mar 7, 2012 9:15:07 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[EFL] Key press event is not processed properly.
https://bugs.webkit.org/show_bug.cgi?id=80491

Patch by ChangSeok Oh <ChangSeok Oh> on 2012-03-07
Reviewed by Gustavo Noronha Silva.

This issue is related with mutation observer feature.
If enter key is pressed, then a keyboard event should be processed
and reach to the mutation observer, but it doesn't.
Some special keys like Enter, Backspace and Tab key should be processed
and change to a single character code, but EFL port hasn't handled like that.

At least we can verify this with following two tests as I know. but they require another
functionality for bug79601. I'm going to submit the patch for it after this one.

Test: fast/mutation/end-of-task-delivery.html

fast/mutation/inline-event-listener.html

  • platform/efl/EflKeyboardUtilities.cpp:

(WebCore::singleCharacterString):
(WebCore):

  • platform/efl/EflKeyboardUtilities.h:

(WebCore):

  • platform/efl/PlatformKeyboardEventEfl.cpp:

(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r110057 r110061  
     12012-03-07  ChangSeok Oh  <shivamidow@gmail.com>
     2
     3        [EFL] Key press event is not processed properly.
     4        https://bugs.webkit.org/show_bug.cgi?id=80491
     5
     6        Reviewed by Gustavo Noronha Silva.
     7
     8        This issue is related with mutation observer feature.
     9        If enter key is pressed, then a keyboard event should be processed
     10        and reach to the mutation observer, but it doesn't.
     11        Some special keys like Enter, Backspace and Tab key should be processed
     12        and change to a single character code, but EFL port hasn't handled like that.
     13
     14        At least we can verify this with following two tests as I know. but they require another
     15        functionality for bug79601. I'm going to submit the patch for it after this one.
     16
     17        Test: fast/mutation/end-of-task-delivery.html
     18              fast/mutation/inline-event-listener.html
     19
     20        * platform/efl/EflKeyboardUtilities.cpp:
     21        (WebCore::singleCharacterString):
     22        (WebCore):
     23        * platform/efl/EflKeyboardUtilities.h:
     24        (WebCore):
     25        * platform/efl/PlatformKeyboardEventEfl.cpp:
     26        (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
     27
    1282012-03-07  Gavin Peters  <gavinp@chromium.org>
    229
  • trunk/Source/WebCore/platform/efl/EflKeyboardUtilities.cpp

    r100726 r110061  
    178178}
    179179
     180String singleCharacterString(const String& keyName)
     181{
     182    if (keyName == "Return")
     183        return String("\r");
     184    if (keyName == "BackSpace")
     185        return String("\x8");
     186    if (keyName == "Tab")
     187        return String("\t");
     188    return keyName;
     189}
     190
    180191int windowsKeyCodeForEvasKeyName(String& keyName)
    181192{
  • trunk/Source/WebCore/platform/efl/EflKeyboardUtilities.h

    r100726 r110061  
    3636
    3737WTF::String keyIdentifierForEvasKeyName(WTF::String&);
     38WTF::String singleCharacterString(const WTF::String&);
    3839int windowsKeyCodeForEvasKeyName(WTF::String&);
    3940
  • trunk/Source/WebCore/platform/efl/PlatformKeyboardEventEfl.cpp

    r103181 r110061  
    4343PlatformKeyboardEvent::PlatformKeyboardEvent(const Evas_Event_Key_Down* event)
    4444    : PlatformEvent(PlatformEvent::KeyDown, evas_key_modifier_is_set(event->modifiers, "Shift"), evas_key_modifier_is_set(event->modifiers, "Control"), evas_key_modifier_is_set(event->modifiers, "Alt"), evas_key_modifier_is_set(event->modifiers, "Meta"), currentTime())
    45     , m_text(String::fromUTF8(event->string))
    46     , m_unmodifiedText(String::fromUTF8(event->string))
     45    , m_text(singleCharacterString(String::fromUTF8(event->string)))
     46    , m_unmodifiedText(singleCharacterString(String::fromUTF8(event->string)))
    4747{
    4848    String keyName = String(event->key);
     
    5757PlatformKeyboardEvent::PlatformKeyboardEvent(const Evas_Event_Key_Up* event)
    5858    : PlatformEvent(PlatformEvent::KeyUp, evas_key_modifier_is_set(event->modifiers, "Shift"), evas_key_modifier_is_set(event->modifiers, "Control"), evas_key_modifier_is_set(event->modifiers, "Alt"), evas_key_modifier_is_set(event->modifiers, "Meta"), currentTime())
    59     , m_text(String::fromUTF8(event->string))
     59    , m_text(singleCharacterString(String::fromUTF8(event->string)))
    6060{
    6161    String keyName = String(event->key);
Note: See TracChangeset for help on using the changeset viewer.