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

sullivan sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:48:40 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 7187752a1c5d1485c172e6b4551c58301887b881
Author: sullivan <sullivan at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jul 1 17:41:26 2004 +0000

            Reviewed by Trey.
    
            - fixed these bugs:
            <rdar://problem/3709110> REGRESSION (Tiger): Pressing Tab key to move focus
            onto links skips every other link
            <rdar://problem/3692576> focus ring is in odd place after clicking RSS button
            with "Tab to links" enabled
    
            WebHTMLView has some trickery by which we advance the focused link when nextKeyView
            or previousKeyView is called within nextValidKeyView or previousValidKeyView. This
            broke in Tiger because AppKit now (sometimes at least) calls nextKeyView more than
            once within nextValidKeyView. Fixed 3709110 by making sure we only advance the focus
            once within a call to nextValidKeyView or previousValidKeyView.
    
            Also, this same trickery didn't work right with hidden views. Fixed 3692576 by checking
            whether the view is hidden and bypassing the focus-moving trickery in that case.
    
            * WebView.subproj/WebHTMLViewInternal.h:
            renamed inNextValidKeyView -> nextKeyViewAccessShouldMoveFocus
    
            * WebView.subproj/WebHTMLView.m:
            (-[WebHTMLView nextKeyView]):
            now clears nextKeyViewAccessShouldMoveFocus
            (-[WebHTMLView previousKeyView]):
            ditto
            (-[WebHTMLView nextValidKeyView]):
            now doesn't set focus-moving trigger ivar if view is hidden or has hidden ancestor
            (-[WebHTMLView previousValidKeyView]):
            ditto
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6955 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 5ff93bd..a0c362d 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,35 @@
+2004-07-01  John Sullivan  <sullivan at apple.com>
+
+        Reviewed by Trey.
+        
+        - fixed these bugs:
+        <rdar://problem/3709110> REGRESSION (Tiger): Pressing Tab key to move focus 
+        onto links skips every other link
+        <rdar://problem/3692576> focus ring is in odd place after clicking RSS button 
+        with "Tab to links" enabled
+        
+        WebHTMLView has some trickery by which we advance the focused link when nextKeyView
+        or previousKeyView is called within nextValidKeyView or previousValidKeyView. This
+        broke in Tiger because AppKit now (sometimes at least) calls nextKeyView more than
+        once within nextValidKeyView. Fixed 3709110 by making sure we only advance the focus 
+        once within a call to nextValidKeyView or previousValidKeyView.
+        
+        Also, this same trickery didn't work right with hidden views. Fixed 3692576 by checking
+        whether the view is hidden and bypassing the focus-moving trickery in that case.
+
+        * WebView.subproj/WebHTMLViewInternal.h:
+        renamed inNextValidKeyView -> nextKeyViewAccessShouldMoveFocus
+        
+        * WebView.subproj/WebHTMLView.m:
+        (-[WebHTMLView nextKeyView]):
+        now clears nextKeyViewAccessShouldMoveFocus
+        (-[WebHTMLView previousKeyView]):
+        ditto
+        (-[WebHTMLView nextValidKeyView]):
+        now doesn't set focus-moving trigger ivar if view is hidden or has hidden ancestor
+        (-[WebHTMLView previousValidKeyView]):
+        ditto
+
 2004-06-30  Trey Matteson  <trey at apple.com>
 
 	Dragging within a web view should be allowed to start when the window isn't key.
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index 20ef8f3..b50e627 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -1999,31 +1999,41 @@ static WebHTMLView *lastHitView = nil;
 
 - (NSView *)nextKeyView
 {
-    return (_private && _private->inNextValidKeyView && ![[self _bridge] inNextKeyViewOutsideWebFrameViews])
-        ? [[self _bridge] nextKeyView]
-        : [super nextKeyView];
+    if (_private && _private->nextKeyViewAccessShouldMoveFocus && ![[self _bridge] inNextKeyViewOutsideWebFrameViews]) {
+        _private->nextKeyViewAccessShouldMoveFocus = NO;
+        return [[self _bridge] nextKeyView];
+    }
+    
+    return [super nextKeyView];
 }
 
 - (NSView *)previousKeyView
 {
-    return (_private && _private->inNextValidKeyView)
-        ? [[self _bridge] previousKeyView]
-        : [super previousKeyView];
+    if (_private && _private->nextKeyViewAccessShouldMoveFocus) {
+        _private->nextKeyViewAccessShouldMoveFocus = NO;
+        return [[self _bridge] previousKeyView];
+    }
+        
+    return [super previousKeyView];
 }
 
 - (NSView *)nextValidKeyView
 {
-    _private->inNextValidKeyView = YES;
+    if (![self isHiddenOrHasHiddenAncestor]) {
+        _private->nextKeyViewAccessShouldMoveFocus = YES;
+    }
     NSView *view = [super nextValidKeyView];
-    _private->inNextValidKeyView = NO;
+    _private->nextKeyViewAccessShouldMoveFocus = NO;
     return view;
 }
 
 - (NSView *)previousValidKeyView
 {
-    _private->inNextValidKeyView = YES;
+    if (![self isHiddenOrHasHiddenAncestor]) {
+        _private->nextKeyViewAccessShouldMoveFocus = YES;
+    }
     NSView *view = [super previousValidKeyView];
-    _private->inNextValidKeyView = NO;
+    _private->nextKeyViewAccessShouldMoveFocus = NO;
     return view;
 }
 
diff --git a/WebKit/WebView.subproj/WebHTMLViewInternal.h b/WebKit/WebView.subproj/WebHTMLViewInternal.h
index 1aed5dc..4dd2405 100644
--- a/WebKit/WebView.subproj/WebHTMLViewInternal.h
+++ b/WebKit/WebView.subproj/WebHTMLViewInternal.h
@@ -8,7 +8,7 @@
     BOOL needsLayout;
     BOOL needsToApplyStyles;
     BOOL inWindow;
-    BOOL inNextValidKeyView;
+    BOOL nextKeyViewAccessShouldMoveFocus;
     BOOL ignoringMouseDraggedEvents;
     BOOL printing;
     BOOL initiatedDrag;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list