WebCore:
authorsullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Aug 2004 22:31:00 +0000 (22:31 +0000)
committersullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Aug 2004 22:31:00 +0000 (22:31 +0000)
        Reviewed by Darin.

        WebCore part of fix for <rdar://problem/3631868> NSToolbar adoption:
        Tab key should cycle around toolbar and page content

        * kwq/WebCoreBridge.mm:
        (-[WebCoreBridge nextKeyViewInsideWebFrameViews]):
        Made this method start looking from the current focus node. This won't
        affect any existing callers because there were no existing callers.
        (-[WebCoreBridge previousKeyViewInsideWebFrameViews]):
        ditto

WebKit:

        Reviewed by Darin.

        WebKit part of fix for <rdar://problem/3631868> NSToolbar adoption:
        Tab key should cycle around toolbar and page content

        * WebView.subproj/WebHTMLView.m:
        removed overrides of nextKeyView and previousKeyView
        (-[WebHTMLView nextValidKeyView]):
        call super only if we can't move the focus within the frame hierarchy
        (-[WebHTMLView previousValidKeyView]):
        ditto
        * WebView.subproj/WebHTMLViewInternal.h:
        removed nextKeyViewAccessShouldMoveFocus ivar

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

WebCore/ChangeLog-2005-08-23
WebCore/kwq/WebCoreBridge.mm
WebKit/ChangeLog
WebKit/WebView.subproj/WebHTMLView.m
WebKit/WebView.subproj/WebHTMLViewInternal.h

index 2f65fa1b0bf4a44190048632ef8b64efd76c870c..3f0f868efa2a48a1d2e025b523d2de09003954bd 100644 (file)
@@ -1,3 +1,17 @@
+2004-08-02  John Sullivan  <sullivan@apple.com>
+
+        Reviewed by Darin.
+        
+        WebCore part of fix for <rdar://problem/3631868> NSToolbar adoption: 
+        Tab key should cycle around toolbar and page content
+
+        * kwq/WebCoreBridge.mm:
+        (-[WebCoreBridge nextKeyViewInsideWebFrameViews]):
+        Made this method start looking from the current focus node. This won't
+        affect any existing callers because there were no existing callers.
+        (-[WebCoreBridge previousKeyViewInsideWebFrameViews]):
+        ditto
+
 2004-08-02  David Hyatt  <hyatt@apple.com>
 
        Create a #define for XSLT support that at the moment will only be enabled on Tiger.
index e074be6f50ac1347084f7870de85b810cf0fb138..f3b2c57f7e182bb249ff88e5f23be21c8d966843 100644 (file)
@@ -1088,12 +1088,22 @@ static HTMLFormElementImpl *formElementFromDOMElement(DOMElement *element)
 
 - (NSView *)nextKeyViewInsideWebFrameViews
 {
-    return _part->nextKeyViewInFrameHierarchy(0, KWQSelectingNext);
+    DocumentImpl *doc = _part->xmlDocImpl();
+    if (!doc) {
+        return nil;
+    }
+    
+    return _part->nextKeyViewInFrameHierarchy(doc->focusNode(), KWQSelectingNext);
 }
 
 - (NSView *)previousKeyViewInsideWebFrameViews
 {
-    return _part->nextKeyViewInFrameHierarchy(0, KWQSelectingPrevious);
+    DocumentImpl *doc = _part->xmlDocImpl();
+    if (!doc) {
+        return nil;
+    }
+
+    return _part->nextKeyViewInFrameHierarchy(doc->focusNode(), KWQSelectingPrevious);
 }
 
 - (NSString *)stringByEvaluatingJavaScriptFromString:(NSString *)string
index ab8bb6d8477907b39b9076af62754893b871be56..16b076c7d1b32726607534bb9c8f0d4c4a67c8de 100644 (file)
@@ -1,3 +1,19 @@
+2004-08-02  John Sullivan  <sullivan@apple.com>
+
+        Reviewed by Darin.
+
+        WebKit part of fix for <rdar://problem/3631868> NSToolbar adoption: 
+        Tab key should cycle around toolbar and page content
+
+        * WebView.subproj/WebHTMLView.m:
+        removed overrides of nextKeyView and previousKeyView
+        (-[WebHTMLView nextValidKeyView]):
+        call super only if we can't move the focus within the frame hierarchy
+        (-[WebHTMLView previousValidKeyView]):
+        ditto
+        * WebView.subproj/WebHTMLViewInternal.h:
+        removed nextKeyViewAccessShouldMoveFocus ivar
+
 2004-08-02  Ken Kocienda  <kocienda@apple.com>
 
         Reviewed by John
index 243b126d12826fd4d766bb4afa54cdcc4ff9f6f2..b5ecdffa95c5419ac7cf7998ed07930097f9f524 100644 (file)
@@ -2032,43 +2032,27 @@ static WebHTMLView *lastHitView = nil;
     return YES;
 }
 
-- (NSView *)nextKeyView
-{
-    if (_private && _private->nextKeyViewAccessShouldMoveFocus && ![[self _bridge] inNextKeyViewOutsideWebFrameViews]) {
-        _private->nextKeyViewAccessShouldMoveFocus = NO;
-        return [[self _bridge] nextKeyView];
-    }
-    
-    return [super nextKeyView];
-}
-
-- (NSView *)previousKeyView
-{
-    if (_private && _private->nextKeyViewAccessShouldMoveFocus) {
-        _private->nextKeyViewAccessShouldMoveFocus = NO;
-        return [[self _bridge] previousKeyView];
-    }
-        
-    return [super previousKeyView];
-}
-
 - (NSView *)nextValidKeyView
 {
+    NSView *view = nil;
     if (![self isHiddenOrHasHiddenAncestor]) {
-        _private->nextKeyViewAccessShouldMoveFocus = YES;
+        view = [[self _bridge] nextKeyViewInsideWebFrameViews];
+    }
+    if (view == nil) {
+        view = [super nextValidKeyView];
     }
-    NSView *view = [super nextValidKeyView];
-    _private->nextKeyViewAccessShouldMoveFocus = NO;
     return view;
 }
 
 - (NSView *)previousValidKeyView
 {
+    NSView *view = nil;
     if (![self isHiddenOrHasHiddenAncestor]) {
-        _private->nextKeyViewAccessShouldMoveFocus = YES;
+        view = [[self _bridge] previousKeyViewInsideWebFrameViews];
+    }
+    if (view == nil) {
+        view = [super previousValidKeyView];
     }
-    NSView *view = [super previousValidKeyView];
-    _private->nextKeyViewAccessShouldMoveFocus = NO;
     return view;
 }
 
index b0c9e908a79e16da8f5010a4bda2ecd0de88b4ab..ad7de16920836ee9ed8721f981dd2b98318ad0e1 100644 (file)
@@ -8,7 +8,6 @@
     BOOL needsLayout;
     BOOL needsToApplyStyles;
     BOOL inWindow;
-    BOOL nextKeyViewAccessShouldMoveFocus;
     BOOL ignoringMouseDraggedEvents;
     BOOL printing;
     BOOL initiatedDrag;