added GetIsFrame, SetIsFrame to distinguish <frame> documents

git-svn-id: svn://10.0.0.236/trunk@18032 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
karnaze%netscape.com
1999-01-19 23:14:31 +00:00
parent fdfa2b0b22
commit 506ead5fcd
3 changed files with 50 additions and 4 deletions

View File

@@ -178,6 +178,8 @@ public:
NS_IMETHOD SetMarginHeight(PRInt32 aHeight);
NS_IMETHOD GetScrolling(PRInt32& aScrolling);
NS_IMETHOD SetScrolling(PRInt32 aScrolling);
NS_IMETHOD GetIsFrame(PRBool& aIsFrame);
NS_IMETHOD SetIsFrame(PRBool aIsFrame);
// Document load api's
NS_IMETHOD GetDocumentLoader(nsIDocumentLoader*& aResult);
@@ -329,6 +331,7 @@ protected:
PRInt32 mMarginWidth;
PRInt32 mMarginHeight;
PRInt32 mScrolling;
PRBool mIsFrame;
nsVoidArray mRefreshments;
void ReleaseChildren();
@@ -437,6 +440,7 @@ nsWebShell::nsWebShell()
mScriptGlobal = nsnull;
mScriptContext = nsnull;
InitFrameData();
mIsFrame = PR_FALSE;
}
nsWebShell::~nsWebShell()
@@ -467,6 +471,7 @@ nsWebShell::~nsWebShell()
NS_IF_RELEASE(mScriptContext);
InitFrameData();
mIsFrame = PR_FALSE;
// XXX Because we hold references to the children and they hold references
// to us we never get destroyed. See Destroy() instead...
@@ -1158,6 +1163,22 @@ nsWebShell::SetScrolling(PRInt32 aScrolling)
mScrolling = aScrolling;
return NS_OK;
}
NS_IMETHODIMP
nsWebShell::GetIsFrame(PRBool& aIsFrame)
{
aIsFrame = mIsFrame;
return NS_OK;
}
NS_IMETHODIMP
nsWebShell::SetIsFrame(PRBool aIsFrame)
{
mIsFrame = aIsFrame;
return NS_OK;
}
/**
* Document Load methods
*/
@@ -1213,7 +1234,8 @@ nsWebShell::LoadURL(const PRUnichar *aURLSpec,
// web shell is being recycled
nsIWebShell *rootWebShell;
GetRootWebShell(rootWebShell);
if (this == rootWebShell) {
//if (this == rootWebShell) {
if (!mIsFrame) {
InitFrameData();
}