출처: http://www.longtailvideo.com/support/forum/Plugins/18826/Plugins-in-innerHTML

halcyonite

Hi

I am embedding a player in my app along with the sharing plugin.Now I want to make the player appear on the click of a button.To make that happen I have taken an empty <div> and wrote a script to get the embed code in the innerHTML of the <div>.

I got the player but not the plugins.I could'nt make out what the problem is.All of the flash variables are working except the the plugins.

I appreciate if anyone could identify the problem.

My Code:
<html>
<script type="text/javascript">
function Add()
{
document.getElementById("player").innerHTML=embedcode;
}
</script>
<body>
<div id="player"></div>
<input type="button" onclick=" Add()">
</body>
</html>

I am able to get the player with the above code but could not get plugins .

Aug. 04, 2009Zachary Ozer

@halcyonite:

I suspect that it's something to do with your embed code. Could you please post it / a link to it?

Aug. 05, 2009halcyonite

Hi Ozer

This is my embed code.

<embed src="player.swf" width='450' height='450' allowfullscreen='true' allowscriptaccess='always' flashvars='file=filepath&dock=true&plugins=sharing&sharing.code=code&sharing.link=link'/>

Aug. 05, 2009ramsey


var embedcode = '<embed src="player.swf" width="450" height="450" allowfullscreen="true" allowscriptaccess="always" flashvars="file=' + filepath + '&dock=true&plugins=sharing&sharing.code=' + code + '&sharing.link=' + link + '"/>';


Assuming that you have previously defined the JavaScript variables filepath, code, and link.

Aug. 05, 2009halcyonite

Hi ramsey

Firstly I want to say my thanks to ur immediate reaction.
But I am sorry to say that ur code did'nt work.
I am able to render the player along with all the flashvars except the plugins.
My file is in the same directory as the player.
I dont understand why plugins are not rendered .

Aug. 05, 2009ramsey

I'd have to see your testing page before I could offer any more help. Can you post a link?

Aug. 05, 2009Zachary Ozer

@halcyonite:

1.) Which version of the player are you using? Where did you download it from?

