Closed Bug 1241453 Opened 8 years ago Closed 8 years ago

start exposing proxied accessibles to js

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

(18 files)

2.21 KB, patch
davidb
: review+
Details | Diff | Splinter Review
4.12 KB, patch
davidb
: review+
Details | Diff | Splinter Review
3.08 KB, patch
davidb
: review+
Details | Diff | Splinter Review
1.33 KB, patch
davidb
: review+
Details | Diff | Splinter Review
8.81 KB, patch
davidb
: review+
Details | Diff | Splinter Review
5.86 KB, patch
davidb
: review+
Details | Diff | Splinter Review
865 bytes, patch
davidb
: review+
Details | Diff | Splinter Review
4.40 KB, patch
davidb
: review+
Details | Diff | Splinter Review
4.70 KB, patch
davidb
: review+
Details | Diff | Splinter Review
2.81 KB, patch
davidb
: review+
Details | Diff | Splinter Review
5.49 KB, patch
davidb
: review+
Details | Diff | Splinter Review
2.43 KB, patch
davidb
: review+
Details | Diff | Splinter Review
3.93 KB, patch
davidb
: review+
Details | Diff | Splinter Review
1.93 KB, patch
davidb
: review+
Details | Diff | Splinter Review
1.38 KB, patch
davidb
: review+
Details | Diff | Splinter Review
1.26 KB, patch
davidb
: review+
Details | Diff | Splinter Review
1.37 KB, patch
davidb
: review+
Details | Diff | Splinter Review
5.11 KB, patch
davidb
: review+
Details | Diff | Splinter Review
      No description provided.
We have several places that store either a ProxyAccessible* or an Accessible*
 in the same member using a uintptr_t and stealing the lowest bit of the
 pointer.  The goal of the AccessibleOrProxy class is to make this simpler and
 consolidate the logic involved in doing it.
Attachment #8710364 - Flags: review?(dbolter)
We can simplify it some to make better use of AccessibleOrProxy.
Attachment #8710367 - Flags: review?(dbolter)
Assignee: nobody → tbsaunde+mozbugs
Status: NEW → ASSIGNED
Comment on attachment 8710369 [details] [diff] [review]
allow constructing xpcAccessibles with proxies

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

why do you need this?
(In reply to alexander :surkov from comment #18)
> Comment on attachment 8710369 [details] [diff] [review]
> allow constructing xpcAccessibles with proxies
> 
> Review of attachment 8710369 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> why do you need this?

for the later patches in the series?
(In reply to Trevor Saunders (:tbsaunde) from comment #19)
> (In reply to alexander :surkov from comment #18)
> > Comment on attachment 8710369 [details] [diff] [review]
> > allow constructing xpcAccessibles with proxies
> > 
> > Review of attachment 8710369 [details] [diff] [review]:
> > -----------------------------------------------------------------
> > 
> > why do you need this?
> 
> for the later patches in the series?

I was rather asking about the bug in whole. I see you may be using that for e10s layer testing, are there other consumers/reasons?
(In reply to alexander :surkov from comment #20)
> (In reply to Trevor Saunders (:tbsaunde) from comment #19)
> > (In reply to alexander :surkov from comment #18)
> > > Comment on attachment 8710369 [details] [diff] [review]
> > > allow constructing xpcAccessibles with proxies
> > > 
> > > Review of attachment 8710369 [details] [diff] [review]:
> > > -----------------------------------------------------------------
> > > 
> > > why do you need this?
> > 
> > for the later patches in the series?
> 
> I was rather asking about the bug in whole. I see you may be using that for
> e10s layer testing, are there other consumers/reasons?

that wasn't really clear since you commented on a random patch.

I think testing is the only thing currently needing this.
Is it okay if I get to reviews on Monday or do we need this sooner? (I might get to them this afternoon)
Comment on attachment 8710364 [details] [diff] [review]
add an AccessibleOrProxy class

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

::: accessible/base/AccessibleOrProxy.h
@@ +18,5 @@
> +  /**
> +   * This class stores an Accessible* or a ProxyAccessible* in a safe manner
> +   * with size sizeof(void*).
> +   */
> +class AccessibleOrProxy

Should probably remove the comment indent.
Attachment #8710364 - Flags: review?(dbolter) → review+
Attachment #8710365 - Flags: review?(dbolter) → review+
Attachment #8710366 - Flags: review?(dbolter) → review+
Attachment #8710367 - Flags: review?(dbolter) → review+
Attachment #8710368 - Flags: review?(dbolter) → review+
Attachment #8710369 - Flags: review?(dbolter) → review+
Comment on attachment 8710370 [details] [diff] [review]
allow xpcAccessibleDocument::mCache to use proxies as keys

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

(Aside: I'm just reviewing for what you've done here, not reviewing for anything you might have missed)
Attachment #8710370 - Flags: review?(dbolter) → review+
Comment on attachment 8710371 [details] [diff] [review]
fixup xpcAccessible Intl() methods to not assume mIntl is always an Accessible

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

::: accessible/xpcom/xpcAccessibleHyperText.h
@@ +45,5 @@
>  private:
> +  HyperTextAccessible* Intl()
> +  {
> +    if (Accessible* acc = mIntl.AsAccessible()) {
> +    return acc->AsHyperText();

nit: need more indent on return.
Attachment #8710371 - Flags: review?(dbolter) → review+
Attachment #8710374 - Flags: review?(dbolter) → review+
Comment on attachment 8710375 [details] [diff] [review]
assert accessibles are only added to non remote xpcAccessibleDocuments

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

::: accessible/xpcom/xpcAccessibleDocument.h
@@ +29,4 @@
>  
>    xpcAccessibleDocument(ProxyAccessible* aProxy, uint32_t aInterfaces) :
> +    xpcAccessibleHyperText(aProxy, aInterfaces), mCache(kDefaultCacheLength),
> + mRemote(true) {}

nit: more (double) indent for mRemote initializer
Attachment #8710375 - Flags: review?(dbolter) → review+
Attachment #8710377 - Flags: review?(dbolter) → review+
Comment on attachment 8710378 [details] [diff] [review]
add DocAccessibleParent::GetXPCAccessible()

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

::: accessible/ipc/DocAccessibleParent.cpp
@@ +294,5 @@
>  }
>  
> +xpcAccessibleGeneric*
> +DocAccessibleParent::GetXPCAccessible(ProxyAccessible* aProxy)
> +{

Should we assert mRemote here?
Attachment #8710379 - Flags: review?(dbolter) → review+
Attachment #8710380 - Flags: review?(dbolter) → review+
Attachment #8710378 - Flags: review?(dbolter) → review+
Attachment #8710381 - Flags: review?(dbolter) → review+
Attachment #8710382 - Flags: review?(dbolter) → review+
Attachment #8710383 - Flags: review?(dbolter) → review+
We need to handle the case that accessibility is enabled in a child process, but not the parent.  The easiest way to do that is to change from using a member to using a static pointer to a hash table.
Attachment #8711636 - Flags: review?(dbolter)
Attachment #8711636 - Flags: review?(dbolter) → review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: