JavaScriptCore:
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 8 Mar 2008 07:54:51 +0000 (07:54 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 8 Mar 2008 07:54:51 +0000 (07:54 +0000)
        Unify concept of enabling Netscape Plug-in API (NPAPI).

        Reviewed by Darin.

        * wtf/Platform.h: Define ENABLE_NETSCAPE_PLUGIN_API here.

WebCore:

        Unify concept of enabling Netscape Plug-in API (NPAPI).

        Reviewed by Darin.

        No test cases since there is no change in functionality.

        * DerivedSources.make: Added check for ENABLE_NETSCAPE_PLUGIN_API macro.
        If defined as "1", add WebCore.NPAPI.exp to WEBCORE_EXPORT_DEPENDENCIES.
        * WebCore.NPAPI.exp: Added.
        * WebCore.base.exp: Moved exported NPAPI methods to WebCore.NPAPI.exp.
        * WebCore.xcodeproj/project.pbxproj: Removed changes in r30826 (except
        comments) since we now handle exported NPAPI methods via DerivedSources.make.

        * config.h: Removed USE(NPOBJECT) since we now use ENABLE(NETSCAPE_PLUGIN_API) as
        defined in Platform.h.

        * bindings/objc/DOM.mm: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
        (-[DOMElement _NPObject]):

        * bridge/NP_jsobject.cpp: Replaced !PLATFORM(DARWIN) || !defined(__LP64__) with
        ENABLE(NETSCAPE_PLUGIN_API).
        * bridge/NP_jsobject.h: Ditto.
        * bridge/c/c_class.cpp: Ditto.
        * bridge/c/c_class.h: Ditto.
        * bridge/c/c_instance.cpp: Ditto.
        * bridge/c/c_instance.h: Ditto.
        * bridge/c/c_runtime.cpp: Ditto.
        * bridge/c/c_runtime.h: Ditto.
        * bridge/c/c_utility.cpp: Ditto.
        * bridge/c/c_utility.h: Ditto.
        * bridge/npruntime.cpp: Ditto.
        * bridge/npruntime_impl.h: Ditto.
        * bridge/npruntime_priv.h: Ditto.
        * bridge/runtime.cpp: Ditto.
        (KJS::Bindings::Instance::createBindingForLanguageInstance):

        * html/HTMLPlugInElement.cpp: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
        (WebCore::HTMLPlugInElement::HTMLPlugInElement):
        (WebCore::HTMLPlugInElement::~HTMLPlugInElement):
        * html/HTMLPlugInElement.h: Ditto.

        * page/Frame.cpp: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
        (WebCore::Frame::clearScriptObjects):
        (WebCore::FramePrivate::FramePrivate): Also added #if ENABLE(NETSCAPE_PLUGIN_API)
        guard around m_windowScriptNPObject.
        * page/Frame.h: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
        * page/FramePrivate.h: Added #if ENABLE(NETSCAPE_PLUGIN_API) guard around
        m_windowScriptNPObject.
        * page/mac/FrameMac.mm: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
        (WebCore::Frame::createScriptInstanceForWidget):

WebKit/mac:

        Unify concept of enabling Netscape Plug-in API (NPAPI).

        Reviewed by Darin.

        * WebKit.exp: Removed unused class export for WebBaseNetscapePluginView.

        * WebKitPrefix.h: Removed WTF_USE_NPOBJECT since we now use
        ENABLE(NETSCAPE_PLUGIN_API) as defined in Platform.h.

        * Plugins/WebBaseNetscapePluginStream.h: Replaced #ifndef __LP64__ with
        #if ENABLE(NETSCAPE_PLUGIN_API).
        * Plugins/WebBaseNetscapePluginStream.mm: Ditto.
        * Plugins/WebBaseNetscapePluginView.h: Ditto.
        * Plugins/WebBaseNetscapePluginView.mm: Ditto.
        * Plugins/WebBaseNetscapePluginViewInternal.h: Ditto.
        * Plugins/WebBaseNetscapePluginViewPrivate.h: Ditto.
        * Plugins/WebBasePluginPackage.h: Ditto.
        * Plugins/WebBasePluginPackage.m: Ditto.
        (+[WebBasePluginPackage pluginWithPath:]):
        * Plugins/WebNetscapeDeprecatedFunctions.c: Ditto.
        * Plugins/WebNetscapeDeprecatedFunctions.h: Ditto.
        * Plugins/WebNetscapePluginEmbeddedView.h: Ditto.
        * Plugins/WebNetscapePluginEmbeddedView.mm: Ditto.
        * Plugins/WebNetscapePluginPackage.h: Ditto.
        * Plugins/WebNetscapePluginPackage.m: Ditto.
        * Plugins/WebNetscapePluginStream.h: Ditto.
        * Plugins/WebNetscapePluginStream.mm: Ditto.
        * Plugins/WebPluginDatabase.m: Ditto.
        (-[WebPluginDatabase pluginForKey:withEnumeratorSelector:]):
        * Plugins/npapi.m: Ditto.
        * WebCoreSupport/WebFrameLoaderClient.mm: Ditto.
        (WebFrameLoaderClient::objectContentType):
        (WebFrameLoaderClient::createPlugin):
        * WebView/WebHTMLView.mm: Ditto.
        (-[NSArray _web_makePluginViewsPerformSelector:withObject:]):
        * WebView/WebHTMLViewInternal.h: Ditto.

        * WebView/WebFrame.mm: Replaced #ifndef __LP64__ with
        #if ENABLE(NETSCAPE_PLUGIN_API). Moved methods below from (WebPrivate)
        category to (WebInternal) category so we don't expose the ENABLE() macro
        from the private header.
        (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]):
        (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]):
        * WebView/WebFrameInternal.h: Ditto.
        * WebView/WebFramePrivate.h: Ditto.

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

56 files changed:
JavaScriptCore/ChangeLog
JavaScriptCore/wtf/Platform.h
WebCore/ChangeLog
WebCore/DerivedSources.make
WebCore/WebCore.NPAPI.exp [new file with mode: 0644]
WebCore/WebCore.base.exp
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/bindings/objc/DOM.mm
WebCore/bridge/NP_jsobject.cpp
WebCore/bridge/NP_jsobject.h
WebCore/bridge/c/c_class.cpp
WebCore/bridge/c/c_class.h
WebCore/bridge/c/c_instance.cpp
WebCore/bridge/c/c_instance.h
WebCore/bridge/c/c_runtime.cpp
WebCore/bridge/c/c_runtime.h
WebCore/bridge/c/c_utility.cpp
WebCore/bridge/c/c_utility.h
WebCore/bridge/npruntime.cpp
WebCore/bridge/npruntime_impl.h
WebCore/bridge/npruntime_priv.h
WebCore/bridge/runtime.cpp
WebCore/config.h
WebCore/html/HTMLPlugInElement.cpp
WebCore/html/HTMLPlugInElement.h
WebCore/page/Frame.cpp
WebCore/page/Frame.h
WebCore/page/FramePrivate.h
WebCore/page/mac/FrameMac.mm
WebKit/mac/ChangeLog
WebKit/mac/Plugins/WebBaseNetscapePluginStream.h
WebKit/mac/Plugins/WebBaseNetscapePluginStream.mm
WebKit/mac/Plugins/WebBaseNetscapePluginView.h
WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
WebKit/mac/Plugins/WebBaseNetscapePluginViewInternal.h
WebKit/mac/Plugins/WebBaseNetscapePluginViewPrivate.h
WebKit/mac/Plugins/WebBasePluginPackage.h
WebKit/mac/Plugins/WebBasePluginPackage.m
WebKit/mac/Plugins/WebNetscapeDeprecatedFunctions.c
WebKit/mac/Plugins/WebNetscapeDeprecatedFunctions.h
WebKit/mac/Plugins/WebNetscapePluginEmbeddedView.h
WebKit/mac/Plugins/WebNetscapePluginEmbeddedView.mm
WebKit/mac/Plugins/WebNetscapePluginPackage.h
WebKit/mac/Plugins/WebNetscapePluginPackage.m
WebKit/mac/Plugins/WebNetscapePluginStream.h
WebKit/mac/Plugins/WebNetscapePluginStream.mm
WebKit/mac/Plugins/WebPluginDatabase.m
WebKit/mac/Plugins/npapi.m
WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
WebKit/mac/WebKit.exp
WebKit/mac/WebKitPrefix.h
WebKit/mac/WebView/WebFrame.mm
WebKit/mac/WebView/WebFrameInternal.h
WebKit/mac/WebView/WebFramePrivate.h
WebKit/mac/WebView/WebHTMLView.mm
WebKit/mac/WebView/WebHTMLViewInternal.h

index 9deaf88..d41fc72 100644 (file)
@@ -1,3 +1,11 @@
+2008-03-07  David D. Kilzer  <ddkilzer@apple.com>
+
+        Unify concept of enabling Netscape Plug-in API (NPAPI).
+
+        Reviewed by Darin.
+
+        * wtf/Platform.h: Define ENABLE_NETSCAPE_PLUGIN_API here.
+
 2008-03-07  Geoffrey Garen  <ggaren@apple.com>
 
         Reviewed by Darin Adler.
index d683e6a..08ad561 100644 (file)
 #define WTF_USE_PTHREADS 1
 #endif
 
+#if PLATFORM(MAC) && defined(__LP64__)
+#define ENABLE_NETSCAPE_PLUGIN_API 0
+#elif PLATFORM(GTK) || PLATFORM(MAC) || PLATFORM(SYMBIAN) || PLATFORM(WIN)
+#define ENABLE_NETSCAPE_PLUGIN_API 1
+#endif
+
 #if PLATFORM(WIN)
 #define WTF_USE_WININET 1
 #endif
 #define USE_SYSTEM_MALLOC 1
 #endif
 
+/* ENABLE macro defaults */
+
 #if !defined(ENABLE_ICONDATABASE)
 #define ENABLE_ICONDATABASE 1
 #endif
 #define ENABLE_FTPDIR 1
 #endif
 
+#if !defined(ENABLE_NETSCAPE_PLUGIN_API)
+#define ENABLE_NETSCAPE_PLUGIN_API 0
+#endif
+
 #endif /* WTF_Platform_h */
index fa51f98..aa110bc 100644 (file)
@@ -1,3 +1,56 @@
+2008-03-07  David D. Kilzer  <ddkilzer@apple.com>
+
+        Unify concept of enabling Netscape Plug-in API (NPAPI).
+
+        Reviewed by Darin.
+
+        No test cases since there is no change in functionality.
+
+        * DerivedSources.make: Added check for ENABLE_NETSCAPE_PLUGIN_API macro.
+        If defined as "1", add WebCore.NPAPI.exp to WEBCORE_EXPORT_DEPENDENCIES.
+        * WebCore.NPAPI.exp: Added.
+        * WebCore.base.exp: Moved exported NPAPI methods to WebCore.NPAPI.exp.
+        * WebCore.xcodeproj/project.pbxproj: Removed changes in r30826 (except
+        comments) since we now handle exported NPAPI methods via DerivedSources.make.
+
+        * config.h: Removed USE(NPOBJECT) since we now use ENABLE(NETSCAPE_PLUGIN_API) as
+        defined in Platform.h.
+
+        * bindings/objc/DOM.mm: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
+        (-[DOMElement _NPObject]):
+
+        * bridge/NP_jsobject.cpp: Replaced !PLATFORM(DARWIN) || !defined(__LP64__) with
+        ENABLE(NETSCAPE_PLUGIN_API).
+        * bridge/NP_jsobject.h: Ditto.
+        * bridge/c/c_class.cpp: Ditto.
+        * bridge/c/c_class.h: Ditto.
+        * bridge/c/c_instance.cpp: Ditto.
+        * bridge/c/c_instance.h: Ditto.
+        * bridge/c/c_runtime.cpp: Ditto.
+        * bridge/c/c_runtime.h: Ditto.
+        * bridge/c/c_utility.cpp: Ditto.
+        * bridge/c/c_utility.h: Ditto.
+        * bridge/npruntime.cpp: Ditto.
+        * bridge/npruntime_impl.h: Ditto.
+        * bridge/npruntime_priv.h: Ditto.
+        * bridge/runtime.cpp: Ditto.
+        (KJS::Bindings::Instance::createBindingForLanguageInstance):
+
+        * html/HTMLPlugInElement.cpp: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
+        (WebCore::HTMLPlugInElement::HTMLPlugInElement):
+        (WebCore::HTMLPlugInElement::~HTMLPlugInElement):
+        * html/HTMLPlugInElement.h: Ditto.
+
+        * page/Frame.cpp: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
+        (WebCore::Frame::clearScriptObjects):
+        (WebCore::FramePrivate::FramePrivate): Also added #if ENABLE(NETSCAPE_PLUGIN_API)
+        guard around m_windowScriptNPObject.
+        * page/Frame.h: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
+        * page/FramePrivate.h: Added #if ENABLE(NETSCAPE_PLUGIN_API) guard around
+        m_windowScriptNPObject.
+        * page/mac/FrameMac.mm: Replaced USE(NPOBJECT) with ENABLE(NETSCAPE_PLUGIN_API).
+        (WebCore::Frame::createScriptInstanceForWidget):
+
 2008-03-07  Alexey Proskuryakov  <ap@webkit.org>
 
         Reviewed by Darin.
index 0ffbffb..1fb11e1 100644 (file)
@@ -710,6 +710,12 @@ XMLNames.cpp : dom/make_names.pl xml/xmlattrs.in
             --namespace XML --cppNamespace WebCore --namespaceURI "http://www.w3.org/XML/1998/namespace" --output .
 
 
+FRAMEWORK_FLAGS = $(shell echo $(FRAMEWORK_SEARCH_PATHS) | perl -e 'print "-F " . join(" -F ", split(" ", <>));')
+
+ifeq ($(shell gcc -E -P -dM -F $(BUILT_PRODUCTS_DIR) $(FRAMEWORK_FLAGS) WebCore/ForwardingHeaders/wtf/Platform.h | grep ENABLE_NETSCAPE_PLUGIN_API | cut -d' ' -f3), 1)
+    WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.NPAPI.exp
+endif
+
 ifeq ($(findstring 10.4,$(MACOSX_DEPLOYMENT_TARGET)), 10.4)
     WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.Tiger.exp
 endif
diff --git a/WebCore/WebCore.NPAPI.exp b/WebCore/WebCore.NPAPI.exp
new file mode 100644 (file)
index 0000000..6b856f6
--- /dev/null
@@ -0,0 +1,18 @@
+__NPN_CreateObject
+__NPN_Enumerate
+__NPN_Evaluate
+__NPN_GetIntIdentifier
+__NPN_GetProperty
+__NPN_GetStringIdentifier
+__NPN_GetStringIdentifiers
+__NPN_IdentifierIsString
+__NPN_Invoke
+__NPN_InvokeDefault
+__NPN_ReleaseObject
+__NPN_ReleaseVariantValue
+__NPN_RemoveProperty
+__NPN_RetainObject
+__NPN_SetException
+__NPN_SetProperty
+__NPN_UTF8FromIdentifier
+__ZN7WebCore5Frame20windowScriptNPObjectEv
index 5c588c9..a2652dc 100644 (file)
@@ -133,23 +133,6 @@ _WebCoreSetAlwaysUseATSU
 _WebCoreSetShouldUseFontSmoothing
 _WebCoreShouldUseFontSmoothing
 _WebCoreTextFloatWidth
-__NPN_CreateObject
-__NPN_Enumerate
-__NPN_Evaluate
-__NPN_GetIntIdentifier
-__NPN_GetProperty
-__NPN_GetStringIdentifier
-__NPN_GetStringIdentifiers
-__NPN_IdentifierIsString
-__NPN_Invoke
-__NPN_InvokeDefault
-__NPN_ReleaseObject
-__NPN_ReleaseVariantValue
-__NPN_RemoveProperty
-__NPN_RetainObject
-__NPN_SetException
-__NPN_SetProperty
-__NPN_UTF8FromIdentifier
 __Z26ReportBlockedObjCExceptionP11NSException
 __ZN7WebCore10CachedPage14documentLoaderEv
 __ZN7WebCore10CachedPage22cachedPagePlatformDataEv
@@ -419,7 +402,6 @@ __ZN7WebCore5Frame13reapplyStylesEv
 __ZN7WebCore5Frame17bindingRootObjectEv
 __ZN7WebCore5Frame18windowScriptObjectEv
 __ZN7WebCore5Frame20setSelectionFromNoneEv
-__ZN7WebCore5Frame20windowScriptNPObjectEv
 __ZN7WebCore5Frame21setProhibitsScrollingEb
 __ZN7WebCore5Frame26dashboardRegionsDictionaryEv
 __ZN7WebCore5Frame29cleanupScriptObjectsForPluginEPv
index 3c55f35..9e54358 100644 (file)
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                        shellPath = /bin/sh;
-                       shellScript = "# Corrections for 64-bit\n# 1) Exclude _NPN_ symbols as NPAPI support is disabled in 64-bit\n# 2) Switch NSRect, NSSize and NSPoint with their CG counterparts\n# 3) Append any 64-bit only symbols from WebCore.LP64.exp\ngrep -v \"^__NPN_\" \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebCore/WebCore.exp\" | sed -e s/7_NSRect/6CGRect/ -e s/7_NSSize/6CGSize/ -e s/8_NSPoint/7CGPoint/ -e s/^__ZN7WebCore5Frame20windowScriptNPObjectEv$// > \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebCore/WebCore.LP64.exp\"\ncat \"${SRCROOT}/WebCore.LP64.exp\" >> \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebCore/WebCore.LP64.exp\"\n";
+                       shellScript = "# Corrections for 64-bit\n# 1) Switch NSRect, NSSize and NSPoint with their CG counterparts\n# 2) Append any 64-bit only symbols from WebCore.LP64.exp\nsed -e s/7_NSRect/6CGRect/ -e s/7_NSSize/6CGSize/ -e s/8_NSPoint/7CGPoint/ \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebCore/WebCore.exp\" > \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebCore/WebCore.LP64.exp\"\ncat \"${SRCROOT}/WebCore.LP64.exp\" >> \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebCore/WebCore.LP64.exp\"\n";
                };
                5D2F7DA00C6879C600B5B72B /* Update Info.plist with version information */ = {
                        isa = PBXShellScriptBuildPhase;
index 4c2605e..69204be 100644 (file)
@@ -585,7 +585,7 @@ static NSArray *kit(const Vector<IntRect>& rects)
 // FIXME: this should be implemented in the implementation
 - (void *)_NPObject
 {
-#if USE(NPOBJECT)
+#if ENABLE(NETSCAPE_PLUGIN_API)
     WebCore::Element* element = [self _element];
     if (element->hasTagName(WebCore::HTMLNames::appletTag) || element->hasTagName(WebCore::HTMLNames::embedTag) || element->hasTagName(WebCore::HTMLNames::objectTag))
         return static_cast<WebCore::HTMLPlugInElement*>(element)->getNPObject();
index 8bffcf1..a354af5 100644 (file)
@@ -25,7 +25,7 @@
 
 #include "config.h"
 
-#if !PLATFORM(DARWIN) || !defined(__LP64__)
+#if ENABLE(NETSCAPE_PLUGIN_API)
 
 #include "NP_jsobject.h"
 
@@ -400,4 +400,4 @@ bool _NPN_Enumerate(NPP, NPObject *o, NPIdentifier **identifier, uint32_t *count
     return false;
 }
 
-#endif
+#endif // ENABLE(NETSCAPE_PLUGIN_API)
index dd9ccae..9b6d61a 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef NP_JSOBJECT_H
 #define NP_JSOBJECT_H
 
-#if !PLATFORM(DARWIN) || !defined(__LP64__)
+#if ENABLE(NETSCAPE_PLUGIN_API)
 
 #include "npruntime_internal.h"
 #include <wtf/Forward.h>
@@ -50,5 +50,6 @@ struct JavaScriptObject
 NPObject* _NPN_CreateScriptObject(NPP npp, KJS::JSObject*, PassRefPtr<KJS::Bindings::RootObject> rootObject);
 NPObject* _NPN_CreateNoScriptObject(void);
 
-#endif
+#endif // ENABLE(NETSCAPE_PLUGIN_API)
+
 #endif
index 257b42e..206e0eb 100644 (file)
@@ -25,7 +25,7 @@
 
 #include "config.h"
 
-#if !PLATFORM(DARWIN) || !defined(__LP64__)
+#if ENABLE(NETSCAPE_PLUGIN_API)
 
 #include "c_class.h"
 
@@ -120,4 +120,4 @@ Field* CClass::fieldNamed(const Identifier& identifier, Instance* instance) cons
 
 } } // namespace KJS::Bindings
 