2.) Could you use SWFObject (http://www.longtailvideo.com/support/tutorials/Embedding-Flash#swfobject) to embed your player? We find that this often fixes many problems.

AND

출처: http://doxygen.db48x.net/mozilla-full/html/hierarchy.htm

Go to the graphical class hierarchy

This inheritance list is sorted roughly, but not completely, alphabetically:

l

AND

출처: https://developer.mozilla.org/en/standalone_xpcom

mozconfig 파일을 root 에 복사하고 편집한다.

Standalone XPCOM

Table of contents
  1. 1. Original Document Information

Warning: The content of this article may be out of date. These instructions were last updated in 2000.

Standalone XPCOM is a tree configuration that builds a minimal set of libraries (shared mostly) that can be used to get all features of XPCOM. The contents of this standalone XPCOM in general are:

  • NSPR : mozilla/nsprpub
  • XPCOM : mozilla/xpcom

NOTE 1: XPCOM APIs are not frozen yet. By XPCOM 1.0 release they will be.

NOTE 2: XPCOM Standalone differs from the XPCOM built with Mozilla. Hence cannot be used with the Mozilla browser.

Building Standalone XPCOM

Here are the instructions for building the Standalone XPCOM on Unix or Windows:

Step 1 : Pull the sources

  1. cvs -z 3 co mozilla/client.mk
  2. cd mozilla
  3. gmake -f client.mk pull_all BUILD_MODULES=xpcom

Step 2 : Build XPCOM Standalone

  1. ./configure --enable-standalone-modules=xpcom --enable-application=standalone
  2. gmake

Testing Standalone XPCOM

xpcom/sample contains a sample application and a component. This should get built by default.

  • nsTestSample is the sample application. This should have been installed in your bin/ directory.
  • libsample.so (unix) is the sample component implementation that the sample application will try to instantiate. This should have been installed in your bin/components directory

To run the test,

  1. cd to your bin/ directory
  2. setenv LD_LIBRARY_PATH .
  3. ./nsTestSample
    Warning: MOZILLA_FIVE_HOME not set.
    nsNativeComponentLoader: autoregistering begins.
    nsNativeComponentLoader: autoregistering succeeded
    Inital print: initial value
    Set value to: XPCOM defies gravity
    Final print : XPCOM defies gravity
    Test passed.

Test FAILED: What went wrong?

The most common case of why the sample would have failed if you didn't run it from the bin directory. Here are some error messsages and possible ways of fixing them.

./nsTestSample: error in loading shared libraries: libxpcom.so: cannot open shared object file: No such file or directory
LD_LIBRARY_PATH not set. To fix, setenv LD_LIBRARY_PATH . (note the dot).
Link errors when building XPCOM standalone
This is usually due to XPCOM not being built standalone. Make sure you did configure --enable-standalone-modules=xpcom.

What's the difference between Standalone and non-Standalone XPCOM?

There is no binary difference between standalone XPCOM and the XPCOM that ships with the Mozilla browser. The one functional difference is that XPT files cannot be read from .zip files in standalone XPCOM.

TODO for v 1.0

  1. Optional exclusion of specific features into standalone XPCOM like registry, xpconnect. Tweeking these options will cause reduction in memory requirements and size.
  2. Get xpcom/tests directory upto date and documented.
  3. Update this document for Mac.
  4. API freeze and documentation


AND

출처: https://developer.mozilla.org/en/Windows_Build_Prerequisites

Windows Build Prerequisites

The Mozilla build process requires many tools that are not installed on most Windows systems. In addition to Visual Studio, you must install MozillaBuild, a bundle of software including just the right versions of bash, GNU make, autoconf, Mercurial, and much more.

This document is a guide to the MozillaBuild environment, which works with the following versions of the Mozilla codebase:

  • Builds from Mercurial code repositories
    • mozilla-central (1.9.2/Firefox 3.next), tracemonkey
    • mozilla-1.9.1 (1.9.1/Firefox 3.5/Thunderbird 3)
  • Builds from CVS code repository
    • HEAD (1.9.0.x/Firefox 3.0.x)
    • MOZILLA_1_8_BRANCH (1.8.1.2/Firefox 2.0.0.2 or higher)
    • MOZILLA_1_8_0_BRANCH (1.8.0.12/Firefox 1.5.0.10 or higher)

It works with the following compilers ("Official" means this is what we use for the builds we release as the Firefox product):

  Mercurial CVS
  mozilla-central/tracemonkey/mozilla-1.9.1
Gecko 1.9.1 & later
Firefox 3.5 & later
HEAD
Gecko 1.9.0
Firefox 3.0
MOZILLA_1_8_BRANCH
Gecko 1.8.1
Firefox 2.0
MOZILLA_1_8_0_BRANCH
Gecko 1.8.0
Firefox 1.5
VC6 No No Yes (Official) Yes (Official)
VC7.1 (Visual Studio 2003) Yes Yes Yes No
VC8 (Visual Studio 2005) Yes (Official) Yes (Official) No No
VC9 (Visual Studio 2008) Yes Yes No No

For building older versions of the codebase, see the Windows build prerequisites using cygwin. If you are building very old versions of the Mozilla source code, from the 1.0 branch and earlier, follow the nmake build instructions.

Hardware Requirements

Mozilla takes time to build. You need a development-class system:

  • Pentium III or equivalent processor, 1GHz or better
  • 512 MB RAM, 1 GB or more recommended
  • 1.5 GB NTFS or 3 GB FAT disk space, or more
  • Windows 2000SP4 or greater (Windows XP or above recommended, so that you can install the Windows Vista SDK)

Software Requirements

The following software needs to be installed for a standard Windows build:

  • Microsoft Visual C++ Tools
  • Microsoft Windows SDK(s)
  • MozillaBuild

Mozilla may not build if some tools are installed at a path that contains spaces or other breaking characters such as pluses, quotation marks, or meta characters. The Visual C++ tools may be installed in a directory which contains spaces (the default install location is preferred).

Microsoft Visual C++ (MSVC)

Depending on what you're building, you will need to use one of several available versions of Microsoft Visual C++ (MSVC) and/or Microsoft Visual Studio. See the chart at the top of this page to ensure that the version you've selected is compatible with the branch you wish to build.

Building Gecko 1.8.1 or earlier
Projects that are built on Gecko 1.8.1 or earlier (such as Firefox 2) require that you use either Visual C++ 6 or Visual C++ 7.1 (Visual Studio 2003). You must install both the command line tools and the GUI development environment.
Building Gecko 1.9.0 or later
Projects that are built on Gecko 1.9.0 (such as Firefox 3.0) require that you use Visual C++ 7.1 (Visual Studio 2003), Visual C++ 8 (Visual Studio 2005) or Visual C++ 9 (Visual Studio 2008). If you wish to enable jemalloc you must be using Visual Studio 2005 SP1 (service pack 1), or Visual Studio 2005 Express SP1,  no other version of Visual Studio will work.
  • Visual C++ 9 is available free from Microsoft as part of the free Visual C++ 2008 Express Edition. You do not need to install the Silverlight runtime or the SQL Server 2008 Express Edition when offered.
  • The Visual C++ 8 command-line compiler is included with the Vista SDK, but this does not include a debugger. If you do not want to download the Express Edition debugger you can alternatively use the WinDbg debugger instead.
Note: Trying to do parallel builds using Visual C++ 7.1 (from Visual Studio 2003) using make -jN will not work for Firefox 3 and later.

Microsoft Windows SDK

See Windows SDK versions.

MozillaBuild

The MozillaBuild package contains the other software prerequisites necessary for building Mozilla. This includes the MSYS build environment, Mercurial, CVS, Python, NSIS, and UPX, as well as optional/useful tools such as wget, autoconf-2.13, xemacs.

Download the current MozillaBuild 1.3 package.

By default, the package installs to c:\mozilla-build. It is recommended to use the default path. The installer does not modify the Windows registry.

Getting a command prompt for building

After the prerequisites are installed, launch one of the following batch files from the c:\mozilla-build directory:

  • start-msvc6.bat
  • start-msvc71.bat (VS 2003)
  • start-msvc8.bat  (VS 2005)
  • start-msvc9.bat  (VS 2008)

The batch file will automatically display an MSYS command prompt window with all the appropriate environment variables set, provided the software requirements are met. On Windows, the msys window does not look like the default msys window, but rather like the default Windows command shell. All further commands should be executed in this environment.

Common Problems, Hints and Restrictions

  • Debugging Mozilla on Windows FAQ: Tips on how to debug Mozilla on Windows.
  • The build may fail if your PATH environment variable contains quotes ("). Quotes are not properly translated when passed down to MozillaBuild sub-shells. Quotes are usually not needed so they can be removed.
  • Building with versions of NSIS other than the version that comes with the latest supported version of MozillaBuild is not supported and will likely fail.
  • If you are using Windows 7 Beta, you can use the Vista SDK, Visual C++ 2008 Express Edition and the latest version of MozillaBuild. You will need to type "export SKIP_CHK=1" at the mingw prompt before building due to a problem running mt.exe on Windows 7 Beta- this skips some NSS tests which would otherwise fail. The Windows 7 Release Candidate does not have this bug.
  • If you are using Windows and get frequent or constant access violation crashes in sh.exe when compiling or configuring, you may be able to work around this problem by replacing the mozilla-build\msys\bin\msys-1.0.dll file included with MozBuild 1.3 with the one available from the official MinGW SourceForge.net page, specifically the one available in this file.

Warning: If you follow the below advice, your computer will not be protected against attacks that exploit this vulnerability. Make sure you take adequate precautions.
  • If you still get random crashes when running MAKE, you may be encountering interference from a Windows Security Update that prevents proper operation of the Bash shell on some Windows systems.  In this case, if you're on Windows XP, you will need to uninstall Windows XP Security Update KB933729 using Add or Remove Programs from the Control Panel.  This Security Update is also incorporated into Windows XP Service Pack 3 (KB936929), so if you have already installed SP3 you'll need to uninstall it and then make sure that Service Pack 2, including all Windows updates (EXCEPT KB933729 and KB936929) get installed.  To prevent these two updates from being installed automatically, select "Notify me but don't automatically download or install them" in the Control Panel's "Automatic Updates" dialog.  Then de-select them when either of these two items appear in the list of recommended updates, and when asked, indicate that you don't want to be asked about these de-selected updates in the future.

Return to the Build Documentation

AND


출처 : http://vervain.tistory.com/tag/onpropertychange


FireFox 에는 onpropertychange event가 없다.
IE에서 DOM element의 값 변경사항 등을 감시하는데, 다음과 같이 쓰인다.

IE 기준:
  1. var ROFL = function() {   
  2.     if (event.propertyName == "value") {   
  3.         alert("I got ya!");   
  4.     }   
  5. }   
  6.   
  7. var inputElement = document.getElementById("input");    
  8. inputElement.onpropertychange = ROFL;   
  9. inputElement.value = "snooping..";  

하지만, FF에는 onpropertychange 이벤트가 없다. 한참 고민을 하던 중에 예전에 Netscape에는 변수의 변화를 감시할 수 있는, watch, unwatch 가 있었다. 이 놈들이 DOM element 에도 적용이 되는지 테스트해보았다.

  1. var header = document.getElementById("header");   
  2. header.watch("id"function(id, xn, xp) {   
  3.     alert(id + "," + xn + "," + xp);   
  4. });   
  5. header.id = ":)";   
  6. header.unwatch("id");   
  7.   
  8. header.style.watch("width", ....);   
  9. header.style.width = "100px";   
  10. header.style.unwatch("width");  

된다. :)
그러나, 확인되야 될 사항이 있다.

  1. closures 사용에 따른 메모리 유출.
  2. 감시되고 있는 객체가 삭제될 경우.
  3. unwatch 를 사용하지 않을 경우 메모리 유출.




AND


출처 : http://dev.opera.com/articles/view/the-opera-plug-in-interface/#NPN_InvokeDefault


The Opera plug-in interface

By Opera Software · 18 Jan, 2008

Published in: , , , ,

Note: This documentation applies to version 9.0 and later of Opera for desktop, mobile phones, and devices.

Table of contents

The properties covered below are as follows:

Introduction

This document describes the new cross-browser NPAPI extensions that has been developed by a group of browser and plugin vendors, including Opera Software, the Mozilla Foundation, Adobe, Apple, and Sun Microsystems. This document also talks about how to make a plugin use these new extensions to be scriptable, and how to access objects in a browser.

The new NPPVariable enumeration is defined in npapi.h as:

NPPVpluginScriptableNPObject = 15

Security model

The security model for making calls through this API is much like the general same-origin security model enforced by the browser. That means that script from an origin other than the origin of the page that loaded the plugin is not able to access methods and properties on the plugin. The same thing applies the other way too, the plugin can reach only JavaScript objects in the same origin as the page that loaded the plugin.

What's in the plugin code?

A plugin that wishes to be scriptable using this new mechanism needs to return the appropriate NPObject (which is created by calling NPN_CreateObject()) when the browser requests it by calling:

NPP_GetValue(npp, NPPVpluginScriptableNPObject, ...);

Accessing browser objects from a plugin

A plugin that wishes to access objects in the browser window that loaded the plugin can do this by getting the NPObject for the browsers window object, or the DOM element that loaded the plugin. This is done by using an extension to NPN_GetValue(). The extensions are two additions to the NPNVariables enumeration, the new enumerations are NPNVWindowNPObject and NPNVPluginElementNPObject. By calling NPN_GetValue() with either of those new enumerations will return an NPObject representing the browser object, and from there, the functions in this API can be used to get and set properties, and to call methods on those browser objects.

And as always when working with reference counted NPObjects, the caller is responsible for calling NPN_ReleaseObject() on the NPObject to drop the reference.

The new NPNVariable enumerations are defined in npapi.h as:

NPNVWindowNPObject = 15,
NPNVPluginElementNPObject = 16

How to call plugin native methods

The following HTML code will do the job:

<embed type="application/plugin-mimetype">
<script language="javascript">
var embed = document.embeds[0];
embed.nativeMethod();
alert(embed.nativeProperty);
embed.nativeProperty.anotherNativeMethod();
</script>

The API extensions

The API extensions are based on four new structs, NPString, NPVariant, NPObject, and NPClass.

Common typedefs

NPUTF8 is a byte representing an 8-bit unit of a UTF-8 character.

typedef char NPUTF8;

NPIdentifier is an opaque type used for method and property identifiers, e.g. strings or integers. NPIdentifiers are unique, e.g. for any given string or integer, there is only one NPIdentifier. The lifetime of NPIdentifiers is controlled by the browser

typedef void *NPIdentifier;

NPString

NPString is a struct that holds a pointer to a sequence of 8-bit units (NPUTF8) making up a UTF-8 string, and the number of 8-bit units in the UTF-8 string.

Whenever an NPString owns its string data and the data may be released through a call to NPN_ReleaseVariantValue(), the string data must be allocated using NPN_MemAlloc().

The struct is defined as follows:

typedef struct _NPString {
 const NPUTF8 *utf8characters;
 uint32_t utf8length;
} NPString;

NPVariant

NPVariant is a struct that holds a value and the type of that value. The value is held in a union, and the type is one of types defined in the NPVariantType enumeration.

The NPVariantType enumeration and NPVariant struct is defined as follows:

typedef enum {
 NPVariantType_Void,
 NPVariantType_Null,
 NPVariantType_Bool,
 NPVariantType_Int32,
 NPVariantType_Double,
 NPVariantType_String,
 NPVariantType_Object
} NPVariantType;
typedef struct _NPVariant {
 NPVariantType type;
 union {
  bool boolValue;
  uint32_t intValue;
  double_t doubleValue;
  NPString stringValue;
  NPObject *objectValue;
 } value;
} NPVariant;

Plugin developers are not expected to directly manipulate or access the members of the NPVariant instance, instead, the function NPN_ReleaseVariantValue(), and the following macros are provided:

NPVARIANT_IS_VOID(v) Evaluates to true if v is of type NPVariantType_Void.
NPVARIANT_IS_NULL(v) Evaluates to true if v is of type NPVariantType_Null.
NPVARIANT_IS_BOOLEAN(v) Evaluates to true if v is of type NPVariantType_Bool.
NPVARIANT_IS_INT32(v) Evaluates to true if v is of type NPVariantType_Int32.
NPVARIANT_IS_DOUBLE(v) Evaluates to true if v is of type NPVariantType_Double.
NPVARIANT_IS_STRING(v) Evaluates to true if v is of type NPVariantType_String.
NPVARIANT_IS_OBJECT(v) Evaluates to true if v is of type NPVariantType_Object.
NPVARIANT_TO_BOOLEAN(v) Extracts the boolean value from v.
NPVARIANT_TO_INT32(v) Extracts a signed 32-bit integer value from v.
NPVARIANT_TO_DOUBLE(v) Extracts a double precision floating point value from v.
NPVARIANT_TO_STRING(v) Extracts the NPString value from v.
NPVARIANT_TO_OBJECT(v) Extracts the NPObject value from v.
VOID_TO_NPVARIANT(v) Initialize v to a variant of type NPVariantType_Void.
NULL_TO_NPVARIANT(v) Initialize v to a variant of type NPVariantType_Null.
BOOLEAN_TO_NPVARIANT(val, v) Initialize v to a variant of type NPVariantType_Bool with the value val.
INT32_TO_NPVARIANT(val, v) Initialize v to a variant of type NPVariantType_Int32 with the value val.
DOUBLE_TO_NPVARIANT(val, v) Initialize v to a variant of type NPVariantType_Double with the value val.
STRINGZ_TO_NPVARIANT(val, v) Initialize v to a variant of type NPVariantType_String with the value being an NPString holding the UTF-8 string value val.
STRINGN_TO_NPVARIANT(val, len, v) Initialize v to a variant of type NPVariantType_String with the value being an NPString holding the UTF-8 string value val with the length len.
OBJECT_TO_NPVARIANT(val, v) Initialize v to a variant of type NPVariantType_Object with the value val.

JavaScript type to NPVariantType enumeration mapping

When using NPVariants to access JavaScript objects in the browser, or vise versa, the mapping of JavaScript values to NPVariants is as follows:

JavaScript types NPVariantType
undefined NPVariantType_Void
null NPVariantType_Null
boolean NPVariantType_Bool
number NPVariantType_Int32 or NPVariantType_Double
string NPVariantType_String
All other JavaScript types NPVariantType_Object

NPN_ReleaseVariantValue()

NPN_ReleaseVariantValue releases the value in the given variant. This must always be called on result variants and such in this API, i.e. any NPVariant whose value comes from a call that passes back an NPVariant must be released using this function. Access to the value in an NPVariant that has been released will result in undefined behavior.

NPN_ReleaseVariantValue() will call NPN_ReleaseObject() on NPVariants of type NPVARIANTTYPE_OBJECT, and NPN_FreeMem() on NPVariants of type NPVARIANTTYPE_STRING.

NPN_ReleaseVariantValue() is defined as follows:

void NPN_ReleaseVariantValue(NPVariant *variant);

NPN_GetStringIdentifier()

NPN_GetStringIdentifier returns an opaque identifier for the string that is passed in. All calls for the same string are guaranteed to return the same exact identifier.

NPN_GetStringIdentifier() is defined as follows:

NPIdentifier NPN_GetStringIdentifier(const NPUTF8 *name);

NPN_GetStringIdentifiers()

NPN_GetStringIdentifiers returns (through the identifiers out param) an array of opaque identifiers for the names that are passed in. Just like with NPN_GetStringIdentifier(), all calls for the same strings are guaranteed to return the same exact identifiers.

NPN_GetStringIdentifiers() is defined as follows:

void NPN_GetStringIdentifiers(const NPUTF8 **names, int32_t nameCount,
         NPIdentifier *identifiers);

NPN_GetIntIdentifier()

NPN_GetIntIdentifier returns an opaque identifiers for the integer that is passed in. Just like with NPN_GetStringIdentifier() all calls for the same integer are guaranteed to return the same exact identifier.

NPN_GetIntIdentifier() is defined as follows:

NPIdentifier NPN_GetIntIdentifier(int32_t intid);

NPN_IdentifierIsString()

NPN_IdentifierIsString returns true if the given identifier is a string identifier, or false if it is an integer identifier.

NPN_IdentifierIsString() is defined as follows:

bool NPN_IdentifierIsString(NPIdentifier *identifier);

NPN_UTF8FromIdentifier()

NPN_UTF8FromIdentifier returns a pointer to a UTF-8 string as a sequence of 8-bit units (NPUTF8), or NULL if the given identifier is not a string identifier. Once the caller is done with the returned string, the caller is responsible for deallocating the memory used by the string by calling NPN_MemFree()).

