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
git-svn-id: svn://10.0.0.236/trunk@79874 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user