[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:23:59 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit fa7c2bede2009f8a9cf2b5ab57a858224df9d6ad
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jul 11 17:19:32 2002 +0000

    	- fixed 2930872 -- option-arrow keys should page up and down
    	- fixed 2924727 -- Delete does not go to previous page
    
            * WebView.subproj/IFHTMLView.mm: Disable the keyDown and keyUp
    	methods here. We don't really need to pass these events to KHTMLView
    	at the moment. See the comment in this file for further explanation.
    	This paves the way to handle keys other than arrow keys in IFWebView.
    
            * WebView.subproj/IFWebController.h: Add temporary goBack method to
    	IFWindowContext. See comment for more.
    
            * WebView.subproj/IFWebView.mm: (-[IFWebView keyDown:]): Add handling
    	for option arrow keys, space (page down), shift-space (page up), and
    	delete (go back). Also make this call super if the key is not handled
    	so keys make their way back to the superview in the application.
    
            * WebView.subproj/IFWebViewPrivate.h: Add _pageLeft, _pageRight, _goBack.
            * WebView.subproj/IFWebViewPrivate.mm:
            (-[IFWebView _pageHorizontally:]): Added.
            (-[IFWebView _pageLeft]): Added.
            (-[IFWebView _pageRight]): Added.
            (+[IFWebView _viewTypes]): Simplify.
            (-[IFWebView _goBack]): Added. Calls [IFWindowContext goBack].
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1538 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 2e8c3ff..94aec81 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,29 @@
+2002-07-11  Darin Adler  <darin at apple.com>
+
+	- fixed 2930872 -- option-arrow keys should page up and down
+	- fixed 2924727 -- Delete does not go to previous page
+
+        * WebView.subproj/IFHTMLView.mm: Disable the keyDown and keyUp
+	methods here. We don't really need to pass these events to KHTMLView
+	at the moment. See the comment in this file for further explanation.
+	This paves the way to handle keys other than arrow keys in IFWebView.
+
+        * WebView.subproj/IFWebController.h: Add temporary goBack method to
+	IFWindowContext. See comment for more.
+
+        * WebView.subproj/IFWebView.mm: (-[IFWebView keyDown:]): Add handling
+	for option arrow keys, space (page down), shift-space (page up), and
+	delete (go back). Also make this call super if the key is not handled
+	so keys make their way back to the superview in the application.
+
+        * WebView.subproj/IFWebViewPrivate.h: Add _pageLeft, _pageRight, _goBack.
+        * WebView.subproj/IFWebViewPrivate.mm:
+        (-[IFWebView _pageHorizontally:]): Added.
+        (-[IFWebView _pageLeft]): Added.
+        (-[IFWebView _pageRight]): Added.
+        (+[IFWebView _viewTypes]): Simplify.
+        (-[IFWebView _goBack]): Added. Calls [IFWindowContext goBack].
+
 2002-07-10  Darin Adler  <darin at apple.com>
 
 	- fixed 2973738 -- box characters
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 2e8c3ff..94aec81 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,29 @@
+2002-07-11  Darin Adler  <darin at apple.com>
+
+	- fixed 2930872 -- option-arrow keys should page up and down
+	- fixed 2924727 -- Delete does not go to previous page
+
+        * WebView.subproj/IFHTMLView.mm: Disable the keyDown and keyUp
+	methods here. We don't really need to pass these events to KHTMLView
+	at the moment. See the comment in this file for further explanation.
+	This paves the way to handle keys other than arrow keys in IFWebView.
+
+        * WebView.subproj/IFWebController.h: Add temporary goBack method to
+	IFWindowContext. See comment for more.
+
+        * WebView.subproj/IFWebView.mm: (-[IFWebView keyDown:]): Add handling
+	for option arrow keys, space (page down), shift-space (page up), and
+	delete (go back). Also make this call super if the key is not handled
+	so keys make their way back to the superview in the application.
+
+        * WebView.subproj/IFWebViewPrivate.h: Add _pageLeft, _pageRight, _goBack.
+        * WebView.subproj/IFWebViewPrivate.mm:
+        (-[IFWebView _pageHorizontally:]): Added.
+        (-[IFWebView _pageLeft]): Added.
+        (-[IFWebView _pageRight]): Added.
+        (+[IFWebView _viewTypes]): Simplify.
+        (-[IFWebView _goBack]): Added. Calls [IFWindowContext goBack].
+
 2002-07-10  Darin Adler  <darin at apple.com>
 
 	- fixed 2973738 -- box characters
diff --git a/WebKit/WebView.subproj/IFHTMLView.mm b/WebKit/WebView.subproj/IFHTMLView.mm
index c928e03..6ec8e5c 100644
--- a/WebKit/WebView.subproj/IFHTMLView.mm
+++ b/WebKit/WebView.subproj/IFHTMLView.mm
@@ -517,6 +517,19 @@
     }
 }
 
+#if 0
+
+// Why don't we call KHTMLView's keyPressEvent/keyReleaseEvent?
+// Because we currently don't benefit from any of the code in there.
+
+// It implements its own version of keyboard scrolling, but we have our
+// version in IFWebView. It implements some keyboard access to individual
+// nodes, but we are probably going to handle that on the NSView side.
+// We already handle normal typing through the responder chain.
+
+// One of the benefits of not calling through to KHTMLView is that we don't
+// have to have the _IF_isScrollEvent function at all.
+
 - (void)keyDown: (NSEvent *)event
 {
     WEBKITDEBUGLEVEL(WEBKIT_LOG_EVENTS, "keyDown: %s\n", DEBUG_OBJECT(event));
@@ -536,7 +549,6 @@
         widget->keyPressEvent(&kEvent);
 }
 
-
 - (void)keyUp: (NSEvent *)event
 {
     WEBKITDEBUGLEVEL(WEBKIT_LOG_EVENTS, "keyUp: %s\n", DEBUG_OBJECT(event));
@@ -556,5 +568,6 @@
         widget->keyReleaseEvent(&kEvent);
 }
 
+#endif
 
 @end
diff --git a/WebKit/WebView.subproj/IFWebController.h b/WebKit/WebView.subproj/IFWebController.h
index 1b2d465..f99f90f 100644
--- a/WebKit/WebView.subproj/IFWebController.h
+++ b/WebKit/WebView.subproj/IFWebController.h
@@ -78,7 +78,7 @@
 */
 @protocol IFWindowContext <NSObject>
 
-- (IFWebController *)openNewWindowWithURL:(NSURL *)url;
+- (IFWebController *)openNewWindowWithURL:(NSURL *)URL;
 
 - (void)setStatusText: (NSString *)text;
 - (NSString *)statusText;
@@ -96,6 +96,11 @@
    
 - (NSWindow *)window;
 
+// FIXME: This is temporary. It's used to tell the client to "go back"
+// when the delete key is pressed. But we are going to move back/forward
+// handling into WebKit, and then this can be removed.
+- (void)goBack;
+
 @end
 
 
diff --git a/WebKit/WebView.subproj/IFWebView.mm b/WebKit/WebView.subproj/IFWebView.mm
index 74cadaf..e4a28fd 100644
--- a/WebKit/WebView.subproj/IFWebView.mm
+++ b/WebKit/WebView.subproj/IFWebView.mm
@@ -20,6 +20,9 @@
 #import <WebFoundation/IFNSURLExtensions.h>
 #import <WebFoundation/WebFoundation.h>
 
+#define SpaceKey 0x0020
+#define DeleteKey 0x007F
+
 @implementation IFWebView
 
 + (void)initialize
@@ -229,43 +232,81 @@
     return window;
 }
 
