Fix for bug 4196. Clicking on anchors now targets frames properly. We were being too eager in truncating the target in nsGenericHTMLElement::GetBaseTarget().

This commit is contained in:
nisheeth%netscape.com 1999-06-15 23:58:07 +00:00
Родитель a0137894e2
Коммит c3f5debc82
2 изменённых файлов: 6 добавлений и 4 удалений

Просмотреть файл

@ -1017,11 +1017,11 @@ nsGenericHTMLElement::GetBaseTarget(nsString& aBaseTarget) const
if (NS_CONTENT_ATTR_HAS_VALUE == mAttributes->GetAttribute(nsHTMLAtoms::_baseTarget, value)) {
if (eHTMLUnit_String == value.GetUnit()) {
value.GetStringValue(aBaseTarget);
hasLocal = PR_TRUE;
return NS_OK;
}
}
}
if ((PR_FALSE == hasLocal) && (nsnull != mDocument)) {
if (nsnull != mDocument) {
nsIHTMLDocument* htmlDoc;
result = mDocument->QueryInterface(kIHTMLDocumentIID, (void**)&htmlDoc);
if (NS_SUCCEEDED(result)) {
@ -1032,6 +1032,7 @@ nsGenericHTMLElement::GetBaseTarget(nsString& aBaseTarget) const
else {
aBaseTarget.Truncate();
}
return result;
}

Просмотреть файл

@ -1017,11 +1017,11 @@ nsGenericHTMLElement::GetBaseTarget(nsString& aBaseTarget) const
if (NS_CONTENT_ATTR_HAS_VALUE == mAttributes->GetAttribute(nsHTMLAtoms::_baseTarget, value)) {
if (eHTMLUnit_String == value.GetUnit()) {
value.GetStringValue(aBaseTarget);
hasLocal = PR_TRUE;
return NS_OK;
}
}
}
if ((PR_FALSE == hasLocal) && (nsnull != mDocument)) {
if (nsnull != mDocument) {
nsIHTMLDocument* htmlDoc;
result = mDocument->QueryInterface(kIHTMLDocumentIID, (void**)&htmlDoc);
if (NS_SUCCEEDED(result)) {
@ -1032,6 +1032,7 @@ nsGenericHTMLElement::GetBaseTarget(nsString& aBaseTarget) const
else {
aBaseTarget.Truncate();
}
return result;
}