Bug 868789 - Name computation for SVG is wrong, r=tbsaude

This commit is contained in:
Takeshi Kurosawa taken.spc@gmail.com 2013-12-05 11:45:58 -05:00
Родитель 21df6dd5cf
Коммит 870c93f242
2 изменённых файлов: 6 добавлений и 6 удалений

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

@ -231,7 +231,7 @@ Accessible::Name(nsString& aName)
// for processing, the user agent shall choose the first one.
for (nsIContent* childElm = mContent->GetFirstChild(); childElm;
childElm = childElm->GetNextSibling()) {
if (childElm->IsSVG(nsGkAtoms::title)) {
if (childElm->IsSVG(nsGkAtoms::desc)) {
nsTextEquivUtils::AppendTextEquivFromContent(this, childElm, &aName);
return eNameFromTooltip;
}
@ -294,7 +294,7 @@ Accessible::Description(nsString& aDescription)
} else if (mContent->IsSVG()) {
for (nsIContent* childElm = mContent->GetFirstChild(); childElm;
childElm = childElm->GetNextSibling()) {
if (childElm->IsSVG(nsGkAtoms::title)) {
if (childElm->IsSVG(nsGkAtoms::desc)) {
nsTextEquivUtils::AppendTextEquivFromContent(this, childElm,
&aDescription);
break;
@ -2489,7 +2489,7 @@ Accessible::NativeName(nsString& aName)
// for processing, the user agent shall choose the first one.
for (nsIContent* childElm = mContent->GetFirstChild(); childElm;
childElm = childElm->GetNextSibling()) {
if (childElm->IsSVG(nsGkAtoms::desc)) {
if (childElm->IsSVG(nsGkAtoms::title)) {
nsTextEquivUtils::AppendTextEquivFromContent(this, childElm, &aName);
return eNameOK;
}

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

@ -44,12 +44,12 @@
</pre>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" id="svg1">
<title>A description</title>
<desc>A name</desc>
<title>A name</title>
<desc>A description</title>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" id="svg2">
<title>A tooltip</title>
<desc>A tooltip</desc>
</svg>
</body>
</html>