Reviewed by Ken.
authorsullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Sep 2004 18:08:25 +0000 (18:08 +0000)
committersullivan <sullivan@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 21 Sep 2004 18:08:25 +0000 (18:08 +0000)
        - fixed <rdar://problem/3809477> WebHTMLView needs to pass doCommandBySelector through delegate

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView doCommandBySelector:]):
        Call through to editing delegate. If editing delegate returns YES, don't call super.

        * WebView.subproj/WebDefaultEditingDelegate.m:
        (-[WebDefaultEditingDelegate webView:doCommandBySelector:]):
        default implementation (which was never called) was returning YES, but it should
        return NO to signal that it didn't handle the selector.

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

WebKit/ChangeLog
WebKit/WebView.subproj/WebDefaultEditingDelegate.m
WebKit/WebView.subproj/WebHTMLView.m

index e1ba905..844404f 100644 (file)
@@ -1,3 +1,18 @@
+2004-09-21  John Sullivan  <sullivan@apple.com>
+
+        Reviewed by Ken.
+        
+        - fixed <rdar://problem/3809477> WebHTMLView needs to pass doCommandBySelector through delegate
+
+        * WebView.subproj/WebHTMLView.m:
+        (-[WebHTMLView doCommandBySelector:]):
+        Call through to editing delegate. If editing delegate returns YES, don't call super.
+
+        * WebView.subproj/WebDefaultEditingDelegate.m:
+        (-[WebDefaultEditingDelegate webView:doCommandBySelector:]):
+        default implementation (which was never called) was returning YES, but it should
+        return NO to signal that it didn't handle the selector.
+        
 2004-09-21  Chris Blumenberg  <cblu@apple.com>
 
        Fixed: <rdar://problem/3647229> Safari does not play inline Windows Media Content on some sites (miggy.net and ministryofsound.com)
index f6bcd05..12b2ea7 100644 (file)
@@ -64,7 +64,7 @@ static WebDefaultEditingDelegate *sharedDelegate = nil;
 
 - (BOOL)webView:(WebView *)webView doCommandBySelector:(SEL)selector
 {
-    return YES;
+    return NO;
 }
 
 - (void)webViewDidBeginEditing:(NSNotification *)notification
index 48eb801..7d83516 100644 (file)
@@ -4045,7 +4045,9 @@ static DOMRange *unionDOMRanges(DOMRange *a, DOMRange *b)
 
 - (void)doCommandBySelector:(SEL)aSelector
 {
-    [super doCommandBySelector:aSelector];
+    if (![[webView _editingDelegateForwarder] webView:webView doCommandBySelector:aSelector]) {
+        [super doCommandBySelector:aSelector];
+    }
 }
 
 - (void)_discardMarkedText