-#endif
+#endif // ENABLE(NETSCAPE_PLUGIN_API)
index 8134d5d..187b09f 100644 (file)
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#if !PLATFORM(DARWIN) || !defined(__LP64__)
-
 #ifndef BINDINGS_C_CLASS_H_
 #define BINDINGS_C_CLASS_H_
 
+#if ENABLE(NETSCAPE_PLUGIN_API)
+
 #include "npruntime_internal.h"
 #include "runtime.h"
 #include <wtf/HashMap.h>
@@ -56,5 +56,6 @@ private:
 } // namespace Bindings
 } // namespace KJS
 
-#endif
+#endif // ENABLE(NETSCAPE_PLUGIN_API)
+
 #endif
index 7c7a33f..abcc090 100644 (file)
@@ -25,7 +25,7 @@
 
 #include "config.h"
 
-#if !PLATFORM(DARWIN) || !defined(__LP64__)
+#if ENABLE(NETSCAPE_PLUGIN_API)
 
 #include "c_instance.h"
 
@@ -209,4 +209,4 @@ void CInstance::getPropertyNames(ExecState*, PropertyNameArray& nameArray)
 }
 }
 
-#endif
+#endif // ENABLE(NETSCAPE_PLUGIN_API)
index 9991a18..82dd64a 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef BINDINGS_C_INSTANCE_H_
 #define BINDINGS_C_INSTANCE_H_
 
-#if !PLATFORM(DARWIN) || !defined(__LP64__)
+#if ENABLE(NETSCAPE_PLUGIN_API)
 
 #include "runtime.h"
 #include <wtf/Noncopyable.h>
@@ -75,5 +75,6 @@ private:
 
 } // namespace KJS
 
-#endif
+#endif // ENABLE(NETSCAPE_PLUGIN_API)
+
 #endif
index c5636cd..bd23211 100644 (file)
@@ -25,7 +25,7 @@
 
 #include "config.h"
 
-#if !PLATFORM(DARWIN) || !defined(__LP64__)
+#if ENABLE(NETSCAPE_PLUGIN_API)
 
 #include "c_runtime.h"
 
@@ -93,4 +93,4 @@ void CField::setValueToInstance(ExecState *exec, const Instance *inst, JSValue *
 
 } }
 
-#endif
+#endif // ENABLE(NETSCAPE_PLUGIN_API)
index 469008a..3ae8f7f 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef BINDINGS_C_RUNTIME_H_
 #define BINDINGS_C_RUNTIME_H_
 
-#if !PLATFORM(DARWIN) || !defined(__LP64__)
+#if ENABLE(NETSCAPE_PLUGIN_API)
 
 #include "npruntime_internal.h"
 #include "runtime.h"
@@ -62,5 +62,6 @@ private:
 } // namespace Bindings
 } // namespace KJS
 
-#endif
+#endif // ENABLE(NETSCAPE_PLUGIN_API)
+
 #endif
index 69e4b6a..94c68ac 100644 (file)
@@ -26,7 +26,7 @@
 
 #include "config.h"
 
-#if !PLATFORM(DARWIN) || !defined(__LP64__)
+#if ENABLE(NETSCAPE_PLUGIN_API)
 
 #include "c_utility.h"
 
@@ -151,4 +151,4 @@ Identifier identifierFromNPIdentifier(const NPUTF8* name)
 
 } }
 
-#endif
+#endif // ENABLE(NETSCAPE_PLUGIN_API)
index bb5434e..a7b064c 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef C_UTILITY_H_
 #define C_UTILITY_H_
 
-#if !PLATFORM(DARWIN) || !defined(__LP64__)
+#if ENABLE(NETSCAPE_PLUGIN_API)
 
 #include "npruntime_internal.h"
 
@@ -71,5 +71,6 @@ struct PrivateIdentifier {
 
 } }
 
-#endif
+#endif // ENABLE(NETSCAPE_PLUGIN_API)
+
 #endif
index d0e1913..f170eab 100644 (file)
@@ -25,7 +25,7 @@
 
 #include "config.h"
 
-#if !PLATFORM(DARWIN) || !defined(__LP64__)
+#if ENABLE(NETSCAPE_PLUGIN_API)
 
 #include "npruntime_internal.h"
 #include "npruntime_impl.h"
@@ -223,4 +223,4 @@ void _NPN_DeallocateObject(NPObject *obj)
     }
 }
 
-#endif
+#endif // ENABLE(NETSCAPE_PLUGIN_API)
index 84e63ce..2b6eb70 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef _NP_RUNTIME_IMPL_H_
 #define _NP_RUNTIME_IMPL_H_
 
-#if !PLATFORM(DARWIN) || !defined(__LP64__)
+#if ENABLE(NETSCAPE_PLUGIN_API)
 
 #include "npruntime_internal.h"
 
@@ -60,5 +60,6 @@ extern bool _NPN_Enumerate(NPP npp, NPObject *npobj, NPIdentifier **identifier,
 }  /* end extern "C" */
 #endif
 
-#endif
+#endif // ENABLE(NETSCAPE_PLUGIN_API)
+
 #endif
index b19b16a..301c163 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef NP_RUNTIME_PRIV_H_
 #define NP_RUNTIME_PRIV_H_
 
-#if !PLATFORM(DARWIN) || !defined(__LP64__)
+#if ENABLE(NETSCAPE_PLUGIN_API)
 
 #include "npruntime_internal.h"
 
@@ -36,6 +36,6 @@
 */
 void NPN_InitializeVariantWithStringCopy(NPVariant*, const NPString*);
 
