Closed Bug 1334332 Opened 8 years ago Closed 8 years ago

AccessibleWrap::GetIAccessibleFor returns null on ProxyAccessibles that need to be pruned.

Categories

(Core :: Disability Access APIs, defect)

All
Windows
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla54
Tracking Status
firefox54 --- fixed

People

(Reporter: eeejay, Assigned: eeejay)

References

Details

Attachments

(1 file)

From what I can gather, it looks like we assume that we are retrieving a descendant or child accessible after we check that we are not looking for CHILDID_SELF. In reality, we can be looking for the same ID as this AccessibleWrap. This would be true if we are querying a proxy for its own COM interface (or theoretically an Accessible with its own ID).
OS: All → Windows
Assignee: nobody → eitan
MozReview-Commit-ID: IHilFCruSEI
Attachment #8830992 - Flags: review?(tbsaunde+mozbugs)
Blocks: 1288839
Comment on attachment 8830992 [details] [diff] [review] Fix GetIAccessibleFor to support returning IAccessible for itself. r?tbsaunde ># HG changeset patch ># User Eitan Isaacson <eitan@monotonous.org> > >Bug 1334332 - Fix GetIAccessibleFor to support returning IAccessible for itself. r?tbsaunde > >MozReview-Commit-ID: IHilFCruSEI > >diff --git a/accessible/windows/msaa/AccessibleWrap.cpp b/accessible/windows/msaa/AccessibleWrap.cpp >index 1a8ea1f..f06e886 100644 >--- a/accessible/windows/msaa/AccessibleWrap.cpp >+++ b/accessible/windows/msaa/AccessibleWrap.cpp >@@ -1389,25 +1389,28 @@ AccessibleWrap::GetIAccessibleFor(const VARIANT& aVarChild, bool* aIsDefunct) > return nullptr; > } > // Otherwise, since we're a proxy and we have a null native interface, this > // indicates that we need to obtain a COM proxy. To do this, we'll replace > // CHILDID_SELF with our real MSAA ID and continue the search from there. > varChild.lVal = GetExistingID(); > } > >+ if (varChild.ulVal != GetExistingID() && use the lval member not ulval. It might be fine in practice, but I think using ulval gives the compiler license to do bad things, and some day it will. >+ (IsProxy() ? Proxy()->MustPruneChildren() : nsAccUtils::MustPrune(this))) { >+ // This accessible should have no subtree in platform, return null for its children. I'm not sure how much this adds to what the description of MustPrune() is, but if you want to keep it the english seems kind of off.
Attachment #8830992 - Flags: review?(tbsaunde+mozbugs) → review+
Pushed by eisaacson@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/db68cec8a416 Fix GetIAccessibleFor to support returning IAccessible for itself. r=tbsaunde
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: