[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:27 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit c74ff0151406b2edd68c4d01d478c644927625da
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Jul 5 18:06:57 2002 +0000
Fix crashes I saw with zombies enabled caused by messing with windows that are
in the process of being destroyed.
* Plugins.subproj/IFPluginView.mm:
(-[IFPluginView start]): Remove windowWillClose notification because
we use viewDidMoveToWindow instead.
(-[IFPluginView viewDidMoveToWindow]): Use this instead of viewWillMoveToWindow.
* WebView.subproj/IFHTMLView.mm:
(-[IFHTMLView viewDidMoveToWindow]): Use this instead of viewWillMoveToWindow.
* WebView.subproj/IFHTMLViewPrivate.h: Need a boolean flag to tell window changes
before the first time we are installed from window changes afterward.
* WebView.subproj/IFImageView.m:
(-[IFImageView viewDidMoveToWindow]): Use this instead of viewWillMoveToWindow.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1516 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 655eb80..2264094 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,19 @@
+2002-07-05 Darin Adler <darin at apple.com>
+
+ Fix crashes I saw with zombies enabled caused by messing with windows that are
+ in the process of being destroyed.
+
+ * Plugins.subproj/IFPluginView.mm:
+ (-[IFPluginView start]): Remove windowWillClose notification because
+ we use viewDidMoveToWindow instead.
+ (-[IFPluginView viewDidMoveToWindow]): Use this instead of viewWillMoveToWindow.
+ * WebView.subproj/IFHTMLView.mm:
+ (-[IFHTMLView viewDidMoveToWindow]): Use this instead of viewWillMoveToWindow.
+ * WebView.subproj/IFHTMLViewPrivate.h: Need a boolean flag to tell window changes
+ before the first time we are installed from window changes afterward.
+ * WebView.subproj/IFImageView.m:
+ (-[IFImageView viewDidMoveToWindow]): Use this instead of viewWillMoveToWindow.
+
2002-07-04 Maciej Stachowiak <mjs at apple.com>
* WebView.subproj/IFHTMLView.mm:
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 655eb80..2264094 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,19 @@
+2002-07-05 Darin Adler <darin at apple.com>
+
+ Fix crashes I saw with zombies enabled caused by messing with windows that are
+ in the process of being destroyed.
+
+ * Plugins.subproj/IFPluginView.mm:
+ (-[IFPluginView start]): Remove windowWillClose notification because
+ we use viewDidMoveToWindow instead.
+ (-[IFPluginView viewDidMoveToWindow]): Use this instead of viewWillMoveToWindow.
+ * WebView.subproj/IFHTMLView.mm:
+ (-[IFHTMLView viewDidMoveToWindow]): Use this instead of viewWillMoveToWindow.
+ * WebView.subproj/IFHTMLViewPrivate.h: Need a boolean flag to tell window changes
+ before the first time we are installed from window changes afterward.
+ * WebView.subproj/IFImageView.m:
+ (-[IFImageView viewDidMoveToWindow]): Use this instead of viewWillMoveToWindow.
+
2002-07-04 Maciej Stachowiak <mjs at apple.com>
* WebView.subproj/IFHTMLView.mm:
diff --git a/WebKit/Plugins.subproj/IFPluginView.mm b/WebKit/Plugins.subproj/IFPluginView.mm
index f2ff640..5f302df 100644
--- a/WebKit/Plugins.subproj/IFPluginView.mm
+++ b/WebKit/Plugins.subproj/IFPluginView.mm
@@ -436,8 +436,6 @@ static char *newCString(NSString *string)
[notificationCenter addObserver:self selector:@selector(viewHasMoved:)
name:NSViewBoundsDidChangeNotification object:view];
}
- [notificationCenter addObserver:self selector:@selector(windowWillClose:)
- name:NSWindowWillCloseNotification object:theWindow];
[notificationCenter addObserver:self selector:@selector(windowBecameKey:)
name:NSWindowDidBecomeKeyNotification object:theWindow];
[notificationCenter addObserver:self selector:@selector(windowResignedKey:)
@@ -491,7 +489,7 @@ static char *newCString(NSString *string)
// Release web objects here to avoid circular retain
[webController release];
[webFrame release];
- [webDataSource release];
+ [webDataSource release];
#ifndef NDEBUG
NPError npErr =
@@ -596,11 +594,11 @@ static char *newCString(NSString *string)
return YES;
}
-- (void)viewWillMoveToWindow:(NSWindow *)newWindow
+- (void)viewDidMoveToWindow
{
- if (!newWindow)
+ if (![self window])
[self stop];
- [super viewWillMoveToWindow:newWindow];
+ [super viewDidMoveToWindow];
}
#pragma mark NOTIFICATIONS
@@ -626,11 +624,6 @@ static char *newCString(NSString *string)
[self performSelector:@selector(sendUpdateEvent) withObject:nil afterDelay:.001];
}
-- (void) windowWillClose:(NSNotification *)notification
-{
- [self stop];
-}
-
- (void) defaultsHaveChanged:(NSNotification *)notification
{
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
diff --git a/WebKit/Plugins.subproj/WebPluginView.m b/WebKit/Plugins.subproj/WebPluginView.m
index f2ff640..5f302df 100644
--- a/WebKit/Plugins.subproj/WebPluginView.m
+++ b/WebKit/Plugins.subproj/WebPluginView.m
@@ -436,8 +436,6 @@ static char *newCString(NSString *string)
[notificationCenter addObserver:self selector:@selector(viewHasMoved:)
name:NSViewBoundsDidChangeNotification object:view];
}
- [notificationCenter addObserver:self selector:@selector(windowWillClose:)
- name:NSWindowWillCloseNotification object:theWindow];
[notificationCenter addObserver:self selector:@selector(windowBecameKey:)
name:NSWindowDidBecomeKeyNotification object:theWindow];
[notificationCenter addObserver:self selector:@selector(windowResignedKey:)
@@ -491,7 +489,7 @@ static char *newCString(NSString *string)
// Release web objects here to avoid circular retain
[webController release];
[webFrame release];
- [webDataSource release];
+ [webDataSource release];
#ifndef NDEBUG
NPError npErr =
@@ -596,11 +594,11 @@ static char *newCString(NSString *string)
return YES;
}
-- (void)viewWillMoveToWindow:(NSWindow *)newWindow
+- (void)viewDidMoveToWindow
{
- if (!newWindow)
+ if (![self window])
[self stop];
- [super viewWillMoveToWindow:newWindow];
+ [super viewDidMoveToWindow];
}
#pragma mark NOTIFICATIONS
@@ -626,11 +624,6 @@ static char *newCString(NSString *string)
[self performSelector:@selector(sendUpdateEvent) withObject:nil afterDelay:.001];
}
-- (void) windowWillClose:(NSNotification *)notification
-{
- [self stop];
-}
-
- (void) defaultsHaveChanged:(NSNotification *)notification
{
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
diff --git a/WebKit/WebView.subproj/IFHTMLView.mm b/WebKit/WebView.subproj/IFHTMLView.mm
index e1de142..72a508c 100644
--- a/WebKit/WebView.subproj/IFHTMLView.mm
+++ b/WebKit/WebView.subproj/IFHTMLView.mm
@@ -104,13 +104,22 @@
}
-- (void)viewWillMoveToWindow:(NSWindow *)window
-{
- if ([self window] && !window) {
- [self removeNotifications];
- [self _reset];
+- (void)viewDidMoveToWindow
+{
+ if ([self window]) {
+ _private->inWindow = YES;
+ } else {
+ // Reset when we are moved out of a window after being moved into one.
+ // Without this check, we reset ourselves before we even start.
+ // This is only needed because viewDidMoveToWindow is called even when
+ // the window is not changing (bug in AppKit).
+ if (_private->inWindow) {
+ [self removeNotifications];
+ [self _reset];
+ _private->inWindow = NO;
+ }
}
- [super viewWillMoveToWindow:window];
+ [super viewDidMoveToWindow];
}
diff --git a/WebKit/WebView.subproj/IFHTMLViewPrivate.h b/WebKit/WebView.subproj/IFHTMLViewPrivate.h
index 40b4b17..5f6ba07 100644
--- a/WebKit/WebView.subproj/IFHTMLViewPrivate.h
+++ b/WebKit/WebView.subproj/IFHTMLViewPrivate.h
@@ -28,6 +28,7 @@ class KHTMLView;
BOOL canDragFrom;
NSCursor *cursor;
BOOL liveAllowsScrolling;
+ BOOL inWindow;
}
@end
diff --git a/WebKit/WebView.subproj/IFImageView.m b/WebKit/WebView.subproj/IFImageView.m
index 899e656..8f870e7 100644
--- a/WebKit/WebView.subproj/IFImageView.m
+++ b/WebKit/WebView.subproj/IFImageView.m
@@ -96,11 +96,11 @@
}
-- (void)viewWillMoveToWindow:(NSWindow *)newWindow
+- (void)viewDidMoveToWindow
{
- if (!newWindow)
+ if (![self window])
[[representation image] stopAnimation];
- [super viewWillMoveToWindow:newWindow];
+ [super viewDidMoveToWindow];
}
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index e1de142..72a508c 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -104,13 +104,22 @@
}
-- (void)viewWillMoveToWindow:(NSWindow *)window
-{
- if ([self window] && !window) {
- [self removeNotifications];
- [self _reset];
+- (void)viewDidMoveToWindow
+{
+ if ([self window]) {
+ _private->inWindow = YES;
+ } else {
+ // Reset when we are moved out of a window after being moved into one.
+ // Without this check, we reset ourselves before we even start.
+ // This is only needed because viewDidMoveToWindow is called even when
+ // the window is not changing (bug in AppKit).
+ if (_private->inWindow) {
+ [self removeNotifications];
+ [self _reset];
+ _private->inWindow = NO;
+ }
}
- [super viewWillMoveToWindow:window];
+ [super viewDidMoveToWindow];
}
diff --git a/WebKit/WebView.subproj/WebHTMLViewPrivate.h b/WebKit/WebView.subproj/WebHTMLViewPrivate.h
index 40b4b17..5f6ba07 100644
--- a/WebKit/WebView.subproj/WebHTMLViewPrivate.h
+++ b/WebKit/WebView.subproj/WebHTMLViewPrivate.h
@@ -28,6 +28,7 @@ class KHTMLView;
BOOL canDragFrom;
NSCursor *cursor;
BOOL liveAllowsScrolling;
+ BOOL inWindow;
}
@end
diff --git a/WebKit/WebView.subproj/WebImageView.m b/WebKit/WebView.subproj/WebImageView.m
index 899e656..8f870e7 100644
--- a/WebKit/WebView.subproj/WebImageView.m
+++ b/WebKit/WebView.subproj/WebImageView.m
@@ -96,11 +96,11 @@
}
-- (void)viewWillMoveToWindow:(NSWindow *)newWindow
+- (void)viewDidMoveToWindow
{
- if (!newWindow)
+ if (![self window])
[[representation image] stopAnimation];
- [super viewWillMoveToWindow:newWindow];
+ [super viewDidMoveToWindow];
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list