Closed
Bug 873439
Opened 12 years ago
Closed 11 years ago
Implement IAccessible2_2::relationTargetsOfType
Categories
(Core :: Disability Access APIs, defect)
Tracking
()
RESOLVED
FIXED
mozilla27
People
(Reporter: surkov, Assigned: surkov)
References
(Blocks 1 open bug)
Details
(Keywords: access)
Attachments
(1 file, 1 obsolete file)
5.93 KB,
patch
|
tbsaunde
:
review+
|
Details | Diff | Splinter Review |
http://accessibility.linuxfoundation.org/a11yspecs/ia2/docs/html/interface_i_accessible2__2.html
should be a plain mapping into Accessible::RelationByType
Assignee | ||
Updated•12 years ago
|
Assignee | ||
Comment 1•11 years ago
|
||
Assignee: nobody → surkov.alexander
Attachment #813545 -
Flags: review?(trev.saunders)
Assignee | ||
Comment 2•11 years ago
|
||
Attachment #813545 -
Attachment is obsolete: true
Attachment #813545 -
Flags: review?(trev.saunders)
Attachment #818796 -
Flags: review?(trev.saunders)
Comment 3•11 years ago
|
||
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+
Assignee | ||
Comment 4•11 years ago
|
||
(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?
Assignee | ||
Comment 5•11 years ago
|
||
Comment 6•11 years ago
|
||
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.
Description
•