Closed Bug 1336637 Opened 8 years ago Closed 8 years ago

[e10s] Support accessible xpcom relation methods on Windows

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla54
Tracking Status
firefox54 --- fixed

People

(Reporter: eeejay, Assigned: eeejay)

References

Details

Attachments

(1 file)

No description provided.
Don't know if I am doing memory management right..
Attachment #8833550 - Flags: review?(aklotz)
Comment on attachment 8833550 [details] [diff] [review] Support relation methods in xpc on windows. r?aklotz >+ProxyAccessible::RelationByType(RelationType aType) const >+{ >+ nsTArray<ProxyAccessible*> proxies; >+ >+ RefPtr<IAccessible> acc; >+ if (!GetCOMInterface((void**)getter_AddRefs(acc))) { >+ return Move(proxies); >+ } >+ >+ RefPtr<IAccessible2_2> acc2; >+ if (FAILED(acc->QueryInterface(IID_IAccessible2_2, (void**)getter_AddRefs(acc2)))) { >+ return Move(proxies); you can simplify that with the templated QueryInterface defined in this file. >+ } >+ >+ _bstr_t relationType; >+ for (uint32_t idx = 0; idx < ArrayLength(sRelationTypePairs); idx++) { >+ if (aType == sRelationTypePairs[idx].first) { >+ relationType = sRelationTypePairs[idx].second; >+ break; >+ } >+ } >+ if (!relationType) { blank line after } please >+ return Move(proxies); just return nsTArray<ProxyAccessible*>() might be nicer. >+ } >+ >+ IUnknown** targets; >+ long nTargets = 0; >+ HRESULT hr = acc2->get_relationTargetsOfType(relationType, 0, &targets, &nTargets); I think you want LONG_MAX, 0 is just going to always get you 0 targets.
Attachment #8833550 - Flags: review?(aklotz) → review+
Pushed by eisaacson@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/b3ec4674a7fe Support relation methods in xpc on windows. r=tbsaunde
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
Depends on: 1448505
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: