Closed Bug 1243077 Opened 8 years ago Closed 8 years ago

start implementing nsIAccessible for proxied accessibles

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: tbsaunde, Assigned: tbsaunde)

References

Details

Attachments

(17 files)

1.55 KB, patch
davidb
: review+
Details | Diff | Splinter Review
883 bytes, patch
davidb
: review+
Details | Diff | Splinter Review
1.88 KB, patch
davidb
: review+
Details | Diff | Splinter Review
875 bytes, patch
davidb
: review+
Details | Diff | Splinter Review
1.32 KB, patch
davidb
: review+
Details | Diff | Splinter Review
1.69 KB, patch
davidb
: review+
Details | Diff | Splinter Review
2.58 KB, patch
davidb
: review+
Details | Diff | Splinter Review
1.54 KB, patch
davidb
: review+
Details | Diff | Splinter Review
841 bytes, patch
davidb
: review+
Details | Diff | Splinter Review
879 bytes, patch
davidb
: review+
Details | Diff | Splinter Review
1.14 KB, patch
davidb
: review+
Details | Diff | Splinter Review
926 bytes, patch
davidb
: review+
Details | Diff | Splinter Review
1.20 KB, patch
davidb
: review+
Details | Diff | Splinter Review
805 bytes, patch
davidb
: review+
Details | Diff | Splinter Review
928 bytes, patch
davidb
: review+
Details | Diff | Splinter Review
796 bytes, patch
davidb
: review+
Details | Diff | Splinter Review
891 bytes, patch
davidb
: review+
Details | Diff | Splinter Review
      No description provided.
Attachment #8712296 - Flags: review?(dbolter)
Attachment #8712299 - Flags: review?(dbolter)
It will be useful to get mIntl without casting it to either Accessible* or
  ProxyAccessible*.  saddly C++ won't let us overload the name Intl() this way
  so for now this method is named IntlGeneric().
Attachment #8712300 - Flags: review?(dbolter)
Attachment #8712302 - Flags: review?(dbolter)
We can replace the code  dealing with Accessibles and proxies differently with
a call to AccessibleOrProxy::Role()
Attachment #8712305 - Flags: review?(dbolter)
Attachment #8712308 - Flags: review?(dbolter)
Attachment #8712313 - Flags: review?(dbolter)
Attachment #8712316 - Flags: review?(dbolter)
Assignee: nobody → tbsaunde+mozbugs
Blocks: e10sa11y2
Attachment #8712296 - Flags: review?(dbolter) → review+
Attachment #8712299 - Flags: review?(dbolter) → review+
Comment on attachment 8712300 [details] [diff] [review]
add AccessibleOrProxy xpcAccessible::IntlGeneric()

Review of attachment 8712300 [details] [diff] [review]:
-----------------------------------------------------------------

nit: in commit message 'saddly' should be 'Sadly'

::: accessible/xpcom/xpcAccessibleGeneric.h
@@ +93,5 @@
>  
> +inline AccessibleOrProxy
> +xpcAccessible::IntlGeneric()
> +{
> +  return static_cast<xpcAccessibleGeneric*>(this)->mIntl;

I assume this static downcast is always safe?
Attachment #8712300 - Flags: review?(dbolter) → review+
Attachment #8712301 - Flags: review?(dbolter) → review+
Attachment #8712302 - Flags: review?(dbolter) → review+
Attachment #8712303 - Flags: review?(dbolter) → review+
Comment on attachment 8712304 [details] [diff] [review]
add ToXPC{,Document} overloads for proxied accessibles

Review of attachment 8712304 [details] [diff] [review]:
-----------------------------------------------------------------

::: accessible/xpcom/xpcAccessibleDocument.cpp
@@ +17,1 @@
>  using namespace mozilla::a11y;

Why this change?

@@ +236,5 @@
> +    return nullptr;
> +  }
> +
> +  if (aAcc.IsAccessible()) {
> +    return ToXPC(aAcc.AsAccessible());

Took me a couple minutes to realize this is not recursive (calls the pointer version).

@@ +240,5 @@
> +    return ToXPC(aAcc.AsAccessible());
> +  }
> +
> + xpcAccessibleDocument* doc = ToXPCDocument(aAcc.AsProxy()->Document());
> + return doc->GetXPCAccessible(aAcc.AsProxy());

Maybe comment this case?
Attachment #8712304 - Flags: review?(dbolter) → review+
Attachment #8712305 - Flags: review?(dbolter) → review+
Attachment #8712306 - Flags: review?(dbolter) → review+
Attachment #8712308 - Flags: review?(dbolter) → review+
Attachment #8712309 - Flags: review?(dbolter) → review+
Attachment #8712310 - Flags: review?(dbolter) → review+
Attachment #8712312 - Flags: review?(dbolter) → review+
Attachment #8712313 - Flags: review?(dbolter) → review+
Attachment #8712315 - Flags: review?(dbolter) → review+
Attachment #8712316 - Flags: review?(dbolter) → review+
Attachment #8712317 - Flags: review?(dbolter) → review+
> ::: accessible/xpcom/xpcAccessibleDocument.cpp
> @@ +17,1 @@
> >  using namespace mozilla::a11y;
> 
> Why this change?

so a11y::ToXPC() is resolved correctly.

> @@ +240,5 @@
> > +    return ToXPC(aAcc.AsAccessible());
> > +  }
> > +
> > + xpcAccessibleDocument* doc = ToXPCDocument(aAcc.AsProxy()->Document());
> > + return doc->GetXPCAccessible(aAcc.AsProxy());
> 
> Maybe comment this case?

what about it?
(In reply to Trevor Saunders (:tbsaunde) from comment #20)
> > ::: accessible/xpcom/xpcAccessibleDocument.cpp
> > @@ +17,1 @@
> > >  using namespace mozilla::a11y;
> > 
> > Why this change?
> 
> so a11y::ToXPC() is resolved correctly.

OK!

> 
> > @@ +240,5 @@
> > > +    return ToXPC(aAcc.AsAccessible());
> > > +  }
> > > +
> > > + xpcAccessibleDocument* doc = ToXPCDocument(aAcc.AsProxy()->Document());
> > > + return doc->GetXPCAccessible(aAcc.AsProxy());
> > 
> > Maybe comment this case?
> 
> what about it?

What it is for/does, but note it was just a 'maybe'.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: