Log Message
[Mac] [WK2] platform/mac/fast/events/numpad-keycode-mapping.html fails https://bugs.webkit.org/show_bug.cgi?id=105958
Patch by Sailesh Agrawal <[email protected]> on 2013-01-04 Reviewed by Alexey Proskuryakov. Tools: Ported code from DumpRenderTree to WebKitTestRunner to map all numpad keys. * WebKitTestRunner/mac/EventSenderProxy.mm: (KeyMappingEntry): (WTR): (WTR::EventSenderProxy::keyDown): Added all numpad keys. LayoutTests: Fixed numpad-keycode-mapping.html failure in WebKitTestRunner. * platform/mac-wk2/TestExpectations:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (138786 => 138787)
--- trunk/LayoutTests/ChangeLog 2013-01-04 10:14:43 UTC (rev 138786)
+++ trunk/LayoutTests/ChangeLog 2013-01-04 10:19:10 UTC (rev 138787)
@@ -1,3 +1,14 @@
+2013-01-04 Sailesh Agrawal <[email protected]>
+
+ [Mac] [WK2] platform/mac/fast/events/numpad-keycode-mapping.html fails
+ https://bugs.webkit.org/show_bug.cgi?id=105958
+
+ Reviewed by Alexey Proskuryakov.
+
+ Fixed numpad-keycode-mapping.html failure in WebKitTestRunner.
+
+ * platform/mac-wk2/TestExpectations:
+
2013-01-04 Mihnea Ovidenie <[email protected]>
[CSS Regions]Content overflowing last region displayed wrong
Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (138786 => 138787)
--- trunk/LayoutTests/platform/mac-wk2/TestExpectations 2013-01-04 10:14:43 UTC (rev 138786)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations 2013-01-04 10:19:10 UTC (rev 138787)
@@ -279,8 +279,6 @@
webkit.org/b/105956 inspector/geolocation-watchPosition.html [ Pass Failure ]
-webkit.org/b/105958 platform/mac/fast/events/numpad-keycode-mapping.html [ Failure ]
-
webkit.org/b/105960 plugins/navigator-plugins.html [ Failure ]
webkit.org/b/105988 [ Debug ] inspector/debugger/pause-in-internal-script.html [ Pass Crash ]
Modified: trunk/Tools/ChangeLog (138786 => 138787)
--- trunk/Tools/ChangeLog 2013-01-04 10:14:43 UTC (rev 138786)
+++ trunk/Tools/ChangeLog 2013-01-04 10:19:10 UTC (rev 138787)
@@ -1,3 +1,17 @@
+2013-01-04 Sailesh Agrawal <[email protected]>
+
+ [Mac] [WK2] platform/mac/fast/events/numpad-keycode-mapping.html fails
+ https://bugs.webkit.org/show_bug.cgi?id=105958
+
+ Reviewed by Alexey Proskuryakov.
+
+ Ported code from DumpRenderTree to WebKitTestRunner to map all numpad keys.
+
+ * WebKitTestRunner/mac/EventSenderProxy.mm:
+ (KeyMappingEntry):
+ (WTR):
+ (WTR::EventSenderProxy::keyDown): Added all numpad keys.
+
2013-01-03 Chris Fleizach <[email protected]>
REGRESSION: [Mac] Intermittent crash in WTR::AccessibilityUIElement::isEqual
Modified: trunk/Tools/WebKitTestRunner/mac/EventSenderProxy.mm (138786 => 138787)
--- trunk/Tools/WebKitTestRunner/mac/EventSenderProxy.mm 2013-01-04 10:14:43 UTC (rev 138786)
+++ trunk/Tools/WebKitTestRunner/mac/EventSenderProxy.mm 2013-01-04 10:19:10 UTC (rev 138787)
@@ -49,6 +49,13 @@
NoMouseButton = -1
};
+struct KeyMappingEntry {
+ int macKeyCode;
+ int macNumpadKeyCode;
+ unichar character;
+ NSString* characterName;
+};
+
static NSEventType eventTypeForMouseButtonAndAction(int button, MouseAction action)
{
switch (button) {
@@ -324,14 +331,6 @@
keyCode = 0x4C;
else if ([character isEqualToString:@"\x8"])
keyCode = 0x33;
- else if ([character isEqualToString:@"7"])
- keyCode = 0x1A;
- else if ([character isEqualToString:@"5"])
- keyCode = 0x17;
- else if ([character isEqualToString:@"9"])
- keyCode = 0x19;
- else if ([character isEqualToString:@"0"])
- keyCode = 0x1D;
else if ([character isEqualToString:@"a"])
keyCode = 0x00;
else if ([character isEqualToString:@"b"])
@@ -341,6 +340,38 @@
else if ([character isEqualToString:@"e"])
keyCode = 0x0E;
+ KeyMappingEntry table[] = {
+ {0x2F, 0x41, '.', nil},
+ {0, 0x43, '*', nil},
+ {0, 0x45, '+', nil},
+ {0, 0x47, NSClearLineFunctionKey, @"clear"},
+ {0x2C, 0x4B, '/', nil},
+ {0, 0x4C, 3, @"enter" },
+ {0x1B, 0x4E, '-', nil},
+ {0x18, 0x51, '=', nil},
+ {0x1D, 0x52, '0', nil},
+ {0x12, 0x53, '1', nil},
+ {0x13, 0x54, '2', nil},
+ {0x14, 0x55, '3', nil},
+ {0x15, 0x56, '4', nil},
+ {0x17, 0x57, '5', nil},
+ {0x16, 0x58, '6', nil},
+ {0x1A, 0x59, '7', nil},
+ {0x1C, 0x5B, '8', nil},
+ {0x19, 0x5C, '9', nil},
+ };
+ for (unsigned i = 0; i < WTF_ARRAY_LENGTH(table); ++i) {
+ NSString* currentCharacterString = [NSString stringWithCharacters:&table[i].character length:1];
+ if ([character isEqualToString:currentCharacterString] || [character isEqualToString:table[i].characterName]) {
+ if (keyLocation == 0x03 /*DOM_KEY_LOCATION_NUMPAD*/)
+ keyCode = table[i].macNumpadKeyCode;
+ else
+ keyCode = table[i].macKeyCode;
+ eventCharacter = currentCharacterString;
+ break;
+ }
+ }
+
NSString *charactersIgnoringModifiers = eventCharacter;
int modifierFlags = 0;
_______________________________________________ webkit-changes mailing list [email protected] http://lists.webkit.org/mailman/listinfo/webkit-changes
