Closed Bug 725572 Opened 14 years ago Closed 13 years ago

Remove nsIAccessibilityService::GetAccessible()

Categories

(Core :: Disability Access APIs, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla16

People

(Reporter: hub, Assigned: capella)

References

(Blocks 1 open bug)

Details

(Whiteboard: [good first bug][mentor=hub@mozilla.com][lang=c++])

Attachments

(1 file, 1 obsolete file)

Remove nsIAccessibilityService::GetAccessible() and from nsAccessibiltiyService(). We can do everything with the nsDocAccessible::GetAccessible() See https://bugzilla.mozilla.org/show_bug.cgi?id=721947#c8
Blocks: cleana11y
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.
Depends on: 726005
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.
Depends on: 726069
Depends on: 726071
Depends on: 726072
Depends on: 726507
Depends on: 739190
Depends on: 739193
Depends on: 739198
after all blockers are fixed we can turn this bug into good first bug
Whiteboard: [good first bug][mentor=hub@mozilla.com][lang=c++]
Attached patch Patch (v1) (obsolete) — Splinter Review
All prior req's finished, so I thought we could finish this off ... asking for feedback ...
Assignee: nobody → markcapella
Status: NEW → ASSIGNED
Attachment #630328 - Flags: feedback?(hub)
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.
Attachment #630328 - Flags: feedback?(hub) → feedback-
Attached patch Patch (v2)Splinter Review
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 ...
Attachment #630328 - Attachment is obsolete: true
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 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...
Attachment #630371 - Flags: review?(surkov.alexander)
(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 on attachment 630371 [details] [diff] [review] Patch (v2) Review of attachment 630371 [details] [diff] [review]: ----------------------------------------------------------------- r=me you need f+ since previous patch has f-
Attachment #630371 - Flags: review?(surkov.alexander)
Attachment #630371 - Flags: review+
Attachment #630371 - Flags: feedback?(hub)
Attachment #630371 - Flags: feedback?(hub) → feedback+
Target Milestone: --- → mozilla16
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: