Bug 1288590: Use GetAttrInfoAt in sdnAccessible.cpp. r=bholley

MozReview-Commit-ID: LQrtUwssnQN
This commit is contained in:
Emilio Cobos Álvarez 2016-07-21 20:12:00 -07:00
Родитель e54d13faa8
Коммит d6cc7b9e13
1 изменённых файлов: 5 добавлений и 4 удалений

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

@ -149,10 +149,11 @@ sdnAccessible::get_attributes(unsigned short aMaxAttribs,
aAttribValues[index] = aAttribNames[index] = nullptr; aAttribValues[index] = aAttribNames[index] = nullptr;
nsAutoString attributeValue; nsAutoString attributeValue;
const nsAttrName* name = elm->GetAttrNameAt(index); nsAttrInfo attr = elm->GetAttrInfoAt(index);
aNameSpaceIDs[index] = static_cast<short>(name->NamespaceID()); attr.mValue->ToString(attributeValue);
aAttribNames[index] = ::SysAllocString(name->LocalName()->GetUTF16String());
elm->GetAttr(name->NamespaceID(), name->LocalName(), attributeValue); aNameSpaceIDs[index] = static_cast<short>(attr.mName->NamespaceID());
aAttribNames[index] = ::SysAllocString(attr.mName->LocalName()->GetUTF16String());
aAttribValues[index] = ::SysAllocString(attributeValue.get()); aAttribValues[index] = ::SysAllocString(attributeValue.get());
} }