Reviewed by Chris Blumenberg.
authorsullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Jul 2005 21:01:37 +0000 (21:01 +0000)
committersullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Jul 2005 21:01:37 +0000 (21:01 +0000)
        * WebView.subproj/WebFrameView.m:
        (-[WebFrameView _firstResponderIsFormControl]):
        renamed from _firstResponderIsControl for clarity. Explicitly rejects WebHTMLView, since
        it's now a control.
        (-[WebFrameView keyDown:]):
        updated for renamed method.

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

WebKit/ChangeLog
WebKit/WebView.subproj/WebFrameView.m

index 946b7a2..42bf038 100644 (file)
@@ -1,3 +1,14 @@
+2005-07-29  John Sullivan  <sullivan@apple.com>
+
+        Reviewed by Chris Blumenberg.
+
+        * WebView.subproj/WebFrameView.m:
+        (-[WebFrameView _firstResponderIsFormControl]):
+        renamed from _firstResponderIsControl for clarity. Explicitly rejects WebHTMLView, since
+        it's now a control.
+        (-[WebFrameView keyDown:]):
+        updated for renamed method.
+
 2005-07-28  John Sullivan  <sullivan@apple.com>
 
         Reviewed by Beth Dakin.
index 117b69b..dec16f9 100644 (file)
@@ -626,9 +626,15 @@ static NSMutableDictionary *viewTypes;
     [self _scrollLineVertically:NO];
 }
 
-- (BOOL)_firstResponderIsControl
+- (BOOL)_firstResponderIsFormControl
 {
-    return [[[self window] firstResponder] isKindOfClass:[NSControl class]];
+    NSResponder *firstResponder = [[self window] firstResponder];
+    
+    // WebHTMLView is an NSControl subclass these days, but it's not a form control
+    if ([firstResponder isKindOfClass:[WebHTMLView class]]) {
+        return NO;
+    }
+    return [firstResponder isKindOfClass:[NSControl class]];
 }
 
 - (void)keyDown:(NSEvent *)event
@@ -659,7 +665,7 @@ static NSMutableDictionary *viewTypes;
                 // Checking for a control will allow events to percolate 
                 // correctly when the focus is on a form control and we
                 // are in full keyboard access mode.
-                if (![self allowsScrolling] || [self _firstResponderIsControl]) {
+                if (![self allowsScrolling] || [self _firstResponderIsFormControl]) {
                     callSuper = YES;
                     break;
                 }