Bug 1523969 part 26 - Move method definition inline comments to new line in 'widget/'. r=mstange
authorRyan Hunt <rhunt@eqrion.net>
Mon, 25 Feb 2019 16:13:48 -0600
changeset 519789 0707c5d273227aed4fb04a8f6360875165f83ddd
parent 519788 a909cb872007c22cea076783ddf93cb25a332d1c
child 519790 49477020b62874f586a180d2ff049a3d6fb4e587
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange
bugs1523969
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1523969 part 26 - Move method definition inline comments to new line in 'widget/'. r=mstange Differential Revision: https://phabricator.services.mozilla.com/D21130
widget/InProcessCompositorWidget.cpp
widget/PuppetWidget.cpp
widget/WidgetEventImpl.cpp
widget/android/ScreenHelperAndroid.cpp
widget/android/nsWindow.cpp
widget/gtk/InProcessGtkCompositorWidget.cpp
widget/gtk/WakeLockListener.cpp
widget/gtk/nsAppShell.cpp
widget/gtk/nsApplicationChooser.cpp
widget/gtk/nsColorPicker.cpp
widget/gtk/nsDragService.cpp
widget/gtk/nsFilePicker.cpp
widget/gtk/nsGtkKeyUtils.cpp
widget/gtk/nsNativeThemeGTK.cpp
widget/gtk/nsSound.cpp
widget/gtk/nsWindow.cpp
widget/headless/HeadlessScreenHelper.cpp
widget/headless/HeadlessWidget.cpp
widget/nsAutoRollup.cpp
widget/nsBaseWidget.cpp
widget/nsNativeTheme.cpp
widget/windows/InProcessWinCompositorWidget.cpp
widget/windows/WinCompositorWindowThread.cpp
widget/windows/WinUtils.cpp
widget/windows/nsLookAndFeel.cpp
widget/windows/nsSound.cpp
widget/windows/nsWindow.cpp
--- a/widget/InProcessCompositorWidget.cpp
+++ b/widget/InProcessCompositorWidget.cpp
@@ -12,17 +12,18 @@
 #endif
 
 namespace mozilla {
 namespace widget {
 
 // Platforms with no OOP compositor process support use
 // InProcessCompositorWidget by default.
 #if !defined(MOZ_WIDGET_SUPPORTS_OOP_COMPOSITING)
-/* static */ RefPtr<CompositorWidget> CompositorWidget::CreateLocal(
+/* static */
+RefPtr<CompositorWidget> CompositorWidget::CreateLocal(
     const CompositorWidgetInitData& aInitData,
     const layers::CompositorOptions& aOptions, nsIWidget* aWidget) {
   MOZ_ASSERT(aWidget);
 #  ifdef MOZ_WIDGET_ANDROID
   return new AndroidCompositorWidget(aOptions,
                                      static_cast<nsBaseWidget*>(aWidget));
 #  else
   return new InProcessCompositorWidget(aOptions,
--- a/widget/PuppetWidget.cpp
+++ b/widget/PuppetWidget.cpp
@@ -40,18 +40,18 @@ using namespace mozilla::widget;
 
 static void InvalidateRegion(nsIWidget* aWidget,
                              const LayoutDeviceIntRegion& aRegion) {
   for (auto iter = aRegion.RectIter(); !iter.Done(); iter.Next()) {
     aWidget->Invalidate(iter.Get());
   }
 }
 
-/*static*/ already_AddRefed<nsIWidget> nsIWidget::CreatePuppetWidget(
-    TabChild* aTabChild) {
+/*static*/
+already_AddRefed<nsIWidget> nsIWidget::CreatePuppetWidget(TabChild* aTabChild) {
   MOZ_ASSERT(!aTabChild || nsIWidget::UsePuppetWidgets(),
              "PuppetWidgets not allowed in this configuration");
 
   nsCOMPtr<nsIWidget> widget = new PuppetWidget(aTabChild);
   return widget.forget();
 }
 
 namespace mozilla {
--- a/widget/WidgetEventImpl.cpp
+++ b/widget/WidgetEventImpl.cpp
@@ -569,26 +569,28 @@ Modifier WidgetInputEvent::AccelModifier
   }
   return sAccelModifier;
 }
 
 /******************************************************************************
  * mozilla::WidgetMouseEvent (MouseEvents.h)
  ******************************************************************************/
 
-/* static */ bool WidgetMouseEvent::IsMiddleClickPasteEnabled() {
+/* static */
+bool WidgetMouseEvent::IsMiddleClickPasteEnabled() {
   return Preferences::GetBool("middlemouse.paste", false);
 }
 
 /******************************************************************************
  * mozilla::WidgetWheelEvent (MouseEvents.h)
  ******************************************************************************/
 
-/* static */ double WidgetWheelEvent::ComputeOverriddenDelta(
-    double aDelta, bool aIsForVertical) {
+/* static */
+double WidgetWheelEvent::ComputeOverriddenDelta(double aDelta,
+                                                bool aIsForVertical) {
   if (!gfxPrefs::MouseWheelHasRootScrollDeltaOverride()) {
     return aDelta;
   }
   int32_t intFactor = aIsForVertical
                           ? gfxPrefs::MouseWheelRootScrollVerticalFactor()
                           : gfxPrefs::MouseWheelRootScrollHorizontalFactor();
   // Making the scroll speed slower doesn't make sense. So, ignore odd factor
   // which is less than 1.0.
@@ -988,79 +990,84 @@ int32_t WidgetKeyboardEvent::ContentAcce
     nsresult rv =
         Preferences::AddIntVarCache(&sValue, "ui.key.contentAccess", sValue);
     sInitialized = NS_SUCCEEDED(rv);
     MOZ_ASSERT(sInitialized);
   }
   return sValue;
 }
 
-/* static */ void WidgetKeyboardEvent::Shutdown() {
+/* static */
+void WidgetKeyboardEvent::Shutdown() {
   delete sKeyNameIndexHashtable;
   sKeyNameIndexHashtable = nullptr;
   delete sCodeNameIndexHashtable;
   sCodeNameIndexHashtable = nullptr;
 }
 
-/* static */ void WidgetKeyboardEvent::GetDOMKeyName(KeyNameIndex aKeyNameIndex,
-                                                     nsAString& aKeyName) {
+/* static */
+void WidgetKeyboardEvent::GetDOMKeyName(KeyNameIndex aKeyNameIndex,
+                                        nsAString& aKeyName) {
   if (aKeyNameIndex >= KEY_NAME_INDEX_USE_STRING) {
     aKeyName.Truncate();
     return;
   }
 
   MOZ_RELEASE_ASSERT(
       static_cast<size_t>(aKeyNameIndex) < ArrayLength(kKeyNames),
       "Illegal key enumeration value");
   aKeyName = kKeyNames[aKeyNameIndex];
 }
 
-/* static */ void WidgetKeyboardEvent::GetDOMCodeName(
-    CodeNameIndex aCodeNameIndex, nsAString& aCodeName) {
+/* static */
+void WidgetKeyboardEvent::GetDOMCodeName(CodeNameIndex aCodeNameIndex,
+                                         nsAString& aCodeName) {
   if (aCodeNameIndex >= CODE_NAME_INDEX_USE_STRING) {
     aCodeName.Truncate();
     return;
   }
 
   MOZ_RELEASE_ASSERT(
       static_cast<size_t>(aCodeNameIndex) < ArrayLength(kCodeNames),
       "Illegal physical code enumeration value");
   aCodeName = kCodeNames[aCodeNameIndex];
 }
 
-/* static */ KeyNameIndex WidgetKeyboardEvent::GetKeyNameIndex(
-    const nsAString& aKeyValue) {
+/* static */
+KeyNameIndex WidgetKeyboardEvent::GetKeyNameIndex(const nsAString& aKeyValue) {
   if (!sKeyNameIndexHashtable) {
     sKeyNameIndexHashtable = new KeyNameIndexHashtable(ArrayLength(kKeyNames));
     for (size_t i = 0; i < ArrayLength(kKeyNames); i++) {
       sKeyNameIndexHashtable->Put(nsDependentString(kKeyNames[i]),
                                   static_cast<KeyNameIndex>(i));
     }
   }
   KeyNameIndex result = KEY_NAME_INDEX_USE_STRING;
   sKeyNameIndexHashtable->Get(aKeyValue, &result);
   return result;
 }
 
-/* static */ CodeNameIndex WidgetKeyboardEvent::GetCodeNameIndex(
+/* static */
+CodeNameIndex WidgetKeyboardEvent::GetCodeNameIndex(
     const nsAString& aCodeValue) {
   if (!sCodeNameIndexHashtable) {
     sCodeNameIndexHashtable =
         new CodeNameIndexHashtable(ArrayLength(kCodeNames));
     for (size_t i = 0; i < ArrayLength(kCodeNames); i++) {
       sCodeNameIndexHashtable->Put(nsDependentString(kCodeNames[i]),
                                    static_cast<CodeNameIndex>(i));
     }
   }
   CodeNameIndex result = CODE_NAME_INDEX_USE_STRING;
   sCodeNameIndexHashtable->Get(aCodeValue, &result);
   return result;
 }
 
-/* static */ uint32_t WidgetKeyboardEvent::GetFallbackKeyCodeOfPunctuationKey(
+/* static */
+uint32_t WidgetKeyboardEvent::GetFallbackKeyCodeOfPunctuationKey(
     CodeNameIndex aCodeNameIndex) {
   switch (aCodeNameIndex) {
     case CODE_NAME_INDEX_Semicolon:  // VK_OEM_1 on Windows
       return dom::KeyboardEvent_Binding::DOM_VK_SEMICOLON;
     case CODE_NAME_INDEX_Equal:  // VK_OEM_PLUS on Windows
       return dom::KeyboardEvent_Binding::DOM_VK_EQUALS;
     case CODE_NAME_INDEX_Comma:  // VK_OEM_COMMA on Windows
       return dom::KeyboardEvent_Binding::DOM_VK_COMMA;
@@ -1099,17 +1106,18 @@ int32_t WidgetKeyboardEvent::ContentAcce
 #undef NS_DEFINE_COMMAND
 #undef NS_DEFINE_COMMAND_NO_EXEC_COMMAND
 
   MOZ_RELEASE_ASSERT(static_cast<size_t>(aCommand) < ArrayLength(kCommands),
                      "Illegal command enumeration value");
   return kCommands[aCommand];
 }
 
-/* static */ uint32_t WidgetKeyboardEvent::ComputeLocationFromCodeValue(
+/* static */
+uint32_t WidgetKeyboardEvent::ComputeLocationFromCodeValue(
     CodeNameIndex aCodeNameIndex) {
   // Following commented out cases are not defined in PhysicalKeyCodeNameList.h
   // but are defined by D3E spec.  So, they should be uncommented when the
   // code values are defined in the header.
   switch (aCodeNameIndex) {
     case CODE_NAME_INDEX_AltLeft:
     case CODE_NAME_INDEX_ControlLeft:
     case CODE_NAME_INDEX_OSLeft:
@@ -1149,17 +1157,18 @@ int32_t WidgetKeyboardEvent::ContentAcce
     case CODE_NAME_INDEX_NumpadParenRight:
     case CODE_NAME_INDEX_NumpadSubtract:
       return eKeyLocationNumpad;
     default:
       return eKeyLocationStandard;
   }
 }
 
-/* static */ uint32_t WidgetKeyboardEvent::ComputeKeyCodeFromKeyNameIndex(
+/* static */
+uint32_t WidgetKeyboardEvent::ComputeKeyCodeFromKeyNameIndex(
     KeyNameIndex aKeyNameIndex) {
   switch (aKeyNameIndex) {
     case KEY_NAME_INDEX_Cancel:
       return dom::KeyboardEvent_Binding::DOM_VK_CANCEL;
     case KEY_NAME_INDEX_Help:
       return dom::KeyboardEvent_Binding::DOM_VK_HELP;
     case KEY_NAME_INDEX_Backspace:
       return dom::KeyboardEvent_Binding::DOM_VK_BACK_SPACE;
@@ -1320,18 +1329,18 @@ int32_t WidgetKeyboardEvent::ContentAcce
     case KEY_NAME_INDEX_ZoomIn:
     case KEY_NAME_INDEX_ZoomOut:
       return dom::KeyboardEvent_Binding::DOM_VK_ZOOM;
     default:
       return 0;
   }
 }
 
-/* static */ CodeNameIndex
-WidgetKeyboardEvent::ComputeCodeNameIndexFromKeyNameIndex(
+/* static */
+CodeNameIndex WidgetKeyboardEvent::ComputeCodeNameIndexFromKeyNameIndex(
     KeyNameIndex aKeyNameIndex, const Maybe<uint32_t>& aLocation) {
   if (aLocation.isSome() &&
       aLocation.value() ==
           dom::KeyboardEvent_Binding::DOM_KEY_LOCATION_NUMPAD) {
     // On macOS, NumLock is not supported.  Therefore, this handles
     // control key values except "Enter" only on non-macOS platforms.
     switch (aKeyNameIndex) {
 #ifndef XP_MACOSX
@@ -1641,17 +1650,18 @@ WidgetKeyboardEvent::ComputeCodeNameInde
       return CODE_NAME_INDEX_Lang1;
 #endif  // #ifdef XP_MACOSX
 
     default:
       return CODE_NAME_INDEX_UNKNOWN;
   }
 }
 
-/* static */ Modifier WidgetKeyboardEvent::GetModifierForKeyName(
+/* static */
+Modifier WidgetKeyboardEvent::GetModifierForKeyName(
     KeyNameIndex aKeyNameIndex) {
   switch (aKeyNameIndex) {
     case KEY_NAME_INDEX_Alt:
       return MODIFIER_ALT;
     case KEY_NAME_INDEX_AltGraph:
       return MODIFIER_ALTGRAPH;
     case KEY_NAME_INDEX_CapsLock:
       return MODIFIER_CAPSLOCK;
@@ -1677,18 +1687,18 @@ WidgetKeyboardEvent::ComputeCodeNameInde
       return MODIFIER_SYMBOL;
     case KEY_NAME_INDEX_SymbolLock:
       return MODIFIER_SYMBOLLOCK;
     default:
       return MODIFIER_NONE;
   }
 }
 
-/* static */ bool WidgetKeyboardEvent::IsLockableModifier(
-    KeyNameIndex aKeyNameIndex) {
+/* static */
+bool WidgetKeyboardEvent::IsLockableModifier(KeyNameIndex aKeyNameIndex) {
   switch (aKeyNameIndex) {
     case KEY_NAME_INDEX_CapsLock:
     case KEY_NAME_INDEX_FnLock:
     case KEY_NAME_INDEX_NumLock:
     case KEY_NAME_INDEX_ScrollLock:
     case KEY_NAME_INDEX_SymbolLock:
       return true;
     default:
@@ -1704,36 +1714,39 @@ WidgetKeyboardEvent::ComputeCodeNameInde
 const char16_t* const InternalEditorInputEvent::kInputTypeNames[] = {
 #include "mozilla/InputTypeList.h"
 };
 #undef NS_DEFINE_INPUTTYPE
 
 InternalEditorInputEvent::InputTypeHashtable*
     InternalEditorInputEvent::sInputTypeHashtable = nullptr;
 
-/* static */ void InternalEditorInputEvent::Shutdown() {
+/* static */
+void InternalEditorInputEvent::Shutdown() {
   delete sInputTypeHashtable;
   sInputTypeHashtable = nullptr;
 }
 
-/* static */ void InternalEditorInputEvent::GetDOMInputTypeName(
-    EditorInputType aInputType, nsAString& aInputTypeName) {
+/* static */
+void InternalEditorInputEvent::GetDOMInputTypeName(EditorInputType aInputType,
+                                                   nsAString& aInputTypeName) {
   if (static_cast<size_t>(aInputType) >=
       static_cast<size_t>(EditorInputType::eUnknown)) {
     aInputTypeName.Truncate();
     return;
   }
 
   MOZ_RELEASE_ASSERT(
       static_cast<size_t>(aInputType) < ArrayLength(kInputTypeNames),
       "Illegal input type enumeration value");
   aInputTypeName.Assign(kInputTypeNames[static_cast<size_t>(aInputType)]);
 }
 
-/* static */ EditorInputType InternalEditorInputEvent::GetEditorInputType(
+/* static */
+EditorInputType InternalEditorInputEvent::GetEditorInputType(
     const nsAString& aInputType) {
   if (aInputType.IsEmpty()) {
     return EditorInputType::eUnknown;
   }
 
   if (!sInputTypeHashtable) {
     sInputTypeHashtable = new InputTypeHashtable(ArrayLength(kInputTypeNames));
     for (size_t i = 0; i < ArrayLength(kInputTypeNames); i++) {
--- a/widget/android/ScreenHelperAndroid.cpp
+++ b/widget/android/ScreenHelperAndroid.cpp
@@ -79,19 +79,18 @@ ScreenHelperAndroid::ScreenHelperAndroid
 
   ScreenHelperSupport::Base::Init();
 
   Refresh();
 }
 
 ScreenHelperAndroid::~ScreenHelperAndroid() { gHelper = nullptr; }
 
-/* static */ ScreenHelperAndroid* ScreenHelperAndroid::GetSingleton() {
-  return gHelper;
-}
+/* static */
+ScreenHelperAndroid* ScreenHelperAndroid::GetSingleton() { return gHelper; }
 
 void ScreenHelperAndroid::Refresh() {
   mScreens.Remove(0);
 
   AutoTArray<RefPtr<Screen>, 1> screenList;
   RefPtr<Screen> screen = MakePrimaryScreen();
   if (screen) {
     mScreens.Put(0, screen);
--- a/widget/android/nsWindow.cpp
+++ b/widget/android/nsWindow.cpp
@@ -1149,17 +1149,18 @@ nsWindow::GeckoViewSupport::~GeckoViewSu
   }
 
   if (window.mSessionAccessibility) {
     window.mSessionAccessibility.Detach(
         window.mSessionAccessibility->GetJavaAccessibility());
   }
 }
 
-/* static */ void nsWindow::GeckoViewSupport::Open(
+/* static */
+void nsWindow::GeckoViewSupport::Open(
     const jni::Class::LocalRef& aCls, GeckoSession::Window::Param aWindow,
     jni::Object::Param aQueue, jni::Object::Param aCompositor,
     jni::Object::Param aDispatcher, jni::Object::Param aSessionAccessibility,
     jni::Object::Param aInitData, jni::String::Param aId,
     jni::String::Param aChromeURI, int32_t aScreenId, bool aPrivateMode) {
   MOZ_ASSERT(NS_IsMainThread());
 
   AUTO_PROFILER_LABEL("nsWindow::GeckoViewSupport::Open", OTHER);
@@ -1314,23 +1315,24 @@ void nsWindow::InitNatives() {
   nsWindow::GeckoViewSupport::Base::Init();
   nsWindow::LayerViewSupport::Init();
   nsWindow::NPZCSupport::Init();
 
   GeckoEditableSupport::Init();
   a11y::SessionAccessibility::Init();
 }
 
-/* static */ already_AddRefed<nsWindow> nsWindow::From(
-    nsPIDOMWindowOuter* aDOMWindow) {
+/* static */
+already_AddRefed<nsWindow> nsWindow::From(nsPIDOMWindowOuter* aDOMWindow) {
   nsCOMPtr<nsIWidget> widget = WidgetUtils::DOMWindowToWidget(aDOMWindow);
   return From(widget);
 }
 
-/* static */ already_AddRefed<nsWindow> nsWindow::From(nsIWidget* aWidget) {
+/* static */
+already_AddRefed<nsWindow> nsWindow::From(nsIWidget* aWidget) {
   // `widget` may be one of several different types in the parent
   // process, including the Android nsWindow, PuppetWidget, etc. To
   // ensure that the cast to the Android nsWindow is valid, we check that the
   // widget is a top-level window and that its NS_NATIVE_WIDGET value is
   // non-null, which is not the case for non-native widgets like
   // PuppetWidget.
   if (aWidget && aWidget->WindowType() == nsWindowType::eWindowType_toplevel &&
       aWidget->GetNativeData(NS_NATIVE_WIDGET) == aWidget) {
--- a/widget/gtk/InProcessGtkCompositorWidget.cpp
+++ b/widget/gtk/InProcessGtkCompositorWidget.cpp
@@ -8,17 +8,18 @@
 #include "mozilla/widget/PlatformWidgetTypes.h"
 
 #include "InProcessGtkCompositorWidget.h"
 #include "nsWindow.h"
 
 namespace mozilla {
 namespace widget {
 
-/* static */ RefPtr<CompositorWidget> CompositorWidget::CreateLocal(
+/* static */
+RefPtr<CompositorWidget> CompositorWidget::CreateLocal(
     const CompositorWidgetInitData& aInitData,
     const layers::CompositorOptions& aOptions, nsIWidget* aWidget) {
   if (aInitData.type() ==
       CompositorWidgetInitData::THeadlessCompositorWidgetInitData) {
     return new HeadlessCompositorWidget(
         aInitData.get_HeadlessCompositorWidgetInitData(), aOptions,
         static_cast<HeadlessWidget*>(aWidget));
   } else {
--- a/widget/gtk/WakeLockListener.cpp
+++ b/widget/gtk/WakeLockListener.cpp
@@ -143,17 +143,18 @@ typedef Bool (*_XScreenSaverQueryVersion
                                              int* minor);
 typedef void (*_XScreenSaverSuspend_fn)(Display* dpy, Bool suspend);
 
 static PRLibrary* sXssLib = nullptr;
 static _XScreenSaverQueryExtension_fn _XSSQueryExtension = nullptr;
 static _XScreenSaverQueryVersion_fn _XSSQueryVersion = nullptr;
 static _XScreenSaverSuspend_fn _XSSSuspend = nullptr;
 
-/* static */ bool WakeLockTopic::CheckXScreenSaverSupport() {
+/* static */
+bool WakeLockTopic::CheckXScreenSaverSupport() {
   if (!sXssLib) {
     sXssLib = PR_LoadLibrary("libXss.so.1");
     if (!sXssLib) {
       return false;
     }
   }
 
   _XSSQueryExtension = (_XScreenSaverQueryExtension_fn)PR_FindFunctionSymbol(
@@ -177,17 +178,18 @@ static _XScreenSaverSuspend_fn _XSSSuspe
   if (!_XSSQueryVersion(display, &major, &minor)) return false;
   // Needs to be compatible with version 1.1
   if (major != 1) return false;
   if (minor < 1) return false;
 
   return true;
 }
 
-/* static */ bool WakeLockTopic::InhibitXScreenSaver(bool inhibit) {
+/* static */
+bool WakeLockTopic::InhibitXScreenSaver(bool inhibit) {
   // Should only be called if CheckXScreenSaverSupport returns true.
   // There's a couple of safety checks here nonetheless.
   if (!_XSSSuspend) return false;
   GdkDisplay* gDisplay = gdk_display_get_default();
   if (!GDK_IS_X11_DISPLAY(gDisplay)) return false;
   Display* display = GDK_DISPLAY_XDISPLAY(gDisplay);
   _XSSSuspend(display, inhibit);
   return true;
@@ -318,18 +320,19 @@ void WakeLockTopic::InhibitSucceeded(uin
 
   if (!mShouldInhibit) {
     // We successfully inhibited the screensaver, but UninhibitScreensaver()
     // was called while we were waiting for a reply.
     SendUninhibit();
   }
 }
 
-/* static */ void WakeLockTopic::ReceiveInhibitReply(DBusPendingCall* pending,
-                                                     void* user_data) {
+/* static */
+void WakeLockTopic::ReceiveInhibitReply(DBusPendingCall* pending,
+                                        void* user_data) {
   if (!WakeLockListener::GetSingleton(false)) {
     // The WakeLockListener (and therefore our topic) was deleted while we were
     // waiting for a reply.
     return;
   }
 
   WakeLockTopic* self = static_cast<WakeLockTopic*>(user_data);
 
@@ -348,25 +351,27 @@ void WakeLockTopic::InhibitSucceeded(uin
     }
   } else {
     self->InhibitFailed();
   }
 }
 
 WakeLockListener::WakeLockListener() : mConnection(nullptr) {}
 
-/* static */ WakeLockListener* WakeLockListener::GetSingleton(bool aCreate) {
+/* static */
+WakeLockListener* WakeLockListener::GetSingleton(bool aCreate) {
   if (!sSingleton && aCreate) {
     sSingleton = new WakeLockListener();
   }
 
   return sSingleton;
 }
 
-/* static */ void WakeLockListener::Shutdown() { sSingleton = nullptr; }
+/* static */
+void WakeLockListener::Shutdown() { sSingleton = nullptr; }
 
 bool WakeLockListener::EnsureDBusConnection() {
   if (!mConnection) {
     mConnection = already_AddRefed<DBusConnection>(
         dbus_bus_get(DBUS_BUS_SESSION, nullptr));
 
     if (mConnection) {
       dbus_connection_set_exit_on_disconnect(mConnection, false);
--- a/widget/gtk/nsAppShell.cpp
+++ b/widget/gtk/nsAppShell.cpp
@@ -100,19 +100,20 @@ static void WrapGdkFrameClockDispose(GOb
   if (g_object_get_qdata(object, sPendingResumeQuark)) {
     g_signal_emit_by_name(object, "resume-events");
   }
 
   sRealGdkFrameClockDispose(object);
 }
 #endif
 
-/*static*/ gboolean nsAppShell::EventProcessorCallback(GIOChannel* source,
-                                                       GIOCondition condition,
-                                                       gpointer data) {
+/*static*/
+gboolean nsAppShell::EventProcessorCallback(GIOChannel* source,
+                                            GIOCondition condition,
+                                            gpointer data) {
   nsAppShell* self = static_cast<nsAppShell*>(data);
 
   unsigned char c;
   Unused << read(self->mPipeFDs[0], &c, 1);
   NS_ASSERTION(c == (unsigned char)NOTIFY_TOKEN, "wrong token");
 
   self->NativeEventCallback();
   return TRUE;
--- a/widget/gtk/nsApplicationChooser.cpp
+++ b/widget/gtk/nsApplicationChooser.cpp
@@ -55,24 +55,24 @@ nsApplicationChooser::Open(const nsACStr
                                      mWindowTitle.BeginReading());
   NS_ADDREF_THIS();
   g_signal_connect(chooser, "response", G_CALLBACK(OnResponse), this);
   g_signal_connect(chooser, "destroy", G_CALLBACK(OnDestroy), this);
   gtk_widget_show(chooser);
   return NS_OK;
 }
 
-/* static */ void nsApplicationChooser::OnResponse(GtkWidget* chooser,
-                                                   gint response_id,
-                                                   gpointer user_data) {
+/* static */
+void nsApplicationChooser::OnResponse(GtkWidget* chooser, gint response_id,
+                                      gpointer user_data) {
   static_cast<nsApplicationChooser*>(user_data)->Done(chooser, response_id);
 }
 
-/* static */ void nsApplicationChooser::OnDestroy(GtkWidget* chooser,
-                                                  gpointer user_data) {
+/* static */
+void nsApplicationChooser::OnDestroy(GtkWidget* chooser, gpointer user_data) {
   static_cast<nsApplicationChooser*>(user_data)->Done(chooser,
                                                       GTK_RESPONSE_CANCEL);
 }
 
 void nsApplicationChooser::Done(GtkWidget* chooser, gint response) {
   nsCOMPtr<nsILocalHandlerApp> localHandler;
   nsresult rv;
   switch (response) {
--- a/widget/gtk/nsColorPicker.cpp
+++ b/widget/gtk/nsColorPicker.cpp
@@ -136,19 +136,19 @@ NS_IMETHODIMP nsColorPicker::Open(
   g_signal_connect(color_chooser, "response", G_CALLBACK(OnResponse), this);
   g_signal_connect(color_chooser, "destroy", G_CALLBACK(OnDestroy), this);
   gtk_widget_show(color_chooser);
 
   return NS_OK;
 }
 
 #if defined(ACTIVATE_GTK3_COLOR_PICKER) && GTK_CHECK_VERSION(3, 4, 0)
-/* static */ void nsColorPicker::OnColorChanged(GtkColorChooser* color_chooser,
-                                                GdkRGBA* color,
-                                                gpointer user_data) {
+/* static */
+void nsColorPicker::OnColorChanged(GtkColorChooser* color_chooser,
+                                   GdkRGBA* color, gpointer user_data) {
   static_cast<nsColorPicker*>(user_data)->Update(color);
 }
 
 void nsColorPicker::Update(GdkRGBA* color) {
   SetColor(color);
   if (mCallback) {
     mCallback->Update(mColor);
   }
@@ -156,18 +156,19 @@ void nsColorPicker::Update(GdkRGBA* colo
 
 void nsColorPicker::SetColor(const GdkRGBA* color) {
   mColor.Assign('#');
   mColor += ToHexString(convertGdkRgbaComponent(color->red));
   mColor += ToHexString(convertGdkRgbaComponent(color->green));
   mColor += ToHexString(convertGdkRgbaComponent(color->blue));
 }
 #else
-/* static */ void nsColorPicker::OnColorChanged(
-    GtkColorSelection* colorselection, gpointer user_data) {
+/* static */
+void nsColorPicker::OnColorChanged(GtkColorSelection* colorselection,
+                                   gpointer user_data) {
   static_cast<nsColorPicker*>(user_data)->Update(colorselection);
 }
 
 void nsColorPicker::Update(GtkColorSelection* colorselection) {
   ReadValueFromColorSelection(colorselection);
   if (mCallback) {
     mCallback->Update(mColor);
   }
@@ -180,24 +181,24 @@ void nsColorPicker::ReadValueFromColorSe
 
   mColor.Assign('#');
   mColor += ToHexString(convertGdkColorComponent(rgba.red));
   mColor += ToHexString(convertGdkColorComponent(rgba.green));
   mColor += ToHexString(convertGdkColorComponent(rgba.blue));
 }
 #endif
 
-/* static */ void nsColorPicker::OnResponse(GtkWidget* color_chooser,
-                                            gint response_id,
-                                            gpointer user_data) {
+/* static */
+void nsColorPicker::OnResponse(GtkWidget* color_chooser, gint response_id,
+                               gpointer user_data) {
   static_cast<nsColorPicker*>(user_data)->Done(color_chooser, response_id);
 }
 
-/* static */ void nsColorPicker::OnDestroy(GtkWidget* color_chooser,
-                                           gpointer user_data) {
+/* static */
+void nsColorPicker::OnDestroy(GtkWidget* color_chooser, gpointer user_data) {
   static_cast<nsColorPicker*>(user_data)->Done(color_chooser,
                                                GTK_RESPONSE_CANCEL);
 }
 
 void nsColorPicker::Done(GtkWidget* color_chooser, gint response) {
   switch (response) {
     case GTK_RESPONSE_OK:
     case GTK_RESPONSE_ACCEPT:
--- a/widget/gtk/nsDragService.cpp
+++ b/widget/gtk/nsDragService.cpp
@@ -141,17 +141,18 @@ nsDragService::nsDragService()
 nsDragService::~nsDragService() {
   MOZ_LOG(sDragLm, LogLevel::Debug, ("nsDragService::~nsDragService"));
   if (mTaskSource) g_source_remove(mTaskSource);
 }
 
 NS_IMPL_ISUPPORTS_INHERITED(nsDragService, nsBaseDragService, nsIObserver)
 
 mozilla::StaticRefPtr<nsDragService> sDragServiceInstance;
-/* static */ already_AddRefed<nsDragService> nsDragService::GetInstance() {
+/* static */
+already_AddRefed<nsDragService> nsDragService::GetInstance() {
   if (gfxPlatform::IsHeadless()) {
     return nullptr;
   }
   if (!sDragServiceInstance) {
     sDragServiceInstance = new nsDragService();
     ClearOnShutdown(&sDragServiceInstance);
   }
 
@@ -2027,11 +2028,12 @@ gboolean nsDragService::DispatchDropEven
 
   EventMessage msg = mCanDrop ? eDrop : eDragExit;
 
   mTargetWindow->DispatchDragEvent(msg, mTargetWindowPoint, mTargetTime);
 
   return mCanDrop;
 }
 
-/* static */ uint32_t nsDragService::GetCurrentModifiers() {
+/* static */
+uint32_t nsDragService::GetCurrentModifiers() {
   return mozilla::widget::KeymapWrapper::ComputeCurrentKeyModifiers();
 }
--- a/widget/gtk/nsFilePicker.cpp
+++ b/widget/gtk/nsFilePicker.cpp
@@ -490,23 +490,24 @@ nsFilePicker::Open(nsIFilePickerShownCal
   mCallback = aCallback;
   NS_ADDREF_THIS();
   g_signal_connect(file_chooser, "response", G_CALLBACK(OnResponse), this);
   GtkFileChooserShow(file_chooser);
 
   return NS_OK;
 }
 
-/* static */ void nsFilePicker::OnResponse(void *file_chooser, gint response_id,
-                                           gpointer user_data) {
+/* static */
+void nsFilePicker::OnResponse(void *file_chooser, gint response_id,
+                              gpointer user_data) {
   static_cast<nsFilePicker *>(user_data)->Done(file_chooser, response_id);
 }
 
-/* static */ void nsFilePicker::OnDestroy(GtkWidget *file_chooser,
-                                          gpointer user_data) {
+/* static */
+void nsFilePicker::OnDestroy(GtkWidget *file_chooser, gpointer user_data) {
   static_cast<nsFilePicker *>(user_data)->Done(file_chooser,
                                                GTK_RESPONSE_CANCEL);
 }
 
 void nsFilePicker::Done(void *file_chooser, gint response) {
   mRunning = false;
 
   int16_t result;
--- a/widget/gtk/nsGtkKeyUtils.cpp
+++ b/widget/gtk/nsGtkKeyUtils.cpp
@@ -311,27 +311,29 @@ KeymapWrapper::ModifierKey* KeymapWrappe
     ModifierKey& key = mModifierKeys[i];
     if (key.mHardwareKeycode == aHardwareKeycode) {
       return &key;
     }
   }
   return nullptr;
 }
 
-/* static */ KeymapWrapper* KeymapWrapper::GetInstance() {
+/* static */
+KeymapWrapper* KeymapWrapper::GetInstance() {
   if (sInstance) {
     sInstance->Init();
     return sInstance;
   }
 
   sInstance = new KeymapWrapper();
   return sInstance;
 }
 
-/* static */ void KeymapWrapper::Shutdown() {
+/* static */
+void KeymapWrapper::Shutdown() {
   if (sInstance) {
     delete sInstance;
     sInstance = nullptr;
   }
 }
 
 KeymapWrapper::KeymapWrapper()
     : mInitialized(false),
@@ -767,19 +769,20 @@ KeymapWrapper::~KeymapWrapper() {
   g_signal_handlers_disconnect_by_func(mGdkKeymap,
                                        FuncToGpointer(OnKeysChanged), this);
   g_signal_handlers_disconnect_by_func(
       mGdkKeymap, FuncToGpointer(OnDirectionChanged), this);
   g_object_unref(mGdkKeymap);
   MOZ_LOG(gKeymapWrapperLog, LogLevel::Info, ("%p Destructor", this));
 }
 
-/* static */ GdkFilterReturn KeymapWrapper::FilterEvents(GdkXEvent* aXEvent,
-                                                         GdkEvent* aGdkEvent,
-                                                         gpointer aData) {
+/* static */
+GdkFilterReturn KeymapWrapper::FilterEvents(GdkXEvent* aXEvent,
+                                            GdkEvent* aGdkEvent,
+                                            gpointer aData) {
   XEvent* xEvent = static_cast<XEvent*>(aXEvent);
   switch (xEvent->type) {
     case KeyPress: {
       // If the key doesn't support auto repeat, ignore the event because
       // even if such key (e.g., Shift) is pressed during auto repeat of
       // anoter key, it doesn't stop the auto repeat.
       KeymapWrapper* self = static_cast<KeymapWrapper*>(aData);
       if (!self->IsAutoRepeatableKey(xEvent->xkey.keycode)) {
@@ -889,18 +892,19 @@ static void ResetBidiKeyboard() {
   // Reset the bidi keyboard settings for the new GdkKeymap
   nsCOMPtr<nsIBidiKeyboard> bidiKeyboard = nsContentUtils::GetBidiKeyboard();
   if (bidiKeyboard) {
     bidiKeyboard->Reset();
   }
   WidgetUtils::SendBidiKeyboardInfoToContent();
 }
 
-/* static */ void KeymapWrapper::OnKeysChanged(GdkKeymap* aGdkKeymap,
-                                               KeymapWrapper* aKeymapWrapper) {
+/* static */
+void KeymapWrapper::OnKeysChanged(GdkKeymap* aGdkKeymap,
+                                  KeymapWrapper* aKeymapWrapper) {
   MOZ_LOG(gKeymapWrapperLog, LogLevel::Info,
           ("OnKeysChanged, aGdkKeymap=%p, aKeymapWrapper=%p", aGdkKeymap,
            aKeymapWrapper));
 
   MOZ_ASSERT(sInstance == aKeymapWrapper,
              "This instance must be the singleton instance");
 
   // We cannot reintialize here becasue we don't have GdkWindow which is using
@@ -922,52 +926,56 @@ void KeymapWrapper::OnDirectionChanged(G
 
   MOZ_LOG(gKeymapWrapperLog, LogLevel::Info,
           ("OnDirectionChanged, aGdkKeymap=%p, aKeymapWrapper=%p", aGdkKeymap,
            aKeymapWrapper));
 
   ResetBidiKeyboard();
 }
 
-/* static */ guint KeymapWrapper::GetCurrentModifierState() {
+/* static */
+guint KeymapWrapper::GetCurrentModifierState() {
   GdkModifierType modifiers;
   gdk_display_get_pointer(gdk_display_get_default(), nullptr, nullptr, nullptr,
                           &modifiers);
   return static_cast<guint>(modifiers);
 }
 
-/* static */ bool KeymapWrapper::AreModifiersCurrentlyActive(
-    Modifiers aModifiers) {
+/* static */
+bool KeymapWrapper::AreModifiersCurrentlyActive(Modifiers aModifiers) {
   guint modifierState = GetCurrentModifierState();
   return AreModifiersActive(aModifiers, modifierState);
 }
 
-/* static */ bool KeymapWrapper::AreModifiersActive(Modifiers aModifiers,
-                                                    guint aModifierState) {
+/* static */
+bool KeymapWrapper::AreModifiersActive(Modifiers aModifiers,
+                                       guint aModifierState) {
   NS_ENSURE_TRUE(aModifiers, false);
 
   KeymapWrapper* keymapWrapper = GetInstance();
   for (uint32_t i = 0; i < sizeof(Modifier) * 8 && aModifiers; i++) {
     Modifier modifier = static_cast<Modifier>(1 << i);
     if (!(aModifiers & modifier)) {
       continue;
     }
     if (!(aModifierState & keymapWrapper->GetModifierMask(modifier))) {
       return false;
     }
     aModifiers &= ~modifier;
   }
   return true;
 }
 
-/* static */ uint32_t KeymapWrapper::ComputeCurrentKeyModifiers() {
+/* static */
+uint32_t KeymapWrapper::ComputeCurrentKeyModifiers() {
   return ComputeKeyModifiers(GetCurrentModifierState());
 }
 
-/* static */ uint32_t KeymapWrapper::ComputeKeyModifiers(guint aModifierState) {
+/* static */
+uint32_t KeymapWrapper::ComputeKeyModifiers(guint aModifierState) {
   KeymapWrapper* keymapWrapper = GetInstance();
 
   uint32_t keyModifiers = 0;
   // DOM Meta key should be TRUE only on Mac.  We need to discuss this
   // issue later.
   if (keymapWrapper->AreModifiersActive(SHIFT, aModifierState)) {
     keyModifiers |= MODIFIER_SHIFT;
   }
@@ -995,18 +1003,19 @@ void KeymapWrapper::OnDirectionChanged(G
     keyModifiers |= MODIFIER_NUMLOCK;
   }
   if (keymapWrapper->AreModifiersActive(SCROLL_LOCK, aModifierState)) {
     keyModifiers |= MODIFIER_SCROLLLOCK;
   }
   return keyModifiers;
 }
 
-/* static */ void KeymapWrapper::InitInputEvent(WidgetInputEvent& aInputEvent,
-                                                guint aModifierState) {
+/* static */
+void KeymapWrapper::InitInputEvent(WidgetInputEvent& aInputEvent,
+                                   guint aModifierState) {
   KeymapWrapper* keymapWrapper = GetInstance();
 
   aInputEvent.mModifiers = ComputeKeyModifiers(aModifierState);
 
   // Don't log this method for non-important events because e.g., eMouseMove is
   // just noisy and there is no reason to log it.
   bool doLog = aInputEvent.mMessage != eMouseMove;
   if (doLog) {
@@ -1062,18 +1071,18 @@ void KeymapWrapper::OnDirectionChanged(G
          GetBoolName(mouseEvent.buttons & WidgetMouseEvent::eLeftButtonFlag),
          GetBoolName(mouseEvent.buttons & WidgetMouseEvent::eRightButtonFlag),
          GetBoolName(mouseEvent.buttons & WidgetMouseEvent::eMiddleButtonFlag),
          GetBoolName(mouseEvent.buttons & WidgetMouseEvent::e4thButtonFlag),
          GetBoolName(mouseEvent.buttons & WidgetMouseEvent::e5thButtonFlag)));
   }
 }
 
-/* static */ uint32_t KeymapWrapper::ComputeDOMKeyCode(
-    const GdkEventKey* aGdkKeyEvent) {
+/* static */
+uint32_t KeymapWrapper::ComputeDOMKeyCode(const GdkEventKey* aGdkKeyEvent) {
   // If the keyval indicates it's a modifier key, we should use unshifted
   // key's modifier keyval.
   guint keyval = aGdkKeyEvent->keyval;
   if (GetModifierForGDKKeyval(keyval)) {
     // But if the keyval without modifiers isn't a modifier key, we
     // shouldn't use it.  E.g., Japanese keyboard layout's
     // Shift + Eisu-Toggle key is CapsLock.  This is an actual rare case,
     // Windows uses different keycode for a physical key for different
@@ -1284,17 +1293,18 @@ KeyNameIndex KeymapWrapper::ComputeDOMKe
 
     default:
       break;
   }
 
   return KEY_NAME_INDEX_Unidentified;
 }
 
-/* static */ CodeNameIndex KeymapWrapper::ComputeDOMCodeNameIndex(
+/* static */
+CodeNameIndex KeymapWrapper::ComputeDOMCodeNameIndex(
     const GdkEventKey* aGdkKeyEvent) {
   switch (aGdkKeyEvent->hardware_keycode) {
 #define NS_NATIVE_KEY_TO_DOM_CODE_NAME_INDEX(aNativeKey, aCodeNameIndex) \
   case aNativeKey:                                                       \
     return aCodeNameIndex;
 
 #include "NativeKeyToDOMCodeName.h"
 
@@ -1302,19 +1312,21 @@ KeyNameIndex KeymapWrapper::ComputeDOMKe
 
     default:
       break;
   }
 
   return CODE_NAME_INDEX_UNKNOWN;
 }
 
-/* static */ bool KeymapWrapper::DispatchKeyDownOrKeyUpEvent(
-    nsWindow* aWindow, GdkEventKey* aGdkKeyEvent, bool aIsProcessedByIME,
-    bool* aIsCancelled) {
+/* static */
+bool KeymapWrapper::DispatchKeyDownOrKeyUpEvent(nsWindow* aWindow,
+                                                GdkEventKey* aGdkKeyEvent,
+                                                bool aIsProcessedByIME,
+                                                bool* aIsCancelled) {
   MOZ_ASSERT(aIsCancelled, "aIsCancelled must not be nullptr");
 
   *aIsCancelled = false;
 
   if (aGdkKeyEvent->type == GDK_KEY_PRESS && aGdkKeyEvent->keyval == GDK_Tab &&
       AreModifiersActive(CTRL | ALT, aGdkKeyEvent->state)) {
     MOZ_LOG(gKeymapWrapperLog, LogLevel::Info,
             ("  DispatchKeyDownOrKeyUpEvent(), didn't dispatch keyboard events "
@@ -1324,17 +1336,18 @@ KeyNameIndex KeymapWrapper::ComputeDOMKe
 
   EventMessage message =
       aGdkKeyEvent->type == GDK_KEY_PRESS ? eKeyDown : eKeyUp;
   WidgetKeyboardEvent keyEvent(true, message, aWindow);
   KeymapWrapper::InitKeyEvent(keyEvent, aGdkKeyEvent, aIsProcessedByIME);
   return DispatchKeyDownOrKeyUpEvent(aWindow, keyEvent, aIsCancelled);
 }
 
-/* static */ bool KeymapWrapper::DispatchKeyDownOrKeyUpEvent(
+/* static */
+bool KeymapWrapper::DispatchKeyDownOrKeyUpEvent(
     nsWindow* aWindow, WidgetKeyboardEvent& aKeyboardEvent,
     bool* aIsCancelled) {
   MOZ_ASSERT(aIsCancelled, "aIsCancelled must not be nullptr");
 
   *aIsCancelled = false;
 
   RefPtr<TextEventDispatcher> dispatcher = aWindow->GetTextEventDispatcher();
   nsresult rv = dispatcher->BeginNativeInputTransaction();
@@ -1348,18 +1361,19 @@ KeyNameIndex KeymapWrapper::ComputeDOMKe
 
   nsEventStatus status = nsEventStatus_eIgnore;
   bool dispatched = dispatcher->DispatchKeyboardEvent(
       aKeyboardEvent.mMessage, aKeyboardEvent, status, nullptr);
   *aIsCancelled = (status == nsEventStatus_eConsumeNoDefault);
   return dispatched;
 }
 
-/* static */ bool KeymapWrapper::MaybeDispatchContextMenuEvent(
-    nsWindow* aWindow, const GdkEventKey* aEvent) {
+/* static */
+bool KeymapWrapper::MaybeDispatchContextMenuEvent(nsWindow* aWindow,
+                                                  const GdkEventKey* aEvent) {
   KeyNameIndex keyNameIndex = ComputeDOMKeyNameIndex(aEvent);
 
   // Shift+F10 and ContextMenu should cause eContextMenu event.
   if (keyNameIndex != KEY_NAME_INDEX_F10 &&
       keyNameIndex != KEY_NAME_INDEX_ContextMenu) {
     return false;
   }
 
@@ -1397,18 +1411,19 @@ KeyNameIndex KeymapWrapper::ComputeDOMKe
     }
     contextMenuEvent.mModifiers &= ~MODIFIER_SHIFT;
   }
 
   aWindow->DispatchInputEvent(&contextMenuEvent);
   return true;
 }
 
-/* static*/ void KeymapWrapper::HandleKeyPressEvent(nsWindow* aWindow,
-                                                    GdkEventKey* aGdkKeyEvent) {
+/* static*/
+void KeymapWrapper::HandleKeyPressEvent(nsWindow* aWindow,
+                                        GdkEventKey* aGdkKeyEvent) {
   MOZ_LOG(gKeymapWrapperLog, LogLevel::Info,
           ("HandleKeyPressEvent(aWindow=%p, aGdkKeyEvent={ type=%s, "
            "keyval=%s(0x%X), state=0x%08X, hardware_keycode=0x%08X, "
            "time=%u, is_modifier=%s })",
            aWindow,
            ((aGdkKeyEvent->type == GDK_KEY_PRESS) ? "GDK_KEY_PRESS"
                                                   : "GDK_KEY_RELEASE"),
            gdk_keyval_name(aGdkKeyEvent->keyval), aGdkKeyEvent->keyval,
@@ -1600,18 +1615,19 @@ KeyNameIndex KeymapWrapper::ComputeDOMKe
     textEventDispatcher->CommitComposition(status, &keypressEvent.mKeyValue,
                                            &eventTime);
     MOZ_LOG(gKeymapWrapperLog, LogLevel::Info,
             ("  HandleKeyPressEvent(), dispatched a set of composition "
              "events"));
   }
 }
 
-/* static */ bool KeymapWrapper::HandleKeyReleaseEvent(
-    nsWindow* aWindow, GdkEventKey* aGdkKeyEvent) {
+/* static */
+bool KeymapWrapper::HandleKeyReleaseEvent(nsWindow* aWindow,
+                                          GdkEventKey* aGdkKeyEvent) {
   MOZ_LOG(gKeymapWrapperLog, LogLevel::Info,
           ("HandleKeyReleaseEvent(aWindow=%p, aGdkKeyEvent={ type=%s, "
            "keyval=%s(0x%X), state=0x%08X, hardware_keycode=0x%08X, "
            "time=%u, is_modifier=%s })",
            aWindow,
            ((aGdkKeyEvent->type == GDK_KEY_PRESS) ? "GDK_KEY_PRESS"
                                                   : "GDK_KEY_RELEASE"),
            gdk_keyval_name(aGdkKeyEvent->keyval), aGdkKeyEvent->keyval,
@@ -1640,19 +1656,20 @@ KeyNameIndex KeymapWrapper::ComputeDOMKe
 
   MOZ_LOG(gKeymapWrapperLog, LogLevel::Info,
           ("  HandleKeyReleaseEvent(), dispatched eKeyUp event "
            "(isCancelled=%s)",
            GetBoolName(isCancelled)));
   return true;
 }
 
-/* static */ void KeymapWrapper::InitKeyEvent(WidgetKeyboardEvent& aKeyEvent,
-                                              GdkEventKey* aGdkKeyEvent,
-                                              bool aIsProcessedByIME) {
+/* static */
+void KeymapWrapper::InitKeyEvent(WidgetKeyboardEvent& aKeyEvent,
+                                 GdkEventKey* aGdkKeyEvent,
+                                 bool aIsProcessedByIME) {
   MOZ_ASSERT(
       !aIsProcessedByIME || aKeyEvent.mMessage != eKeyPress,
       "If the key event is handled by IME, keypress event shouldn't be fired");
 
   KeymapWrapper* keymapWrapper = GetInstance();
 
   aKeyEvent.mCodeNameIndex = ComputeDOMCodeNameIndex(aGdkKeyEvent);
   MOZ_ASSERT(aKeyEvent.mCodeNameIndex != CODE_NAME_INDEX_USE_STRING);
@@ -1796,18 +1813,18 @@ KeyNameIndex KeymapWrapper::ComputeDOMKe
        ToString(aKeyEvent.mKeyNameIndex).get(),
        GetCharacterCodeNames(aKeyEvent.mKeyValue).get(),
        ToString(aKeyEvent.mCodeNameIndex).get(),
        GetCharacterCodeNames(aKeyEvent.mCodeValue).get(),
        GetKeyLocationName(aKeyEvent.mLocation).get(),
        GetBoolName(aKeyEvent.mIsRepeat)));
 }
 
-/* static */ uint32_t KeymapWrapper::GetCharCodeFor(
-    const GdkEventKey* aGdkKeyEvent) {
+/* static */
+uint32_t KeymapWrapper::GetCharCodeFor(const GdkEventKey* aGdkKeyEvent) {
   // Anything above 0xf000 is considered a non-printable
   // Exception: directly encoded UCS characters
   if (aGdkKeyEvent->keyval > 0xf000 &&
       (aGdkKeyEvent->keyval & 0xff000000) != 0x01000000) {
     // Keypad keys are an exception: they return a value different
     // from their non-keypad equivalents, but mozilla doesn't distinguish.
     switch (aGdkKeyEvent->keyval) {
       case GDK_KP_Space:
@@ -1955,40 +1972,41 @@ bool KeymapWrapper::IsLatinGroup(guint8 
 bool KeymapWrapper::IsAutoRepeatableKey(guint aHardwareKeyCode) {
   uint8_t indexOfArray = aHardwareKeyCode / 8;
   MOZ_ASSERT(indexOfArray < ArrayLength(mKeyboardState.auto_repeats),
              "invalid index");
   char bitMask = 1 << (aHardwareKeyCode % 8);
   return (mKeyboardState.auto_repeats[indexOfArray] & bitMask) != 0;
 }
 
-/* static */ bool KeymapWrapper::IsBasicLatinLetterOrNumeral(
-    uint32_t aCharCode) {
+/* static */
+bool KeymapWrapper::IsBasicLatinLetterOrNumeral(uint32_t aCharCode) {
   return (aCharCode >= 'a' && aCharCode <= 'z') ||
          (aCharCode >= 'A' && aCharCode <= 'Z') ||
          (aCharCode >= '0' && aCharCode <= '9');
 }
 
-/* static */ guint KeymapWrapper::GetGDKKeyvalWithoutModifier(
+/* static */
+guint KeymapWrapper::GetGDKKeyvalWithoutModifier(
     const GdkEventKey* aGdkKeyEvent) {
   KeymapWrapper* keymapWrapper = GetInstance();
   guint state =
       (aGdkKeyEvent->state & keymapWrapper->GetModifierMask(NUM_LOCK));
   guint keyval;
   if (!gdk_keymap_translate_keyboard_state(
           keymapWrapper->mGdkKeymap, aGdkKeyEvent->hardware_keycode,
           GdkModifierType(state), aGdkKeyEvent->group, &keyval, nullptr,
           nullptr, nullptr)) {
     return 0;
   }
   return keyval;
 }
 
-/* static */ uint32_t KeymapWrapper::GetDOMKeyCodeFromKeyPairs(
-    guint aGdkKeyval) {
+/* static */
+uint32_t KeymapWrapper::GetDOMKeyCodeFromKeyPairs(guint aGdkKeyval) {
   switch (aGdkKeyval) {
     case GDK_Cancel:
       return NS_VK_CANCEL;
     case GDK_BackSpace:
       return NS_VK_BACK;
     case GDK_Tab:
     case GDK_ISO_Left_Tab:
       return NS_VK_TAB;
--- a/widget/gtk/nsNativeThemeGTK.cpp
+++ b/widget/gtk/nsNativeThemeGTK.cpp
@@ -181,18 +181,18 @@ static void SetWidgetStateSafe(uint8_t* 
                                StyleAppearance aAppearance,
                                GtkWidgetState* aWidgetState) {
   MOZ_ASSERT(static_cast<size_t>(aAppearance) <
              static_cast<size_t>(mozilla::StyleAppearance::Count));
   uint16_t key = GetWidgetStateKey(aAppearance, aWidgetState);
   aSafeVector[key >> 3] |= (1 << (key & 7));
 }
 
-/* static */ GtkTextDirection nsNativeThemeGTK::GetTextDirection(
-    nsIFrame* aFrame) {
+/* static */
+GtkTextDirection nsNativeThemeGTK::GetTextDirection(nsIFrame* aFrame) {
   // IsFrameRTL() treats vertical-rl modes as right-to-left (in addition to
   // horizontal text with direction=RTL), rather than just considering the
   // text direction.  GtkTextDirection does not have distinct values for
   // vertical writing modes, but considering the block flow direction is
   // important for resizers and scrollbar elements, at least.
   return IsFrameRTL(aFrame) ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR;
 }
 
--- a/widget/gtk/nsSound.cpp
+++ b/widget/gtk/nsSound.cpp
@@ -182,29 +182,31 @@ nsSound::Init() {
             libcanberra, "ca_context_play_full");
       }
     }
   }
 
   return NS_OK;
 }
 
-/* static */ void nsSound::Shutdown() {
+/* static */
+void nsSound::Shutdown() {
   if (libcanberra) {
     PR_UnloadLibrary(libcanberra);
     libcanberra = nullptr;
   }
 }
 
 namespace mozilla {
 namespace sound {
 StaticRefPtr<nsISound> sInstance;
 }
 }  // namespace mozilla
-/* static */ already_AddRefed<nsISound> nsSound::GetInstance() {
+/* static */
+already_AddRefed<nsISound> nsSound::GetInstance() {
   using namespace mozilla::sound;
 
   if (!sInstance) {
     if (gfxPlatform::IsHeadless()) {
       sInstance = new mozilla::widget::HeadlessSound();
     } else {
       sInstance = new nsSound();
     }
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -445,17 +445,18 @@ nsWindow::~nsWindow() {
   LOG(("nsWindow::~nsWindow() [%p]\n", (void *)this));
 
   delete[] mTransparencyBitmap;
   mTransparencyBitmap = nullptr;
 
   Destroy();
 }
 
-/* static */ void nsWindow::ReleaseGlobals() {
+/* static */
+void nsWindow::ReleaseGlobals() {
   for (auto &cursor : gCursorCache) {
     if (cursor) {
       g_object_unref(cursor);
       cursor = nullptr;
     }
   }
 }
 
@@ -1234,17 +1235,18 @@ static void SetUserTimeAndStartupIDForAc
 #endif
 
   // If we used the startup ID, that already contains the focus timestamp;
   // we don't want to reuse the timestamp next time we raise the window
   GTKToolkit->SetFocusTimestamp(0);
   GTKToolkit->SetDesktopStartupID(EmptyCString());
 }
 
-/* static */ guint32 nsWindow::GetLastUserInputTime() {
+/* static */
+guint32 nsWindow::GetLastUserInputTime() {
   // gdk_x11_display_get_user_time/gtk_get_current_event_time tracks
   // button and key presses, DESKTOP_STARTUP_ID used to start the app,
   // drop events from external drags,
   // WM_DELETE_WINDOW delete events, but not usually mouse motion nor
   // button and key releases.  Therefore use the most recent of
   // gdk_x11_display_get_user_time and the last time that we have seen.
   GdkDisplay *gdkDisplay = gdk_display_get_default();
   guint32 timestamp = GDK_IS_X11_DISPLAY(gdkDisplay)
@@ -4669,18 +4671,18 @@ class FullscreenTransitionData {
  private:
   nsIWidget::FullscreenTransitionStage mStage;
   TimeStamp mStartTime;
   TimeDuration mDuration;
   nsCOMPtr<nsIRunnable> mCallback;
   RefPtr<FullscreenTransitionWindow> mWindow;
 };
 
-/* static */ gboolean FullscreenTransitionData::TimeoutCallback(
-    gpointer aData) {
+/* static */
+gboolean FullscreenTransitionData::TimeoutCallback(gpointer aData) {
   bool finishing = false;
   auto data = static_cast<FullscreenTransitionData *>(aData);
   gdouble opacity = (TimeStamp::Now() - data->mStartTime) / data->mDuration;
   if (opacity >= 1.0) {
     opacity = 1.0;
     finishing = true;
   }
   if (data->mStage == nsIWidget::eAfterFullscreenToggle) {
@@ -4691,29 +4693,31 @@ class FullscreenTransitionData {
   if (!finishing) {
     return TRUE;
   }
   NS_DispatchToMainThread(data->mCallback.forget());
   delete data;
   return FALSE;
 }
 
-/* virtual */ bool nsWindow::PrepareForFullscreenTransition(
-    nsISupports **aData) {
+/* virtual */
+bool nsWindow::PrepareForFullscreenTransition(nsISupports **aData) {
   GdkScreen *screen = gtk_widget_get_screen(mShell);
   if (!gdk_screen_is_composited(screen)) {
     return false;
   }
   *aData = do_AddRef(new FullscreenTransitionWindow(mShell)).take();
   return true;
 }
 
-/* virtual */ void nsWindow::PerformFullscreenTransition(
-    FullscreenTransitionStage aStage, uint16_t aDuration, nsISupports *aData,
-    nsIRunnable *aCallback) {
+/* virtual */
+void nsWindow::PerformFullscreenTransition(FullscreenTransitionStage aStage,
+                                           uint16_t aDuration,
+                                           nsISupports *aData,
+                                           nsIRunnable *aCallback) {
   auto data = static_cast<FullscreenTransitionWindow *>(aData);
   // This will be released at the end of the last timeout callback for it.
   auto transitionData =
       new FullscreenTransitionData(aStage, aDuration, aCallback, data);
   g_timeout_add_full(G_PRIORITY_HIGH, FullscreenTransitionData::sInterval,
                      FullscreenTransitionData::TimeoutCallback, transitionData,
                      nullptr);
 }
--- a/widget/headless/HeadlessScreenHelper.cpp
+++ b/widget/headless/HeadlessScreenHelper.cpp
@@ -8,17 +8,18 @@
 
 #include "prenv.h"
 #include "mozilla/RefPtr.h"
 #include "nsTArray.h"
 
 namespace mozilla {
 namespace widget {
 
-/* static */ LayoutDeviceIntRect HeadlessScreenHelper::GetScreenRect() {
+/* static */
+LayoutDeviceIntRect HeadlessScreenHelper::GetScreenRect() {
   char* ev = PR_GetEnv("MOZ_HEADLESS_WIDTH");
   int width = 1366;
   if (ev) {
     width = atoi(ev);
   }
   ev = PR_GetEnv("MOZ_HEADLESS_HEIGHT");
   int height = 768;
   if (ev) {
--- a/widget/headless/HeadlessWidget.cpp
+++ b/widget/headless/HeadlessWidget.cpp
@@ -33,17 +33,18 @@ static mozilla::LazyLogModule sWidgetFoc
 
 #else
 
 #  define LOG(args)
 #  define LOGFOCUS(args)
 
 #endif /* MOZ_LOGGING */
 
-/*static*/ already_AddRefed<nsIWidget> nsIWidget::CreateHeadlessWidget() {
+/*static*/
+already_AddRefed<nsIWidget> nsIWidget::CreateHeadlessWidget() {
   nsCOMPtr<nsIWidget> widget = new mozilla::widget::HeadlessWidget();
   return widget.forget();
 }
 
 namespace mozilla {
 namespace widget {
 
 StaticAutoPtr<nsTArray<HeadlessWidget*>> HeadlessWidget::sActiveWindows;
--- a/widget/nsAutoRollup.cpp
+++ b/widget/nsAutoRollup.cpp
@@ -3,18 +3,20 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/widget/nsAutoRollup.h"
 
 namespace mozilla {
 namespace widget {
 
-/*static*/ uint32_t nsAutoRollup::sCount = 0;
-/*static*/ StaticRefPtr<nsIContent> nsAutoRollup::sLastRollup;
+/*static*/
+uint32_t nsAutoRollup::sCount = 0;
+/*static*/
+StaticRefPtr<nsIContent> nsAutoRollup::sLastRollup;
 
 nsAutoRollup::nsAutoRollup() {
   // remember if sLastRollup was null, and only clear it upon destruction
   // if so. This prevents recursive usage of nsAutoRollup from clearing
   // sLastRollup when it shouldn't.
   mWasClear = !sLastRollup;
   sCount++;
 }
@@ -28,21 +30,21 @@ nsAutoRollup::nsAutoRollup(nsIContent* a
 
 nsAutoRollup::~nsAutoRollup() {
   if (sLastRollup && mWasClear) {
     sLastRollup = nullptr;
   }
   sCount--;
 }
 
-/*static*/ void nsAutoRollup::SetLastRollup(nsIContent* aLastRollup) {
+/*static*/
+void nsAutoRollup::SetLastRollup(nsIContent* aLastRollup) {
   // There must be at least one nsAutoRollup on the stack.
   MOZ_ASSERT(sCount);
 
   sLastRollup = aLastRollup;
 }
 
-/*static*/ nsIContent* nsAutoRollup::GetLastRollup() {
-  return sLastRollup.get();
-}
+/*static*/
+nsIContent* nsAutoRollup::GetLastRollup() { return sLastRollup.get(); }
 
 }  // namespace widget
 }  // namespace mozilla
--- a/widget/nsBaseWidget.cpp
+++ b/widget/nsBaseWidget.cpp
@@ -119,17 +119,18 @@ using base::Thread;
 bool gDisableNativeTheme = false;
 
 // Async pump timer during injected long touch taps
 #define TOUCH_INJECT_PUMP_TIMER_MSEC 50
 #define TOUCH_INJECT_LONG_TAP_DEFAULT_MSEC 1500
 int32_t nsIWidget::sPointerIdCounter = 0;
 
 // Some statics from nsIWidget.h
-/*static*/ uint64_t AutoObserverNotifier::sObserverId = 0;
+/*static*/
+uint64_t AutoObserverNotifier::sObserverId = 0;
 /*static*/ nsDataHashtable<nsUint64HashKey, nsCOMPtr<nsIObserver>>
     AutoObserverNotifier::sSavedObservers;
 
 // The maximum amount of time to let the EnableDragDrop runnable wait in the
 // idle queue before timing out and moving it to the regular queue. Value is in
 // milliseconds.
 const uint32_t kAsyncDragDropTimeout = 1000;
 
@@ -719,19 +720,21 @@ nsresult nsBaseWidget::SetWindowClipRegi
     nsTArray<LayoutDeviceIntRect> rects;
     ArrayFromRegion(intersection, rects);
     // store
     StoreWindowClipRegion(rects);
   }
   return NS_OK;
 }
 
-/* virtual */ void nsBaseWidget::PerformFullscreenTransition(
-    FullscreenTransitionStage aStage, uint16_t aDuration, nsISupports* aData,
-    nsIRunnable* aCallback) {
+/* virtual */
+void nsBaseWidget::PerformFullscreenTransition(FullscreenTransitionStage aStage,
+                                               uint16_t aDuration,
+                                               nsISupports* aData,
+                                               nsIRunnable* aCallback) {
   MOZ_ASSERT_UNREACHABLE(
       "Should never call PerformFullscreenTransition on nsBaseWidget");
 }
 
 //-------------------------------------------------------------------------
 //
 // Put the window into full-screen mode
 //
@@ -3037,18 +3040,18 @@ void IMENotification::TextChangeDataBase
 // Convert a GUI event message code to a string.
 // Makes it a lot easier to debug events.
 //
 // See gtk/nsWidget.cpp and windows/nsWindow.cpp
 // for a DebugPrintEvent() function that uses
 // this.
 //
 //////////////////////////////////////////////////////////////
-/* static */ nsAutoString nsBaseWidget::debug_GuiEventToString(
-    WidgetGUIEvent* aGuiEvent) {
+/* static */
+nsAutoString nsBaseWidget::debug_GuiEventToString(WidgetGUIEvent* aGuiEvent) {
   NS_ASSERTION(nullptr != aGuiEvent, "cmon, null gui event.");
 
   nsAutoString eventName(NS_LITERAL_STRING("UNKNOWN"));
 
 #  define _ASSIGN_eventName(_value, _name) \
     case _value:                           \
       eventName.AssignLiteral(_name);      \
       break
@@ -3194,25 +3197,25 @@ Debug_PrefObserver::Observe(nsISupports*
 }
 //////////////////////////////////////////////////////////////
 static int32_t _GetPrintCount() {
   static int32_t sCount = 0;
 
   return ++sCount;
 }
 //////////////////////////////////////////////////////////////
-/* static */ bool nsBaseWidget::debug_WantPaintFlashing() {
+/* static */
+bool nsBaseWidget::debug_WantPaintFlashing() {
   return debug_GetCachedBoolPref("nglayout.debug.paint_flashing");
 }
 //////////////////////////////////////////////////////////////
-/* static */ void nsBaseWidget::debug_DumpEvent(FILE* aFileOut,
-                                                nsIWidget* aWidget,
-                                                WidgetGUIEvent* aGuiEvent,
-                                                const char* aWidgetName,
-                                                int32_t aWindowID) {
+/* static */
+void nsBaseWidget::debug_DumpEvent(FILE* aFileOut, nsIWidget* aWidget,
+                                   WidgetGUIEvent* aGuiEvent,
+                                   const char* aWidgetName, int32_t aWindowID) {
   if (aGuiEvent->mMessage == eMouseMove) {
     if (!debug_GetCachedBoolPref("nglayout.debug.motion_event_dumping")) return;
   }
 
   if (aGuiEvent->mMessage == eMouseEnterIntoWidget ||
       aGuiEvent->mMessage == eMouseExitFromWidget) {
     if (!debug_GetCachedBoolPref("nglayout.debug.crossing_event_dumping"))
       return;
@@ -3223,39 +3226,41 @@ static int32_t _GetPrintCount() {
   NS_LossyConvertUTF16toASCII tempString(
       debug_GuiEventToString(aGuiEvent).get());
 
   fprintf(aFileOut, "%4d %-26s widget=%-8p name=%-12s id=0x%-6x refpt=%d,%d\n",
           _GetPrintCount(), tempString.get(), (void*)aWidget, aWidgetName,
           aWindowID, aGuiEvent->mRefPoint.x, aGuiEvent->mRefPoint.y);
 }
 //////////////////////////////////////////////////////////////
-/* static */ void nsBaseWidget::debug_DumpPaintEvent(FILE* aFileOut,
-                                                     nsIWidget* aWidget,
-                                                     const nsIntRegion& aRegion,
-                                                     const char* aWidgetName,
-                                                     int32_t aWindowID) {
+/* static */
+void nsBaseWidget::debug_DumpPaintEvent(FILE* aFileOut, nsIWidget* aWidget,
+                                        const nsIntRegion& aRegion,
+                                        const char* aWidgetName,
+                                        int32_t aWindowID) {
   NS_ASSERTION(nullptr != aFileOut, "cmon, null output FILE");
   NS_ASSERTION(nullptr != aWidget, "cmon, the widget is null");
 
   if (!debug_GetCachedBoolPref("nglayout.debug.paint_dumping")) return;
 
   nsIntRect rect = aRegion.GetBounds();
   fprintf(aFileOut,
           "%4d PAINT      widget=%p name=%-12s id=0x%-6x bounds-rect=%3d,%-3d "
           "%3d,%-3d",
           _GetPrintCount(), (void*)aWidget, aWidgetName, aWindowID, rect.X(),
           rect.Y(), rect.Width(), rect.Height());
 
   fprintf(aFileOut, "\n");
 }
 //////////////////////////////////////////////////////////////
-/* static */ void nsBaseWidget::debug_DumpInvalidate(
-    FILE* aFileOut, nsIWidget* aWidget, const LayoutDeviceIntRect* aRect,
-    const char* aWidgetName, int32_t aWindowID) {
+/* static */
+void nsBaseWidget::debug_DumpInvalidate(FILE* aFileOut, nsIWidget* aWidget,
+                                        const LayoutDeviceIntRect* aRect,
+                                        const char* aWidgetName,
+                                        int32_t aWindowID) {
   if (!debug_GetCachedBoolPref("nglayout.debug.invalidate_dumping")) return;
 
   NS_ASSERTION(nullptr != aFileOut, "cmon, null output FILE");
   NS_ASSERTION(nullptr != aWidget, "cmon, the widget is null");
 
   fprintf(aFileOut, "%4d Invalidate widget=%p name=%-12s id=0x%-6x",
           _GetPrintCount(), (void*)aWidget, aWidgetName, aWindowID);
 
--- a/widget/nsNativeTheme.cpp
+++ b/widget/nsNativeTheme.cpp
@@ -336,17 +336,18 @@ bool nsNativeTheme::IsDisabled(nsIFrame*
   // For XML/XUL elements, an attribute must be equal to the literal
   // string "true" to be counted as true.  An empty string should _not_
   // be counted as true.
   return content->AsElement()->AttrValueIs(
       kNameSpaceID_None, nsGkAtoms::disabled, NS_LITERAL_STRING("true"),
       eCaseMatters);
 }
 
-/* static */ bool nsNativeTheme::IsFrameRTL(nsIFrame* aFrame) {
+/* static */
+bool nsNativeTheme::IsFrameRTL(nsIFrame* aFrame) {
   if (!aFrame) {
     return false;
   }
   WritingMode wm = aFrame->GetWritingMode();
   return !(wm.IsVertical() ? wm.IsVerticalLR() : wm.IsBidiLTR());
 }
 
 bool nsNativeTheme::IsHTMLContent(nsIFrame* aFrame) {
--- a/widget/windows/InProcessWinCompositorWidget.cpp
+++ b/widget/windows/InProcessWinCompositorWidget.cpp
@@ -9,17 +9,18 @@
 #include "mozilla/widget/PlatformWidgetTypes.h"
 
 #include "InProcessWinCompositorWidget.h"
 #include "nsWindow.h"
 
 namespace mozilla {
 namespace widget {
 
-/* static */ RefPtr<CompositorWidget> CompositorWidget::CreateLocal(
+/* static */
+RefPtr<CompositorWidget> CompositorWidget::CreateLocal(
     const CompositorWidgetInitData& aInitData,
     const layers::CompositorOptions& aOptions, nsIWidget* aWidget) {
   if (aInitData.type() ==
       CompositorWidgetInitData::THeadlessCompositorWidgetInitData) {
     return new HeadlessCompositorWidget(
         aInitData.get_HeadlessCompositorWidgetInitData(), aOptions,
         static_cast<HeadlessWidget*>(aWidget));
   } else {
--- a/widget/windows/WinCompositorWindowThread.cpp
+++ b/widget/windows/WinCompositorWindowThread.cpp
@@ -19,21 +19,23 @@ namespace widget {
 
 static StaticRefPtr<WinCompositorWindowThread> sWinCompositorWindowThread;
 
 WinCompositorWindowThread::WinCompositorWindowThread(base::Thread* aThread)
     : mThread(aThread) {}
 
 WinCompositorWindowThread::~WinCompositorWindowThread() { delete mThread; }
 
-/* static */ WinCompositorWindowThread* WinCompositorWindowThread::Get() {
+/* static */
+WinCompositorWindowThread* WinCompositorWindowThread::Get() {
   return sWinCompositorWindowThread;
 }
 
-/* static */ void WinCompositorWindowThread::Start() {
+/* static */
+void WinCompositorWindowThread::Start() {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(!sWinCompositorWindowThread);
 
   base::Thread* thread = new base::Thread("WinCompositor");
 
   base::Thread::Options options;
   // HWND requests ui thread.
   options.message_loop_type = MessageLoop::TYPE_UI;
@@ -41,17 +43,18 @@ WinCompositorWindowThread::~WinComposito
   if (!thread->StartWithOptions(options)) {
     delete thread;
     return;
   }
 
   sWinCompositorWindowThread = new WinCompositorWindowThread(thread);
 }
 
-/* static */ void WinCompositorWindowThread::ShutDown() {
+/* static */
+void WinCompositorWindowThread::ShutDown() {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(sWinCompositorWindowThread);
 
   layers::SynchronousTask task("WinCompositorWindowThread");
   RefPtr<Runnable> runnable = WrapRunnable(
       RefPtr<WinCompositorWindowThread>(sWinCompositorWindowThread.get()),
       &WinCompositorWindowThread::ShutDownTask, &task);
   sWinCompositorWindowThread->Loop()->PostTask(runnable.forget());
@@ -60,23 +63,25 @@ WinCompositorWindowThread::~WinComposito
   sWinCompositorWindowThread = nullptr;
 }
 
 void WinCompositorWindowThread::ShutDownTask(layers::SynchronousTask* aTask) {
   layers::AutoCompleteTask complete(aTask);
   MOZ_ASSERT(IsInCompositorWindowThread());
 }
 
-/* static */ MessageLoop* WinCompositorWindowThread::Loop() {
+/* static */
+MessageLoop* WinCompositorWindowThread::Loop() {
   return sWinCompositorWindowThread
              ? sWinCompositorWindowThread->mThread->message_loop()
              : nullptr;
 }
 
-/* static */ bool WinCompositorWindowThread::IsInCompositorWindowThread() {
+/* static */
+bool WinCompositorWindowThread::IsInCompositorWindowThread() {
   return sWinCompositorWindowThread &&
          sWinCompositorWindowThread->mThread->thread_id() ==
              PlatformThread::CurrentId();
 }
 
 const wchar_t kClassNameCompositorInitalParent[] =
     L"MozillaCompositorInitialParentClass";
 const wchar_t kClassNameCompositor[] = L"MozillaCompositorWindowClass";
@@ -119,18 +124,18 @@ void InitializeWindowClass() {
   wc.hIcon = nullptr;
   wc.hCursor = nullptr;
   wc.hbrBackground = nullptr;
   wc.lpszMenuName = nullptr;
   wc.lpszClassName = kClassNameCompositor;
   g_compositor_window_class = ::RegisterClassW(&wc);
 }
 
-/* static */ WinCompositorWnds
-WinCompositorWindowThread::CreateCompositorWindow() {
+/* static */
+WinCompositorWnds WinCompositorWindowThread::CreateCompositorWindow() {
   MOZ_ASSERT(Loop());
 
   if (!Loop()) {
     return WinCompositorWnds(nullptr, nullptr);
   }
 
   layers::SynchronousTask task("Create compositor window");
 
@@ -163,17 +168,18 @@ WinCompositorWindowThread::CreateComposi
 
   Loop()->PostTask(runnable.forget());
 
   task.Wait();
 
   return WinCompositorWnds(compositorWnd, initialParentWnd);
 }
 
-/* static */ void WinCompositorWindowThread::DestroyCompositorWindow(
+/* static */
+void WinCompositorWindowThread::DestroyCompositorWindow(
     WinCompositorWnds aWnds) {
   MOZ_ASSERT(aWnds.mCompositorWnd);
   MOZ_ASSERT(aWnds.mInitialParentWnd);
   MOZ_ASSERT(Loop());
 
   if (!Loop()) {
     return;
   }
--- a/widget/windows/WinUtils.cpp
+++ b/widget/windows/WinUtils.cpp
@@ -597,17 +597,18 @@ static bool SlowIsPerMonitorDPIAware() {
   }
   PROCESS_DPI_AWARENESS dpiAwareness;
   return sGetDpiForMonitor && sGetProcessDpiAwareness &&
          SUCCEEDED(
              sGetProcessDpiAwareness(GetCurrentProcess(), &dpiAwareness)) &&
          dpiAwareness == PROCESS_PER_MONITOR_DPI_AWARE;
 }
 
-/* static */ bool WinUtils::IsPerMonitorDPIAware() {
+/* static */
+bool WinUtils::IsPerMonitorDPIAware() {
   static bool perMonitorDPIAware = SlowIsPerMonitorDPIAware();
   return perMonitorDPIAware;
 }
 
 /* static */
 float WinUtils::MonitorDPI(HMONITOR aMonitor) {
   if (IsPerMonitorDPIAware()) {
     UINT dpiX, dpiY = 96;
--- a/widget/windows/nsLookAndFeel.cpp
+++ b/widget/windows/nsLookAndFeel.cpp
@@ -102,17 +102,18 @@ nsLookAndFeel::nsLookAndFeel()
   mozilla::Telemetry::Accumulate(mozilla::Telemetry::TOUCH_ENABLED_DEVICE,
                                  WinUtils::IsTouchDeviceSupportPresent());
 }
 
 nsLookAndFeel::~nsLookAndFeel() {}
 
 void nsLookAndFeel::NativeInit() { EnsureInit(); }
 
-/* virtual */ void nsLookAndFeel::RefreshImpl() {
+/* virtual */
+void nsLookAndFeel::RefreshImpl() {
   nsXPLookAndFeel::RefreshImpl();
 
   for (auto e = mSystemFontCache.begin(), end = mSystemFontCache.end();
        e != end; ++e) {
     e->mCacheValid = false;
   }
   mCaretBlinkTime = -1;
 
@@ -805,17 +806,18 @@ void nsLookAndFeel::SetIntCacheImpl(
         break;
       case eIntID_WindowsThemeIdentifier:
         mNativeThemeId = entry.value;
         break;
     }
   }
 }
 
-/* static */ nsresult nsLookAndFeel::GetAccentColor(nscolor &aColor) {
+/* static */
+nsresult nsLookAndFeel::GetAccentColor(nscolor &aColor) {
   nsresult rv;
 
   if (!mDwmKey) {
     mDwmKey = do_CreateInstance("@mozilla.org/windows-registry-key;1", &rv);
     if (NS_WARN_IF(NS_FAILED(rv))) {
       return rv;
     }
   }
@@ -839,17 +841,18 @@ void nsLookAndFeel::SetIntCacheImpl(
     rv = NS_ERROR_NOT_AVAILABLE;
   }
 
   mDwmKey->Close();
 
   return rv;
 }
 
-/* static */ nsresult nsLookAndFeel::GetAccentColorText(nscolor &aColor) {
+/* static */
+nsresult nsLookAndFeel::GetAccentColorText(nscolor &aColor) {
   nscolor accentColor;
   nsresult rv = GetAccentColor(accentColor);
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return rv;
   }
 
   // We want the color that we return for text that will be drawn over
   // a background that has the accent color to have good contrast with
--- a/widget/windows/nsSound.cpp
+++ b/widget/windows/nsSound.cpp
@@ -75,17 +75,18 @@ nsSoundPlayer::Run() {
   }
   return NS_OK;
 }
 
 nsSoundPlayer::~nsSoundPlayer() { delete[] mSoundData; }
 
 mozilla::StaticRefPtr<nsISound> nsSound::sInstance;
 
-/* static */ already_AddRefed<nsISound> nsSound::GetInstance() {
+/* static */
+already_AddRefed<nsISound> nsSound::GetInstance() {
   if (!sInstance) {
     if (gfxPlatform::IsHeadless()) {
       sInstance = new mozilla::widget::HeadlessSound();
     } else {
       RefPtr<nsSound> sound = new nsSound();
       nsresult rv = sound->CreatePlayerThread();
       if (NS_WARN_IF(NS_FAILED(rv))) {
         return nullptr;
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -1335,17 +1335,18 @@ BOOL CALLBACK nsWindow::EnumAllThreadWin
   nsWindow* wnd = WinUtils::GetNSWindowPtr(aWnd);
   if (wnd) {
     reinterpret_cast<nsTArray<nsWindow*>*>(aParam)->AppendElement(wnd);
   }
   EnumChildWindows(aWnd, EnumAllChildWindProc, aParam);
   return TRUE;
 }
 
-/* static*/ nsTArray<nsWindow*> nsWindow::EnumAllWindows() {
+/* static*/
+nsTArray<nsWindow*> nsWindow::EnumAllWindows() {
   nsTArray<nsWindow*> windows;
   EnumThreadWindows(GetCurrentThreadId(), EnumAllThreadWindowProc,
                     reinterpret_cast<LPARAM>(&windows));
   return windows;
 }
 
 static already_AddRefed<SourceSurface> CreateSourceSurfaceForGfxSurface(
     gfxASurface* aSurface) {
@@ -3219,18 +3220,18 @@ class FullscreenTransitionData final : p
                "FullscreenTransitionData "
                "should be deconstructed in the main thread");
     ::PostMessageW(mWnd, WM_DESTROY, 0, 0);
   }
 };
 
 NS_IMPL_ISUPPORTS0(FullscreenTransitionData)
 
-/* virtual */ bool nsWindow::PrepareForFullscreenTransition(
-    nsISupports** aData) {
+/* virtual */
+bool nsWindow::PrepareForFullscreenTransition(nsISupports** aData) {
   // We don't support fullscreen transition when composition is not
   // enabled, which could make the transition broken and annoying.
   // See bug 1184201.
   if (!nsUXThemeData::CheckForCompositor()) {
     return false;
   }
 
   FullscreenTransitionInitData initData;
@@ -3262,28 +3263,31 @@ NS_IMPL_ISUPPORTS0(FullscreenTransitionD
   mTransitionWnd = initData.mWnd;
 
   auto data = new FullscreenTransitionData(initData.mWnd);
   *aData = data;
   NS_ADDREF(data);
   return true;
 }
 
-/* virtual */ void nsWindow::PerformFullscreenTransition(
-    FullscreenTransitionStage aStage, uint16_t aDuration, nsISupports* aData,
-    nsIRunnable* aCallback) {
+/* virtual */
+void nsWindow::PerformFullscreenTransition(FullscreenTransitionStage aStage,
+                                           uint16_t aDuration,
+                                           nsISupports* aData,
+                                           nsIRunnable* aCallback) {
   auto data = static_cast<FullscreenTransitionData*>(aData);
   nsCOMPtr<nsIRunnable> callback = aCallback;
   UINT msg = aStage == eBeforeFullscreenToggle ? WM_FULLSCREEN_TRANSITION_BEFORE
                                                : WM_FULLSCREEN_TRANSITION_AFTER;
   WPARAM wparam = (WPARAM)callback.forget().take();
   ::PostMessage(data->mWnd, msg, wparam, (LPARAM)aDuration);
 }
 
-/* virtual */ void nsWindow::CleanupFullscreenTransition() {
+/* virtual */
+void nsWindow::CleanupFullscreenTransition() {
   MOZ_ASSERT(NS_IsMainThread(),
              "CleanupFullscreenTransition "
              "should only run on the main thread");
 
   mTransitionWnd = nullptr;
 }
 
 nsresult nsWindow::MakeFullScreen(bool aFullScreen, nsIScreen* aTargetScreen) {