Commit f00ebf87818d07949885a7d8446a8ea26d2209e5

Authored by samuel thibault
1 parent 8b7bbd0a
Exists in master

Fix open dialog not showing up in accerciser etc.

firefox-patches/patches-60/open_file 0 → 100644
... ... @@ -0,0 +1,38 @@
  1 +Fix open dialog not showing up in accerciser etc.
  2 +
  3 +# HG changeset patch
  4 +# User Samuel Thibault <samuel.thibault@ens-lyon.org>
  5 +# Date 1554391632 -7200
  6 +# Thu Apr 04 17:27:12 2019 +0200
  7 +# Branch open_dialog
  8 +# Node ID f71d2de023214cea39ddd18e6ea99c9136e5f8a6
  9 +# Parent 5c4afd893ae45d3fb0f1c220632a8d7d13b75ba0
  10 +Bug 1541457 atk: Also look for refined roles of dialog boxes
  11 +
  12 +diff --git a/accessible/atk/ApplicationAccessibleWrap.cpp b/accessible/atk/ApplicationAccessibleWrap.cpp
  13 +--- a/accessible/atk/ApplicationAccessibleWrap.cpp
  14 ++++ b/accessible/atk/ApplicationAccessibleWrap.cpp
  15 +@@ -35,20 +35,22 @@ gboolean toplevel_event_watcher(GSignalI
  16 +
  17 + if (nsAccessibilityService::IsShutdown()) return TRUE;
  18 +
  19 + GObject* object =
  20 + reinterpret_cast<GObject*>(g_value_get_object(param_values));
  21 + if (!GTK_IS_WINDOW(object)) return TRUE;
  22 +
  23 + AtkObject* child = gtk_widget_get_accessible(GTK_WIDGET(object));
  24 ++ AtkRole role = atk_object_get_role(child);
  25 +
  26 + // GTK native dialog
  27 + if (!IS_MAI_OBJECT(child) &&
  28 +- (atk_object_get_role(child) == ATK_ROLE_DIALOG)) {
  29 ++ (role == ATK_ROLE_DIALOG || role == ATK_ROLE_FILE_CHOOSER ||
  30 ++ role == ATK_ROLE_COLOR_CHOOSER || role == ATK_ROLE_FONT_CHOOSER)) {
  31 + if (data == reinterpret_cast<gpointer>(nsIAccessibleEvent::EVENT_SHOW)) {
  32 + // Attach the dialog accessible to app accessible tree
  33 + Accessible* windowAcc = GetAccService()->AddNativeRootAccessible(child);
  34 + g_object_set_qdata(G_OBJECT(child), sQuark_gecko_acc_obj,
  35 + reinterpret_cast<gpointer>(windowAcc));
  36 +
  37 + } else {
  38 + // Deattach the dialog accessible
... ...
firefox-patches/series-60
... ... @@ -8,3 +8,4 @@ scrollsubstringto
8 8 control-enter
9 9 text-at-offset-word
10 10 text-at-offset-word2
  11 +open_file
... ...
firefox-patches/version
1   -4
  1 +5
... ...
thunderbird-patches/patches-60/open_file 0 → 100644
... ... @@ -0,0 +1,38 @@
  1 +Fix open dialog not showing up in accerciser etc.
  2 +
  3 +# HG changeset patch
  4 +# User Samuel Thibault <samuel.thibault@ens-lyon.org>
  5 +# Date 1554391632 -7200
  6 +# Thu Apr 04 17:27:12 2019 +0200
  7 +# Branch open_dialog
  8 +# Node ID f71d2de023214cea39ddd18e6ea99c9136e5f8a6
  9 +# Parent 5c4afd893ae45d3fb0f1c220632a8d7d13b75ba0
  10 +Bug 1541457 atk: Also look for refined roles of dialog boxes
  11 +
  12 +diff --git a/accessible/atk/ApplicationAccessibleWrap.cpp b/accessible/atk/ApplicationAccessibleWrap.cpp
  13 +--- a/accessible/atk/ApplicationAccessibleWrap.cpp
  14 ++++ b/accessible/atk/ApplicationAccessibleWrap.cpp
  15 +@@ -35,20 +35,22 @@ gboolean toplevel_event_watcher(GSignalI
  16 +
  17 + if (nsAccessibilityService::IsShutdown()) return TRUE;
  18 +
  19 + GObject* object =
  20 + reinterpret_cast<GObject*>(g_value_get_object(param_values));
  21 + if (!GTK_IS_WINDOW(object)) return TRUE;
  22 +
  23 + AtkObject* child = gtk_widget_get_accessible(GTK_WIDGET(object));
  24 ++ AtkRole role = atk_object_get_role(child);
  25 +
  26 + // GTK native dialog
  27 + if (!IS_MAI_OBJECT(child) &&
  28 +- (atk_object_get_role(child) == ATK_ROLE_DIALOG)) {
  29 ++ (role == ATK_ROLE_DIALOG || role == ATK_ROLE_FILE_CHOOSER ||
  30 ++ role == ATK_ROLE_COLOR_CHOOSER || role == ATK_ROLE_FONT_CHOOSER)) {
  31 + if (data == reinterpret_cast<gpointer>(nsIAccessibleEvent::EVENT_SHOW)) {
  32 + // Attach the dialog accessible to app accessible tree
  33 + Accessible* windowAcc = GetAccService()->AddNativeRootAccessible(child);
  34 + g_object_set_qdata(G_OBJECT(child), sQuark_gecko_acc_obj,
  35 + reinterpret_cast<gpointer>(windowAcc));
  36 +
  37 + } else {
  38 + // Deattach the dialog accessible
... ...
thunderbird-patches/series-60
... ... @@ -8,3 +8,4 @@ scrollsubstringto
8 8 control-enter
9 9 text-at-offset-word
10 10 text-at-offset-word2
  11 +open_file
... ...
thunderbird-patches/version
1   -4
  1 +5
... ...