Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 725572 - Remove nsIAccessibilityService::GetAccessible()
: Remove nsIAccessibilityService::GetAccessible()
[good first bug][mentor=hub@mozilla.c...
Product: Core
Classification: Components
Component: Disability Access APIs (show other bugs)
: Trunk
: x86_64 Linux
: -- normal (vote)
: mozilla16
Assigned To: Mark Capella [:capella]
: alexander :surkov
Depends on: 726005 726069 726071 726072 726507 739190 739193 739198
Blocks: cleana11y
  Show dependency treegraph
Reported: 2012-02-08 22:27 PST by Hubert Figuiere [:hub]
Modified: 2012-06-07 05:49 PDT (History)
3 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Patch (v1) (4.20 KB, patch)
2012-06-05 14:36 PDT, Mark Capella [:capella]
hub: feedback-
Details | Diff | Splinter Review
Patch (v2) (4.51 KB, patch)
2012-06-05 16:54 PDT, Mark Capella [:capella]
surkov.alexander: review+
hub: feedback+
Details | Diff | Splinter Review

Description Hubert Figuiere [:hub] 2012-02-08 22:27:15 PST
Remove nsIAccessibilityService::GetAccessible() and from nsAccessibiltiyService(). We can do everything with the nsDocAccessible::GetAccessible()

Comment 1 Trevor Saunders (:tbsaunde) 2012-02-09 23:10:37 PST
I haven't checked how much we use it after the mWeakShell -> mDoc refactor but we seem to use this a bit, so a inline function might be nice.  It might make sense to make it a11y::GetAccessible() or something instead of the service thing.
Comment 2 alexander :surkov 2012-02-10 08:05:20 PST
we need to check out how many cases we have when we need to do a guess about presshell (document), in some cases we can use normal nsDocAccessible::GetAccessible() like bug 726005.
Comment 3 alexander :surkov 2012-03-26 06:06:04 PDT
after all blockers are fixed we can turn this bug into good first bug
Comment 4 Mark Capella [:capella] 2012-06-05 14:36:47 PDT
Created attachment 630328 [details] [diff] [review]
Patch (v1)

All prior req's finished, so I thought we could finish this off ... asking for feedback ...
Comment 5 Hubert Figuiere [:hub] 2012-06-05 15:04:32 PDT
Comment on attachment 630328 [details] [diff] [review]
Patch (v1)

Review of attachment 630328 [details] [diff] [review]:

::: accessible/public/nsIAccessibilityService.h
@@ -36,5 @@
> -   * @param  aNode      [in] the DOM node to get an accessible for
> -   * @param  aPresShell [in] the presentation shell which contains layout info
> -   *                         for the DOM node
> -   */
> -  virtual Accessible* GetAccessible(nsINode* aNode,

I think you have to change the implementation ID if you change the implementation.
(I'm not very familiar with the gory details of XPCOM, Trevor knows more)

::: accessible/src/base/nsAccessibilityService.cpp
@@ +649,5 @@
>    if (!node)
>      return NS_ERROR_INVALID_ARG;
> +  DocAccessible* document = GetDocAccessible(node->OwnerDoc());
> +  NS_IF_ADDREF(*aAccessible = document->GetAccessible(node));

document could be nsnull as per the code you remove.
Comment 6 Mark Capella [:capella] 2012-06-05 16:54:27 PDT
Created attachment 630371 [details] [diff] [review]
Patch (v2)

I changed the CID ... I think it's safe to always change it, but from what I (don't) understand there are times when it's not strictly required ...

For the null doc situation, I've got the attached patch returning NS_OK vs NS_ERROR_INVALID_ARG ... I think that's correct, but let me know if otherwise ...
Comment 7 Hubert Figuiere [:hub] 2012-06-05 18:13:48 PDT
Comment on attachment 630371 [details] [diff] [review]
Patch (v2)

Review of attachment 630371 [details] [diff] [review]:

::: accessible/src/base/nsAccessibilityService.cpp
@@ +650,5 @@
>      return NS_ERROR_INVALID_ARG;
> +  DocAccessible* document = GetDocAccessible(node->OwnerDoc());
> +  if (document)
> +    NS_IF_ADDREF(*aAccessible = document->GetAccessible(node));

'nit: add an empty line

also I'm wondering if we shouldn't return an error here if it is NULL.
Comment 8 Mark Capella [:capella] 2012-06-05 18:17:20 PDT
Comment on attachment 630371 [details] [diff] [review]
Patch (v2)

Ok - got the nit ... I'll flag surkov and wait for comment re:nsnull and return code...
Comment 9 alexander :surkov 2012-06-05 22:16:04 PDT
(In reply to Hub Figuiere [:hub] from comment #7)

> also I'm wondering if we shouldn't return an error here if it is NULL.

just no accessible, it's ok.
Comment 10 alexander :surkov 2012-06-05 22:17:55 PDT
Comment on attachment 630371 [details] [diff] [review]
Patch (v2)

Review of attachment 630371 [details] [diff] [review]:

you need f+ since previous patch has f-
Comment 11 Mark Capella [:capella] 2012-06-06 08:52:56 PDT
Push to TRY:
Comment 12 Mark Capella [:capella] 2012-06-06 14:15:40 PDT
Push to Inbound
Comment 13 Ed Morley [:emorley] 2012-06-07 05:49:03 PDT

Note You need to log in before you can comment on or make changes to this bug.