Reviewed by Maciej.
authoralice.liu@apple.com <alice.liu@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Jan 2008 22:37:42 +0000 (22:37 +0000)
committeralice.liu@apple.com <alice.liu@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Jan 2008 22:37:42 +0000 (22:37 +0000)
        Added handling for page up and page down in EventSender

        * DumpRenderTree/mac/EventSendingController.mm:
        (-[EventSendingController keyDown:withModifiers:]):
        * DumpRenderTree/win/EventSender.cpp:
        (keyDownCallback):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@29093 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/mac/EventSendingController.mm
WebKitTools/DumpRenderTree/win/EventSender.cpp

index c5324b9df717a33c511bb8bb38fc4b027d3a9f30..c796529f644e98a4847eaef4a954276d1b4dd9fe 100644 (file)
@@ -1,3 +1,14 @@
+2008-01-02  Alice Liu  <alice.liu@apple.com>
+
+        Reviewed by Maciej.
+
+        Added handling for page up and page down in EventSender
+
+        * DumpRenderTree/mac/EventSendingController.mm:
+        (-[EventSendingController keyDown:withModifiers:]):
+        * DumpRenderTree/win/EventSender.cpp:
+        (keyDownCallback):
+
 2008-01-02  Alexey Proskuryakov  <ap@webkit.org>
 
         Reviewed by Darin.
index 42f97901f89e1d0c291938229aa1aa0e18e07dde..28b17620b87b7da699d5ed4b4d023cca2fdda32b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005, 2006, 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
  * Copyright (C) 2006 Jonas Witt <jonas.witt@gmail.com>
  * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
  * Copyright (C) 2006 Alexey Proskuryakov <ap@nypop.com>
@@ -362,6 +362,12 @@ BOOL replayingSavedEvents;
     } else if ([character isEqualToString:@"downArrow"]) {
         const unichar ch = NSDownArrowFunctionKey;
         eventCharacter = [NSString stringWithCharacters:&ch length:1];
+    } else if ([character isEqualToString:@"pageUp"]) {
+        const unichar ch = NSPageUpFunctionKey;
+        eventCharacter = [NSString stringWithCharacters:&ch length:1];
+    } else if ([character isEqualToString:@"pageDown"]) {
+        const unichar ch = NSPageDownFunctionKey;
+        eventCharacter = [NSString stringWithCharacters:&ch length:1];
     } else if ([character isEqualToString:@"delete"]) {
         const unichar ch = 0x7f;
         eventCharacter = [NSString stringWithCharacters:&ch length:1];
index 75f7242046c2e08d93a9da29d3a79a8e682f4ccc..d648ce1f3804b145ace857118af14ba90c0a2589 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -305,7 +305,11 @@ static JSValueRef keyDownCallback(JSContextRef context, JSObjectRef function, JS
     } else if (JSStringIsEqualToUTF8CString(character, "downArrow")) {
         virtualKeyCode = VK_DOWN;
         keyData += KF_EXTENDED << 16;
-    } else if (JSStringIsEqualToUTF8CString(character, "delete"))
+    } else if (JSStringIsEqualToUTF8CString(character, "pageUp"))
+        virtualKeyCode = VK_PRIOR;
+    else if (JSStringIsEqualToUTF8CString(character, "pageDown"))
+        virtualKeyCode = VK_NEXT;
+    else if (JSStringIsEqualToUTF8CString(character, "delete"))
         virtualKeyCode = VK_BACK;
     else {
         charCode = JSStringGetCharactersPtr(character)[0];