[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

tony at chromium.org tony at chromium.org
Wed Dec 22 15:02:50 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 392b98aea9ac2738b08ed78b97669ec737975f1b
Author: tony at chromium.org <tony at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Oct 27 18:42:30 2010 +0000

    2010-10-25  Tony Chang  <tony at chromium.org>
    
            Reviewed by Anders Carlsson.
    
            compile TestNetscapePlugIn on chromium linux
            https://bugs.webkit.org/show_bug.cgi?id=48274
    
            * WebKit.gyp: Enable compilation of TestNetscapePlugIn on Linux.
    2010-10-25  Tony Chang  <tony at chromium.org>
    
            Reviewed by Anders Carlsson.
    
            compile TestNetscapePlugIn on chromium linux
            https://bugs.webkit.org/show_bug.cgi?id=48274
    
            * DumpRenderTree/TestNetscapePlugIn/main.cpp:
            (NP_Initialize): On Linux, plugin funcs are set in initialize.
            (NPP_New): Mark the plugin as windowless.
            (NPP_GetValue): Handle mime type values.
            (NP_GetMIMEDescription):
            (NP_GetValue):
            * DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: define TRUE and FALSE, which are in webkit's npapi.h.
            * DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: Pull in npapi.h to get TRUE/FALSE (matches webkit's npfunctions.h)
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70679 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index a3a0e61..fe62783 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,12 @@
+2010-10-25  Tony Chang  <tony at chromium.org>
+
+        Reviewed by Anders Carlsson.
+
+        compile TestNetscapePlugIn on chromium linux
+        https://bugs.webkit.org/show_bug.cgi?id=48274
+
+        * WebKit.gyp: Enable compilation of TestNetscapePlugIn on Linux.
+
 2010-10-27  Satish Sampath  <satish at chromium.org>
 
         Unreviewed, rolling out r70665.
diff --git a/WebKit/chromium/WebKit.gyp b/WebKit/chromium/WebKit.gyp
index 484fb0d..f121c5f 100644
--- a/WebKit/chromium/WebKit.gyp
+++ b/WebKit/chromium/WebKit.gyp
@@ -881,6 +881,9 @@
                     'sources/': [
                         ['exclude', 'Win\\.cpp$'],
                     ],
+                    'dependencies': [
+                        'TestNetscapePlugIn',
+                    ],
                     'actions': [
                         {
                             'action_name': 'repack_locale',
@@ -908,7 +911,6 @@
                     'dependencies': [
                         'copy_mesa',
                         'LayoutTestHelper',
-                        'TestNetscapePlugIn',
                     ],
                     'mac_bundle_resources': [
                         '<(ahem_path)',
@@ -978,6 +980,54 @@
                 'type': 'executable',
                 'sources': ['../../WebKitTools/DumpRenderTree/chromium/LayoutTestHelperWin.cpp'],
             }],
+        }, {  # OS!="win"
+            'targets': [
+                {
+                    'target_name': 'TestNetscapePlugIn',
+                    'type': 'loadable_module',
+                    'sources': [ '<@(test_plugin_files)' ],
+                    'dependencies': [
+                        '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi',
+                    ],
+                    'include_dirs': [
+                        '<(chromium_src_dir)',
+                        '../../WebKitTools/DumpRenderTree/TestNetscapePlugIn',
+                        '../../WebKitTools/DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders',
+                    ],
+
+                    'conditions': [
+                        ['OS=="mac"', {
+                            'mac_bundle': 1,
+                            # It would be nice to name this
+                            # TestNetscapePlugIn, but that name is already
+                            # used by the fork of this plugin in Chromium.
+                            'product_name': 'WebKitTestNetscapePlugIn',
+                            'product_extension': 'plugin',
+                            'link_settings': {
+                                'libraries': [
+                                    '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
+                                    '$(SDKROOT)/System/Library/Frameworks/Cocoa.framework',
+                                    '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
+                                ]
+                            },
+                            'xcode_settings': {
+                                'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO',
+                                # This is a temporary fork of
+                                # DRT/TestNetscapePlugIn/mac/Info.plist.  Once
+                                # we get rid of our forked plugin in the
+                                # chromium repo, we can share the same
+                                # Info.plist.
+                                'INFOPLIST_FILE': '../../WebKitTools/DumpRenderTree/chromium/TestNetscapePlugIn/Info.plist',
+                            },
+                        }],
+                        ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
+                            'cflags': [
+                                '-fvisibility=default',
+                            ],
+                        }],
+                    ],
+                },
+            ],
         }],
         ['OS=="mac"', {
             'targets': [
@@ -1000,42 +1050,6 @@
                         'files': ['<(PRODUCT_DIR)/osmesa.so'],
                     }],
                 },
