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

darin darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:32:37 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 9ef11866d00f30b07d14e1ac33e61eee51c8cfc5
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Aug 19 18:59:22 2002 +0000

    WebCore:
    
    	Support so that WebKit can tab into a web view's fields.
    
            * kwq/KWQKHTMLPartImpl.h: Made another nextKeyView() version public.
            * kwq/WebCoreBridge.h: Add new methods, change parameters to one existing one.
            * kwq/WebCoreBridge.mm:
            (-[WebCoreBridge createKHTMLViewWithNSView:marginWidth:marginHeight:]):
    	Remove width and height parameters. The passed-in view already has the correct
    	width and height.
            (-[WebCoreBridge nextKeyView]): Call nextKeyView() with node == 0.
            (-[WebCoreBridge previousKeyView]): Call nextKeyView() with node == 0.
    
    WebKit:
    
    	- fixed 2863025 -- Need to implement TABing between widgets in forms
    
    	Implemented tabbing into a web view's fields. I now consider the task of
    	tabbing between widgets done. But there are many loose ends, each with its
    	own bug report.
    
            * WebView.subproj/WebHTMLView.m:
            (-[WebHTMLView dealloc]): Set _private to nil so we can properly handle calls
    	that come from NSView dealloc.
            (-[WebHTMLView provisionalDataSourceChanged:]): No need to pass width and height
    	to createKHTMLViewWithNSView any more. Also, just pass self rather than making
    	the roung trip to the WebFrame and the WebView back here.
            (-[WebHTMLView nextKeyView]): Added. Calls the bridge version when we are called
    	from nextValidKeyView, the normal version the rest of the time.
            (-[WebHTMLView previousKeyView]): Added. Calls the bridge version when we are called
    	from nextValidKeyView, the normal version the rest of the time.
            (-[WebHTMLView nextValidKeyView]): Set inNextValidKeyView and call super.
            (-[WebHTMLView previousValidKeyView]): Set inNextValidKeyView and call super.
            * WebView.subproj/WebHTMLViewPrivate.h: Add inNextValidKeyView flag.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1866 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index a0f91e8..faaf602 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,5 +1,18 @@
 2002-08-19  Darin Adler  <darin at apple.com>
 
+	Support so that WebKit can tab into a web view's fields.
+
+        * kwq/KWQKHTMLPartImpl.h: Made another nextKeyView() version public.
+        * kwq/WebCoreBridge.h: Add new methods, change parameters to one existing one.
+        * kwq/WebCoreBridge.mm:
+        (-[WebCoreBridge createKHTMLViewWithNSView:marginWidth:marginHeight:]):
+	Remove width and height parameters. The passed-in view already has the correct
+	width and height.
+        (-[WebCoreBridge nextKeyView]): Call nextKeyView() with node == 0.
+        (-[WebCoreBridge previousKeyView]): Call nextKeyView() with node == 0.
+
+2002-08-19  Darin Adler  <darin at apple.com>
+
 	First cut at implementation of "tab to change focus": Lots of loose ends, but it's
 	going well.
 
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index a0f91e8..faaf602 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,5 +1,18 @@
 2002-08-19  Darin Adler  <darin at apple.com>
 
+	Support so that WebKit can tab into a web view's fields.
+
+        * kwq/KWQKHTMLPartImpl.h: Made another nextKeyView() version public.
+        * kwq/WebCoreBridge.h: Add new methods, change parameters to one existing one.
+        * kwq/WebCoreBridge.mm:
+        (-[WebCoreBridge createKHTMLViewWithNSView:marginWidth:marginHeight:]):
+	Remove width and height parameters. The passed-in view already has the correct
+	width and height.
+        (-[WebCoreBridge nextKeyView]): Call nextKeyView() with node == 0.
+        (-[WebCoreBridge previousKeyView]): Call nextKeyView() with node == 0.
+
+2002-08-19  Darin Adler  <darin at apple.com>
+
 	First cut at implementation of "tab to change focus": Lots of loose ends, but it's
 	going well.
 
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index a0f91e8..faaf602 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,18 @@
 2002-08-19  Darin Adler  <darin at apple.com>
 