NPN_UTF8FromIdentifier() is defined as follows:

NPUTF8 *NPN_UTF8FromIdentifier(NPIdentifier identifier);

NPN_IntFromIdentifier()

NPN_IntFromIdentifier returns the integer value for the given integer identifier. If the given identifier is not a integer identifier, the behavior is undefined.

NPN_IntFromIdentifier() is defined as follows:

int32_t NPN_IntFromIdentifier(NPIdentifier identifier);

NPObject

NPObject is a struct that holds a pointer to an NPClass and an integer reference count, and possibly also implementation specific (i.e. plugin specific, or browser specific) members after or before the struct as defined here. NPObject is the type used to express objects exposed by either the plugin or by the browser through this API. The browsers are expected to expose their window objects and everything reachable from it through this API. NPObjects are reference counted objects, so callers need to be aware and properly release acquired references to NPObjects. To aid with the reference counting and ownership management in general, the functions NPN_CreateObject(), NPN_RetainObject(), NPN_ReleaseObject(), and NPN_ReleaseVariantValue() are provided as part of this API.

NPObject behavior is implemented using the set of callback functions defined in NPClass.

The NPObject struct is defined as follows:

struct NPObject {
   NPClass *_class;
   uint32_t referenceCount;
 /*
  * Additional space may be allocated here by types of NPObjects
  */
};

