Closed
Bug 573910
Opened 15 years ago
Closed 15 years ago
switch nsApplicationAccessible to nsAccessible::Append/RemoveChild
Categories
(Core :: Disability Access APIs, defect)
Core
Disability Access APIs
Tracking
()
RESOLVED
FIXED
People
(Reporter: surkov, Assigned: surkov)
References
(Blocks 1 open bug)
Details
(Keywords: access)
Attachments
(1 file)
15.67 KB,
patch
|
davidb
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•15 years ago
|
||
Assignee: nobody → surkov.alexander
Status: NEW → ASSIGNED
Attachment #453314 -
Flags: superreview?(roc)
Attachment #453314 -
Flags: review?(bolterbugz)
Assignee | ||
Updated•15 years ago
|
Summary: nsApplicationAccessible should use nsAccessible Append/RemoveChild → switch nsApplicationAccessible to nsAccessible::Append/RemoveChild
Comment 2•15 years ago
|
||
Comment on attachment 453314 [details] [diff] [review]
patch
>+++ b/widget/src/gtk2/nsAccessibilityHelper.cpp
>@@ -49,28 +49,28 @@ gint RunDialog(GtkDialog* aDialog)
> {
> #ifdef ACCESSIBILITY
> if (!nsWindow::sAccessibilityEnabled) {
> return gtk_dialog_run (aDialog);
> }
>
> nsCOMPtr<nsIAccessibilityService> accService =
> do_GetService ("@mozilla.org/accessibilityService;1");
>- nsCOMPtr<nsIAccessible> accessible;
>
> // Attach the dialog accessible to app accessible tree
>+ nsAccessible* windowAcc = nsnull;
> if (accService) {
> AtkObject* gailWindow = gtk_widget_get_accessible(GTK_WIDGET(aDialog));
>- accService->AddNativeRootAccessible(gailWindow, getter_AddRefs(accessible));
>+ windowAcc = accService->AddNativeRootAccessible(gailWindow);
> }
>
> gint result = gtk_dialog_run (aDialog);
Are we guaranteed windowAcc will still be valid?
>
> // Deattach the dialog accessible
>- if (accService && accessible) {
>- accService->RemoveNativeRootAccessible(accessible);
>+ if (accService && windowAcc) {
>+ accService->RemoveNativeRootAccessible(windowAcc);
> }
>
> return result;
> #else
> return gtk_dialog_run (aDialog);
> #endif
> }
Assignee | ||
Comment 3•15 years ago
|
||
(In reply to comment #2)
> >+ windowAcc = accService->AddNativeRootAccessible(gailWindow);
> > }
> >
> > gint result = gtk_dialog_run (aDialog);
>
> Are we guaranteed windowAcc will still be valid?
Yes, it's kept by application accessible.
Comment 4•15 years ago
|
||
Comment on attachment 453314 [details] [diff] [review]
patch
OK r=me.
Attachment #453314 -
Flags: review?(bolterbugz) → review+
Assignee | ||
Comment 5•15 years ago
|
||
Robert, basically I need your review for widget/src/gtk2 part which is trivial.
Attachment #453314 -
Flags: superreview?(roc) → superreview+
Assignee | ||
Comment 6•15 years ago
|
||
landed on 1.9.3 - http://hg.mozilla.org/mozilla-central/rev/3a9f81291788
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•