-- (void)keyDown: (NSEvent *)event
+- (void)keyDown:(NSEvent *)event
 {
-    if ([event type] == NSKeyDown) {
-        NSString *characters = [event characters];
-        int index, count;
-
-        count = [characters length];
-        for (index = 0; index < count; ++index) {
-            switch ([characters characterAtIndex:index]) {
-                case NSPageUpFunctionKey:
+    NSString *characters = [event characters];
+    int index, count;
+    BOOL callSuper = YES;
+
+    count = [characters length];
+    for (index = 0; index < count; ++index) {
+        switch ([characters characterAtIndex:index]) {
+            case DeleteKey:
+                [self _goBack];
+                callSuper = NO;
+                break;
+            case SpaceKey:
+                if ([event modifierFlags] & NSShiftKeyMask) {
                     [self _pageUp];
-                    break;
-                case NSPageDownFunctionKey:
+                } else {
                     [self _pageDown];
-                    break;
-                case NSHomeFunctionKey:
-                    [self _scrollToTopLeft];
-                    break;
-                case NSEndFunctionKey:
-                    [self _scrollToBottomLeft];
-                    break;
-                case NSUpArrowFunctionKey:
+                }
+                callSuper = NO;
+                break;
+            case NSPageUpFunctionKey:
+                [self _pageUp];
+                callSuper = NO;
+                break;
+            case NSPageDownFunctionKey:
+                [self _pageDown];
+                callSuper = NO;
+                break;
+            case NSHomeFunctionKey:
+                [self _scrollToTopLeft];
+                callSuper = NO;
+                break;
+            case NSEndFunctionKey:
+                [self _scrollToBottomLeft];
+                callSuper = NO;
+                break;
+            case NSUpArrowFunctionKey:
+                if ([event modifierFlags] & NSAlternateKeyMask) {
+                    [self _pageUp];
+                } else {
                     [self _lineUp];
-                    break;
-                case NSDownArrowFunctionKey:
+                }
+                callSuper = NO;
+                break;
+            case NSDownArrowFunctionKey:
+                if ([event modifierFlags] & NSAlternateKeyMask) {
+                    [self _pageDown];
+                } else {
                     [self _lineDown];
-                    break;
-                case NSLeftArrowFunctionKey:
+                }
+                callSuper = NO;
+                break;
+            case NSLeftArrowFunctionKey:
+                if ([event modifierFlags] & NSAlternateKeyMask) {
+                    [self _pageLeft];
+                } else {
                     [self _lineLeft];
-                    break;
-                case NSRightArrowFunctionKey:
+                }
+                callSuper = NO;
+                break;
+            case NSRightArrowFunctionKey:
+                if ([event modifierFlags] & NSAlternateKeyMask) {
+                    [self _pageRight];
+                } else {
                     [self _lineRight];
-                    break;
-                default: break;
-            }
+                }
+                callSuper = NO;
+                break;
         }
     }
+    
+    if (callSuper) {
+        [super keyDown:event];
+    }
 }
 
 @end
diff --git a/WebKit/WebView.subproj/IFWebViewPrivate.h b/WebKit/WebView.subproj/IFWebViewPrivate.h
index 683e5a2..1f83e68 100644
--- a/WebKit/WebView.subproj/IFWebViewPrivate.h
+++ b/WebKit/WebView.subproj/IFWebViewPrivate.h
@@ -41,12 +41,15 @@ class QWidget;
 - (void)_scrollLineHorizontally: (BOOL)left;
 - (void)_pageDown;
 - (void)_pageUp;
+- (void)_pageLeft;
+- (void)_pageRight;
 - (void)_scrollToTopLeft;
 - (void)_scrollToBottomLeft;
 - (void)_lineDown;
 - (void)_lineUp;
 - (void)_lineLeft;
 - (void)_lineRight;
+- (void)_goBack;
 + (NSMutableDictionary *)_viewTypes;
 + (BOOL)_canShowMIMEType:(NSString *)MIMEType;
 @end
diff --git a/WebKit/WebView.subproj/IFWebViewPrivate.mm b/WebKit/WebView.subproj/IFWebViewPrivate.mm
index 99762c6..27ce8b2 100644
--- a/WebKit/WebView.subproj/IFWebViewPrivate.mm
+++ b/WebKit/WebView.subproj/IFWebViewPrivate.mm
@@ -13,8 +13,6 @@
 #import <WebKit/IFImageView.h>
 #import <WebKit/IFTextView.h>
 
-static NSMutableDictionary *_viewTypes=nil;
-
 @implementation IFWebViewPrivate
 
 - init
@@ -112,6 +110,20 @@ static NSMutableDictionary *_viewTypes=nil;
     [self _scrollVerticallyBy: delta];
 }
 
+- (void)_pageHorizontally: (BOOL)left
+{
+    float pageOverlap = [[self frameScrollView] horizontalPageScroll];
+    float delta = [[self _contentView] bounds].size.width;
+    
+    delta = (delta < pageOverlap) ? delta / 2.0 : delta - pageOverlap;
+
+    if (left) {
+        delta = -delta;
+    }
+
+    [self _scrollHorizontallyBy: delta];
+}
+
 - (void)_scrollLineVertically: (BOOL)up
 {
     // verticalLineScroll is quite small, to make scrolling from the scroll bar
@@ -147,6 +159,16 @@ static NSMutableDictionary *_viewTypes=nil;
     [self _pageVertically: YES];
 }
 
+- (void)_pageLeft
+{
+    [self _pageHorizontally: YES];
+}
+
+- (void)_pageRight
+{
+    [self _pageHorizontally: NO];
+}
+
 - (void)_scrollToTopLeft
 {
     [[self _contentView] scrollPoint: NSMakePoint(0, 0)];
@@ -177,17 +199,21 @@ static NSMutableDictionary *_viewTypes=nil;
     [self _scrollLineHorizontally: NO];
 }
 
-+ (NSMutableDictionary *)_viewTypes
++ (NSDictionary *)_viewTypes
 {
-    if(!_viewTypes){
-        _viewTypes = [[NSMutableDictionary dictionary] retain];
-        [_viewTypes setObject:[IFHTMLView class]  forKey:@"text/html"];
-        [_viewTypes setObject:[IFTextView class]  forKey:@"text/"];
-        [_viewTypes setObject:[IFImageView class] forKey:@"image/jpeg"];
-        [_viewTypes setObject:[IFImageView class] forKey:@"image/gif"];
-        [_viewTypes setObject:[IFImageView class] forKey:@"image/png"];
+    static NSDictionary *viewTypes;
+
+    if (!viewTypes) {
+        viewTypes = [[NSDictionary alloc] initWithObjectsAndKeys:
+            [IFHTMLView class], @"text/html",
+            [IFTextView class], @"text/",
+            [IFImageView class], @"image/jpeg",
+            [IFImageView class], @"image/gif",
+            [IFImageView class], @"image/png",
+            nil];
     }
-    return _viewTypes;
+    
+    return viewTypes;
 }
 
 
@@ -212,4 +238,9 @@ static NSMutableDictionary *_viewTypes=nil;
     return NO;
 }
 
+- (void)_goBack
+{
+    [[[self _controller] windowContext] goBack];
+}
+
 @end
diff --git a/WebKit/WebView.subproj/WebController.h b/WebKit/WebView.subproj/WebController.h
index 1b2d465..f99f90f 100644
--- a/WebKit/WebView.subproj/WebController.h
+++ b/WebKit/WebView.subproj/WebController.h
@@ -78,7 +78,7 @@
 */
 @protocol IFWindowContext <NSObject>
 
-- (IFWebController *)openNewWindowWithURL:(NSURL *)url;
+- (IFWebController *)openNewWindowWithURL:(NSURL *)URL;
 
 - (void)setStatusText: (NSString *)text;
 - (NSString *)statusText;
@@ -96,6 +96,11 @@
    
 - (NSWindow *)window;
 
+// FIXME: This is temporary. It's used to tell the client to "go back"
+// when the delete key is pressed. But we are going to move back/forward
+// handling into WebKit, and then this can be removed.
+- (void)goBack;
+
 @end
 
 
diff --git a/WebKit/WebView.subproj/WebFrameView.m b/WebKit/WebView.subproj/WebFrameView.m
index 74cadaf..e4a28fd 100644
--- a/WebKit/WebView.subproj/WebFrameView.m
+++ b/WebKit/WebView.subproj/WebFrameView.m
@@ -20,6 +20,9 @@
 #import <WebFoundation/IFNSURLExtensions.h>
 #import <WebFoundation/WebFoundation.h>
 
+#define SpaceKey 0x0020
+#define DeleteKey 0x007F
+
 @implementation IFWebView
 
 + (void)initialize
@@ -229,43 +232,81 @@
     return window;
 }
 