NPClass

NPClass is a struct that holds a set of pointers to functions that make up the behavior of an instance of an NPClass (i.e. an NPObject).

NPClass contains the following function pointers:

Name Description Return value
allocate Called by NPN_CreateObject() if non-NULL, else malloc() is called by the browser. This function is expected to allocate and return enough storage to hold the NPObject that is being created. A pointer to the newly allocated NPObject.
deallocate Called by NPN_ReleaseObject() if non-NULL, else free() is called when an objects reference count goes to zero. N/A
invalidate Called on live objects that belong to a plugin instance that is being destroyed. This call is always followed by a call to deallocate, or free(). Any attempt to use an invalidated object will result in undefined behavior. N/A
hasMethod Called by NPN_HasMethod() to check whether a given method exists or not on a given NPObject. true if the method exists on the NPObject, else false.
invoke Called by NPN_Invoke() to invoke a specific method on a given NPObject. true if the method invocation was successful, false in case an error occurred.
invokeDefault Called by NPN_InvokeDefault() to invoke the default method, if available, on a given NPObject. true if the method invocation was successful, false in case an error occurred.
hasProperty Called by NPN_HasProperty() to check whether a given property exists or not on a given NPObject. true if the property exists on the NPObject, else false.
getProperty Called by NPN_GetProperty() to get the value of a given property on a given NPObject. true if the method exists on the NPObject, else false.
setProperty Called by NPN_SetProperty() to set the value of a given property on a given NPObject. true if the property was set NPObject, else false.
removeProperty Called by NPN_RemoveProperty() to remove a given property on a given NPObject. true if the property was removed from the NPObject, else false.

The function pointer types are defined as follows:

typedef NPObject *(*NPAllocateFunctionPtr)(NPP npp, NPClass *aClass);
typedef void (*NPDeallocateFunctionPtr)(NPObject *npobj);
typedef void (*NPInvalidateFunctionPtr)(NPObject *npobj);
typedef bool (*NPHasMethodFunctionPtr)(NPObject *npobj, NPIdentifier name);
typedef bool (*NPInvokeFunctionPtr)(NPObject *npobj, NPIdentifier name,
         const NPVariant *args, uint32_t argCount,
         NPVariant *result);
typedef bool (*NPInvokeDefaultFunctionPtr)(NPObject *npobj,
             const NPVariant *args,
             uint32_t argCount,
             NPVariant *result);
typedef bool (*NPHasPropertyFunctionPtr)(NPObject *npobj, NPIdentifier name);
typedef bool (*NPGetPropertyFunctionPtr)(NPObject *npobj, NPIdentifier name,
           NPVariant *result);
typedef bool (*NPSetPropertyFunctionPtr)(NPObject *npobj, NPIdentifier name,
           const NPVariant *value);
typedef bool (*NPRemovePropertyFunctionPtr)(NPObject *npobj,
           NPIdentifier name);

The NPClass struct is defined as follows:

struct NPClass
{
 uint32_t structVersion;
 NPAllocateFunctionPtr allocate;
 NPDeallocateFunctionPtr deallocate;
 NPInvalidateFunctionPtr invalidate;
 NPHasMethodFunctionPtr hasMethod;
 NPInvokeFunctionPtr invoke;
 NPInvokeDefaultFunctionPtr invokeDefault;
 NPHasPropertyFunctionPtr hasProperty;
 NPGetPropertyFunctionPtr getProperty;
 NPSetPropertyFunctionPtr setProperty;
 NPRemovePropertyFunctionPtr removeProperty;
};

structVersion holds the version (NP_CLASS_STRUCT_VERSION) of the NPClass. At the time of this writing the version is 1.

NPN_CreateObject()

NPN_CreateObject allocates a new NPObject. If the given NPClass provides an allocate function it is used allocate the storage for the object and the NPP argument passed to NPN_CreateObject() is passed along to the allocate function. If no allocate function is provided, malloc() is called to allocate enough memory to hold an NPObject. The newly created NPObjects reference count is initialized to 1 before it is returned.

The NPN_CreateObject() function is defined as follows:

NPObject *NPN_CreateObject(NPP npp, NPClass *aClass);

NPN_RetainObject()

NPN_RetainObject increments the reference count of the given NPObject.

The NPN_RetainObject() function is defined as follows:

NPObject *NPN_RetainObject(NPObject *npobj);

NPN_ReleaseObject()

NPN_ReleaseObject decrements the reference count of the given NPObject. If the reference count reaches 0, the NPObject is deallocated using the deallocate function, if provided, or free().

The NPN_ReleaseObject() function is defined as follows:

void NPN_ReleaseObject(NPObject *npobj);

NPN_Invoke()

NPN_Invoke invokes a method on the given NPObject. The method arguments are passed as an array of NPVariants, and the number of arguments is passed in. The result of the method invocation is returned through an NPVariant result parameter. If the method invocation succeeds, NPN_Invoke() returns true, else false. When called by a plugin instance, the plugin instance must be passed as the npp argument.

Callers must call NPN_ReleaseVariantValue() on the result to release the result.

The NPN_Invoke() function is defined as follows:

bool NPN_Invoke(NPP npp, NPObject *npobj, NPIdentifier methodName,
    const NPVariant *args, uint32_t argCount, NPVariant *result);

Note: This method used to be called NPN_Call() in earlier revisions of this API but was renamed to NPN_Invoke() to be more consistently named.

NPN_InvokeDefault()

NPN_InvokeDefault invokes the default method, if available, on the given NPObject. The arguments are passed as an array of NPVariants, and the number of arguments is passed in. The result of the default method invocation is returned through an NPVariant result parameter. If the method invocation succeeds, NPN_InvokeDefault() returns true, else false. When called by a plugin instance, the plugin instance must be passed as the npp argument.

Callers must call NPN_ReleaseVariantValue() on the result to release the result.

If NPN_InvokeDefault() is called on an NPObject that is a wrapper for a callable JavaScript object, the JavaScript object is called. In this case the scope and 'this' of the JavaScript function call is set to the JavaScript object wrapped by the NPObject.

The NPN_InvokeDefault() function is defined as follows:

bool NPN_InvokeDefault(NPP npp, NPObject *npobj, NPIdentifier methodName,
        const NPVariant *args, uint32_t argCount, NPVariant *result);

NPN_Evaluate()

NPN_Evaluate evaluate evaluates a script on the scope of a given NPObject. The script is evaluated in the context of the window that the calling plugin instance (the NPP argument) is loaded in. NPN_Evaluate() returns true if the script was evaluated successfully, else false.

Callers must call NPN_ReleaseVariantValue() on the result to release the result.

The NPN_Evaluate() function is defined as follows:

bool NPN_Evaluate(NPP npp, NPObject *npobj, NPString *script,
      NPVariant *result);

NPN_GetProperty()

NPN_GetProperty gets the value of a property on the given NPObject. The property is identified with an NPIdentifier and the value is returned in the result parameter. When called by a plugin instance, the plugin instance must be passed as the npp argument.

