[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

kocienda kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:57:54 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 8c1474307f8dbbc1d365b12ca30794a198f82905
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Sep 25 17:06:27 2003 +0000

            Reviewed by Darin
    
            Fix for this bug:
    
            <rdar://problem/3341222>: WebView doesn't follow AppKit default nextKeyView pattern
    
            * WebCoreSupport.subproj/WebBridge.h: Added a variable to guard against recursion
            in -[WebBridge inNextKeyViewOutsideWebFrameViews].
            * WebCoreSupport.subproj/WebBridge.m:
            (-[WebBridge inNextKeyViewOutsideWebFrameViews]): Accessor for recursion guard.
            (-[WebBridge nextKeyViewOutsideWebFrameViews]): Do not ask webView for its
            next key view, but rather, ask it for the next key view of the last view in
            its key view loop. This is what will get us to the next view outside of the
            webView.
            * WebView.subproj/WebHTMLView.m:
            (-[WebHTMLView nextKeyView]): Ask AppKit, rather than khtml, for the next key
            key view if -[WebBridge inNextKeyViewOutsideWebFrameViews] returns YES. Doing
            so gives us the correct answer as calculated by AppKit, and makes HTML views
            behave like other views. This check also heads off an infinite recursion
            through -[WebBridge nextKeyViewOutsideWebFrameViews].
    
    	Also did some cleanup of some code that was marked for removal "some day".
    	That "some day" is today.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5058 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index b8f9cf3..722c47b 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,29 @@
+2003-09-25  Ken Kocienda  <kocienda at apple.com>
+
+        Reviewed by Darin
+
+        Fix for this bug:
+        
+        <rdar://problem/3341222>: WebView doesn't follow AppKit default nextKeyView pattern
+        
+        * WebCoreSupport.subproj/WebBridge.h: Added a variable to guard against recursion
+        in -[WebBridge inNextKeyViewOutsideWebFrameViews].
+        * WebCoreSupport.subproj/WebBridge.m:
+        (-[WebBridge inNextKeyViewOutsideWebFrameViews]): Accessor for recursion guard.
+        (-[WebBridge nextKeyViewOutsideWebFrameViews]): Do not ask webView for its
+        next key view, but rather, ask it for the next key view of the last view in
+        its key view loop. This is what will get us to the next view outside of the
+        webView.
+        * WebView.subproj/WebHTMLView.m:
+        (-[WebHTMLView nextKeyView]): Ask AppKit, rather than khtml, for the next key
+        key view if -[WebBridge inNextKeyViewOutsideWebFrameViews] returns YES. Doing
+        so gives us the correct answer as calculated by AppKit, and makes HTML views
+        behave like other views. This check also heads off an infinite recursion 
+        through -[WebBridge nextKeyViewOutsideWebFrameViews].
+
+	Also did some cleanup of some code that was marked for removal "some day".
+	That "some day" is today.
+        
 2003-09-25  Darin Adler  <darin at apple.com>
 
         Reviewed by John.
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.h b/WebKit/WebCoreSupport.subproj/WebBridge.h
index 227038a..fdd5bc4 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.h
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.h
@@ -16,6 +16,7 @@
 {
     WebFrame *_frame;
     BOOL _doingClientRedirect;
+    BOOL _inNextKeyViewOutsideWebFrameViews;
 }
 
 - (id)initWithWebFrame:(WebFrame *)webFrame;
@@ -23,5 +24,6 @@
 
 - (void)receivedData:(NSData *)data withDataSource:(WebDataSource *)dataSource;
 - (void)runOpenPanelForFileButtonWithResultListener:(id <WebOpenPanelResultListener>)resultListener;
+- (BOOL)inNextKeyViewOutsideWebFrameViews;
 
 @end
diff --git a/WebKit/WebCoreSupport.subproj/WebBridge.m b/WebKit/WebCoreSupport.subproj/WebBridge.m
index b9f9016..c0a4e50 100644
--- a/WebKit/WebCoreSupport.subproj/WebBridge.m
+++ b/WebKit/WebCoreSupport.subproj/WebBridge.m
@@ -55,6 +55,10 @@
 - (void)_cycleWindowsReversed:(BOOL)reversed;
 @end
 
+ at interface NSView (AppKitSecretsWebBridgeKnowsAbout)
+- (NSView *)_findLastViewInKeyViewLoop;
+ at end
+
 @implementation WebBridge
 
 - (id)initWithWebFrame:(WebFrame *)webFrame
@@ -515,26 +519,29 @@
     return [[_frame webView] userAgentForURL:URL];
 }
 
+- (BOOL)inNextKeyViewOutsideWebFrameViews
+{
+    return _inNextKeyViewOutsideWebFrameViews;
+}
+
 - (NSView *)nextKeyViewOutsideWebFrameViews
 {
+    _inNextKeyViewOutsideWebFrameViews = YES;
     WebView *webView = [_frame webView];
-    NSView *nextKeyView = [webView nextKeyView];
-    if (nextKeyView) {
-        return nextKeyView;
-    }
-    // Old way, here so we don't break early WebKit adopters, but could be removed later.
-    return [[[webView mainFrame] frameView] nextKeyView];
+    // Do not ask webView for its next key view, but rather, ask it for 
+    // the next key view of the last view in its key view loop.
+    // Doing so gives us the correct answer as calculated by AppKit, 
+    // and makes HTML views behave like other views.
+    NSView *nextKeyView = [[webView _findLastViewInKeyViewLoop] nextKeyView];
+    _inNextKeyViewOutsideWebFrameViews = NO;
+    return nextKeyView;
 }
 
 - (NSView *)previousKeyViewOutsideWebFrameViews
 {
     WebView *webView = [_frame webView];
     NSView *previousKeyView = [webView previousKeyView];
-    if (previousKeyView) {
-        return previousKeyView;
-    }
-    // Old way, here so we don't break early WebKit adopters, but could be removed later.
-    return [[[webView mainFrame] frameView] previousKeyView];
+    return previousKeyView;
 }
 
 - (BOOL)defersLoading
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index d086c04..22d7fa1 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -741,7 +741,7 @@
 
 - (NSView *)nextKeyView
 {
-    return (_private && _private->inNextValidKeyView)
+    return (_private && _private->inNextValidKeyView && ![[self _bridge] inNextKeyViewOutsideWebFrameViews])
         ? [[self _bridge] nextKeyView]
         : [super nextKeyView];
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list