[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:38:20 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit b485798a76e2253052e239435a72f1608ae2ef84
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Sep 11 21:05:00 2002 +0000
- fixed 3047552 -- crash using CFNotification calls on an NSNotification
* kwq/KWQWindowWidget.mm:
(KWQWindowWidget::KWQWindowWidget): Create a KWQWindowWidgetDeleter, and
hook it up to the notification.
(KWQWindowWidget::~KWQWindowWidget): Disconnect the KWQWindowWidgetDeleter
and release it.
(-[KWQWindowWidgetDeleter initWithWindowWidget:]): Store a pointer.
(-[KWQWindowWidgetDeleter deleteWindowWidget]): Do a delete.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2038 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 126f35c..a55418a 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,5 +1,17 @@
2002-09-11 Darin Adler <darin at apple.com>
+ - fixed 3047552 -- crash using CFNotification calls on an NSNotification
+
+ * kwq/KWQWindowWidget.mm:
+ (KWQWindowWidget::KWQWindowWidget): Create a KWQWindowWidgetDeleter, and
+ hook it up to the notification.
+ (KWQWindowWidget::~KWQWindowWidget): Disconnect the KWQWindowWidgetDeleter
+ and release it.
+ (-[KWQWindowWidgetDeleter initWithWindowWidget:]): Store a pointer.
+ (-[KWQWindowWidgetDeleter deleteWindowWidget]): Do a delete.
+
+2002-09-11 Darin Adler <darin at apple.com>
+
- fixed 3021137 -- changing font prefs doesn't redraw frames
other than the main frame
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 126f35c..a55418a 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,5 +1,17 @@
2002-09-11 Darin Adler <darin at apple.com>
+ - fixed 3047552 -- crash using CFNotification calls on an NSNotification
+
+ * kwq/KWQWindowWidget.mm:
+ (KWQWindowWidget::KWQWindowWidget): Create a KWQWindowWidgetDeleter, and
+ hook it up to the notification.
+ (KWQWindowWidget::~KWQWindowWidget): Disconnect the KWQWindowWidgetDeleter
+ and release it.
+ (-[KWQWindowWidgetDeleter initWithWindowWidget:]): Store a pointer.
+ (-[KWQWindowWidgetDeleter deleteWindowWidget]): Do a delete.
+
+2002-09-11 Darin Adler <darin at apple.com>
+
- fixed 3021137 -- changing font prefs doesn't redraw frames
other than the main frame
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 126f35c..a55418a 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,17 @@
2002-09-11 Darin Adler <darin at apple.com>
+ - fixed 3047552 -- crash using CFNotification calls on an NSNotification
+
+ * kwq/KWQWindowWidget.mm:
+ (KWQWindowWidget::KWQWindowWidget): Create a KWQWindowWidgetDeleter, and
+ hook it up to the notification.
+ (KWQWindowWidget::~KWQWindowWidget): Disconnect the KWQWindowWidgetDeleter
+ and release it.
+ (-[KWQWindowWidgetDeleter initWithWindowWidget:]): Store a pointer.
+ (-[KWQWindowWidgetDeleter deleteWindowWidget]): Do a delete.
+
+2002-09-11 Darin Adler <darin at apple.com>
+
- fixed 3021137 -- changing font prefs doesn't redraw frames
other than the main frame
diff --git a/WebCore/kwq/KWQWindowWidget.mm b/WebCore/kwq/KWQWindowWidget.mm
index 5b32f8d..7a693cf 100644
--- a/WebCore/kwq/KWQWindowWidget.mm
+++ b/WebCore/kwq/KWQWindowWidget.mm
@@ -27,14 +27,44 @@
#import <Cocoa/Cocoa.h>
+ at interface KWQWindowWidgetDeleter : NSObject
+{
+ KWQWindowWidget *_widget;
+}
+- initWithWindowWidget:(KWQWindowWidget *)widget;
+- (void)deleteWindowWidget;
+ at end
+
class KWQWindowWidgetPrivate
{
public:
NSWindow *window;
+ KWQWindowWidgetDeleter *deleter;
};
static CFMutableDictionaryRef windowWidgets = NULL;
+KWQWindowWidget::KWQWindowWidget(NSWindow *window) :
+ d(new KWQWindowWidgetPrivate())
+{
+ d->window = [window retain];
+ d->deleter = [[KWQWindowWidgetDeleter alloc] initWithWindowWidget:this];
+
+ [[NSNotificationCenter defaultCenter] addObserver:d->deleter
+ selector:@selector(deleteWindowWidget) name:NSWindowWillCloseNotification object:window];
+}
+
+KWQWindowWidget::~KWQWindowWidget()
+{
+ CFDictionaryRemoveValue(windowWidgets, d->window);
+ [[NSNotificationCenter defaultCenter] removeObserver:d->deleter];
+
+ [d->window release];
+ [d->deleter release];
+
+ delete d;
+}
+
KWQWindowWidget *KWQWindowWidget::fromNSWindow(NSWindow *window)
{
if (windowWidgets == NULL) {
@@ -50,33 +80,6 @@ KWQWindowWidget *KWQWindowWidget::fromNSWindow(NSWindow *window)
return widget;
}
-
-static void deleteOnWindowClose(CFNotificationCenterRef center, void *observer, CFStringRef name, const void *object, CFDictionaryRef userInfo)
-{
- delete (KWQWindowWidget *)observer;
-}
-
-KWQWindowWidget::KWQWindowWidget(NSWindow *window) :
- d(new KWQWindowWidgetPrivate())
-{
- d->window = [window retain];
-
- CFNotificationCenterAddObserver
- ((CFNotificationCenterRef)[NSNotificationCenter defaultCenter],
- this, deleteOnWindowClose, (CFStringRef)NSWindowWillCloseNotification,
- d->window, CFNotificationSuspensionBehaviorDeliverImmediately);
-}
-
-KWQWindowWidget::~KWQWindowWidget()
-{
- CFDictionaryRemoveValue(windowWidgets, d->window);
- CFNotificationCenterRemoveObserver
- ((CFNotificationCenterRef)[NSNotificationCenter defaultCenter],
- this, (CFStringRef)NSWindowWillCloseNotification, d->window);
- [d->window release];
- delete d;
-}
-
QSize KWQWindowWidget::sizeHint() const
{
return size();
@@ -113,3 +116,19 @@ void KWQWindowWidget::setFrameGeometry(const QRect &r)
// FIXME: should try to avoid saving changes
[d->window setFrame:NSMakeRect(r.x(), NSMaxY([[[NSScreen screens] objectAtIndex:0] frame]) - r.y() - r.height(), r.width(), r.height()) display:NO];
}
+
+ at implementation KWQWindowWidgetDeleter
+
+- initWithWindowWidget:(KWQWindowWidget *)widget
+{
+ [super init];
+ _widget = widget;
+ return self;
+}
+
+- (void)deleteWindowWidget
+{
+ delete _widget;
+}
+
+ at end
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list