Closed
Bug 725572
Opened 12 years ago
Closed 12 years ago
Remove nsIAccessibilityService::GetAccessible()
Categories
(Core :: Disability Access APIs, defect)
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)
4.51 KB,
patch
|
surkov
:
review+
hub
:
feedback+
|
Details | Diff | Splinter Review |
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
Comment 1•12 years ago
|
||
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•12 years ago
|
||
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•12 years ago
|
||
after all blockers are fixed we can turn this bug into good first bug
Updated•12 years ago
|
Whiteboard: [good first bug][mentor=hub@mozilla.com][lang=c++]
Assignee | ||
Comment 4•12 years ago
|
||
All prior req's finished, so I thought we could finish this off ... asking for feedback ...
Reporter | ||
Comment 5•12 years ago
|
||
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-
Assignee | ||
Comment 6•12 years ago
|
||
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
Reporter | ||
Comment 7•12 years ago
|
||
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.
Assignee | ||
Comment 8•12 years ago
|
||
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)
Comment 9•12 years ago
|
||
(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•12 years ago
|
||
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)
Reporter | ||
Updated•12 years ago
|
Attachment #630371 -
Flags: feedback?(hub) → feedback+
Assignee | ||
Comment 11•12 years ago
|
||
Push to TRY: https://tbpl.mozilla.org/?tree=Try&rev=d517cabab75a
Assignee | ||
Comment 12•12 years ago
|
||
Push to Inbound https://tbpl.mozilla.org/?tree=Mozilla-Inbound&rev=35ec6e3cc949
Target Milestone: --- → mozilla16
Comment 13•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/35ec6e3cc949
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•