Reviewed by Oliver Hunt.
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 26 Dec 2007 01:05:55 +0000 (01:05 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 26 Dec 2007 01:05:55 +0000 (01:05 +0000)
        - fix an assertion failure when pressing the num lock key

        * WebView/WebHTMLView.mm:
        (-[WebHTMLView flagsChanged:]): Avoid passing key code 10 down to
        WebCore.

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

WebKit/mac/ChangeLog
WebKit/mac/WebView/WebHTMLView.mm

index 16b029839f1ecc70704b37ba9837ae6f748999de..0afdfdfa5ab10fb50efb7287617d2b9715820a59 100644 (file)
@@ -1,3 +1,13 @@
+2007-12-25  Dan Bernstein  <mitz@apple.com>
+
+        Reviewed by Oliver Hunt.
+
+        - fix an assertion failure when pressing the num lock key
+
+        * WebView/WebHTMLView.mm:
+        (-[WebHTMLView flagsChanged:]): Avoid passing key code 10 down to
+        WebCore.
+
 2007-12-20  Darin Adler  <darin@apple.com>
 
         Reviewed by Oliver.
 
         * WebView/WebHTMLView.mm:
         (-[WebHTMLView flagsChanged:]): Avoid passing key code 0 down to
-        webCore.
+        WebCore.
 
 2007-11-01  Justin Garcia  <justin.garcia@apple.com>
 
index 50a4612b88b44660d351f0a382cf6170cedc411e..e244a27ecd73c962d00273a1c412eabba64aacd7 100644 (file)
@@ -3503,9 +3503,10 @@ noPromisedData:
         coreFrame->eventHandler()->capsLockStateMayHaveChanged();
     
     RetainPtr<WebHTMLView> selfProtector = self;
-    
-    //Don't make an event from the function key
-    if (coreFrame && [event keyCode] != 0 && [event keyCode] != 63)
+
+    unsigned short keyCode = [event keyCode];
+    //Don't make an event from the num lock and function keys
+    if (coreFrame && keyCode != 0 && keyCode != 10 && keyCode != 63)
         coreFrame->eventHandler()->keyEvent(PlatformKeyboardEvent(event));
         
     [super flagsChanged:event];