changing name of window.content to _content. bug 33650. r=hyatt@netscape.com

This commit is contained in:
danm%netscape.com 2000-06-22 00:42:34 +00:00
parent b752b18c25
commit 7491482e25
6 changed files with 20 additions and 20 deletions

View File

@ -67,7 +67,7 @@ public:
NS_IMETHOD GetTop(nsIDOMWindow** aTop)=0;
NS_IMETHOD GetContent(nsIDOMWindow** aContent)=0;
NS_IMETHOD Get_content(nsIDOMWindow** a_content)=0;
NS_IMETHOD GetSidebar(nsISidebar** aSidebar)=0;
@ -222,7 +222,7 @@ public:
NS_IMETHOD GetHistory(nsIDOMHistory** aHistory); \
NS_IMETHOD GetParent(nsIDOMWindow** aParent); \
NS_IMETHOD GetTop(nsIDOMWindow** aTop); \
NS_IMETHOD GetContent(nsIDOMWindow** aContent); \
NS_IMETHOD Get_content(nsIDOMWindow** a_content); \
NS_IMETHOD GetSidebar(nsISidebar** aSidebar); \
NS_IMETHOD GetMenubar(nsIDOMBarProp** aMenubar); \
NS_IMETHOD GetToolbar(nsIDOMBarProp** aToolbar); \
@ -312,7 +312,7 @@ public:
NS_IMETHOD GetHistory(nsIDOMHistory** aHistory) { return _to GetHistory(aHistory); } \
NS_IMETHOD GetParent(nsIDOMWindow** aParent) { return _to GetParent(aParent); } \
NS_IMETHOD GetTop(nsIDOMWindow** aTop) { return _to GetTop(aTop); } \
NS_IMETHOD GetContent(nsIDOMWindow** aContent) { return _to GetContent(aContent); } \
NS_IMETHOD Get_content(nsIDOMWindow** a_content) { return _to Get_content(a_content); } \
NS_IMETHOD GetSidebar(nsISidebar** aSidebar) { return _to GetSidebar(aSidebar); } \
NS_IMETHOD GetMenubar(nsIDOMBarProp** aMenubar) { return _to GetMenubar(aMenubar); } \
NS_IMETHOD GetToolbar(nsIDOMBarProp** aToolbar) { return _to GetToolbar(aToolbar); } \

View File

