Redoing how 'replaceable' properties on DOM objects are resolved to be compatible with 4.x, with this change named frames in framesets override 'replaceable' properties so that window.toolbar (or any replaceable property) in a frameset document with a frame named 'toolbar' actually resolves to the frame, and not the native toolbar. r/a=brendan, r=rpotts&scc

This commit is contained in:
jst%netscape.com 2000-09-22 10:18:07 +00:00
Родитель 45e7f2d67e
Коммит f4edbb9849
165 изменённых файлов: 2555 добавлений и 2309 удалений

Просмотреть файл

@ -3280,8 +3280,11 @@ PRBool nsDocument::EnumerateProperty(JSContext *aContext, JSObject *aObj)
return PR_TRUE;
}
PRBool nsDocument::Resolve(JSContext *aContext, JSObject *aObj, jsval aID)
PRBool nsDocument::Resolve(JSContext *aContext, JSObject *aObj, jsval aID,
PRBool *aDidDefineProperty)
{
*aDidDefineProperty = PR_FALSE;
return PR_TRUE;
}

Просмотреть файл

@ -462,7 +462,8 @@ public:
virtual PRBool SetProperty(JSContext *aContext, JSObject *aObj,
jsval aID, jsval *aVp);
virtual PRBool EnumerateProperty(JSContext *aContext, JSObject *aObj);
virtual PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID);
virtual PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID,
PRBool *aDidDefineProperty);
virtual PRBool Convert(JSContext *aContext, JSObject *aObj, jsval aID);
virtual void Finalize(JSContext *aContext, JSObject *aObj);

Просмотреть файл

@ -1873,8 +1873,11 @@ nsGenericElement::EnumerateProperty(JSContext *aContext, JSObject *aObj)
}
PRBool
nsGenericElement::Resolve(JSContext *aContext, JSObject *aObj, jsval aID)
nsGenericElement::Resolve(JSContext *aContext, JSObject *aObj, jsval aID,
PRBool* aDidDefineProperty)
{
*aDidDefineProperty = PR_FALSE;
return PR_TRUE;
}

Просмотреть файл

@ -224,7 +224,8 @@ public:
PRBool SetProperty(JSContext *aContext, JSObject *aObj,
jsval aID, jsval *aVp);
PRBool EnumerateProperty(JSContext *aContext, JSObject *aObj);
PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID);
PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID,
PRBool *aDidDefineProperty);
PRBool Convert(JSContext *aContext, JSObject *aObj, jsval aID);
void Finalize(JSContext *aContext, JSObject *aObj);
@ -1393,11 +1394,12 @@ public:
virtual PRBool EnumerateProperty(JSContext *aContext, JSObject *aObj) { \
return _g.EnumerateProperty(aContext, aObj); \
} \
virtual PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID) { \
return _g.EnumerateProperty(aContext, aObj); \
virtual PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID, \
PRBool *aDidDefineProperty) { \
return _g.Resolve(aContext, aObj, aID, aDidDefineProperty); \
} \
virtual PRBool Convert(JSContext *aContext, JSObject *aObj, jsval aID) { \
return _g.EnumerateProperty(aContext, aObj); \
return _g.Convert(aContext, aObj, aID); \
} \
virtual void Finalize(JSContext *aContext, JSObject *aObj) { \
_g.Finalize(aContext, aObj); \

Просмотреть файл

@ -93,11 +93,12 @@ public:
virtual PRBool EnumerateProperty(JSContext *aContext, JSObject *aObj) {
return mInner.EnumerateProperty(aContext, aObj);
}
virtual PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID) {
return mInner.EnumerateProperty(aContext, aObj);
virtual PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID,
PRBool *aDidDefineProperty) {
return mInner.Resolve(aContext, aObj, aID, aDidDefineProperty);
}
virtual PRBool Convert(JSContext *aContext, JSObject *aObj, jsval aID) {
return mInner.EnumerateProperty(aContext, aObj);
return mInner.Convert(aContext, aObj, aID);
}
virtual void Finalize(JSContext *aContext, JSObject *aObj) {
mInner.Finalize(aContext, aObj);

Просмотреть файл

@ -83,7 +83,8 @@ public:
virtual PRBool SetProperty(JSContext *aContext, JSObject *aObj,
jsval aID, jsval *aVp);
virtual PRBool EnumerateProperty(JSContext *aContext, JSObject *aObj);
virtual PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID);
virtual PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID,
PRBool* aDidDefineProperty);
virtual PRBool Convert(JSContext *aContext, JSObject *aObj, jsval aID);
virtual void Finalize(JSContext *aContext, JSObject *aObj);
@ -486,9 +487,10 @@ nsHTMLEmbedElement::EnumerateProperty(JSContext *aContext, JSObject *aObj)
}
PRBool
nsHTMLEmbedElement::Resolve(JSContext *aContext, JSObject *aObj, jsval aID)
nsHTMLEmbedElement::Resolve(JSContext *aContext, JSObject *aObj, jsval aID,
PRBool *aDidDefineProperty)
{
return mInner.Resolve(aContext, aObj, aID);
return mInner.Resolve(aContext, aObj, aID, aDidDefineProperty);
}
PRBool

Просмотреть файл

@ -98,7 +98,8 @@ public:
virtual PRBool SetProperty(JSContext *aContext, JSObject *aObj,
jsval aID, jsval *aVp);
virtual PRBool EnumerateProperty(JSContext *aContext, JSObject *aObj);
virtual PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID);
virtual PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID,
PRBool *aDidDefineProperty);
virtual PRBool Convert(JSContext *aContext, JSObject *aObj, jsval aID);
virtual void Finalize(JSContext *aContext, JSObject *aObj);
@ -615,7 +616,8 @@ nsHTMLFormElement::EnumerateProperty(JSContext *aContext, JSObject *aObj)
PRBool
nsHTMLFormElement::Resolve(JSContext *aContext, JSObject *aObj, jsval aID)
nsHTMLFormElement::Resolve(JSContext *aContext, JSObject *aObj, jsval aID,
PRBool *aDidDefineProperty)
{
if (!JSVAL_IS_STRING(aID)) {
return PR_TRUE;
@ -675,9 +677,11 @@ nsHTMLFormElement::Resolve(JSContext *aContext, JSObject *aObj, jsval aID)
ret = ::JS_DefineProperty(aContext, myObj,
str, OBJECT_TO_JSVAL(obj),
nsnull, nsnull, 0);
*aDidDefineProperty = PR_TRUE;
}
else {
ret = mInner.Resolve(aContext, aObj, aID);
ret = mInner.Resolve(aContext, aObj, aID, aDidDefineProperty);
}
return ret;

Просмотреть файл

@ -103,7 +103,8 @@ public:
virtual PRBool SetProperty(JSContext *aContext, JSObject *aObj,
jsval aID, jsval *aVp);
virtual PRBool EnumerateProperty(JSContext *aContext, JSObject *aObj);
virtual PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID);
virtual PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID,
PRBool *aDidDefineProperty);
virtual PRBool Convert(JSContext *aContext, JSObject *aObj, jsval aID);
virtual void Finalize(JSContext *aContext, JSObject *aObj);
@ -723,7 +724,8 @@ nsHTMLImageElement::EnumerateProperty(JSContext *aContext, JSObject *aObj)
}
PRBool
nsHTMLImageElement::Resolve(JSContext *aContext, JSObject *aObj, jsval aID)
nsHTMLImageElement::Resolve(JSContext *aContext, JSObject *aObj, jsval aID,
PRBool *aDidDefineProperty)
{
if (JSVAL_IS_STRING(aID) && mInner.mDOMSlots) {
JSString *str;
@ -742,11 +744,13 @@ nsHTMLImageElement::Resolve(JSContext *aContext, JSObject *aObj, jsval aID)
chars, ::JS_GetStringLength(str),
JSVAL_VOID, nsnull, nsnull, 0);
*aDidDefineProperty = PR_TRUE;
return PR_TRUE;
}
}
return mInner.Resolve(aContext, aObj, aID);
return mInner.Resolve(aContext, aObj, aID, aDidDefineProperty);
}
PRBool

Просмотреть файл

@ -96,7 +96,8 @@ public:
PRBool SetProperty(JSContext *aContext, JSObject *aObj,
jsval aID, jsval *aVp);
PRBool EnumerateProperty(JSContext *aContext, JSObject *aObj);
PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID);
PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID,
PRBool *aDidDefineProperty);
PRBool Convert(JSContext *aContext, JSObject *aObj, jsval aID);
void Finalize(JSContext *aContext, JSObject *aObj);
@ -294,7 +295,8 @@ public:
virtual PRBool SetProperty(JSContext *aContext, JSObject *aObj,
jsval aID, jsval *aVp);
virtual PRBool EnumerateProperty(JSContext *aContext, JSObject *aObj);
virtual PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID);
virtual PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID,
PRBool *aDidDefineProperty);
virtual PRBool Convert(JSContext *aContext, JSObject *aObj, jsval aID);
virtual void Finalize(JSContext *aContext, JSObject *aObj);
@ -1545,9 +1547,9 @@ nsHTMLSelectElement::GetProperty(JSContext *aContext,
PRBool
nsHTMLSelectElement::SetProperty(JSContext *aContext,
JSObject *aObj,
jsval aID,
jsval *aVp)
JSObject *aObj,
jsval aID,
jsval *aVp)
{
nsresult res = NS_OK;
// Set options in the options list by indexing into select
@ -1571,8 +1573,11 @@ nsHTMLSelectElement::EnumerateProperty(JSContext *aContext, JSObject *aObj)
}
PRBool
nsHTMLSelectElement::Resolve(JSContext *aContext, JSObject *aObj, jsval aID)
nsHTMLSelectElement::Resolve(JSContext *aContext, JSObject *aObj, jsval aID,
PRBool *aDidDefineProperty)
{
*aDidDefineProperty = PR_FALSE;
return PR_TRUE;
}
@ -1926,8 +1931,11 @@ nsHTMLOptionCollection::EnumerateProperty(JSContext *aContext, JSObject *aObj)
}
PRBool
nsHTMLOptionCollection::Resolve(JSContext *aContext, JSObject *aObj, jsval aID)
nsHTMLOptionCollection::Resolve(JSContext *aContext, JSObject *aObj, jsval aID,
PRBool *aDidDefineProperty)
{
*aDidDefineProperty = PR_FALSE;
return PR_TRUE;
}

Просмотреть файл

@ -90,7 +90,8 @@ public:
virtual PRBool SetProperty(JSContext *aContext, JSObject *aObj,
jsval aID, jsval *aVp);
virtual PRBool EnumerateProperty(JSContext *aContext, JSObject *aObj);
virtual PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID);
virtual PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID,
PRBool *aDidDefineProperty);
virtual PRBool Convert(JSContext *aContext, JSObject *aObj, jsval aID);
virtual void Finalize(JSContext *aContext, JSObject *aObj);
@ -353,9 +354,10 @@ nsHTMLSpacerElement::EnumerateProperty(JSContext *aContext, JSObject *aObj)
}
PRBool
nsHTMLSpacerElement::Resolve(JSContext *aContext, JSObject *aObj, jsval aID)
nsHTMLSpacerElement::Resolve(JSContext *aContext, JSObject *aObj, jsval aID,
PRBool *aDidDefineProperty)
{
return mInner.Resolve(aContext, aObj, aID);
return mInner.Resolve(aContext, aObj, aID, aDidDefineProperty);
}
PRBool

Просмотреть файл