Callers must call NPN_ReleaseVariantValue() on the result to release the result.

The NPN_GetProperty() function is defined as follows:

bool NPN_GetProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName,
      NPVariant *result);

NPN_SetProperty()

NPN_SetProperty sets the value of a property on the given NPObject. The property is identified with an NPIdentifier. NPN_SetProperty returns true if the property was successfully set, else false. When called by a plugin instance, the plugin instance must be passed as the npp argument.

The NPN_SetProperty() function is defined as follows:

bool NPN_SetProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName,
      const NPVariant *value);

NPN_RemoveProperty()

NPN_RemoveProperty removes a property from the given NPObject. The property is identified with an NPIdentifier. NPN_RemoveProperty returns true if the property was successfully removed, else false. When called by a plugin instance, the plugin instance must be passed as the npp argument.

The NPN_ReleaseObject() function is defined as follows:

bool NPN_RemoveProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName);

NPN_HasProperty()

NPN_HasProperty checks if a given property exists on the given NPObject. NPN_HasProperty returns true if the property exists, else false. When called by a plugin instance, the plugin instance must be passed as the npp argument.

The NPN_HasProperty() function is defined as follows:

bool NPN_HasProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName);

NPN_HasMethod()

NPN_HasMethod checks if a given method exists on the given NPObject. NPN_HasMethod returns true if the method exists, else false. When called by a plugin instance, the plugin instance must be passed as the npp argument.

The NPN_HasMethod() function is defined as follows:

bool NPN_HasMethod(NPP npp, NPObject *npobj, NPIdentifier methodName);

NPN_SetException()

NPN_SetException can be called by a plugin to indicate that a call to one of the plugins NPObjects generated an error.

The NPN_SetException() function is defined as follows:

void NPN_SetException(NPObject *npobj, const NPUTF8 *message);

Implementation Notes

This cross-browser NPAPI extension mechanism has been developed in cooperation by a group of browser and plugin vendors. This means that it should be possible to produce a plug-in working in all browsers supporting it following this specification.

This article is based on the Mozilla.org documentation, written by Johnny Stenback.


AND

출처: http://gemal.dk/mozilla/build.html

Build Mozilla Thunderbird/Firefox/Sunbird on Microsoft Windows

I'm a Mozilla fan! And being able to build Mozilla Thunderbird and/or Mozilla Firefox on my Windows XP machine sounded cool.

I didn't have Microsoft Visual C++ so I needed to build without any tools from Microsoft, aside from Windows XP of couse.

So here we go: Build Mozilla Thunderbird and/or Mozilla Firefox and/or Mozilla Sunbird in 14 easy steps!

The versions that you're building will be debug versions. This means that a console will appear with some debug messages. They will also run slower than the versions that you can obtain from mozilla.org.
1. Disk space requirements
Be sure you have enough disk space available. You must have 3.7GB free disk space available. The building tools are around 110MB. The Mozilla source before building it is around 200Mb.
2. Create main directory
All tools and code will be located in c:\mozilla\. Therefore start by creating this directory. Start a Command Prompt and do:
mkdir c:\mozilla\
3. Get GNU Tools for Microsoft Windows (Cygwin)
Install the GNU Tools for Microsoft Windows (also called Cygwin) : Direct download - Info

Install into : c:\mozilla\cygwin\. Remeber to choose Unix as "Default Text File Type". Besides the default modules, install the following modules:
cvs
cygutils
make
patch
patchutils
perl
unzip
zip

You do this by pressing the View button in the Select Packages part of the installer. Click here to see the screenshots.

The following modules should be installed per default. But make sure that they are selected:
ash
diffutils
fileutils
findutils
gawk
grep
sed
sh-utils
textutils
4. Get Netscape wintools
Netscape has modified a handful of the GNU command-line tools to solve some problems mostly for makefile compatibility with the GNU-styled UNIX builds.

Get Netscape wintools : Direct download

Unpack the zip file into a temporary directory. Then start a Command Prompt in the temporary directory and do:
set MOZ_TOOLS=c:\mozilla\moztools
mkdir c:\mozilla\moztools
cd buildtools\windows
install.bat
5. Get MinGW
Get the following MinGW packages:
gcc-core
gcc-g++
binutils
w32api
mingw-runtime

Unpack all of the tar.gz files in c:\mozilla\mingw\. You can do this by placing all the tar.gz files in c:\mozilla\mingw\ and then Start a Command Prompt and do:
cd c:\mozilla\mingw\
c:\mozilla\cygwin\bin\gzip -d *.tar.gz
c:\mozilla\cygwin\bin\tar -xvf binutils-*
c:\mozilla\cygwin\bin\tar -xvf gcc-core-*
c:\mozilla\cygwin\bin\tar -xvf gcc-g++-*
c:\mozilla\cygwin\bin\tar -xvf mingw-runtime-*
c:\mozilla\cygwin\bin\tar -xvf w32api-*
del *.tar
6. Set up
Create a file called mozset.bat in c:\mozilla\. The file should contain the following lines:
@echo off
set MOZ_TOOLS=c:\mozilla\moztools
set PATH=c:\mozilla\mingw\bin;c:\mozilla\cygwin\bin;%MOZ_TOOLS%\bin;%PATH%
set HOME=c:\mozilla
set CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
7. Run mozset.bat
Get ready for to get the Mozilla source code. Do:
cd c:\mozilla\
mozset.bat

Keep the Command Prompt open.
8. Header convert
Since we're on a Windows platform we have to convert the Netscape wintools header files into Unix format.
cd c:\mozilla\moztools\include\
dos2unix.exe *.h
cd libIDL\
dos2unix.exe *.h
9. Now login to the CVS server
Log into the Mozilla CVS server.
cd c:\mozilla\
cvs login

Enter anonymous as password. You might get a warning like:
cvs login: warning: failed to open /cygdrive/c/mozilla/.cvspass for reading: No such file or directory

Just ignore it.
10. Get client.mk
Get the client.mk file which does all the magic:
cd c:\mozilla\
cvs checkout mozilla/client.mk

If you want to build Mozilla Firefox do
cd c:\mozilla\
cvs checkout mozilla/browser/config

If you want to build Mozilla Thunderbird do
cd c:\mozilla\
cvs checkout mozilla/mail/config

If you want to build Mozilla Sunbird do
cd c:\mozilla\
cvs checkout mozilla/calendar/sunbird/config
11. Create .mozconfig
Now you have to create a file called .mozconfig in c:\mozilla\mozilla\
It should contain the following lines:

To build Mozilla Thunderbird in optimized mode:
. $topsrcdir/mail/config/mozconfig
CC=gcc
CXX=g++
CPP=cpp
AS=as
LD=ld
ac_add_options --disable-accessibility

To build Mozilla Thunderbird in debug mode, that's with the debug information and console window:
. $topsrcdir/mail/config/mozconfig
CC=gcc
CXX=g++
CPP=cpp
AS=as
LD=ld
ac_add_options --disable-accessibility
ac_add_options --enable-debug
ac_add_options --disable-optimize

To build Mozilla Firefox in optimized mode:
. $topsrcdir/browser/config/mozconfig
CC=gcc
CXX=g++
CPP=cpp
AS=as
LD=ld
ac_add_options --disable-accessibility

To build Mozilla Firefox in debug mode, that's with the debug information and console window:
. $topsrcdir/browser/config/mozconfig
CC=gcc
CXX=g++
CPP=cpp
AS=as
LD=ld
ac_add_options --disable-accessibility
ac_add_options --enable-debug
ac_add_options --disable-optimize

To build Mozilla Sunbird in optimized mode:
. $topsrcdir/calendar/sunbird/config/mozconfig
CC=gcc
CXX=g++
CPP=cpp
AS=as
LD=ld
ac_add_options --disable-accessibility