-- (void)keyDown: (NSEvent *)event
+- (void)keyDown:(NSEvent *)event
 {
-    if ([event type] == NSKeyDown) {
-        NSString *characters = [event characters];
-        int index, count;
-
-        count = [characters length];
-        for (index = 0; index < count; ++index) {
-            switch ([characters characterAtIndex:index]) {
-                case NSPageUpFunctionKey:
+    NSString *characters = [event characters];
+    int index, count;
+    BOOL callSuper = YES;
+
+    count = [characters length];
+    for (index = 0; index < count; ++index) {
+        switch ([characters characterAtIndex:index]) {
+            case DeleteKey:
+                [self _goBack];
+                callSuper = NO;
+                break;
+            case SpaceKey:
+                if ([event modifierFlags] & NSShiftKeyMask) {
                     [self _pageUp];
-                    break;
-                case NSPageDownFunctionKey:
+                } else {
                     [self _pageDown];
-                    break;
-                case NSHomeFunctionKey:
-                    [self _scrollToTopLeft];
-                    break;
-                case NSEndFunctionKey:
-                    [self _scrollToBottomLeft];
-                    break;
-                case NSUpArrowFunctionKey:
+                }
+                callSuper = NO;
+                break;
+            case NSPageUpFunctionKey:
+                [self _pageUp];
+                callSuper = NO;
+                break;
+            case NSPageDownFunctionKey:
+                [self _pageDown];
+                callSuper = NO;
+                break;
+            case NSHomeFunctionKey:
+                [self _scrollToTopLeft];
+                callSuper = NO;
+                break;
+            case NSEndFunctionKey:
+                [self _scrollToBottomLeft];
+                callSuper = NO;
+                break;
+            case NSUpArrowFunctionKey:
+                if ([event modifierFlags] & NSAlternateKeyMask) {
+                    [self _pageUp];
+                } else {
                     [self _lineUp];
-                    break;
-                case NSDownArrowFunctionKey:
+                }
+                callSuper = NO;
+                break;
+            case NSDownArrowFunctionKey:
+                if ([event modifierFlags] & NSAlternateKeyMask) {
+                    [self _pageDown];
+                } else {
                     [self _lineDown];
-                    break;
-                case NSLeftArrowFunctionKey:
+                }
+                callSuper = NO;
+                break;
+            case NSLeftArrowFunctionKey:
+                if ([event modifierFlags] & NSAlternateKeyMask) {
+                    [self _pageLeft];
+                } else {
                     [self _lineLeft];
-                    break;
-                case NSRightArrowFunctionKey:
+                }
+                callSuper = NO;
+                break;
+            case NSRightArrowFunctionKey:
+                if ([event modifierFlags] & NSAlternateKeyMask) {
+                    [self _pageRight];
+                } else {
                     [self _lineRight];
-                    break;
-                default: break;
-            }
+                }
+                callSuper = NO;
+                break;
         }
     }
+    
+    if (callSuper) {
+        [super keyDown:event];
+    }
 }
 
 @end
diff --git a/WebKit/WebView.subproj/WebFrameViewInternal.h b/WebKit/WebView.subproj/WebFrameViewInternal.h
index 683e5a2..1f83e68 100644
--- a/WebKit/WebView.subproj/WebFrameViewInternal.h
+++ b/WebKit/WebView.subproj/WebFrameViewInternal.h
@@ -41,12 +41,15 @@ class QWidget;
 - (void)_scrollLineHorizontally: (BOOL)left;
 - (void)_pageDown;
 - (void)_pageUp;
+- (void)_pageLeft;
+- (void)_pageRight;
 - (void)_scrollToTopLeft;
 - (void)_scrollToBottomLeft;
 - (void)_lineDown;
 - (void)_lineUp;
 - (void)_lineLeft;
 - (void)_lineRight;
+- (void)_goBack;
 + (NSMutableDictionary *)_viewTypes;
 + (BOOL)_canShowMIMEType:(NSString *)MIMEType;
 @end
diff --git a/WebKit/WebView.subproj/WebFrameViewPrivate.h b/WebKit/WebView.subproj/WebFrameViewPrivate.h
index 683e5a2..1f83e68 100644
--- a/WebKit/WebView.subproj/WebFrameViewPrivate.h
+++ b/WebKit/WebView.subproj/WebFrameViewPrivate.h
@@ -41,12 +41,15 @@ class QWidget;
 - (void)_scrollLineHorizontally: (BOOL)left;
 - (void)_pageDown;
 - (void)_pageUp;
+- (void)_pageLeft;
+- (void)_pageRight;
 - (void)_scrollToTopLeft;
 - (void)_scrollToBottomLeft;
 - (void)_lineDown;
 - (void)_lineUp;
 - (void)_lineLeft;
 - (void)_lineRight;
+- (void)_goBack;
 + (NSMutableDictionary *)_viewTypes;
 + (BOOL)_canShowMIMEType:(NSString *)MIMEType;
 @end
diff --git a/WebKit/WebView.subproj/WebFrameViewPrivate.m b/WebKit/WebView.subproj/WebFrameViewPrivate.m
index 99762c6..27ce8b2 100644
--- a/WebKit/WebView.subproj/WebFrameViewPrivate.m
+++ b/WebKit/WebView.subproj/WebFrameViewPrivate.m
@@ -13,8 +13,6 @@
 #import <WebKit/IFImageView.h>
 #import <WebKit/IFTextView.h>
 
-static NSMutableDictionary *_viewTypes=nil;
-
 @implementation IFWebViewPrivate
 
 - init
@@ -112,6 +110,20 @@ static NSMutableDictionary *_viewTypes=nil;
     [self _scrollVerticallyBy: delta];
 }
 
+- (void)_pageHorizontally: (BOOL)left
+{
+    float pageOverlap = [[self frameScrollView] horizontalPageScroll];
+    float delta = [[self _contentView] bounds].size.width;
+    
+    delta = (delta < pageOverlap) ? delta / 2.0 : delta - pageOverlap;
+
+    if (left) {
+        delta = -delta;
+    }
+
+    [self _scrollHorizontallyBy: delta];
+}
+
 - (void)_scrollLineVertically: (BOOL)up
 {
     // verticalLineScroll is quite small, to make scrolling from the scroll bar
@@ -147,6 +159,16 @@ static NSMutableDictionary *_viewTypes=nil;
     [self _pageVertically: YES];
 }
 
+- (void)_pageLeft
+{
+    [self _pageHorizontally: YES];
+}
+
+- (void)_pageRight
+{
+    [self _pageHorizontally: NO];
+}
+
 - (void)_scrollToTopLeft
 {
     [[self _contentView] scrollPoint: NSMakePoint(0, 0)];
@@ -177,17 +199,21 @@ static NSMutableDictionary *_viewTypes=nil;
     [self _scrollLineHorizontally: NO];
 }
 
-+ (NSMutableDictionary *)_viewTypes
++ (NSDictionary *)_viewTypes
 {
-    if(!_viewTypes){
-        _viewTypes = [[NSMutableDictionary dictionary] retain];
-        [_viewTypes setObject:[IFHTMLView class]  forKey:@"text/html"];
-        [_viewTypes setObject:[IFTextView class]  forKey:@"text/"];
-        [_viewTypes setObject:[IFImageView class] forKey:@"image/jpeg"];
-        [_viewTypes setObject:[IFImageView class] forKey:@"image/gif"];
-        [_viewTypes setObject:[IFImageView class] forKey:@"image/png"];
+    static NSDictionary *viewTypes;
+
+    if (!viewTypes) {
+        viewTypes = [[NSDictionary alloc] initWithObjectsAndKeys:
+            [IFHTMLView class], @"text/html",
+            [IFTextView class], @"text/",
+            [IFImageView class], @"image/jpeg",
+            [IFImageView class], @"image/gif",
+            [IFImageView class], @"image/png",
+            nil];
     }
-    return _viewTypes;
+    
+    return viewTypes;
 }
 
 
@@ -212,4 +238,9 @@ static NSMutableDictionary *_viewTypes=nil;
     return NO;
 }
 
+- (void)_goBack
+{
+    [[[self _controller] windowContext] goBack];
+}
+
 @end
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index c928e03..6ec8e5c 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -517,6 +517,19 @@
     }
 }
 