@ -10,7 +10,7 @@ interface Window {
readonly attribute History history;
readonly attribute Window parent;
readonly attribute Window top;
readonly replaceable attribute Window content;
readonly replaceable attribute Window _content;
readonly replaceable attribute xpidl nsISidebar sidebar;
readonly attribute BarProp menubar;
readonly attribute BarProp toolbar;
@ -21,9 +21,9 @@ interface Window {
readonly attribute BarProp directories;
readonly attribute boolean closed;
readonly attribute WindowCollection frames;
readonly attribute Crypto crypto;
readonly attribute Pkcs11 pkcs11;
readonly replaceable attribute xpidl nsIControllers controllers;
readonly attribute Crypto crypto;
readonly attribute Pkcs11 pkcs11;
readonly replaceable attribute xpidl nsIControllers controllers;
attribute Window opener;
attribute wstring status;
attribute wstring defaultStatus;

View File

@ -928,6 +928,7 @@ enum nsDOMProp {
NS_DOM_PROP_UIEVENT_INITUIEVENT,
NS_DOM_PROP_UIEVENT_VIEW,
NS_DOM_PROP_VIEWCSS_GETCOMPUTEDSTYLE,
NS_DOM_PROP_WINDOW__CONTENT,
NS_DOM_PROP_WINDOW_ALERT,
NS_DOM_PROP_WINDOW_BACK,
NS_DOM_PROP_WINDOW_BLUR,
@ -937,7 +938,6 @@ enum nsDOMProp {
NS_DOM_PROP_WINDOW_CLOSE,
NS_DOM_PROP_WINDOW_CLOSED,
NS_DOM_PROP_WINDOW_CONFIRM,
NS_DOM_PROP_WINDOW_CONTENT,
NS_DOM_PROP_WINDOW_CONTROLLERS,
NS_DOM_PROP_WINDOW_CRYPTO,
NS_DOM_PROP_WINDOW_DEFAULTSTATUS,

View File

@ -926,6 +926,7 @@
"uievent.inituievent", \
"uievent.view", \
"viewcss.getcomputedstyle", \
"window._content", \
"window.alert", \
"window.back", \
"window.blur", \
@ -935,7 +936,6 @@
"window.close", \
"window.closed", \
"window.confirm", \
"window.content", \
"window.controllers", \
"window.crypto", \
"window.defaultstatus", \

View File

@ -578,7 +578,7 @@ NS_IMETHODIMP GlobalWindowImpl::GetTop(nsIDOMWindow** aTop)
return ret;
}
NS_IMETHODIMP GlobalWindowImpl::GetContent(nsIDOMWindow** aContent)
NS_IMETHODIMP GlobalWindowImpl::Get_content(nsIDOMWindow** aContent)
{
*aContent = nsnull;

View File

@ -92,7 +92,7 @@ enum Window_slots {
WINDOW_HISTORY = -6,
WINDOW_PARENT = -7,
WINDOW_TOP = -8,
WINDOW_CONTENT = -9,
WINDOW__CONTENT = -9,
WINDOW_SIDEBAR = -10,
WINDOW_MENUBAR = -11,
WINDOW_TOOLBAR = -12,
@ -831,10 +831,10 @@ SetWindowProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
/***********************************************************************/
//
// content Property Getter
// _content Property Getter
//
PR_STATIC_CALLBACK(JSBool)
WindowcontentGetter(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
Window_contentGetter(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
{
nsIDOMWindow *a = (nsIDOMWindow*)nsJSUtils::nsGetNativeThis(cx, obj);
@ -847,13 +847,13 @@ WindowcontentGetter(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
nsIScriptSecurityManager *secMan = nsJSUtils::nsGetSecurityManager(cx, obj);
if (!secMan)
return PR_FALSE;
rv = secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_WINDOW_CONTENT, PR_FALSE);
rv = secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_WINDOW__CONTENT, PR_FALSE);
if (NS_FAILED(rv)) {
return nsJSUtils::nsReportError(cx, obj, rv);
}
nsIDOMWindow* prop;
rv = a->GetContent(&prop);
rv = a->Get_content(&prop);
if (NS_SUCCEEDED(rv)) {
// get the js object
nsJSUtils::nsConvertObjectToJSVal((nsISupports *)prop, cx, obj, vp);
@ -864,10 +864,10 @@ WindowcontentGetter(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
/***********************************************************************/
//
// content Property Setter
// _content Property Setter
//
PR_STATIC_CALLBACK(JSBool)
WindowcontentSetter(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
Window_contentSetter(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
{
nsIDOMWindow *a = (nsIDOMWindow*)nsJSUtils::nsGetNativeThis(cx, obj);
@ -880,13 +880,13 @@ WindowcontentSetter(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
nsIScriptSecurityManager *secMan = nsJSUtils::nsGetSecurityManager(cx, obj);
if (!secMan)
return PR_FALSE;
rv = secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_WINDOW_CONTENT, PR_TRUE);
rv = secMan->CheckScriptAccess(cx, obj, NS_DOM_PROP_WINDOW__CONTENT, PR_TRUE);
if (NS_FAILED(rv)) {
return nsJSUtils::nsReportError(cx, obj, rv);
}
JS_DefineProperty(cx, obj, "content", *vp, nsnull, nsnull, JSPROP_ENUMERATE);
JS_DefineProperty(cx, obj, "_content", *vp, nsnull, nsnull, JSPROP_ENUMERATE);
return PR_TRUE;
}
@ -2759,7 +2759,7 @@ static JSPropertySpec WindowProperties[] =
{"history", WINDOW_HISTORY, JSPROP_ENUMERATE | JSPROP_READONLY},
{"parent", WINDOW_PARENT, JSPROP_ENUMERATE | JSPROP_READONLY},
{"top", WINDOW_TOP, JSPROP_ENUMERATE | JSPROP_READONLY},
{"content", WINDOW_CONTENT, JSPROP_ENUMERATE, WindowcontentGetter, WindowcontentSetter},
{"_content", WINDOW__CONTENT, JSPROP_ENUMERATE, Window_contentGetter, Window_contentSetter},
{"sidebar", WINDOW_SIDEBAR, JSPROP_ENUMERATE, WindowsidebarGetter, WindowsidebarSetter},
{"menubar", WINDOW_MENUBAR, JSPROP_ENUMERATE | JSPROP_READONLY},
{"toolbar", WINDOW_TOOLBAR, JSPROP_ENUMERATE | JSPROP_READONLY},