Commit a3f4f106 authored by darin's avatar darin
Browse files

Reviewed by Trey.

	- fixed 3128260 -- REGRESSION: context menus in frames are always the generic page menu

        * WebView.subproj/WebHTMLViewPrivate.m: (-[WebHTMLView hitTest:]):
	Check the control key in the mouse down event. If it's down, then do no magic.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3067 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent b50226ef
2002-12-15 Darin Adler <darin@apple.com>
Reviewed by Trey.
- fixed 3128260 -- REGRESSION: context menus in frames are always the generic page menu
* WebView.subproj/WebHTMLViewPrivate.m: (-[WebHTMLView hitTest:]):
Check the control key in the mouse down event. If it's down, then do no magic.
2002-12-15 Darin Adler <darin@apple.com>
Reviewed by Dave.
......
......@@ -271,9 +271,22 @@ - (void)scrollPoint:(NSPoint)point
- (NSView *)hitTest:(NSPoint)point
{
// WebHTMLView objects handle all clicks for objects inside them.
BOOL realHitTest = forceRealHitTest || [[[self window] currentEvent] type] != NSLeftMouseDown;
return realHitTest ? [super hitTest:point] : [[self superview] mouse:point inRect:[self frame]] ? self : nil;
// WebHTMLView objects handle all left mouse clicks for objects inside them.
// That does not include left mouse clicks with the control key held down.
BOOL captureHitsOnSubviews;
if (forceRealHitTest) {
captureHitsOnSubviews = NO;
} else {
NSEvent *event = [[self window] currentEvent];
captureHitsOnSubviews = [event type] == NSLeftMouseDown && ([event modifierFlags] & NSControlKeyMask) == 0;
}
if (!captureHitsOnSubviews) {
return [super hitTest:point];
}
if ([[self superview] mouse:point inRect:[self frame]]) {
return self;
}
return nil;
}
- (void)_updateMouseoverWithEvent:(NSEvent *)event
......
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