Bug 1626161 - followup - rs=clang-format
authorMagnus Melin <mkmelin+mozilla@iki.fi>
Fri, 03 Apr 2020 13:38:10 +0300
changeset 29174 7e35670fce68f481c32ba9a207cbea3dd0a09093
parent 29173 4fd2ffb624922351c4c7ec6a775c78b436339fb3
child 29175 1d6dea4edf1a948dd913439e6a98aa1e7afceefc
push id17233
push usermkmelin@iki.fi
push dateFri, 03 Apr 2020 10:41:17 +0000
treeherdercomm-central@1d6dea4edf1a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersclang-format
bugs1626161
Bug 1626161 - followup - rs=clang-format
mailnews/base/src/nsMessengerWinIntegration.cpp
--- a/mailnews/base/src/nsMessengerWinIntegration.cpp
+++ b/mailnews/base/src/nsMessengerWinIntegration.cpp
@@ -1058,34 +1058,34 @@ nsresult nsMessengerWinIntegration::Setu
       OnUnreadCountUpdateTimer, (void *)this, UNREAD_UPDATE_INTERVAL,
       nsITimer::TYPE_ONE_SHOT,
       "nsMessengerWinIntegration::OnUnreadCountUpdateTimer");
 
   return NS_OK;
 }
 
 NOTIFYICONDATAW sMailIconData = {
-  /* cbSize */ (DWORD)NOTIFYICONDATAW_V2_SIZE,
-  /* hWnd */ 0,
-  /* uID */ 2,
-  /* uFlags */ NIF_ICON | NIF_MESSAGE | NIF_TIP | NIF_INFO,
-  /* uCallbackMessage */ WM_USER,
-  /* hIcon */ 0,
-  /* szTip */ L"",
-  /* dwState */ 0,
-  /* dwStateMask */ 0,
-  /* szInfo */ L"",
-  /* uVersion */ {30000},
-  /* szInfoTitle */ L"",
-  /* dwInfoFlags */ NIIF_USER | NIIF_NOSOUND
-};
+    /* cbSize */ (DWORD)NOTIFYICONDATAW_V2_SIZE,
+    /* hWnd */ 0,
+    /* uID */ 2,
+    /* uFlags */ NIF_ICON | NIF_MESSAGE | NIF_TIP | NIF_INFO,
+    /* uCallbackMessage */ WM_USER,
+    /* hIcon */ 0,
+    /* szTip */ L"",
+    /* dwState */ 0,
+    /* dwStateMask */ 0,
+    /* szInfo */ L"",
+    /* uVersion */ {30000},
+    /* szInfoTitle */ L"",
+    /* dwInfoFlags */ NIIF_USER | NIIF_NOSOUND};
 
 static nsCOMArray<nsIBaseWindow> sHiddenWindows;
 static HWND sIconWindow;
-static LRESULT CALLBACK IconWindowProc(HWND msgWindow, UINT msg, WPARAM wp, LPARAM lp) {
+static LRESULT CALLBACK IconWindowProc(HWND msgWindow, UINT msg, WPARAM wp,
+                                       LPARAM lp) {
   if (msg == WM_USER && lp == WM_LBUTTONDOWN) {
     ::Shell_NotifyIconW(NIM_DELETE, &sMailIconData);
 
     uint32_t count = sHiddenWindows.Length();
     for (uint32_t i = 0; i < count; i++) {
       sHiddenWindows[i]->SetVisibility(true);
 
       nsCOMPtr<nsIWidget> widget;
@@ -1097,57 +1097,57 @@ static LRESULT CALLBACK IconWindowProc(H
     }
 
     sHiddenWindows.Clear();
   }
   return TRUE;
 }
 
 WNDCLASS sClassStruct = {
-  /* style */ 0,
-  /* lpfnWndProc */ &IconWindowProc,
-  /* cbClsExtra */ 0,
-  /* cbWndExtra */ 0,
-  /* hInstance */ 0,
-  /* hIcon */ 0,
-  /* hCursor */ 0,
-  /* hbrBackground */ 0,
-  /* lpszMenuName */ 0,
-  /* lpszClassName */ L"IconWindowClass"
-};
+    /* style */ 0,
+    /* lpfnWndProc */ &IconWindowProc,
+    /* cbClsExtra */ 0,
+    /* cbWndExtra */ 0,
+    /* hInstance */ 0,
+    /* hIcon */ 0,
+    /* hCursor */ 0,
+    /* hbrBackground */ 0,
+    /* lpszMenuName */ 0,
+    /* lpszClassName */ L"IconWindowClass"};
 
-nsresult nsMessengerWinIntegration::HideWindow(nsIBaseWindow* aWindow) {
+nsresult nsMessengerWinIntegration::HideWindow(nsIBaseWindow *aWindow) {
   aWindow->SetVisibility(false);
   sHiddenWindows.AppendElement(aWindow);
 
   if (sMailIconData.hWnd == 0) {
     // Register the window class.
     NS_ENSURE_TRUE(::RegisterClass(&sClassStruct), NS_ERROR_FAILURE);
     // Create the window.
-    NS_ENSURE_TRUE(
-      sIconWindow = ::CreateWindow(
-        /* className */ L"IconWindowClass",
-        /* title */ 0,
-        /* style */ WS_CAPTION,
-        /* x, y, cx, cy */ 0, 0, 0, 0,
-        /* parent */ 0,
-        /* menu */ 0,
-        /* instance */ 0,
-        /* create struct */ 0
-      ),
-      NS_ERROR_FAILURE
-    );
+    NS_ENSURE_TRUE(sIconWindow = ::CreateWindow(
+                       /* className */ L"IconWindowClass",
+                       /* title */ 0,
+                       /* style */ WS_CAPTION,
+                       /* x, y, cx, cy */ 0, 0, 0, 0,
+                       /* parent */ 0,
+                       /* menu */ 0,
+                       /* instance */ 0,
+                       /* create struct */ 0),
+                   NS_ERROR_FAILURE);
     sMailIconData.hWnd = sIconWindow;
-    sMailIconData.hIcon = ::LoadIcon(::GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_APPLICATION));
+    sMailIconData.hIcon =
+        ::LoadIcon(::GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_APPLICATION));
 
-    nsCOMPtr<nsIStringBundleService> bundleService = mozilla::services::GetStringBundleService();
+    nsCOMPtr<nsIStringBundleService> bundleService =
+        mozilla::services::GetStringBundleService();
     NS_ENSURE_TRUE(bundleService, NS_ERROR_UNEXPECTED);
     nsCOMPtr<nsIStringBundle> bundle;
-    bundleService->CreateBundle("chrome://branding/locale/brand.properties", getter_AddRefs(bundle));
+    bundleService->CreateBundle("chrome://branding/locale/brand.properties",
+                                getter_AddRefs(bundle));
     nsString brandShortName;
     bundle->GetStringFromName("brandShortName", brandShortName);
-    ::wcsncpy(sMailIconData.szTip, brandShortName.get(), brandShortName.Length());
+    ::wcsncpy(sMailIconData.szTip, brandShortName.get(),
+              brandShortName.Length());
   }
 
   ::Shell_NotifyIconW(NIM_ADD, &sMailIconData);
   ::Shell_NotifyIconW(NIM_SETVERSION, &sMailIconData);
   return NS_OK;
 }