+	Support so that WebKit can tab into a web view's fields.
+
+        * kwq/KWQKHTMLPartImpl.h: Made another nextKeyView() version public.
+        * kwq/WebCoreBridge.h: Add new methods, change parameters to one existing one.
+        * kwq/WebCoreBridge.mm:
+        (-[WebCoreBridge createKHTMLViewWithNSView:marginWidth:marginHeight:]):
+	Remove width and height parameters. The passed-in view already has the correct
+	width and height.
+        (-[WebCoreBridge nextKeyView]): Call nextKeyView() with node == 0.
+        (-[WebCoreBridge previousKeyView]): Call nextKeyView() with node == 0.
+
+2002-08-19  Darin Adler  <darin at apple.com>
+
 	First cut at implementation of "tab to change focus": Lots of loose ends, but it's
 	going well.
 
diff --git a/WebCore/kwq/KWQKHTMLPart.h b/WebCore/kwq/KWQKHTMLPart.h
index f1a549e..483c01c 100644
--- a/WebCore/kwq/KWQKHTMLPart.h
+++ b/WebCore/kwq/KWQKHTMLPart.h
@@ -105,6 +105,7 @@ public:
     QString userAgent() const;
     
     static NSView *nextKeyView(QWidget *startingPoint, KWQSelectionDirection);
+    NSView *nextKeyView(DOM::NodeImpl *startingPoint, KWQSelectionDirection);
     
     // Incoming calls, used by the bridge.
     
@@ -118,8 +119,7 @@ public:
 private:
     WebCoreBridge *bridgeForFrameName(const QString &frameName);
 
-    NSView *nextKeyView(DOM::NodeImpl *, KWQSelectionDirection);
-    NSView *nextKeyViewInFrame(DOM::NodeImpl *, KWQSelectionDirection);
+    NSView *nextKeyViewInFrame(DOM::NodeImpl *startingPoint, KWQSelectionDirection);
 
     KHTMLPart *part;
     KHTMLPartPrivate *d;
diff --git a/WebCore/kwq/KWQKHTMLPartImpl.h b/WebCore/kwq/KWQKHTMLPartImpl.h
index f1a549e..483c01c 100644
--- a/WebCore/kwq/KWQKHTMLPartImpl.h
+++ b/WebCore/kwq/KWQKHTMLPartImpl.h
@@ -105,6 +105,7 @@ public:
     QString userAgent() const;
     
     static NSView *nextKeyView(QWidget *startingPoint, KWQSelectionDirection);
+    NSView *nextKeyView(DOM::NodeImpl *startingPoint, KWQSelectionDirection);
     
     // Incoming calls, used by the bridge.
     
@@ -118,8 +119,7 @@ public:
 private:
     WebCoreBridge *bridgeForFrameName(const QString &frameName);
 
-    NSView *nextKeyView(DOM::NodeImpl *, KWQSelectionDirection);
-    NSView *nextKeyViewInFrame(DOM::NodeImpl *, KWQSelectionDirection);
+    NSView *nextKeyViewInFrame(DOM::NodeImpl *startingPoint, KWQSelectionDirection);
 
     KHTMLPart *part;
     KHTMLPartPrivate *d;
diff --git a/WebCore/kwq/WebCoreBridge.h b/WebCore/kwq/WebCoreBridge.h
index ebe278e..f328cd4 100644
--- a/WebCore/kwq/WebCoreBridge.h
+++ b/WebCore/kwq/WebCoreBridge.h
@@ -92,9 +92,7 @@ typedef khtml::RenderPart KHTMLRenderPart;
 
 - (void)scrollToAnchor:(NSString *)anchor;
 
-- (void)createKHTMLViewWithNSView:(NSView *)view
-    width:(int)width height:(int)height
-    marginWidth:(int)mw marginHeight:(int)mh;
+- (void)createKHTMLViewWithNSView:(NSView *)view marginWidth:(int)mw marginHeight:(int)mh;
 
 - (NSString *)selectedText;
 - (void)selectAll;
@@ -111,6 +109,9 @@ typedef khtml::RenderPart KHTMLRenderPart;
 - (void)mouseMoved:(NSEvent *)event;
 - (void)mouseDragged:(NSEvent *)event;
 
+- (NSView *)nextKeyView;
+- (NSView *)previousKeyView;
+
 - (NSObject *)copyDOMTree:(id <WebCoreDOMTreeCopier>)copier;
 - (NSObject *)copyRenderTree:(id <WebCoreRenderTreeCopier>)copier;
 
