Closed Bug 573910 Opened 15 years ago Closed 15 years ago

switch nsApplicationAccessible to nsAccessible::Append/RemoveChild

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: surkov, Assigned: surkov)

References

(Blocks 1 open bug)

Details

(Keywords: access)

Attachments

(1 file)

No description provided.
Attached patch patchSplinter Review
Assignee: nobody → surkov.alexander
Status: NEW → ASSIGNED
Attachment #453314 - Flags: superreview?(roc)
Attachment #453314 - Flags: review?(bolterbugz)
Summary: nsApplicationAccessible should use nsAccessible Append/RemoveChild → switch nsApplicationAccessible to nsAccessible::Append/RemoveChild
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 > }
(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 on attachment 453314 [details] [diff] [review] patch OK r=me.
Attachment #453314 - Flags: review?(bolterbugz) → review+
Robert, basically I need your review for widget/src/gtk2 part which is trivial.
Attachment #453314 - Flags: superreview?(roc) → superreview+
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.

Attachment

General

Created:
Updated:
Size: