Title: [97169] trunk/Tools
Revision
97169
Author
[email protected]
Date
2011-10-11 12:37:18 -0700 (Tue, 11 Oct 2011)

Log Message

[EFL] DRT: Do not abort() when an unknown key is pressed.
https://bugs.webkit.org/show_bug.cgi?id=69856

Patch by Raphael Kubo da Costa <[email protected]> on 2011-10-11
Reviewed by Antonio Gomes.

A lot of tests crash due to the previous behaviour. Just using the
received name of the pressed key works most of the time, and when it
does not the failing tests should tell us.

* DumpRenderTree/efl/EventSender.cpp:
(keyPadNameFromJSValue):
(keyNameFromJSValue):
(keyDownCallback):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (97168 => 97169)


--- trunk/Tools/ChangeLog	2011-10-11 19:22:14 UTC (rev 97168)
+++ trunk/Tools/ChangeLog	2011-10-11 19:37:18 UTC (rev 97169)
@@ -1,3 +1,19 @@
+2011-10-11  Raphael Kubo da Costa  <[email protected]>
+
+        [EFL] DRT: Do not abort() when an unknown key is pressed.
+        https://bugs.webkit.org/show_bug.cgi?id=69856
+
+        Reviewed by Antonio Gomes.
+
+        A lot of tests crash due to the previous behaviour. Just using the
+        received name of the pressed key works most of the time, and when it
+        does not the failing tests should tell us.
+
+        * DumpRenderTree/efl/EventSender.cpp:
+        (keyPadNameFromJSValue):
+        (keyNameFromJSValue):
+        (keyDownCallback):
+
 2011-10-11  Kristóf Kosztyó  <[email protected]>
 
         [Qt] [WK2] NRWT failed to launch MiniBrowser after test run

Modified: trunk/Tools/DumpRenderTree/efl/EventSender.cpp (97168 => 97169)


--- trunk/Tools/DumpRenderTree/efl/EventSender.cpp	2011-10-11 19:22:14 UTC (rev 97168)
+++ trunk/Tools/DumpRenderTree/efl/EventSender.cpp	2011-10-11 19:37:18 UTC (rev 97169)
@@ -327,10 +327,7 @@
     if (equals(character, "delete"))
         return "KP_Delete";
 
-    // If we get some other key specified with the numpad location,
-    // crash here, so we add it sooner rather than later.
-    fprintf(stderr, "numeric pad key not handled: %s\n", character->ustring().utf8().data());
-    abort();
+    return 0;
 }
 
 static const char* keyNameFromJSValue(JSStringRef character)
@@ -392,10 +389,7 @@
     if (charCode == '\x8')
         return "BackSpace";
 
-    // FIXME: See other implementations and obtain the key name by
-    // the Unicode character code.
-    fprintf(stderr, "key not handled: %s\n", character->ustring().utf8().data());
-    abort();
+    return 0;
 }
 
 static JSValueRef keyDownCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
@@ -421,7 +415,12 @@
     if (argumentCount >= 2)
         setEvasModifiers(evas, modifiersFromJSValue(context, arguments[1]));
 
+    const CString cCharacter = character.get()->ustring().utf8();
     const char* keyName = (location == DomKeyLocationNumpad) ? keyPadNameFromJSValue(character.get()) : keyNameFromJSValue(character.get());
+
+    if (!keyName)
+        keyName = cCharacter.data();
+
     evas_event_feed_key_down(evas, keyName, keyName, 0, 0, 0, 0);
     evas_event_feed_key_up(evas, keyName, keyName, 0, 0, 1, 0);
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to