To build Mozilla Sunbird in debug mode, that's with the debug information and console window:
. $topsrcdir/calendar/sunbird/config/mozconfig
CC=gcc
CXX=g++
CPP=cpp
AS=as
LD=ld
ac_add_options --disable-accessibility
ac_add_options --enable-debug
ac_add_options --disable-optimize
12. Get the source
Now you are ready to pull the source. This will take a long time! It took me around 2 hours!
cd c:\mozilla\mozilla\
make -f client.mk pull_all

It's much faster to download the source directly. You could get the source by downloading a tar.gz file containing all the source files : Direct download - Info
13. Build
Now build the bird! This will take a even longer time! It took me around 4 hours!
cd c:\mozilla\mozilla\
make -f client.mk build_all
If you want to log all warnings and errors to a file you can do it by doing:
cd c:\mozilla\mozilla\
make -f client.mk build_all > c:\mozilla\build.log 2>&1
The next time if want to update and build you can do this by doing:
cd c:\mozilla\mozilla\
make -f client.mk pull_and_build_all
14. Start it

To start Mozilla Thunderbird:
cd c:\mozilla\mozilla\thunderbird\bin\
thunderbird.exe -console

To start Mozilla Firefox:
cd c:\mozilla\mozilla\dist\bin\
firefox.exe -console
Moving on...
Now that you have build Mozilla Thunderbird you can now start to modify code. Fx if you want to change some IMAP code, go to c:\mozilla\mozilla\mailnews\imap\src\ change the code and do:
cd c:\mozilla\mozilla\mailnews\imap\
make
cd build
make

You can now launch thunderbird.exe again and your code changes should be there.

If you want to get the updated Mozilla source files into your directory and build it do:
cd c:\mozilla\
mozset.bat
cd mozilla
make -f client.mk
Problems
Make sure that your tools are correct
First of all make sure that you're using the correct tools.
Test gcc
cd c:\mozilla\
mozset.bat
gcc -v
This should say gcc version 3.2.3 (mingw special 20030504-1). If it doesn't something is wrong.
Test make
cd c:\mozilla\
mozset.bat
make -v
This should say GNU Make 3.80. If it doesn't something is wrong.
Test uname
cd c:\mozilla\
mozset.bat
uname --version
This should say uname (sh-utils) 2.0.15. If it doesn't something is wrong. Double check that the path to your Cygwin binary directory is set up correctly in mozset.bat.
Other problems
I encountered the following problems while trying to compile Mozilla Thunderbird:
exec: cl: not found
make[4]: Entering directory `/cygdrive/c/mozilla/mozilla/nsprpub/config' sh /cygdrive/c/mozilla/mozilla/nsprpub/build/cygwin-wrapper cl -Fonow.obj -c -W3 -nologo -GF -Gy -MDd -Od -Z7 -UNDEBUG -DDEBUG_hege -UWINNT -DMOZILLA_CLIENT=1 -DDEBUG=1 -DXP_PC=1 -DWIN32=1 -D_DEBUG=1 -DWIN95=1 -D_PR_GLOBAL_THREADS_ONLY=1 -D_X86_=1 -DFORCE_PR_LOG /cygdrive/c/mozilla/mozilla/nsprpub/config/now.c
exec: cl: not found

Basically it complains that it can't find the file cl. The cl file is the Microsoft Visual C++ compiler. You use the gcc compiler instead of the MinGW compiler.

Solution: Double check that the path to your Cygwin binary directory is set up correctly in mozset.bat. Also make sure that the mingw path is before the MOZ_TOOLS path.
Problems with cdefs.h
If you're getting: sys/cdefs.h: No such file or directory

Solution: Make sure that the mingw path is before the cygwin path.
Problems with glib.h

Solution: Convert the moztools headers files with dos2unix.
Parse error
You see errors like this parse error before '*' token

Solution: Convert the moztools headers files with dos2unix.
Missing midl
If you get "midl" c:/mozilla/mozilla/accessible/public/msaa/ISimpleDOMNode.idl
"midl" not found

Solution: The following options don't yet work under gcc-on-win32 so you have to disable them
ac_add_options --disable-accessibility
ac_add_options --disable-activex

Currently the mingw headers and libraries don't emulate accessibility. Perhaps at a some point mingw will.
Problems with "vtable cant be auto-imported"
Some people have been having "vtable" problems when compiling. It says something like "variable vtable cant be auto-imported".

Solution: To fix this problem try adding following to your .mozconfig
LDFLAGS="-mwindows -Wl,--enable-runtime-pseudo-reloc"
Problems with missing icons
If you're having problem with the icons not being shown in the Mozilla Thunderbird, it's because you didn't choose Unix as the default file type when installing cygwin.
cd c:\mozilla\
mozset.bat
mount
Then it most say:
C:\mozilla\cygwin\bin on /usr/bin type system (binmode)
C:\mozilla\cygwin\lib on /usr/lib type system (binmode)
C:\mozilla\cygwin on / type system (binmode)
c: on /cygdrive/c type user (binmode,noumount)
The important thing is that it says binmode and not textmode. Otherwise you're icons are trashed!

Solution: Copy the chrome directory over from a "real" Mozilla Thunderbird build.
No build ID
If you build Mozilla and dont get an build ID you should add the following to your mozset.bar file set MOZILLA_OFFICIAL=1
set BUILD_OFFICIAL=1

AND

출처: https://wiki.mozilla.org/Firefox:1.5.0.12-2.0.0.4:Test_Plan:Distro_Test_Results#1.5.0.11

Firefox:1.5.0.12-2.0.0.4:Test Plan:Distro Test Results

From MozillaWiki

Contents

[hide]

Yahoo Spot Checks

Builds here: ftp://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/1.5.0.12-candidates/rc2/yahoo/

report template:

  • Home Page URL: (These similar to what ships with Firefox in CJKT except with different URL parameter values).
    • For Japan, Korea & Taiwan): http://{locale}.start.mozilla.com/firefox?client=firefox-a&rls=org.mozilla:{locale}:official&fr=moz2y-sp
    • where locale = {ja, ja-jp-mac, zh-cn, zh-tw}
    • For China: http://zh-cn.start.mozilla.com/firefox?f=D4_g-sp
  • Default Search Engine: Yahoo
  • Search engine URL:
  • Search Engine order: Yahoo, Google
  • Keyword search in location bar: Yahoo
  • Version string:

Results

Windows

ja - PASS

zh-CN - PASS

Mac

ja- jp-mac PASS

ko - PASS

Linux

zh-TW - PASS

Notes

  • Keyword search going to Google is a known issue. It's been labeled as WONTFIX for this branch.
  • Should the "fr=" param be identical in the Home Page URL and the Search URL? They differ as follows:
    • Home Page: fr=moz2y-sp
    • Search: fr=moz2y

Yahoo Update testing

Past builds can be found here

test template:

  • path, locale, platform, type (partial/complete), channel
  • Talkback IDs:starting build - ending build
  • Version:

1.5.0.11

  • ja (partial) Windows - PASS
    • 1.5.0.11 -> 1.5.0.12, ja, Win XP, partial, betatest-yahoo
    • BuildIDs: 2007031202 to 2007050813
    • Versions: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.8.0.11) Gecko/20070312 Firefox/1.5.0.11 to Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.8.0.12) Gecko/20070508 Firefox/1.5.0.12
  • ja (full) Linux - PASS
    • 1.5.0.11 -> 1.5.0.12, ja, Linux (fc5), Full, betatest-yahoo
    • BuildID's: 2007031201 to 2007050813
    • Versions: Mozilla/5.0 (X11; U; Linux i686; ja; rv:1.8.0.11) Gecko/20070312 Firefox/1.5.0.11 to Mozilla/5.0 (X11; U; Linux i686; ja; rv:1.8.0.12) Gecko/20070508 Firefox/1.5.0.12
  • zh-CN (partial) Mac - PASS
    • 1.5.0.11 -> 1.5.0.12, zh-CN, Mac (ppc), partial, betatest-yahoo
    • BuildID's: 2007031201 to 2007050815
    • Versions: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; zh-CN; rv:1.8.0.11) Gecko/20070312 Firefox/1.5.0.11 to Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; zh-CN; rv:1.8.0.12) Gecko/20070508 Firefox/1.5.0.12
  • ko (full) Windows - PASS
    • 1.5.0.11 -> 1.5.0.12, ko, Win XP, Full, betatest-yahoo
    • BuildIDs: 2007031202 to 2007050813
    • Versions: Mozilla/5.0 (Windows; U; Windows NT 5.1; ko; rv:1.8.0.11) Gecko/20070312 Firefox/1.5.0.11 to Mozilla/5.0 (Windows; U; Windows NT 5.1; ko; rv:1.8.0.12) Gecko/20070508 Firefox/1.5.0.12
  • zh-TW (partial) Mac - PASS
    • 1.5.0.11 -> 1.5.0.12, zh-TW, Mac (ppc), partial, betatest-yahoo
    • BuildID's: 2007031201 to 2007050815
    • Versions: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; zh-TW; rv:1.8.0.11) Gecko/20070312 Firefox/1.5.0.11 to Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; zh-TW; rv:1.8.0.12) Gecko/20070508 Firefox/1.5.0.12

1.5.0.10

ja (full) Linux - PASS

  • **1.5.0.10 -> 1.5.0.12, ja, Linux (fc5), Full, betatest-yahoo
  • BuildID's: 2007021600 to 2007050813
  • Versions: Mozilla/5.0 (X11; U; Linux i686; ja; rv:1.8.0.10) Gecko/20070216 Firefox/1.5.0.10 to Mozilla/5.0 (X11; U; Linux i686; ja; rv:1.8.0.12) Gecko/20070508 Firefox/1.5.0.12

1.5.0.9

ko (full) Mac - PASS

  • 1.5.0.9 -> 1.5.0.12, ko, Mac (ppc), Full, betatest-yahoo
  • BuildID's: 2006120612 to 2007050815
  • Versions: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; ko; rv:1.8.0.9) Gecko/20061206 Firefox/ to Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; ko; rv:1.8.0.12) Gecko/20070508 Firefox/1.5.0.12

1.5.0.8

zh-TW (full) Linux - PASS

  • 1.5.0.8 -> 1.5.0.12, zh-TW, Linux (fc5), Full, betatest-yahoo
  • BuildID's: 2006102516 to 2007050813
  • Versions: Mozilla/5.0 (X11; U; Linux i686; zh-TW; rv:1.8.0.8) Gecko/20061025 Firefox/1.5.0.8 to Mozilla/5.0 (X11; U; Linux i686; zh-TW; rv:1.8.0.12) Gecko/20070508 Firefox/1.5.0.12

1.5.0.7

ja.JP.mac (full) Mac - PASS

  • 1.5.0.7 -> 1.5.0.12, ja.JP.mac, Mac (ppc), Full, betatest-yahoo
  • BuildID's: 2006090921 to 2007050815
  • Versions: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; ja-JP-mac; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7 to Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; ja-JP-mac; rv:1.8.0.12) Gecko/20070508 Firefox/1.5.0.12

1.5.0.6

zh-CN (full) Windows - PASS

  • 1.5.0.6 -> 1.5.0.12, zh-CN, Win XP, Full, betatest-yahoo
  • BuildID's: 2006072814 to 2007050813
  • Versions: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6 to Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.8.0.12) Gecko/20070508 Firefox/1.5.0.12

Google Spot Checks

Builds here: ftp://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/1.5.0.12-candidates/rc2/google/

report template:

  • Home Page URL: http://<locale>.google.mozilla.com/firefox&client=firefox-a&rls=com.google:<locale>:official
    • the 'client' parameter should be set to 'firefox-a'.
    • Home Page URL Parameters: 'rls' code that be included on the home page. It should be set to "com.google:<locale>:official" instead of the typical "org.mozilla:<locale>:official"
  • Search engine URLs:
    • For Firefox 2.0:All Google search plugins (across all locales) should point to "www.google.com"
  • Default Search engine: Google
  • Search engine URL parameters:
    • 'rls' code that is included in the Google search plugin be set to "com.google:<locale>:official" instead of the typical "org.mozilla:<locale>:official".
    • 'client' parameter should be set to 'firefox-a'.
    • Ensure that the requirements as outlined in localization rules are met.
  • Search Engine order: Google, Yahoo
  • Keyword search in location bar: Google
  • Version string:

Results

de - PASS

en-US - PASS

ja - PASS

zh-CN - tbd

Google Update testing

Past builds can be found here

test template:

  • path, locale, platform, type (partial/complete), channel
    • Talkback IDs: starting build - ending build
    • Version:

1.5.0.11

  • en-US (partial) - PASS
    • 1.5.0.11 -> 1.5.0.12, en-US, Win XP, partial, betatest-google
    • Talkback IDs: 2007031202 to 2007050813
    • Version: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.11) Gecko/20070312 Firefox/1.5.0.11 to Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.12) Gecko/20070508 Firefox/1.5.0.12
  • en-US (full) - PASS
    • 1.5.0.11 -> 1.5.0.12, en-US, Win XP, Full, betatest-google
    • Talkback IDs: 2007031202 to 2007050813
    • Version: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.11) Gecko/20070312 Firefox/1.5.0.11 to Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.12) Gecko/20070508 Firefox/1.5.0.12
  • ja (full) - PASS
    • 1.5.0.11 -> 1.5.0.12, ja, Win XP, Full, betatest-google
    • Talkback IDs: 2007031202 to 2007050813
    • Version: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.8.0.11) Gecko/20070312 Firefox/1.5.0.11 to Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.8.0.12) Gecko/20070508 Firefox/1.5.0.12
  • zh-TW (partial) - PASS
    • 1.5.0.11 -> 1.5.0.12, zh-TW, Win XP, partial, betatest-google
    • Talkback IDs: 2007031202 to 2007050813
    • Version: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-TW; rv:1.8.0.11) Gecko/20070312 Firefox/1.5.0.11 to Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-TW; rv:1.8.0.12) Gecko/20070508 Firefox/1.5.0.12

1.5.0.10

en-US (full) - PASS

  • 1.5.0.10 -> 1.5.0.12, en-US, Win XP, Full, betatest-google
    • Talkback IDs: 2007021601 to 2007050813
    • Version: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.10) Gecko/20070216 Firefox/1.5.0.10 to Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.12) Gecko/20070508 Firefox/1.5.0.12

1.5.0.9

de (full) - PASS

  • 1.5.0.9 -> 1.5.0.12, de, Win XP, Full, betatest-google
    • Talkback IDs: 2006120612 to 2007050813
    • Version: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.0.9) Gecko/20061206 Firefox/1.5.0.9 to Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.0.12) Gecko/20070508 Firefox/1.5.0.12

1.5.0.8

es-ES (full) - PASS

  • 1.5.0.8 -> 1.5.0.12, es-ES, Win XP, Full, betatest-google
    • Talkback IDs: 2006102516 to 2007050813
    • Version: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.8.0.8) Gecko/20061025 Firefox/1.5.0.8 to Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.8.0.12) Gecko/20070508 Firefox/1.5.0.12

1.5.0.7

fr (full) - PASS

  • 1.5.0.7 -> 1.5.0.12, fr, Win XP, Full, betatest-google
    • Talkback IDs: 2006090918 to 2007050813
    • Version: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.0.7) Gecko/20060909 Firefox/1.5.0.7 to Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.0.12) Gecko/20070508 Firefox/1.5.0.12

1.5.0.6

ko (full) - PASS

  • 1.5.0.6 -> 1.5.0.12, ko, Win XP, Full, betatest-google
    • Talkback IDs: 2006072814 to 2007050813
    • Version: Mozilla/5.0 (Windows; U; Windows NT 5.1; ko; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6 to Mozilla/5.0 (Windows; U; Windows NT 5.1; ko; rv:1.8.0.12) Gecko/20070508 Firefox/1.5.0.12
AND

plugin api

Firefox 궁금하니? 2008. 6. 20. 11:50

출처: http://devedge-temp.mozilla.org/library/manuals/2002/plugin/1.0/

plug-ins!


Table of Contents


Preface

About This Guide

Who Should Read This Guide

The Plug-in Software Development Kit

Plug-in Basics

How Plug-ins Are Used

Plug-ins and Helper Applications

How Plug-ins Work

Understanding the Runtime Model

Plug-in Detection

How Netscape Gecko Finds Plug-ins

Checking Plug-ins by MIME Type

Overview of Plug-in Structure

Understanding the Plug-in API

Plug-ins and Platform Independence

Windowed and Windowless Plug-ins

The Default Plug-in

Using HTML to Display Plug-ins

Plug-in Display Modes

Using the OBJECT Tag for Plug-in Display

Nesting Rules for HTML Elements

Using the Appropriate Attributes

Using the EMBED Tag for Plug-in Display

Using Custom EMBED Attributes

Plug-in References

Plug-in Development Overview

Writing Plug-ins

Registering Plug-ins

MS Windows

Unix

Mac OS

OSX

Drawing a Plug-in Instance

Handling Memory

Sending and Receiving Streams

Working with URLs

Getting Version and UI Information

Displaying Messages on the Status Line

Making Plug-ins Scriptable

Building Plug-ins

Building, Platforms, and Compilers

Building Carbonized Plug-ins for Mac OSX

Getting and Using the xpidl Compiler

Type Libraries

Installing Plug-ins

Native Installers

XPI Plug-ins Installations

Plug-in Installation and the Windows Registry

Initialization and Destruction

Initialization

Instance Creation

Instance Destruction

Shutdown

Initialize and Shutdown Example

Drawing and Event Handling

The NPWindow Structure

The NPWindow Structure

Drawing Plug-ins

Printing the Plug-in

Setting the Window

Getting Information

Windowed Plug-ins

Mac OS

Windows

Unix

Event Handling for Windowed Plug-ins

Windowless Plug-ins

Specifying That a Plug-in Is Windowless

Invalidating the Drawing Area

Forcing a Paint Message

Making a Plug-in Opaque

Making a Plug-in Transparent

Creating Pop-up Menus and Dialog Boxes

Event Handling for Windowless Plug-ins

Streams

Receiving a Stream

Telling the Plug-in When a Stream Is Created

Telling the Plug-in When a Stream Is Deleted

Finding Out How Much Data the Plug-in Can Accept

Writing the Stream to the Plug-in

Sending the Stream in Random-Access Mode

Sending the Stream in File Mode

Sending a Stream

Creating a Stream

Pushing Data into the Stream

Deleting the Stream

Example of Sending a Stream

URLs

Getting URLs

Getting the URL and Displaying the Page

Posting URLs

Posting Data to an HTTP Server

Uploading Files to an FTP Server

Sending Mail

Memory

Allocating and Freeing Memory

Mac OS

Flushing Memory (Mac OS only)

Version, UI, and Status Information

Displaying a Status Line Message

Getting Agent Information

Getting the Current Version

Finding Out if a Feature Exists

Reloading a Plug-in

Plug-in Side Plug-in API

Plugin Method Summary

NPP_Destroy

NPP_DestroyStream

NPP_GetValue

NP_GetValue

NPP_HandleEvent

NP_Initialize

NPP_New

NPP_NewStream

NPP_Print

NPP_SetValue

NPP_SetWindow

NP_Shutdown

NPP_StreamAsFile

NPP_URLNotify

NPP_Write

NPP_WriteReady

Browser Side Plug-in API

Netscape Plug-in Method Summary

NPN_DestroyStream

NPN_ForceRedraw

NPN_GetURL

NPN_GetURLNotify

NPN_GetValue

NPN_InvalidateRect

NPN_InvalidateRegion

NPN_MemAlloc

NPN_MemFlush

NPN_MemFree

NPN_NewStream

NPN_PostURL

NPN_PostURLNotify

NPN_ReloadPlugins

NPN_RequestRead

NPN_SetValue

NPN_Status

NPN_UserAgent

NPN_Version

NPN_Write

Structures

Structure Summary

NPAnyCallbackStruct

NPByteRange

NPEmbedPrint

NPEvent

NPFullPrint

NPP

NP_Port

NPPrint

NPPrintCallbackStruct

NP_Rect

NP_Region

NPSavedData

NPSetWindowCallbackStruct

NPStream

NPWindow

Constants

Error Codes

Result Codes

Plug-in Version Constants

Version Feature Constants

AND

출처: http://developer.mozilla.org/en/docs/Shipping_a_plugin_as_an_extension

Shipping a plugin as an extension

From MDC

One of the new features that is available in Firefox 1.5 is the ability to place browser plug-ins in a Firefox extension.

Historically, most people have chosen to use an install.js script to install a plug-in. When this method is used, you can choose to either place the plug-in into the plugins directory, or place it into your own directory and modify the Windows registry to let Firefox know where to find the plug-in. The downside to this method is that once the plug-in is installed, it might be difficult for users to upgrade, uninstall, or disable the plug-in. As of Firefox 3 (and any Gecko 1.9 based application) the use of install.js scripts is no longer possible and plugins must either be shipped as an executable installer or as an extension as described here.

Contents

[hide]

[edit] Bundle structure

Toolkit bundles can be used for all add-ons including extensions, themes and plugins. Plugin packages should only need to package a small set of files in the follow structure in the xpi file:

install.rdf
plugins/
    pluginlib.dll
    plugintypes.xpt

The install.rdf file contains an install manifest that describes the plugin to the user. The library and scripting interfaces are held in the plugins directory.

[edit] Platform-specific files

It is possible to package multiple plugin libraries for different operating systems into a single xpi bundle. In the xpi you can use the following structure:

platform/
    Linux_x86-gcc3/
        plugins/
            libplugin.so
    Darwin_ppc-gcc3/
        plugins/
            libplugin.dylib

More specific information can be found in the platform-specific subdirectories documentation.

[edit] Install Manifest

The install manifest describes the plugin to the user. For a plugin the manifest only needs to be very simple:

<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
  <Description about="urn:mozilla:install-manifest">
    <em:id>mypluginid@myplugin.com</em:id>
    <em:name>My Plugin</em:name>
    <em:version>1.0</em:version>
    <em:targetApplication>
      <Description>
        <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
        <em:minVersion>1.5</em:minVersion>
        <em:maxVersion>3.0.*</em:maxVersion>
      </Description>
    </em:targetApplication>
  </Description>
</RDF>

This contains 4 required pieces of information.

  1. Every add-on must have a unique id. This can be in a guid form but the simpler email form is preferred now. You should aim to use a domain-name that you own and then your own unique short-name for the plugin before the @.
  2. The plugin must have a name to identify the plugin to the user in the list of add-ons.
  3. The version is fairly self-descriptive, it must be a toolkit version format.
  4. The target application block says which versions of an application the plugin is compatible with. It includes the application ID and the minimum and maximum version of the application that the plugin works with. There can be multiple targetApplication blocks listed.

[edit] Providing updates

When plugins are packaged in this way they can make use of the built in add-on update system. This allows a remote update file to be read periodically and an updated version of the plugin offered to the user or to mark the plugin as compatible with a wider range of applications.

This is performed by including an updateURL in the install manifest. This should point to an update.rdf file on the internet which will include the updated versions and version information for the plugin.

AND