Bug 913586 (Part 2) - Update Maybe users in accessible. r=asurkov

--HG--
extra : rebase_source : 521f090c8b37137877011ee057573f7baa62c5cb
This commit is contained in:
Seth Fowler 2014-08-13 15:39:40 -07:00
Родитель 165e5028e4
Коммит 558486ff50
2 изменённых файлов: 6 добавлений и 6 удалений

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

@ -574,18 +574,18 @@ ia2Accessible::get_relationTargetsOfType(BSTR aType,
Maybe<RelationType> relationType;
for (uint32_t idx = 0; idx < ArrayLength(sRelationTypePairs); idx++) {
if (wcscmp(aType, sRelationTypePairs[idx].second) == 0) {
relationType.construct(sRelationTypePairs[idx].first);
relationType.emplace(sRelationTypePairs[idx].first);
break;
}
}
if (relationType.empty())
if (!relationType)
return E_INVALIDARG;
AccessibleWrap* acc = static_cast<AccessibleWrap*>(this);
if (acc->IsDefunct())
return CO_E_OBJNOTCONNECTED;
Relation rel = acc->RelationByType(relationType.ref());
Relation rel = acc->RelationByType(*relationType);
nsTArray<Accessible*> targets;
Accessible* target = nullptr;

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

@ -900,7 +900,7 @@ AccessibleWrap::accNavigate(
#define RELATIONTYPE(geckoType, stringType, atkType, msaaType, ia2Type) \
case msaaType: \
xpRelation.construct(RelationType::geckoType); \
xpRelation.emplace(RelationType::geckoType); \
break;
switch(navDir) {
@ -935,8 +935,8 @@ AccessibleWrap::accNavigate(
pvarEndUpAt->vt = VT_EMPTY;
if (!xpRelation.empty()) {
Relation rel = RelationByType(xpRelation.ref());
if (xpRelation) {
Relation rel = RelationByType(*xpRelation);
navAccessible = rel.Next();
}