Skip to content

Commit

Permalink
Bug 1297649 - Fix misleading indentation in UtilInterface.cpp and nsM…
Browse files Browse the repository at this point in the history
…aiInterfaceDocument.cpp. r=tbsaunde

MozReview-Commit-ID: 4NxqGBDlIrW
  • Loading branch information
Cykesiopka committed Aug 31, 2016
1 parent 5bd5fde commit e17010f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 21 deletions.
30 changes: 15 additions & 15 deletions accessible/atk/UtilInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,23 +251,23 @@ mai_key_snooper(GtkWidget *the_widget, GdkEventKey *event, gpointer func_data)
static guint sKey_snooper_id = 0;

static guint
mai_util_add_key_event_listener (AtkKeySnoopFunc listener,
gpointer data)
mai_util_add_key_event_listener(AtkKeySnoopFunc listener, gpointer data)
{
if (MOZ_UNLIKELY(!listener))
if (MOZ_UNLIKELY(!listener)) {
return 0;

static guint key=0;

if (!sKey_listener_list) {
sKey_listener_list = g_hash_table_new(nullptr, nullptr);
sKey_snooper_id = gtk_key_snooper_install(mai_key_snooper, data);
}
AtkKeySnoopFuncPointer atkKeySnoop;
atkKeySnoop.func_ptr = listener;
g_hash_table_insert(sKey_listener_list, GUINT_TO_POINTER (key++),
atkKeySnoop.data);
return key;
}

static guint key = 0;

if (!sKey_listener_list) {
sKey_listener_list = g_hash_table_new(nullptr, nullptr);
sKey_snooper_id = gtk_key_snooper_install(mai_key_snooper, data);
}
AtkKeySnoopFuncPointer atkKeySnoop;
atkKeySnoop.func_ptr = listener;
g_hash_table_insert(sKey_listener_list, GUINT_TO_POINTER(key++),
atkKeySnoop.data);
return key;
}

static void
Expand Down
13 changes: 7 additions & 6 deletions accessible/atk/nsMaiInterfaceDocument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,15 @@ getDocumentLocaleCB(AtkDocument *aDocument)
static inline GSList *
prependToList(GSList *aList, const char *const aName, const nsAutoString &aValue)
{
if (aValue.IsEmpty())
if (aValue.IsEmpty()) {
return aList;
}

// libspi will free these
AtkAttribute *atkAttr = (AtkAttribute *)g_malloc(sizeof(AtkAttribute));
atkAttr->name = g_strdup(aName);
atkAttr->value = g_strdup(NS_ConvertUTF16toUTF8(aValue).get());
return g_slist_prepend(aList, atkAttr);
// libspi will free these
AtkAttribute *atkAttr = (AtkAttribute *)g_malloc(sizeof(AtkAttribute));
atkAttr->name = g_strdup(aName);
atkAttr->value = g_strdup(NS_ConvertUTF16toUTF8(aValue).get());
return g_slist_prepend(aList, atkAttr);
}

AtkAttributeSet *
Expand Down

0 comments on commit e17010f

Please sign in to comment.