-                {
-                    'target_name': 'TestNetscapePlugIn',
-                    'type': 'loadable_module',
-                    'sources': [ '<@(test_plugin_files)' ],
-                    'dependencies': [
-                        '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi',
-                    ],
-                    'include_dirs': [
-                        '<(chromium_src_dir)',
-                        '../../WebKitTools/DumpRenderTree/TestNetscapePlugIn',
-                        '../../WebKitTools/DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders',
-                    ],
-
-                    # Mac specific stuff.
-                    'mac_bundle': 1,
-                    # It would be nice to name this TestNetscapePlugIn, but
-                    # that name is already used by the fork of this plugin in
-                    # Chromium.
-                    'product_name': 'WebKitTestNetscapePlugIn',
-                    'product_extension': 'plugin',
-                    'link_settings': {
-                        'libraries': [
-                            '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
-                            '$(SDKROOT)/System/Library/Frameworks/Cocoa.framework',
-                            '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
-                        ]
-                    },
-                    'xcode_settings': {
-                        'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO',
-                        # This is a temporary fork of
-                        # DRT/TestNetscapePlugIn/mac/Info.plist.  Once we get
-                        # rid of our forked plugin in the chromium repo, we
-                        # can share the same Info.plist.
-                        'INFOPLIST_FILE': '../../WebKitTools/DumpRenderTree/chromium/TestNetscapePlugIn/Info.plist',
-                    },
-                }
             ],
         }],
     ], # conditions
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 9ed3a4d..3d17874 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,19 @@
+2010-10-25  Tony Chang  <tony at chromium.org>
+
+        Reviewed by Anders Carlsson.
+
+        compile TestNetscapePlugIn on chromium linux
+        https://bugs.webkit.org/show_bug.cgi?id=48274
+
+        * DumpRenderTree/TestNetscapePlugIn/main.cpp:
+        (NP_Initialize): On Linux, plugin funcs are set in initialize.
+        (NPP_New): Mark the plugin as windowless.
+        (NPP_GetValue): Handle mime type values.
+        (NP_GetMIMEDescription):
+        (NP_GetValue):
+        * DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: define TRUE and FALSE, which are in webkit's npapi.h.
+        * DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: Pull in npapi.h to get TRUE/FALSE (matches webkit's npfunctions.h)
+
 2010-10-27  Kenneth Rohde Christiansen  <kenneth at webkit.org>
 
         Reviewed by Anders Carlsson.
diff --git a/WebKitTools/DumpRenderTree/TestNetscapePlugIn/main.cpp b/WebKitTools/DumpRenderTree/TestNetscapePlugIn/main.cpp
index 6ae770d..e5246c4 100644
--- a/WebKitTools/DumpRenderTree/TestNetscapePlugIn/main.cpp
+++ b/WebKitTools/DumpRenderTree/TestNetscapePlugIn/main.cpp
@@ -26,6 +26,7 @@
 #include "PluginObject.h"
 
 #include "PluginTest.h"
+#include <cstdlib>
 #include <string>
 
 #if !defined(NP_NO_CARBON) && defined(QD_HEADERS_ARE_PRIVATE) && QD_HEADERS_ARE_PRIVATE
@@ -54,9 +55,17 @@ static inline int strcasecmp(const char* s1, const char* s2)
 #define STDCALL
 #endif
 
+extern "C" {
+NPError STDCALL NP_GetEntryPoints(NPPluginFuncs *pluginFuncs);
+}
+
 // Entry points
 extern "C"
-NPError STDCALL NP_Initialize(NPNetscapeFuncs *browserFuncs)
+NPError STDCALL NP_Initialize(NPNetscapeFuncs *browserFuncs
+#ifdef XP_UNIX
+                              , NPPluginFuncs *pluginFuncs
+#endif
+                              )
 {
     initializeWasCalled = true;
 
@@ -67,7 +76,12 @@ NPError STDCALL NP_Initialize(NPNetscapeFuncs *browserFuncs)
 #endif
 
     browser = browserFuncs;
+
+#ifdef XP_UNIX
+    return NP_GetEntryPoints(pluginFuncs);
+#else
     return NPERR_NO_ERROR;
+#endif
 }
 
 extern "C"
@@ -248,7 +262,12 @@ NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc
 
     obj->pluginTest = PluginTest::create(instance, testIdentifier);
 
+#ifdef XP_UNIX
+    // On Unix, plugins only get events if they are windowless.
+    return browser->setvalue(instance, NPPVpluginWindowBool, 0);
+#else
     return NPERR_NO_ERROR;
+#endif
 }
 
 NPError NPP_Destroy(NPP instance, NPSavedData **save)
