<rdar://problem/3843312> REGRESSION: Tabbing into content area puts insertion point...
authorcblu <cblu@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Nov 2004 20:19:38 +0000 (20:19 +0000)
committercblu <cblu@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Nov 2004 20:19:38 +0000 (20:19 +0000)
        Reviewed by rjw.

        * kwq/KWQKHTMLPart.mm:
        (KWQKHTMLPart::nextKeyViewInFrameHierarchy): only blow away selection when another view is focused

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

WebCore/ChangeLog-2005-08-23
WebCore/kwq/KWQKHTMLPart.mm

index a3f75ea4e8e7dbed539e8d339f25303f222c3804..959810d50da863cb2326d8e1c4009664ea67bfa3 100644 (file)
@@ -1,3 +1,12 @@
+2004-11-12  Chris Blumenberg  <cblu@apple.com>
+
+       <rdar://problem/3843312> REGRESSION: Tabbing into content area puts insertion point at start, should go to where it last was
+
+        Reviewed by rjw.
+
+        * kwq/KWQKHTMLPart.mm:
+        (KWQKHTMLPart::nextKeyViewInFrameHierarchy): only blow away selection when another view is focused
+
 === Safari-171 ===
 
 2004-11-12  Darin Adler  <darin@apple.com>
index 9801eae089d309678bf143e275d0d455e665b6ce..e0a69d773c4233ff711eda9e60767b85004fe3f3 100644 (file)
@@ -1224,25 +1224,22 @@ NSView *KWQKHTMLPart::nextKeyViewInFrame(NodeImpl *node, KWQSelectionDirection d
 NSView *KWQKHTMLPart::nextKeyViewInFrameHierarchy(NodeImpl *node, KWQSelectionDirection direction)
 {
     NSView *next = nextKeyViewInFrame(node, direction);
-    if (next) {
-        return next;
-    }
-
-    // remove focus from currently focused node
-    DocumentImpl *doc = xmlDocImpl();
-    if (doc) {
-        doc->setFocusNode(0);
-    }
-    
-    KWQKHTMLPart *parent = KWQ(parentPart());
-    if (parent) {
-        next = parent->nextKeyView(parent->childFrame(this)->m_frame->element(), direction);
-        if (next) {
-            return next;
+    if (!next) {
+        KWQKHTMLPart *parent = KWQ(parentPart());
+        if (parent) {
+            next = parent->nextKeyView(parent->childFrame(this)->m_frame->element(), direction);
         }
     }
     
-    return nil;
+    if (next) {
+        // remove focus from currently focused node if we're giving focus to another view
+        DocumentImpl *doc = xmlDocImpl();
+        if (doc) {
+            doc->setFocusNode(0);
+        }            
+    }    
+    
+    return next;
 }
 
 NSView *KWQKHTMLPart::nextKeyView(NodeImpl *node, KWQSelectionDirection direction)