зеркало из https://github.com/mozilla/gecko-dev.git
Bug 868789 - Name computation for SVG is wrong, r=tbsaude
This commit is contained in:
Родитель
21df6dd5cf
Коммит
870c93f242
|
@ -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>
|
||||
|
|
Загрузка…
Ссылка в новой задаче