[e10s] Support accessible xpcom relation methods on Windows

RESOLVED FIXED in Firefox 54

Status

()

Core
Disability Access APIs
RESOLVED FIXED
a year ago
a year ago

People

(Reporter: eeejay, Assigned: eeejay)

Tracking

Trunk
mozilla54
Points:
---

Firefox Tracking Flags

(firefox54 fixed)

Details

Attachments

(1 attachment)

Comment hidden (empty)
(Assignee)

Comment 1

a year ago
Created attachment 8833550 [details] [diff] [review]
Support relation methods in xpc on windows. r?aklotz

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+

Comment 4

a year ago
Pushed by eisaacson@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/b3ec4674a7fe
Support relation methods in xpc on windows. r=tbsaunde

Comment 5

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/b3ec4674a7fe
Status: NEW → RESOLVED
Last Resolved: a year ago
status-firefox54: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.