Modified: trunk/Source/WebCore/ChangeLog (110060 => 110061)
--- trunk/Source/WebCore/ChangeLog 2012-03-07 17:11:05 UTC (rev 110060)
+++ trunk/Source/WebCore/ChangeLog 2012-03-07 17:15:07 UTC (rev 110061)
@@ -1,3 +1,30 @@
+2012-03-07 ChangSeok Oh <shivami...@gmail.com>
+
+ [EFL] Key press event is not processed properly.
+ https://bugs.webkit.org/show_bug.cgi?id=80491
+
+ 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):
+
2012-03-07 Gavin Peters <gav...@chromium.org>
Add Histograms for reporting on PageCache reject reasons
Modified: trunk/Source/WebCore/platform/efl/EflKeyboardUtilities.cpp (110060 => 110061)
--- trunk/Source/WebCore/platform/efl/EflKeyboardUtilities.cpp 2012-03-07 17:11:05 UTC (rev 110060)
+++ trunk/Source/WebCore/platform/efl/EflKeyboardUtilities.cpp 2012-03-07 17:15:07 UTC (rev 110061)
@@ -177,6 +177,17 @@
return keyName;
}
+String singleCharacterString(const String& keyName)
+{
+ if (keyName == "Return")
+ return String("\r");
+ if (keyName == "BackSpace")
+ return String("\x8");
+ if (keyName == "Tab")
+ return String("\t");
+ return keyName;
+}
+
int windowsKeyCodeForEvasKeyName(String& keyName)
{
if (windowsKeyMap().isEmpty())
Modified: trunk/Source/WebCore/platform/efl/EflKeyboardUtilities.h (110060 => 110061)
--- trunk/Source/WebCore/platform/efl/EflKeyboardUtilities.h 2012-03-07 17:11:05 UTC (rev 110060)
+++ trunk/Source/WebCore/platform/efl/EflKeyboardUtilities.h 2012-03-07 17:15:07 UTC (rev 110061)
@@ -35,6 +35,7 @@
namespace WebCore {
WTF::String keyIdentifierForEvasKeyName(WTF::String&);
+WTF::String singleCharacterString(const WTF::String&);
int windowsKeyCodeForEvasKeyName(WTF::String&);
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/efl/PlatformKeyboardEventEfl.cpp (110060 => 110061)
--- trunk/Source/WebCore/platform/efl/PlatformKeyboardEventEfl.cpp 2012-03-07 17:11:05 UTC (rev 110060)
+++ trunk/Source/WebCore/platform/efl/PlatformKeyboardEventEfl.cpp 2012-03-07 17:15:07 UTC (rev 110061)
@@ -42,8 +42,8 @@
PlatformKeyboardEvent::PlatformKeyboardEvent(const Evas_Event_Key_Down* event)
: 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())
- , m_text(String::fromUTF8(event->string))
- , m_unmodifiedText(String::fromUTF8(event->string))
+ , m_text(singleCharacterString(String::fromUTF8(event->string)))
+ , m_unmodifiedText(singleCharacterString(String::fromUTF8(event->string)))
{
String keyName = String(event->key);
m_keyIdentifier = keyIdentifierForEvasKeyName(keyName);
@@ -56,7 +56,7 @@
PlatformKeyboardEvent::PlatformKeyboardEvent(const Evas_Event_Key_Up* event)
: 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())
- , m_text(String::fromUTF8(event->string))
+ , m_text(singleCharacterString(String::fromUTF8(event->string)))
{
String keyName = String(event->key);
m_keyIdentifier = keyIdentifierForEvasKeyName(keyName);