-#endif
+#endif // ENABLE(NETSCAPE_PLUGIN_API)
 #endif
 
index f78dba0..597426c 100644 (file)
@@ -96,7 +96,7 @@ Instance* Instance::createBindingForLanguageInstance(BindingLanguage language, v
             break;
         }
 #endif
-#if !PLATFORM(DARWIN) || !defined(__LP64__)
+#if ENABLE(NETSCAPE_PLUGIN_API)
         case Instance::CLanguage: {
             newInstance = new Bindings::CInstance((NPObject *)nativeInstance, rootObject);
             break;
index ca97271..a0cde5d 100644 (file)
@@ -83,7 +83,6 @@
 #endif
 
 #if PLATFORM(GTK)
-#define WTF_USE_NPOBJECT 1
 #define WTF_USE_JAVASCRIPTCORE_BINDINGS 1
 #endif
 
@@ -93,7 +92,6 @@
 
 #if PLATFORM(WIN)
 #define WTF_USE_JAVASCRIPTCORE_BINDINGS 1
-#define WTF_USE_NPOBJECT 1
 #define WTF_PLATFORM_CG 1
 #undef WTF_PLATFORM_CAIRO
 #define WTF_USE_CFNETWORK 1
 #if PLATFORM(MAC)
 #define WTF_USE_JAVASCRIPTCORE_BINDINGS 1
 #define HAVE_JNI 1
-#ifdef __LP64__
-#define WTF_USE_NPOBJECT 0
-#else
-#define WTF_USE_NPOBJECT 1
-#endif
 #endif
 
 #if PLATFORM(SYMBIAN)
 #define WTF_USE_JAVASCRIPTCORE_BINDINGS 1
-#define WTF_USE_NPOBJECT 1
 #undef WIN32
 #undef _WIN32
 #undef AVOID_STATIC_CONSTRUCTORS
index bcc4971..7a25187 100644 (file)
@@ -41,7 +41,7 @@
 #include "runtime.h"
 #endif
 
-#if USE(NPOBJECT)
+#if ENABLE(NETSCAPE_PLUGIN_API)
 #include "NP_jsobject.h"
 #include "npruntime_impl.h"
 #include "runtime_root.h"
@@ -58,7 +58,7 @@ using namespace HTMLNames;
 
 HTMLPlugInElement::HTMLPlugInElement(const QualifiedName& tagName, Document* doc)
     : HTMLFrameOwnerElement(tagName, doc)
-#if USE(NPOBJECT)
+#if ENABLE(NETSCAPE_PLUGIN_API)
     , m_NPObject(0)
 #endif
 {
@@ -66,7 +66,7 @@ HTMLPlugInElement::HTMLPlugInElement(const QualifiedName& tagName, Document* doc
 
 HTMLPlugInElement::~HTMLPlugInElement()
 {
-#if USE(NPOBJECT)
+#if ENABLE(NETSCAPE_PLUGIN_API)
     if (m_NPObject) {
         _NPN_ReleaseObject(m_NPObject);
         m_NPObject = 0;
@@ -165,7 +165,7 @@ void HTMLPlugInElement::defaultEventHandler(Event* event)
         widget->handleEvent(event);
 }
 
-#if USE(NPOBJECT)
+#if ENABLE(NETSCAPE_PLUGIN_API)
 
 NPObject* HTMLPlugInElement::createNPObject()
 {
@@ -206,7 +206,7 @@ NPObject* HTMLPlugInElement::getNPObject()
     return m_NPObject;
 }
 
-#endif /* USE(NPOBJECT) */
+#endif /* ENABLE(NETSCAPE_PLUGIN_API) */
 
 void HTMLPlugInElement::updateWidgetCallback(Node* n)
 {
index c9cdfd6..f3e4ac4 100644 (file)
@@ -35,7 +35,7 @@ namespace KJS {
 }
 #endif
 
-#if USE(NPOBJECT)
+#if ENABLE(NETSCAPE_PLUGIN_API)
 struct NPObject;
 #endif
 
@@ -69,13 +69,13 @@ public:
 #if USE(JAVASCRIPTCORE_BINDINGS)
     virtual KJS::Bindings::Instance* getInstance() const = 0;
 #endif
-#if USE(NPOBJECT)
+#if ENABLE(NETSCAPE_PLUGIN_API)
     virtual NPObject* getNPObject();
 #endif
 
     virtual void defaultEventHandler(Event*);
 private:
-#if USE(NPOBJECT)
+#if ENABLE(NETSCAPE_PLUGIN_API)
     NPObject* createNPObject();
 #endif
 
@@ -86,7 +86,7 @@ protected:
 #if USE(JAVASCRIPTCORE_BINDINGS)
     mutable RefPtr<KJS::Bindings::Instance> m_instance;
 #endif
-#if USE(NPOBJECT)
+#if ENABLE(NETSCAPE_PLUGIN_API)
     NPObject* m_NPObject;
 #endif
 };
index e77958e..3a04f0c 100644 (file)
@@ -1063,7 +1063,7 @@ PassRefPtr<KJS::Bindings::RootObject> Frame::createRootObject(void* nativeHandle
     return rootObject.release();
 }
 
-#if USE(NPOBJECT)
+#if ENABLE(NETSCAPE_PLUGIN_API)
 NPObject* Frame::windowScriptNPObject()
 {
     if (!d->m_windowScriptNPObject) {
@@ -1124,7 +1124,7 @@ void Frame::clearScriptObjects()
         d->m_bindingRootObject = 0;
     }
 
-#if USE(NPOBJECT)
+#if ENABLE(NETSCAPE_PLUGIN_API)
     if (d->m_windowScriptNPObject) {
         // Call _NPN_DeallocateObject() instead of _NPN_ReleaseObject() so that we don't leak if a plugin fails to release the window
         // script object properly.
@@ -1878,7 +1878,9 @@ FramePrivate::FramePrivate(Page* page, Frame* parent, Frame* thisFrame, HTMLFram
     , frameCount(0)
     , m_prohibitsScrolling(false)
     , m_needsReapplyStyles(false)
+#if ENABLE(NETSCAPE_PLUGIN_API)
     , m_windowScriptNPObject(0)
+#endif
 #if FRAME_LOADS_USER_STYLESHEET
     , m_userStyleSheetLoader(0)
 #endif
index e007c37..3f8089b 100644 (file)
@@ -181,7 +181,7 @@ public:
     WebScriptObject* windowScriptObject();
 #endif
 
-#if USE(NPOBJECT)
+#if ENABLE(NETSCAPE_PLUGIN_API)
     NPObject* windowScriptNPObject();
 #endif    
     
index a79af3e..0582ef9 100644 (file)
@@ -121,7 +121,9 @@ namespace WebCore {
         // The root object used for objects bound outside the context of a plugin.
         RefPtr<KJS::Bindings::RootObject> m_bindingRootObject; 
         RootObjectMap m_rootObjects;
+#if ENABLE(NETSCAPE_PLUGIN_API)
         NPObject* m_windowScriptNPObject;
+#endif
 #if FRAME_LOADS_USER_STYLESHEET
         UserStyleSheetLoader* m_userStyleSheetLoader;
 #endif
index f97fea1..b27be81 100644 (file)
@@ -594,7 +594,7 @@ KJS::Bindings::Instance* Frame::createScriptInstanceForWidget(WebCore::Widget* w
             return Instance::createBindingForLanguageInstance(Instance::ObjectiveCLanguage, objectForWebScript, rootObject.release());
         return 0;
     } else if ([aView respondsToSelector:@selector(createPluginScriptableObject)]) {
-#if USE(NPOBJECT)
+#if ENABLE(NETSCAPE_PLUGIN_API)
         NPObject* npObject = [aView createPluginScriptableObject];
         if (npObject) {
             Instance* instance = Instance::createBindingForLanguageInstance(Instance::CLanguage, npObject, rootObject.release());
index 2e9a049..29f238c 100644 (file)
@@ -1,3 +1,51 @@
+2008-03-07  David D. Kilzer  <ddkilzer@apple.com>
+
+        Unify concept of enabling Netscape Plug-in API (NPAPI).
+
+        Reviewed by Darin.
+
+        * WebKit.exp: Removed unused class export for WebBaseNetscapePluginView.
+
+        * WebKitPrefix.h: Removed WTF_USE_NPOBJECT since we now use
+        ENABLE(NETSCAPE_PLUGIN_API) as defined in Platform.h.
+
+        * Plugins/WebBaseNetscapePluginStream.h: Replaced #ifndef __LP64__ with
+        #if ENABLE(NETSCAPE_PLUGIN_API).
+        * Plugins/WebBaseNetscapePluginStream.mm: Ditto.
+        * Plugins/WebBaseNetscapePluginView.h: Ditto.
+        * Plugins/WebBaseNetscapePluginView.mm: Ditto.
+        * Plugins/WebBaseNetscapePluginViewInternal.h: Ditto.
+        * Plugins/WebBaseNetscapePluginViewPrivate.h: Ditto.
+        * Plugins/WebBasePluginPackage.h: Ditto.
+        * Plugins/WebBasePluginPackage.m: Ditto.
+        (+[WebBasePluginPackage pluginWithPath:]):
+        * Plugins/WebNetscapeDeprecatedFunctions.c: Ditto.
+        * Plugins/WebNetscapeDeprecatedFunctions.h: Ditto.
+        * Plugins/WebNetscapePluginEmbeddedView.h: Ditto.
+        * Plugins/WebNetscapePluginEmbeddedView.mm: Ditto.
+        * Plugins/WebNetscapePluginPackage.h: Ditto.
+        * Plugins/WebNetscapePluginPackage.m: Ditto.
+        * Plugins/WebNetscapePluginStream.h: Ditto.
+        * Plugins/WebNetscapePluginStream.mm: Ditto.
+        * Plugins/WebPluginDatabase.m: Ditto.
+        (-[WebPluginDatabase pluginForKey:withEnumeratorSelector:]):
+        * Plugins/npapi.m: Ditto.
+        * WebCoreSupport/WebFrameLoaderClient.mm: Ditto.
+        (WebFrameLoaderClient::objectContentType):
+        (WebFrameLoaderClient::createPlugin):
+        * WebView/WebHTMLView.mm: Ditto.
+        (-[NSArray _web_makePluginViewsPerformSelector:withObject:]):
+        * WebView/WebHTMLViewInternal.h: Ditto.
+
+        * WebView/WebFrame.mm: Replaced #ifndef __LP64__ with
+        #if ENABLE(NETSCAPE_PLUGIN_API). Moved methods below from (WebPrivate)
+        category to (WebInternal) category so we don't expose the ENABLE() macro
+        from the private header.
+        (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]):
+        (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]):
+        * WebView/WebFrameInternal.h: Ditto.
+        * WebView/WebFramePrivate.h: Ditto.
+
 2008-03-07  Alexey Proskuryakov  <ap@webkit.org>
 
         Reviewed by Darin.
index 77cf609..2a5daf0 100644 (file)
@@ -25,7 +25,8 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-#ifndef __LP64__
+
+#if ENABLE(NETSCAPE_PLUGIN_API)
 #import <Foundation/Foundation.h>
 
 #import <WebKit/npfunctions.h>
index 407c6d0..3a85e01 100644 (file)
@@ -26,7 +26,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __LP64__
+#if ENABLE(NETSCAPE_PLUGIN_API)
 #import "WebBaseNetscapePluginStream.h"
 
 #import "WebBaseNetscapePluginView.h"
index cf039ea..74d3ad7 100644 (file)
@@ -26,7 +26,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __LP64__
+#if ENABLE(NETSCAPE_PLUGIN_API)
 #import <Cocoa/Cocoa.h>
 
 #import <AGL/agl.h>
index 946c8a6..daad708 100644 (file)
@@ -26,7 +26,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __LP64__
+#if ENABLE(NETSCAPE_PLUGIN_API)
 
 #import "WebBaseNetscapePluginView.h"
 
index 1285052..538f2b7 100644 (file)
@@ -26,7 +26,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __LP64__
+#if ENABLE(NETSCAPE_PLUGIN_API)
 #import <WebKit/WebBaseNetscapePluginView.h>
 
 @interface WebBaseNetscapePluginView (WebInternal)
index 7be24b0..e9f5d18 100644 (file)
@@ -26,7 +26,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __LP64__
+#if ENABLE(NETSCAPE_PLUGIN_API)
 #import <WebBaseNetscapePluginView.h>
 
 @class NSURLRequest;
index 7a884b8..a5a2877 100644 (file)
@@ -28,7 +28,7 @@
 
 #import <WebCore/WebCoreViewFactory.h>
 
-#if USE(NPOBJECT)
+#if ENABLE(NETSCAPE_PLUGIN_API)
 #import <WebKit/npfunctions.h>
 #else
 typedef void (*BP_CreatePluginMIMETypesPreferencesFuncPtr)(void);
index 99d4e74..bf4fe39 100644 (file)
     WebBasePluginPackage *pluginPackage = [[WebPluginPackage alloc] initWithPath:pluginPath];
 
     if (!pluginPackage) {
-#ifdef __LP64__
-        return nil;
-#else
+#if ENABLE(NETSCAPE_PLUGIN_API)
         pluginPackage = [[WebNetscapePluginPackage alloc] initWithPath:pluginPath];
+#else
+        return nil;
 #endif
     }
 
index c9ade7b..988c213 100644 (file)
@@ -25,7 +25,7 @@
 
 #include "WebNetscapeDeprecatedFunctions.h"
 
-#ifndef __LP64__
+#if ENABLE(NETSCAPE_PLUGIN_API)
 
 OSErr WebGetDiskFragment(const FSSpec *fileSpec, UInt32 offset, UInt32 length, ConstStr63Param fragName, CFragLoadOptions options, CFragConnectionID *connID, Ptr *mainAddr, Str255 errMessage)
 {
@@ -47,4 +47,4 @@ extern void WebLMSetCurApRefNum(SInt16 value)
     LMSetCurApRefNum(value);
 }
 
-#endif /* !__LP64__ */
+#endif /* ENABLE(NETSCAPE_PLUGIN_API) */
index 3c90847..22b9fe1 100644 (file)
@@ -23,7 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  */
 
-#ifndef __LP64__
+#if ENABLE(NETSCAPE_PLUGIN_API)
 
 #import <CoreServices/CoreServices.h>
 
@@ -32,4 +32,4 @@ extern OSErr WebCloseConnection(CFragConnectionID *connID);
 extern SInt16 WebLMGetCurApRefNum(void);
 extern void WebLMSetCurApRefNum(SInt16 value);
 
-#endif /* !__LP64__ */
+#endif /* ENABLE(NETSCAPE_PLUGIN_API) */
index 9dca60d..0c79f7a 100644 (file)
@@ -25,7 +25,8 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-#ifndef __LP64__
+
+#if ENABLE(NETSCAPE_PLUGIN_API)
 #import <AppKit/AppKit.h>
 
 #import <WebKit/WebBaseNetscapePluginView.h>
index e9f9d94..d8a0bee 100644 (file)
@@ -25,7 +25,8 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-#ifndef __LP64__
+
+#if ENABLE(NETSCAPE_PLUGIN_API)
 #import "WebNetscapePluginEmbeddedView.h"
 
 #import "WebBaseNetscapePluginViewPrivate.h"
index 75404d8..47cba56 100644 (file)
@@ -26,7 +26,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __LP64__
+#if ENABLE(NETSCAPE_PLUGIN_API)
 #import "WebBasePluginPackage.h"
 
 #ifdef BUILDING_ON_TIGER
index bf849a8..bd08abe 100644 (file)
@@ -26,7 +26,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef __LP64__
+#if ENABLE(NETSCAPE_PLUGIN_API)
 #import "WebNetscapePluginPackage.h"
 
 #import "WebKitLogging.h"
index e9e48f0..d290552 100644 (file)
@@ -25,7 +25,8 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-#ifndef __LP64__
+
+#if ENABLE(NETSCAPE_PLUGIN_API)
 #import <WebKit/WebBaseNetscapePluginStream.h>
 #import <WebKit/npapi.h>
 
index 8b03e01..2e7fdb9 100644 (file)
@@ -25,7 +25,8 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-#ifndef __LP64__
+
+#if ENABLE(NETSCAPE_PLUGIN_API)
 #import <WebKit/WebNetscapePluginStream.h>
 
 #import <Foundation/NSURLConnection.h>
index e799443..1797866 100644 (file)
@@ -98,7 +98,7 @@ static void checkCandidate(WebBasePluginPackage **currentPlugin, WebBasePluginPa
         if ([[[plugin performSelector:enumeratorSelector] allObjects] containsObject:key]) {
             if ([plugin isKindOfClass:[WebPluginPackage class]]) 
                 checkCandidate(&webPlugin, &plugin);
-#ifndef __LP64__
+#if ENABLE(NETSCAPE_PLUGIN_API)
             else if([plugin isKindOfClass:[WebNetscapePluginPackage class]]) {
                 WebExecutableType executableType = [(WebNetscapePluginPackage *)plugin executableType];
                 if (executableType == WebCFMExecutableType) {
index 0a630a6..59fe118 100644 (file)
@@ -25,7 +25,8 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
-#ifndef __LP64__
+
+#if ENABLE(NETSCAPE_PLUGIN_API)
 #import <WebKit/npapi.h>
 
 #import <WebKit/WebBaseNetscapePluginViewPrivate.h>
index fcc6894..b9b8e08 100644 (file)
@@ -1177,7 +1177,7 @@ ObjectContentType WebFrameLoaderClient::objectContentType(const KURL& url, const
                 if (WebBasePluginPackage *package = [getWebView(m_webFrame.get()) _pluginForExtension:extension]) {
                     if ([package isKindOfClass:[WebPluginPackage class]]) 
                         return ObjectContentOtherPlugin;
-#ifndef __LP64__
+#if ENABLE(NETSCAPE_PLUGIN_API)
                     else {
                         ASSERT([package isKindOfClass:[WebNetscapePluginPackage class]]);
                         return ObjectContentNetscapePlugin;
@@ -1195,7 +1195,7 @@ ObjectContentType WebFrameLoaderClient::objectContentType(const KURL& url, const
         return ObjectContentImage;
 
     if (WebBasePluginPackage *package = [getWebView(m_webFrame.get()) _pluginForMIMEType:type]) {
-#ifndef __LP64__
+#if ENABLE(NETSCAPE_PLUGIN_API)
         if ([package isKindOfClass:[WebNetscapePluginPackage class]])
             return ObjectContentNetscapePlugin;
 #endif
@@ -1336,7 +1336,7 @@ Widget* WebFrameLoaderClient::createPlugin(const IntSize& size, Element* element
         if ([pluginPackage isKindOfClass:[WebPluginPackage class]])
             view = pluginView(m_webFrame.get(), (WebPluginPackage *)pluginPackage, kit(paramNames), kit(paramValues), baseURL, kit(element), loadManually);
             
-#ifndef __LP64__
+#if ENABLE(NETSCAPE_PLUGIN_API)
         else if ([pluginPackage isKindOfClass:[WebNetscapePluginPackage class]]) {
             WebNetscapePluginEmbeddedView *embeddedView = [[[WebNetscapePluginEmbeddedView alloc]
                 initWithFrame:NSMakeRect(0, 0, size.width(), size.height())
@@ -1385,7 +1385,7 @@ void WebFrameLoaderClient::redirectDataToPlugin(Widget* pluginWidget)
 
     NSView *pluginView = pluginWidget->getView();
 
-#ifndef __LP64__
+#if ENABLE(NETSCAPE_PLUGIN_API)
     if ([pluginView isKindOfClass:[WebNetscapePluginEmbeddedView class]])
         [representation _redirectDataToManualLoader:(WebNetscapePluginEmbeddedView *)pluginView forPluginView:pluginView];
     else {
@@ -1428,7 +1428,7 @@ Widget* WebFrameLoaderClient::createJavaAppletWidget(const IntSize& size, Elemen
             }
             view = pluginView(m_webFrame.get(), (WebPluginPackage *)pluginPackage, names, values, baseURL, kit(element), NO);
         } 
-#ifndef __LP64__
+#if ENABLE(NETSCAPE_PLUGIN_API)
         else if ([pluginPackage isKindOfClass:[WebNetscapePluginPackage class]]) {
             view = [[[WebNetscapePluginEmbeddedView alloc] initWithFrame:NSMakeRect(0, 0, size.width(), size.height())
                 pluginPackage:(WebNetscapePluginPackage *)pluginPackage
index df5e130..9b4cc66 100644 (file)
@@ -1,6 +1,5 @@
 .objc_class_name_WebArchive
 .objc_class_name_WebBackForwardList
-.objc_class_name_WebBaseNetscapePluginView
 .objc_class_name_WebCache
 .objc_class_name_WebCoreScrollView
 .objc_class_name_WebCoreStatistics
index 73a1048..7a5c17b 100644 (file)
 
 #include <JavaScriptCore/Platform.h>
 
-#ifdef __LP64__
-#define WTF_USE_NPOBJECT 0
-#else
-#define WTF_USE_NPOBJECT 1
-#endif
-
 #ifdef __cplusplus
 #include <wtf/FastMalloc.h>
 #endif
index 87473f4..c954863 100644 (file)
@@ -582,6 +582,28 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
     return dataSource(frameLoader->documentLoader());
 }
 
+#if ENABLE(NETSCAPE_PLUGIN_API)
+- (void)_recursive_resumeNullEventsForAllNetscapePlugins
+{
+    Frame* coreFrame = core(self);
+    for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame)) {
+        NSView <WebDocumentView> *documentView = [[kit(frame) frameView] documentView];
+        if ([documentView isKindOfClass:[WebHTMLView class]])
+            [(WebHTMLView *)documentView _resumeNullEventsForAllNetscapePlugins];
+    }
+}
+
+- (void)_recursive_pauseNullEventsForAllNetscapePlugins
+{
+    Frame* coreFrame = core(self);
+    for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame)) {
+        NSView <WebDocumentView> *documentView = [[kit(frame) frameView] documentView];
+        if ([documentView isKindOfClass:[WebHTMLView class]])
+            [(WebHTMLView *)documentView _pauseNullEventsForAllNetscapePlugins];
+    }
+}
+#endif
+
 @end
 
 @implementation WebFrame (WebPrivate)
@@ -630,30 +652,6 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
     return (WebFrameLoadType)[self _frameLoader]->loadType();
 }
 
-#ifndef __LP64__
-- (void)_recursive_resumeNullEventsForAllNetscapePlugins
-{
-    Frame* coreFrame = core(self);
-    for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame)) {
-        NSView <WebDocumentView> *documentView = [[kit(frame) frameView] documentView];
-        if ([documentView isKindOfClass:[WebHTMLView class]])
-            [(WebHTMLView *)documentView _resumeNullEventsForAllNetscapePlugins];
-    }
-}
-#endif
-
-#ifndef __LP64__
-- (void)_recursive_pauseNullEventsForAllNetscapePlugins
-{
-    Frame* coreFrame = core(self);
-    for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame)) {
-        NSView <WebDocumentView> *documentView = [[kit(frame) frameView] documentView];
-        if ([documentView isKindOfClass:[WebHTMLView class]])
-            [(WebHTMLView *)documentView _pauseNullEventsForAllNetscapePlugins];
-    }
-}
-#endif
-
 - (NSRange)_selectedNSRange
 {
     return [_private->bridge selectedNSRange];
index d682825..81a71d8 100644 (file)
@@ -160,6 +160,11 @@ struct WebCoreHistoryItem;
 // should be used instead.
 - (WebDataSource *)_dataSource;
 
+#if ENABLE(NETSCAPE_PLUGIN_API)
+- (void)_recursive_resumeNullEventsForAllNetscapePlugins;
+- (void)_recursive_pauseNullEventsForAllNetscapePlugins;
+#endif
+
 @end
 
 @interface NSObject (WebInternalFrameLoadDelegate)
index 4595572..9c07815 100644 (file)
@@ -57,10 +57,6 @@ typedef enum {
 - (BOOL)_isFrameSet;
 - (BOOL)_firstLayoutDone;
 - (WebFrameLoadType)_loadType;
-#ifndef __LP64__
-- (void)_recursive_resumeNullEventsForAllNetscapePlugins;
-- (void)_recursive_pauseNullEventsForAllNetscapePlugins;
-#endif
 
 // These methods take and return NSRanges based on the root editable element as the positional base.
 // This fits with AppKit's idea of an input context. These methods are slow compared to their DOMRange equivalents.
index 066e55c..d784929 100644 (file)
@@ -4534,7 +4534,7 @@ static BOOL writingDirectionKeyBindingsEnabled()
 
 - (void)_web_makePluginViewsPerformSelector:(SEL)selector withObject:(id)object
 {
-#ifndef __LP64__
+#if ENABLE(NETSCAPE_PLUGIN_API)
     NSEnumerator *enumerator = [self objectEnumerator];
     WebNetscapePluginEmbeddedView *view;
     while ((view = [enumerator nextObject]) != nil)
@@ -4595,7 +4595,7 @@ static BOOL writingDirectionKeyBindingsEnabled()
     return _private->mouseDownEvent;
 }
 
-#ifndef __LP64__
+#if ENABLE(NETSCAPE_PLUGIN_API)
 - (void)_pauseNullEventsForAllNetscapePlugins
 {
     NSArray *subviews = [self subviews];
@@ -4610,7 +4610,7 @@ static BOOL writingDirectionKeyBindingsEnabled()
 }
 #endif
 
-#ifndef __LP64__
+#if ENABLE(NETSCAPE_PLUGIN_API)
 - (void)_resumeNullEventsForAllNetscapePlugins
 {
     NSArray *subviews = [self subviews];
index b899a80..ade904d 100644 (file)
@@ -41,7 +41,7 @@ namespace WebCore {
 - (void)_selectionChanged;
 - (void)_updateFontPanel;
 - (BOOL)_canSmartCopyOrDelete;
-#ifndef __LP64__
+#if ENABLE(NETSCAPE_PLUGIN_API)
 - (void)_pauseNullEventsForAllNetscapePlugins;
 - (void)_resumeNullEventsForAllNetscapePlugins;
 #endif