зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
a0137894e2
Коммит
c3f5debc82
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче