[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:54:34 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 41e780eeaa6c908cb1f0902b9ab366b0166f1a7c
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Oct 26 00:06:31 2002 +0000
WebKit:
Tighten up the code that observes mouse moved events.
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView initWithFrame:]): Don't set up observers here.
(-[WebHTMLView addMouseMovedObserver]): Added some assertions.
(-[WebHTMLView viewWillMoveToWindow:]): Stop observing the "become main" and "resign main"
notifications here.
(-[WebHTMLView viewDidMoveToWindow]): Start observing them here.
(-[WebHTMLView windowDidBecomeMain:]): Assert that the notification is for this window,
instead of checking with if.
(-[WebHTMLView windowDidResignMain:]): Assert that the notification is for this window.
WebBrowser:
- fixed 3078924 -- Rollovers fail on wired.com after selecting a menu
* BrowserApplication.m: (-[BrowserApplication sendEvent:]):
Put in a workaround that sets the mouse focus to the key window.
* BrowserWindowController.m:
(-[BrowserWindowController windowDidLoad]): Remove unneeded pageTitleChanged.
(-[BrowserWindowController frameLoadWithinPage:]): Call updateBackAndForwardButtons
instead of doing the "two calls to setActivity:" dance.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2470 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 43389b2..5b1db41 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,17 @@
+2002-10-25 Darin Adler <darin at apple.com>
+
+ Tighten up the code that observes mouse moved events.
+
+ * WebView.subproj/WebHTMLView.m:
+ (-[WebHTMLView initWithFrame:]): Don't set up observers here.
+ (-[WebHTMLView addMouseMovedObserver]): Added some assertions.
+ (-[WebHTMLView viewWillMoveToWindow:]): Stop observing the "become main" and "resign main"
+ notifications here.
+ (-[WebHTMLView viewDidMoveToWindow]): Start observing them here.
+ (-[WebHTMLView windowDidBecomeMain:]): Assert that the notification is for this window,
+ instead of checking with if.
+ (-[WebHTMLView windowDidResignMain:]): Assert that the notification is for this window.
+
2002-10-25 Chris Blumenberg <cblu at apple.com>
Cleaned up the frame searching shenanigans. Things are much cleaner and clearer now.
diff --git a/WebKit/ChangeLog-2002-12-03 b/WebKit/ChangeLog-2002-12-03
index 43389b2..5b1db41 100644
--- a/WebKit/ChangeLog-2002-12-03
+++ b/WebKit/ChangeLog-2002-12-03
@@ -1,3 +1,17 @@
+2002-10-25 Darin Adler <darin at apple.com>
+
+ Tighten up the code that observes mouse moved events.
+
+ * WebView.subproj/WebHTMLView.m:
+ (-[WebHTMLView initWithFrame:]): Don't set up observers here.
+ (-[WebHTMLView addMouseMovedObserver]): Added some assertions.
+ (-[WebHTMLView viewWillMoveToWindow:]): Stop observing the "become main" and "resign main"
+ notifications here.
+ (-[WebHTMLView viewDidMoveToWindow]): Start observing them here.
+ (-[WebHTMLView windowDidBecomeMain:]): Assert that the notification is for this window,
+ instead of checking with if.
+ (-[WebHTMLView windowDidResignMain:]): Assert that the notification is for this window.
+
2002-10-25 Chris Blumenberg <cblu at apple.com>
Cleaned up the frame searching shenanigans. Things are much cleaner and clearer now.
diff --git a/WebKit/WebView.subproj/WebHTMLView.m b/WebKit/WebView.subproj/WebHTMLView.m
index c86cfb9..39da077 100644
--- a/WebKit/WebView.subproj/WebHTMLView.m
+++ b/WebKit/WebView.subproj/WebHTMLView.m
@@ -60,10 +60,6 @@
_private->canDragTo = YES;
_private->canDragFrom = YES;
- // We will add/remove this view as a mouse moved observer when its window becomes/resigns main.
- [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(windowDidBecomeMain:) name: NSWindowDidBecomeMainNotification object: nil];
- [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(windowDidResignMain:) name: NSWindowDidResignMainNotification object: nil];
-
return self;
}
@@ -145,7 +141,7 @@
- (void)dealloc
{
[self _reset];
- [[NSNotificationCenter defaultCenter] removeObserver: self];
+ [[NSNotificationCenter defaultCenter] removeObserver:self];
[_private release];
_private = nil;
[super dealloc];
@@ -158,20 +154,17 @@
- (void)addMouseMovedObserver
{
- [[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(mouseMovedNotification:) name: NSMouseMovedNotification object: nil];
+ ASSERT([[self window] isMainWindow]);
+ ASSERT(![self _insideAnotherHTMLView]);
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(mouseMovedNotification:)
+ name:NSMouseMovedNotification object:nil];
}
- (void)removeMouseMovedObserver
{
[self _mouseOverElement:nil modifierFlags:0];
- [[NSNotificationCenter defaultCenter] removeObserver: self name: NSMouseMovedNotification object: nil];
-}
-
-- (void)removeNotifications
-{
- [self removeMouseMovedObserver];
- [[NSNotificationCenter defaultCenter] removeObserver: self name: NSWindowDidResignMainNotification object: nil];
- [[NSNotificationCenter defaultCenter] removeObserver: self name: NSWindowDidResignMainNotification object: nil];
+ [[NSNotificationCenter defaultCenter] removeObserver:self
+ name:NSMouseMovedNotification object:nil];
}
- (void)_setNeedsLayoutIfSizeChanged:(NSNotification *)notification
@@ -210,6 +203,12 @@
- (void)viewWillMoveToWindow:(NSWindow *)window
{
+ if ([self window]) {
+ [[NSNotificationCenter defaultCenter] removeObserver:self
+ name:NSWindowDidBecomeMainNotification object:[self window]];
+ [[NSNotificationCenter defaultCenter] removeObserver:self
+ name:NSWindowDidResignMainNotification object:[self window]];
+ }
[self removeMouseMovedObserver];
}
@@ -218,6 +217,10 @@
if ([self window]) {
if ([[self window] isMainWindow] && ![self _insideAnotherHTMLView]) {
[self addMouseMovedObserver];
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(windowDidBecomeMain:)
+ name:NSWindowDidBecomeMainNotification object:[self window]];
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(windowDidResignMain:)
+ name:NSWindowDidResignMainNotification object:[self window]];
}
_private->inWindow = YES;
} else {
@@ -226,7 +229,7 @@
// This is only needed because viewDidMoveToWindow is called even when
// the window is not changing (bug in AppKit).
if (_private->inWindow) {
- [self removeNotifications];
+ [self removeMouseMovedObserver];
[self _reset];
_private->inWindow = NO;
}
@@ -238,7 +241,7 @@
{
[super addSubview:view];
- if([view conformsToProtocol:@protocol(WebPlugin)]){
+ if ([view conformsToProtocol:@protocol(WebPlugin)]) {
[[[self _frame] _pluginController] didAddPluginView:view];
}
}
@@ -551,15 +554,17 @@
return YES;
}
-- (void)windowDidBecomeMain: (NSNotification *)notification
+- (void)windowDidBecomeMain:(NSNotification *)notification
{
- if ([notification object] == [self window] && ![self _insideAnotherHTMLView]) {
+ ASSERT([notification object] == [self window]);
+ if (![self _insideAnotherHTMLView]) {
[self addMouseMovedObserver];
}
}
- (void)windowDidResignMain: (NSNotification *)notification
{
+ ASSERT([notification object] == [self window]);
[self removeMouseMovedObserver];
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list