[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
kocienda
kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:48:49 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 09190ca56dd3ff4c6b93b57c499fc79895d988f6
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Jul 6 15:46:43 2004 +0000
Reviewed by Trey
Only register the editing delegate for those notifications for which it implements the callbacks.
* WebView.subproj/WebView.m:
(-[WebView registerForEditingDelegateNotification:selector:]):
(-[WebView setEditingDelegate:]):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6960 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index ee1b752..16e8c82 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,13 @@
+2004-07-06 Ken Kocienda <kocienda at apple.com>
+
+ Reviewed by Trey
+
+ Only register the editing delegate for those notifications for which it implements the callbacks.
+
+ * WebView.subproj/WebView.m:
+ (-[WebView registerForEditingDelegateNotification:selector:]):
+ (-[WebView setEditingDelegate:]):
+
2004-07-06 Trey Matteson <trey at apple.com>
3294652 - Failed drag of links doesn't slide back
diff --git a/WebKit/WebView.subproj/WebView.m b/WebKit/WebView.subproj/WebView.m
index ac06ff0..efe7af5 100644
--- a/WebKit/WebView.subproj/WebView.m
+++ b/WebKit/WebView.subproj/WebView.m
@@ -2489,6 +2489,13 @@ static WebFrame *incrementFrame(WebFrame *curr, BOOL forward, BOOL wrapFlag)
return [super undoManager];
}
+- (void)registerForEditingDelegateNotification:(NSString *)name selector:(SEL)selector
+{
+ NSNotificationCenter *defaultCenter = [NSNotificationCenter defaultCenter];
+ if ([_private->editingDelegate respondsToSelector:selector])
+ [defaultCenter addObserver:_private->editingDelegate selector:selector name:name object:self];
+}
+
- (void)setEditingDelegate:(id)delegate
{
if (_private->editingDelegate == delegate)
@@ -2508,11 +2515,11 @@ static WebFrame *incrementFrame(WebFrame *curr, BOOL forward, BOOL wrapFlag)
_private->editingDelegateForwarder = nil;
// add notifications for new delegate
- [defaultCenter addObserver:_private->editingDelegate selector:@selector(webViewDidBeginEditing:) name:WebViewDidBeginEditingNotification object:self];
- [defaultCenter addObserver:_private->editingDelegate selector:@selector(webViewDidChange:) name:WebViewDidChangeNotification object:self];
- [defaultCenter addObserver:_private->editingDelegate selector:@selector(webViewDidEndEditing:) name:WebViewDidEndEditingNotification object:self];
- [defaultCenter addObserver:_private->editingDelegate selector:@selector(webViewDidChangeTypingStyle:) name:WebViewDidChangeTypingStyleNotification object:self];
- [defaultCenter addObserver:_private->editingDelegate selector:@selector(webViewDidChangeSelection:) name:WebViewDidChangeSelectionNotification object:self];
+ [self registerForEditingDelegateNotification:WebViewDidBeginEditingNotification selector:@selector(webViewDidBeginEditing:)];
+ [self registerForEditingDelegateNotification:WebViewDidChangeNotification selector:@selector(webViewDidChange:)];
+ [self registerForEditingDelegateNotification:WebViewDidEndEditingNotification selector:@selector(webViewDidEndEditing:)];
+ [self registerForEditingDelegateNotification:WebViewDidChangeTypingStyleNotification selector:@selector(webViewDidChangeTypingStyle:)];
+ [self registerForEditingDelegateNotification:WebViewDidChangeSelectionNotification selector:@selector(webViewDidChangeSelection:)];
}
- (id)editingDelegate
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list