diff --git a/WebCore/kwq/WebCoreBridge.mm b/WebCore/kwq/WebCoreBridge.mm
index 610bb8f..aaff364 100644
--- a/WebCore/kwq/WebCoreBridge.mm
+++ b/WebCore/kwq/WebCoreBridge.mm
@@ -44,6 +44,9 @@
 #import <WebFoundation/WebNSURLExtras.h>
 #import <KWQCharsets.h>
 
+using DOM::DocumentImpl;
+using DOM::NodeImpl;
+
 using khtml::parseURL;
 using khtml::RenderImage;
 using khtml::RenderObject;
@@ -124,15 +127,10 @@ using khtml::RenderPart;
     part->end();
 }
 
-- (void)createKHTMLViewWithNSView:(NSView *)view
-    width:(int)width height:(int)height
-    marginWidth:(int)mw marginHeight:(int)mh
+- (void)createKHTMLViewWithNSView:(NSView *)view marginWidth:(int)mw marginHeight:(int)mh
 {
-    // If we own the view, delete the old one - otherwise the render
-    // widget should take care of deleting the view
-    if (bridgeOwnsKHTMLView) {
-	delete part->impl->view();
-    }
+    // If we own the view, delete the old one - otherwise the render part will take care of deleting the view.
+    [self removeFromFrame];
 
     KHTMLView *kview = new KHTMLView(part, 0);
     part->impl->setView(kview);
@@ -142,7 +140,6 @@ using khtml::RenderPart;
         kview->setMarginWidth(mw);
     if (mh >= 0)
         kview->setMarginHeight(mh);
-    kview->resize(width, height);
     
     bridgeOwnsKHTMLView = YES;
 }
@@ -216,10 +213,10 @@ using khtml::RenderPart;
     [self drawRect:rect withPainter:&p];
 }
 
-- (NSObject *)copyDOMNode:(DOM::NodeImpl *)node copier:(id <WebCoreDOMTreeCopier>)copier
+- (NSObject *)copyDOMNode:(NodeImpl *)node copier:(id <WebCoreDOMTreeCopier>)copier
 {
     NSMutableArray *children = [[NSMutableArray alloc] init];
-    for (DOM::NodeImpl *child = node->firstChild(); child; child = child->nextSibling()) {
+    for (NodeImpl *child = node->firstChild(); child; child = child->nextSibling()) {
         [children addObject:[self copyDOMNode:child copier:copier]];
     }
     NSObject *copiedNode = [copier nodeWithName:node->nodeName().string().getNSString()
@@ -232,7 +229,7 @@ using khtml::RenderPart;
 
 - (NSObject *)copyDOMTree:(id <WebCoreDOMTreeCopier>)copier
 {
-    DOM::DocumentImpl *doc = part->impl->document();
+    DocumentImpl *doc = part->impl->document();
     if (!doc) {
         return nil;
     }
@@ -451,4 +448,16 @@ using khtml::RenderPart;
     return KWQCFStringEncodingFromIANACharsetName(part->encoding().getCFMutableString());
 }
 
+- (NSView *)nextKeyView
+{
+    NodeImpl *nullNode = 0;
+    return part->impl->nextKeyView(nullNode, KWQSelectingNext);
+}
+
+- (NSView *)previousKeyView
+{
+    NodeImpl *nullNode = 0;
+    return part->impl->nextKeyView(nullNode, KWQSelectingPrevious);
+}
+
 @end
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index bf353a9..f842648 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,25 @@
+2002-08-19  Darin Adler  <darin at apple.com>
+
+	- fixed 2863025 -- Need to implement TABing between widgets in forms
+
+	Implemented tabbing into a web view's fields. I now consider the task of
+	tabbing between widgets done. But there are many loose ends, each with its
+	own bug report.
+
+        * WebView.subproj/WebHTMLView.m:
+        (-[WebHTMLView dealloc]): Set _private to nil so we can properly handle calls
+	that come from NSView dealloc.
+        (-[WebHTMLView provisionalDataSourceChanged:]): No need to pass width and height
+	to createKHTMLViewWithNSView any more. Also, just pass self rather than making
+	the roung trip to the WebFrame and the WebView back here.
+        (-[WebHTMLView nextKeyView]): Added. Calls the bridge version when we are called
+	from nextValidKeyView, the normal version the rest of the time.
+        (-[WebHTMLView previousKeyView]): Added. Calls the bridge version when we are called
+	from nextValidKeyView, the normal version the rest of the time.
+        (-[WebHTMLView nextValidKeyView]): Set inNextValidKeyView and call super.
+        (-[WebHTMLView previousValidKeyView]): Set inNextValidKeyView and call super.
+        * WebView.subproj/WebHTMLViewPrivate.h: Add inNextValidKeyView flag.
+
 2002-08-18  Darin Adler  <darin at apple.com>
 
 	Update WebResourceClient instances for new API, including adding
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index bf353a9..f842648 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,25 @@
+2002-08-19  Darin Adler  <darin at apple.com>
+
+	- fixed 2863025 -- Need to implement TABing between widgets in forms
+
+	Implemented tabbing into a web view's fields. I now consider the task of
+	tabbing between widgets done. But there are many loose ends, each with its
+	own bug report.
+
+        * WebView.subproj/WebHTMLView.m:
+        (-[WebHTMLView dealloc]): Set _private to nil so we can properly handle calls
+	that come from NSView dealloc.
+        (-[WebHTMLView provisionalDataSourceChanged:]): No need to pass width and height
+	to createKHTMLViewWithNSView any more. Also, just pass self rather than making
+	the roung trip to the WebFrame and the WebView back here.
+        (-[WebHTMLView nextKeyView]): Added. Calls the bridge version when we are called
+	from nextValidKeyView, the normal version the rest of the time.
+        (-[WebHTMLView previousKeyView]): Added. Calls the bridge version when we are called
+	from nextValidKeyView, the normal version the rest of the time.
+        (-[WebHTMLView nextValidKeyView]): Set inNextValidKeyView and call super.
+        (-[WebHTMLView previousValidKeyView]): Set inNextValidKeyView and call super.
+        * WebView.subproj/WebHTMLViewPrivate.h: Add inNextValidKeyView flag.
+
 2002-08-18  Darin Adler  <darin at apple.com>
 
 	Update WebResourceClient instances for new API, including adding
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index 7c85a43..fb54d04 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -104,6 +104,7 @@
     [self _reset];
     [[NSNotificationCenter defaultCenter] removeObserver: self];
     [_private release];
+    _private = nil;
     [super dealloc];
 }
 
@@ -162,8 +163,7 @@
 - (void)provisionalDataSourceChanged:(WebDataSource *)dataSource 
 {
     [[dataSource _bridge]
-        createKHTMLViewWithNSView:[[[dataSource webFrame] webView] documentView]
-	width:(int)[self frame].size.width height:(int)[self frame].size.height
+        createKHTMLViewWithNSView:self
         marginWidth:[[[dataSource webFrame] webView] _marginWidth]
         marginHeight:[[[dataSource webFrame] webView] _marginHeight]];
 }
@@ -555,4 +555,30 @@
     return [[[self _frame] dataSource] _overrideEncoding] == kCFStringEncodingInvalidId;
 }
 
+- (NSView *)nextKeyView
+{
+    return (_private && _private->inNextValidKeyView) ? [[self _bridge] nextKeyView] : [super nextKeyView];
+}
+
+- (NSView *)previousKeyView
+{
+    return (_private && _private->inNextValidKeyView) ? [[self _bridge] previousKeyView] : [super previousKeyView];
+}
+
+- (NSView *)nextValidKeyView
+{
+    _private->inNextValidKeyView = YES;
+    NSView *view = [super nextValidKeyView];
+    _private->inNextValidKeyView = NO;
+    return view;
+}
+
+- (NSView *)previousValidKeyView
+{
+    _private->inNextValidKeyView = YES;
+    NSView *view = [super previousValidKeyView];
+    _private->inNextValidKeyView = NO;
+    return view;
+}
+
 @end
diff --git a/WebKit/WebView.subproj/WebHTMLViewPrivate.h b/WebKit/WebView.subproj/WebHTMLViewPrivate.h
index 597b7d9..23408c1 100644
--- a/WebKit/WebView.subproj/WebHTMLViewPrivate.h
+++ b/WebKit/WebView.subproj/WebHTMLViewPrivate.h
@@ -21,6 +21,7 @@
     BOOL canDragFrom;
     BOOL liveAllowsScrolling;
     BOOL inWindow;
+    BOOL inNextValidKeyView;
     NSURL *draggedURL;
 }
 @end

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list