[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

cblu cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:31:27 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit fcbeec42693a2f6dc6f216e1ce49874478c34a6b
Author: cblu <cblu at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Mar 30 23:38:14 2004 +0000

    	Fixed: <rdar://problem/3604391>: Plug-in context menus (Flash) don't work in Carbon WebKit applications (e.g., CarbonWeb)
    
            Reviewed by rjw.
    
            * Carbon.subproj/HIWebView.m:
            (ContextMenuClick): instead of calling menuForEvent (which is not implemented on our plug-in view) call rightMouseDown and let AppKit handle the rest
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@6279 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/Carbon.subproj/HIWebView.m b/WebKit/Carbon.subproj/HIWebView.m
index a88a887..2b2fb50 100644
--- a/WebKit/Carbon.subproj/HIWebView.m
+++ b/WebKit/Carbon.subproj/HIWebView.m
@@ -629,8 +629,6 @@ MouseWheelMoved( HIWebView* inView, EventRef inEvent )
 static OSStatus
 ContextMenuClick( HIWebView* inView, EventRef inEvent )
 {
-    OSStatus result = eventNotHandledErr;
-
     NSView *webView = inView->fWebView;
     NSWindow *window = [webView window];
 
@@ -642,8 +640,8 @@ ContextMenuClick( HIWebView* inView, EventRef inEvent )
     // Flip the Y coordinate, since Carbon is flipped relative to the AppKit.
     NSPoint location = NSMakePoint(point.x, [window frame].size.height - point.y);
     
-    // Make up an event with the point.
-    NSEvent *kitEvent = [NSEvent mouseEventWithType:NSRightMouseUp
+    // Make up an event with the point and send it to the window.
+    NSEvent *kitEvent = [NSEvent mouseEventWithType:NSRightMouseDown
                                            location:location
                                       modifierFlags:0
                                           timestamp:GetEventTime(inEvent)
@@ -652,21 +650,8 @@ ContextMenuClick( HIWebView* inView, EventRef inEvent )
                                         eventNumber:0
                                          clickCount:1
                                            pressure:0];
-    
-    // Convert from window coordinates to superview coordinates for hit testing.
-    NSPoint superviewPoint = [[webView superview] convertPoint:location fromView:nil];
-    NSView *target = [webView hitTest:superviewPoint];
-    
-    // Pop up the menu.
-    if ([target _allowsContextMenus]) {
-        NSMenu *contextMenu = [target menuForEvent:kitEvent];
-        if (contextMenu) {
-            [contextMenu _popUpMenuWithEvent:kitEvent forView:target];
-            result = noErr;
-        }
-    }
-    
-    return result;
+    [inView->fKitWindow sendEvent:kitEvent];
+    return noErr;
 }
 
 //----------------------------------------------------------------------------------
@@ -1504,15 +1489,15 @@ HIWebViewEventHandler(
 						result = noErr;
 					}
 					break;
-
+                                    
 				case kEventControlClick:
 					result = Click( view, inEvent );
 					break;
-					
+                                    
 				case kEventControlContextualMenuClick:
 					result = ContextMenuClick( view, inEvent );
 					break;
-					
+                                    
 				case kEventControlSetFocusPart:
 					{
 						ControlPartCode		desiredFocus;
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 6846a26..69ddafc 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,12 @@
+2004-03-30  Chris Blumenberg  <cblu at apple.com>
+
+	Fixed: <rdar://problem/3604391>: Plug-in context menus (Flash) don't work in Carbon WebKit applications (e.g., CarbonWeb)
+
+        Reviewed by rjw.
+
+        * Carbon.subproj/HIWebView.m:
+        (ContextMenuClick): instead of calling menuForEvent (which is not implemented on our plug-in view) call rightMouseDown and let AppKit handle the rest
+
 2004-03-29  John Sullivan  <sullivan at apple.com>
 
         - some support for "Stealth Browsing"; add a preference that

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list