Reviewed by Ken.
authorsullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Feb 2005 22:59:33 +0000 (22:59 +0000)
committersullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Feb 2005 22:59:33 +0000 (22:59 +0000)
        - fixed <rdar://problem/4021370> REGRESSION (Tiger): WebKit part of fix for
        shift-tab on tivofaq doing the wrong thing

        * WebView.subproj/WebFrameView.m:
        (-[WebFrameView becomeFirstResponder]):
        If our previousValidKeyView is nil or self (same as nil modulo AppKit oddness),
        look out of the box and get the previousValidKeyView of our webview.

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

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

index 0498c5e573264cd06bc151344117ddf26399cb44..8c5af63ef7082b5a88fa9aa05751b255f1be42b5 100644 (file)
@@ -1,3 +1,15 @@
+2005-02-23  John Sullivan  <sullivan@apple.com>
+
+        Reviewed by Ken.
+        
+        - fixed <rdar://problem/4021370> REGRESSION (Tiger): WebKit part of fix for 
+        shift-tab on tivofaq doing the wrong thing
+
+        * WebView.subproj/WebFrameView.m:
+        (-[WebFrameView becomeFirstResponder]):
+        If our previousValidKeyView is nil or self (same as nil modulo AppKit oddness),
+        look out of the box and get the previousValidKeyView of our webview.
+
 2005-02-23  Darin Adler  <darin@apple.com>
 
         Reviewed by Hyatt.
index 4c31390ac29b02ce0d0d3462c4b7825a31751ba0..b83dc222893664ad69f0e73779a91105c9194f9f 100644 (file)
@@ -373,6 +373,15 @@ static NSMutableDictionary *viewTypes;
         NSWindow *window = [self window];
         if ([window keyViewSelectionDirection] == NSSelectingPrevious) {
             NSView *previousValidKeyView = [self previousValidKeyView];
+            // If we couldn't find a previous valid key view, ask the webview. This handles frameset
+            // cases like 3748628. Note that previousValidKeyView should never be self but can be
+            // due to AppKit oddness (mentioned in 3748628).
+            if (previousValidKeyView == nil || previousValidKeyView == self) {
+                previousValidKeyView = [[[self webFrame] webView] previousValidKeyView];
+            }
+            // I don't know if the following cases ever occur anymore, but I'm leaving in the old test for
+            // now to avoid causing trouble just before shipping Tiger.
+            ASSERT((previousValidKeyView != self) && (previousValidKeyView != [self _scrollView]));
             if ((previousValidKeyView != self) && (previousValidKeyView != [self _scrollView])) {
                 [window makeFirstResponder:previousValidKeyView];
             }