+#if 0
+
+// Why don't we call KHTMLView's keyPressEvent/keyReleaseEvent?
+// Because we currently don't benefit from any of the code in there.
+
+// It implements its own version of keyboard scrolling, but we have our
+// version in IFWebView. It implements some keyboard access to individual
+// nodes, but we are probably going to handle that on the NSView side.
+// We already handle normal typing through the responder chain.
+
+// One of the benefits of not calling through to KHTMLView is that we don't
+// have to have the _IF_isScrollEvent function at all.
+
 - (void)keyDown: (NSEvent *)event
 {
     WEBKITDEBUGLEVEL(WEBKIT_LOG_EVENTS, "keyDown: %s\n", DEBUG_OBJECT(event));
@@ -536,7 +549,6 @@
         widget->keyPressEvent(&kEvent);
 }
 
-
 - (void)keyUp: (NSEvent *)event
 {
     WEBKITDEBUGLEVEL(WEBKIT_LOG_EVENTS, "keyUp: %s\n", DEBUG_OBJECT(event));
@@ -556,5 +568,6 @@
         widget->keyReleaseEvent(&kEvent);
 }
 
+#endif
 
 @end
diff --git a/WebKit/WebView.subproj/WebView.h b/WebKit/WebView.subproj/WebView.h
index 1b2d465..f99f90f 100644
--- a/WebKit/WebView.subproj/WebView.h
+++ b/WebKit/WebView.subproj/WebView.h
@@ -78,7 +78,7 @@
 */
 @protocol IFWindowContext <NSObject>
 
-- (IFWebController *)openNewWindowWithURL:(NSURL *)url;
+- (IFWebController *)openNewWindowWithURL:(NSURL *)URL;
 
 - (void)setStatusText: (NSString *)text;
 - (NSString *)statusText;
@@ -96,6 +96,11 @@
    
 - (NSWindow *)window;
 
+// FIXME: This is temporary. It's used to tell the client to "go back"
+// when the delete key is pressed. But we are going to move back/forward
+// handling into WebKit, and then this can be removed.
+- (void)goBack;
+
 @end
 
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list