Closed Bug 873439 Opened 12 years ago Closed 11 years ago

Implement IAccessible2_2::relationTargetsOfType

Categories

(Core :: Disability Access APIs, defect)

All
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla27

People

(Reporter: surkov, Assigned: surkov)

References

(Blocks 1 open bug)

Details

(Keywords: access)

Attachments

(1 file, 1 obsolete file)

No longer blocks: IA2_1.3
Depends on: IA2_1.3
Blocks: ia2
Attached patch patch (obsolete) — Splinter Review
Assignee: nobody → surkov.alexander
Attachment #813545 - Flags: review?(trev.saunders)
Attached patch patch2Splinter Review
Attachment #813545 - Attachment is obsolete: true
Attachment #813545 - Flags: review?(trev.saunders)
Attachment #818796 - Flags: review?(trev.saunders)
Comment on attachment 818796 [details] [diff] [review] patch2 >+ if (!Compatibility::IsIA2Off()) { IA2Off is just a hack for really really ancient jaws so why don't we make it only effect IAccessible2 itself? >+ if (IID_IAccessible2 == iid) { >+ *ppv = static_cast<IAccessible2*>(this); >+ >+ } else if (IID_IAccessible2_2 == iid) { it seems like it would be better to check for the newer interface first >+ bool matched = false; >+ RelationType relationType; why not use the mayBe<RelationType> trick? >+ for (uint32_t idx = 0; idx < ArrayLength(sRelationTypePairs); idx++) { size_t ? >+ if (wcscmp(aType, sRelationTypePairs[idx].second) == 0) { >+ relationType = sRelationTypePairs[idx].first; >+ matched = true; might as well break right? >+ nsTArray<Accessible*> targets; >+ Accessible* target = nullptr; >+ while ((target = rel.Next()) && >+ static_cast<long>(targets.Length()) <= aMaxTargets) >+ targets.AppendElement(target); what happens if max targets is 0? >+ for (int32_t i = 0; i < *aNTargets; i++) { wouldn't long make more sense than int32_t? does it matter on win64 maybe? >+ // IAccessible2_2 >+ virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_attribute( >+ /* [in] */ BSTR name, >+ /* [out, retval] */ VARIANT* attribute); any reason to not make them override?
Attachment #818796 - Flags: review?(trev.saunders) → review+
(In reply to Trevor Saunders (:tbsaunde) from comment #3) > >+ if (!Compatibility::IsIA2Off()) { > > IA2Off is just a hack for really really ancient jaws so why don't we make it > only effect IAccessible2 itself? ok > >+ if (IID_IAccessible2 == iid) { > >+ *ppv = static_cast<IAccessible2*>(this); > >+ > >+ } else if (IID_IAccessible2_2 == iid) { > > it seems like it would be better to check for the newer interface first hopefully this interface will picked up :) > >+ bool matched = false; > >+ RelationType relationType; > > why not use the mayBe<RelationType> trick? ok > >+ for (uint32_t idx = 0; idx < ArrayLength(sRelationTypePairs); idx++) { > > size_t ? why? > > >+ if (wcscmp(aType, sRelationTypePairs[idx].second) == 0) { > >+ relationType = sRelationTypePairs[idx].first; > >+ matched = true; > > might as well break right? > > >+ nsTArray<Accessible*> targets; > >+ Accessible* target = nullptr; > >+ while ((target = rel.Next()) && > >+ static_cast<long>(targets.Length()) <= aMaxTargets) > >+ targets.AppendElement(target); > > what happens if max targets is 0? no targets returned > >+ for (int32_t i = 0; i < *aNTargets; i++) { > > wouldn't long make more sense than int32_t? does it matter on win64 maybe? why? > >+ // IAccessible2_2 > >+ virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_attribute( > >+ /* [in] */ BSTR name, > >+ /* [out, retval] */ VARIANT* attribute); > > any reason to not make them override? you mean MOZ_OVERRIDE? it's just a copy of what IDL generates, why to care?
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: