2008-12-12 Anders Carlsson <andersca@apple.com>
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Dec 2008 20:31:37 +0000 (20:31 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Dec 2008 20:31:37 +0000 (20:31 +0000)
        Revert some accidentally committed changes.

        * NetscapeCocoaPlugin/NetscapeCocoaPlugin.xcodeproj/project.pbxproj:
        * NetscapeCocoaPlugin/main.m:
        (handleDraw):
        (handleMouseEvent):
        (NPP_HandleEvent):

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

WebKitExamplePlugins/ChangeLog
WebKitExamplePlugins/NetscapeCocoaPlugin/NetscapeCocoaPlugin.xcodeproj/project.pbxproj
WebKitExamplePlugins/NetscapeCocoaPlugin/main.m

index 61a0d45..98dad4e 100644 (file)
@@ -1,5 +1,15 @@
 2008-12-12  Anders Carlsson  <andersca@apple.com>
 
+        Revert some accidentally committed changes.
+        
+        * NetscapeCocoaPlugin/NetscapeCocoaPlugin.xcodeproj/project.pbxproj:
+        * NetscapeCocoaPlugin/main.m:
+        (handleDraw):
+        (handleMouseEvent):
+        (NPP_HandleEvent):
+
+2008-12-12  Anders Carlsson  <andersca@apple.com>
+
         Reviewed by Kevin Decker.
 
         Add a sample Core Animation NPAPI plug-in.
index a0d22ff..9703a2d 100644 (file)
                149C298808902C53008A9EFC /* Debug */ = {
                        isa = XCBuildConfiguration;
                        buildSettings = {
-                               ARCHS = i386;
+                               ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)";
                                ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "ppc i386 ppc64 x86_64";
                                GCC_WARN_ABOUT_RETURN_TYPE = YES;
                                GCC_WARN_UNUSED_VARIABLE = YES;
                149C298908902C53008A9EFC /* Release */ = {
                        isa = XCBuildConfiguration;
                        buildSettings = {
-                               ARCHS = i386;
+                               ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)";
                                ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "ppc i386 ppc64 x86_64";
                                GCC_WARN_ABOUT_RETURN_TYPE = YES;
                                GCC_WARN_UNUSED_VARIABLE = YES;
index 19a28e8..1f66ac1 100644 (file)
@@ -203,8 +203,9 @@ static void handleDraw(PluginObject *obj)
 
 
     [NSGraphicsContext setCurrentContext:context];
-
+    
     NSRect rect = NSMakeRect(0, 0, obj->window.width, obj->window.height);
+    
     [[NSColor lightGrayColor] set];
     [NSBezierPath fillRect:rect];
 
@@ -263,20 +264,9 @@ static void invalidatePlugin(PluginObject *obj)
 
 static void handleMouseEvent(PluginObject *obj, NPCocoaEvent *event)
 {
-    NSWindow *window = ((NP_CGContext *)obj->window.window)->window;
-    // Convert the event coordinates to screen coordinates.
-    
-    NSPoint windowCoordinates = NSMakePoint(0, 0);//obj->window.x + event->data.mouse.pluginX,
-//                                            obj->window.y + event->data.mouse.pluginY);
-
-    NSPoint screenCoordinates = [window convertBaseToScreen:windowCoordinates];
-    
-    NSLog(@"window: %@", window);
-    
     NSString *string = [NSString stringWithFormat:@"Type: %@\n"
                                                    "Modifier flags: 0x%x\n"
                                                    "Coordinates: (%g, %g)\n"
-                                                   "Screen coordinates: (%g, %g)\n"
                                                    "Button number: %d\n"
                                                    "Click count: %d\n"
                                                    "Delta: (%g, %g, %g)",
@@ -284,7 +274,6 @@ static void handleMouseEvent(PluginObject *obj, NPCocoaEvent *event)
                                                    event->data.mouse.modifierFlags,
                                                    event->data.mouse.pluginX,
                                                    event->data.mouse.pluginY,
-                                                   screenCoordinates.x, screenCoordinates.y,
                                                    event->data.mouse.buttonNumber,
                                                    event->data.mouse.clickCount,
                                                    event->data.mouse.deltaX, event->data.mouse.deltaY, event->data.mouse.deltaZ];
@@ -334,7 +323,6 @@ int16 NPP_HandleEvent(NPP instance, void* event)
     
     switch(cocoaEvent->type) {
         case NPCocoaEventFocusChanged:
-            browser->status(instance, cocoaEvent->data.focus.hasFocus ? "Got focus" : "Lost Focus");
             obj->hasFocus = cocoaEvent->data.focus.hasFocus;
             invalidatePlugin(obj);
             return 1;