Bug 1297649 - Fix misleading indentation in UtilInterface.cpp and nsMaiInterfaceDocument.cpp. r=tbsaunde

MozReview-Commit-ID: 4NxqGBDlIrW

--HG--
extra : rebase_source : cda000969c1982614bb5d01e120efed1c74f7ec5
This commit is contained in:
Cykesiopka 2016-08-31 19:51:18 +08:00
parent fd03bd37e1
commit 2c7b7b622f
2 changed files with 20 additions and 19 deletions

View File

@ -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;
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;
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

View File

@ -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 *