@@ -578,6 +597,17 @@ void NPP_URLNotify(NPP instance, const char *url, NPReason reason, void *notifyD
 
 NPError NPP_GetValue(NPP instance, NPPVariable variable, void *value)
 {
+#ifdef XP_UNIX
+    if (variable == NPPVpluginNameString) {
+        *((char **)value) = const_cast<char*>("WebKit Test PlugIn");
+        return NPERR_NO_ERROR;
+    }
+    if (variable == NPPVpluginDescriptionString) {
+        *((char **)value) = const_cast<char*>("Simple Netscape plug-in that handles test content for WebKit");
+        return NPERR_NO_ERROR;
+    }
+#endif
+
     PluginObject* obj = static_cast<PluginObject*>(instance->pdata);
 
     // First, check if the PluginTest object supports getting this value.
@@ -602,7 +632,7 @@ NPError NPP_GetValue(NPP instance, NPPVariable variable, void *value)
         return NPERR_NO_ERROR;
     }
 #endif
-    
+
     return NPERR_GENERIC_ERROR;
 }
 
@@ -618,3 +648,17 @@ NPError NPP_SetValue(NPP instance, NPNVariable variable, void *value)
             return NPERR_GENERIC_ERROR;
     }
 }
+
+#ifdef XP_UNIX
+extern "C"
+const char* NP_GetMIMEDescription(void)
+{
+    return "application/x-webkit-test-netscape:testnetscape:test netscape content";
+}
+
+extern "C"
+NPError NP_GetValue(NPP instance, NPPVariable variable, void* value)
+{
+    return NPP_GetValue(instance, variable, value);
+}
+#endif
diff --git a/WebKitTools/DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h b/WebKitTools/DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h
index 49f72a6..9fa3fff 100644
--- a/WebKitTools/DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h
+++ b/WebKitTools/DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h
@@ -1 +1,9 @@
 #include "bindings/npapi.h"
+
+// These are defined in WebCore/brdige/npapi.h and we need them on Linux/Win.
+#ifndef FALSE
+#define FALSE (0)
+#endif
+#ifndef TRUE
+#define TRUE (1)
+#endif
diff --git a/WebKitTools/DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h b/WebKitTools/DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h
index 61588ca..59ae666 100644
--- a/WebKitTools/DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h
+++ b/WebKitTools/DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h
@@ -1,3 +1,4 @@
+#include "npapi.h"
 #include "bindings/npfunctions.h"
 
 // Non-standard event types can be passed to HandleEvent.

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list