Commit 80c08365 authored by cblu's avatar cblu

Fixed: 3009881 - plugins get mouse-overs even when mouse is in menus

	Fixed: 3108240 - Loading datasource sometimes doesn't have cancelled error when cancelled

        * Plugins.subproj/WebBaseNetscapePluginView.m:
        (-[WebBaseNetscapePluginView sendNullEvent]): check if menus are showing
        (-[WebBaseNetscapePluginView restartNullEvents]): tweak
        * WebView.subproj/WebDataSourcePrivate.m:
        (-[WebDataSource _stopLoading]): set cancelled error if main handle is gone


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2808 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 96195948
2002-11-21 Chris Blumenberg <cblu@apple.com>
Fixed: 3009881 - plugins get mouse-overs even when mouse is in menus
Fixed: 3108240 - Loading datasource sometimes doesn't have cancelled error when cancelled
* Plugins.subproj/WebBaseNetscapePluginView.m:
(-[WebBaseNetscapePluginView sendNullEvent]): check if menus are showing
(-[WebBaseNetscapePluginView restartNullEvents]): tweak
* WebView.subproj/WebDataSourcePrivate.m:
(-[WebDataSource _stopLoading]): set cancelled error if main handle is gone
=== Alexander-33 === === Alexander-33 ===
2002-11-20 Darin Adler <darin@apple.com> 2002-11-20 Darin Adler <darin@apple.com>
......
2002-11-21 Chris Blumenberg <cblu@apple.com>
Fixed: 3009881 - plugins get mouse-overs even when mouse is in menus
Fixed: 3108240 - Loading datasource sometimes doesn't have cancelled error when cancelled
* Plugins.subproj/WebBaseNetscapePluginView.m:
(-[WebBaseNetscapePluginView sendNullEvent]): check if menus are showing
(-[WebBaseNetscapePluginView restartNullEvents]): tweak
* WebView.subproj/WebDataSourcePrivate.m:
(-[WebDataSource _stopLoading]): set cancelled error if main handle is gone
=== Alexander-33 === === Alexander-33 ===
2002-11-20 Darin Adler <darin@apple.com> 2002-11-20 Darin Adler <darin@apple.com>
......
...@@ -164,11 +164,14 @@ -(void)sendNullEvent ...@@ -164,11 +164,14 @@ -(void)sendNullEvent
[self getCarbonEvent:&event]; [self getCarbonEvent:&event];
// plug-in should not react to cursor position when not active. // Plug-in should not react to cursor position when not active or when a menu is down.
// FIXME: How does passing a v and h of 0 prevent it from reacting to the cursor position? MenuTrackingData trackingData;
if (![_window isKeyWindow]) { OSStatus error = GetMenuTrackingData(NULL, &trackingData);
event.where.v = 0;
event.where.h = 0; if (![_window isKeyWindow] || (error == noErr && trackingData.menu)){
// FIXME: How does passing a v and h of 0 prevent it from reacting to the cursor position?
event.where.v = -1;
event.where.h = -1;
} }
[self sendEvent:&event]; [self sendEvent:&event];
...@@ -189,7 +192,7 @@ - (void)restartNullEvents ...@@ -189,7 +192,7 @@ - (void)restartNullEvents
NSTimeInterval interval; NSTimeInterval interval;
if ([_window isKeyWindow]) { if ([_window isKeyWindow]){
interval = NullEventIntervalActive; interval = NullEventIntervalActive;
}else{ }else{
interval = NullEventIntervalNotActive; interval = NullEventIntervalNotActive;
......
...@@ -202,8 +202,17 @@ - (void)_stopLoading ...@@ -202,8 +202,17 @@ - (void)_stopLoading
} }
_private->stopping = YES; _private->stopping = YES;
[_private->mainClient cancel]; if(_private->mainClient){
// Stop the main handle and let it set the cancelled error.
[_private->mainClient cancel];
}else{
// Main handle is already done. Set the cancelled error.
WebError *cancelledError = [WebError errorWithCode:WebErrorCodeCancelled
inDomain:WebErrorDomainWebFoundation
failingURL:[[self URL] absoluteString]];
[self _setMainDocumentError:cancelledError];
}
NSArray *clients = [_private->subresourceClients copy]; NSArray *clients = [_private->subresourceClients copy];
[clients makeObjectsPerformSelector:@selector(cancel)]; [clients makeObjectsPerformSelector:@selector(cancel)];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment