Fixed <rdar://problem/3759190> allow input methods the option of processing mouse...
authoroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 24 Nov 2007 03:14:46 +0000 (03:14 +0000)
committeroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 24 Nov 2007 03:14:46 +0000 (03:14 +0000)
Reviewed by Mark Rowe.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27995 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/mac/ChangeLog
WebKit/mac/WebView/WebHTMLView.mm

index 543be90..5ca9b6f 100644 (file)
@@ -1,3 +1,12 @@
+2007-11-23  Oliver Hunt  <oliver@apple.com>
+
+        Reviewed by Mark Rowe.
+        
+        Fixed <rdar://problem/3759190> allow input methods the option of processing mouse events themselves
+
+        * WebView/WebHTMLView.mm:
+        (-[WebHTMLView mouseDown:]):
+
 2007-11-22  Dan Bernstein  <mitz@apple.com>
 
         Reviewed by Antti Koivisto.
index 7e49e43..7708955 100644 (file)
@@ -3029,7 +3029,9 @@ static void _updateActiveStateTimerCallback(CFRunLoopTimerRef timer, void *info)
 
 - (void)mouseDown:(NSEvent *)event
 {
-    [self retain];
+    RetainPtr<WebHTMLView> protector = self;
+    if ([[self inputContext] wantsToHandleMouseEvents] && [[self inputContext] handleMouseEvent:event])
+        return;
 
     _private->handlingMouseDownEvent = YES;
 
@@ -3061,8 +3063,6 @@ done:
     _private->firstResponderTextViewAtMouseDownTime = nil;
 
     _private->handlingMouseDownEvent = NO;
-    
-    [self release];
 }
 
 - (void)dragImage:(NSImage *)dragImage