Bug 375696 - target attribute ignored on links. r=jwatt,sr=tor

This commit is contained in:
longsonr@gmail.com 2007-04-03 01:59:11 -07:00
Родитель d4796e4b04
Коммит 75523bae12
1 изменённых файлов: 12 добавлений и 0 удалений

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

@ -82,6 +82,7 @@ public:
// nsIContent
virtual PRBool IsFocusable(PRInt32 *aTabIndex = nsnull);
virtual PRBool IsLink(nsIURI** aURI) const;
virtual void GetLinkTarget(nsAString& aTarget);
protected:
@ -287,3 +288,14 @@ nsSVGAElement::IsLink(nsIURI** aURI) const
return PR_FALSE;
}
void
nsSVGAElement::GetLinkTarget(nsAString& aTarget)
{
GetAttr(kNameSpaceID_None, nsGkAtoms::target, aTarget);
if (aTarget.IsEmpty()) {
nsIDocument* ownerDoc = GetOwnerDoc();
if (ownerDoc) {
ownerDoc->GetBaseTarget(aTarget);
}
}
}