Commit 23b9ad79 authored by darin's avatar darin
Browse files

Reviewed by John and Don.

	- fixed 3137661 -- REGRESSION: autoscroll selection is broken

	The new logic in WebCore is slightly pickier, and can't abide a mouse-moved event
	coming in during a drag. Unfortunately, we were sending a fake mouse-moved event
	during a drag, so lets not do that.

        * WebView.subproj/WebHTMLView.m:
        (-[WebHTMLView mouseDown:]): Cancel any scheduled fake mouse-moved event.
        (-[WebHTMLView mouseUp:]): Send a fake mouse-moved event because we didn't update during the drag.

        * WebView.subproj/WebHTMLViewPrivate.m: (-[WebHTMLView _frameOrBoundsChanged]):
	Don't schedule a fake mouse-moved event if the mouse is down, because that means we are in the
        middle of a drag.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3232 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent bbd1f7da
2003-01-02 Darin Adler <darin@apple.com>
Reviewed by John and Don.
- fixed 3137661 -- REGRESSION: autoscroll selection is broken
The new logic in WebCore is slightly pickier, and can't abide a mouse-moved event
coming in during a drag. Unfortunately, we were sending a fake mouse-moved event
during a drag, so lets not do that.
* WebView.subproj/WebHTMLView.m:
(-[WebHTMLView mouseDown:]): Cancel any scheduled fake mouse-moved event.
(-[WebHTMLView mouseUp:]): Send a fake mouse-moved event because we didn't update during the drag.
* WebView.subproj/WebHTMLViewPrivate.m: (-[WebHTMLView _frameOrBoundsChanged]):
Don't schedule a fake mouse-moved event if the mouse is down, because that means we are in the
middle of a drag.
2003-01-02 Darin Adler <darin@apple.com>
Reviewed by John and Ken.
......
......@@ -596,11 +596,13 @@ - (void)windowDidResignMain: (NSNotification *)notification
- (void)mouseDown: (NSEvent *)event
{
// Record the mouse down position so we can determine
// drag hysteresis.
// Record the mouse down position so we can determine drag hysteresis.
[_private->mouseDownEvent release];
_private->mouseDownEvent = [event retain];
// Don't do any mouseover while the mouse is down.
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(_updateMouseoverWithFakeEvent) object:nil];
// Let khtml get a chance to deal with the event.
[[self _bridge] mouseDown:event];
}
......@@ -662,6 +664,7 @@ - (NSArray *)namesOfPromisedFilesDroppedAtDestination:(NSURL *)dropDestination
- (void)mouseUp: (NSEvent *)event
{
[[self _bridge] mouseUp:event];
[self _updateMouseoverWithFakeEvent];
}
- (void)mouseMovedNotification:(NSNotification *)notification
......
......@@ -5,6 +5,7 @@
#import <WebKit/WebHTMLViewPrivate.h>
#import <AppKit/NSGraphicsContextPrivate.h> // for PSbuttondown
#import <AppKit/NSResponder_Private.h>
#import <WebFoundation/WebAssertions.h>
......@@ -177,8 +178,14 @@ - (void)_frameOrBoundsChanged
[self setNeedsDisplay:YES];
}
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(_updateMouseoverWithFakeEvent) object:nil];
[self performSelector:@selector(_updateMouseoverWithFakeEvent) withObject:nil afterDelay:0];
// Don't update mouseover while mouse is down.
int mouseIsDown;
PSbuttondown(&mouseIsDown);
if (!mouseIsDown) {
SEL selector = @selector(_updateMouseoverWithFakeEvent);
[NSObject cancelPreviousPerformRequestsWithTarget:self selector:selector object:nil];
[self performSelector:selector withObject:nil afterDelay:0];
}
}
- (NSDictionary *)_elementAtPoint:(NSPoint)point
......
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