adding _content target

This commit is contained in:
danm@netscape.com
1999-06-27 00:35:21 +00:00
parent f48ff50f3b
commit 1be1b4c671
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) {