adding _content target

git-svn-id: svn://10.0.0.236/trunk@37074 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
danm%netscape.com
1999-06-27 00:35:21 +00:00
parent 04e4b7f745
commit faabf1b7f8
3 changed files with 29 additions and 9 deletions

View File

@@ -2328,8 +2328,17 @@ nsWebShell::GetTarget(const PRUnichar* aName)
else if (name.EqualsIgnoreCase("_top")) {
GetRootWebShell(target); // this addrefs, which is OK
}
else if (name.EqualsIgnoreCase("_content")) {
// a kind of special case: only the window can answer this question
NS_ASSERTION(mContainer, "null container in WebShell::GetTarget");
if (nsnull != mContainer)
mContainer->FindWebShellWithName(aName, target);
// (and don't SetName())
// else target remains nsnull, which would be bad
}
else {
// Look from the top of the tree downward
NS_ASSERTION(mContainer, "null container in WebShell::GetTarget");
if (nsnull != mContainer) {
mContainer->FindWebShellWithName(aName, target);
if (nsnull == target) {