@ -3150,8 +3150,11 @@ nsHTMLDocument::GetScriptObject(nsIScriptContext *aContext, void** aScriptObject
}
PRBool
nsHTMLDocument::Resolve(JSContext *aContext, JSObject *aObj, jsval aID)
nsHTMLDocument::Resolve(JSContext *aContext, JSObject *aObj, jsval aID,
PRBool *aDidDefineProperty)
{
*aDidDefineProperty = PR_FALSE;
if (!JSVAL_IS_STRING(aID)) {
return PR_TRUE;
}
@ -3166,6 +3169,8 @@ nsHTMLDocument::Resolve(JSContext *aContext, JSObject *aObj, jsval aID)
ret = ::JS_DefineProperty(aContext, aObj,
str, val,
nsnull, nsnull, 0);
*aDidDefineProperty = PR_TRUE;
}
if (NS_FAILED(result)) {
ret = PR_FALSE;

Просмотреть файл

@ -134,7 +134,8 @@ public:
NS_IMETHOD GetScriptObject(nsIScriptContext *aContext, void** aScriptObject);
// From nsJSScriptObject interface, implemented by nsDocument
virtual PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID);
virtual PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID,
PRBool *aDidDefineProperty);
/**
* Finds text in content

Просмотреть файл

@ -241,8 +241,9 @@ public:
virtual PRBool EnumerateProperty(JSContext *aContext, JSObject *aObj) {
return mInner.EnumerateProperty(aContext, aObj);
}
virtual PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID) {
return mInner.Resolve(aContext, aObj, aID);
virtual PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID,
PRBool *aDidDefineProperty) {
return mInner.Resolve(aContext, aObj, aID, aDidDefineProperty);
}
virtual PRBool Convert(JSContext *aContext, JSObject *aObj, jsval aID) {
return mInner.Convert(aContext, aObj, aID);

Просмотреть файл

@ -2114,8 +2114,11 @@ nsXULElement::EnumerateProperty(JSContext *aContext, JSObject *aObj)
PRBool
nsXULElement::Resolve(JSContext *aContext, JSObject *aObj, jsval aID)
nsXULElement::Resolve(JSContext *aContext, JSObject *aObj, jsval aID,
PRBool *aDidDefineProperty)
{
*aDidDefineProperty = PR_FALSE;
return PR_TRUE;
}

Просмотреть файл

@ -461,7 +461,8 @@ public:
virtual PRBool SetProperty(JSContext *aContext, JSObject *aObj,
jsval aID, jsval *aVp);
virtual PRBool EnumerateProperty(JSContext *aContext, JSObject *aObj);
virtual PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID);
virtual PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID,
PRBool *aDidDefineProperty);
virtual PRBool Convert(JSContext *aContext, JSObject *aObj, jsval aID);
virtual void Finalize(JSContext *aContext, JSObject *aObj);

Просмотреть файл

@ -3758,8 +3758,11 @@ nsXULDocument::EnumerateProperty(JSContext *aContext, JSObject *aObj)
PRBool
nsXULDocument::Resolve(JSContext *aContext, JSObject *aObj, jsval aID)
nsXULDocument::Resolve(JSContext *aContext, JSObject *aObj, jsval aID,
PRBool *aDidDefineProperty)
{
*aDidDefineProperty = PR_FALSE;
return PR_TRUE;
}

Просмотреть файл

@ -379,7 +379,8 @@ public:
virtual PRBool SetProperty(JSContext *aContext, JSObject *aObj,
jsval aID, jsval *aVp);
virtual PRBool EnumerateProperty(JSContext *aContext, JSObject *aObj);
virtual PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID);
virtual PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID,
PRBool *aDidDefineProperty);
virtual PRBool Convert(JSContext *aContext, JSObject *aObj, jsval aID);
virtual void Finalize(JSContext *aContext, JSObject *aObj);

Просмотреть файл

@ -52,7 +52,8 @@ public:
virtual PRBool SetProperty(JSContext *aContext, JSObject *aObj, jsval aID,
jsval *aVp) = 0;
virtual PRBool EnumerateProperty(JSContext *aContext, JSObject *aObj) = 0;
virtual PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID) = 0;
virtual PRBool Resolve(JSContext *aContext, JSObject *aObj,
jsval aID, PRBool *aDidDefineProperty) = 0;
virtual PRBool Convert(JSContext *aContext, JSObject *aObj, jsval aID) = 0;
virtual void Finalize(JSContext *aContext, JSObject *aObj) = 0;
};

Просмотреть файл

@ -2329,16 +2329,23 @@ PRBool GlobalWindowImpl::EnumerateProperty(JSContext* aContext, JSObject* aObj)
return ::JS_EnumerateStandardClasses(aContext, aObj);
}
PRBool GlobalWindowImpl::Resolve(JSContext* aContext, JSObject* aObj, jsval aID)
PRBool GlobalWindowImpl::Resolve(JSContext* aContext, JSObject* aObj,
jsval aID, PRBool* aDidDefineProperty)
{
*aDidDefineProperty = PR_FALSE;
if (JSVAL_IS_STRING(aID)) {
JSBool resolved;
JSString *str;
if (!::JS_ResolveStandardClass(aContext, aObj, aID, &resolved))
return PR_FALSE;
if (resolved)
if (resolved) {
*aDidDefineProperty = PR_TRUE;
return PR_TRUE;
}
str = JSVAL_TO_STRING(aID);
if (mDocShell) {
@ -2380,10 +2387,14 @@ PRBool GlobalWindowImpl::Resolve(JSContext* aContext, JSObject* aObj, jsval aID)
}
// Okay, if we now have a childObj, we can define it and proceed.
if (childObj) {
::JS_DefineUCProperty(aContext, (JSObject *) mScriptObject,
chars, ::JS_GetStringLength(str),
OBJECT_TO_JSVAL(childObj), nsnull, nsnull,
0);
if (!::JS_DefineUCProperty(aContext, (JSObject *) mScriptObject,
chars, ::JS_GetStringLength(str),
OBJECT_TO_JSVAL(childObj), nsnull,
nsnull, 0)) {
return PR_FALSE;
}
*aDidDefineProperty = PR_TRUE;
}
}
}

Просмотреть файл

@ -126,7 +126,8 @@ public:
virtual PRBool SetProperty(JSContext *aContext, JSObject *aObj,
jsval aID, jsval *aVp);
virtual PRBool EnumerateProperty(JSContext *aContext, JSObject *aObj);
virtual PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID);
virtual PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID,
PRBool *aDidDefineProperty);
virtual PRBool Convert(JSContext *aContext, JSObject *aObj, jsval aID);
virtual void Finalize(JSContext *aContext, JSObject *aObj);
@ -359,7 +360,8 @@ public:
virtual PRBool GetProperty(JSContext *aContext, JSObject *aObj, jsval aID, jsval *aVp);
virtual PRBool SetProperty(JSContext *aContext, JSObject *aObj, jsval aID, jsval *aVp);
virtual PRBool EnumerateProperty(JSContext *aContext, JSObject *aObj);
virtual PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID);
virtual PRBool Resolve(JSContext *aContext, JSObject *aObj, jsval aID,
PRBool* aDidDefineProperty);
virtual PRBool Convert(JSContext *aContext, JSObject *aObj, jsval aID);
virtual void Finalize(JSContext *aContext, JSObject *aObj);

Просмотреть файл

@ -143,6 +143,16 @@ SetBarPropProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// BarProp class properties
//
static JSPropertySpec BarPropProperties[] =
{
{"visible", BARPROP_VISIBLE, JSPROP_ENUMERATE},
{0}
};
//
// BarProp finalizer
//
@ -159,7 +169,7 @@ FinalizeBarProp(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateBarProp(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -169,7 +179,7 @@ EnumerateBarProp(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveBarProp(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -193,16 +203,6 @@ JSClass BarPropClass = {
};
//
// BarProp class properties
//
static JSPropertySpec BarPropProperties[] =
{
{"visible", BARPROP_VISIBLE, JSPROP_ENUMERATE},
{0}
};
//
// BarProp class methods
//

Просмотреть файл

@ -129,6 +129,16 @@ SetCRMFObjectProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// CRMFObject class properties
//
static JSPropertySpec CRMFObjectProperties[] =
{
{"request", CRMFOBJECT_REQUEST, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// CRMFObject finalizer
//
@ -145,7 +155,7 @@ FinalizeCRMFObject(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateCRMFObject(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -155,7 +165,7 @@ EnumerateCRMFObject(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveCRMFObject(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -179,16 +189,6 @@ JSClass CRMFObjectClass = {
};
//
// CRMFObject class properties
//
static JSPropertySpec CRMFObjectProperties[] =
{
{"request", CRMFOBJECT_REQUEST, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// CRMFObject class methods
//

Просмотреть файл

@ -131,6 +131,16 @@ SetCryptoProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// Crypto class properties
//
static JSPropertySpec CryptoProperties[] =
{
{"version", CRYPTO_VERSION, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// Crypto finalizer
//
@ -147,7 +157,7 @@ FinalizeCrypto(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateCrypto(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -157,7 +167,7 @@ EnumerateCrypto(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveCrypto(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -498,16 +508,6 @@ JSClass CryptoClass = {
};
//
// Crypto class properties
//
static JSPropertySpec CryptoProperties[] =
{
{"version", CRYPTO_VERSION, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// Crypto class methods
//

Просмотреть файл

@ -168,6 +168,19 @@ SetDOMExceptionProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// DOMException class properties
//
static JSPropertySpec DOMExceptionProperties[] =
{
{"code", DOMEXCEPTION_CODE, JSPROP_ENUMERATE | JSPROP_READONLY},
{"result", DOMEXCEPTION_RESULT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"message", DOMEXCEPTION_MESSAGE, JSPROP_ENUMERATE | JSPROP_READONLY},
{"name", DOMEXCEPTION_NAME, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// DOMException finalizer
//
@ -184,7 +197,7 @@ FinalizeDOMException(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateDOMException(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -194,7 +207,7 @@ EnumerateDOMException(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveDOMException(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -254,19 +267,6 @@ JSClass DOMExceptionClass = {
};
//
// DOMException class properties
//
static JSPropertySpec DOMExceptionProperties[] =
{
{"code", DOMEXCEPTION_CODE, JSPROP_ENUMERATE | JSPROP_READONLY},
{"result", DOMEXCEPTION_RESULT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"message", DOMEXCEPTION_MESSAGE, JSPROP_ENUMERATE | JSPROP_READONLY},
{"name", DOMEXCEPTION_NAME, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// DOMException class methods
//

Просмотреть файл

@ -177,6 +177,19 @@ SetHistoryProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// History class properties
//
static JSPropertySpec HistoryProperties[] =
{
{"length", HISTORY_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{"current", HISTORY_CURRENT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"previous", HISTORY_PREVIOUS, JSPROP_ENUMERATE | JSPROP_READONLY},
{"next", HISTORY_NEXT, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// History finalizer
//
@ -193,7 +206,7 @@ FinalizeHistory(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateHistory(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -203,7 +216,7 @@ EnumerateHistory(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveHistory(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -376,19 +389,6 @@ JSClass HistoryClass = {
};
//
// History class properties
//
static JSPropertySpec HistoryProperties[] =
{
{"length", HISTORY_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{"current", HISTORY_CURRENT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"previous", HISTORY_PREVIOUS, JSPROP_ENUMERATE | JSPROP_READONLY},
{"next", HISTORY_NEXT, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// History class methods
//

Просмотреть файл

@ -292,6 +292,22 @@ SetLocationProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// Location class properties
//
static JSPropertySpec LocationProperties[] =
{
{"hash", LOCATION_HASH, JSPROP_ENUMERATE},
{"host", LOCATION_HOST, JSPROP_ENUMERATE},
{"hostname", LOCATION_HOSTNAME, JSPROP_ENUMERATE},
{"pathname", LOCATION_PATHNAME, JSPROP_ENUMERATE},
{"port", LOCATION_PORT, JSPROP_ENUMERATE},
{"protocol", LOCATION_PROTOCOL, JSPROP_ENUMERATE},
{"search", LOCATION_SEARCH, JSPROP_ENUMERATE},
{0}
};
//
// Location finalizer
//
@ -308,7 +324,7 @@ FinalizeLocation(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateLocation(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -318,7 +334,7 @@ EnumerateLocation(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveLocation(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -499,22 +515,6 @@ JSClass LocationClass = {
};
//
// Location class properties
//
static JSPropertySpec LocationProperties[] =
{
{"hash", LOCATION_HASH, JSPROP_ENUMERATE},
{"host", LOCATION_HOST, JSPROP_ENUMERATE},
{"hostname", LOCATION_HOSTNAME, JSPROP_ENUMERATE},
{"pathname", LOCATION_PATHNAME, JSPROP_ENUMERATE},
{"port", LOCATION_PORT, JSPROP_ENUMERATE},
{"protocol", LOCATION_PROTOCOL, JSPROP_ENUMERATE},
{"search", LOCATION_SEARCH, JSPROP_ENUMERATE},
{0}
};
//
// Location class methods
//

Просмотреть файл

@ -171,6 +171,19 @@ SetMimeTypeProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// MimeType class properties
//
static JSPropertySpec MimeTypeProperties[] =
{
{"description", MIMETYPE_DESCRIPTION, JSPROP_ENUMERATE | JSPROP_READONLY},
{"enabledPlugin", MIMETYPE_ENABLEDPLUGIN, JSPROP_ENUMERATE | JSPROP_READONLY},
{"suffixes", MIMETYPE_SUFFIXES, JSPROP_ENUMERATE | JSPROP_READONLY},
{"type", MIMETYPE_TYPE, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// MimeType finalizer
//
@ -187,7 +200,7 @@ FinalizeMimeType(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateMimeType(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -197,7 +210,7 @@ EnumerateMimeType(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveMimeType(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -221,19 +234,6 @@ JSClass MimeTypeClass = {
};
//
// MimeType class properties
//
static JSPropertySpec MimeTypeProperties[] =
{
{"description", MIMETYPE_DESCRIPTION, JSPROP_ENUMERATE | JSPROP_READONLY},
{"enabledPlugin", MIMETYPE_ENABLEDPLUGIN, JSPROP_ENUMERATE | JSPROP_READONLY},
{"suffixes", MIMETYPE_SUFFIXES, JSPROP_ENUMERATE | JSPROP_READONLY},
{"type", MIMETYPE_TYPE, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// MimeType class methods
//

Просмотреть файл

@ -173,6 +173,16 @@ SetMimeTypeArrayProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// MimeTypeArray class properties
//
static JSPropertySpec MimeTypeArrayProperties[] =
{
{"length", MIMETYPEARRAY_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// MimeTypeArray finalizer
//
@ -189,7 +199,7 @@ FinalizeMimeTypeArray(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateMimeTypeArray(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -199,7 +209,7 @@ EnumerateMimeTypeArray(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveMimeTypeArray(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -309,16 +319,6 @@ JSClass MimeTypeArrayClass = {
};
//
// MimeTypeArray class properties
//
static JSPropertySpec MimeTypeArrayProperties[] =
{
{"length", MIMETYPEARRAY_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// MimeTypeArray class methods
//

Просмотреть файл

@ -317,6 +317,30 @@ SetNavigatorProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// Navigator class properties
//
static JSPropertySpec NavigatorProperties[] =
{
{"appCodeName", NAVIGATOR_APPCODENAME, JSPROP_ENUMERATE | JSPROP_READONLY},
{"appName", NAVIGATOR_APPNAME, JSPROP_ENUMERATE | JSPROP_READONLY},
{"appVersion", NAVIGATOR_APPVERSION, JSPROP_ENUMERATE | JSPROP_READONLY},
{"language", NAVIGATOR_LANGUAGE, JSPROP_ENUMERATE | JSPROP_READONLY},
{"mimeTypes", NAVIGATOR_MIMETYPES, JSPROP_ENUMERATE | JSPROP_READONLY},
{"platform", NAVIGATOR_PLATFORM, JSPROP_ENUMERATE | JSPROP_READONLY},
{"oscpu", NAVIGATOR_OSCPU, JSPROP_ENUMERATE | JSPROP_READONLY},
{"vendor", NAVIGATOR_VENDOR, JSPROP_ENUMERATE | JSPROP_READONLY},
{"vendorSub", NAVIGATOR_VENDORSUB, JSPROP_ENUMERATE | JSPROP_READONLY},
{"product", NAVIGATOR_PRODUCT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"productSub", NAVIGATOR_PRODUCTSUB, JSPROP_ENUMERATE | JSPROP_READONLY},
{"plugins", NAVIGATOR_PLUGINS, JSPROP_ENUMERATE | JSPROP_READONLY},
{"securityPolicy", NAVIGATOR_SECURITYPOLICY, JSPROP_ENUMERATE | JSPROP_READONLY},
{"userAgent", NAVIGATOR_USERAGENT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"cookieEnabled", NAVIGATOR_COOKIEENABLED, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// Navigator finalizer
//
@ -333,7 +357,7 @@ FinalizeNavigator(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateNavigator(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -343,7 +367,7 @@ EnumerateNavigator(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveNavigator(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -475,30 +499,6 @@ JSClass NavigatorClass = {
};
//
// Navigator class properties
//
static JSPropertySpec NavigatorProperties[] =
{
{"appCodeName", NAVIGATOR_APPCODENAME, JSPROP_ENUMERATE | JSPROP_READONLY},
{"appName", NAVIGATOR_APPNAME, JSPROP_ENUMERATE | JSPROP_READONLY},
{"appVersion", NAVIGATOR_APPVERSION, JSPROP_ENUMERATE | JSPROP_READONLY},
{"language", NAVIGATOR_LANGUAGE, JSPROP_ENUMERATE | JSPROP_READONLY},
{"mimeTypes", NAVIGATOR_MIMETYPES, JSPROP_ENUMERATE | JSPROP_READONLY},
{"platform", NAVIGATOR_PLATFORM, JSPROP_ENUMERATE | JSPROP_READONLY},
{"oscpu", NAVIGATOR_OSCPU, JSPROP_ENUMERATE | JSPROP_READONLY},
{"vendor", NAVIGATOR_VENDOR, JSPROP_ENUMERATE | JSPROP_READONLY},
{"vendorSub", NAVIGATOR_VENDORSUB, JSPROP_ENUMERATE | JSPROP_READONLY},
{"product", NAVIGATOR_PRODUCT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"productSub", NAVIGATOR_PRODUCTSUB, JSPROP_ENUMERATE | JSPROP_READONLY},
{"plugins", NAVIGATOR_PLUGINS, JSPROP_ENUMERATE | JSPROP_READONLY},
{"securityPolicy", NAVIGATOR_SECURITYPOLICY, JSPROP_ENUMERATE | JSPROP_READONLY},
{"userAgent", NAVIGATOR_USERAGENT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"cookieEnabled", NAVIGATOR_COOKIEENABLED, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// Navigator class methods
//

Просмотреть файл

@ -112,6 +112,15 @@ SetPkcs11Property(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// Pkcs11 class properties
//
static JSPropertySpec Pkcs11Properties[] =
{
{0}
};
//
// Pkcs11 finalizer
//
@ -128,7 +137,7 @@ FinalizePkcs11(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumeratePkcs11(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -138,7 +147,7 @@ EnumeratePkcs11(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolvePkcs11(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -256,15 +265,6 @@ JSClass Pkcs11Class = {
};
//
// Pkcs11 class properties
//
static JSPropertySpec Pkcs11Properties[] =
{
{0}
};
//
// Pkcs11 class methods
//

Просмотреть файл

@ -212,6 +212,19 @@ SetPluginProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// Plugin class properties
//
static JSPropertySpec PluginProperties[] =
{
{"description", PLUGIN_DESCRIPTION, JSPROP_ENUMERATE | JSPROP_READONLY},
{"filename", PLUGIN_FILENAME, JSPROP_ENUMERATE | JSPROP_READONLY},
{"name", PLUGIN_NAME, JSPROP_ENUMERATE | JSPROP_READONLY},
{"length", PLUGIN_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// Plugin finalizer
//
@ -228,7 +241,7 @@ FinalizePlugin(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumeratePlugin(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -238,7 +251,7 @@ EnumeratePlugin(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolvePlugin(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -348,19 +361,6 @@ JSClass PluginClass = {
};
//
// Plugin class properties
//
static JSPropertySpec PluginProperties[] =
{
{"description", PLUGIN_DESCRIPTION, JSPROP_ENUMERATE | JSPROP_READONLY},
{"filename", PLUGIN_FILENAME, JSPROP_ENUMERATE | JSPROP_READONLY},
{"name", PLUGIN_NAME, JSPROP_ENUMERATE | JSPROP_READONLY},
{"length", PLUGIN_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// Plugin class methods
//

Просмотреть файл

@ -173,6 +173,16 @@ SetPluginArrayProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// PluginArray class properties
//
static JSPropertySpec PluginArrayProperties[] =
{
{"length", PLUGINARRAY_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// PluginArray finalizer
//
@ -189,7 +199,7 @@ FinalizePluginArray(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumeratePluginArray(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -199,7 +209,7 @@ EnumeratePluginArray(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolvePluginArray(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -352,16 +362,6 @@ JSClass PluginArrayClass = {
};
//
// PluginArray class properties
//
static JSPropertySpec PluginArrayProperties[] =
{
{"length", PLUGINARRAY_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// PluginArray class methods
//

Просмотреть файл

@ -246,6 +246,25 @@ SetScreenProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// Screen class properties
//
static JSPropertySpec ScreenProperties[] =
{
{"top", SCREEN_TOP, JSPROP_ENUMERATE | JSPROP_READONLY},
{"left", SCREEN_LEFT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"width", SCREEN_WIDTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{"height", SCREEN_HEIGHT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"pixelDepth", SCREEN_PIXELDEPTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{"colorDepth", SCREEN_COLORDEPTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{"availWidth", SCREEN_AVAILWIDTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{"availHeight", SCREEN_AVAILHEIGHT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"availLeft", SCREEN_AVAILLEFT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"availTop", SCREEN_AVAILTOP, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// Screen finalizer
//
@ -262,7 +281,7 @@ FinalizeScreen(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateScreen(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -272,7 +291,7 @@ EnumerateScreen(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveScreen(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -296,25 +315,6 @@ JSClass ScreenClass = {
};
//
// Screen class properties
//
static JSPropertySpec ScreenProperties[] =
{
{"top", SCREEN_TOP, JSPROP_ENUMERATE | JSPROP_READONLY},
{"left", SCREEN_LEFT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"width", SCREEN_WIDTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{"height", SCREEN_HEIGHT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"pixelDepth", SCREEN_PIXELDEPTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{"colorDepth", SCREEN_COLORDEPTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{"availWidth", SCREEN_AVAILWIDTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{"availHeight", SCREEN_AVAILHEIGHT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"availLeft", SCREEN_AVAILLEFT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"availTop", SCREEN_AVAILTOP, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// Screen class methods
//

Просмотреть файл

@ -439,19 +439,42 @@ nsJSUtils::nsGenericFinalize(JSContext* aContext,
NS_EXPORT JSBool
nsJSUtils::nsGenericEnumerate(JSContext* aContext,
JSObject* aObj)
JSObject* aObj,
JSPropertySpec* aLazyPropSpec)
{
nsISupports* nativeThis = (nsISupports*)JS_GetPrivate(aContext,
aObj);
if (nsnull != nativeThis) {
// get the js object
nsIJSScriptObject *object;
if (NS_OK == nativeThis->QueryInterface(kIJSScriptObjectIID, (void**)&object)) {
nsCOMPtr<nsIJSScriptObject> object(do_QueryInterface(nativeThis));
if (object) {
object->EnumerateProperty(aContext, aObj);
NS_RELEASE(object);
}
if (aLazyPropSpec) {
PRInt32 i = 0;
while (aLazyPropSpec[i].name) {
jsval v = JSVAL_VOID;
if (!::JS_LookupProperty(aContext, aObj, aLazyPropSpec[i].name, &v))
return JS_FALSE;
if (JSVAL_IS_VOID(v)) {
if (!::JS_DefineProperty(aContext, aObj, aLazyPropSpec[i].name,
JSVAL_VOID,
aLazyPropSpec[i].getter,
aLazyPropSpec[i].setter,
aLazyPropSpec[i].flags))
return JS_FALSE;
}
i++;
}
}
}
return JS_TRUE;
}
@ -521,7 +544,8 @@ StubConstructor(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
NS_EXPORT JSBool
nsJSUtils::nsGlobalResolve(JSContext* aContext,
JSObject* aObj,
jsval aId)
jsval aId,
JSPropertySpec* aLazyPropSpec)
{
nsresult result;
jsval val;
@ -573,25 +597,55 @@ nsJSUtils::nsGlobalResolve(JSContext* aContext,
}
}
}
return nsGenericResolve(aContext, aObj, aId);
return nsGenericResolve(aContext, aObj, aId, aLazyPropSpec);
}
NS_EXPORT JSBool
nsJSUtils::nsGenericResolve(JSContext* aContext,
JSObject* aObj,
jsval aId)
jsval aId,
JSPropertySpec* aLazyPropSpec)
{
nsISupports* nativeThis = (nsISupports*)JS_GetPrivate(aContext,
aObj);
if (nsnull != nativeThis) {
// get the js object
nsIJSScriptObject *object;
if (NS_OK == nativeThis->QueryInterface(kIJSScriptObjectIID, (void**)&object)) {
object->Resolve(aContext, aObj, aId);
NS_RELEASE(object);
nsCOMPtr<nsIJSScriptObject> object(do_QueryInterface(nativeThis));
if (object) {
PRBool didDefineProperty = PR_FALSE;
if (!object->Resolve(aContext, aObj, aId, &didDefineProperty))
return JS_FALSE;
if (!didDefineProperty && JSVAL_IS_STRING(aId) && aLazyPropSpec) {
PRInt32 i;
JSString *str = JSVAL_TO_STRING(aId);
const unsigned char *bytes = (unsigned char *)::JS_GetStringBytes(str);
const jschar *chars = ::JS_GetStringChars(str);
for (i = 0; bytes[i]; i++) {
if (jschar(bytes[i]) != chars[i])
return JS_TRUE;
}
if (size_t(i) != ::JS_GetStringLength(str))
return JS_TRUE;
for (i = 0; aLazyPropSpec[i].name; i++) {
if (nsCRT::strcmp(aLazyPropSpec[i].name, (const char *)bytes) == 0) {
return ::JS_DefineUCProperty(aContext, aObj,
::JS_GetStringChars(str),
::JS_GetStringLength(str),
JSVAL_VOID,
aLazyPropSpec[i].getter,
aLazyPropSpec[i].setter,
aLazyPropSpec[i].flags);
}
}
}
}
}
return JS_TRUE;
}

Просмотреть файл

@ -93,35 +93,38 @@ public:
jsval aValue);
static NS_EXPORT PRBool nsConvertJSValToBool(PRBool* aProp,
JSContext* aContext,
jsval aValue);
JSContext* aContext,
jsval aValue);
static NS_EXPORT PRBool nsConvertJSValToUint32(PRUint32* aProp,
JSContext* aContext,
jsval aValue);
static NS_EXPORT PRBool nsConvertJSValToFunc(nsIDOMEventListener** aListener,
JSContext* aContext,
JSObject* aObj,
jsval aValue);
JSContext* aContext,
JSObject* aObj,
jsval aValue);
static NS_EXPORT void PR_CALLBACK nsGenericFinalize(JSContext* aContext,
JSObject* aObj);
JSObject* aObj);
static NS_EXPORT JSBool nsGenericEnumerate(JSContext* aContext,
JSObject* aObj);
JSObject* aObj,
JSPropertySpec* aLazyPropSpec);
static NS_EXPORT JSBool nsGlobalResolve(JSContext* aContext,
JSObject* aObj,
jsval aId);
JSObject* aObj,
jsval aId,
JSPropertySpec* aLazyPropSpec);
static NS_EXPORT JSBool nsGenericResolve(JSContext* aContext,
JSObject* aObj,
jsval aId);
JSObject* aObj,
jsval aId,
JSPropertySpec* aLazyPropSpec);
static NS_EXPORT nsISupports* nsGetNativeThis(JSContext* aContext,
JSObject* aObj);
JSObject* aObj);
static NS_EXPORT nsresult nsGetStaticScriptGlobal(JSContext* aContext,
JSObject* aObj,
nsIScriptGlobalObject** aNativeGlobal);

Просмотреть файл

@ -92,69 +92,60 @@ static NS_DEFINE_IID(kIWindowEventOwnerIID, NS_IDOMWINDOWEVENTOWNER_IID);
enum Window_slots {
WINDOW_DOCUMENT = -1,
WINDOW_PARENT = -2,
WINDOW_TOP = -3,
WINDOW_SCROLLBARS = -4,
WINDOW_FRAMES = -5,
WINDOW_NAME = -6,
WINDOW_SCROLLX = -7,
WINDOW_SCROLLY = -8,
WINDOWINTERNAL_WINDOW = -9,
WINDOWINTERNAL_SELF = -10,
WINDOWINTERNAL_NAVIGATOR = -11,
WINDOWINTERNAL_SCREEN = -12,
WINDOWINTERNAL_HISTORY = -13,
WINDOWINTERNAL__CONTENT = -14,
WINDOWINTERNAL_SIDEBAR = -15,
WINDOWINTERNAL_PROMPTER = -16,
WINDOWINTERNAL_MENUBAR = -17,
WINDOWINTERNAL_TOOLBAR = -18,
WINDOWINTERNAL_LOCATIONBAR = -19,
WINDOWINTERNAL_PERSONALBAR = -20,
WINDOWINTERNAL_STATUSBAR = -21,
WINDOWINTERNAL_DIRECTORIES = -22,
WINDOWINTERNAL_CLOSED = -23,
WINDOWINTERNAL_CRYPTO = -24,
WINDOWINTERNAL_PKCS11 = -25,
WINDOWINTERNAL_CONTROLLERS = -26,
WINDOWINTERNAL_OPENER = -27,
WINDOWINTERNAL_STATUS = -28,
WINDOWINTERNAL_DEFAULTSTATUS = -29,
WINDOWINTERNAL_LOCATION = -30,
WINDOWINTERNAL_TITLE = -31,
WINDOWINTERNAL_INNERWIDTH = -32,
WINDOWINTERNAL_INNERHEIGHT = -33,
WINDOWINTERNAL_OUTERWIDTH = -34,
WINDOWINTERNAL_OUTERHEIGHT = -35,
WINDOWINTERNAL_SCREENX = -36,
WINDOWINTERNAL_SCREENY = -37,
WINDOWINTERNAL_PAGEXOFFSET = -38,
WINDOWINTERNAL_PAGEYOFFSET = -39,
WINDOWINTERNAL_LENGTH = -40,
WINDOWEVENTOWNER_ONMOUSEDOWN = -41,
WINDOWEVENTOWNER_ONMOUSEUP = -42,
WINDOWEVENTOWNER_ONCLICK = -43,
WINDOWEVENTOWNER_ONMOUSEOVER = -44,
WINDOWEVENTOWNER_ONMOUSEOUT = -45,
WINDOWEVENTOWNER_ONKEYDOWN = -46,
WINDOWEVENTOWNER_ONKEYUP = -47,
WINDOWEVENTOWNER_ONKEYPRESS = -48,
WINDOWEVENTOWNER_ONMOUSEMOVE = -49,
WINDOWEVENTOWNER_ONFOCUS = -50,
WINDOWEVENTOWNER_ONBLUR = -51,
WINDOWEVENTOWNER_ONSUBMIT = -52,
WINDOWEVENTOWNER_ONRESET = -53,
WINDOWEVENTOWNER_ONCHANGE = -54,
WINDOWEVENTOWNER_ONSELECT = -55,
WINDOWEVENTOWNER_ONLOAD = -56,
WINDOWEVENTOWNER_ONUNLOAD = -57,
WINDOWEVENTOWNER_ONCLOSE = -58,
WINDOWEVENTOWNER_ONABORT = -59,
WINDOWEVENTOWNER_ONERROR = -60,
WINDOWEVENTOWNER_ONPAINT = -61,
WINDOWEVENTOWNER_ONDRAGDROP = -62,
WINDOWEVENTOWNER_ONRESIZE = -63,
WINDOWEVENTOWNER_ONSCROLL = -64,
ABSTRACTVIEW_DOCUMENT = -65
WINDOW_SCROLLBARS = -3,
WINDOW_FRAMES = -4,
WINDOW_NAME = -5,
WINDOW_SCROLLX = -6,
WINDOW_SCROLLY = -7,
WINDOWINTERNAL_WINDOW = -8,
WINDOWINTERNAL_SELF = -9,
WINDOWINTERNAL_NAVIGATOR = -10,
WINDOWINTERNAL_SCREEN = -11,
WINDOWINTERNAL_HISTORY = -12,
WINDOWINTERNAL_STATUSBAR = -13,
WINDOWINTERNAL_DIRECTORIES = -14,
WINDOWINTERNAL_CLOSED = -15,
WINDOWINTERNAL_CRYPTO = -16,
WINDOWINTERNAL_PKCS11 = -17,
WINDOWINTERNAL_OPENER = -18,
WINDOWINTERNAL_STATUS = -19,
WINDOWINTERNAL_DEFAULTSTATUS = -20,
WINDOWINTERNAL_LOCATION = -21,
WINDOWINTERNAL_TITLE = -22,
WINDOWINTERNAL_INNERWIDTH = -23,
WINDOWINTERNAL_INNERHEIGHT = -24,
WINDOWINTERNAL_OUTERWIDTH = -25,
WINDOWINTERNAL_OUTERHEIGHT = -26,
WINDOWINTERNAL_SCREENX = -27,
WINDOWINTERNAL_SCREENY = -28,
WINDOWINTERNAL_PAGEXOFFSET = -29,
WINDOWINTERNAL_PAGEYOFFSET = -30,
WINDOWINTERNAL_LENGTH = -31,
WINDOWEVENTOWNER_ONMOUSEDOWN = -32,
WINDOWEVENTOWNER_ONMOUSEUP = -33,
WINDOWEVENTOWNER_ONCLICK = -34,
WINDOWEVENTOWNER_ONMOUSEOVER = -35,
WINDOWEVENTOWNER_ONMOUSEOUT = -36,
WINDOWEVENTOWNER_ONKEYDOWN = -37,
WINDOWEVENTOWNER_ONKEYUP = -38,
WINDOWEVENTOWNER_ONKEYPRESS = -39,
WINDOWEVENTOWNER_ONMOUSEMOVE = -40,
WINDOWEVENTOWNER_ONFOCUS = -41,
WINDOWEVENTOWNER_ONBLUR = -42,
WINDOWEVENTOWNER_ONSUBMIT = -43,
WINDOWEVENTOWNER_ONRESET = -44,
WINDOWEVENTOWNER_ONCHANGE = -45,
WINDOWEVENTOWNER_ONSELECT = -46,
WINDOWEVENTOWNER_ONLOAD = -47,
WINDOWEVENTOWNER_ONUNLOAD = -48,
WINDOWEVENTOWNER_ONCLOSE = -49,
WINDOWEVENTOWNER_ONABORT = -50,
WINDOWEVENTOWNER_ONERROR = -51,
WINDOWEVENTOWNER_ONPAINT = -52,
WINDOWEVENTOWNER_ONDRAGDROP = -53,
WINDOWEVENTOWNER_ONRESIZE = -54,
WINDOWEVENTOWNER_ONSCROLL = -55,
ABSTRACTVIEW_DOCUMENT = -56
};
/***********************************************************************/
@ -2602,6 +2593,89 @@ WindowInternalcontrollersSetter(JSContext *cx, JSObject *obj, jsval id, jsval *v
}
//
// Window class properties
//
static JSPropertySpec WindowProperties[] =
{
{"document", WINDOW_DOCUMENT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"parent", WINDOW_PARENT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"scrollbars", WINDOW_SCROLLBARS, JSPROP_ENUMERATE | JSPROP_READONLY},
{"frames", WINDOW_FRAMES, JSPROP_ENUMERATE | JSPROP_READONLY},
{"name", WINDOW_NAME, JSPROP_ENUMERATE},
{"scrollX", WINDOW_SCROLLX, JSPROP_ENUMERATE | JSPROP_READONLY},
{"scrollY", WINDOW_SCROLLY, JSPROP_ENUMERATE | JSPROP_READONLY},
{"window", WINDOWINTERNAL_WINDOW, JSPROP_ENUMERATE | JSPROP_READONLY},
{"self", WINDOWINTERNAL_SELF, JSPROP_ENUMERATE | JSPROP_READONLY},
{"navigator", WINDOWINTERNAL_NAVIGATOR, JSPROP_ENUMERATE | JSPROP_READONLY},
{"screen", WINDOWINTERNAL_SCREEN, JSPROP_ENUMERATE | JSPROP_READONLY},
{"history", WINDOWINTERNAL_HISTORY, JSPROP_ENUMERATE | JSPROP_READONLY},
{"statusbar", WINDOWINTERNAL_STATUSBAR, JSPROP_ENUMERATE | JSPROP_READONLY},
{"directories", WINDOWINTERNAL_DIRECTORIES, JSPROP_ENUMERATE | JSPROP_READONLY},
{"closed", WINDOWINTERNAL_CLOSED, JSPROP_ENUMERATE | JSPROP_READONLY},
{"crypto", WINDOWINTERNAL_CRYPTO, JSPROP_ENUMERATE | JSPROP_READONLY},
{"pkcs11", WINDOWINTERNAL_PKCS11, JSPROP_ENUMERATE | JSPROP_READONLY},
{"opener", WINDOWINTERNAL_OPENER, JSPROP_ENUMERATE},
{"status", WINDOWINTERNAL_STATUS, JSPROP_ENUMERATE},
{"defaultStatus", WINDOWINTERNAL_DEFAULTSTATUS, JSPROP_ENUMERATE},
{"location", WINDOWINTERNAL_LOCATION, JSPROP_ENUMERATE},
{"title", WINDOWINTERNAL_TITLE, JSPROP_ENUMERATE},
{"innerWidth", WINDOWINTERNAL_INNERWIDTH, JSPROP_ENUMERATE},
{"innerHeight", WINDOWINTERNAL_INNERHEIGHT, JSPROP_ENUMERATE},
{"outerWidth", WINDOWINTERNAL_OUTERWIDTH, JSPROP_ENUMERATE},
{"outerHeight", WINDOWINTERNAL_OUTERHEIGHT, JSPROP_ENUMERATE},
{"screenX", WINDOWINTERNAL_SCREENX, JSPROP_ENUMERATE},
{"screenY", WINDOWINTERNAL_SCREENY, JSPROP_ENUMERATE},
{"pageXOffset", WINDOWINTERNAL_PAGEXOFFSET, JSPROP_ENUMERATE},
{"pageYOffset", WINDOWINTERNAL_PAGEYOFFSET, JSPROP_ENUMERATE},
{"length", WINDOWINTERNAL_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{"onmousedown", WINDOWEVENTOWNER_ONMOUSEDOWN, JSPROP_ENUMERATE},
{"onmouseup", WINDOWEVENTOWNER_ONMOUSEUP, JSPROP_ENUMERATE},
{"onclick", WINDOWEVENTOWNER_ONCLICK, JSPROP_ENUMERATE},
{"onmouseover", WINDOWEVENTOWNER_ONMOUSEOVER, JSPROP_ENUMERATE},
{"onmouseout", WINDOWEVENTOWNER_ONMOUSEOUT, JSPROP_ENUMERATE},
{"onkeydown", WINDOWEVENTOWNER_ONKEYDOWN, JSPROP_ENUMERATE},
{"onkeyup", WINDOWEVENTOWNER_ONKEYUP, JSPROP_ENUMERATE},
{"onkeypress", WINDOWEVENTOWNER_ONKEYPRESS, JSPROP_ENUMERATE},
{"onmousemove", WINDOWEVENTOWNER_ONMOUSEMOVE, JSPROP_ENUMERATE},
{"onfocus", WINDOWEVENTOWNER_ONFOCUS, JSPROP_ENUMERATE},
{"onblur", WINDOWEVENTOWNER_ONBLUR, JSPROP_ENUMERATE},
{"onsubmit", WINDOWEVENTOWNER_ONSUBMIT, JSPROP_ENUMERATE},
{"onreset", WINDOWEVENTOWNER_ONRESET, JSPROP_ENUMERATE},
{"onchange", WINDOWEVENTOWNER_ONCHANGE, JSPROP_ENUMERATE},
{"onselect", WINDOWEVENTOWNER_ONSELECT, JSPROP_ENUMERATE},
{"onload", WINDOWEVENTOWNER_ONLOAD, JSPROP_ENUMERATE},
{"onunload", WINDOWEVENTOWNER_ONUNLOAD, JSPROP_ENUMERATE},
{"onclose", WINDOWEVENTOWNER_ONCLOSE, JSPROP_ENUMERATE},
{"onabort", WINDOWEVENTOWNER_ONABORT, JSPROP_ENUMERATE},
{"onerror", WINDOWEVENTOWNER_ONERROR, JSPROP_ENUMERATE},
{"onpaint", WINDOWEVENTOWNER_ONPAINT, JSPROP_ENUMERATE},
{"ondragdrop", WINDOWEVENTOWNER_ONDRAGDROP, JSPROP_ENUMERATE},
{"onresize", WINDOWEVENTOWNER_ONRESIZE, JSPROP_ENUMERATE},
{"onscroll", WINDOWEVENTOWNER_ONSCROLL, JSPROP_ENUMERATE},
{"document", ABSTRACTVIEW_DOCUMENT, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// Window class replaceable properties
//
static JSPropertySpec WindowReplaceableProperties[] =
{
{"top", 0, JSPROP_ENUMERATE, WindowtopGetter, WindowtopSetter},
{"_content", 0, JSPROP_ENUMERATE, WindowInternal_contentGetter, WindowInternal_contentSetter},
{"sidebar", 0, JSPROP_ENUMERATE, WindowInternalsidebarGetter, WindowInternalsidebarSetter},
{"prompter", 0, JSPROP_ENUMERATE, WindowInternalprompterGetter, WindowInternalprompterSetter},
{"menubar", 0, JSPROP_ENUMERATE, WindowInternalmenubarGetter, WindowInternalmenubarSetter},
{"toolbar", 0, JSPROP_ENUMERATE, WindowInternaltoolbarGetter, WindowInternaltoolbarSetter},
{"locationbar", 0, JSPROP_ENUMERATE, WindowInternallocationbarGetter, WindowInternallocationbarSetter},
{"personalbar", 0, JSPROP_ENUMERATE, WindowInternalpersonalbarGetter, WindowInternalpersonalbarSetter},
{"controllers", 0, JSPROP_ENUMERATE, WindowInternalcontrollersGetter, WindowInternalcontrollersSetter},
{0}
};
//
// Window finalizer
//
@ -2618,7 +2692,7 @@ FinalizeWindow(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateWindow(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, WindowReplaceableProperties);
}
@ -2628,7 +2702,7 @@ EnumerateWindow(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveWindow(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGlobalResolve(cx, obj, id);
return nsJSUtils::nsGlobalResolve(cx, obj, id, WindowReplaceableProperties);
}
@ -4592,80 +4666,6 @@ JSClass WindowClass = {
};
//
// Window class properties
//
static JSPropertySpec WindowProperties[] =
{
{"document", WINDOW_DOCUMENT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"parent", WINDOW_PARENT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"top", WINDOW_TOP, JSPROP_ENUMERATE, WindowtopGetter, WindowtopSetter},
{"scrollbars", WINDOW_SCROLLBARS, JSPROP_ENUMERATE | JSPROP_READONLY},
{"frames", WINDOW_FRAMES, JSPROP_ENUMERATE | JSPROP_READONLY},
{"name", WINDOW_NAME, JSPROP_ENUMERATE},
{"scrollX", WINDOW_SCROLLX, JSPROP_ENUMERATE | JSPROP_READONLY},
{"scrollY", WINDOW_SCROLLY, JSPROP_ENUMERATE | JSPROP_READONLY},
{"window", WINDOWINTERNAL_WINDOW, JSPROP_ENUMERATE | JSPROP_READONLY},
{"self", WINDOWINTERNAL_SELF, JSPROP_ENUMERATE | JSPROP_READONLY},
{"navigator", WINDOWINTERNAL_NAVIGATOR, JSPROP_ENUMERATE | JSPROP_READONLY},
{"screen", WINDOWINTERNAL_SCREEN, JSPROP_ENUMERATE | JSPROP_READONLY},
{"history", WINDOWINTERNAL_HISTORY, JSPROP_ENUMERATE | JSPROP_READONLY},
{"_content", WINDOWINTERNAL__CONTENT, JSPROP_ENUMERATE, WindowInternal_contentGetter, WindowInternal_contentSetter},
{"sidebar", WINDOWINTERNAL_SIDEBAR, JSPROP_ENUMERATE, WindowInternalsidebarGetter, WindowInternalsidebarSetter},
{"prompter", WINDOWINTERNAL_PROMPTER, JSPROP_ENUMERATE, WindowInternalprompterGetter, WindowInternalprompterSetter},
{"menubar", WINDOWINTERNAL_MENUBAR, JSPROP_ENUMERATE, WindowInternalmenubarGetter, WindowInternalmenubarSetter},
{"toolbar", WINDOWINTERNAL_TOOLBAR, JSPROP_ENUMERATE, WindowInternaltoolbarGetter, WindowInternaltoolbarSetter},
{"locationbar", WINDOWINTERNAL_LOCATIONBAR, JSPROP_ENUMERATE, WindowInternallocationbarGetter, WindowInternallocationbarSetter},
{"personalbar", WINDOWINTERNAL_PERSONALBAR, JSPROP_ENUMERATE, WindowInternalpersonalbarGetter, WindowInternalpersonalbarSetter},
{"statusbar", WINDOWINTERNAL_STATUSBAR, JSPROP_ENUMERATE | JSPROP_READONLY},
{"directories", WINDOWINTERNAL_DIRECTORIES, JSPROP_ENUMERATE | JSPROP_READONLY},
{"closed", WINDOWINTERNAL_CLOSED, JSPROP_ENUMERATE | JSPROP_READONLY},
{"crypto", WINDOWINTERNAL_CRYPTO, JSPROP_ENUMERATE | JSPROP_READONLY},
{"pkcs11", WINDOWINTERNAL_PKCS11, JSPROP_ENUMERATE | JSPROP_READONLY},
{"controllers", WINDOWINTERNAL_CONTROLLERS, JSPROP_ENUMERATE, WindowInternalcontrollersGetter, WindowInternalcontrollersSetter},
{"opener", WINDOWINTERNAL_OPENER, JSPROP_ENUMERATE},
{"status", WINDOWINTERNAL_STATUS, JSPROP_ENUMERATE},
{"defaultStatus", WINDOWINTERNAL_DEFAULTSTATUS, JSPROP_ENUMERATE},
{"location", WINDOWINTERNAL_LOCATION, JSPROP_ENUMERATE},
{"title", WINDOWINTERNAL_TITLE, JSPROP_ENUMERATE},
{"innerWidth", WINDOWINTERNAL_INNERWIDTH, JSPROP_ENUMERATE},
{"innerHeight", WINDOWINTERNAL_INNERHEIGHT, JSPROP_ENUMERATE},
{"outerWidth", WINDOWINTERNAL_OUTERWIDTH, JSPROP_ENUMERATE},
{"outerHeight", WINDOWINTERNAL_OUTERHEIGHT, JSPROP_ENUMERATE},
{"screenX", WINDOWINTERNAL_SCREENX, JSPROP_ENUMERATE},
{"screenY", WINDOWINTERNAL_SCREENY, JSPROP_ENUMERATE},
{"pageXOffset", WINDOWINTERNAL_PAGEXOFFSET, JSPROP_ENUMERATE},
{"pageYOffset", WINDOWINTERNAL_PAGEYOFFSET, JSPROP_ENUMERATE},
{"length", WINDOWINTERNAL_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{"onmousedown", WINDOWEVENTOWNER_ONMOUSEDOWN, JSPROP_ENUMERATE},
{"onmouseup", WINDOWEVENTOWNER_ONMOUSEUP, JSPROP_ENUMERATE},
{"onclick", WINDOWEVENTOWNER_ONCLICK, JSPROP_ENUMERATE},
{"onmouseover", WINDOWEVENTOWNER_ONMOUSEOVER, JSPROP_ENUMERATE},
{"onmouseout", WINDOWEVENTOWNER_ONMOUSEOUT, JSPROP_ENUMERATE},
{"onkeydown", WINDOWEVENTOWNER_ONKEYDOWN, JSPROP_ENUMERATE},
{"onkeyup", WINDOWEVENTOWNER_ONKEYUP, JSPROP_ENUMERATE},
{"onkeypress", WINDOWEVENTOWNER_ONKEYPRESS, JSPROP_ENUMERATE},
{"onmousemove", WINDOWEVENTOWNER_ONMOUSEMOVE, JSPROP_ENUMERATE},
{"onfocus", WINDOWEVENTOWNER_ONFOCUS, JSPROP_ENUMERATE},
{"onblur", WINDOWEVENTOWNER_ONBLUR, JSPROP_ENUMERATE},
{"onsubmit", WINDOWEVENTOWNER_ONSUBMIT, JSPROP_ENUMERATE},
{"onreset", WINDOWEVENTOWNER_ONRESET, JSPROP_ENUMERATE},
{"onchange", WINDOWEVENTOWNER_ONCHANGE, JSPROP_ENUMERATE},
{"onselect", WINDOWEVENTOWNER_ONSELECT, JSPROP_ENUMERATE},
{"onload", WINDOWEVENTOWNER_ONLOAD, JSPROP_ENUMERATE},
{"onunload", WINDOWEVENTOWNER_ONUNLOAD, JSPROP_ENUMERATE},
{"onclose", WINDOWEVENTOWNER_ONCLOSE, JSPROP_ENUMERATE},
{"onabort", WINDOWEVENTOWNER_ONABORT, JSPROP_ENUMERATE},
{"onerror", WINDOWEVENTOWNER_ONERROR, JSPROP_ENUMERATE},
{"onpaint", WINDOWEVENTOWNER_ONPAINT, JSPROP_ENUMERATE},
{"ondragdrop", WINDOWEVENTOWNER_ONDRAGDROP, JSPROP_ENUMERATE},
{"onresize", WINDOWEVENTOWNER_ONRESIZE, JSPROP_ENUMERATE},
{"onscroll", WINDOWEVENTOWNER_ONSCROLL, JSPROP_ENUMERATE},
{"document", ABSTRACTVIEW_DOCUMENT, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// Window class methods
//

Просмотреть файл

@ -173,6 +173,16 @@ SetWindowCollectionProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// WindowCollection class properties
//
static JSPropertySpec WindowCollectionProperties[] =
{
{"length", WINDOWCOLLECTION_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// WindowCollection finalizer
//
@ -189,7 +199,7 @@ FinalizeWindowCollection(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateWindowCollection(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -199,7 +209,7 @@ EnumerateWindowCollection(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveWindowCollection(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -309,16 +319,6 @@ JSClass WindowCollectionClass = {
};
//
// WindowCollection class properties
//
static JSPropertySpec WindowCollectionProperties[] =
{
{"length", WINDOWCOLLECTION_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// WindowCollection class methods
//

Просмотреть файл

@ -847,8 +847,11 @@ LocationImpl::EnumerateProperty(JSContext *aContext, JSObject *aObj)
}
PRBool
LocationImpl::Resolve(JSContext *aContext, JSObject *aObj, jsval aID)
LocationImpl::Resolve(JSContext *aContext, JSObject *aObj, jsval aID,
PRBool* aDidDefineProperty)
{
*aDidDefineProperty = PR_FALSE;
if (JSVAL_IS_STRING(aID)) {
JSString *str;
@ -863,6 +866,8 @@ LocationImpl::Resolve(JSContext *aContext, JSObject *aObj, jsval aID)
::JS_DefineUCProperty(aContext, (JSObject *)mScriptObject,
chars, ::JS_GetStringLength(str),
JSVAL_VOID, nsnull, nsnull, 0);
*aDidDefineProperty = PR_TRUE;
}
}

Просмотреть файл

@ -182,6 +182,19 @@ SetAttrProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// Attr class properties
//
static JSPropertySpec AttrProperties[] =
{
{"name", ATTR_NAME, JSPROP_ENUMERATE | JSPROP_READONLY},
{"specified", ATTR_SPECIFIED, JSPROP_ENUMERATE | JSPROP_READONLY},
{"value", ATTR_VALUE, JSPROP_ENUMERATE},
{"ownerElement", ATTR_OWNERELEMENT, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// Attr finalizer
//
@ -198,7 +211,7 @@ FinalizeAttr(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateAttr(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -208,7 +221,7 @@ EnumerateAttr(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveAttr(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -232,19 +245,6 @@ JSClass AttrClass = {
};
//
// Attr class properties
//
static JSPropertySpec AttrProperties[] =
{
{"name", ATTR_NAME, JSPROP_ENUMERATE | JSPROP_READONLY},
{"specified", ATTR_SPECIFIED, JSPROP_ENUMERATE | JSPROP_READONLY},
{"value", ATTR_VALUE, JSPROP_ENUMERATE},
{"ownerElement", ATTR_OWNERELEMENT, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// Attr class methods
//

Просмотреть файл

@ -112,6 +112,15 @@ SetCDATASectionProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// CDATASection class properties
//
static JSPropertySpec CDATASectionProperties[] =
{
{0}
};
//
// CDATASection finalizer
//
@ -128,7 +137,7 @@ FinalizeCDATASection(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateCDATASection(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -138,7 +147,7 @@ EnumerateCDATASection(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveCDATASection(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -162,15 +171,6 @@ JSClass CDATASectionClass = {
};
//
// CDATASection class properties
//
static JSPropertySpec CDATASectionProperties[] =
{
{0}
};
//
// CDATASection class methods
//

Просмотреть файл

@ -153,6 +153,17 @@ SetCharacterDataProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// CharacterData class properties
//
static JSPropertySpec CharacterDataProperties[] =
{
{"data", CHARACTERDATA_DATA, JSPROP_ENUMERATE},
{"length", CHARACTERDATA_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// CharacterData finalizer
//
@ -169,7 +180,7 @@ FinalizeCharacterData(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateCharacterData(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -179,7 +190,7 @@ EnumerateCharacterData(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveCharacterData(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -433,17 +444,6 @@ JSClass CharacterDataClass = {
};
//
// CharacterData class properties
//
static JSPropertySpec CharacterDataProperties[] =
{
{"data", CHARACTERDATA_DATA, JSPROP_ENUMERATE},
{"length", CHARACTERDATA_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// CharacterData class methods
//

Просмотреть файл

@ -112,6 +112,15 @@ SetCommentProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// Comment class properties
//
static JSPropertySpec CommentProperties[] =
{
{0}
};
//
// Comment finalizer
//
@ -128,7 +137,7 @@ FinalizeComment(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateComment(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -138,7 +147,7 @@ EnumerateComment(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveComment(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -162,15 +171,6 @@ JSClass CommentClass = {
};
//
// Comment class properties
//
static JSPropertySpec CommentProperties[] =
{
{0}
};
//
// Comment class methods
//

Просмотреть файл

@ -116,6 +116,15 @@ SetDOMImplementationProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// DOMImplementation class properties
//
static JSPropertySpec DOMImplementationProperties[] =
{
{0}
};
//
// DOMImplementation finalizer
//
@ -132,7 +141,7 @@ FinalizeDOMImplementation(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateDOMImplementation(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -142,7 +151,7 @@ EnumerateDOMImplementation(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveDOMImplementation(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -308,15 +317,6 @@ JSClass DOMImplementationClass = {
};
//
// DOMImplementation class properties
//
static JSPropertySpec DOMImplementationProperties[] =
{
{0}
};
//
// DOMImplementation class methods
//

Просмотреть файл

@ -324,6 +324,23 @@ SetDocumentProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// Document class properties
//
static JSPropertySpec DocumentProperties[] =
{
{"doctype", DOCUMENT_DOCTYPE, JSPROP_ENUMERATE | JSPROP_READONLY},
{"implementation", DOCUMENT_IMPLEMENTATION, JSPROP_ENUMERATE | JSPROP_READONLY},
{"documentElement", DOCUMENT_DOCUMENTELEMENT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"styleSheets", DOCUMENTSTYLE_STYLESHEETS, JSPROP_ENUMERATE | JSPROP_READONLY},
{"defaultView", DOCUMENTVIEW_DEFAULTVIEW, JSPROP_ENUMERATE | JSPROP_READONLY},
{"characterSet", NSDOCUMENT_CHARACTERSET, JSPROP_ENUMERATE | JSPROP_READONLY},
{"plugins", NSDOCUMENT_PLUGINS, JSPROP_ENUMERATE | JSPROP_READONLY},
{"location", NSDOCUMENT_LOCATION, JSPROP_ENUMERATE},
{0}
};
//
// Document finalizer
//
@ -340,7 +357,7 @@ FinalizeDocument(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateDocument(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -350,7 +367,7 @@ EnumerateDocument(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveDocument(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -1424,23 +1441,6 @@ JSClass DocumentClass = {
};
//
// Document class properties
//
static JSPropertySpec DocumentProperties[] =
{
{"doctype", DOCUMENT_DOCTYPE, JSPROP_ENUMERATE | JSPROP_READONLY},
{"implementation", DOCUMENT_IMPLEMENTATION, JSPROP_ENUMERATE | JSPROP_READONLY},
{"documentElement", DOCUMENT_DOCUMENTELEMENT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"styleSheets", DOCUMENTSTYLE_STYLESHEETS, JSPROP_ENUMERATE | JSPROP_READONLY},
{"defaultView", DOCUMENTVIEW_DEFAULTVIEW, JSPROP_ENUMERATE | JSPROP_READONLY},
{"characterSet", NSDOCUMENT_CHARACTERSET, JSPROP_ENUMERATE | JSPROP_READONLY},
{"plugins", NSDOCUMENT_PLUGINS, JSPROP_ENUMERATE | JSPROP_READONLY},
{"location", NSDOCUMENT_LOCATION, JSPROP_ENUMERATE},
{0}
};
//
// Document class methods
//

Просмотреть файл

@ -112,6 +112,15 @@ SetDocumentFragmentProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// DocumentFragment class properties
//
static JSPropertySpec DocumentFragmentProperties[] =
{
{0}
};
//
// DocumentFragment finalizer
//
@ -128,7 +137,7 @@ FinalizeDocumentFragment(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateDocumentFragment(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -138,7 +147,7 @@ EnumerateDocumentFragment(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveDocumentFragment(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -162,15 +171,6 @@ JSClass DocumentFragmentClass = {
};
//
// DocumentFragment class properties
//
static JSPropertySpec DocumentFragmentProperties[] =
{
{0}
};
//
// DocumentFragment class methods
//

Просмотреть файл

@ -198,6 +198,21 @@ SetDocumentTypeProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// DocumentType class properties
//
static JSPropertySpec DocumentTypeProperties[] =
{
{"name", DOCUMENTTYPE_NAME, JSPROP_ENUMERATE | JSPROP_READONLY},
{"entities", DOCUMENTTYPE_ENTITIES, JSPROP_ENUMERATE | JSPROP_READONLY},
{"notations", DOCUMENTTYPE_NOTATIONS, JSPROP_ENUMERATE | JSPROP_READONLY},
{"publicId", DOCUMENTTYPE_PUBLICID, JSPROP_ENUMERATE | JSPROP_READONLY},
{"systemId", DOCUMENTTYPE_SYSTEMID, JSPROP_ENUMERATE | JSPROP_READONLY},
{"internalSubset", DOCUMENTTYPE_INTERNALSUBSET, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// DocumentType finalizer
//
@ -214,7 +229,7 @@ FinalizeDocumentType(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateDocumentType(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -224,7 +239,7 @@ EnumerateDocumentType(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveDocumentType(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -248,21 +263,6 @@ JSClass DocumentTypeClass = {
};
//
// DocumentType class properties
//
static JSPropertySpec DocumentTypeProperties[] =
{
{"name", DOCUMENTTYPE_NAME, JSPROP_ENUMERATE | JSPROP_READONLY},
{"entities", DOCUMENTTYPE_ENTITIES, JSPROP_ENUMERATE | JSPROP_READONLY},
{"notations", DOCUMENTTYPE_NOTATIONS, JSPROP_ENUMERATE | JSPROP_READONLY},
{"publicId", DOCUMENTTYPE_PUBLICID, JSPROP_ENUMERATE | JSPROP_READONLY},
{"systemId", DOCUMENTTYPE_SYSTEMID, JSPROP_ENUMERATE | JSPROP_READONLY},
{"internalSubset", DOCUMENTTYPE_INTERNALSUBSET, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// DocumentType class methods
//

Просмотреть файл

@ -133,6 +133,16 @@ SetElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// Element class properties
//
static JSPropertySpec ElementProperties[] =
{
{"tagName", ELEMENT_TAGNAME, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// Element finalizer
//
@ -149,7 +159,7 @@ FinalizeElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateElement(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -159,7 +169,7 @@ EnumerateElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveElement(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -843,16 +853,6 @@ JSClass ElementClass = {
};
//
// Element class properties
//
static JSPropertySpec ElementProperties[] =
{
{"tagName", ELEMENT_TAGNAME, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// Element class methods
//

Просмотреть файл

@ -155,6 +155,18 @@ SetEntityProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// Entity class properties
//
static JSPropertySpec EntityProperties[] =
{
{"publicId", ENTITY_PUBLICID, JSPROP_ENUMERATE | JSPROP_READONLY},
{"systemId", ENTITY_SYSTEMID, JSPROP_ENUMERATE | JSPROP_READONLY},
{"notationName", ENTITY_NOTATIONNAME, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// Entity finalizer
//
@ -171,7 +183,7 @@ FinalizeEntity(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateEntity(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -181,7 +193,7 @@ EnumerateEntity(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveEntity(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -205,18 +217,6 @@ JSClass EntityClass = {
};
//
// Entity class properties
//
static JSPropertySpec EntityProperties[] =
{
{"publicId", ENTITY_PUBLICID, JSPROP_ENUMERATE | JSPROP_READONLY},
{"systemId", ENTITY_SYSTEMID, JSPROP_ENUMERATE | JSPROP_READONLY},
{"notationName", ENTITY_NOTATIONNAME, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// Entity class methods
//

Просмотреть файл

@ -112,6 +112,15 @@ SetEntityReferenceProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// EntityReference class properties
//
static JSPropertySpec EntityReferenceProperties[] =
{
{0}
};
//
// EntityReference finalizer
//
@ -128,7 +137,7 @@ FinalizeEntityReference(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateEntityReference(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -138,7 +147,7 @@ EnumerateEntityReference(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveEntityReference(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -162,15 +171,6 @@ JSClass EntityReferenceClass = {
};
//
// EntityReference class properties
//
static JSPropertySpec EntityReferenceProperties[] =
{
{0}
};
//
// EntityReference class methods
//

Просмотреть файл

@ -162,6 +162,17 @@ SetMediaListProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// MediaList class properties
//
static JSPropertySpec MediaListProperties[] =
{
{"mediaText", MEDIALIST_MEDIATEXT, JSPROP_ENUMERATE},
{"length", MEDIALIST_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// MediaList finalizer
//
@ -178,7 +189,7 @@ FinalizeMediaList(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateMediaList(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -188,7 +199,7 @@ EnumerateMediaList(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveMediaList(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -338,17 +349,6 @@ JSClass MediaListClass = {
};
//
// MediaList class properties
//
static JSPropertySpec MediaListProperties[] =
{
{"mediaText", MEDIALIST_MEDIATEXT, JSPROP_ENUMERATE},
{"length", MEDIALIST_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// MediaList class methods
//

Просмотреть файл

@ -141,6 +141,16 @@ SetNamedNodeMapProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// NamedNodeMap class properties
//
static JSPropertySpec NamedNodeMapProperties[] =
{
{"length", NAMEDNODEMAP_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// NamedNodeMap finalizer
//
@ -157,7 +167,7 @@ FinalizeNamedNodeMap(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateNamedNodeMap(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -167,7 +177,7 @@ EnumerateNamedNodeMap(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveNamedNodeMap(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -503,16 +513,6 @@ JSClass NamedNodeMapClass = {
};
//
// NamedNodeMap class properties
//
static JSPropertySpec NamedNodeMapProperties[] =
{
{"length", NAMEDNODEMAP_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// NamedNodeMap class methods
//

Просмотреть файл

@ -341,6 +341,29 @@ SetNodeProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// Node class properties
//
static JSPropertySpec NodeProperties[] =
{
{"nodeName", NODE_NODENAME, JSPROP_ENUMERATE | JSPROP_READONLY},
{"nodeValue", NODE_NODEVALUE, JSPROP_ENUMERATE},
{"nodeType", NODE_NODETYPE, JSPROP_ENUMERATE | JSPROP_READONLY},
{"parentNode", NODE_PARENTNODE, JSPROP_ENUMERATE | JSPROP_READONLY},
{"childNodes", NODE_CHILDNODES, JSPROP_ENUMERATE | JSPROP_READONLY},
{"firstChild", NODE_FIRSTCHILD, JSPROP_ENUMERATE | JSPROP_READONLY},
{"lastChild", NODE_LASTCHILD, JSPROP_ENUMERATE | JSPROP_READONLY},
{"previousSibling", NODE_PREVIOUSSIBLING, JSPROP_ENUMERATE | JSPROP_READONLY},
{"nextSibling", NODE_NEXTSIBLING, JSPROP_ENUMERATE | JSPROP_READONLY},
{"attributes", NODE_ATTRIBUTES, JSPROP_ENUMERATE | JSPROP_READONLY},
{"ownerDocument", NODE_OWNERDOCUMENT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"namespaceURI", NODE_NAMESPACEURI, JSPROP_ENUMERATE | JSPROP_READONLY},
{"prefix", NODE_PREFIX, JSPROP_ENUMERATE},
{"localName", NODE_LOCALNAME, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// Node finalizer
//
@ -357,7 +380,7 @@ FinalizeNode(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateNode(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -367,7 +390,7 @@ EnumerateNode(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveNode(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -960,29 +983,6 @@ JSClass NodeClass = {
};
//
// Node class properties
//
static JSPropertySpec NodeProperties[] =
{
{"nodeName", NODE_NODENAME, JSPROP_ENUMERATE | JSPROP_READONLY},
{"nodeValue", NODE_NODEVALUE, JSPROP_ENUMERATE},
{"nodeType", NODE_NODETYPE, JSPROP_ENUMERATE | JSPROP_READONLY},
{"parentNode", NODE_PARENTNODE, JSPROP_ENUMERATE | JSPROP_READONLY},
{"childNodes", NODE_CHILDNODES, JSPROP_ENUMERATE | JSPROP_READONLY},
{"firstChild", NODE_FIRSTCHILD, JSPROP_ENUMERATE | JSPROP_READONLY},
{"lastChild", NODE_LASTCHILD, JSPROP_ENUMERATE | JSPROP_READONLY},
{"previousSibling", NODE_PREVIOUSSIBLING, JSPROP_ENUMERATE | JSPROP_READONLY},
{"nextSibling", NODE_NEXTSIBLING, JSPROP_ENUMERATE | JSPROP_READONLY},
{"attributes", NODE_ATTRIBUTES, JSPROP_ENUMERATE | JSPROP_READONLY},
{"ownerDocument", NODE_OWNERDOCUMENT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"namespaceURI", NODE_NAMESPACEURI, JSPROP_ENUMERATE | JSPROP_READONLY},
{"prefix", NODE_PREFIX, JSPROP_ENUMERATE},
{"localName", NODE_LOCALNAME, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// Node class methods
//

Просмотреть файл

@ -141,6 +141,16 @@ SetNodeListProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// NodeList class properties
//
static JSPropertySpec NodeListProperties[] =
{
{"length", NODELIST_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// NodeList finalizer
//
@ -157,7 +167,7 @@ FinalizeNodeList(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateNodeList(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -167,7 +177,7 @@ EnumerateNodeList(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveNodeList(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -235,16 +245,6 @@ JSClass NodeListClass = {
};
//
// NodeList class properties
//
static JSPropertySpec NodeListProperties[] =
{
{"length", NODELIST_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// NodeList class methods
//

Просмотреть файл

@ -142,6 +142,17 @@ SetNotationProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// Notation class properties
//
static JSPropertySpec NotationProperties[] =
{
{"publicId", NOTATION_PUBLICID, JSPROP_ENUMERATE | JSPROP_READONLY},
{"systemId", NOTATION_SYSTEMID, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// Notation finalizer
//
@ -158,7 +169,7 @@ FinalizeNotation(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateNotation(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -168,7 +179,7 @@ EnumerateNotation(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveNotation(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -192,17 +203,6 @@ JSClass NotationClass = {
};
//
// Notation class properties
//
static JSPropertySpec NotationProperties[] =
{
{"publicId", NOTATION_PUBLICID, JSPROP_ENUMERATE | JSPROP_READONLY},
{"systemId", NOTATION_SYSTEMID, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// Notation class methods
//

Просмотреть файл

@ -178,6 +178,18 @@ SetProcessingInstructionProperty(JSContext *cx, JSObject *obj, jsval id, jsval *
}
//
// ProcessingInstruction class properties
//
static JSPropertySpec ProcessingInstructionProperties[] =
{
{"target", PROCESSINGINSTRUCTION_TARGET, JSPROP_ENUMERATE | JSPROP_READONLY},
{"data", PROCESSINGINSTRUCTION_DATA, JSPROP_ENUMERATE},
{"sheet", LINKSTYLE_SHEET, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// ProcessingInstruction finalizer
//
@ -194,7 +206,7 @@ FinalizeProcessingInstruction(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateProcessingInstruction(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -204,7 +216,7 @@ EnumerateProcessingInstruction(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveProcessingInstruction(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -228,18 +240,6 @@ JSClass ProcessingInstructionClass = {
};
//
// ProcessingInstruction class properties
//
static JSPropertySpec ProcessingInstructionProperties[] =
{
{"target", PROCESSINGINSTRUCTION_TARGET, JSPROP_ENUMERATE | JSPROP_READONLY},
{"data", PROCESSINGINSTRUCTION_DATA, JSPROP_ENUMERATE},
{"sheet", LINKSTYLE_SHEET, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// ProcessingInstruction class methods
//

Просмотреть файл

@ -228,6 +228,22 @@ SetStyleSheetProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// StyleSheet class properties
//
static JSPropertySpec StyleSheetProperties[] =
{
{"type", STYLESHEET_TYPE, JSPROP_ENUMERATE | JSPROP_READONLY},
{"disabled", STYLESHEET_DISABLED, JSPROP_ENUMERATE},
{"ownerNode", STYLESHEET_OWNERNODE, JSPROP_ENUMERATE | JSPROP_READONLY},
{"parentStyleSheet", STYLESHEET_PARENTSTYLESHEET, JSPROP_ENUMERATE | JSPROP_READONLY},
{"href", STYLESHEET_HREF, JSPROP_ENUMERATE | JSPROP_READONLY},
{"title", STYLESHEET_TITLE, JSPROP_ENUMERATE | JSPROP_READONLY},
{"media", STYLESHEET_MEDIA, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// StyleSheet finalizer
//
@ -244,7 +260,7 @@ FinalizeStyleSheet(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateStyleSheet(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -254,7 +270,7 @@ EnumerateStyleSheet(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveStyleSheet(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -278,22 +294,6 @@ JSClass StyleSheetClass = {
};
//
// StyleSheet class properties
//
static JSPropertySpec StyleSheetProperties[] =
{
{"type", STYLESHEET_TYPE, JSPROP_ENUMERATE | JSPROP_READONLY},
{"disabled", STYLESHEET_DISABLED, JSPROP_ENUMERATE},
{"ownerNode", STYLESHEET_OWNERNODE, JSPROP_ENUMERATE | JSPROP_READONLY},
{"parentStyleSheet", STYLESHEET_PARENTSTYLESHEET, JSPROP_ENUMERATE | JSPROP_READONLY},
{"href", STYLESHEET_HREF, JSPROP_ENUMERATE | JSPROP_READONLY},
{"title", STYLESHEET_TITLE, JSPROP_ENUMERATE | JSPROP_READONLY},
{"media", STYLESHEET_MEDIA, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// StyleSheet class methods
//

Просмотреть файл

@ -141,6 +141,16 @@ SetStyleSheetListProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// StyleSheetList class properties
//
static JSPropertySpec StyleSheetListProperties[] =
{
{"length", STYLESHEETLIST_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// StyleSheetList finalizer
//
@ -157,7 +167,7 @@ FinalizeStyleSheetList(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateStyleSheetList(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -167,7 +177,7 @@ EnumerateStyleSheetList(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveStyleSheetList(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -235,16 +245,6 @@ JSClass StyleSheetListClass = {
};
//
// StyleSheetList class properties
//
static JSPropertySpec StyleSheetListProperties[] =
{
{"length", STYLESHEETLIST_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// StyleSheetList class methods
//

Просмотреть файл

@ -112,6 +112,15 @@ SetTextProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// Text class properties
//
static JSPropertySpec TextProperties[] =
{
{0}
};
//
// Text finalizer
//
@ -128,7 +137,7 @@ FinalizeText(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateText(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -138,7 +147,7 @@ EnumerateText(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveText(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -206,15 +215,6 @@ JSClass TextClass = {
};
//
// Text class properties
//
static JSPropertySpec TextProperties[] =
{
{0}
};
//
// Text class methods
//

Просмотреть файл

@ -3215,56 +3215,6 @@ SetCSS2PropertiesProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// CSS2Properties finalizer
//
PR_STATIC_CALLBACK(void)
FinalizeCSS2Properties(JSContext *cx, JSObject *obj)
{
nsJSUtils::nsGenericFinalize(cx, obj);
}
//
// CSS2Properties enumerate
//
PR_STATIC_CALLBACK(JSBool)
EnumerateCSS2Properties(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
}
//
// CSS2Properties resolve
//
PR_STATIC_CALLBACK(JSBool)
ResolveCSS2Properties(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
}
/***********************************************************************/
//
// class for CSS2Properties
//
JSClass CSS2PropertiesClass = {
"CSS2Properties",
JSCLASS_HAS_PRIVATE | JSCLASS_PRIVATE_IS_NSISUPPORTS,
JS_PropertyStub,
JS_PropertyStub,
GetCSS2PropertiesProperty,
SetCSS2PropertiesProperty,
EnumerateCSS2Properties,
ResolveCSS2Properties,
JS_ConvertStub,
FinalizeCSS2Properties,
nsnull,
nsJSUtils::nsCheckAccess
};
//
// CSS2Properties class properties
//
@ -3398,6 +3348,56 @@ static JSPropertySpec CSS2PropertiesProperties[] =
};
//
// CSS2Properties finalizer
//
PR_STATIC_CALLBACK(void)
FinalizeCSS2Properties(JSContext *cx, JSObject *obj)
{
nsJSUtils::nsGenericFinalize(cx, obj);
}
//
// CSS2Properties enumerate
//
PR_STATIC_CALLBACK(JSBool)
EnumerateCSS2Properties(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
//
// CSS2Properties resolve
//
PR_STATIC_CALLBACK(JSBool)
ResolveCSS2Properties(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
/***********************************************************************/
//
// class for CSS2Properties
//
JSClass CSS2PropertiesClass = {
"CSS2Properties",
JSCLASS_HAS_PRIVATE | JSCLASS_PRIVATE_IS_NSISUPPORTS,
JS_PropertyStub,
JS_PropertyStub,
GetCSS2PropertiesProperty,
SetCSS2PropertiesProperty,
EnumerateCSS2Properties,
ResolveCSS2Properties,
JS_ConvertStub,
FinalizeCSS2Properties,
nsnull,
nsJSUtils::nsCheckAccess
};
//
// CSS2Properties class methods
//

Просмотреть файл

@ -132,6 +132,16 @@ SetCSSFontFaceRuleProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// CSSFontFaceRule class properties
//
static JSPropertySpec CSSFontFaceRuleProperties[] =
{
{"style", CSSFONTFACERULE_STYLE, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// CSSFontFaceRule finalizer
//
@ -148,7 +158,7 @@ FinalizeCSSFontFaceRule(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateCSSFontFaceRule(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -158,7 +168,7 @@ EnumerateCSSFontFaceRule(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveCSSFontFaceRule(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -182,16 +192,6 @@ JSClass CSSFontFaceRuleClass = {
};
//
// CSSFontFaceRule class properties
//
static JSPropertySpec CSSFontFaceRuleProperties[] =
{
{"style", CSSFONTFACERULE_STYLE, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// CSSFontFaceRule class methods
//

Просмотреть файл

@ -161,6 +161,18 @@ SetCSSImportRuleProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// CSSImportRule class properties
//
static JSPropertySpec CSSImportRuleProperties[] =
{
{"href", CSSIMPORTRULE_HREF, JSPROP_ENUMERATE | JSPROP_READONLY},
{"media", CSSIMPORTRULE_MEDIA, JSPROP_ENUMERATE | JSPROP_READONLY},
{"styleSheet", CSSIMPORTRULE_STYLESHEET, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// CSSImportRule finalizer
//
@ -177,7 +189,7 @@ FinalizeCSSImportRule(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateCSSImportRule(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -187,7 +199,7 @@ EnumerateCSSImportRule(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveCSSImportRule(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -211,18 +223,6 @@ JSClass CSSImportRuleClass = {
};
//
// CSSImportRule class properties
//
static JSPropertySpec CSSImportRuleProperties[] =
{
{"href", CSSIMPORTRULE_HREF, JSPROP_ENUMERATE | JSPROP_READONLY},
{"media", CSSIMPORTRULE_MEDIA, JSPROP_ENUMERATE | JSPROP_READONLY},
{"styleSheet", CSSIMPORTRULE_STYLESHEET, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// CSSImportRule class methods
//

Просмотреть файл

@ -148,6 +148,17 @@ SetCSSMediaRuleProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// CSSMediaRule class properties
//
static JSPropertySpec CSSMediaRuleProperties[] =
{
{"media", CSSMEDIARULE_MEDIA, JSPROP_ENUMERATE | JSPROP_READONLY},
{"cssRules", CSSMEDIARULE_CSSRULES, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// CSSMediaRule finalizer
//
@ -164,7 +175,7 @@ FinalizeCSSMediaRule(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateCSSMediaRule(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -174,7 +185,7 @@ EnumerateCSSMediaRule(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveCSSMediaRule(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -287,17 +298,6 @@ JSClass CSSMediaRuleClass = {
};
//
// CSSMediaRule class properties
//
static JSPropertySpec CSSMediaRuleProperties[] =
{
{"media", CSSMEDIARULE_MEDIA, JSPROP_ENUMERATE | JSPROP_READONLY},
{"cssRules", CSSMEDIARULE_CSSRULES, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// CSSMediaRule class methods
//

Просмотреть файл

@ -156,6 +156,17 @@ SetCSSPageRuleProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// CSSPageRule class properties
//
static JSPropertySpec CSSPageRuleProperties[] =
{
{"selectorText", CSSPAGERULE_SELECTORTEXT, JSPROP_ENUMERATE},
{"style", CSSPAGERULE_STYLE, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// CSSPageRule finalizer
//
@ -172,7 +183,7 @@ FinalizeCSSPageRule(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateCSSPageRule(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -182,7 +193,7 @@ EnumerateCSSPageRule(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveCSSPageRule(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -206,17 +217,6 @@ JSClass CSSPageRuleClass = {
};
//
// CSSPageRule class properties
//
static JSPropertySpec CSSPageRuleProperties[] =
{
{"selectorText", CSSPAGERULE_SELECTORTEXT, JSPROP_ENUMERATE},
{"style", CSSPAGERULE_STYLE, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// CSSPageRule class methods
//

Просмотреть файл

@ -135,6 +135,16 @@ SetCSSPrimitiveValueProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// CSSPrimitiveValue class properties
//
static JSPropertySpec CSSPrimitiveValueProperties[] =
{
{"primitiveType", CSSPRIMITIVEVALUE_PRIMITIVETYPE, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// CSSPrimitiveValue finalizer
//
@ -151,7 +161,7 @@ FinalizeCSSPrimitiveValue(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateCSSPrimitiveValue(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -161,7 +171,7 @@ EnumerateCSSPrimitiveValue(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveCSSPrimitiveValue(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -465,16 +475,6 @@ JSClass CSSPrimitiveValueClass = {
};
//
// CSSPrimitiveValue class properties
//
static JSPropertySpec CSSPrimitiveValueProperties[] =
{
{"primitiveType", CSSPRIMITIVEVALUE_PRIMITIVETYPE, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// CSSPrimitiveValue class methods
//

Просмотреть файл

@ -183,6 +183,19 @@ SetCSSRuleProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// CSSRule class properties
//
static JSPropertySpec CSSRuleProperties[] =
{
{"type", CSSRULE_TYPE, JSPROP_ENUMERATE | JSPROP_READONLY},
{"cssText", CSSRULE_CSSTEXT, JSPROP_ENUMERATE},
{"parentStyleSheet", CSSRULE_PARENTSTYLESHEET, JSPROP_ENUMERATE | JSPROP_READONLY},
{"parentRule", CSSRULE_PARENTRULE, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// CSSRule finalizer
//
@ -199,7 +212,7 @@ FinalizeCSSRule(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateCSSRule(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -209,7 +222,7 @@ EnumerateCSSRule(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveCSSRule(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -233,19 +246,6 @@ JSClass CSSRuleClass = {
};
//
// CSSRule class properties
//
static JSPropertySpec CSSRuleProperties[] =
{
{"type", CSSRULE_TYPE, JSPROP_ENUMERATE | JSPROP_READONLY},
{"cssText", CSSRULE_CSSTEXT, JSPROP_ENUMERATE},
{"parentStyleSheet", CSSRULE_PARENTSTYLESHEET, JSPROP_ENUMERATE | JSPROP_READONLY},
{"parentRule", CSSRULE_PARENTRULE, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// CSSRule class methods
//

Просмотреть файл

@ -141,6 +141,16 @@ SetCSSRuleListProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// CSSRuleList class properties
//
static JSPropertySpec CSSRuleListProperties[] =
{
{"length", CSSRULELIST_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// CSSRuleList finalizer
//
@ -157,7 +167,7 @@ FinalizeCSSRuleList(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateCSSRuleList(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -167,7 +177,7 @@ EnumerateCSSRuleList(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveCSSRuleList(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -235,16 +245,6 @@ JSClass CSSRuleListClass = {
};
//
// CSSRuleList class properties
//
static JSPropertySpec CSSRuleListProperties[] =
{
{"length", CSSRULELIST_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// CSSRuleList class methods
//

Просмотреть файл

@ -180,6 +180,18 @@ SetCSSStyleDeclarationProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp
}
//
// CSSStyleDeclaration class properties
//
static JSPropertySpec CSSStyleDeclarationProperties[] =
{
{"cssText", CSSSTYLEDECLARATION_CSSTEXT, JSPROP_ENUMERATE},
{"length", CSSSTYLEDECLARATION_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{"parentRule", CSSSTYLEDECLARATION_PARENTRULE, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// CSSStyleDeclaration finalizer
//
@ -196,7 +208,7 @@ FinalizeCSSStyleDeclaration(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateCSSStyleDeclaration(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -206,7 +218,7 @@ EnumerateCSSStyleDeclaration(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveCSSStyleDeclaration(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -487,18 +499,6 @@ JSClass CSSStyleDeclarationClass = {
};
//
// CSSStyleDeclaration class properties
//
static JSPropertySpec CSSStyleDeclarationProperties[] =
{
{"cssText", CSSSTYLEDECLARATION_CSSTEXT, JSPROP_ENUMERATE},
{"length", CSSSTYLEDECLARATION_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{"parentRule", CSSSTYLEDECLARATION_PARENTRULE, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// CSSStyleDeclaration class methods
//

Просмотреть файл

@ -156,6 +156,17 @@ SetCSSStyleRuleProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// CSSStyleRule class properties
//
static JSPropertySpec CSSStyleRuleProperties[] =
{
{"selectorText", CSSSTYLERULE_SELECTORTEXT, JSPROP_ENUMERATE},
{"style", CSSSTYLERULE_STYLE, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// CSSStyleRule finalizer
//
@ -172,7 +183,7 @@ FinalizeCSSStyleRule(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateCSSStyleRule(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -182,7 +193,7 @@ EnumerateCSSStyleRule(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveCSSStyleRule(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -206,17 +217,6 @@ JSClass CSSStyleRuleClass = {
};
//
// CSSStyleRule class properties
//
static JSPropertySpec CSSStyleRuleProperties[] =
{
{"selectorText", CSSSTYLERULE_SELECTORTEXT, JSPROP_ENUMERATE},
{"style", CSSSTYLERULE_STYLE, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// CSSStyleRule class methods
//

Просмотреть файл

@ -148,6 +148,17 @@ SetCSSStyleSheetProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// CSSStyleSheet class properties
//
static JSPropertySpec CSSStyleSheetProperties[] =
{
{"ownerRule", CSSSTYLESHEET_OWNERRULE, JSPROP_ENUMERATE | JSPROP_READONLY},
{"cssRules", CSSSTYLESHEET_CSSRULES, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// CSSStyleSheet finalizer
//
@ -164,7 +175,7 @@ FinalizeCSSStyleSheet(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateCSSStyleSheet(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -174,7 +185,7 @@ EnumerateCSSStyleSheet(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveCSSStyleSheet(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -287,17 +298,6 @@ JSClass CSSStyleSheetClass = {
};
//
// CSSStyleSheet class properties
//
static JSPropertySpec CSSStyleSheetProperties[] =
{
{"ownerRule", CSSSTYLESHEET_OWNERRULE, JSPROP_ENUMERATE | JSPROP_READONLY},
{"cssRules", CSSSTYLESHEET_CSSRULES, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// CSSStyleSheet class methods
//

Просмотреть файл

@ -112,6 +112,15 @@ SetCSSUnknownRuleProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// CSSUnknownRule class properties
//
static JSPropertySpec CSSUnknownRuleProperties[] =
{
{0}
};
//
// CSSUnknownRule finalizer
//
@ -128,7 +137,7 @@ FinalizeCSSUnknownRule(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateCSSUnknownRule(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -138,7 +147,7 @@ EnumerateCSSUnknownRule(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveCSSUnknownRule(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -162,15 +171,6 @@ JSClass CSSUnknownRuleClass = {
};
//
// CSSUnknownRule class properties
//
static JSPropertySpec CSSUnknownRuleProperties[] =
{
{0}
};
//
// CSSUnknownRule class methods
//

Просмотреть файл

@ -153,6 +153,17 @@ SetCSSValueProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// CSSValue class properties
//
static JSPropertySpec CSSValueProperties[] =
{
{"cssText", CSSVALUE_CSSTEXT, JSPROP_ENUMERATE},
{"cssValueType", CSSVALUE_CSSVALUETYPE, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// CSSValue finalizer
//
@ -169,7 +180,7 @@ FinalizeCSSValue(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateCSSValue(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -179,7 +190,7 @@ EnumerateCSSValue(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveCSSValue(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -203,17 +214,6 @@ JSClass CSSValueClass = {
};
//
// CSSValue class properties
//
static JSPropertySpec CSSValueProperties[] =
{
{"cssText", CSSVALUE_CSSTEXT, JSPROP_ENUMERATE},
{"cssValueType", CSSVALUE_CSSVALUETYPE, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// CSSValue class methods
//

Просмотреть файл

@ -155,6 +155,18 @@ SetCounterProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// Counter class properties
//
static JSPropertySpec CounterProperties[] =
{
{"identifier", COUNTER_IDENTIFIER, JSPROP_ENUMERATE | JSPROP_READONLY},
{"listStyle", COUNTER_LISTSTYLE, JSPROP_ENUMERATE | JSPROP_READONLY},
{"separator", COUNTER_SEPARATOR, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// Counter finalizer
//
@ -171,7 +183,7 @@ FinalizeCounter(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateCounter(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -181,7 +193,7 @@ EnumerateCounter(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveCounter(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -205,18 +217,6 @@ JSClass CounterClass = {
};
//
// Counter class properties
//
static JSPropertySpec CounterProperties[] =
{
{"identifier", COUNTER_IDENTIFIER, JSPROP_ENUMERATE | JSPROP_READONLY},
{"listStyle", COUNTER_LISTSTYLE, JSPROP_ENUMERATE | JSPROP_READONLY},
{"separator", COUNTER_SEPARATOR, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// Counter class methods
//

Просмотреть файл

@ -160,6 +160,18 @@ SetRGBColorProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// RGBColor class properties
//
static JSPropertySpec RGBColorProperties[] =
{
{"red", RGBCOLOR_RED, JSPROP_ENUMERATE | JSPROP_READONLY},
{"green", RGBCOLOR_GREEN, JSPROP_ENUMERATE | JSPROP_READONLY},
{"blue", RGBCOLOR_BLUE, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// RGBColor finalizer
//
@ -176,7 +188,7 @@ FinalizeRGBColor(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateRGBColor(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -186,7 +198,7 @@ EnumerateRGBColor(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveRGBColor(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -210,18 +222,6 @@ JSClass RGBColorClass = {
};
//
// RGBColor class properties
//
static JSPropertySpec RGBColorProperties[] =
{
{"red", RGBCOLOR_RED, JSPROP_ENUMERATE | JSPROP_READONLY},
{"green", RGBCOLOR_GREEN, JSPROP_ENUMERATE | JSPROP_READONLY},
{"blue", RGBCOLOR_BLUE, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// RGBColor class methods
//

Просмотреть файл

@ -174,6 +174,19 @@ SetRectProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// Rect class properties
//
static JSPropertySpec RectProperties[] =
{
{"top", RECT_TOP, JSPROP_ENUMERATE | JSPROP_READONLY},
{"right", RECT_RIGHT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"bottom", RECT_BOTTOM, JSPROP_ENUMERATE | JSPROP_READONLY},
{"left", RECT_LEFT, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// Rect finalizer
//
@ -190,7 +203,7 @@ FinalizeRect(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateRect(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -200,7 +213,7 @@ EnumerateRect(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveRect(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -224,19 +237,6 @@ JSClass RectClass = {
};
//
// Rect class properties
//
static JSPropertySpec RectProperties[] =
{
{"top", RECT_TOP, JSPROP_ENUMERATE | JSPROP_READONLY},
{"right", RECT_RIGHT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"bottom", RECT_BOTTOM, JSPROP_ENUMERATE | JSPROP_READONLY},
{"left", RECT_LEFT, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// Rect class methods
//

Просмотреть файл

@ -231,6 +231,23 @@ SetEventProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// Event class properties
//
static JSPropertySpec EventProperties[] =
{
{"type", EVENT_TYPE, JSPROP_ENUMERATE | JSPROP_READONLY},
{"target", EVENT_TARGET, JSPROP_ENUMERATE | JSPROP_READONLY},
{"currentTarget", EVENT_CURRENTTARGET, JSPROP_ENUMERATE | JSPROP_READONLY},
{"originalTarget", EVENT_ORIGINALTARGET, JSPROP_ENUMERATE | JSPROP_READONLY},
{"eventPhase", EVENT_EVENTPHASE, JSPROP_ENUMERATE | JSPROP_READONLY},
{"bubbles", EVENT_BUBBLES, JSPROP_ENUMERATE | JSPROP_READONLY},
{"cancelable", EVENT_CANCELABLE, JSPROP_ENUMERATE | JSPROP_READONLY},
{"timeStamp", EVENT_TIMESTAMP, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// Event finalizer
//
@ -247,7 +264,7 @@ FinalizeEvent(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateEvent(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -257,7 +274,7 @@ EnumerateEvent(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveEvent(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -470,23 +487,6 @@ JSClass EventClass = {
};
//
// Event class properties
//
static JSPropertySpec EventProperties[] =
{
{"type", EVENT_TYPE, JSPROP_ENUMERATE | JSPROP_READONLY},
{"target", EVENT_TARGET, JSPROP_ENUMERATE | JSPROP_READONLY},
{"currentTarget", EVENT_CURRENTTARGET, JSPROP_ENUMERATE | JSPROP_READONLY},
{"originalTarget", EVENT_ORIGINALTARGET, JSPROP_ENUMERATE | JSPROP_READONLY},
{"eventPhase", EVENT_EVENTPHASE, JSPROP_ENUMERATE | JSPROP_READONLY},
{"bubbles", EVENT_BUBBLES, JSPROP_ENUMERATE | JSPROP_READONLY},
{"cancelable", EVENT_CANCELABLE, JSPROP_ENUMERATE | JSPROP_READONLY},
{"timeStamp", EVENT_TIMESTAMP, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// Event class methods
//

Просмотреть файл

@ -337,7 +337,7 @@ FinalizeKeyEvent(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateKeyEvent(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -347,7 +347,7 @@ EnumerateKeyEvent(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveKeyEvent(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}

Просмотреть файл

@ -352,6 +352,26 @@ SetUIEventProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// UIEvent class properties
//
static JSPropertySpec UIEventProperties[] =
{
{"view", UIEVENT_VIEW, JSPROP_ENUMERATE | JSPROP_READONLY},
{"detail", UIEVENT_DETAIL, JSPROP_ENUMERATE | JSPROP_READONLY},
{"layerX", NSUIEVENT_LAYERX, JSPROP_ENUMERATE | JSPROP_READONLY},
{"layerY", NSUIEVENT_LAYERY, JSPROP_ENUMERATE | JSPROP_READONLY},
{"pageX", NSUIEVENT_PAGEX, JSPROP_ENUMERATE | JSPROP_READONLY},
{"pageY", NSUIEVENT_PAGEY, JSPROP_ENUMERATE | JSPROP_READONLY},
{"which", NSUIEVENT_WHICH, JSPROP_ENUMERATE | JSPROP_READONLY},
{"rangeParent", NSUIEVENT_RANGEPARENT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"rangeOffset", NSUIEVENT_RANGEOFFSET, JSPROP_ENUMERATE | JSPROP_READONLY},
{"cancelBubble", NSUIEVENT_CANCELBUBBLE, JSPROP_ENUMERATE},
{"isChar", NSUIEVENT_ISCHAR, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// UIEvent finalizer
//
@ -368,7 +388,7 @@ FinalizeUIEvent(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateUIEvent(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -378,7 +398,7 @@ EnumerateUIEvent(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveUIEvent(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -504,26 +524,6 @@ JSClass UIEventClass = {
};
//
// UIEvent class properties
//
static JSPropertySpec UIEventProperties[] =
{
{"view", UIEVENT_VIEW, JSPROP_ENUMERATE | JSPROP_READONLY},
{"detail", UIEVENT_DETAIL, JSPROP_ENUMERATE | JSPROP_READONLY},
{"layerX", NSUIEVENT_LAYERX, JSPROP_ENUMERATE | JSPROP_READONLY},
{"layerY", NSUIEVENT_LAYERY, JSPROP_ENUMERATE | JSPROP_READONLY},
{"pageX", NSUIEVENT_PAGEX, JSPROP_ENUMERATE | JSPROP_READONLY},
{"pageY", NSUIEVENT_PAGEY, JSPROP_ENUMERATE | JSPROP_READONLY},
{"which", NSUIEVENT_WHICH, JSPROP_ENUMERATE | JSPROP_READONLY},
{"rangeParent", NSUIEVENT_RANGEPARENT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"rangeOffset", NSUIEVENT_RANGEOFFSET, JSPROP_ENUMERATE | JSPROP_READONLY},
{"cancelBubble", NSUIEVENT_CANCELBUBBLE, JSPROP_ENUMERATE},
{"isChar", NSUIEVENT_ISCHAR, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// UIEvent class methods
//

Просмотреть файл

@ -584,6 +584,35 @@ SetHTMLAnchorElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// HTMLAnchorElement class properties
//
static JSPropertySpec HTMLAnchorElementProperties[] =
{
{"accessKey", HTMLANCHORELEMENT_ACCESSKEY, JSPROP_ENUMERATE},
{"charset", HTMLANCHORELEMENT_CHARSET, JSPROP_ENUMERATE},
{"coords", HTMLANCHORELEMENT_COORDS, JSPROP_ENUMERATE},
{"href", HTMLANCHORELEMENT_HREF, JSPROP_ENUMERATE},
{"hreflang", HTMLANCHORELEMENT_HREFLANG, JSPROP_ENUMERATE},
{"name", HTMLANCHORELEMENT_NAME, JSPROP_ENUMERATE},
{"rel", HTMLANCHORELEMENT_REL, JSPROP_ENUMERATE},
{"rev", HTMLANCHORELEMENT_REV, JSPROP_ENUMERATE},
{"shape", HTMLANCHORELEMENT_SHAPE, JSPROP_ENUMERATE},
{"tabIndex", HTMLANCHORELEMENT_TABINDEX, JSPROP_ENUMERATE},
{"target", HTMLANCHORELEMENT_TARGET, JSPROP_ENUMERATE},
{"type", HTMLANCHORELEMENT_TYPE, JSPROP_ENUMERATE},
{"protocol", NSHTMLANCHORELEMENT_PROTOCOL, JSPROP_ENUMERATE | JSPROP_READONLY},
{"host", NSHTMLANCHORELEMENT_HOST, JSPROP_ENUMERATE | JSPROP_READONLY},
{"hostname", NSHTMLANCHORELEMENT_HOSTNAME, JSPROP_ENUMERATE | JSPROP_READONLY},
{"pathname", NSHTMLANCHORELEMENT_PATHNAME, JSPROP_ENUMERATE | JSPROP_READONLY},
{"search", NSHTMLANCHORELEMENT_SEARCH, JSPROP_ENUMERATE | JSPROP_READONLY},
{"port", NSHTMLANCHORELEMENT_PORT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"hash", NSHTMLANCHORELEMENT_HASH, JSPROP_ENUMERATE | JSPROP_READONLY},
{"text", NSHTMLANCHORELEMENT_TEXT, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// HTMLAnchorElement finalizer
//
@ -600,7 +629,7 @@ FinalizeHTMLAnchorElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateHTMLAnchorElement(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -610,7 +639,7 @@ EnumerateHTMLAnchorElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveHTMLAnchorElement(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -704,35 +733,6 @@ JSClass HTMLAnchorElementClass = {
};
//
// HTMLAnchorElement class properties
//
static JSPropertySpec HTMLAnchorElementProperties[] =
{
{"accessKey", HTMLANCHORELEMENT_ACCESSKEY, JSPROP_ENUMERATE},
{"charset", HTMLANCHORELEMENT_CHARSET, JSPROP_ENUMERATE},
{"coords", HTMLANCHORELEMENT_COORDS, JSPROP_ENUMERATE},
{"href", HTMLANCHORELEMENT_HREF, JSPROP_ENUMERATE},
{"hreflang", HTMLANCHORELEMENT_HREFLANG, JSPROP_ENUMERATE},
{"name", HTMLANCHORELEMENT_NAME, JSPROP_ENUMERATE},
{"rel", HTMLANCHORELEMENT_REL, JSPROP_ENUMERATE},
{"rev", HTMLANCHORELEMENT_REV, JSPROP_ENUMERATE},
{"shape", HTMLANCHORELEMENT_SHAPE, JSPROP_ENUMERATE},
{"tabIndex", HTMLANCHORELEMENT_TABINDEX, JSPROP_ENUMERATE},
{"target", HTMLANCHORELEMENT_TARGET, JSPROP_ENUMERATE},
{"type", HTMLANCHORELEMENT_TYPE, JSPROP_ENUMERATE},
{"protocol", NSHTMLANCHORELEMENT_PROTOCOL, JSPROP_ENUMERATE | JSPROP_READONLY},
{"host", NSHTMLANCHORELEMENT_HOST, JSPROP_ENUMERATE | JSPROP_READONLY},
{"hostname", NSHTMLANCHORELEMENT_HOSTNAME, JSPROP_ENUMERATE | JSPROP_READONLY},
{"pathname", NSHTMLANCHORELEMENT_PATHNAME, JSPROP_ENUMERATE | JSPROP_READONLY},
{"search", NSHTMLANCHORELEMENT_SEARCH, JSPROP_ENUMERATE | JSPROP_READONLY},
{"port", NSHTMLANCHORELEMENT_PORT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"hash", NSHTMLANCHORELEMENT_HASH, JSPROP_ENUMERATE | JSPROP_READONLY},
{"text", NSHTMLANCHORELEMENT_TEXT, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// HTMLAnchorElement class methods
//

Просмотреть файл

@ -390,6 +390,26 @@ SetHTMLAppletElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// HTMLAppletElement class properties
//
static JSPropertySpec HTMLAppletElementProperties[] =
{
{"align", HTMLAPPLETELEMENT_ALIGN, JSPROP_ENUMERATE},
{"alt", HTMLAPPLETELEMENT_ALT, JSPROP_ENUMERATE},
{"archive", HTMLAPPLETELEMENT_ARCHIVE, JSPROP_ENUMERATE},
{"code", HTMLAPPLETELEMENT_CODE, JSPROP_ENUMERATE},
{"codeBase", HTMLAPPLETELEMENT_CODEBASE, JSPROP_ENUMERATE},
{"height", HTMLAPPLETELEMENT_HEIGHT, JSPROP_ENUMERATE},
{"hspace", HTMLAPPLETELEMENT_HSPACE, JSPROP_ENUMERATE},
{"name", HTMLAPPLETELEMENT_NAME, JSPROP_ENUMERATE},
{"object", HTMLAPPLETELEMENT_OBJECT, JSPROP_ENUMERATE},
{"vspace", HTMLAPPLETELEMENT_VSPACE, JSPROP_ENUMERATE},
{"width", HTMLAPPLETELEMENT_WIDTH, JSPROP_ENUMERATE},
{0}
};
//
// HTMLAppletElement finalizer
//
@ -406,7 +426,7 @@ FinalizeHTMLAppletElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateHTMLAppletElement(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -416,7 +436,7 @@ EnumerateHTMLAppletElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveHTMLAppletElement(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -440,26 +460,6 @@ JSClass HTMLAppletElementClass = {
};
//
// HTMLAppletElement class properties
//
static JSPropertySpec HTMLAppletElementProperties[] =
{
{"align", HTMLAPPLETELEMENT_ALIGN, JSPROP_ENUMERATE},
{"alt", HTMLAPPLETELEMENT_ALT, JSPROP_ENUMERATE},
{"archive", HTMLAPPLETELEMENT_ARCHIVE, JSPROP_ENUMERATE},
{"code", HTMLAPPLETELEMENT_CODE, JSPROP_ENUMERATE},
{"codeBase", HTMLAPPLETELEMENT_CODEBASE, JSPROP_ENUMERATE},
{"height", HTMLAPPLETELEMENT_HEIGHT, JSPROP_ENUMERATE},
{"hspace", HTMLAPPLETELEMENT_HSPACE, JSPROP_ENUMERATE},
{"name", HTMLAPPLETELEMENT_NAME, JSPROP_ENUMERATE},
{"object", HTMLAPPLETELEMENT_OBJECT, JSPROP_ENUMERATE},
{"vspace", HTMLAPPLETELEMENT_VSPACE, JSPROP_ENUMERATE},
{"width", HTMLAPPLETELEMENT_WIDTH, JSPROP_ENUMERATE},
{0}
};
//
// HTMLAppletElement class methods
//

Просмотреть файл

@ -467,56 +467,6 @@ SetHTMLAreaElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// HTMLAreaElement finalizer
//
PR_STATIC_CALLBACK(void)
FinalizeHTMLAreaElement(JSContext *cx, JSObject *obj)
{
nsJSUtils::nsGenericFinalize(cx, obj);
}
//
// HTMLAreaElement enumerate
//
PR_STATIC_CALLBACK(JSBool)
EnumerateHTMLAreaElement(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
}
//
// HTMLAreaElement resolve
//
PR_STATIC_CALLBACK(JSBool)
ResolveHTMLAreaElement(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
}
/***********************************************************************/
//
// class for HTMLAreaElement
//
JSClass HTMLAreaElementClass = {
"HTMLAreaElement",
JSCLASS_HAS_PRIVATE | JSCLASS_PRIVATE_IS_NSISUPPORTS,
JS_PropertyStub,
JS_PropertyStub,
GetHTMLAreaElementProperty,
SetHTMLAreaElementProperty,
EnumerateHTMLAreaElement,
ResolveHTMLAreaElement,
JS_ConvertStub,
FinalizeHTMLAreaElement,
nsnull,
nsJSUtils::nsCheckAccess
};
//
// HTMLAreaElement class properties
//
@ -541,6 +491,56 @@ static JSPropertySpec HTMLAreaElementProperties[] =
};
//
// HTMLAreaElement finalizer
//
PR_STATIC_CALLBACK(void)
FinalizeHTMLAreaElement(JSContext *cx, JSObject *obj)
{
nsJSUtils::nsGenericFinalize(cx, obj);
}
//
// HTMLAreaElement enumerate
//
PR_STATIC_CALLBACK(JSBool)
EnumerateHTMLAreaElement(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
//
// HTMLAreaElement resolve
//
PR_STATIC_CALLBACK(JSBool)
ResolveHTMLAreaElement(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
/***********************************************************************/
//
// class for HTMLAreaElement
//
JSClass HTMLAreaElementClass = {
"HTMLAreaElement",
JSCLASS_HAS_PRIVATE | JSCLASS_PRIVATE_IS_NSISUPPORTS,
JS_PropertyStub,
JS_PropertyStub,
GetHTMLAreaElementProperty,
SetHTMLAreaElementProperty,
EnumerateHTMLAreaElement,
ResolveHTMLAreaElement,
JS_ConvertStub,
FinalizeHTMLAreaElement,
nsnull,
nsJSUtils::nsCheckAccess
};
//
// HTMLAreaElement class methods
//

Просмотреть файл

@ -140,6 +140,16 @@ SetHTMLBRElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// HTMLBRElement class properties
//
static JSPropertySpec HTMLBRElementProperties[] =
{
{"clear", HTMLBRELEMENT_CLEAR, JSPROP_ENUMERATE},
{0}
};
//
// HTMLBRElement finalizer
//
@ -156,7 +166,7 @@ FinalizeHTMLBRElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateHTMLBRElement(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -166,7 +176,7 @@ EnumerateHTMLBRElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveHTMLBRElement(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -190,16 +200,6 @@ JSClass HTMLBRElementClass = {
};
//
// HTMLBRElement class properties
//
static JSPropertySpec HTMLBRElementProperties[] =
{
{"clear", HTMLBRELEMENT_CLEAR, JSPROP_ENUMERATE},
{0}
};
//
// HTMLBRElement class methods
//

Просмотреть файл

@ -165,6 +165,17 @@ SetHTMLBaseElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// HTMLBaseElement class properties
//
static JSPropertySpec HTMLBaseElementProperties[] =
{
{"href", HTMLBASEELEMENT_HREF, JSPROP_ENUMERATE},
{"target", HTMLBASEELEMENT_TARGET, JSPROP_ENUMERATE},
{0}
};
//
// HTMLBaseElement finalizer
//
@ -181,7 +192,7 @@ FinalizeHTMLBaseElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateHTMLBaseElement(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -191,7 +202,7 @@ EnumerateHTMLBaseElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveHTMLBaseElement(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -215,17 +226,6 @@ JSClass HTMLBaseElementClass = {
};
//
// HTMLBaseElement class properties
//
static JSPropertySpec HTMLBaseElementProperties[] =
{
{"href", HTMLBASEELEMENT_HREF, JSPROP_ENUMERATE},
{"target", HTMLBASEELEMENT_TARGET, JSPROP_ENUMERATE},
{0}
};
//
// HTMLBaseElement class methods
//

Просмотреть файл

@ -190,6 +190,18 @@ SetHTMLBaseFontElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp
}
//
// HTMLBaseFontElement class properties
//
static JSPropertySpec HTMLBaseFontElementProperties[] =
{
{"color", HTMLBASEFONTELEMENT_COLOR, JSPROP_ENUMERATE},
{"face", HTMLBASEFONTELEMENT_FACE, JSPROP_ENUMERATE},
{"size", HTMLBASEFONTELEMENT_SIZE, JSPROP_ENUMERATE},
{0}
};
//
// HTMLBaseFontElement finalizer
//
@ -206,7 +218,7 @@ FinalizeHTMLBaseFontElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateHTMLBaseFontElement(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -216,7 +228,7 @@ EnumerateHTMLBaseFontElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveHTMLBaseFontElement(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -240,18 +252,6 @@ JSClass HTMLBaseFontElementClass = {
};
//
// HTMLBaseFontElement class properties
//
static JSPropertySpec HTMLBaseFontElementProperties[] =
{
{"color", HTMLBASEFONTELEMENT_COLOR, JSPROP_ENUMERATE},
{"face", HTMLBASEFONTELEMENT_FACE, JSPROP_ENUMERATE},
{"size", HTMLBASEFONTELEMENT_SIZE, JSPROP_ENUMERATE},
{0}
};
//
// HTMLBaseFontElement class methods
//

Просмотреть файл

@ -265,6 +265,21 @@ SetHTMLBodyElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// HTMLBodyElement class properties
//
static JSPropertySpec HTMLBodyElementProperties[] =
{
{"aLink", HTMLBODYELEMENT_ALINK, JSPROP_ENUMERATE},
{"background", HTMLBODYELEMENT_BACKGROUND, JSPROP_ENUMERATE},
{"bgColor", HTMLBODYELEMENT_BGCOLOR, JSPROP_ENUMERATE},
{"link", HTMLBODYELEMENT_LINK, JSPROP_ENUMERATE},
{"text", HTMLBODYELEMENT_TEXT, JSPROP_ENUMERATE},
{"vLink", HTMLBODYELEMENT_VLINK, JSPROP_ENUMERATE},
{0}
};
//
// HTMLBodyElement finalizer
//
@ -281,7 +296,7 @@ FinalizeHTMLBodyElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateHTMLBodyElement(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -291,7 +306,7 @@ EnumerateHTMLBodyElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveHTMLBodyElement(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -315,21 +330,6 @@ JSClass HTMLBodyElementClass = {
};
//
// HTMLBodyElement class properties
//
static JSPropertySpec HTMLBodyElementProperties[] =
{
{"aLink", HTMLBODYELEMENT_ALINK, JSPROP_ENUMERATE},
{"background", HTMLBODYELEMENT_BACKGROUND, JSPROP_ENUMERATE},
{"bgColor", HTMLBODYELEMENT_BGCOLOR, JSPROP_ENUMERATE},
{"link", HTMLBODYELEMENT_LINK, JSPROP_ENUMERATE},
{"text", HTMLBODYELEMENT_TEXT, JSPROP_ENUMERATE},
{"vLink", HTMLBODYELEMENT_VLINK, JSPROP_ENUMERATE},
{0}
};
//
// HTMLBodyElement class methods
//

Просмотреть файл

@ -281,6 +281,22 @@ SetHTMLButtonElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// HTMLButtonElement class properties
//
static JSPropertySpec HTMLButtonElementProperties[] =
{
{"form", HTMLBUTTONELEMENT_FORM, JSPROP_ENUMERATE | JSPROP_READONLY},
{"accessKey", HTMLBUTTONELEMENT_ACCESSKEY, JSPROP_ENUMERATE},
{"disabled", HTMLBUTTONELEMENT_DISABLED, JSPROP_ENUMERATE},
{"name", HTMLBUTTONELEMENT_NAME, JSPROP_ENUMERATE},
{"tabIndex", HTMLBUTTONELEMENT_TABINDEX, JSPROP_ENUMERATE},
{"type", HTMLBUTTONELEMENT_TYPE, JSPROP_ENUMERATE | JSPROP_READONLY},
{"value", HTMLBUTTONELEMENT_VALUE, JSPROP_ENUMERATE},
{0}
};
//
// HTMLButtonElement finalizer
//
@ -297,7 +313,7 @@ FinalizeHTMLButtonElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateHTMLButtonElement(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -307,7 +323,7 @@ EnumerateHTMLButtonElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveHTMLButtonElement(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -411,22 +427,6 @@ JSClass HTMLButtonElementClass = {
};
//
// HTMLButtonElement class properties
//
static JSPropertySpec HTMLButtonElementProperties[] =
{
{"form", HTMLBUTTONELEMENT_FORM, JSPROP_ENUMERATE | JSPROP_READONLY},
{"accessKey", HTMLBUTTONELEMENT_ACCESSKEY, JSPROP_ENUMERATE},
{"disabled", HTMLBUTTONELEMENT_DISABLED, JSPROP_ENUMERATE},
{"name", HTMLBUTTONELEMENT_NAME, JSPROP_ENUMERATE},
{"tabIndex", HTMLBUTTONELEMENT_TABINDEX, JSPROP_ENUMERATE},
{"type", HTMLBUTTONELEMENT_TYPE, JSPROP_ENUMERATE | JSPROP_READONLY},
{"value", HTMLBUTTONELEMENT_VALUE, JSPROP_ENUMERATE},
{0}
};
//
// HTMLButtonElement class methods
//

Просмотреть файл

@ -173,6 +173,16 @@ SetHTMLCollectionProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// HTMLCollection class properties
//
static JSPropertySpec HTMLCollectionProperties[] =
{
{"length", HTMLCOLLECTION_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// HTMLCollection finalizer
//
@ -189,7 +199,7 @@ FinalizeHTMLCollection(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateHTMLCollection(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -199,7 +209,7 @@ EnumerateHTMLCollection(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveHTMLCollection(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -309,16 +319,6 @@ JSClass HTMLCollectionClass = {
};
//
// HTMLCollection class properties
//
static JSPropertySpec HTMLCollectionProperties[] =
{
{"length", HTMLCOLLECTION_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// HTMLCollection class methods
//

Просмотреть файл

@ -143,6 +143,16 @@ SetHTMLDListElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// HTMLDListElement class properties
//
static JSPropertySpec HTMLDListElementProperties[] =
{
{"compact", HTMLDLISTELEMENT_COMPACT, JSPROP_ENUMERATE},
{0}
};
//
// HTMLDListElement finalizer
//
@ -159,7 +169,7 @@ FinalizeHTMLDListElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateHTMLDListElement(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -169,7 +179,7 @@ EnumerateHTMLDListElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveHTMLDListElement(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -193,16 +203,6 @@ JSClass HTMLDListElementClass = {
};
//
// HTMLDListElement class properties
//
static JSPropertySpec HTMLDListElementProperties[] =
{
{"compact", HTMLDLISTELEMENT_COMPACT, JSPROP_ENUMERATE},
{0}
};
//
// HTMLDListElement class methods
//

Просмотреть файл

@ -143,6 +143,16 @@ SetHTMLDirectoryElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *v
}
//
// HTMLDirectoryElement class properties
//
static JSPropertySpec HTMLDirectoryElementProperties[] =
{
{"compact", HTMLDIRECTORYELEMENT_COMPACT, JSPROP_ENUMERATE},
{0}
};
//
// HTMLDirectoryElement finalizer
//
@ -159,7 +169,7 @@ FinalizeHTMLDirectoryElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateHTMLDirectoryElement(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -169,7 +179,7 @@ EnumerateHTMLDirectoryElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveHTMLDirectoryElement(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -193,16 +203,6 @@ JSClass HTMLDirectoryElementClass = {
};
//
// HTMLDirectoryElement class properties
//
static JSPropertySpec HTMLDirectoryElementProperties[] =
{
{"compact", HTMLDIRECTORYELEMENT_COMPACT, JSPROP_ENUMERATE},
{0}
};
//
// HTMLDirectoryElement class methods
//

Просмотреть файл

@ -140,6 +140,16 @@ SetHTMLDivElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// HTMLDivElement class properties
//
static JSPropertySpec HTMLDivElementProperties[] =
{
{"align", HTMLDIVELEMENT_ALIGN, JSPROP_ENUMERATE},
{0}
};
//
// HTMLDivElement finalizer
//
@ -156,7 +166,7 @@ FinalizeHTMLDivElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateHTMLDivElement(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -166,7 +176,7 @@ EnumerateHTMLDivElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveHTMLDivElement(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -190,16 +200,6 @@ JSClass HTMLDivElementClass = {
};
//
// HTMLDivElement class properties
//
static JSPropertySpec HTMLDivElementProperties[] =
{
{"align", HTMLDIVELEMENT_ALIGN, JSPROP_ENUMERATE},
{0}
};
//
// HTMLDivElement class methods
//

Просмотреть файл

@ -627,6 +627,35 @@ SetHTMLDocumentProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// HTMLDocument class properties
//
static JSPropertySpec HTMLDocumentProperties[] =
{
{"title", HTMLDOCUMENT_TITLE, JSPROP_ENUMERATE},
{"referrer", HTMLDOCUMENT_REFERRER, JSPROP_ENUMERATE | JSPROP_READONLY},
{"domain", HTMLDOCUMENT_DOMAIN, JSPROP_ENUMERATE},
{"URL", HTMLDOCUMENT_URL, JSPROP_ENUMERATE | JSPROP_READONLY},
{"body", HTMLDOCUMENT_BODY, JSPROP_ENUMERATE},
{"images", HTMLDOCUMENT_IMAGES, JSPROP_ENUMERATE | JSPROP_READONLY},
{"applets", HTMLDOCUMENT_APPLETS, JSPROP_ENUMERATE | JSPROP_READONLY},
{"links", HTMLDOCUMENT_LINKS, JSPROP_ENUMERATE | JSPROP_READONLY},
{"forms", HTMLDOCUMENT_FORMS, JSPROP_ENUMERATE | JSPROP_READONLY},
{"anchors", HTMLDOCUMENT_ANCHORS, JSPROP_ENUMERATE | JSPROP_READONLY},
{"cookie", HTMLDOCUMENT_COOKIE, JSPROP_ENUMERATE},
{"width", NSHTMLDOCUMENT_WIDTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{"height", NSHTMLDOCUMENT_HEIGHT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"alinkColor", NSHTMLDOCUMENT_ALINKCOLOR, JSPROP_ENUMERATE},
{"linkColor", NSHTMLDOCUMENT_LINKCOLOR, JSPROP_ENUMERATE},
{"vlinkColor", NSHTMLDOCUMENT_VLINKCOLOR, JSPROP_ENUMERATE},
{"bgColor", NSHTMLDOCUMENT_BGCOLOR, JSPROP_ENUMERATE},
{"fgColor", NSHTMLDOCUMENT_FGCOLOR, JSPROP_ENUMERATE},
{"lastModified", NSHTMLDOCUMENT_LASTMODIFIED, JSPROP_ENUMERATE | JSPROP_READONLY},
{"embeds", NSHTMLDOCUMENT_EMBEDS, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// HTMLDocument finalizer
//
@ -643,7 +672,7 @@ FinalizeHTMLDocument(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateHTMLDocument(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -653,7 +682,7 @@ EnumerateHTMLDocument(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveHTMLDocument(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -1144,35 +1173,6 @@ JSClass HTMLDocumentClass = {
};
//
// HTMLDocument class properties
//
static JSPropertySpec HTMLDocumentProperties[] =
{
{"title", HTMLDOCUMENT_TITLE, JSPROP_ENUMERATE},
{"referrer", HTMLDOCUMENT_REFERRER, JSPROP_ENUMERATE | JSPROP_READONLY},
{"domain", HTMLDOCUMENT_DOMAIN, JSPROP_ENUMERATE},
{"URL", HTMLDOCUMENT_URL, JSPROP_ENUMERATE | JSPROP_READONLY},
{"body", HTMLDOCUMENT_BODY, JSPROP_ENUMERATE},
{"images", HTMLDOCUMENT_IMAGES, JSPROP_ENUMERATE | JSPROP_READONLY},
{"applets", HTMLDOCUMENT_APPLETS, JSPROP_ENUMERATE | JSPROP_READONLY},
{"links", HTMLDOCUMENT_LINKS, JSPROP_ENUMERATE | JSPROP_READONLY},
{"forms", HTMLDOCUMENT_FORMS, JSPROP_ENUMERATE | JSPROP_READONLY},
{"anchors", HTMLDOCUMENT_ANCHORS, JSPROP_ENUMERATE | JSPROP_READONLY},
{"cookie", HTMLDOCUMENT_COOKIE, JSPROP_ENUMERATE},
{"width", NSHTMLDOCUMENT_WIDTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{"height", NSHTMLDOCUMENT_HEIGHT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"alinkColor", NSHTMLDOCUMENT_ALINKCOLOR, JSPROP_ENUMERATE},
{"linkColor", NSHTMLDOCUMENT_LINKCOLOR, JSPROP_ENUMERATE},
{"vlinkColor", NSHTMLDOCUMENT_VLINKCOLOR, JSPROP_ENUMERATE},
{"bgColor", NSHTMLDOCUMENT_BGCOLOR, JSPROP_ENUMERATE},
{"fgColor", NSHTMLDOCUMENT_FGCOLOR, JSPROP_ENUMERATE},
{"lastModified", NSHTMLDOCUMENT_LASTMODIFIED, JSPROP_ENUMERATE | JSPROP_READONLY},
{"embeds", NSHTMLDOCUMENT_EMBEDS, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// HTMLDocument class methods
//

Просмотреть файл

@ -349,6 +349,27 @@ SetHTMLElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// HTMLElement class properties
//
static JSPropertySpec HTMLElementProperties[] =
{
{"id", HTMLELEMENT_ID, JSPROP_ENUMERATE},
{"title", HTMLELEMENT_TITLE, JSPROP_ENUMERATE},
{"lang", HTMLELEMENT_LANG, JSPROP_ENUMERATE},
{"dir", HTMLELEMENT_DIR, JSPROP_ENUMERATE},
{"className", HTMLELEMENT_CLASSNAME, JSPROP_ENUMERATE},
{"style", HTMLELEMENT_STYLE, JSPROP_ENUMERATE | JSPROP_READONLY},
{"offsetTop", HTMLELEMENT_OFFSETTOP, JSPROP_ENUMERATE | JSPROP_READONLY},
{"offsetLeft", HTMLELEMENT_OFFSETLEFT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"offsetWidth", HTMLELEMENT_OFFSETWIDTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{"offsetHeight", HTMLELEMENT_OFFSETHEIGHT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"offsetParent", HTMLELEMENT_OFFSETPARENT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"innerHTML", HTMLELEMENT_INNERHTML, JSPROP_ENUMERATE},
{0}
};
//
// HTMLElement finalizer
//
@ -365,7 +386,7 @@ FinalizeHTMLElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateHTMLElement(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -375,7 +396,7 @@ EnumerateHTMLElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveHTMLElement(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -399,27 +420,6 @@ JSClass HTMLElementClass = {
};
//
// HTMLElement class properties
//
static JSPropertySpec HTMLElementProperties[] =
{
{"id", HTMLELEMENT_ID, JSPROP_ENUMERATE},
{"title", HTMLELEMENT_TITLE, JSPROP_ENUMERATE},
{"lang", HTMLELEMENT_LANG, JSPROP_ENUMERATE},
{"dir", HTMLELEMENT_DIR, JSPROP_ENUMERATE},
{"className", HTMLELEMENT_CLASSNAME, JSPROP_ENUMERATE},
{"style", HTMLELEMENT_STYLE, JSPROP_ENUMERATE | JSPROP_READONLY},
{"offsetTop", HTMLELEMENT_OFFSETTOP, JSPROP_ENUMERATE | JSPROP_READONLY},
{"offsetLeft", HTMLELEMENT_OFFSETLEFT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"offsetWidth", HTMLELEMENT_OFFSETWIDTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{"offsetHeight", HTMLELEMENT_OFFSETHEIGHT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"offsetParent", HTMLELEMENT_OFFSETPARENT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"innerHTML", HTMLELEMENT_INNERHTML, JSPROP_ENUMERATE},
{0}
};
//
// HTMLElement class methods
//

Просмотреть файл

@ -271,6 +271,21 @@ SetHTMLEmbedElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// HTMLEmbedElement class properties
//
static JSPropertySpec HTMLEmbedElementProperties[] =
{
{"align", HTMLEMBEDELEMENT_ALIGN, JSPROP_ENUMERATE},
{"height", HTMLEMBEDELEMENT_HEIGHT, JSPROP_ENUMERATE},
{"name", HTMLEMBEDELEMENT_NAME, JSPROP_ENUMERATE},
{"src", HTMLEMBEDELEMENT_SRC, JSPROP_ENUMERATE},
{"type", HTMLEMBEDELEMENT_TYPE, JSPROP_ENUMERATE},
{"width", HTMLEMBEDELEMENT_WIDTH, JSPROP_ENUMERATE},
{0}
};
//
// HTMLEmbedElement finalizer
//
@ -287,7 +302,7 @@ FinalizeHTMLEmbedElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateHTMLEmbedElement(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -297,7 +312,7 @@ EnumerateHTMLEmbedElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveHTMLEmbedElement(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -321,21 +336,6 @@ JSClass HTMLEmbedElementClass = {
};
//
// HTMLEmbedElement class properties
//
static JSPropertySpec HTMLEmbedElementProperties[] =
{
{"align", HTMLEMBEDELEMENT_ALIGN, JSPROP_ENUMERATE},
{"height", HTMLEMBEDELEMENT_HEIGHT, JSPROP_ENUMERATE},
{"name", HTMLEMBEDELEMENT_NAME, JSPROP_ENUMERATE},
{"src", HTMLEMBEDELEMENT_SRC, JSPROP_ENUMERATE},
{"type", HTMLEMBEDELEMENT_TYPE, JSPROP_ENUMERATE},
{"width", HTMLEMBEDELEMENT_WIDTH, JSPROP_ENUMERATE},
{0}
};
//
// HTMLEmbedElement class methods
//

Просмотреть файл

@ -132,6 +132,16 @@ SetHTMLFieldSetElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp
}
//
// HTMLFieldSetElement class properties
//
static JSPropertySpec HTMLFieldSetElementProperties[] =
{
{"form", HTMLFIELDSETELEMENT_FORM, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// HTMLFieldSetElement finalizer
//
@ -148,7 +158,7 @@ FinalizeHTMLFieldSetElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateHTMLFieldSetElement(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -158,7 +168,7 @@ EnumerateHTMLFieldSetElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveHTMLFieldSetElement(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -182,16 +192,6 @@ JSClass HTMLFieldSetElementClass = {
};
//
// HTMLFieldSetElement class properties
//
static JSPropertySpec HTMLFieldSetElementProperties[] =
{
{"form", HTMLFIELDSETELEMENT_FORM, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// HTMLFieldSetElement class methods
//

Просмотреть файл

@ -190,6 +190,18 @@ SetHTMLFontElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// HTMLFontElement class properties
//
static JSPropertySpec HTMLFontElementProperties[] =
{
{"color", HTMLFONTELEMENT_COLOR, JSPROP_ENUMERATE},
{"face", HTMLFONTELEMENT_FACE, JSPROP_ENUMERATE},
{"size", HTMLFONTELEMENT_SIZE, JSPROP_ENUMERATE},
{0}
};
//
// HTMLFontElement finalizer
//
@ -206,7 +218,7 @@ FinalizeHTMLFontElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateHTMLFontElement(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -216,7 +228,7 @@ EnumerateHTMLFontElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveHTMLFontElement(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -240,18 +252,6 @@ JSClass HTMLFontElementClass = {
};
//
// HTMLFontElement class properties
//
static JSPropertySpec HTMLFontElementProperties[] =
{
{"color", HTMLFONTELEMENT_COLOR, JSPROP_ENUMERATE},
{"face", HTMLFONTELEMENT_FACE, JSPROP_ENUMERATE},
{"size", HTMLFONTELEMENT_SIZE, JSPROP_ENUMERATE},
{0}
};
//
// HTMLFontElement class methods
//

Просмотреть файл

@ -122,6 +122,15 @@ SetHTMLFormControlListProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp
}
//
// HTMLFormControlList class properties
//
static JSPropertySpec HTMLFormControlListProperties[] =
{
{0}
};
//
// HTMLFormControlList finalizer
//
@ -138,7 +147,7 @@ FinalizeHTMLFormControlList(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateHTMLFormControlList(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -148,7 +157,7 @@ EnumerateHTMLFormControlList(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveHTMLFormControlList(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -244,15 +253,6 @@ JSClass HTMLFormControlListClass = {
};
//
// HTMLFormControlList class properties
//
static JSPropertySpec HTMLFormControlListProperties[] =
{
{0}
};
//
// HTMLFormControlList class methods
//

Просмотреть файл

@ -352,6 +352,24 @@ SetHTMLFormElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// HTMLFormElement class properties
//
static JSPropertySpec HTMLFormElementProperties[] =
{
{"elements", HTMLFORMELEMENT_ELEMENTS, JSPROP_ENUMERATE | JSPROP_READONLY},
{"length", HTMLFORMELEMENT_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{"name", HTMLFORMELEMENT_NAME, JSPROP_ENUMERATE},
{"acceptCharset", HTMLFORMELEMENT_ACCEPTCHARSET, JSPROP_ENUMERATE},
{"action", HTMLFORMELEMENT_ACTION, JSPROP_ENUMERATE},
{"enctype", HTMLFORMELEMENT_ENCTYPE, JSPROP_ENUMERATE},
{"method", HTMLFORMELEMENT_METHOD, JSPROP_ENUMERATE},
{"target", HTMLFORMELEMENT_TARGET, JSPROP_ENUMERATE},
{"encoding", NSHTMLFORMELEMENT_ENCODING, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// HTMLFormElement finalizer
//
@ -368,7 +386,7 @@ FinalizeHTMLFormElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateHTMLFormElement(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -378,7 +396,7 @@ EnumerateHTMLFormElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveHTMLFormElement(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -562,24 +580,6 @@ JSClass HTMLFormElementClass = {
};
//
// HTMLFormElement class properties
//
static JSPropertySpec HTMLFormElementProperties[] =
{
{"elements", HTMLFORMELEMENT_ELEMENTS, JSPROP_ENUMERATE | JSPROP_READONLY},
{"length", HTMLFORMELEMENT_LENGTH, JSPROP_ENUMERATE | JSPROP_READONLY},
{"name", HTMLFORMELEMENT_NAME, JSPROP_ENUMERATE},
{"acceptCharset", HTMLFORMELEMENT_ACCEPTCHARSET, JSPROP_ENUMERATE},
{"action", HTMLFORMELEMENT_ACTION, JSPROP_ENUMERATE},
{"enctype", HTMLFORMELEMENT_ENCTYPE, JSPROP_ENUMERATE},
{"method", HTMLFORMELEMENT_METHOD, JSPROP_ENUMERATE},
{"target", HTMLFORMELEMENT_TARGET, JSPROP_ENUMERATE},
{"encoding", NSHTMLFORMELEMENT_ENCODING, JSPROP_ENUMERATE | JSPROP_READONLY},
{0}
};
//
// HTMLFormElement class methods
//

Просмотреть файл

@ -351,6 +351,24 @@ SetHTMLFrameElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// HTMLFrameElement class properties
//
static JSPropertySpec HTMLFrameElementProperties[] =
{
{"frameBorder", HTMLFRAMEELEMENT_FRAMEBORDER, JSPROP_ENUMERATE},
{"longDesc", HTMLFRAMEELEMENT_LONGDESC, JSPROP_ENUMERATE},
{"marginHeight", HTMLFRAMEELEMENT_MARGINHEIGHT, JSPROP_ENUMERATE},
{"marginWidth", HTMLFRAMEELEMENT_MARGINWIDTH, JSPROP_ENUMERATE},
{"name", HTMLFRAMEELEMENT_NAME, JSPROP_ENUMERATE},
{"noResize", HTMLFRAMEELEMENT_NORESIZE, JSPROP_ENUMERATE},
{"scrolling", HTMLFRAMEELEMENT_SCROLLING, JSPROP_ENUMERATE},
{"src", HTMLFRAMEELEMENT_SRC, JSPROP_ENUMERATE},
{"contentDocument", HTMLFRAMEELEMENT_CONTENTDOCUMENT, JSPROP_ENUMERATE},
{0}
};
//
// HTMLFrameElement finalizer
//
@ -367,7 +385,7 @@ FinalizeHTMLFrameElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateHTMLFrameElement(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -377,7 +395,7 @@ EnumerateHTMLFrameElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveHTMLFrameElement(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -401,24 +419,6 @@ JSClass HTMLFrameElementClass = {
};
//
// HTMLFrameElement class properties
//
static JSPropertySpec HTMLFrameElementProperties[] =
{
{"frameBorder", HTMLFRAMEELEMENT_FRAMEBORDER, JSPROP_ENUMERATE},
{"longDesc", HTMLFRAMEELEMENT_LONGDESC, JSPROP_ENUMERATE},
{"marginHeight", HTMLFRAMEELEMENT_MARGINHEIGHT, JSPROP_ENUMERATE},
{"marginWidth", HTMLFRAMEELEMENT_MARGINWIDTH, JSPROP_ENUMERATE},
{"name", HTMLFRAMEELEMENT_NAME, JSPROP_ENUMERATE},
{"noResize", HTMLFRAMEELEMENT_NORESIZE, JSPROP_ENUMERATE},
{"scrolling", HTMLFRAMEELEMENT_SCROLLING, JSPROP_ENUMERATE},
{"src", HTMLFRAMEELEMENT_SRC, JSPROP_ENUMERATE},
{"contentDocument", HTMLFRAMEELEMENT_CONTENTDOCUMENT, JSPROP_ENUMERATE},
{0}
};
//
// HTMLFrameElement class methods
//

Просмотреть файл

@ -165,6 +165,17 @@ SetHTMLFrameSetElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp
}
//
// HTMLFrameSetElement class properties
//
static JSPropertySpec HTMLFrameSetElementProperties[] =
{
{"cols", HTMLFRAMESETELEMENT_COLS, JSPROP_ENUMERATE},
{"rows", HTMLFRAMESETELEMENT_ROWS, JSPROP_ENUMERATE},
{0}
};
//
// HTMLFrameSetElement finalizer
//
@ -181,7 +192,7 @@ FinalizeHTMLFrameSetElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateHTMLFrameSetElement(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -191,7 +202,7 @@ EnumerateHTMLFrameSetElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveHTMLFrameSetElement(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -215,17 +226,6 @@ JSClass HTMLFrameSetElementClass = {
};
//
// HTMLFrameSetElement class properties
//
static JSPropertySpec HTMLFrameSetElementProperties[] =
{
{"cols", HTMLFRAMESETELEMENT_COLS, JSPROP_ENUMERATE},
{"rows", HTMLFRAMESETELEMENT_ROWS, JSPROP_ENUMERATE},
{0}
};
//
// HTMLFrameSetElement class methods
//

Просмотреть файл

@ -218,6 +218,19 @@ SetHTMLHRElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// HTMLHRElement class properties
//
static JSPropertySpec HTMLHRElementProperties[] =
{
{"align", HTMLHRELEMENT_ALIGN, JSPROP_ENUMERATE},
{"noShade", HTMLHRELEMENT_NOSHADE, JSPROP_ENUMERATE},
{"size", HTMLHRELEMENT_SIZE, JSPROP_ENUMERATE},
{"width", HTMLHRELEMENT_WIDTH, JSPROP_ENUMERATE},
{0}
};
//
// HTMLHRElement finalizer
//
@ -234,7 +247,7 @@ FinalizeHTMLHRElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateHTMLHRElement(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -244,7 +257,7 @@ EnumerateHTMLHRElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveHTMLHRElement(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -268,19 +281,6 @@ JSClass HTMLHRElementClass = {
};
//
// HTMLHRElement class properties
//
static JSPropertySpec HTMLHRElementProperties[] =
{
{"align", HTMLHRELEMENT_ALIGN, JSPROP_ENUMERATE},
{"noShade", HTMLHRELEMENT_NOSHADE, JSPROP_ENUMERATE},
{"size", HTMLHRELEMENT_SIZE, JSPROP_ENUMERATE},
{"width", HTMLHRELEMENT_WIDTH, JSPROP_ENUMERATE},
{0}
};
//
// HTMLHRElement class methods
//

Просмотреть файл

@ -140,6 +140,16 @@ SetHTMLHeadElementProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
}
//
// HTMLHeadElement class properties
//
static JSPropertySpec HTMLHeadElementProperties[] =
{
{"profile", HTMLHEADELEMENT_PROFILE, JSPROP_ENUMERATE},
{0}
};
//
// HTMLHeadElement finalizer
//
@ -156,7 +166,7 @@ FinalizeHTMLHeadElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
EnumerateHTMLHeadElement(JSContext *cx, JSObject *obj)
{
return nsJSUtils::nsGenericEnumerate(cx, obj);
return nsJSUtils::nsGenericEnumerate(cx, obj, nsnull);
}
@ -166,7 +176,7 @@ EnumerateHTMLHeadElement(JSContext *cx, JSObject *obj)
PR_STATIC_CALLBACK(JSBool)
ResolveHTMLHeadElement(JSContext *cx, JSObject *obj, jsval id)
{
return nsJSUtils::nsGenericResolve(cx, obj, id);
return nsJSUtils::nsGenericResolve(cx, obj, id, nsnull);
}
@ -190,16 +200,6 @@ JSClass HTMLHeadElementClass = {
};
//
// HTMLHeadElement class properties
//
static JSPropertySpec HTMLHeadElementProperties[] =
{
{"profile", HTMLHEADELEMENT_PROFILE, JSPROP_ENUMERATE},
{0}
};
//
// HTMLHeadElement class methods
//

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше