Merge inbound to mozilla-central. a=merge
authorGurzau Raul <rgurzau@mozilla.com>
Fri, 01 Mar 2019 15:01:31 +0200
changeset 519797 d4e19870e27fbe3552bec2b961acc96f3222ea80
parent 519736 c1075c1f1605435c69a6964895600db8a711fbb5 (current diff)
parent 519796 e097bf9457c31adfe082dd38397f0794a674a746 (diff)
child 519798 3b08a133c893b960f15e014a8f36c954d31fda34
child 519827 513ac146d20192afc26d01dacaec1986f3e23b88
child 519968 9965eaf1e975e5f4ea2e5f71f632bd157ee4bb65
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)
reviewersmerge
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
Merge inbound to mozilla-central. a=merge
js/src/gc/Nursery.cpp
js/src/tests/test262/language/expressions/class/elements/private-field-super-access-throws.js
js/src/tests/test262/language/expressions/postfix-decrement/arguments.js
js/src/tests/test262/language/expressions/postfix-decrement/eval.js
js/src/tests/test262/language/expressions/postfix-increment/arguments.js
js/src/tests/test262/language/expressions/postfix-increment/eval.js
js/src/tests/test262/language/expressions/prefix-decrement/arguments.js
js/src/tests/test262/language/expressions/prefix-decrement/eval.js
js/src/tests/test262/language/expressions/prefix-increment/arguments.js
js/src/tests/test262/language/expressions/prefix-increment/eval.js
js/src/tests/test262/language/statements/class/elements/private-field-super-access-throws.js
layout/base/PresShell.cpp
layout/base/RestyleManager.cpp
layout/generic/nsFrame.cpp
layout/generic/nsTextFrame.cpp
--- a/accessible/aom/AccessibleNode.cpp
+++ b/accessible/aom/AccessibleNode.cpp
@@ -57,22 +57,24 @@ AccessibleNode::AccessibleNode(nsINode* 
   DocAccessible* doc = accService->GetDocAccessible(mDOMNode->OwnerDoc());
   if (doc) {
     mIntl = doc->GetAccessible(mDOMNode);
   }
 }
 
 AccessibleNode::~AccessibleNode() {}
 
-/* virtual */ JSObject* AccessibleNode::WrapObject(
-    JSContext* aCx, JS::Handle<JSObject*> aGivenProto) {
+/* virtual */
+JSObject* AccessibleNode::WrapObject(JSContext* aCx,
+                                     JS::Handle<JSObject*> aGivenProto) {
   return AccessibleNode_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-/* virtual */ ParentObject AccessibleNode::GetParentObject() const {
+/* virtual */
+ParentObject AccessibleNode::GetParentObject() const {
   return mDOMNode->GetParentObject();
 }
 
 void AccessibleNode::GetComputedRole(nsAString& aRole) {
   if (mIntl) {
     nsAccessibilityService* accService = GetOrCreateAccService();
     if (accService) {
       accService->GetStringRole(mIntl->Role(), aRole);
--- a/accessible/ipc/DocAccessibleChildBase.cpp
+++ b/accessible/ipc/DocAccessibleChildBase.cpp
@@ -7,17 +7,18 @@
 #include "mozilla/a11y/DocAccessibleChildBase.h"
 #include "mozilla/a11y/ProxyAccessible.h"
 
 #include "Accessible-inl.h"
 
 namespace mozilla {
 namespace a11y {
 
-/* static */ uint32_t DocAccessibleChildBase::InterfacesFor(Accessible* aAcc) {
+/* static */
+uint32_t DocAccessibleChildBase::InterfacesFor(Accessible* aAcc) {
   uint32_t interfaces = 0;
   if (aAcc->IsHyperText() && aAcc->AsHyperText()->IsTextRole())
     interfaces |= Interfaces::HYPERTEXT;
 
   if (aAcc->IsLink()) interfaces |= Interfaces::HYPERLINK;
 
   if (aAcc->HasNumericValue()) interfaces |= Interfaces::VALUE;
 
@@ -37,18 +38,19 @@ namespace a11y {
 
   if (aAcc->ActionCount()) {
     interfaces |= Interfaces::ACTION;
   }
 
   return interfaces;
 }
 
-/* static */ void DocAccessibleChildBase::SerializeTree(
-    Accessible* aRoot, nsTArray<AccessibleData>& aTree) {
+/* static */
+void DocAccessibleChildBase::SerializeTree(Accessible* aRoot,
+                                           nsTArray<AccessibleData>& aTree) {
   uint64_t id = reinterpret_cast<uint64_t>(aRoot->UniqueID());
 #if defined(XP_WIN)
   int32_t msaaId = AccessibleWrap::GetChildIDFor(aRoot);
 #endif
   a11y::role role = aRoot->Role();
   uint32_t childCount = aRoot->ChildCount();
   uint32_t interfaces = InterfacesFor(aRoot);
 
--- a/accessible/ipc/win/handler/AccessibleHandlerControl.cpp
+++ b/accessible/ipc/win/handler/AccessibleHandlerControl.cpp
@@ -71,22 +71,23 @@ HRESULT
 TextChange::GetNew(long aIA2UniqueId, NotNull<IA2TextSegment*> aOutNewSegment) {
   if (!mIsInsert || aIA2UniqueId != mIA2UniqueId) {
     return S_OK;
   }
 
   return SegCopy(*aOutNewSegment, mText);
 }
 
-/* static */ BSTR TextChange::BSTRCopy(const BSTR& aIn) {
+/* static */
+BSTR TextChange::BSTRCopy(const BSTR& aIn) {
   return ::SysAllocStringLen(aIn, ::SysStringLen(aIn));
 }
 
-/* static */ HRESULT TextChange::SegCopy(IA2TextSegment& aDest,
-                                         const IA2TextSegment& aSrc) {
+/* static */
+HRESULT TextChange::SegCopy(IA2TextSegment& aDest, const IA2TextSegment& aSrc) {
   aDest = {BSTRCopy(aSrc.text), aSrc.start, aSrc.end};
   if (aSrc.text && !aDest.text) {
     return E_OUTOFMEMORY;
   }
   if (!::SysStringLen(aDest.text)) {
     return S_FALSE;
   }
   return S_OK;
--- a/accessible/windows/msaa/AccessibleWrap.cpp
+++ b/accessible/windows/msaa/AccessibleWrap.cpp
@@ -1540,27 +1540,29 @@ void AccessibleWrap::UpdateSystemCaretFo
     return;
   }
 
   HWND caretWnd =
       reinterpret_cast<HWND>(widget->GetNativeData(NS_NATIVE_WINDOW));
   UpdateSystemCaretFor(caretWnd, caretRect);
 }
 
-/* static */ void AccessibleWrap::UpdateSystemCaretFor(
+/* static */
+void AccessibleWrap::UpdateSystemCaretFor(
     ProxyAccessible* aProxy, const LayoutDeviceIntRect& aCaretRect) {
   ::DestroyCaret();
 
   // The HWND should be the real widget HWND, not an emulated HWND.
   // We get the HWND from the proxy's outer doc to bypass window emulation.
   Accessible* outerDoc = aProxy->OuterDocOfRemoteBrowser();
   UpdateSystemCaretFor(GetHWNDFor(outerDoc), aCaretRect);
 }
 
-/* static */ void AccessibleWrap::UpdateSystemCaretFor(
+/* static */
+void AccessibleWrap::UpdateSystemCaretFor(
     HWND aCaretWnd, const LayoutDeviceIntRect& aCaretRect) {
   if (!aCaretWnd || aCaretRect.IsEmpty()) {
     return;
   }
 
   // Create invisible bitmap for caret, otherwise its appearance interferes
   // with Gecko caret
   nsAutoBitmap caretBitMap(CreateBitmap(1, aCaretRect.Height(), 1, 1, nullptr));
@@ -1700,17 +1702,17 @@ bool AccessibleWrap::DispatchTextChangeT
   HRESULT hr = ASYNC_INVOKE(invoker, OnTextChange, PtrToLong(hwnd), msaaId,
                             isInsert, &textSegment);
 
   ::SysFreeString(textSegment.text);
 
   return SUCCEEDED(hr);
 }
 
-/* static */ void AccessibleWrap::AssignChildIDTo(
-    NotNull<sdnAccessible*> aSdnAcc) {
+/* static */
+void AccessibleWrap::AssignChildIDTo(NotNull<sdnAccessible*> aSdnAcc) {
   aSdnAcc->SetUniqueID(sIDGen.GetID());
 }
 
-/* static */ void AccessibleWrap::ReleaseChildID(
-    NotNull<sdnAccessible*> aSdnAcc) {
+/* static */
+void AccessibleWrap::ReleaseChildID(NotNull<sdnAccessible*> aSdnAcc) {
   sIDGen.ReleaseID(aSdnAcc);
 }
--- a/accessible/windows/msaa/Compatibility.cpp
+++ b/accessible/windows/msaa/Compatibility.cpp
@@ -161,17 +161,18 @@ DetectInSendMessageExCompat(PEXCEPTION_P
   return EXCEPTION_CONTINUE_SEARCH;
 }
 
 uint32_t Compatibility::sConsumers = Compatibility::UNKNOWN;
 
 /**
  * This function is safe to call multiple times.
  */
-/* static */ void Compatibility::InitConsumers() {
+/* static */
+void Compatibility::InitConsumers() {
   HMODULE jawsHandle = ::GetModuleHandleW(L"jhook");
   if (jawsHandle) {
     sConsumers |=
         IsModuleVersionLessThan(jawsHandle, MAKE_FILE_VERSION(19, 0, 0, 0))
             ? OLDJAWS
             : JAWS;
   }
 
@@ -198,17 +199,18 @@ uint32_t Compatibility::sConsumers = Com
       ::GetModuleHandleW(L"uiautomationcore"))
     sConsumers |= UIAUTOMATION;
 
   // If we have a known consumer remove the unknown bit.
   if (sConsumers != Compatibility::UNKNOWN)
     sConsumers &= ~Compatibility::UNKNOWN;
 }
 
-/* static */ bool Compatibility::HasKnownNonUiaConsumer() {
+/* static */
+bool Compatibility::HasKnownNonUiaConsumer() {
   InitConsumers();
   return sConsumers & ~(Compatibility::UNKNOWN | UIAUTOMATION);
 }
 
 void Compatibility::Init() {
   // Note we collect some AT statistics/telemetry here for convenience.
   InitConsumers();
 
--- a/browser/base/content/test/trackingUI/browser_trackingUI_cryptominers.js
+++ b/browser/base/content/test/trackingUI/browser_trackingUI_cryptominers.js
@@ -16,39 +16,57 @@ add_task(async function setup() {
     [ "privacy.trackingprotection.fingerprinting.enabled", false ],
   ]});
 });
 
 async function testIdentityState(hasException) {
   let promise = BrowserTestUtils.openNewForegroundTab({url: TRACKING_PAGE, gBrowser});
   let [tab] = await Promise.all([promise, waitForContentBlockingEvent()]);
 
+  if (hasException) {
+    let loaded = BrowserTestUtils.browserLoaded(tab.linkedBrowser, false, TRACKING_PAGE);
+    ContentBlocking.disableForCurrentPage();
+    await loaded;
+  }
+
   ok(!ContentBlocking.content.hasAttribute("detected"), "cryptominers are not detected");
   ok(BrowserTestUtils.is_hidden(ContentBlocking.iconBox), "icon box is not visible");
 
   promise = waitForContentBlockingEvent();
 
   await ContentTask.spawn(tab.linkedBrowser, {}, function() {
     content.postMessage("cryptomining", "*");
   });
 
   await promise;
 
   ok(ContentBlocking.content.hasAttribute("detected"), "trackers are detected");
   ok(BrowserTestUtils.is_visible(ContentBlocking.iconBox), "icon box is visible");
   is(ContentBlocking.iconBox.hasAttribute("hasException"), hasException,
     "Shows an exception when appropriate");
 
+  if (hasException) {
+    let loaded = BrowserTestUtils.browserLoaded(tab.linkedBrowser, false, TRACKING_PAGE);
+    ContentBlocking.enableForCurrentPage();
+    await loaded;
+  }
+
   BrowserTestUtils.removeTab(tab);
 }
 
 async function testSubview(hasException) {
   let promise = BrowserTestUtils.openNewForegroundTab({url: TRACKING_PAGE, gBrowser});
   let [tab] = await Promise.all([promise, waitForContentBlockingEvent()]);
 
+  if (hasException) {
+    let loaded = BrowserTestUtils.browserLoaded(tab.linkedBrowser, false, TRACKING_PAGE);
+    ContentBlocking.disableForCurrentPage();
+    await loaded;
+  }
+
   promise = waitForContentBlockingEvent();
   await ContentTask.spawn(tab.linkedBrowser, {}, function() {
     content.postMessage("cryptomining", "*");
   });
   await promise;
 
   await openIdentityPopup();
 
@@ -71,31 +89,29 @@ async function testSubview(hasException)
   let mainView = document.getElementById("identity-popup-mainView");
   viewShown = BrowserTestUtils.waitForEvent(mainView, "ViewShown");
   let backButton = subview.querySelector(".subviewbutton-back");
   backButton.click();
   await viewShown;
 
   ok(true, "Main view was shown");
 
+  if (hasException) {
+    let loaded = BrowserTestUtils.browserLoaded(tab.linkedBrowser, false, TRACKING_PAGE);
+    ContentBlocking.enableForCurrentPage();
+    await loaded;
+  }
+
   BrowserTestUtils.removeTab(tab);
 }
 
 add_task(async function test() {
-  let uri = Services.io.newURI("https://example.org");
-
   Services.prefs.setBoolPref(CM_PREF, true);
 
   await testIdentityState(false);
-  Services.perms.add(uri, "trackingprotection", Services.perms.ALLOW_ACTION);
-  // TODO: This currently fails because of bug 1525458, fixing should allow us to re-enable it.
-  // await testIdentityState(true);
-  Services.perms.remove(uri, "trackingprotection");
+  await testIdentityState(true);
 
   await testSubview(false);
-  Services.perms.add(uri, "trackingprotection", Services.perms.ALLOW_ACTION);
-  // TODO: This currently fails because of bug 1525458, fixing should allow us to re-enable it.
-  // await testSubview(true);
-  Services.perms.remove(uri, "trackingprotection");
+  await testSubview(true);
 
   Services.prefs.clearUserPref(CM_PREF);
 });
 
--- a/browser/base/content/test/trackingUI/browser_trackingUI_fingerprinters.js
+++ b/browser/base/content/test/trackingUI/browser_trackingUI_fingerprinters.js
@@ -16,39 +16,57 @@ add_task(async function setup() {
     [ "privacy.trackingprotection.cryptomining.enabled", false ],
   ]});
 });
 
 async function testIdentityState(hasException) {
   let promise = BrowserTestUtils.openNewForegroundTab({url: TRACKING_PAGE, gBrowser});
   let [tab] = await Promise.all([promise, waitForContentBlockingEvent()]);
 
+  if (hasException) {
+    let loaded = BrowserTestUtils.browserLoaded(tab.linkedBrowser, false, TRACKING_PAGE);
+    ContentBlocking.disableForCurrentPage();
+    await loaded;
+  }
+
   ok(!ContentBlocking.content.hasAttribute("detected"), "fingerprinters are not detected");
   ok(BrowserTestUtils.is_hidden(ContentBlocking.iconBox), "icon box is not visible");
 
   promise = waitForContentBlockingEvent();
 
   await ContentTask.spawn(tab.linkedBrowser, {}, function() {
     content.postMessage("fingerprinting", "*");
   });
 
   await promise;
 
   ok(ContentBlocking.content.hasAttribute("detected"), "trackers are detected");
   ok(BrowserTestUtils.is_visible(ContentBlocking.iconBox), "icon box is visible");
   is(ContentBlocking.iconBox.hasAttribute("hasException"), hasException,
     "Shows an exception when appropriate");
 
+  if (hasException) {
+    let loaded = BrowserTestUtils.browserLoaded(tab.linkedBrowser, false, TRACKING_PAGE);
+    ContentBlocking.enableForCurrentPage();
+    await loaded;
+  }
+
   BrowserTestUtils.removeTab(tab);
 }
 
 async function testSubview(hasException) {
   let promise = BrowserTestUtils.openNewForegroundTab({url: TRACKING_PAGE, gBrowser});
   let [tab] = await Promise.all([promise, waitForContentBlockingEvent()]);
 
+  if (hasException) {
+    let loaded = BrowserTestUtils.browserLoaded(tab.linkedBrowser, false, TRACKING_PAGE);
+    ContentBlocking.disableForCurrentPage();
+    await loaded;
+  }
+
   promise = waitForContentBlockingEvent();
   await ContentTask.spawn(tab.linkedBrowser, {}, function() {
     content.postMessage("fingerprinting", "*");
   });
   await promise;
 
   await openIdentityPopup();
 
@@ -71,31 +89,29 @@ async function testSubview(hasException)
   let mainView = document.getElementById("identity-popup-mainView");
   viewShown = BrowserTestUtils.waitForEvent(mainView, "ViewShown");
   let backButton = subview.querySelector(".subviewbutton-back");
   backButton.click();
   await viewShown;
 
   ok(true, "Main view was shown");
 
+  if (hasException) {
+    let loaded = BrowserTestUtils.browserLoaded(tab.linkedBrowser, false, TRACKING_PAGE);
+    ContentBlocking.enableForCurrentPage();
+    await loaded;
+  }
+
   BrowserTestUtils.removeTab(tab);
 }
 
 add_task(async function test() {
-  let uri = Services.io.newURI("https://example.org");
-
   Services.prefs.setBoolPref(FP_PREF, true);
 
   await testIdentityState(false);
-  Services.perms.add(uri, "trackingprotection", Services.perms.ALLOW_ACTION);
-  // TODO: This currently fails because of bug 1525458, fixing should allow us to re-enable it.
-  // await testIdentityState(true);
-  Services.perms.remove(uri, "trackingprotection");
+  await testIdentityState(true);
 
   await testSubview(false);
-  Services.perms.add(uri, "trackingprotection", Services.perms.ALLOW_ACTION);
-  // TODO: This currently fails because of bug 1525458, fixing should allow us to re-enable it.
-  // await testSubview(true);
-  Services.perms.remove(uri, "trackingprotection");
+  await testSubview(true);
 
   Services.prefs.clearUserPref(FP_PREF);
 });
 
--- a/caps/ContentPrincipal.cpp
+++ b/caps/ContentPrincipal.cpp
@@ -92,17 +92,18 @@ nsresult ContentPrincipal::Init(ContentP
   mAddon = aOther->mAddon;
   return NS_OK;
 }
 
 nsresult ContentPrincipal::GetScriptLocation(nsACString& aStr) {
   return mCodebase->GetSpec(aStr);
 }
 
-/* static */ nsresult ContentPrincipal::GenerateOriginNoSuffixFromURI(
+/* static */
+nsresult ContentPrincipal::GenerateOriginNoSuffixFromURI(
     nsIURI* aURI, nsACString& aOriginNoSuffix) {
   if (!aURI) {
     return NS_ERROR_FAILURE;
   }
 
   nsCOMPtr<nsIURI> origin = NS_GetInnermostURI(aURI);
   if (!origin) {
     return NS_ERROR_FAILURE;
--- a/caps/NullPrincipal.cpp
+++ b/caps/NullPrincipal.cpp
@@ -26,52 +26,54 @@
 
 using namespace mozilla;
 
 NS_IMPL_CLASSINFO(NullPrincipal, nullptr, nsIClassInfo::MAIN_THREAD_ONLY,
                   NS_NULLPRINCIPAL_CID)
 NS_IMPL_QUERY_INTERFACE_CI(NullPrincipal, nsIPrincipal, nsISerializable)
 NS_IMPL_CI_INTERFACE_GETTER(NullPrincipal, nsIPrincipal, nsISerializable)
 
-/* static */ already_AddRefed<NullPrincipal>
-NullPrincipal::CreateWithInheritedAttributes(nsIPrincipal* aInheritFrom) {
+/* static */
+already_AddRefed<NullPrincipal> NullPrincipal::CreateWithInheritedAttributes(
+    nsIPrincipal* aInheritFrom) {
   MOZ_ASSERT(aInheritFrom);
   return CreateWithInheritedAttributes(
       Cast(aInheritFrom)->OriginAttributesRef(), false);
 }
 
-/* static */ already_AddRefed<NullPrincipal>
-NullPrincipal::CreateWithInheritedAttributes(nsIDocShell* aDocShell,
-                                             bool aIsFirstParty) {
+/* static */
+already_AddRefed<NullPrincipal> NullPrincipal::CreateWithInheritedAttributes(
+    nsIDocShell* aDocShell, bool aIsFirstParty) {
   MOZ_ASSERT(aDocShell);
 
   OriginAttributes attrs = nsDocShell::Cast(aDocShell)->GetOriginAttributes();
   return CreateWithInheritedAttributes(attrs, aIsFirstParty);
 }
 
-/* static */ already_AddRefed<NullPrincipal>
-NullPrincipal::CreateWithInheritedAttributes(
+/* static */
+already_AddRefed<NullPrincipal> NullPrincipal::CreateWithInheritedAttributes(
     const OriginAttributes& aOriginAttributes, bool aIsFirstParty) {
   RefPtr<NullPrincipal> nullPrin = new NullPrincipal();
   nsresult rv = nullPrin->Init(aOriginAttributes, aIsFirstParty);
   MOZ_RELEASE_ASSERT(NS_SUCCEEDED(rv));
   return nullPrin.forget();
 }
 
-/* static */ already_AddRefed<NullPrincipal> NullPrincipal::Create(
+/* static */
+already_AddRefed<NullPrincipal> NullPrincipal::Create(
     const OriginAttributes& aOriginAttributes, nsIURI* aURI) {
   RefPtr<NullPrincipal> nullPrin = new NullPrincipal();
   nsresult rv = nullPrin->Init(aOriginAttributes, aURI);
   MOZ_RELEASE_ASSERT(NS_SUCCEEDED(rv));
 
   return nullPrin.forget();
 }
 
-/* static */ already_AddRefed<NullPrincipal>
-NullPrincipal::CreateWithoutOriginAttributes() {
+/* static */
+already_AddRefed<NullPrincipal> NullPrincipal::CreateWithoutOriginAttributes() {
   return NullPrincipal::Create(OriginAttributes(), nullptr);
 }
 
 nsresult NullPrincipal::Init(const OriginAttributes& aOriginAttributes,
                              nsIURI* aURI) {
   if (aURI) {
     nsAutoCString scheme;
     nsresult rv = aURI->GetScheme(scheme);
--- a/caps/nsJSPrincipals.cpp
+++ b/caps/nsJSPrincipals.cpp
@@ -41,25 +41,26 @@ nsJSPrincipals::Release() {
   NS_LOG_RELEASE(this, count, "nsJSPrincipals");
   if (count == 0) {
     delete this;
   }
 
   return count;
 }
 
-/* static */ bool nsJSPrincipals::Subsume(JSPrincipals* jsprin,
-                                          JSPrincipals* other) {
+/* static */
+bool nsJSPrincipals::Subsume(JSPrincipals* jsprin, JSPrincipals* other) {
   bool result;
   nsresult rv = nsJSPrincipals::get(jsprin)->Subsumes(
       nsJSPrincipals::get(other), &result);
   return NS_SUCCEEDED(rv) && result;
 }
 
-/* static */ void nsJSPrincipals::Destroy(JSPrincipals* jsprin) {
+/* static */
+void nsJSPrincipals::Destroy(JSPrincipals* jsprin) {
   // The JS runtime can call this method during the last GC when
   // nsScriptSecurityManager is destroyed. So we must not assume here that
   // the security manager still exists.
 
   nsJSPrincipals* nsjsprin = nsJSPrincipals::get(jsprin);
 
   // We need to destroy the nsIPrincipal. We'll do this by adding
   // to the refcount and calling release
@@ -96,19 +97,20 @@ JS_PUBLIC_API void JSPrincipals::dump() 
             "!!! JSPrincipals (%p) is not nsJSPrincipals instance - bad token: "
             "actual=0x%x expected=0x%x\n",
             this, unsigned(debugToken), unsigned(nsJSPrincipals::DEBUG_TOKEN));
   }
 }
 
 #endif
 
-/* static */ bool nsJSPrincipals::ReadPrincipals(
-    JSContext* aCx, JSStructuredCloneReader* aReader,
-    JSPrincipals** aOutPrincipals) {
+/* static */
+bool nsJSPrincipals::ReadPrincipals(JSContext* aCx,
+                                    JSStructuredCloneReader* aReader,
+                                    JSPrincipals** aOutPrincipals) {
   uint32_t tag;
   uint32_t unused;
   if (!JS_ReadUint32Pair(aReader, &tag, &unused)) {
     return false;
   }
 
   if (!(tag == SCTAG_DOM_NULL_PRINCIPAL || tag == SCTAG_DOM_SYSTEM_PRINCIPAL ||
         tag == SCTAG_DOM_CONTENT_PRINCIPAL ||
@@ -254,19 +256,21 @@ static bool ReadPrincipalInfo(JSStructur
 #else
     MOZ_CRASH("unexpected principal structured clone tag");
 #endif
   }
 
   return true;
 }
 
-/* static */ bool nsJSPrincipals::ReadKnownPrincipalType(
-    JSContext* aCx, JSStructuredCloneReader* aReader, uint32_t aTag,
-    JSPrincipals** aOutPrincipals) {
+/* static */
+bool nsJSPrincipals::ReadKnownPrincipalType(JSContext* aCx,
+                                            JSStructuredCloneReader* aReader,
+                                            uint32_t aTag,
+                                            JSPrincipals** aOutPrincipals) {
   MOZ_ASSERT(aTag == SCTAG_DOM_NULL_PRINCIPAL ||
              aTag == SCTAG_DOM_SYSTEM_PRINCIPAL ||
              aTag == SCTAG_DOM_CONTENT_PRINCIPAL ||
              aTag == SCTAG_DOM_EXPANDED_PRINCIPAL);
 
   if (NS_WARN_IF(!NS_IsMainThread())) {
     xpc::Throw(aCx, NS_ERROR_UNCATCHABLE_EXCEPTION);
     return false;
--- a/caps/nsScriptSecurityManager.cpp
+++ b/caps/nsScriptSecurityManager.cpp
@@ -561,17 +561,18 @@ nsScriptSecurityManager::CheckSameOrigin
       ReportError("CheckSameOriginError", aSourceURI, aTargetURI,
                   aFromPrivateWindow);
     }
     return NS_ERROR_DOM_BAD_URI;
   }
   return NS_OK;
 }
 
-/*static*/ uint32_t nsScriptSecurityManager::HashPrincipalByOrigin(
+/*static*/
+uint32_t nsScriptSecurityManager::HashPrincipalByOrigin(
     nsIPrincipal* aPrincipal) {
   nsCOMPtr<nsIURI> uri;
   aPrincipal->GetDomain(getter_AddRefs(uri));
   if (!uri) aPrincipal->GetURI(getter_AddRefs(uri));
   return SecurityHashURI(uri);
 }
 
 NS_IMETHODIMP
@@ -1447,17 +1448,18 @@ void nsScriptSecurityManager::Shutdown()
   NS_IF_RELEASE(sIOService);
   BundleHelper::Shutdown();
 }
 
 nsScriptSecurityManager* nsScriptSecurityManager::GetScriptSecurityManager() {
   return gScriptSecMan;
 }
 
-/* static */ void nsScriptSecurityManager::InitStatics() {
+/* static */
+void nsScriptSecurityManager::InitStatics() {
   RefPtr<nsScriptSecurityManager> ssManager = new nsScriptSecurityManager();
   nsresult rv = ssManager->Init();
   if (NS_FAILED(rv)) {
     MOZ_CRASH("ssManager->Init() failed");
   }
 
   ClearOnShutdown(&gScriptSecMan);
   gScriptSecMan = ssManager;
--- a/chrome/nsChromeRegistryChrome.cpp
+++ b/chrome/nsChromeRegistryChrome.cpp
@@ -348,17 +348,18 @@ void nsChromeRegistryChrome::SendRegiste
       DebugOnly<bool> success = parents[i]->SendRegisterChrome(
           packages, resources, overrides, appLocale, true);
       NS_WARNING_ASSERTION(success,
                            "couldn't reset a child's registered chrome");
     }
   }
 }
 
-/* static */ void nsChromeRegistryChrome::ChromePackageFromPackageEntry(
+/* static */
+void nsChromeRegistryChrome::ChromePackageFromPackageEntry(
     const nsACString& aPackageName, PackageEntry* aPackage,
     ChromePackage* aChromePackage, const nsCString& aSelectedSkin) {
   nsAutoCString appLocale;
   LocaleService::GetInstance()->GetAppLocaleAsLangTag(appLocale);
 
   SerializeURI(aPackage->baseURI, aChromePackage->contentBaseURI);
   SerializeURI(aPackage->locales.GetBase(appLocale, nsProviderArray::LOCALE),
                aChromePackage->localeBaseURI);
--- a/devtools/client/debugger/new/src/client/firefox/commands.js
+++ b/devtools/client/debugger/new/src/client/firefox/commands.js
@@ -353,17 +353,18 @@ function getSourceForActor(actor: ActorI
     throw new Error(`Unknown source actor: ${actor}`);
   }
   return sourceActors[actor];
 }
 
 async function fetchWorkers(): Promise<Worker[]> {
   if (features.windowlessWorkers) {
     const options = {
-      breakpoints
+      breakpoints,
+      observeAsmJS: true
     };
 
     const newWorkerClients = await updateWorkerClients({
       tabTarget,
       debuggerClient,
       threadClient,
       workerClients,
       options
--- a/devtools/client/debugger/new/test/mochitest/browser.ini
+++ b/devtools/client/debugger/new/test/mochitest/browser.ini
@@ -650,16 +650,18 @@ support-files =
   examples/pause-points.js
   examples/script-mutate.js
   examples/script-switching-02.js
   examples/script-switching-01.js
   examples/times2.js
   examples/doc-windowless-workers.html
   examples/doc-windowless-workers-early-breakpoint.html
   examples/simple-worker.js
+  examples/doc-worker-scopes.html
+  examples/scopes-worker.js
   examples/doc-event-handler.html
   examples/doc-eval-throw.html
 
 [browser_dbg-asm.js]
 [browser_dbg-async-stepping.js]
 [browser_dbg-sourcemapped-breakpoint-console.js]
 skip-if = (os == "win" && ccov) # Bug 1453549
 [browser_dbg-xhr-breakpoints.js]
@@ -767,10 +769,11 @@ skip-if = os == "win"
 [browser_dbg-tabs-without-urls.js]
 [browser_dbg-toggling-tools.js]
 [browser_dbg-react-app.js]
 skip-if = os == "win"
 [browser_dbg-wasm-sourcemaps.js]
 skip-if = true
 [browser_dbg-windowless-workers.js]
 [browser_dbg-windowless-workers-early-breakpoint.js]
+[browser_dbg-worker-scopes.js]
 [browser_dbg-event-handler.js]
 [browser_dbg-eval-throw.js]
new file mode 100644
--- /dev/null
+++ b/devtools/client/debugger/new/test/mochitest/browser_dbg-worker-scopes.js
@@ -0,0 +1,68 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
+/* Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/publicdomain/zero/1.0/ */
+
+function findNode(dbg, text) {
+  for (let index = 0;; index++) {
+    var elem = findElement(dbg, "scopeNode", index);
+    if (elem && elem.innerText == text) {
+      return elem;
+    }
+  }
+}
+
+function toggleNode(dbg, text) {
+  return toggleObjectInspectorNode(findNode(dbg, text));
+}
+
+function findNodeValue(dbg, text) {
+  for (let index = 0;; index++) {
+    var elem = findElement(dbg, "scopeNode", index);
+    if (elem && elem.innerText == text) {
+      return findElement(dbg, "scopeValue", index).innerText;
+    }
+  }
+}
+
+// Test that unusual objects have their contents shown in worker thread scopes.
+add_task(async function() {
+  const dbg = await initDebugger("doc-worker-scopes.html", "scopes-worker.js");
+  const workerSource = findSource(dbg, "scopes-worker.js");
+
+  await addBreakpoint(dbg, workerSource, 6);
+  invokeInTab("startWorker");
+  await waitForPaused(dbg, "scopes-worker.js");
+  await removeBreakpoint(dbg, workerSource.id, 6);
+
+  // We should be paused at the first line of simple-worker.js
+  assertPausedAtSourceAndLine(dbg, workerSource.id, 6);
+
+  await toggleNode(dbg, "var_array");
+  ok(findNodeValue(dbg, "0") == "\"mango\"", "array elem0");
+  ok(findNodeValue(dbg, "1") == "\"pamplemousse\"", "array elem1");
+  ok(findNodeValue(dbg, "2") == "\"pineapple\"", "array elem2");
+  await toggleNode(dbg, "var_array");
+
+  await toggleNode(dbg, "var_tarray");
+  ok(findNodeValue(dbg, "0") == "42", "tarray elem0");
+  ok(findNodeValue(dbg, "1") == "43", "tarray elem1");
+  ok(findNodeValue(dbg, "2") == "44", "tarray elem2");
+  await toggleNode(dbg, "var_tarray");
+
+  await toggleNode(dbg, "var_set");
+  await toggleNode(dbg, "<entries>");
+  ok(findNodeValue(dbg, "0") == "\"papaya\"", "set elem0");
+  ok(findNodeValue(dbg, "1") == "\"banana\"", "set elem1");
+  await toggleNode(dbg, "var_set");
+
+  await toggleNode(dbg, "var_map");
+  await toggleNode(dbg, "<entries>");
+  await toggleNode(dbg, "0");
+  ok(findNodeValue(dbg, "<key>"), "1");
+  ok(findNodeValue(dbg, "<value>"), "\"one\"");
+  await toggleNode(dbg, "0");
+  await toggleNode(dbg, "1");
+  ok(findNodeValue(dbg, "<key>"), "2");
+  ok(findNodeValue(dbg, "<value>"), "\"two\"");
+});
new file mode 100644
--- /dev/null
+++ b/devtools/client/debugger/new/test/mochitest/examples/doc-worker-scopes.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML>
+<html>
+
+<script>
+startWorker();
+
+function startWorker() {
+  w = new Worker("scopes-worker.js");
+}
+</script>
+
+<body>
+Hello World!
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/devtools/client/debugger/new/test/mochitest/examples/scopes-worker.js
@@ -0,0 +1,8 @@
+function f() {
+  var var_array = ["mango","pamplemousse","pineapple"];
+  var var_tarray = new Uint8Array([42,43,44]);
+  var var_set = new Set(["papaya","banana"]);
+  var var_map = new Map([[1,"one"],[2,"two"]]);
+  return 0;
+}
+f();
--- a/devtools/server/actors/object/previewers.js
+++ b/devtools/server/actors/object/previewers.js
@@ -124,34 +124,35 @@ const previewers = {
     if (hooks.getGripDepth() > 1) {
       return true;
     }
 
     const raw = obj.unsafeDereference();
     const items = grip.preview.items = [];
 
     for (let i = 0; i < length; ++i) {
-      if (raw) {
+      if (raw && !isWorker) {
         // Array Xrays filter out various possibly-unsafe properties (like
         // functions, and claim that the value is undefined instead. This
         // is generally the right thing for privileged code accessing untrusted
         // objects, but quite confusing for Object previews. So we manually
         // override this protection by waiving Xrays on the array, and re-applying
         // Xrays on any indexed value props that we pull off of it.
         const desc = Object.getOwnPropertyDescriptor(Cu.waiveXrays(raw), i);
         if (desc && !desc.get && !desc.set) {
           let value = Cu.unwaiveXrays(desc.value);
           value = ObjectUtils.makeDebuggeeValueIfNeeded(obj, value);
           items.push(hooks.createValueGrip(value));
         } else {
           items.push(null);
         }
       } else {
-        // When recording/replaying we don't have a raw object, but also don't
-        // need to deal with Xrays into the debuggee compartment.
+        // Workers do not have access to Cu, and when recording/replaying we
+        // don't have a raw object. In either case we do not need to deal with
+        // xray wrappers.
         const value = DevToolsUtils.getProperty(obj, i);
         items.push(hooks.createValueGrip(value));
       }
 
       if (items.length == OBJECT_PREVIEW_MAX_ITEMS) {
         break;
       }
     }
@@ -452,18 +453,19 @@ previewers.Object = [
 
     if (hooks.getGripDepth() > 1) {
       return true;
     }
 
     const raw = obj.unsafeDereference();
 
     // The raw object will be null/unavailable when interacting with a
-    // replaying execution.
-    if (raw) {
+    // replaying execution, and Cu is unavailable in workers. In either case we
+    // do not need to worry about xrays.
+    if (raw && !isWorker) {
       const global = Cu.getGlobalForObject(DebuggerServer);
       const classProto = global[obj.class].prototype;
       // The Xray machinery for TypedArrays denies indexed access on the grounds
       // that it's slow, and advises callers to do a structured clone instead.
       const safeView = Cu.cloneInto(classProto.subarray.call(raw, 0,
         OBJECT_PREVIEW_MAX_ITEMS), global);
       const items = grip.preview.items = [];
       for (let i = 0; i < safeView.length; i++) {
--- a/devtools/server/actors/object/property-iterator.js
+++ b/devtools/server/actors/object/property-iterator.js
@@ -108,18 +108,21 @@ const PropertyIteratorActor  = protocol.
     return this.slice({ start: 0, count: this.iterator.size });
   },
 });
 
 /**
  * Helper function to create a grip from a Map/Set entry
  */
 function gripFromEntry({ obj, hooks }, entry) {
+  if (!isWorker) {
+    entry = Cu.unwaiveXrays(entry);
+  }
   return hooks.createValueGrip(
-    ObjectUtils.makeDebuggeeValueIfNeeded(obj, Cu.unwaiveXrays(entry)));
+    ObjectUtils.makeDebuggeeValueIfNeeded(obj, entry));
 }
 
 function enumArrayProperties(objectActor, options) {
   return {
     size: ObjectUtils.getArrayLength(objectActor.obj),
     propertyName(index) {
       return index;
     },
@@ -246,33 +249,47 @@ function enumMapEntries(objectActor) {
   // Arrays, the semantics often deny access to the entires based on the
   // nature of the values. So we need waive Xrays for the iterator object
   // and the tupes, and then re-apply them on the underlying values until
   // we fix bug 1023984.
   //
   // Even then though, we might want to continue waiving Xrays here for the
   // same reason we do so for Arrays above - this filtering behavior is likely
   // to be more confusing than beneficial in the case of Object previews.
-  const raw = objectActor.obj.unsafeDereference();
+  let keys, getValue;
+  if (isWorker) {
+    const keysIterator = DevToolsUtils.callPropertyOnObject(objectActor.obj, "keys");
+    keys = [...DevToolsUtils.makeDebuggeeIterator(keysIterator)];
+    const valuesIterator = DevToolsUtils.callPropertyOnObject(objectActor.obj, "values");
+    const values = [...DevToolsUtils.makeDebuggeeIterator(valuesIterator)];
+    const map = new Map();
+    for (let i = 0; i < keys.length; i++) {
+      map.set(keys[i], values[i]);
+    }
+    getValue = key => map.get(key);
+  } else {
+    const raw = objectActor.obj.unsafeDereference();
+    keys = [...Cu.waiveXrays(Map.prototype.keys.call(raw))];
+    getValue = key => Map.prototype.get.call(raw, key);
+  }
 
-  const keys = [...Cu.waiveXrays(Map.prototype.keys.call(raw))];
   return {
     [Symbol.iterator]: function* () {
       for (const key of keys) {
-        const value = Map.prototype.get.call(raw, key);
+        const value = getValue(key);
         yield [ key, value ].map(val => gripFromEntry(objectActor, val));
       }
     },
     size: keys.length,
     propertyName(index) {
       return index;
     },
     propertyDescription(index) {
       const key = keys[index];
-      const val = Map.prototype.get.call(raw, key);
+      const val = getValue(key);
       return {
         enumerable: true,
         value: {
           type: "mapEntry",
           preview: {
             key: gripFromEntry(objectActor, key),
             value: gripFromEntry(objectActor, val),
           },
@@ -369,18 +386,24 @@ function enumSetEntries(objectActor) {
   // compartment. However, we _do_ have Xrays to Object now, so we end up
   // Xraying those temporary objects, and filtering access to |it.value|
   // based on whether or not it's Xrayable and/or callable, which breaks
   // the for/of iteration.
   //
   // This code is designed to handle untrusted objects, so we can safely
   // waive Xrays on the iterable, and relying on the Debugger machinery to
   // make sure we handle the resulting objects carefully.
-  const raw = objectActor.obj.unsafeDereference();
-  const values = [...Cu.waiveXrays(Set.prototype.values.call(raw))];
+  let values;
+  if (isWorker) {
+    const iterator = DevToolsUtils.callPropertyOnObject(objectActor.obj, "values");
+    values = [...DevToolsUtils.makeDebuggeeIterator(iterator)];
+  } else {
+    const raw = objectActor.obj.unsafeDereference();
+    values = [...Cu.waiveXrays(Set.prototype.values.call(raw))];
+  }
 
   return {
     [Symbol.iterator]: function* () {
       for (const item of values) {
         yield gripFromEntry(objectActor, item);
       }
     },
     size: values.length,
--- a/devtools/server/actors/object/utils.js
+++ b/devtools/server/actors/object/utils.js
@@ -166,16 +166,22 @@ function getArrayLength(object) {
   // Real arrays have a reliable `length` own property.
   if (object.class === "Array") {
     return DevToolsUtils.getProperty(object, "length");
   }
 
   // For typed arrays, `DevToolsUtils.getProperty` is not reliable because the `length`
   // getter could be shadowed by an own property, and `getOwnPropertyNames` is
   // unnecessarily slow. Obtain the `length` getter safely and call it manually.
+  if (isWorker) {
+    // Workers can't wrap debugger values into debuggees, so do the calculations
+    // in the debuggee itself.
+    const getter = object.proto.proto.getOwnPropertyDescriptor("length").get;
+    return getter.call(object).return;
+  }
   const typedProto = Object.getPrototypeOf(Uint8Array.prototype);
   const getter = Object.getOwnPropertyDescriptor(typedProto, "length").get;
   return getter.call(object.unsafeDereference());
 }
 
 /**
  * Returns true if the parameter is suitable to be an array index.
  *
--- a/devtools/server/actors/thread.js
+++ b/devtools/server/actors/thread.js
@@ -274,16 +274,20 @@ const ThreadActor = ActorClassWithSpec(t
       for (const { location, options } of Object.values(request.options.breakpoints)) {
         this.setBreakpoint(location, options);
       }
     }
 
     this.dbg.addDebuggees();
     this.dbg.enabled = true;
 
+    if ("observeAsmJS" in this._options) {
+      this.dbg.allowUnobservedAsmJS = !this._options.observeAsmJS;
+    }
+
     // Notify the parent that we've finished attaching. If this is a worker
     // thread which was paused until attaching, this will allow content to
     // begin executing.
     if (this._parent.onThreadAttached) {
       this._parent.onThreadAttached();
     }
 
     try {
--- a/devtools/server/tests/unit/test_objectgrips-20.js
+++ b/devtools/server/tests/unit/test_objectgrips-20.js
@@ -140,17 +140,30 @@ add_task(threadClientTest(async ({ threa
     expectedNonIndexedProperties: [
       ["foo", "bar"],
       ["bar", "foo"],
       ["length", 2],
       ["buffer", DO_NOT_CHECK_VALUE],
       ["byteLength", 2],
       ["byteOffset", 0],
     ],
-  }, {
+  }];
+
+  for (const test of testCases) {
+    await test_object_grip(debuggee, client, threadClient, test);
+  }
+}));
+
+// These tests are not yet supported in workers.
+add_task(threadClientTest(async ({ threadClient, debuggee, client }) => {
+  debuggee.eval(function stopMe(arg1) {
+    debugger;
+  }.toString());
+
+  const testCases = [{
     evaledObject: `(() => {
       x = new Int8Array([1, 2]);
       Object.defineProperty(x, 'length', {value: 0});
       return x;
     })()`,
     expectedIndexedProperties: [["0", 1], ["1", 2]],
     expectedNonIndexedProperties: [
       ["length", 0],
@@ -166,17 +179,17 @@ add_task(threadClientTest(async ({ threa
     })()`,
     expectedIndexedProperties: [["0", 1], ["1", 2]],
     expectedNonIndexedProperties: [],
   }];
 
   for (const test of testCases) {
     await test_object_grip(debuggee, client, threadClient, test);
   }
-}));
+}, { doNotRunWorker: true }));
 
 async function test_object_grip(debuggee, dbgClient, threadClient, testData = {}) {
   const {
     evaledObject,
     expectedIndexedProperties,
     expectedNonIndexedProperties,
   } = testData;
 
--- a/devtools/shared/DevToolsUtils.js
+++ b/devtools/shared/DevToolsUtils.js
@@ -793,8 +793,22 @@ function callPropertyOnObject(object, na
   }
   if ("throw" in result) {
     throw result.throw;
   }
   return result.return;
 }
 
 exports.callPropertyOnObject = callPropertyOnObject;
+
+// Convert a Debugger.Object wrapping an iterator into an iterator in the
+// debugger's realm.
+function* makeDebuggeeIterator(object) {
+  while (true) {
+    const nextValue = callPropertyOnObject(object, "next");
+    if (exports.getProperty(nextValue, "done")) {
+      break;
+    }
+    yield exports.getProperty(nextValue, "value");
+  }
+}
+
+exports.makeDebuggeeIterator = makeDebuggeeIterator;
--- a/devtools/shared/heapsnapshot/DominatorTree.cpp
+++ b/devtools/shared/heapsnapshot/DominatorTree.cpp
@@ -117,15 +117,16 @@ NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(Do
 NS_IMPL_CYCLE_COLLECTING_ADDREF(DominatorTree)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(DominatorTree)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(DominatorTree)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
-/* virtual */ JSObject* DominatorTree::WrapObject(
-    JSContext* aCx, JS::HandleObject aGivenProto) {
+/* virtual */
+JSObject* DominatorTree::WrapObject(JSContext* aCx,
+                                    JS::HandleObject aGivenProto) {
   return dom::DominatorTree_Binding::Wrap(aCx, this, aGivenProto);
 }
 
 }  // namespace devtools
 }  // namespace mozilla
--- a/devtools/shared/heapsnapshot/FileDescriptorOutputStream.cpp
+++ b/devtools/shared/heapsnapshot/FileDescriptorOutputStream.cpp
@@ -4,18 +4,19 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/devtools/FileDescriptorOutputStream.h"
 #include "private/pprio.h"
 
 namespace mozilla {
 namespace devtools {
 
-/* static */ already_AddRefed<FileDescriptorOutputStream>
-FileDescriptorOutputStream::Create(const ipc::FileDescriptor& fileDescriptor) {
+/* static */
+already_AddRefed<FileDescriptorOutputStream> FileDescriptorOutputStream::Create(
+    const ipc::FileDescriptor& fileDescriptor) {
   if (NS_WARN_IF(!fileDescriptor.IsValid())) return nullptr;
 
   auto rawFD = fileDescriptor.ClonePlatformHandle();
   PRFileDesc* prfd = PR_ImportFile(PROsfd(rawFD.release()));
   if (NS_WARN_IF(!prfd)) return nullptr;
 
   RefPtr<FileDescriptorOutputStream> stream =
       new FileDescriptorOutputStream(prfd);
--- a/devtools/shared/heapsnapshot/HeapSnapshot.cpp
+++ b/devtools/shared/heapsnapshot/HeapSnapshot.cpp
@@ -76,26 +76,29 @@ NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(He
 NS_IMPL_CYCLE_COLLECTING_ADDREF(HeapSnapshot)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(HeapSnapshot)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(HeapSnapshot)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
-/* virtual */ JSObject* HeapSnapshot::WrapObject(JSContext* aCx,
-                                                 HandleObject aGivenProto) {
+/* virtual */
+JSObject* HeapSnapshot::WrapObject(JSContext* aCx, HandleObject aGivenProto) {
   return HeapSnapshot_Binding::Wrap(aCx, this, aGivenProto);
 }
 
 /*** Reading Heap Snapshots ***************************************************/
 
-/* static */ already_AddRefed<HeapSnapshot> HeapSnapshot::Create(
-    JSContext* cx, GlobalObject& global, const uint8_t* buffer, uint32_t size,
-    ErrorResult& rv) {
+/* static */
+already_AddRefed<HeapSnapshot> HeapSnapshot::Create(JSContext* cx,
+                                                    GlobalObject& global,
+                                                    const uint8_t* buffer,
+                                                    uint32_t size,
+                                                    ErrorResult& rv) {
   RefPtr<HeapSnapshot> snapshot = new HeapSnapshot(cx, global.GetAsSupports());
   if (!snapshot->init(cx, buffer, size)) {
     rv.Throw(NS_ERROR_UNEXPECTED);
     return nullptr;
   }
   return snapshot.forget();
 }
 
@@ -1344,17 +1347,18 @@ bool WriteHeapGraph(JSContext* cx, const
   return ok;
 }
 
 static unsigned long msSinceProcessCreation(const TimeStamp& now) {
   auto duration = now - TimeStamp::ProcessCreation();
   return (unsigned long)duration.ToMilliseconds();
 }
 
-/* static */ already_AddRefed<nsIFile> HeapSnapshot::CreateUniqueCoreDumpFile(
+/* static */
+already_AddRefed<nsIFile> HeapSnapshot::CreateUniqueCoreDumpFile(
     ErrorResult& rv, const TimeStamp& now, nsAString& outFilePath,
     nsAString& outSnapshotId) {
   nsCOMPtr<nsIFile> file;
   rv = NS_GetSpecialDirectory(NS_OS_TEMP_DIR, getter_AddRefs(file));
   if (NS_WARN_IF(rv.Failed())) return nullptr;
 
   nsAutoString tempPath;
   rv = file->GetPath(tempPath);
@@ -1457,17 +1461,18 @@ static already_AddRefed<nsIOutputStream>
 
 }  // namespace devtools
 
 namespace dom {
 
 using namespace JS;
 using namespace devtools;
 
-/* static */ void ChromeUtils::SaveHeapSnapshotShared(
+/* static */
+void ChromeUtils::SaveHeapSnapshotShared(
     GlobalObject& global, const HeapSnapshotBoundaries& boundaries,
     nsAString& outFilePath, nsAString& outSnapshotId, ErrorResult& rv) {
   auto start = TimeStamp::Now();
 
   bool wantNames = true;
   CompartmentSet compartments;
   uint32_t nodeCount = 0;
   uint32_t edgeCount = 0;
@@ -1509,31 +1514,34 @@ using namespace devtools;
   Telemetry::AccumulateTimeDelta(Telemetry::DEVTOOLS_SAVE_HEAP_SNAPSHOT_MS,
                                  start);
   Telemetry::Accumulate(Telemetry::DEVTOOLS_HEAP_SNAPSHOT_NODE_COUNT,
                         nodeCount);
   Telemetry::Accumulate(Telemetry::DEVTOOLS_HEAP_SNAPSHOT_EDGE_COUNT,
                         edgeCount);
 }
 
-/* static */ void ChromeUtils::SaveHeapSnapshot(
-    GlobalObject& global, const HeapSnapshotBoundaries& boundaries,
-    nsAString& outFilePath, ErrorResult& rv) {
+/* static */
+void ChromeUtils::SaveHeapSnapshot(GlobalObject& global,
+                                   const HeapSnapshotBoundaries& boundaries,
+                                   nsAString& outFilePath, ErrorResult& rv) {
   nsAutoString snapshotId;
   SaveHeapSnapshotShared(global, boundaries, outFilePath, snapshotId, rv);
 }
 
-/* static */ void ChromeUtils::SaveHeapSnapshotGetId(
+/* static */
+void ChromeUtils::SaveHeapSnapshotGetId(
     GlobalObject& global, const HeapSnapshotBoundaries& boundaries,
     nsAString& outSnapshotId, ErrorResult& rv) {
   nsAutoString filePath;
   SaveHeapSnapshotShared(global, boundaries, filePath, outSnapshotId, rv);
 }
 
-/* static */ already_AddRefed<HeapSnapshot> ChromeUtils::ReadHeapSnapshot(
+/* static */
+already_AddRefed<HeapSnapshot> ChromeUtils::ReadHeapSnapshot(
     GlobalObject& global, const nsAString& filePath, ErrorResult& rv) {
   auto start = TimeStamp::Now();
 
   UniquePtr<char[]> path(ToNewCString(filePath));
   if (!path) {
     rv.Throw(NS_ERROR_OUT_OF_MEMORY);
     return nullptr;
   }
--- a/devtools/shared/worker/loader.js
+++ b/devtools/shared/worker/loader.js
@@ -560,16 +560,18 @@ this.worker = new WorkerDebuggerLoader({
     "rpc": rpc,
     "URL": URL,
     "setImmediate": setImmediate,
     "lazyRequire": lazyRequire,
     "lazyRequireModule": lazyRequireModule,
     "retrieveConsoleEvents": this.retrieveConsoleEvents,
     "setConsoleEventHandler": this.setConsoleEventHandler,
     "console": console,
+    "btoa": this.btoa,
+    "atob": this.atob,
   },
   loadSubScript: loadSubScript,
   modules: {
     "Debugger": Debugger,
     "Services": Object.create(null),
     "chrome": chrome,
     "xpcInspector": xpcInspector,
   },
--- a/docshell/base/BrowsingContext.cpp
+++ b/docshell/base/BrowsingContext.cpp
@@ -75,46 +75,47 @@ static void Sync(BrowsingContext* aBrows
 BrowsingContext* BrowsingContext::TopLevelBrowsingContext() {
   BrowsingContext* bc = this;
   while (bc->mParent) {
     bc = bc->mParent;
   }
   return bc;
 }
 
-/* static */ void BrowsingContext::Init() {
+/* static */
+void BrowsingContext::Init() {
   if (!sBrowsingContexts) {
     sBrowsingContexts = new BrowsingContextMap<WeakPtr>();
     ClearOnShutdown(&sBrowsingContexts);
   }
 
   if (!sCachedBrowsingContexts) {
     sCachedBrowsingContexts = new BrowsingContextMap<RefPtr>();
     ClearOnShutdown(&sCachedBrowsingContexts);
   }
 }
 
-/* static */ LogModule* BrowsingContext::GetLog() {
-  return gBrowsingContextLog;
-}
+/* static */
+LogModule* BrowsingContext::GetLog() { return gBrowsingContextLog; }
 
-/* static */ already_AddRefed<BrowsingContext> BrowsingContext::Get(
-    uint64_t aId) {
+/* static */
+already_AddRefed<BrowsingContext> BrowsingContext::Get(uint64_t aId) {
   if (BrowsingContextMap<WeakPtr>::Ptr abc = sBrowsingContexts->lookup(aId)) {
     return do_AddRef(abc->value().get());
   }
 
   return nullptr;
 }
 
 CanonicalBrowsingContext* BrowsingContext::Canonical() {
   return CanonicalBrowsingContext::Cast(this);
 }
 
-/* static */ already_AddRefed<BrowsingContext> BrowsingContext::Create(
+/* static */
+already_AddRefed<BrowsingContext> BrowsingContext::Create(
     BrowsingContext* aParent, BrowsingContext* aOpener, const nsAString& aName,
     Type aType) {
   MOZ_DIAGNOSTIC_ASSERT(!aParent || aParent->mType == aType);
 
   uint64_t id = nsContentUtils::GenerateBrowsingContextId();
 
   MOZ_LOG(GetLog(), LogLevel::Debug,
           ("Creating 0x%08" PRIx64 " in %s", id,
@@ -131,17 +132,18 @@ CanonicalBrowsingContext* BrowsingContex
   Register(context);
 
   // Attach the browsing context to the tree.
   context->Attach();
 
   return context.forget();
 }
 
-/* static */ already_AddRefed<BrowsingContext> BrowsingContext::CreateFromIPC(
+/* static */
+already_AddRefed<BrowsingContext> BrowsingContext::CreateFromIPC(
     BrowsingContext* aParent, BrowsingContext* aOpener, const nsAString& aName,
     uint64_t aId, ContentParent* aOriginProcess) {
   MOZ_DIAGNOSTIC_ASSERT(aOriginProcess || XRE_IsContentProcess(),
                         "Parent Process IPC contexts need a Content Process.");
   MOZ_DIAGNOSTIC_ASSERT(!aParent || aParent->IsContent());
 
   MOZ_LOG(GetLog(), LogLevel::Debug,
           ("Creating 0x%08" PRIx64 " from IPC (origin=0x%08" PRIx64 ")", aId,
--- a/docshell/base/CanonicalBrowsingContext.cpp
+++ b/docshell/base/CanonicalBrowsingContext.cpp
@@ -25,23 +25,25 @@ CanonicalBrowsingContext::CanonicalBrows
                                                    BrowsingContext::Type aType)
     : BrowsingContext(aParent, aOpener, aName, aBrowsingContextId, aType),
       mProcessId(aProcessId) {
   // You are only ever allowed to create CanonicalBrowsingContexts in the
   // parent process.
   MOZ_RELEASE_ASSERT(XRE_IsParentProcess());
 }
 
-/* static */ already_AddRefed<CanonicalBrowsingContext>
-CanonicalBrowsingContext::Get(uint64_t aId) {
+/* static */
+already_AddRefed<CanonicalBrowsingContext> CanonicalBrowsingContext::Get(
+    uint64_t aId) {
   MOZ_RELEASE_ASSERT(XRE_IsParentProcess());
   return BrowsingContext::Get(aId).downcast<CanonicalBrowsingContext>();
 }
 
-/* static */ CanonicalBrowsingContext* CanonicalBrowsingContext::Cast(
+/* static */
+CanonicalBrowsingContext* CanonicalBrowsingContext::Cast(
     BrowsingContext* aContext) {
   MOZ_RELEASE_ASSERT(XRE_IsParentProcess());
   return static_cast<CanonicalBrowsingContext*>(aContext);
 }
 
 /* static */ const CanonicalBrowsingContext* CanonicalBrowsingContext::Cast(
     const BrowsingContext* aContext) {
   MOZ_RELEASE_ASSERT(XRE_IsParentProcess());
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -444,17 +444,18 @@ nsDocShell::~nsDocShell() {
   if (!PR_GetEnv("MOZ_QUIET")) {
     printf_stderr("--DOCSHELL %p == %ld [pid = %d] [id = %s]\n", (void*)this,
                   gNumberOfDocShells, getpid(),
                   nsIDToCString(mHistoryID).get());
   }
 #endif
 }
 
-/* static */ already_AddRefed<nsDocShell> nsDocShell::Create(
+/* static */
+already_AddRefed<nsDocShell> nsDocShell::Create(
     BrowsingContext* aBrowsingContext) {
   MOZ_ASSERT(aBrowsingContext, "DocShell without a BrowsingContext!");
 
   nsresult rv;
   RefPtr<nsDocShell> ds = new nsDocShell(aBrowsingContext);
 
   // Initialize the underlying nsDocLoader.
   rv = ds->nsDocLoader::Init();
@@ -1015,19 +1016,19 @@ nsDOMNavigationTiming* nsDocShell::GetNa
 // Bug 13871: Prevent frameset spoofing
 //
 // This routine answers: 'Is origin's document from same domain as
 // target's document?'
 //
 // file: uris are considered the same domain for the purpose of
 // frame navigation regardless of script accessibility (bug 420425)
 //
-/* static */ bool nsDocShell::ValidateOrigin(
-    nsIDocShellTreeItem* aOriginTreeItem,
-    nsIDocShellTreeItem* aTargetTreeItem) {
+/* static */
+bool nsDocShell::ValidateOrigin(nsIDocShellTreeItem* aOriginTreeItem,
+                                nsIDocShellTreeItem* aTargetTreeItem) {
   // We want to bypass this check for chrome callers, but only if there's
   // JS on the stack. System callers still need to do it.
   if (nsContentUtils::GetCurrentJSContext() &&
       nsContentUtils::IsCallerChrome()) {
     return true;
   }
 
   MOZ_ASSERT(aOriginTreeItem && aTargetTreeItem, "need two docshells");
@@ -2352,17 +2353,18 @@ nsDocShell::SetMetaViewportOverride(
   nsCOMPtr<nsIPresShell> presShell = GetPresShell();
   if (presShell) {
     presShell->UpdateViewportOverridden(true);
   }
 
   return NS_OK;
 }
 
-/* virtual */ int32_t nsDocShell::ItemType() { return mItemType; }
+/* virtual */
+int32_t nsDocShell::ItemType() { return mItemType; }
 
 NS_IMETHODIMP
 nsDocShell::GetItemType(int32_t* aItemType) {
   NS_ENSURE_ARG_POINTER(aItemType);
 
   MOZ_DIAGNOSTIC_ASSERT(
       (mBrowsingContext->IsContent() ? typeContent : typeChrome) == mItemType);
   *aItemType = mItemType;
@@ -12850,30 +12852,30 @@ unsigned long nsDocShell::gNumberOfDocSh
 #endif
 
 NS_IMETHODIMP
 nsDocShell::GetCanExecuteScripts(bool* aResult) {
   *aResult = mCanExecuteScripts;
   return NS_OK;
 }
 
-/* [infallible] */ NS_IMETHODIMP nsDocShell::SetFrameType(
-    FrameType aFrameType) {
+/* [infallible] */
+NS_IMETHODIMP nsDocShell::SetFrameType(FrameType aFrameType) {
   mFrameType = aFrameType;
   return NS_OK;
 }
 
-/* [infallible] */ NS_IMETHODIMP nsDocShell::GetFrameType(
-    FrameType* aFrameType) {
+/* [infallible] */
+NS_IMETHODIMP nsDocShell::GetFrameType(FrameType* aFrameType) {
   *aFrameType = mFrameType;
   return NS_OK;
 }
 
-/* [infallible] */ NS_IMETHODIMP nsDocShell::GetIsMozBrowser(
-    bool* aIsMozBrowser) {
+/* [infallible] */
+NS_IMETHODIMP nsDocShell::GetIsMozBrowser(bool* aIsMozBrowser) {
   *aIsMozBrowser = (mFrameType == FRAME_TYPE_BROWSER);
   return NS_OK;
 }
 
 uint32_t nsDocShell::GetInheritedFrameType() {
   if (mFrameType != FRAME_TYPE_REGULAR) {
     return mFrameType;
   }
@@ -12884,42 +12886,45 @@ uint32_t nsDocShell::GetInheritedFrameTy
   nsCOMPtr<nsIDocShell> parent = do_QueryInterface(parentAsItem);
   if (!parent) {
     return FRAME_TYPE_REGULAR;
   }
 
   return static_cast<nsDocShell*>(parent.get())->GetInheritedFrameType();
 }
 
-/* [infallible] */ NS_IMETHODIMP nsDocShell::GetIsIsolatedMozBrowserElement(
+/* [infallible] */
+NS_IMETHODIMP nsDocShell::GetIsIsolatedMozBrowserElement(
     bool* aIsIsolatedMozBrowserElement) {
   bool result = mFrameType == FRAME_TYPE_BROWSER &&
                 mOriginAttributes.mInIsolatedMozBrowser;
   *aIsIsolatedMozBrowserElement = result;
   return NS_OK;
 }
 
-/* [infallible] */ NS_IMETHODIMP nsDocShell::GetIsInIsolatedMozBrowserElement(
+/* [infallible] */
+NS_IMETHODIMP nsDocShell::GetIsInIsolatedMozBrowserElement(
     bool* aIsInIsolatedMozBrowserElement) {
   MOZ_ASSERT(!mOriginAttributes.mInIsolatedMozBrowser ||
                  (GetInheritedFrameType() == FRAME_TYPE_BROWSER),
              "Isolated mozbrowser should only be true inside browser frames");
   bool result = (GetInheritedFrameType() == FRAME_TYPE_BROWSER) &&
                 mOriginAttributes.mInIsolatedMozBrowser;
   *aIsInIsolatedMozBrowserElement = result;
   return NS_OK;
 }
 
-/* [infallible] */ NS_IMETHODIMP nsDocShell::GetIsInMozBrowser(
-    bool* aIsInMozBrowser) {
+/* [infallible] */
+NS_IMETHODIMP nsDocShell::GetIsInMozBrowser(bool* aIsInMozBrowser) {
   *aIsInMozBrowser = (GetInheritedFrameType() == FRAME_TYPE_BROWSER);
   return NS_OK;
 }
 
-/* [infallible] */ NS_IMETHODIMP nsDocShell::GetIsTopLevelContentDocShell(
+/* [infallible] */
+NS_IMETHODIMP nsDocShell::GetIsTopLevelContentDocShell(
     bool* aIsTopLevelContentDocShell) {
   *aIsTopLevelContentDocShell = false;
 
   if (mItemType == typeContent) {
     nsCOMPtr<nsIDocShellTreeItem> root;
     GetSameTypeRootTreeItem(getter_AddRefs(root));
     *aIsTopLevelContentDocShell =
         root.get() == static_cast<nsIDocShellTreeItem*>(this);
--- a/docshell/base/nsPingListener.cpp
+++ b/docshell/base/nsPingListener.cpp
@@ -283,21 +283,20 @@ static void ForEachPing(nsIContent* aCon
     // Explicitly not allow loading data: URIs
     if (!net::SchemeIsData(uri)) {
       aCallback(aClosure, aContent, uri, ios);
     }
   }
 }
 
 // Spec: http://whatwg.org/specs/web-apps/current-work/#ping
-/*static*/ void nsPingListener::DispatchPings(nsIDocShell* aDocShell,
-                                              nsIContent* aContent,
-                                              nsIURI* aTarget,
-                                              nsIURI* aReferrer,
-                                              uint32_t aReferrerPolicy) {
+/*static*/
+void nsPingListener::DispatchPings(nsIDocShell* aDocShell, nsIContent* aContent,
+                                   nsIURI* aTarget, nsIURI* aReferrer,
+                                   uint32_t aReferrerPolicy) {
   SendPingInfo info;
 
   if (!PingsEnabled(&info.maxPings, &info.requireSameHost)) {
     return;
   }
   if (info.maxPings == 0) {
     return;
   }
--- a/dom/abort/AbortController.cpp
+++ b/dom/abort/AbortController.cpp
@@ -17,17 +17,18 @@ NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(Ab
 NS_IMPL_CYCLE_COLLECTING_ADDREF(AbortController)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(AbortController)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(AbortController)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
-/* static */ already_AddRefed<AbortController> AbortController::Constructor(
+/* static */
+already_AddRefed<AbortController> AbortController::Constructor(
     const GlobalObject& aGlobal, ErrorResult& aRv) {
   nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(aGlobal.GetAsSupports());
   if (!global) {
     aRv.Throw(NS_ERROR_FAILURE);
     return nullptr;
   }
 
   RefPtr<AbortController> abortController = new AbortController(global);
--- a/dom/animation/Animation.cpp
+++ b/dom/animation/Animation.cpp
@@ -72,17 +72,18 @@ class MOZ_RAII AutoMutationBatchForAnima
 };
 }  // namespace
 
 // ---------------------------------------------------------------------------
 //
 // Animation interface:
 //
 // ---------------------------------------------------------------------------
-/* static */ already_AddRefed<Animation> Animation::Constructor(
+/* static */
+already_AddRefed<Animation> Animation::Constructor(
     const GlobalObject& aGlobal, AnimationEffect* aEffect,
     const Optional<AnimationTimeline*>& aTimeline, ErrorResult& aRv) {
   nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(aGlobal.GetAsSupports());
   RefPtr<Animation> animation = new Animation(global);
 
   AnimationTimeline* timeline;
   if (aTimeline.WasPassed()) {
     timeline = aTimeline.Value();
--- a/dom/animation/AnimationUtils.cpp
+++ b/dom/animation/AnimationUtils.cpp
@@ -16,66 +16,70 @@
 #include "nsGlobalWindow.h"
 #include "nsString.h"
 #include "xpcpublic.h"  // For xpc::NativeGlobal
 
 using namespace mozilla::dom;
 
 namespace mozilla {
 
-/* static */ void AnimationUtils::LogAsyncAnimationFailure(
-    nsCString& aMessage, const nsIContent* aContent) {
+/* static */
+void AnimationUtils::LogAsyncAnimationFailure(nsCString& aMessage,
+                                              const nsIContent* aContent) {
   if (aContent) {
     aMessage.AppendLiteral(" [");
     aMessage.Append(nsAtomCString(aContent->NodeInfo()->NameAtom()));
 
     nsAtom* id = aContent->GetID();
     if (id) {
       aMessage.AppendLiteral(" with id '");
       aMessage.Append(nsAtomCString(aContent->GetID()));
       aMessage.Append('\'');
     }
     aMessage.Append(']');
   }
   aMessage.Append('\n');
   printf_stderr("%s", aMessage.get());
 }
 
-/* static */ Document* AnimationUtils::GetCurrentRealmDocument(JSContext* aCx) {
+/* static */
+Document* AnimationUtils::GetCurrentRealmDocument(JSContext* aCx) {
   nsGlobalWindowInner* win = xpc::CurrentWindowOrNull(aCx);
   if (!win) {
     return nullptr;
   }
   return win->GetDoc();
 }
 
-/* static */ Document* AnimationUtils::GetDocumentFromGlobal(
-    JSObject* aGlobalObject) {
+/* static */
+Document* AnimationUtils::GetDocumentFromGlobal(JSObject* aGlobalObject) {
   nsGlobalWindowInner* win = xpc::WindowOrNull(aGlobalObject);
   if (!win) {
     return nullptr;
   }
   return win->GetDoc();
 }
 
-/* static */ bool AnimationUtils::IsOffscreenThrottlingEnabled() {
+/* static */
+bool AnimationUtils::IsOffscreenThrottlingEnabled() {
   static bool sOffscreenThrottlingEnabled;
   static bool sPrefCached = false;
 
   if (!sPrefCached) {
     sPrefCached = true;
     Preferences::AddBoolVarCache(&sOffscreenThrottlingEnabled,
                                  "dom.animations.offscreen-throttling");
   }
 
   return sOffscreenThrottlingEnabled;
 }
 
-/* static */ bool AnimationUtils::EffectSetContainsAnimatedScale(
-    EffectSet& aEffects, const nsIFrame* aFrame) {
+/* static */
+bool AnimationUtils::EffectSetContainsAnimatedScale(EffectSet& aEffects,
+                                                    const nsIFrame* aFrame) {
   for (const dom::KeyframeEffect* effect : aEffects) {
     if (effect->ContainsAnimatedScale(aFrame)) {
       return true;
     }
   }
 
   return false;
 }
--- a/dom/animation/CSSPseudoElement.cpp
+++ b/dom/animation/CSSPseudoElement.cpp
@@ -64,19 +64,19 @@ already_AddRefed<Animation> CSSPseudoEle
     JSContext* aContext, JS::Handle<JSObject*> aKeyframes,
     const UnrestrictedDoubleOrKeyframeAnimationOptions& aOptions,
     ErrorResult& aError) {
   Nullable<ElementOrCSSPseudoElement> target;
   target.SetValue().SetAsCSSPseudoElement() = this;
   return Element::Animate(target, aContext, aKeyframes, aOptions, aError);
 }
 
-/* static */ already_AddRefed<CSSPseudoElement>
-CSSPseudoElement::GetCSSPseudoElement(dom::Element* aElement,
-                                      PseudoStyleType aType) {
+/* static */
+already_AddRefed<CSSPseudoElement> CSSPseudoElement::GetCSSPseudoElement(
+    dom::Element* aElement, PseudoStyleType aType) {
   if (!aElement) {
     return nullptr;
   }
 
   nsAtom* propName = CSSPseudoElement::GetCSSPseudoElementPropertyAtom(aType);
   RefPtr<CSSPseudoElement> pseudo =
       static_cast<CSSPseudoElement*>(aElement->GetProperty(propName));
   if (pseudo) {
@@ -91,17 +91,18 @@ CSSPseudoElement::GetCSSPseudoElement(do
   nsresult rv = aElement->SetProperty(propName, pseudo, nullptr, true);
   if (NS_FAILED(rv)) {
     NS_WARNING("SetProperty failed");
     return nullptr;
   }
   return pseudo.forget();
 }
 
-/* static */ nsAtom* CSSPseudoElement::GetCSSPseudoElementPropertyAtom(
+/* static */
+nsAtom* CSSPseudoElement::GetCSSPseudoElementPropertyAtom(
     PseudoStyleType aType) {
   switch (aType) {
     case PseudoStyleType::before:
       return nsGkAtoms::cssPseudoElementBeforeProperty;
 
     case PseudoStyleType::after:
       return nsGkAtoms::cssPseudoElementAfterProperty;
 
--- a/dom/animation/ComputedTimingFunction.cpp
+++ b/dom/animation/ComputedTimingFunction.cpp
@@ -188,17 +188,18 @@ void ComputedTimingFunction::AppendToStr
           static_cast<StyleTimingKeyword>(mType));
       break;
     default:
       MOZ_ASSERT_UNREACHABLE("Unsupported timing type");
   }
   Servo_SerializeEasing(&timing, &aResult);
 }
 
-/* static */ int32_t ComputedTimingFunction::Compare(
+/* static */
+int32_t ComputedTimingFunction::Compare(
     const Maybe<ComputedTimingFunction>& aLhs,
     const Maybe<ComputedTimingFunction>& aRhs) {
   // We can't use |operator<| for const Maybe<>& here because
   // 'ease' is prior to 'linear' which is represented by Nothing().
   // So we have to convert Nothing() as 'linear' and check it first.
   Type lhsType = aLhs.isNothing() ? Type::Linear : aLhs->GetType();
   Type rhsType = aRhs.isNothing() ? Type::Linear : aRhs->GetType();
 
--- a/dom/animation/DocumentTimeline.cpp
+++ b/dom/animation/DocumentTimeline.cpp
@@ -42,17 +42,18 @@ NS_INTERFACE_MAP_END_INHERITING(Animatio
 NS_IMPL_ADDREF_INHERITED(DocumentTimeline, AnimationTimeline)
 NS_IMPL_RELEASE_INHERITED(DocumentTimeline, AnimationTimeline)
 
 JSObject* DocumentTimeline::WrapObject(JSContext* aCx,
                                        JS::Handle<JSObject*> aGivenProto) {
   return DocumentTimeline_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-/* static */ already_AddRefed<DocumentTimeline> DocumentTimeline::Constructor(
+/* static */
+already_AddRefed<DocumentTimeline> DocumentTimeline::Constructor(
     const GlobalObject& aGlobal, const DocumentTimelineOptions& aOptions,
     ErrorResult& aRv) {
   Document* doc = AnimationUtils::GetCurrentRealmDocument(aGlobal.Context());
   if (!doc) {
     aRv.Throw(NS_ERROR_FAILURE);
     return nullptr;
   }
   TimeDuration originTime =
--- a/dom/animation/EffectCompositor.cpp
+++ b/dom/animation/EffectCompositor.cpp
@@ -57,17 +57,18 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(
                                cb.Flags());
     }
   }
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
 NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(EffectCompositor, AddRef)
 NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(EffectCompositor, Release)
 
-/* static */ bool EffectCompositor::AllowCompositorAnimationsOnFrame(
+/* static */
+bool EffectCompositor::AllowCompositorAnimationsOnFrame(
     const nsIFrame* aFrame,
     AnimationPerformanceWarning::Type& aWarning /* out */) {
   if (aFrame->RefusedAsyncAnimation()) {
     return false;
   }
 
   if (!nsLayoutUtils::AreAsyncAnimationsEnabled()) {
     if (nsLayoutUtils::IsAnimationLoggingEnabled()) {
@@ -441,18 +442,19 @@ bool EffectCompositor::HasPendingStyleUp
     if (elementSet.Count()) {
       return true;
     }
   }
 
   return false;
 }
 
-/* static */ bool EffectCompositor::HasAnimationsForCompositor(
-    const nsIFrame* aFrame, nsCSSPropertyID aProperty) {
+/* static */
+bool EffectCompositor::HasAnimationsForCompositor(const nsIFrame* aFrame,
+                                                  nsCSSPropertyID aProperty) {
   return FindAnimationsForCompositor(aFrame, aProperty, nullptr);
 }
 
 /* static */ nsTArray<RefPtr<dom::Animation>>
 EffectCompositor::GetAnimationsForCompositor(const nsIFrame* aFrame,
                                              nsCSSPropertyID aProperty) {
   nsTArray<RefPtr<dom::Animation>> result;
 
@@ -461,41 +463,44 @@ EffectCompositor::GetAnimationsForCompos
 #endif
       FindAnimationsForCompositor(aFrame, aProperty, &result);
   MOZ_ASSERT(!foundSome || !result.IsEmpty(),
              "If return value is true, matches array should be non-empty");
 
   return result;
 }
 
-/* static */ void EffectCompositor::ClearIsRunningOnCompositor(
-    const nsIFrame* aFrame, nsCSSPropertyID aProperty) {
+/* static */
+void EffectCompositor::ClearIsRunningOnCompositor(const nsIFrame* aFrame,
+                                                  nsCSSPropertyID aProperty) {
   EffectSet* effects = EffectSet::GetEffectSet(aFrame);
   if (!effects) {
     return;
   }
 
   for (KeyframeEffect* effect : *effects) {
     effect->SetIsRunningOnCompositor(aProperty, false);
   }
 }
 
-/* static */ void EffectCompositor::MaybeUpdateCascadeResults(
-    Element* aElement, PseudoStyleType aPseudoType) {
+/* static */
+void EffectCompositor::MaybeUpdateCascadeResults(Element* aElement,
+                                                 PseudoStyleType aPseudoType) {
   EffectSet* effects = EffectSet::GetEffectSet(aElement, aPseudoType);
   if (!effects || !effects->CascadeNeedsUpdate()) {
     return;
   }
 
   UpdateCascadeResults(*effects, aElement, aPseudoType);
 
   MOZ_ASSERT(!effects->CascadeNeedsUpdate(), "Failed to update cascade state");
 }
 
-/* static */ Maybe<NonOwningAnimationTarget>
+/* static */
+Maybe<NonOwningAnimationTarget>
 EffectCompositor::GetAnimationElementAndPseudoForFrame(const nsIFrame* aFrame) {
   // Always return the same object to benefit from return-value optimization.
   Maybe<NonOwningAnimationTarget> result;
 
   PseudoStyleType pseudoType = aFrame->Style()->GetPseudoType();
 
   if (pseudoType != PseudoStyleType::NotPseudo &&
       pseudoType != PseudoStyleType::before &&
@@ -520,17 +525,18 @@ EffectCompositor::GetAnimationElementAnd
     return result;
   }
 
   result.emplace(content->AsElement(), pseudoType);
 
   return result;
 }
 
-/* static */ nsCSSPropertyIDSet EffectCompositor::GetOverriddenProperties(
+/* static */
+nsCSSPropertyIDSet EffectCompositor::GetOverriddenProperties(
     EffectSet& aEffectSet, Element* aElement, PseudoStyleType aPseudoType) {
   MOZ_ASSERT(aElement, "Should have an element to get style data from");
 
   nsCSSPropertyIDSet result;
 
   Element* elementToRestyle = GetElementToRestyle(aElement, aPseudoType);
   if (!elementToRestyle) {
     return result;
@@ -562,18 +568,20 @@ EffectCompositor::GetAnimationElementAnd
     return result;
   }
 
   Servo_GetProperties_Overriding_Animation(elementToRestyle, &propertiesToTrack,
                                            &result);
   return result;
 }
 
-/* static */ void EffectCompositor::UpdateCascadeResults(
-    EffectSet& aEffectSet, Element* aElement, PseudoStyleType aPseudoType) {
+/* static */
+void EffectCompositor::UpdateCascadeResults(EffectSet& aEffectSet,
+                                            Element* aElement,
+                                            PseudoStyleType aPseudoType) {
   MOZ_ASSERT(EffectSet::GetEffectSet(aElement, aPseudoType) == &aEffectSet,
              "Effect set should correspond to the specified (pseudo-)element");
   if (aEffectSet.IsEmpty()) {
     aEffectSet.MarkCascadeUpdated();
     return;
   }
 
   // Get a list of effects sorted by composite order.
@@ -663,17 +671,18 @@ EffectCompositor::GetAnimationElementAnd
             ? EffectCompositor::RestyleType::Standard
             : EffectCompositor::RestyleType::Layer;
     presContext->EffectCompositor()->RequestRestyle(
         aElement, aPseudoType, restyleType,
         EffectCompositor::CascadeLevel::Transitions);
   }
 }
 
-/* static */ void EffectCompositor::SetPerformanceWarning(
+/* static */
+void EffectCompositor::SetPerformanceWarning(
     const nsIFrame* aFrame, nsCSSPropertyID aProperty,
     const AnimationPerformanceWarning& aWarning) {
   EffectSet* effects = EffectSet::GetEffectSet(aFrame);
   if (!effects) {
     return;
   }
 
   for (KeyframeEffect* effect : *effects) {
--- a/dom/animation/EffectSet.cpp
+++ b/dom/animation/EffectSet.cpp
@@ -9,18 +9,19 @@
 #include "mozilla/RestyleManager.h"
 #include "nsCSSPseudoElements.h"         // For PseudoStyleType
 #include "nsCycleCollectionNoteChild.h"  // For CycleCollectionNoteChild
 #include "nsPresContext.h"
 #include "nsLayoutUtils.h"
 
 namespace mozilla {
 
-/* static */ void EffectSet::PropertyDtor(void* aObject, nsAtom* aPropertyName,
-                                          void* aPropertyValue, void* aData) {
+/* static */
+void EffectSet::PropertyDtor(void* aObject, nsAtom* aPropertyName,
+                             void* aPropertyValue, void* aData) {
   EffectSet* effectSet = static_cast<EffectSet*>(aPropertyValue);
 
 #ifdef DEBUG
   MOZ_ASSERT(!effectSet->mCalledPropertyDtor, "Should not call dtor twice");
   effectSet->mCalledPropertyDtor = true;
 #endif
 
   delete effectSet;
@@ -28,39 +29,42 @@ namespace mozilla {
 
 void EffectSet::Traverse(nsCycleCollectionTraversalCallback& aCallback) {
   for (auto iter = mEffects.Iter(); !iter.Done(); iter.Next()) {
     CycleCollectionNoteChild(aCallback, iter.Get()->GetKey(),
                              "EffectSet::mEffects[]", aCallback.Flags());
   }
 }
 
-/* static */ EffectSet* EffectSet::GetEffectSet(const dom::Element* aElement,
-                                                PseudoStyleType aPseudoType) {
+/* static */
+EffectSet* EffectSet::GetEffectSet(const dom::Element* aElement,
+                                   PseudoStyleType aPseudoType) {
   if (!aElement->MayHaveAnimations()) {
     return nullptr;
   }
 
   nsAtom* propName = GetEffectSetPropertyAtom(aPseudoType);
   return static_cast<EffectSet*>(aElement->GetProperty(propName));
 }
 
-/* static */ EffectSet* EffectSet::GetEffectSet(const nsIFrame* aFrame) {
+/* static */
+EffectSet* EffectSet::GetEffectSet(const nsIFrame* aFrame) {
   Maybe<NonOwningAnimationTarget> target =
       EffectCompositor::GetAnimationElementAndPseudoForFrame(aFrame);
 
   if (!target) {
     return nullptr;
   }
 
   return GetEffectSet(target->mElement, target->mPseudoType);
 }
 
-/* static */ EffectSet* EffectSet::GetOrCreateEffectSet(
-    dom::Element* aElement, PseudoStyleType aPseudoType) {
+/* static */
+EffectSet* EffectSet::GetOrCreateEffectSet(dom::Element* aElement,
+                                           PseudoStyleType aPseudoType) {
   EffectSet* effectSet = GetEffectSet(aElement, aPseudoType);
   if (effectSet) {
     return effectSet;
   }
 
   nsAtom* propName = GetEffectSetPropertyAtom(aPseudoType);
   effectSet = new EffectSet();
 
@@ -74,18 +78,19 @@ void EffectSet::Traverse(nsCycleCollecti
     return nullptr;
   }
 
   aElement->SetMayHaveAnimations();
 
   return effectSet;
 }
 
-/* static */ void EffectSet::DestroyEffectSet(dom::Element* aElement,
-                                              PseudoStyleType aPseudoType) {
+/* static */
+void EffectSet::DestroyEffectSet(dom::Element* aElement,
+                                 PseudoStyleType aPseudoType) {
   nsAtom* propName = GetEffectSetPropertyAtom(aPseudoType);
   EffectSet* effectSet =
       static_cast<EffectSet*>(aElement->GetProperty(propName));
   if (!effectSet) {
     return;
   }
 
   MOZ_ASSERT(!effectSet->IsBeingEnumerated(),
@@ -95,27 +100,28 @@ void EffectSet::Traverse(nsCycleCollecti
   aElement->DeleteProperty(propName);
 }
 
 void EffectSet::UpdateAnimationGeneration(nsPresContext* aPresContext) {
   mAnimationGeneration =
       aPresContext->RestyleManager()->GetAnimationGeneration();
 }
 
-/* static */ nsAtom** EffectSet::GetEffectSetPropertyAtoms() {
+/* static */
+nsAtom** EffectSet::GetEffectSetPropertyAtoms() {
   static nsAtom* effectSetPropertyAtoms[] = {
       nsGkAtoms::animationEffectsProperty,
       nsGkAtoms::animationEffectsForBeforeProperty,
       nsGkAtoms::animationEffectsForAfterProperty, nullptr};
 
   return effectSetPropertyAtoms;
 }
 
-/* static */ nsAtom* EffectSet::GetEffectSetPropertyAtom(
-    PseudoStyleType aPseudoType) {
+/* static */
+nsAtom* EffectSet::GetEffectSetPropertyAtom(PseudoStyleType aPseudoType) {
   switch (aPseudoType) {
     case PseudoStyleType::NotPseudo:
       return nsGkAtoms::animationEffectsProperty;
 
     case PseudoStyleType::before:
       return nsGkAtoms::animationEffectsForBeforeProperty;
 
     case PseudoStyleType::after:
--- a/dom/animation/KeyframeEffect.cpp
+++ b/dom/animation/KeyframeEffect.cpp
@@ -617,17 +617,18 @@ static KeyframeEffectParams KeyframeEffe
 
   const KeyframeEffectOptions& options =
       KeyframeEffectOptionsFromUnion(aOptions);
   result.mIterationComposite = options.mIterationComposite;
   result.mComposite = options.mComposite;
   return result;
 }
 
-/* static */ Maybe<OwningAnimationTarget> KeyframeEffect::ConvertTarget(
+/* static */
+Maybe<OwningAnimationTarget> KeyframeEffect::ConvertTarget(
     const Nullable<ElementOrCSSPseudoElement>& aTarget) {
   // Return value optimization.
   Maybe<OwningAnimationTarget> result;
 
   if (aTarget.IsNull()) {
     return result;
   }
 
@@ -640,18 +641,18 @@ static KeyframeEffectParams KeyframeEffe
   } else {
     RefPtr<Element> elem = target.GetAsCSSPseudoElement().Element();
     result.emplace(elem, target.GetAsCSSPseudoElement().GetType());
   }
   return result;
 }
 
 template <class OptionsType>
-/* static */ already_AddRefed<KeyframeEffect>
-KeyframeEffect::ConstructKeyframeEffect(
+/* static */
+already_AddRefed<KeyframeEffect> KeyframeEffect::ConstructKeyframeEffect(
     const GlobalObject& aGlobal,
     const Nullable<ElementOrCSSPseudoElement>& aTarget,
     JS::Handle<JSObject*> aKeyframes, const OptionsType& aOptions,
     ErrorResult& aRv) {
   // We should get the document from `aGlobal` instead of the current Realm
   // to make this works in Xray case.
   //
   // In all non-Xray cases, `aGlobal` matches the current Realm, so this
@@ -827,35 +828,38 @@ void DumpAnimationProperties(
       printf("  %f..%f: %s..%s\n", s.mFromKey, s.mToKey,
              NS_ConvertUTF16toUTF8(fromValue).get(),
              NS_ConvertUTF16toUTF8(toValue).get());
     }
   }
 }
 #endif
 
-/* static */ already_AddRefed<KeyframeEffect> KeyframeEffect::Constructor(
+/* static */
+already_AddRefed<KeyframeEffect> KeyframeEffect::Constructor(
     const GlobalObject& aGlobal,
     const Nullable<ElementOrCSSPseudoElement>& aTarget,
     JS::Handle<JSObject*> aKeyframes,
     const UnrestrictedDoubleOrKeyframeEffectOptions& aOptions,
     ErrorResult& aRv) {
   return ConstructKeyframeEffect(aGlobal, aTarget, aKeyframes, aOptions, aRv);
 }
 
-/* static */ already_AddRefed<KeyframeEffect> KeyframeEffect::Constructor(
+/* static */
+already_AddRefed<KeyframeEffect> KeyframeEffect::Constructor(
     const GlobalObject& aGlobal,
     const Nullable<ElementOrCSSPseudoElement>& aTarget,
     JS::Handle<JSObject*> aKeyframes,
     const UnrestrictedDoubleOrKeyframeAnimationOptions& aOptions,
     ErrorResult& aRv) {
   return ConstructKeyframeEffect(aGlobal, aTarget, aKeyframes, aOptions, aRv);
 }
 
-/* static */ already_AddRefed<KeyframeEffect> KeyframeEffect::Constructor(
+/* static */
+already_AddRefed<KeyframeEffect> KeyframeEffect::Constructor(
     const GlobalObject& aGlobal, KeyframeEffect& aSource, ErrorResult& aRv) {
   Document* doc = AnimationUtils::GetCurrentRealmDocument(aGlobal.Context());
   if (!doc) {
     aRv.Throw(NS_ERROR_FAILURE);
     return nullptr;
   }
 
   // Create a new KeyframeEffect object with aSource's target,
@@ -1357,18 +1361,18 @@ Document* KeyframeEffect::GetRenderedDoc
 nsIPresShell* KeyframeEffect::GetPresShell() const {
   Document* doc = GetRenderedDocument();
   if (!doc) {
     return nullptr;
   }
   return doc->GetShell();
 }
 
-/* static */ bool KeyframeEffect::IsGeometricProperty(
-    const nsCSSPropertyID aProperty) {
+/* static */
+bool KeyframeEffect::IsGeometricProperty(const nsCSSPropertyID aProperty) {
   MOZ_ASSERT(!nsCSSProps::IsShorthand(aProperty),
              "Property should be a longhand property");
 
   switch (aProperty) {
     case eCSSProperty_bottom:
     case eCSSProperty_height:
     case eCSSProperty_left:
     case eCSSProperty_margin_bottom:
@@ -1383,17 +1387,18 @@ nsIPresShell* KeyframeEffect::GetPresShe
     case eCSSProperty_top:
     case eCSSProperty_width:
       return true;
     default:
       return false;
   }
 }
 
-/* static */ bool KeyframeEffect::CanAnimateTransformOnCompositor(
+/* static */
+bool KeyframeEffect::CanAnimateTransformOnCompositor(
     const nsIFrame* aFrame,
     AnimationPerformanceWarning::Type& aPerformanceWarning /* out */) {
   // Disallow OMTA for preserve-3d transform. Note that we check the style
   // property rather than Extend3DContext() since that can recurse back into
   // this function via HasOpacity(). See bug 779598.
   if (aFrame->Combines3DTransformWithAncestors() ||
       aFrame->StyleDisplay()->mTransformStyle ==
           NS_STYLE_TRANSFORM_STYLE_PRESERVE_3D) {
@@ -1647,17 +1652,18 @@ void KeyframeEffect::MarkCascadeNeedsUpd
   EffectSet* effectSet =
       EffectSet::GetEffectSet(mTarget->mElement, mTarget->mPseudoType);
   if (!effectSet) {
     return;
   }
   effectSet->MarkCascadeNeedsUpdate();
 }
 
-/* static */ bool KeyframeEffect::HasComputedTimingChanged(
+/* static */
+bool KeyframeEffect::HasComputedTimingChanged(
     const ComputedTiming& aComputedTiming,
     IterationCompositeOperation aIterationComposite,
     const Nullable<double>& aProgressOnLastCompose,
     uint64_t aCurrentIterationOnLastCompose) {
   // Typically we don't need to request a restyle if the progress hasn't
   // changed since the last call to ComposeStyle. The one exception is if the
   // iteration composite mode is 'accumulate' and the current iteration has
   // changed, since that will often produce a different result.
--- a/dom/animation/KeyframeUtils.cpp
+++ b/dom/animation/KeyframeUtils.cpp
@@ -184,17 +184,18 @@ static bool HasImplicitKeyframeValues(co
 static void DistributeRange(const Range<Keyframe>& aRange);
 
 // ------------------------------------------------------------------
 //
 // Public API
 //
 // ------------------------------------------------------------------
 
-/* static */ nsTArray<Keyframe> KeyframeUtils::GetKeyframesFromObject(
+/* static */
+nsTArray<Keyframe> KeyframeUtils::GetKeyframesFromObject(
     JSContext* aCx, dom::Document* aDocument, JS::Handle<JSObject*> aFrames,
     ErrorResult& aRv) {
   MOZ_ASSERT(!aRv.Failed());
 
   nsTArray<Keyframe> keyframes;
 
   if (!aFrames) {
     // The argument was explicitly null meaning no keyframes.
@@ -228,18 +229,18 @@ static void DistributeRange(const Range<
       HasImplicitKeyframeValues(keyframes, aDocument)) {
     keyframes.Clear();
     aRv.Throw(NS_ERROR_DOM_ANIM_MISSING_PROPS_ERR);
   }
 
   return keyframes;
 }
 
-/* static */ void KeyframeUtils::DistributeKeyframes(
-    nsTArray<Keyframe>& aKeyframes) {
+/* static */
+void KeyframeUtils::DistributeKeyframes(nsTArray<Keyframe>& aKeyframes) {
   if (aKeyframes.IsEmpty()) {
     return;
   }
 
   // If the first keyframe has an unspecified offset, fill it in with 0%.
   // If there is only a single keyframe, then it gets 100%.
   if (aKeyframes.Length() > 1) {
     Keyframe& firstElement = aKeyframes[0];
@@ -263,18 +264,18 @@ static void DistributeRange(const Range<
     keyframeB->mComputedOffset = keyframeB->mOffset.valueOr(1.0);
 
     // Fill computed offsets in (keyframe A, keyframe B).
     DistributeRange(Range<Keyframe>(keyframeA, keyframeB + 1));
     keyframeA = keyframeB;
   }
 }
 
-/* static */ nsTArray<AnimationProperty>
-KeyframeUtils::GetAnimationPropertiesFromKeyframes(
+/* static */
+nsTArray<AnimationProperty> KeyframeUtils::GetAnimationPropertiesFromKeyframes(
     const nsTArray<Keyframe>& aKeyframes, dom::Element* aElement,
     const ComputedStyle* aStyle, dom::CompositeOperation aEffectComposite) {
   nsTArray<AnimationProperty> result;
 
   const nsTArray<ComputedKeyframeValues> computedValues =
       GetComputedKeyframeValues(aKeyframes, aElement, aStyle);
   if (computedValues.IsEmpty()) {
     // In rare cases GetComputedKeyframeValues might fail and return an empty
@@ -306,18 +307,18 @@ KeyframeUtils::GetAnimationPropertiesFro
               : static_cast<dom::CompositeOperation>(frame.mComposite);
     }
   }
 
   BuildSegmentsFromValueEntries(entries, result);
   return result;
 }
 
-/* static */ bool KeyframeUtils::IsAnimatableProperty(
-    nsCSSPropertyID aProperty) {
+/* static */
+bool KeyframeUtils::IsAnimatableProperty(nsCSSPropertyID aProperty) {
   // Regardless of the backend type, treat the 'display' property as not
   // animatable. (Servo will report it as being animatable, since it is
   // in fact animatable by SMIL.)
   if (aProperty == eCSSProperty_display) {
     return false;
   }
   return Servo_Property_IsAnimatable(aProperty);
 }
--- a/dom/animation/TimingParams.cpp
+++ b/dom/animation/TimingParams.cpp
@@ -15,32 +15,36 @@
 
 namespace mozilla {
 
 template <class OptionsType>
 static const dom::EffectTiming& GetTimingProperties(
     const OptionsType& aOptions);
 
 template <>
-/* static */ const dom::EffectTiming& GetTimingProperties(
+/* static */
+const dom::EffectTiming& GetTimingProperties(
     const dom::UnrestrictedDoubleOrKeyframeEffectOptions& aOptions) {
   MOZ_ASSERT(aOptions.IsKeyframeEffectOptions());
   return aOptions.GetAsKeyframeEffectOptions();
 }
 
 template <>
-/* static */ const dom::EffectTiming& GetTimingProperties(
+/* static */
+const dom::EffectTiming& GetTimingProperties(
     const dom::UnrestrictedDoubleOrKeyframeAnimationOptions& aOptions) {
   MOZ_ASSERT(aOptions.IsKeyframeAnimationOptions());
   return aOptions.GetAsKeyframeAnimationOptions();
 }
 
 template <class OptionsType>
-/* static */ TimingParams TimingParams::FromOptionsType(
-    const OptionsType& aOptions, dom::Document* aDocument, ErrorResult& aRv) {
+/* static */
+TimingParams TimingParams::FromOptionsType(const OptionsType& aOptions,
+                                           dom::Document* aDocument,
+                                           ErrorResult& aRv) {
   TimingParams result;
 
   if (aOptions.IsUnrestrictedDouble()) {
     double durationInMs = aOptions.GetAsUnrestrictedDouble();
     if (durationInMs >= 0) {
       result.mDuration.emplace(
           StickyTimeDuration::FromMilliseconds(durationInMs));
     } else {
@@ -51,29 +55,32 @@ template <class OptionsType>
   } else {
     const dom::EffectTiming& timing = GetTimingProperties(aOptions);
     result = FromEffectTiming(timing, aDocument, aRv);
   }
 
   return result;
 }
 
-/* static */ TimingParams TimingParams::FromOptionsUnion(
+/* static */
+TimingParams TimingParams::FromOptionsUnion(
     const dom::UnrestrictedDoubleOrKeyframeEffectOptions& aOptions,
     dom::Document* aDocument, ErrorResult& aRv) {
   return FromOptionsType(aOptions, aDocument, aRv);
 }
 
-/* static */ TimingParams TimingParams::FromOptionsUnion(
+/* static */
+TimingParams TimingParams::FromOptionsUnion(
     const dom::UnrestrictedDoubleOrKeyframeAnimationOptions& aOptions,
     dom::Document* aDocument, ErrorResult& aRv) {
   return FromOptionsType(aOptions, aDocument, aRv);
 }
 
-/* static */ TimingParams TimingParams::FromEffectTiming(
+/* static */
+TimingParams TimingParams::FromEffectTiming(
     const dom::EffectTiming& aEffectTiming, dom::Document* aDocument,
     ErrorResult& aRv) {
   TimingParams result;
 
   Maybe<StickyTimeDuration> duration =
       TimingParams::ParseDuration(aEffectTiming.mDuration, aRv);
   if (aRv.Failed()) {
     return result;
@@ -101,17 +108,18 @@ template <class OptionsType>
   result.mFill = aEffectTiming.mFill;
   result.mFunction = easing;
 
   result.Update();
 
   return result;
 }
 
-/* static */ TimingParams TimingParams::MergeOptionalEffectTiming(
+/* static */
+TimingParams TimingParams::MergeOptionalEffectTiming(
     const TimingParams& aSource, const dom::OptionalEffectTiming& aEffectTiming,
     dom::Document* aDocument, ErrorResult& aRv) {
   MOZ_ASSERT(!aRv.Failed(), "Initially return value should be ok");
 
   TimingParams result = aSource;
 
   // Check for errors first
 
@@ -177,17 +185,18 @@ template <class OptionsType>
     result.mFunction = easing;
   }
 
   result.Update();
 
   return result;
 }
 
-/* static */ Maybe<ComputedTimingFunction> TimingParams::ParseEasing(
+/* static */
+Maybe<ComputedTimingFunction> TimingParams::ParseEasing(
     const nsAString& aEasing, dom::Document* aDocument, ErrorResult& aRv) {
   MOZ_ASSERT(aDocument);
 
   nsTimingFunction timingFunction;
   RefPtr<URLExtraData> url = ServoCSSParser::GetURLExtraData(aDocument);
   if (!ServoCSSParser::ParseEasing(aEasing, url, timingFunction)) {
     aRv.ThrowTypeError<dom::MSG_INVALID_EASING_ERROR>(aEasing);
     return Nothing();
--- a/dom/audiochannel/AudioChannelService.cpp
+++ b/dom/audiochannel/AudioChannelService.cpp
@@ -198,63 +198,68 @@ const char* AudibleChangedReasonToStr(
       return "pause-state";
     default:
       return "unknown";
   }
 }
 
 StaticRefPtr<AudioChannelService> gAudioChannelService;
 
-/* static */ void AudioChannelService::CreateServiceIfNeeded() {
+/* static */
+void AudioChannelService::CreateServiceIfNeeded() {
   MOZ_ASSERT(NS_IsMainThread());
 
   if (!gAudioChannelService) {
     gAudioChannelService = new AudioChannelService();
   }
 }
 
-/* static */ already_AddRefed<AudioChannelService>
-AudioChannelService::GetOrCreate() {
+/* static */
+already_AddRefed<AudioChannelService> AudioChannelService::GetOrCreate() {
   if (sXPCOMShuttingDown) {
     return nullptr;
   }
 
   CreateServiceIfNeeded();
   RefPtr<AudioChannelService> service = gAudioChannelService.get();
   return service.forget();
 }
 
-/* static */ already_AddRefed<AudioChannelService> AudioChannelService::Get() {
+/* static */
+already_AddRefed<AudioChannelService> AudioChannelService::Get() {
   if (sXPCOMShuttingDown) {
     return nullptr;
   }
 
   RefPtr<AudioChannelService> service = gAudioChannelService.get();
   return service.forget();
 }
 
-/* static */ LogModule* AudioChannelService::GetAudioChannelLog() {
+/* static */
+LogModule* AudioChannelService::GetAudioChannelLog() {
   return gAudioChannelLog;
 }
 
-/* static */ void AudioChannelService::Shutdown() {
+/* static */
+void AudioChannelService::Shutdown() {
   if (gAudioChannelService) {
     nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
     if (obs) {
       obs->RemoveObserver(gAudioChannelService, "xpcom-shutdown");
       obs->RemoveObserver(gAudioChannelService, "outer-window-destroyed");
     }
 
     gAudioChannelService->mWindows.Clear();
 
     gAudioChannelService = nullptr;
   }
 }
 
-/* static */ bool AudioChannelService::IsEnableAudioCompeting() {
+/* static */
+bool AudioChannelService::IsEnableAudioCompeting() {
   CreateServiceIfNeeded();
   return sAudioChannelCompeting;
 }
 
 NS_INTERFACE_MAP_BEGIN(AudioChannelService)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIObserver)
   NS_INTERFACE_MAP_ENTRY(nsIObserver)
 NS_INTERFACE_MAP_END
--- a/dom/base/ChromeUtils.cpp
+++ b/dom/base/ChromeUtils.cpp
@@ -35,54 +35,57 @@
 #include "nsThreadUtils.h"
 #include "mozJSComponentLoader.h"
 #include "GeckoProfiler.h"
 #include "nsIException.h"
 
 namespace mozilla {
 namespace dom {
 
-/* static */ void ChromeUtils::NondeterministicGetWeakMapKeys(
+/* static */
+void ChromeUtils::NondeterministicGetWeakMapKeys(
     GlobalObject& aGlobal, JS::Handle<JS::Value> aMap,
     JS::MutableHandle<JS::Value> aRetval, ErrorResult& aRv) {
   if (!aMap.isObject()) {
     aRetval.setUndefined();
   } else {
     JSContext* cx = aGlobal.Context();
     JS::Rooted<JSObject*> objRet(cx);
     JS::Rooted<JSObject*> mapObj(cx, &aMap.toObject());
     if (!JS_NondeterministicGetWeakMapKeys(cx, mapObj, &objRet)) {
       aRv.Throw(NS_ERROR_OUT_OF_MEMORY);
     } else {
       aRetval.set(objRet ? JS::ObjectValue(*objRet) : JS::UndefinedValue());
     }
   }
 }
 
-/* static */ void ChromeUtils::NondeterministicGetWeakSetKeys(
+/* static */
+void ChromeUtils::NondeterministicGetWeakSetKeys(
     GlobalObject& aGlobal, JS::Handle<JS::Value> aSet,
     JS::MutableHandle<JS::Value> aRetval, ErrorResult& aRv) {
   if (!aSet.isObject()) {
     aRetval.setUndefined();
   } else {
     JSContext* cx = aGlobal.Context();
     JS::Rooted<JSObject*> objRet(cx);
     JS::Rooted<JSObject*> setObj(cx, &aSet.toObject());
     if (!JS_NondeterministicGetWeakSetKeys(cx, setObj, &objRet)) {
       aRv.Throw(NS_ERROR_OUT_OF_MEMORY);
     } else {
       aRetval.set(objRet ? JS::ObjectValue(*objRet) : JS::UndefinedValue());
     }
   }
 }
 
-/* static */ void ChromeUtils::Base64URLEncode(
-    GlobalObject& aGlobal, const ArrayBufferViewOrArrayBuffer& aSource,
-    const Base64URLEncodeOptions& aOptions, nsACString& aResult,
-    ErrorResult& aRv) {
+/* static */
+void ChromeUtils::Base64URLEncode(GlobalObject& aGlobal,
+                                  const ArrayBufferViewOrArrayBuffer& aSource,
+                                  const Base64URLEncodeOptions& aOptions,
+                                  nsACString& aResult, ErrorResult& aRv) {
   size_t length = 0;
   uint8_t* data = nullptr;
   if (aSource.IsArrayBuffer()) {
     const ArrayBuffer& buffer = aSource.GetAsArrayBuffer();
     buffer.ComputeLengthAndData();
     length = buffer.Length();
     data = buffer.Data();
   } else if (aSource.IsArrayBufferView()) {
@@ -98,20 +101,22 @@ namespace dom {
                                      : Base64URLEncodePaddingPolicy::Omit;
   nsresult rv = mozilla::Base64URLEncode(length, data, paddingPolicy, aResult);
   if (NS_WARN_IF(NS_FAILED(rv))) {
     aResult.Truncate();
     aRv.Throw(rv);
   }
 }
 
-/* static */ void ChromeUtils::Base64URLDecode(
-    GlobalObject& aGlobal, const nsACString& aString,
-    const Base64URLDecodeOptions& aOptions,
-    JS::MutableHandle<JSObject*> aRetval, ErrorResult& aRv) {
+/* static */
+void ChromeUtils::Base64URLDecode(GlobalObject& aGlobal,
+                                  const nsACString& aString,
+                                  const Base64URLDecodeOptions& aOptions,
+                                  JS::MutableHandle<JSObject*> aRetval,
+                                  ErrorResult& aRv) {
   Base64URLDecodePaddingPolicy paddingPolicy;
   switch (aOptions.mPadding) {
     case Base64URLDecodePadding::Require:
       paddingPolicy = Base64URLDecodePaddingPolicy::Require;
       break;
 
     case Base64URLDecodePadding::Ignore:
       paddingPolicy = Base64URLDecodePaddingPolicy::Ignore;
@@ -137,19 +142,19 @@ namespace dom {
       ArrayBuffer::Create(aGlobal.Context(), data.Length(), data.Elements()));
   if (NS_WARN_IF(!buffer)) {
     aRv.Throw(NS_ERROR_OUT_OF_MEMORY);
     return;
   }
   aRetval.set(buffer);
 }
 
-/* static */ void ChromeUtils::ReleaseAssert(GlobalObject& aGlobal,
-                                             bool aCondition,
-                                             const nsAString& aMessage) {
+/* static */
+void ChromeUtils::ReleaseAssert(GlobalObject& aGlobal, bool aCondition,
+                                const nsAString& aMessage) {
   // If the condition didn't fail, which is the likely case, immediately return.
   if (MOZ_LIKELY(aCondition)) {
     return;
   }
 
   // Extract the current stack from the JS runtime to embed in the crash reason.
   nsAutoString filename;
   uint32_t lineNo = 0;
@@ -165,63 +170,62 @@ namespace dom {
   NS_ConvertUTF16toUTF8 filenameUtf8(filename);
   NS_ConvertUTF16toUTF8 messageUtf8(aMessage);
 
   // Actually crash.
   MOZ_CRASH_UNSAFE_PRINTF("Failed ChromeUtils.releaseAssert(\"%s\") @ %s:%u",
                           messageUtf8.get(), filenameUtf8.get(), lineNo);
 }
 
-/* static */ void ChromeUtils::WaiveXrays(GlobalObject& aGlobal,
-                                          JS::HandleValue aVal,
-                                          JS::MutableHandleValue aRetval,
-                                          ErrorResult& aRv) {
+/* static */
+void ChromeUtils::WaiveXrays(GlobalObject& aGlobal, JS::HandleValue aVal,
+                             JS::MutableHandleValue aRetval, ErrorResult& aRv) {
   JS::RootedValue value(aGlobal.Context(), aVal);
   if (!xpc::WrapperFactory::WaiveXrayAndWrap(aGlobal.Context(), &value)) {
     aRv.NoteJSContextException(aGlobal.Context());
   } else {
     aRetval.set(value);
   }
 }
 
-/* static */ void ChromeUtils::UnwaiveXrays(GlobalObject& aGlobal,
-                                            JS::HandleValue aVal,
-                                            JS::MutableHandleValue aRetval,
-                                            ErrorResult& aRv) {
+/* static */
+void ChromeUtils::UnwaiveXrays(GlobalObject& aGlobal, JS::HandleValue aVal,
+                               JS::MutableHandleValue aRetval,
+                               ErrorResult& aRv) {
   if (!aVal.isObject()) {
     aRetval.set(aVal);
     return;
   }
 
   JS::RootedObject obj(aGlobal.Context(),
                        js::UncheckedUnwrap(&aVal.toObject()));
   if (!JS_WrapObject(aGlobal.Context(), &obj)) {
     aRv.NoteJSContextException(aGlobal.Context());
   } else {
     aRetval.setObject(*obj);
   }
 }
 
-/* static */ void ChromeUtils::GetClassName(GlobalObject& aGlobal,
-                                            JS::HandleObject aObj, bool aUnwrap,
-                                            nsAString& aRetval) {
+/* static */
+void ChromeUtils::GetClassName(GlobalObject& aGlobal, JS::HandleObject aObj,
+                               bool aUnwrap, nsAString& aRetval) {
   JS::RootedObject obj(aGlobal.Context(), aObj);
   if (aUnwrap) {
     obj = js::UncheckedUnwrap(obj, /* stopAtWindowProxy = */ false);
   }
 
   aRetval =
       NS_ConvertUTF8toUTF16(nsDependentCString(js::GetObjectClass(obj)->name));
 }
 
-/* static */ void ChromeUtils::ShallowClone(GlobalObject& aGlobal,
-                                            JS::HandleObject aObj,
-                                            JS::HandleObject aTarget,
-                                            JS::MutableHandleObject aRetval,
-                                            ErrorResult& aRv) {
+/* static */
+void ChromeUtils::ShallowClone(GlobalObject& aGlobal, JS::HandleObject aObj,
+                               JS::HandleObject aTarget,
+                               JS::MutableHandleObject aRetval,
+                               ErrorResult& aRv) {
   JSContext* cx = aGlobal.Context();
 
   auto cleanup = MakeScopeExit([&]() { aRv.NoteJSContextException(cx); });
 
   JS::Rooted<JS::IdVector> ids(cx, JS::IdVector(cx));
   JS::AutoValueVector values(cx);
   JS::AutoIdVector valuesIds(cx);
 
@@ -369,38 +373,41 @@ class IdleDispatchRunnable final : publi
   TimeStamp mDeadline{};
   bool mTimedOut = false;
 };
 
 NS_IMPL_ISUPPORTS_INHERITED(IdleDispatchRunnable, IdleRunnable,
                             nsITimerCallback)
 }  // anonymous namespace
 
-/* static */ void ChromeUtils::IdleDispatch(const GlobalObject& aGlobal,
-                                            IdleRequestCallback& aCallback,
-                                            const IdleRequestOptions& aOptions,
-                                            ErrorResult& aRv) {
+/* static */
+void ChromeUtils::IdleDispatch(const GlobalObject& aGlobal,
+                               IdleRequestCallback& aCallback,
+                               const IdleRequestOptions& aOptions,
+                               ErrorResult& aRv) {
   nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(aGlobal.GetAsSupports());
   MOZ_ASSERT(global);
 
   auto runnable = MakeRefPtr<IdleDispatchRunnable>(global, aCallback);
 
   if (aOptions.mTimeout.WasPassed()) {
     aRv = NS_DispatchToCurrentThreadQueue(
         runnable.forget(), aOptions.mTimeout.Value(), EventQueuePriority::Idle);
   } else {
     aRv = NS_DispatchToCurrentThreadQueue(runnable.forget(),
                                           EventQueuePriority::Idle);
   }
 }
 
-/* static */ void ChromeUtils::Import(
-    const GlobalObject& aGlobal, const nsAString& aResourceURI,
-    const Optional<JS::Handle<JSObject*>>& aTargetObj,
-    JS::MutableHandle<JSObject*> aRetval, ErrorResult& aRv) {
+/* static */
+void ChromeUtils::Import(const GlobalObject& aGlobal,
+                         const nsAString& aResourceURI,
+                         const Optional<JS::Handle<JSObject*>>& aTargetObj,
+                         JS::MutableHandle<JSObject*> aRetval,
+                         ErrorResult& aRv) {
   RefPtr<mozJSComponentLoader> moduleloader = mozJSComponentLoader::Get();
   MOZ_ASSERT(moduleloader);
 
   NS_ConvertUTF16toUTF8 registryLocation(aResourceURI);
 
   AUTO_PROFILER_LABEL_DYNAMIC_NSCSTRING("ChromeUtils::Import", OTHER,
                                         registryLocation);
 
@@ -562,88 +569,98 @@ static bool DefineGetter(JSContext* aCx,
   js::SetFunctionNativeReserved(getter, SLOT_URI, uri);
 
   return JS_DefinePropertyById(
       aCx, aTarget, id, getter, setter,
       JSPROP_GETTER | JSPROP_SETTER | JSPROP_ENUMERATE);
 }
 }  // namespace module_getter
 
-/* static */ void ChromeUtils::DefineModuleGetter(const GlobalObject& global,
-                                                  JS::Handle<JSObject*> target,
-                                                  const nsAString& id,
-                                                  const nsAString& resourceURI,
-                                                  ErrorResult& aRv) {
+/* static */
+void ChromeUtils::DefineModuleGetter(const GlobalObject& global,
+                                     JS::Handle<JSObject*> target,
+                                     const nsAString& id,
+                                     const nsAString& resourceURI,
+                                     ErrorResult& aRv) {
   if (!module_getter::DefineGetter(global.Context(), target, id, resourceURI)) {
     aRv.NoteJSContextException(global.Context());
   }
 }
 
-/* static */ void ChromeUtils::OriginAttributesToSuffix(
+/* static */
+void ChromeUtils::OriginAttributesToSuffix(
     dom::GlobalObject& aGlobal, const dom::OriginAttributesDictionary& aAttrs,
     nsCString& aSuffix)
 
 {
   OriginAttributes attrs(aAttrs);
   attrs.CreateSuffix(aSuffix);
 }
 
-/* static */ bool ChromeUtils::OriginAttributesMatchPattern(
+/* static */
+bool ChromeUtils::OriginAttributesMatchPattern(
     dom::GlobalObject& aGlobal, const dom::OriginAttributesDictionary& aAttrs,
     const dom::OriginAttributesPatternDictionary& aPattern) {
   OriginAttributes attrs(aAttrs);
   OriginAttributesPattern pattern(aPattern);
   return pattern.Matches(attrs);
 }
 
-/* static */ void ChromeUtils::CreateOriginAttributesFromOrigin(
+/* static */
+void ChromeUtils::CreateOriginAttributesFromOrigin(
     dom::GlobalObject& aGlobal, const nsAString& aOrigin,
     dom::OriginAttributesDictionary& aAttrs, ErrorResult& aRv) {
   OriginAttributes attrs;
   nsAutoCString suffix;
   if (!attrs.PopulateFromOrigin(NS_ConvertUTF16toUTF8(aOrigin), suffix)) {
     aRv.Throw(NS_ERROR_FAILURE);
     return;
   }
   aAttrs = attrs;
 }
 
-/* static */ void ChromeUtils::FillNonDefaultOriginAttributes(
+/* static */
+void ChromeUtils::FillNonDefaultOriginAttributes(
     dom::GlobalObject& aGlobal, const dom::OriginAttributesDictionary& aAttrs,
     dom::OriginAttributesDictionary& aNewAttrs) {
   aNewAttrs = aAttrs;
 }
 
-/* static */ bool ChromeUtils::IsOriginAttributesEqual(
+/* static */
+bool ChromeUtils::IsOriginAttributesEqual(
     dom::GlobalObject& aGlobal, const dom::OriginAttributesDictionary& aA,
     const dom::OriginAttributesDictionary& aB) {
   return IsOriginAttributesEqual(aA, aB);
 }
 
-/* static */ bool ChromeUtils::IsOriginAttributesEqual(
+/* static */
+bool ChromeUtils::IsOriginAttributesEqual(
     const dom::OriginAttributesDictionary& aA,
     const dom::OriginAttributesDictionary& aB) {
   return aA == aB;
 }
 
 #ifdef NIGHTLY_BUILD
-/* static */ void ChromeUtils::GetRecentJSDevError(
-    GlobalObject& aGlobal, JS::MutableHandleValue aRetval, ErrorResult& aRv) {
+/* static */
+void ChromeUtils::GetRecentJSDevError(GlobalObject& aGlobal,
+                                      JS::MutableHandleValue aRetval,
+                                      ErrorResult& aRv) {
   aRetval.setUndefined();
   auto runtime = CycleCollectedJSRuntime::Get();
   MOZ_ASSERT(runtime);
 
   auto cx = aGlobal.Context();
   if (!runtime->GetRecentDevError(cx, aRetval)) {
     aRv.NoteJSContextException(cx);
     return;
   }
 }
 
-/* static */ void ChromeUtils::ClearRecentJSDevError(GlobalObject&) {
+/* static */
+void ChromeUtils::ClearRecentJSDevError(GlobalObject&) {
   auto runtime = CycleCollectedJSRuntime::Get();
   MOZ_ASSERT(runtime);
 
   runtime->ClearRecentDevError();
 }
 #endif  // NIGHTLY_BUILD
 
 /* static */
@@ -841,19 +858,20 @@ already_AddRefed<Promise> ChromeUtils::R
       [domPromise](const nsresult& aRv) { domPromise->MaybeReject(aRv); });
 
   // sending back the promise instance
   return domPromise.forget();
 }
 
 constexpr auto kSkipSelfHosted = JS::SavedFrameSelfHosted::Exclude;
 
-/* static */ void ChromeUtils::GetCallerLocation(
-    const GlobalObject& aGlobal, nsIPrincipal* aPrincipal,
-    JS::MutableHandle<JSObject*> aRetval) {
+/* static */
+void ChromeUtils::GetCallerLocation(const GlobalObject& aGlobal,
+                                    nsIPrincipal* aPrincipal,
+                                    JS::MutableHandle<JSObject*> aRetval) {
   JSContext* cx = aGlobal.Context();
 
   auto* principals = nsJSPrincipals::get(aPrincipal);
 
   JS::StackCapture captureMode(JS::FirstSubsumedFrame(cx, principals));
 
   JS::RootedObject frame(cx);
   if (!JS::CaptureCurrentStack(cx, &frame, std::move(captureMode))) {
@@ -865,21 +883,22 @@ constexpr auto kSkipSelfHosted = JS::Sav
   // FirstSubsumedFrame gets us a stack which stops at the first principal which
   // is subsumed by the given principal. That means that we may have a lot of
   // privileged frames that we don't care about at the top of the stack, though.
   // We need to filter those out to get the frame we actually want.
   aRetval.set(
       js::GetFirstSubsumedSavedFrame(cx, principals, frame, kSkipSelfHosted));
 }
 
-/* static */ void ChromeUtils::CreateError(const GlobalObject& aGlobal,
-                                           const nsAString& aMessage,
-                                           JS::Handle<JSObject*> aStack,
-                                           JS::MutableHandle<JSObject*> aRetVal,
-                                           ErrorResult& aRv) {
+/* static */
+void ChromeUtils::CreateError(const GlobalObject& aGlobal,
+                              const nsAString& aMessage,
+                              JS::Handle<JSObject*> aStack,
+                              JS::MutableHandle<JSObject*> aRetVal,
+                              ErrorResult& aRv) {
   if (aStack && !JS::IsMaybeWrappedSavedFrame(aStack)) {
     aRv.Throw(NS_ERROR_INVALID_ARG);
     return;
   }
 
   JSContext* cx = aGlobal.Context();
 
   auto cleanup = MakeScopeExit([&]() { aRv.NoteJSContextException(cx); });
@@ -930,44 +949,47 @@ constexpr auto kSkipSelfHosted = JS::Sav
   if (aStack && !JS_WrapObject(cx, &retVal)) {
     return;
   }
 
   cleanup.release();
   aRetVal.set(retVal);
 }
 
-/* static */ already_AddRefed<Promise> ChromeUtils::RequestIOActivity(
-    GlobalObject& aGlobal, ErrorResult& aRv) {
+/* static */
+already_AddRefed<Promise> ChromeUtils::RequestIOActivity(GlobalObject& aGlobal,
+                                                         ErrorResult& aRv) {
   MOZ_ASSERT(XRE_IsParentProcess());
   MOZ_ASSERT(Preferences::GetBool(IO_ACTIVITY_ENABLED_PREF, false));
   nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(aGlobal.GetAsSupports());
   MOZ_ASSERT(global);
   RefPtr<Promise> domPromise = Promise::Create(global, aRv);
   if (NS_WARN_IF(aRv.Failed())) {
     return nullptr;
   }
   MOZ_ASSERT(domPromise);
   mozilla::net::IOActivityMonitor::RequestActivities(domPromise);
   return domPromise.forget();
 }
 
-/* static */ bool ChromeUtils::HasReportingHeaderForOrigin(
-    GlobalObject& global, const nsAString& aOrigin, ErrorResult& aRv) {
+/* static */
+bool ChromeUtils::HasReportingHeaderForOrigin(GlobalObject& global,
+                                              const nsAString& aOrigin,
+                                              ErrorResult& aRv) {
   if (!XRE_IsParentProcess()) {
     aRv.Throw(NS_ERROR_FAILURE);
     return false;
   }
 
   return ReportingHeader::HasReportingHeaderForOrigin(
       NS_ConvertUTF16toUTF8(aOrigin));
 }
 
-/* static */ PopupBlockerState ChromeUtils::GetPopupControlState(
-    GlobalObject& aGlobal) {
+/* static */
+PopupBlockerState ChromeUtils::GetPopupControlState(GlobalObject& aGlobal) {
   switch (PopupBlocker::GetPopupControlState()) {
     case PopupBlocker::PopupControlState::openAllowed:
       return PopupBlockerState::OpenAllowed;
 
     case PopupBlocker::PopupControlState::openControlled:
       return PopupBlockerState::OpenControlled;
 
     case PopupBlocker::PopupControlState::openBlocked:
@@ -981,53 +1003,59 @@ constexpr auto kSkipSelfHosted = JS::Sav
 
     default:
       MOZ_CRASH(
           "PopupBlocker::PopupControlState and PopupBlockerState are out of "
           "sync");
   }
 }
 
-/* static */ bool ChromeUtils::IsPopupTokenUnused(GlobalObject& aGlobal) {
+/* static */
+bool ChromeUtils::IsPopupTokenUnused(GlobalObject& aGlobal) {
   return PopupBlocker::IsPopupOpeningTokenUnused();
 }
 
-/* static */ double ChromeUtils::LastExternalProtocolIframeAllowed(
-    GlobalObject& aGlobal) {
+/* static */
+double ChromeUtils::LastExternalProtocolIframeAllowed(GlobalObject& aGlobal) {
   TimeStamp when = PopupBlocker::WhenLastExternalProtocolIframeAllowed();
   if (when.IsNull()) {
     return 0;
   }
 
   TimeDuration duration = TimeStamp::Now() - when;
   return duration.ToMilliseconds();
 }
 
-/* static */ void ChromeUtils::ResetLastExternalProtocolIframeAllowed(
+/* static */
+void ChromeUtils::ResetLastExternalProtocolIframeAllowed(
     GlobalObject& aGlobal) {
   PopupBlocker::ResetLastExternalProtocolIframeAllowed();
 }
 
-/* static */ void ChromeUtils::RegisterWindowActor(
-    const GlobalObject& aGlobal, const nsAString& aName,
-    const WindowActorOptions& aOptions, ErrorResult& aRv) {
+/* static */
+void ChromeUtils::RegisterWindowActor(const GlobalObject& aGlobal,
+                                      const nsAString& aName,
+                                      const WindowActorOptions& aOptions,
+                                      ErrorResult& aRv) {
   MOZ_ASSERT(XRE_IsParentProcess());
 
   RefPtr<JSWindowActorService> service = JSWindowActorService::GetSingleton();
   service->RegisterWindowActor(aName, aOptions, aRv);
 }
 
-/* static */ void ChromeUtils::UnregisterWindowActor(
-    const GlobalObject& aGlobal, const nsAString& aName) {
+/* static */
+void ChromeUtils::UnregisterWindowActor(const GlobalObject& aGlobal,
+                                        const nsAString& aName) {
   MOZ_ASSERT(XRE_IsParentProcess());
 
   RefPtr<JSWindowActorService> service = JSWindowActorService::GetSingleton();
   service->UnregisterWindowActor(aName);
 }
 
-/* static */ bool ChromeUtils::IsClassifierBlockingErrorCode(
-    GlobalObject& aGlobal, uint32_t aError) {
+/* static */
+bool ChromeUtils::IsClassifierBlockingErrorCode(GlobalObject& aGlobal,
+                                                uint32_t aError) {
   return net::UrlClassifierFeatureFactory::IsClassifierBlockingErrorCode(
       static_cast<nsresult>(aError));
 }
 
 }  // namespace dom
 }  // namespace mozilla
--- a/dom/base/Comment.cpp
+++ b/dom/base/Comment.cpp
@@ -43,18 +43,20 @@ void Comment::List(FILE* out, int32_t aI
   nsAutoString tmp;
   ToCString(tmp, 0, mText.GetLength());
   fputs(NS_LossyConvertUTF16toASCII(tmp).get(), out);
 
   fputs("-->\n", out);
 }
 #endif
 
-/* static */ already_AddRefed<Comment> Comment::Constructor(
-    const GlobalObject& aGlobal, const nsAString& aData, ErrorResult& aRv) {
+/* static */
+already_AddRefed<Comment> Comment::Constructor(const GlobalObject& aGlobal,
+                                               const nsAString& aData,
+                                               ErrorResult& aRv) {
   nsCOMPtr<nsPIDOMWindowInner> window =
       do_QueryInterface(aGlobal.GetAsSupports());
   if (!window || !window->GetDoc()) {
     aRv.Throw(NS_ERROR_FAILURE);
     return nullptr;
   }
 
   return window->GetDoc()->CreateComment(aData);
--- a/dom/base/Crypto.cpp
+++ b/dom/base/Crypto.cpp
@@ -28,18 +28,19 @@ NS_IMPL_CYCLE_COLLECTING_ADDREF(Crypto)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(Crypto)
 
 NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(Crypto, mParent, mSubtle)
 
 Crypto::Crypto(nsIGlobalObject* aParent) : mParent(aParent) {}
 
 Crypto::~Crypto() {}
 
-/* virtual */ JSObject* Crypto::WrapObject(JSContext* aCx,
-                                           JS::Handle<JSObject*> aGivenProto) {
+/* virtual */
+JSObject* Crypto::WrapObject(JSContext* aCx,
+                             JS::Handle<JSObject*> aGivenProto) {
   return Crypto_Binding::Wrap(aCx, this, aGivenProto);
 }
 
 void Crypto::GetRandomValues(JSContext* aCx, const ArrayBufferView& aArray,
                              JS::MutableHandle<JSObject*> aRetval,
                              ErrorResult& aRv) {
   JS::Rooted<JSObject*> view(aCx, aArray.Obj());
 
--- a/dom/base/CustomElementRegistry.cpp
+++ b/dom/base/CustomElementRegistry.cpp
@@ -442,17 +442,18 @@ void CustomElementRegistry::UnregisterUn
 
   nsTHashtable<nsRefPtrHashKey<nsIWeakReference>>* candidates = nullptr;
   if (mCandidatesMap.Get(aTypeName, &candidates)) {
     MOZ_ASSERT(candidates);
     candidates->RemoveEntry(weak);
   }
 }
 
-/* static */ UniquePtr<CustomElementCallback>
+/* static */
+UniquePtr<CustomElementCallback>
 CustomElementRegistry::CreateCustomElementCallback(
     Document::ElementCallbackType aType, Element* aCustomElement,
     LifecycleCallbackArgs* aArgs,
     LifecycleAdoptedCallbackArgs* aAdoptedCallbackArgs,
     CustomElementDefinition* aDefinition) {
   MOZ_ASSERT(aDefinition, "CustomElementDefinition should not be null");
   MOZ_ASSERT(aCustomElement->GetCustomElementData(),
              "CustomElementData should exist");
@@ -503,17 +504,18 @@ CustomElementRegistry::CreateCustomEleme
   }
 
   if (aAdoptedCallbackArgs) {
     callback->SetAdoptedCallbackArgs(*aAdoptedCallbackArgs);
   }
   return callback;
 }
 
-/* static */ void CustomElementRegistry::EnqueueLifecycleCallback(
+/* static */
+void CustomElementRegistry::EnqueueLifecycleCallback(
     Document::ElementCallbackType aType, Element* aCustomElement,
     LifecycleCallbackArgs* aArgs,
     LifecycleAdoptedCallbackArgs* aAdoptedCallbackArgs,
     CustomElementDefinition* aDefinition) {
   CustomElementDefinition* definition = aDefinition;
   if (!definition) {
     definition = aCustomElement->GetCustomElementDefinition();
     if (!definition ||
@@ -1073,18 +1075,20 @@ static void DoUpgrade(Element* aElement,
     aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
     return;
   }
 }
 
 }  // anonymous namespace
 
 // https://html.spec.whatwg.org/multipage/scripting.html#upgrades
-/* static */ void CustomElementRegistry::Upgrade(
-    Element* aElement, CustomElementDefinition* aDefinition, ErrorResult& aRv) {
+/* static */
+void CustomElementRegistry::Upgrade(Element* aElement,
+                                    CustomElementDefinition* aDefinition,
+                                    ErrorResult& aRv) {
   RefPtr<CustomElementData> data = aElement->GetCustomElementData();
   MOZ_ASSERT(data, "CustomElementData should exist");
 
   // Step 1 and step 2.
   if (data->mState == CustomElementData::State::eCustom ||
       data->mState == CustomElementData::State::eFailed) {
     return;
   }
--- a/dom/base/DOMError.cpp
+++ b/dom/base/DOMError.cpp
@@ -43,19 +43,21 @@ DOMError::DOMError(nsPIDOMWindowInner* a
 
 DOMError::~DOMError() {}
 
 JSObject* DOMError::WrapObject(JSContext* aCx,
                                JS::Handle<JSObject*> aGivenProto) {
   return DOMError_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-/* static */ already_AddRefed<DOMError> DOMError::Constructor(
-    const GlobalObject& aGlobal, const nsAString& aName,
-    const nsAString& aMessage, ErrorResult& aRv) {
+/* static */
+already_AddRefed<DOMError> DOMError::Constructor(const GlobalObject& aGlobal,
+                                                 const nsAString& aName,
+                                                 const nsAString& aMessage,
+                                                 ErrorResult& aRv) {
   nsCOMPtr<nsPIDOMWindowInner> window =
       do_QueryInterface(aGlobal.GetAsSupports());
 
   if (window) {
     nsCOMPtr<Document> doc = window->GetExtantDoc();
     if (doc) {
       doc->SetDocumentAndPageUseCounter(eUseCounter_custom_DOMErrorConstructor);
     }
--- a/dom/base/DOMException.cpp
+++ b/dom/base/DOMException.cpp
@@ -379,26 +379,28 @@ already_AddRefed<DOMException> DOMExcept
   return retval.forget();
 }
 
 JSObject* DOMException::WrapObject(JSContext* aCx,
                                    JS::Handle<JSObject*> aGivenProto) {
   return DOMException_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-/* static */ already_AddRefed<DOMException> DOMException::Create(nsresult aRv) {
+/* static */
+already_AddRefed<DOMException> DOMException::Create(nsresult aRv) {
   nsCString name;
   nsCString message;
   uint16_t code;
   NSResultToNameAndMessage(aRv, name, message, &code);
   RefPtr<DOMException> inst = new DOMException(aRv, message, name, code);
   return inst.forget();
 }
 
-/* static */ already_AddRefed<DOMException> DOMException::Create(
+/* static */
+already_AddRefed<DOMException> DOMException::Create(
     nsresult aRv, const nsACString& aMessage) {
   nsCString name;
   nsCString message;
   uint16_t code;
   NSResultToNameAndMessage(aRv, name, message, &code);
   RefPtr<DOMException> inst = new DOMException(aRv, aMessage, name, code);
   return inst.forget();
 }
--- a/dom/base/DOMParser.cpp
+++ b/dom/base/DOMParser.cpp
@@ -216,18 +216,19 @@ already_AddRefed<Document> DOMParser::Pa
   if (NS_FAILED(rv)) {
     aRv.Throw(NS_ERROR_FAILURE);
     return nullptr;
   }
 
   return document.forget();
 }
 
-/*static */ already_AddRefed<DOMParser> DOMParser::Constructor(
-    const GlobalObject& aOwner, ErrorResult& rv) {
+/*static */
+already_AddRefed<DOMParser> DOMParser::Constructor(const GlobalObject& aOwner,
+                                                   ErrorResult& rv) {
   MOZ_ASSERT(NS_IsMainThread());
   nsCOMPtr<nsIPrincipal> docPrincipal = aOwner.GetSubjectPrincipal();
   nsCOMPtr<nsIURI> documentURI;
   nsIURI* baseURI = nullptr;
   if (nsContentUtils::IsSystemPrincipal(docPrincipal)) {
     docPrincipal = NullPrincipal::CreateWithoutOriginAttributes();
     docPrincipal->GetURI(getter_AddRefs(documentURI));
   } else {
--- a/dom/base/DOMPrefs.cpp
+++ b/dom/base/DOMPrefs.cpp
@@ -22,17 +22,18 @@ void DOMPrefs::Initialize() {
 
 #define DOM_WEBIDL_PREF(name)
 
 #include "DOMPrefsInternal.h"
 
 #undef DOM_WEBIDL_PREF
 }
 
-/* static */ bool DOMPrefs::DumpEnabled() {
+/* static */
+bool DOMPrefs::DumpEnabled() {
 #if !(defined(DEBUG) || defined(MOZ_ENABLE_JS_DUMP))
   return StaticPrefs::browser_dom_window_dump_enabled();
 #else
   return true;
 #endif
 }
 
 #define DOM_WEBIDL_PREF(name)                                        \
--- a/dom/base/DOMRequest.cpp
+++ b/dom/base/DOMRequest.cpp
@@ -60,18 +60,19 @@ NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INH
 NS_IMPL_CYCLE_COLLECTION_TRACE_END
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(DOMRequest)
 NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
 
 NS_IMPL_ADDREF_INHERITED(DOMRequest, DOMEventTargetHelper)
 NS_IMPL_RELEASE_INHERITED(DOMRequest, DOMEventTargetHelper)
 
-/* virtual */ JSObject* DOMRequest::WrapObject(
-    JSContext* aCx, JS::Handle<JSObject*> aGivenProto) {
+/* virtual */
+JSObject* DOMRequest::WrapObject(JSContext* aCx,
+                                 JS::Handle<JSObject*> aGivenProto) {
   return DOMRequest_Binding::Wrap(aCx, this, aGivenProto);
 }
 
 void DOMRequest::FireSuccess(JS::Handle<JS::Value> aResult) {
   NS_ASSERTION(!mDone, "mDone shouldn't have been set to true already!");
   NS_ASSERTION(!mError, "mError shouldn't have been set!");
   NS_ASSERTION(mResult.isUndefined(), "mResult shouldn't have been set!");
 
--- a/dom/base/DocGroup.cpp
+++ b/dom/base/DocGroup.cpp
@@ -18,18 +18,18 @@
 #  include <unistd.h>  // for getpid()
 #endif                 // defined(XP_WIN)
 
 namespace mozilla {
 namespace dom {
 
 AutoTArray<RefPtr<DocGroup>, 2>* DocGroup::sPendingDocGroups = nullptr;
 
-/* static */ nsresult DocGroup::GetKey(nsIPrincipal* aPrincipal,
-                                       nsACString& aKey) {
+/* static */
+nsresult DocGroup::GetKey(nsIPrincipal* aPrincipal, nsACString& aKey) {
   // Use GetBaseDomain() to handle things like file URIs, IP address URIs,
   // etc. correctly.
   nsresult rv = aPrincipal->GetBaseDomain(aKey);
   if (NS_FAILED(rv)) {
     // We don't really know what to do here.  But we should be conservative,
     // otherwise it would be possible to reorder two events incorrectly in the
     // future if we interrupt at the DocGroup level, so to be safe, use an
     // empty string to classify all such documents as belonging to the same
--- a/dom/base/Document.cpp
+++ b/dom/base/Document.cpp
@@ -9800,17 +9800,18 @@ class PendingFullscreenChangeList {
     FullscreenChange* mCurrent;
     nsCOMPtr<nsIDocShellTreeItem> mRootShellForIteration;
   };
 
  private:
   static LinkedList<FullscreenChange> sList;
 };
 
-/* static */ LinkedList<FullscreenChange> PendingFullscreenChangeList::sList;
+/* static */
+LinkedList<FullscreenChange> PendingFullscreenChangeList::sList;
 
 Document* Document::GetFullscreenRoot() {
   nsCOMPtr<Document> root = do_QueryReferent(mFullscreenRoot);
   return root;
 }
 
 void Document::SetFullscreenRoot(Document* aRoot) {
   mFullscreenRoot = do_GetWeakReference(aRoot);
@@ -9848,17 +9849,18 @@ class nsCallExitFullscreen : public Runn
     }
     return NS_OK;
   }
 
  private:
   nsCOMPtr<Document> mDoc;
 };
 
-/* static */ void Document::AsyncExitFullscreen(Document* aDoc) {
+/* static */
+void Document::AsyncExitFullscreen(Document* aDoc) {
   MOZ_RELEASE_ASSERT(NS_IsMainThread());
   nsCOMPtr<nsIRunnable> exit = new nsCallExitFullscreen(aDoc);
   if (aDoc) {
     aDoc->Dispatch(TaskCategory::Other, exit.forget());
   } else {
     NS_DispatchToCurrentThread(exit.forget());
   }
 }
@@ -9953,18 +9955,18 @@ class ExitFullscreenScriptRunnable : pub
     return NS_OK;
   }
 
  private:
   nsCOMPtr<Document> mRoot;
   nsCOMPtr<Document> mLeaf;
 };
 
-/* static */ void Document::ExitFullscreenInDocTree(
-    Document* aMaybeNotARootDoc) {
+/* static */
+void Document::ExitFullscreenInDocTree(Document* aMaybeNotARootDoc) {
   MOZ_ASSERT(aMaybeNotARootDoc);
 
   // Unlock the pointer
   UnlockPointer();
 
   // Resolve all promises which waiting for exit fullscreen.
   PendingFullscreenChangeList::Iterator<FullscreenExit> iter(
       aMaybeNotARootDoc, PendingFullscreenChangeList::eDocumentsWithSameRoot);
@@ -10286,18 +10288,19 @@ nsresult Document::RemoteFrameFullscreen
 }
 
 nsresult Document::RemoteFrameFullscreenReverted() {
   UniquePtr<FullscreenExit> exit = FullscreenExit::CreateForRemote(this);
   RestorePreviousFullscreenState(std::move(exit));
   return NS_OK;
 }
 
-/* static */ bool Document::IsUnprefixedFullscreenEnabled(JSContext* aCx,
-                                                          JSObject* aObject) {
+/* static */
+bool Document::IsUnprefixedFullscreenEnabled(JSContext* aCx,
+                                             JSObject* aObject) {
   MOZ_ASSERT(NS_IsMainThread());
   return nsContentUtils::IsSystemCaller(aCx) ||
          nsContentUtils::IsUnprefixedFullscreenApiEnabled();
 }
 
 static bool HasFullscreenSubDocument(Document* aDoc) {
   uint32_t count = CountFullscreenSubDocuments(aDoc);
   NS_ASSERTION(count <= 1,
@@ -10470,17 +10473,18 @@ void Document::RequestFullscreen(UniqueP
         this, ToSupports(this), NS_LITERAL_STRING("MozDOMFullscreen:Request"),
         CanBubble::eYes, Cancelable::eNo, /* DefaultAction */ nullptr);
   } else {
     // Make the window fullscreen.
     rootWin->SetFullscreenInternal(FullscreenReason::ForFullscreenAPI, true);
   }
 }
 
-/* static */ bool Document::HandlePendingFullscreenRequests(Document* aDoc) {
+/* static */
+bool Document::HandlePendingFullscreenRequests(Document* aDoc) {
   bool handled = false;
   PendingFullscreenChangeList::Iterator<FullscreenRequest> iter(
       aDoc, PendingFullscreenChangeList::eDocumentsWithSameRoot);
   while (!iter.AtEnd()) {
     UniquePtr<FullscreenRequest> request = iter.TakeAndNext();
     Document* doc = request->Document();
     if (doc->ApplyFullscreen(std::move(request))) {
       handled = true;
@@ -11009,18 +11013,18 @@ void Document::AddSizeOfExcludingThis(ns
                                       size_t* aNodeSize) const {
   // This AddSizeOfExcludingThis() overrides the one from nsINode.  But
   // nsDocuments can only appear at the top of the DOM tree, and we use the
   // specialized DocAddSizeOfExcludingThis() in that case.  So this should never
   // be called.
   MOZ_CRASH();
 }
 
-/* static */ void Document::AddSizeOfNodeTree(nsINode& aNode,
-                                              nsWindowSizes& aWindowSizes) {
+/* static */
+void Document::AddSizeOfNodeTree(nsINode& aNode, nsWindowSizes& aWindowSizes) {
   size_t nodeSize = 0;
   aNode.AddSizeOfIncludingThis(aWindowSizes, &nodeSize);
 
   // This is where we transfer the nodeSize obtained from
   // nsINode::AddSizeOfIncludingThis() to a value in nsWindowSizes.
   switch (aNode.NodeType()) {
     case nsINode::ELEMENT_NODE:
       aWindowSizes.mDOMElementNodesSize += nodeSize;
--- a/dom/base/DocumentFragment.cpp
+++ b/dom/base/DocumentFragment.cpp
@@ -83,17 +83,18 @@ void DocumentFragment::DumpContent(FILE*
   fputs("</DocumentFragment>", out);
 
   if (aIndent) {
     fputs("\n", out);
   }
 }
 #endif
 
-/* static */ already_AddRefed<DocumentFragment> DocumentFragment::Constructor(
+/* static */
+already_AddRefed<DocumentFragment> DocumentFragment::Constructor(
     const GlobalObject& aGlobal, ErrorResult& aRv) {
   nsCOMPtr<nsPIDOMWindowInner> window =
       do_QueryInterface(aGlobal.GetAsSupports());
   if (!window || !window->GetDoc()) {
     aRv.Throw(NS_ERROR_FAILURE);
     return nullptr;
   }
 
--- a/dom/base/Element.cpp
+++ b/dom/base/Element.cpp
@@ -3250,37 +3250,39 @@ bool Element::Matches(const nsAString& a
 
 static const nsAttrValue::EnumTable kCORSAttributeTable[] = {
     // Order matters here
     // See ParseCORSValue
     {"anonymous", CORS_ANONYMOUS},
     {"use-credentials", CORS_USE_CREDENTIALS},
     {nullptr, 0}};
 
-/* static */ void Element::ParseCORSValue(const nsAString& aValue,
-                                          nsAttrValue& aResult) {
+/* static */
+void Element::ParseCORSValue(const nsAString& aValue, nsAttrValue& aResult) {
   DebugOnly<bool> success =
       aResult.ParseEnumValue(aValue, kCORSAttributeTable, false,
                              // default value is anonymous if aValue is
                              // not a value we understand
                              &kCORSAttributeTable[0]);
   MOZ_ASSERT(success);
 }
 
-/* static */ CORSMode Element::StringToCORSMode(const nsAString& aValue) {
+/* static */
+CORSMode Element::StringToCORSMode(const nsAString& aValue) {
   if (aValue.IsVoid()) {
     return CORS_NONE;
   }
 
   nsAttrValue val;
   Element::ParseCORSValue(aValue, val);
   return CORSMode(val.GetEnumValue());
 }
 
-/* static */ CORSMode Element::AttrValueToCORSMode(const nsAttrValue* aValue) {
+/* static */
+CORSMode Element::AttrValueToCORSMode(const nsAttrValue* aValue) {
   if (!aValue) {
     return CORS_NONE;
   }
 
   return CORSMode(aValue->GetEnumValue());
 }
 
 static const char* GetFullscreenError(CallerType aCallerType) {
@@ -3404,17 +3406,18 @@ already_AddRefed<Animation> Element::Ani
     JSContext* aContext, JS::Handle<JSObject*> aKeyframes,
     const UnrestrictedDoubleOrKeyframeAnimationOptions& aOptions,
     ErrorResult& aError) {
   Nullable<ElementOrCSSPseudoElement> target;
   target.SetValue().SetAsElement() = this;
   return Animate(target, aContext, aKeyframes, aOptions, aError);
 }
 
-/* static */ already_AddRefed<Animation> Element::Animate(
+/* static */
+already_AddRefed<Animation> Element::Animate(
     const Nullable<ElementOrCSSPseudoElement>& aTarget, JSContext* aContext,
     JS::Handle<JSObject*> aKeyframes,
     const UnrestrictedDoubleOrKeyframeAnimationOptions& aOptions,
     ErrorResult& aError) {
   MOZ_ASSERT(!aTarget.IsNull() && (aTarget.Value().IsElement() ||
                                    aTarget.Value().IsCSSPseudoElement()),
              "aTarget should be initialized");
 
@@ -3513,19 +3516,20 @@ void Element::GetAnimations(const Animat
                                      aAnimations);
       Element::GetAnimationsUnsorted(element, PseudoStyleType::after,
                                      aAnimations);
     }
   }
   aAnimations.Sort(AnimationPtrComparator<RefPtr<Animation>>());
 }
 
-/* static */ void Element::GetAnimationsUnsorted(
-    Element* aElement, PseudoStyleType aPseudoType,
-    nsTArray<RefPtr<Animation>>& aAnimations) {
+/* static */
+void Element::GetAnimationsUnsorted(Element* aElement,
+                                    PseudoStyleType aPseudoType,
+                                    nsTArray<RefPtr<Animation>>& aAnimations) {
   MOZ_ASSERT(aPseudoType == PseudoStyleType::NotPseudo ||
                  aPseudoType == PseudoStyleType::after ||
                  aPseudoType == PseudoStyleType::before,
              "Unsupported pseudo type");
   MOZ_ASSERT(aElement, "Null element");
 
   EffectSet* effects = EffectSet::GetEffectSet(aElement, aPseudoType);
   if (!effects) {
--- a/dom/base/EventSource.cpp
+++ b/dom/base/EventSource.cpp
@@ -1792,17 +1792,18 @@ nsresult EventSource::CreateAndDispatchS
   // it doesn't bubble, and it isn't cancelable
   event->InitEvent(aName, false, false);
   event->SetTrusted(true);
   ErrorResult rv;
   DispatchEvent(*event, rv);
   return rv.StealNSResult();
 }
 
-/* static */ already_AddRefed<EventSource> EventSource::Constructor(
+/* static */
+already_AddRefed<EventSource> EventSource::Constructor(
     const GlobalObject& aGlobal, const nsAString& aURL,
     const EventSourceInit& aEventSourceInitDict, ErrorResult& aRv) {
   nsCOMPtr<nsPIDOMWindowInner> ownerWindow =
       do_QueryInterface(aGlobal.GetAsSupports());
 
   MOZ_ASSERT(!NS_IsMainThread() || ownerWindow);
 
   RefPtr<EventSource> eventSource =
--- a/dom/base/FormData.cpp
+++ b/dom/base/FormData.cpp
@@ -273,22 +273,24 @@ void FormData::SetNameDirectoryPair(Form
   MOZ_ASSERT(aData);
   MOZ_ASSERT(aDirectory);
 
   aData->name = aName;
   aData->wasNullBlob = false;
   aData->value.SetAsDirectory() = aDirectory;
 }
 
-/* virtual */ JSObject* FormData::WrapObject(
-    JSContext* aCx, JS::Handle<JSObject*> aGivenProto) {
+/* virtual */
+JSObject* FormData::WrapObject(JSContext* aCx,
+                               JS::Handle<JSObject*> aGivenProto) {
   return FormData_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-/* static */ already_AddRefed<FormData> FormData::Constructor(
+/* static */
+already_AddRefed<FormData> FormData::Constructor(
     const GlobalObject& aGlobal,
     const Optional<NonNull<HTMLFormElement> >& aFormElement, ErrorResult& aRv) {
   RefPtr<FormData> formData = new FormData(aGlobal.GetAsSupports());
   if (aFormElement.WasPassed()) {
     aRv = aFormElement.Value().WalkFormElements(formData);
   }
   return formData.forget();
 }
--- a/dom/base/FuzzingFunctions.cpp
+++ b/dom/base/FuzzingFunctions.cpp
@@ -16,28 +16,31 @@
 #include "nsFocusManager.h"
 #include "nsIAccessibilityService.h"
 #include "nsPIDOMWindow.h"
 #include "xpcAccessibilityService.h"
 
 namespace mozilla {
 namespace dom {
 
-/* static */ void FuzzingFunctions::GarbageCollect(const GlobalObject&) {
+/* static */
+void FuzzingFunctions::GarbageCollect(const GlobalObject&) {
   nsJSContext::GarbageCollectNow(JS::GCReason::COMPONENT_UTILS,
                                  nsJSContext::NonIncrementalGC,
                                  nsJSContext::NonShrinkingGC);
 }
 
-/* static */ void FuzzingFunctions::CycleCollect(const GlobalObject&) {
+/* static */
+void FuzzingFunctions::CycleCollect(const GlobalObject&) {
   nsJSContext::CycleCollectNow();
 }
 
-/* static */ void FuzzingFunctions::EnableAccessibility(const GlobalObject&,
-                                                        ErrorResult& aRv) {
+/* static */
+void FuzzingFunctions::EnableAccessibility(const GlobalObject&,
+                                           ErrorResult& aRv) {
   RefPtr<nsIAccessibilityService> a11y;
   nsresult rv;
 
   rv = NS_GetAccessibilityService(getter_AddRefs(a11y));
   if (NS_FAILED(rv)) {
     aRv.Throw(rv);
   }
 }
@@ -64,17 +67,18 @@ static const ModifierKey kModifierKeys[]
     ModifierKey(MODIFIER_SYMBOL, KEY_NAME_INDEX_Symbol, false),
     ModifierKey(MODIFIER_CAPSLOCK, KEY_NAME_INDEX_CapsLock, true),
     ModifierKey(MODIFIER_FNLOCK, KEY_NAME_INDEX_FnLock, true),
     ModifierKey(MODIFIER_NUMLOCK, KEY_NAME_INDEX_NumLock, true),
     ModifierKey(MODIFIER_SCROLLLOCK, KEY_NAME_INDEX_ScrollLock, true),
     ModifierKey(MODIFIER_SYMBOLLOCK, KEY_NAME_INDEX_SymbolLock, true),
 };
 
-/* static */ Modifiers FuzzingFunctions::ActivateModifiers(
+/* static */
+Modifiers FuzzingFunctions::ActivateModifiers(
     TextInputProcessor* aTextInputProcessor, Modifiers aModifiers,
     nsIWidget* aWidget, ErrorResult& aRv) {
   MOZ_ASSERT(aTextInputProcessor);
 
   if (aModifiers == MODIFIER_NONE) {
     return MODIFIER_NONE;
   }
 
@@ -109,17 +113,18 @@ static const ModifierKey kModifierKeys[]
         return activatedModifiers;
       }
     }
     activatedModifiers |= kModifierKey.mModifier;
   }
   return activatedModifiers;
 }
 
-/* static */ Modifiers FuzzingFunctions::InactivateModifiers(
+/* static */
+Modifiers FuzzingFunctions::InactivateModifiers(
     TextInputProcessor* aTextInputProcessor, Modifiers aModifiers,
     nsIWidget* aWidget, ErrorResult& aRv) {
   MOZ_ASSERT(aTextInputProcessor);
 
   if (aModifiers == MODIFIER_NONE) {
     return MODIFIER_NONE;
   }
 
@@ -154,19 +159,21 @@ static const ModifierKey kModifierKeys[]
     if (NS_WARN_IF(aRv.Failed())) {
       return inactivatedModifiers;
     }
     inactivatedModifiers |= kModifierKey.mModifier;
   }
   return inactivatedModifiers;
 }
 
-/* static */ void FuzzingFunctions::SynthesizeKeyboardEvents(
-    const GlobalObject&, const nsAString& aKeyValue,
-    const KeyboardEventInit& aDict, ErrorResult& aRv) {
+/* static */
+void FuzzingFunctions::SynthesizeKeyboardEvents(const GlobalObject&,
+                                                const nsAString& aKeyValue,
+                                                const KeyboardEventInit& aDict,
+                                                ErrorResult& aRv) {
   // Prepare keyboard event to synthesize first.
   uint32_t flags = 0;
   // Don't modify the given dictionary since caller may want to modify
   // a part of it and call this with it again.
   WidgetKeyboardEvent event(true, eVoidEvent, nullptr);
   event.mKeyCode = aDict.mKeyCode;
   event.mCharCode = 0;  // Ignore.
   event.mKeyNameIndex = WidgetKeyboardEvent::GetKeyNameIndex(aKeyValue);
--- a/dom/base/ImageEncoder.cpp
+++ b/dom/base/ImageEncoder.cpp
@@ -273,20 +273,22 @@ nsresult ImageEncoder::ExtractDataAsync(
       new EncodingCompleteEvent(aEncodeCallback);
 
   nsCOMPtr<nsIRunnable> event = new EncodingRunnable(
       aType, aOptions, std::move(aImageBuffer), nullptr, encoder, completeEvent,
       aFormat, aSize, aUsePlaceholder, aUsingCustomOptions);
   return sThreadPool->Dispatch(event, NS_DISPATCH_NORMAL);
 }
 
-/*static*/ nsresult ImageEncoder::GetInputStream(
-    int32_t aWidth, int32_t aHeight, uint8_t* aImageBuffer, int32_t aFormat,
-    imgIEncoder* aEncoder, const char16_t* aEncoderOptions,
-    nsIInputStream** aStream) {
+/*static*/
+nsresult ImageEncoder::GetInputStream(int32_t aWidth, int32_t aHeight,
+                                      uint8_t* aImageBuffer, int32_t aFormat,
+                                      imgIEncoder* aEncoder,
+                                      const char16_t* aEncoderOptions,
+                                      nsIInputStream** aStream) {
   nsresult rv = aEncoder->InitFromData(aImageBuffer, aWidth * aHeight * 4,
                                        aWidth, aHeight, aWidth * 4, aFormat,
                                        nsDependentString(aEncoderOptions));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<imgIEncoder> encoder(aEncoder);
   encoder.forget(aStream);
   return NS_OK;
--- a/dom/base/Link.cpp
+++ b/dom/base/Link.cpp
@@ -825,29 +825,29 @@ size_t Link::SizeOfExcludingThis(mozilla
 
 static const nsAttrValue::EnumTable kAsAttributeTable[] = {
     {"", DESTINATION_INVALID},      {"audio", DESTINATION_AUDIO},
     {"font", DESTINATION_FONT},     {"image", DESTINATION_IMAGE},
     {"script", DESTINATION_SCRIPT}, {"style", DESTINATION_STYLE},
     {"track", DESTINATION_TRACK},   {"video", DESTINATION_VIDEO},
     {"fetch", DESTINATION_FETCH},   {nullptr, 0}};
 
-/* static */ void Link::ParseAsValue(const nsAString &aValue,
-                                     nsAttrValue &aResult) {
+/* static */
+void Link::ParseAsValue(const nsAString &aValue, nsAttrValue &aResult) {
   DebugOnly<bool> success =
       aResult.ParseEnumValue(aValue, kAsAttributeTable, false,
                              // default value is a empty string
                              // if aValue is not a value we
                              // understand
                              &kAsAttributeTable[0]);
   MOZ_ASSERT(success);
 }
 
-/* static */ nsContentPolicyType Link::AsValueToContentPolicy(
-    const nsAttrValue &aValue) {
+/* static */
+nsContentPolicyType Link::AsValueToContentPolicy(const nsAttrValue &aValue) {
   switch (aValue.GetEnumValue()) {
     case DESTINATION_INVALID:
       return nsIContentPolicy::TYPE_INVALID;
     case DESTINATION_AUDIO:
       return nsIContentPolicy::TYPE_INTERNAL_AUDIO;
     case DESTINATION_TRACK:
       return nsIContentPolicy::TYPE_INTERNAL_TRACK;
     case DESTINATION_VIDEO:
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
@@ -289,18 +289,18 @@ void Navigator::GetAppName(nsAString& aA
  * Returns the value of Accept-Languages (HTTP header) as a nsTArray of
  * languages. The value is set in the preference by the user ("Content
  * Languages").
  *
  * "en", "en-US" and "i-cherokee" and "" are valid languages tokens.
  *
  * An empty array will be returned if there is no valid languages.
  */
-/* static */ void Navigator::GetAcceptLanguages(
-    nsTArray<nsString>& aLanguages) {
+/* static */
+void Navigator::GetAcceptLanguages(nsTArray<nsString>& aLanguages) {
   MOZ_ASSERT(NS_IsMainThread());
 
   aLanguages.Clear();
 
   // E.g. "de-de, en-us,en".
   nsAutoString acceptLang;
   Preferences::GetLocalizedString("intl.accept_languages", acceptLang);
 
@@ -1589,18 +1589,19 @@ nsresult Navigator::GetPlatform(nsAStrin
   nsAutoCString plat;
   rv = service->GetOscpu(plat);
   CopyASCIItoUTF16(plat, aPlatform);
 #endif
 
   return rv;
 }
 
-/* static */ nsresult Navigator::GetAppVersion(nsAString& aAppVersion,
-                                               bool aUsePrefOverriddenValue) {
+/* static */
+nsresult Navigator::GetAppVersion(nsAString& aAppVersion,
+                                  bool aUsePrefOverriddenValue) {
   MOZ_ASSERT(NS_IsMainThread());
 
   if (aUsePrefOverriddenValue) {
     // If fingerprinting resistance is on, we will spoof this value. See
     // nsRFPService.h for details about spoofed values.
     if (nsContentUtils::ShouldResistFingerprinting()) {
       aAppVersion.AssignLiteral(SPOOFED_APPVERSION);
       return NS_OK;
@@ -1632,18 +1633,18 @@ nsresult Navigator::GetPlatform(nsAStrin
   NS_ENSURE_SUCCESS(rv, rv);
 
   AppendASCIItoUTF16(str, aAppVersion);
   aAppVersion.Append(char16_t(')'));
 
   return rv;
 }
 
-/* static */ void Navigator::AppName(nsAString& aAppName,
-                                     bool aUsePrefOverriddenValue) {
+/* static */
+void Navigator::AppName(nsAString& aAppName, bool aUsePrefOverriddenValue) {
   MOZ_ASSERT(NS_IsMainThread());
 
   if (aUsePrefOverriddenValue) {
     // If fingerprinting resistance is on, we will spoof this value. See
     // nsRFPService.h for details about spoofed values.
     if (nsContentUtils::ShouldResistFingerprinting()) {
       aAppName.AssignLiteral(SPOOFED_APPNAME);
       return;
--- a/dom/base/PopupBlocker.cpp
+++ b/dom/base/PopupBlocker.cpp
@@ -97,29 +97,30 @@ PopupBlocker::PopupControlState PopupBlo
   MOZ_ASSERT(NS_IsMainThread());
   PopupBlocker::PopupControlState old = sPopupControlState;
   if (aState < old || aForce) {
     sPopupControlState = aState;
   }
   return old;
 }
 
-/* static */ void PopupBlocker::PopPopupControlState(
+/* static */
+void PopupBlocker::PopPopupControlState(
     PopupBlocker::PopupControlState aState) {
   MOZ_ASSERT(NS_IsMainThread());
   sPopupControlState = aState;
 }
 
 /* static */ PopupBlocker::PopupControlState
 PopupBlocker::GetPopupControlState() {
   return sPopupControlState;
 }
 
-/* static */ bool PopupBlocker::CanShowPopupByPermission(
-    nsIPrincipal* aPrincipal) {
+/* static */
+bool PopupBlocker::CanShowPopupByPermission(nsIPrincipal* aPrincipal) {
   MOZ_ASSERT(aPrincipal);
   uint32_t permit;
   nsCOMPtr<nsIPermissionManager> permissionManager =
       services::GetPermissionManager();
 
   if (permissionManager &&
       NS_SUCCEEDED(permissionManager->TestPermissionFromPrincipal(
           aPrincipal, NS_LITERAL_CSTRING("popup"), &permit))) {
@@ -129,36 +130,36 @@ PopupBlocker::GetPopupControlState() {
     if (permit == nsIPermissionManager::DENY_ACTION) {
       return false;
     }
   }
 
   return !StaticPrefs::dom_disable_open_during_load();
 }
 
-/* static */ bool PopupBlocker::TryUsePopupOpeningToken() {
+/* static */
+bool PopupBlocker::TryUsePopupOpeningToken() {
   MOZ_ASSERT(sPopupStatePusherCount);
 
   if (!sUnusedPopupToken) {
     sUnusedPopupToken = true;
     return true;
   }
 
   return false;
 }
 
-/* static */ bool PopupBlocker::IsPopupOpeningTokenUnused() {
-  return sUnusedPopupToken;
-}
+/* static */
+bool PopupBlocker::IsPopupOpeningTokenUnused() { return sUnusedPopupToken; }
 
-/* static */ void PopupBlocker::PopupStatePusherCreated() {
-  ++sPopupStatePusherCount;
-}
+/* static */
+void PopupBlocker::PopupStatePusherCreated() { ++sPopupStatePusherCount; }
 
-/* static */ void PopupBlocker::PopupStatePusherDestroyed() {
+/* static */
+void PopupBlocker::PopupStatePusherDestroyed() {
   MOZ_ASSERT(sPopupStatePusherCount);
 
   if (!--sPopupStatePusherCount) {
     sUnusedPopupToken = false;
   }
 }
 
 // static
@@ -376,53 +377,58 @@ PopupBlocker::PopupControlState PopupBlo
       break;
     default:
       break;
   }
 
   return abuse;
 }
 
-/* static */ void PopupBlocker::Initialize() {
+/* static */
+void PopupBlocker::Initialize() {
   DebugOnly<nsresult> rv =
       Preferences::RegisterCallback(OnPrefChange, "dom.popup_allowed_events");
   MOZ_ASSERT(NS_SUCCEEDED(rv),
              "Failed to observe \"dom.popup_allowed_events\"");
 }
 
-/* static */ void PopupBlocker::Shutdown() {
+/* static */
+void PopupBlocker::Shutdown() {
   if (sPopupAllowedEvents) {
     free(sPopupAllowedEvents);
   }
 
   Preferences::UnregisterCallback(OnPrefChange, "dom.popup_allowed_events");
 }
 
-/* static */ bool PopupBlocker::ConsumeTimerTokenForExternalProtocolIframe() {
+/* static */
+bool PopupBlocker::ConsumeTimerTokenForExternalProtocolIframe() {
   TimeStamp now = TimeStamp::Now();
 
   if (sLastAllowedExternalProtocolIFrameTimeStamp.IsNull()) {
     sLastAllowedExternalProtocolIFrameTimeStamp = now;
     return true;
   }
 
   if ((now - sLastAllowedExternalProtocolIFrameTimeStamp).ToSeconds() <
       (StaticPrefs::dom_delay_block_external_protocol_in_iframes())) {
     return false;
   }
 
   sLastAllowedExternalProtocolIFrameTimeStamp = now;
   return true;
 }
 
-/* static */ TimeStamp PopupBlocker::WhenLastExternalProtocolIframeAllowed() {
+/* static */
+TimeStamp PopupBlocker::WhenLastExternalProtocolIframeAllowed() {
   return sLastAllowedExternalProtocolIFrameTimeStamp;
 }
 
-/* static */ void PopupBlocker::ResetLastExternalProtocolIframeAllowed() {
+/* static */
+void PopupBlocker::ResetLastExternalProtocolIframeAllowed() {
   sLastAllowedExternalProtocolIFrameTimeStamp = TimeStamp();
 }
 
 }  // namespace dom
 }  // namespace mozilla
 
 nsAutoPopupStatePusherInternal::nsAutoPopupStatePusherInternal(
     mozilla::dom::PopupBlocker::PopupControlState aState, bool aForce)
--- a/dom/base/SameProcessMessageQueue.cpp
+++ b/dom/base/SameProcessMessageQueue.cpp
@@ -31,17 +31,18 @@ void SameProcessMessageQueue::Push(Runna
 void SameProcessMessageQueue::Flush() {
   nsTArray<RefPtr<Runnable>> queue;
   mQueue.SwapElements(queue);
   for (size_t i = 0; i < queue.Length(); i++) {
     queue[i]->Run();
   }
 }
 
-/* static */ SameProcessMessageQueue* SameProcessMessageQueue::Get() {
+/* static */
+SameProcessMessageQueue* SameProcessMessageQueue::Get() {
   if (!sSingleton) {
     sSingleton = new SameProcessMessageQueue();
   }
   return sSingleton;
 }
 
 SameProcessMessageQueue::Runnable::Runnable() : mDispatched(false) {}
 
--- a/dom/base/StructuredCloneBlob.cpp
+++ b/dom/base/StructuredCloneBlob.cpp
@@ -22,20 +22,20 @@ StructuredCloneBlob::StructuredCloneBlob
   mHolder.emplace(Holder::CloningSupported, Holder::TransferringNotSupported,
                   Holder::StructuredCloneScope::DifferentProcess);
 }
 
 StructuredCloneBlob::~StructuredCloneBlob() {
   UnregisterWeakMemoryReporter(this);
 }
 
-/* static */ already_AddRefed<StructuredCloneBlob>
-StructuredCloneBlob::Constructor(GlobalObject& aGlobal, JS::HandleValue aValue,
-                                 JS::HandleObject aTargetGlobal,
-                                 ErrorResult& aRv) {
+/* static */
+already_AddRefed<StructuredCloneBlob> StructuredCloneBlob::Constructor(
+    GlobalObject& aGlobal, JS::HandleValue aValue,
+    JS::HandleObject aTargetGlobal, ErrorResult& aRv) {
   JSContext* cx = aGlobal.Context();
 
   RefPtr<StructuredCloneBlob> holder = StructuredCloneBlob::Create();
 
   Maybe<JSAutoRealm> ar;
   JS::RootedValue value(cx, aValue);
 
   if (aTargetGlobal) {
@@ -107,17 +107,18 @@ void StructuredCloneBlob::Deserialize(JS
   }
 
   if (!JS_WrapValue(aCx, aResult)) {
     aResult.set(JS::UndefinedValue());
     aRv.NoteJSContextException(aCx);
   }
 }
 
-/* static */ JSObject* StructuredCloneBlob::ReadStructuredClone(
+/* static */
+JSObject* StructuredCloneBlob::ReadStructuredClone(
     JSContext* aCx, JSStructuredCloneReader* aReader,
     StructuredCloneHolder* aHolder) {
   JS::RootedObject obj(aCx);
   {
     RefPtr<StructuredCloneBlob> holder = StructuredCloneBlob::Create();
 
     if (!holder->mHolder->ReadStructuredCloneInternal(aCx, aReader, aHolder) ||
         !holder->WrapObject(aCx, nullptr, &obj)) {
--- a/dom/base/StructuredCloneHolder.cpp
+++ b/dom/base/StructuredCloneHolder.cpp
@@ -312,17 +312,18 @@ void StructuredCloneHolder::ReadFromBuff
   if (!JS_ReadStructuredClone(aCx, aBuffer, aAlgorithmVersion,
                               mStructuredCloneScope, aValue, &sCallbacks,
                               this)) {
     JS_ClearPendingException(aCx);
     aRv.Throw(NS_ERROR_DOM_DATA_CLONE_ERR);
   }
 }
 
-/* static */ JSObject* StructuredCloneHolder::ReadFullySerializableObjects(
+/* static */
+JSObject* StructuredCloneHolder::ReadFullySerializableObjects(
     JSContext* aCx, JSStructuredCloneReader* aReader, uint32_t aTag) {
   if (aTag == SCTAG_DOM_IMAGEDATA) {
     return ReadStructuredCloneImageData(aCx, aReader);
   }
 
   if (aTag == SCTAG_DOM_WEBCRYPTO_KEY || aTag == SCTAG_DOM_URLSEARCHPARAMS) {
     nsIGlobalObject* global = xpc::CurrentNativeGlobal(aCx);
     if (!global) {
@@ -404,17 +405,18 @@ void StructuredCloneHolder::ReadFromBuff
     return StructuredCloneTester::ReadStructuredClone(aCx, aReader);
   }
 
   // Don't know what this is. Bail.
   xpc::Throw(aCx, NS_ERROR_DOM_DATA_CLONE_ERR);
   return nullptr;
 }
 
-/* static */ bool StructuredCloneHolder::WriteFullySerializableObjects(
+/* static */
+bool StructuredCloneHolder::WriteFullySerializableObjects(
     JSContext* aCx, JSStructuredCloneWriter* aWriter,
     JS::Handle<JSObject*> aObj) {
   JS::Rooted<JSObject*> obj(aCx, aObj);
 
   // See if this is a ImageData object.
   {
     ImageData* imageData = nullptr;
     if (NS_SUCCEEDED(UNWRAP_OBJECT(ImageData, &obj, imageData))) {
--- a/dom/base/StructuredCloneTester.cpp
+++ b/dom/base/StructuredCloneTester.cpp
@@ -28,31 +28,31 @@ NS_INTERFACE_MAP_END
 
 StructuredCloneTester::StructuredCloneTester(nsISupports* aParent,
                                              const bool aSerializable,
                                              const bool aDeserializable)
     : mParent(aParent),
       mSerializable(aSerializable),
       mDeserializable(aDeserializable) {}
 
-/* static */ already_AddRefed<StructuredCloneTester>
-StructuredCloneTester::Constructor(const GlobalObject& aGlobal,
-                                   const bool aSerializable,
-                                   const bool aDeserializable,
-                                   ErrorResult& aRv) {
+/* static */
+already_AddRefed<StructuredCloneTester> StructuredCloneTester::Constructor(
+    const GlobalObject& aGlobal, const bool aSerializable,
+    const bool aDeserializable, ErrorResult& aRv) {
   RefPtr<StructuredCloneTester> sct = new StructuredCloneTester(
       aGlobal.GetAsSupports(), aSerializable, aDeserializable);
   return sct.forget();
 }
 
 bool StructuredCloneTester::Serializable() const { return mSerializable; }
 
 bool StructuredCloneTester::Deserializable() const { return mDeserializable; }
 
-/* static */ JSObject* StructuredCloneTester::ReadStructuredClone(
+/* static */
+JSObject* StructuredCloneTester::ReadStructuredClone(
     JSContext* aCx, JSStructuredCloneReader* aReader) {
   uint32_t serializable = 0;
   uint32_t deserializable = 0;
 
   if (!JS_ReadUint32Pair(aReader, &serializable, &deserializable)) {
     return nullptr;
   }
 
--- a/dom/base/StyleSheetList.cpp
+++ b/dom/base/StyleSheetList.cpp
@@ -18,18 +18,19 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_INTERFACE_MAP_ENTRY(nsIMutationObserver)
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(StyleSheetList)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(StyleSheetList)
 
-/* virtual */ JSObject* StyleSheetList::WrapObject(
-    JSContext* aCx, JS::Handle<JSObject*> aGivenProto) {
+/* virtual */
+JSObject* StyleSheetList::WrapObject(JSContext* aCx,
+                                     JS::Handle<JSObject*> aGivenProto) {
   return StyleSheetList_Binding::Wrap(aCx, this, aGivenProto);
 }
 
 void StyleSheetList::NodeWillBeDestroyed(const nsINode* aNode) {
   mDocumentOrShadowRoot = nullptr;
 }
 
 StyleSheetList::StyleSheetList(DocumentOrShadowRoot& aScope)
--- a/dom/base/TabGroup.cpp
+++ b/dom/base/TabGroup.cpp
@@ -81,33 +81,36 @@ void TabGroup::EnsureThrottledEventQueue
   for (size_t i = 0; i < size_t(TaskCategory::Count); i++) {
     TaskCategory category = static_cast<TaskCategory>(i);
     if (category == TaskCategory::Worker || category == TaskCategory::Timer) {
       mEventTargets[i] = ThrottledEventQueue::Create(mEventTargets[i]);
     }
   }
 }
 
-/* static */ TabGroup* TabGroup::GetChromeTabGroup() {
+/* static */
+TabGroup* TabGroup::GetChromeTabGroup() {
   if (!sChromeTabGroup) {
     sChromeTabGroup = new TabGroup(true /* chrome tab group */);
     ClearOnShutdown(&sChromeTabGroup);
   }
   return sChromeTabGroup;
 }
 
-/* static */ TabGroup* TabGroup::GetFromWindow(mozIDOMWindowProxy* aWindow) {
+/* static */
+TabGroup* TabGroup::GetFromWindow(mozIDOMWindowProxy* aWindow) {
   if (TabChild* tabChild = TabChild::GetFrom(aWindow)) {
     return tabChild->TabGroup();
   }
 
   return nullptr;
 }
 
-/* static */ TabGroup* TabGroup::GetFromActor(TabChild* aTabChild) {
+/* static */
+TabGroup* TabGroup::GetFromActor(TabChild* aTabChild) {
   MOZ_RELEASE_ASSERT(NS_IsMainThread());
 
   // Middleman processes do not assign event targets to their tab children.
   if (recordreplay::IsMiddleman()) {
     return GetChromeTabGroup();
   }
 
   nsCOMPtr<nsIEventTarget> target =
@@ -150,18 +153,19 @@ already_AddRefed<DocGroup> TabGroup::Add
   // Make sure that the hashtable was updated and now contains the correct value
   MOZ_ASSERT(RefPtr<DocGroup>(GetDocGroup(aKey)) == docGroup);
 
   docGroup->mDocuments.AppendElement(aDocument);
 
   return docGroup.forget();
 }
 
-/* static */ already_AddRefed<TabGroup> TabGroup::Join(
-    nsPIDOMWindowOuter* aWindow, TabGroup* aTabGroup) {
+/* static */
+already_AddRefed<TabGroup> TabGroup::Join(nsPIDOMWindowOuter* aWindow,
+                                          TabGroup* aTabGroup) {
   MOZ_ASSERT(NS_IsMainThread());
   RefPtr<TabGroup> tabGroup = aTabGroup;
   if (!tabGroup) {
     tabGroup = new TabGroup();
   }
   MOZ_RELEASE_ASSERT(!tabGroup->mLastWindowLeft);
   MOZ_ASSERT(!tabGroup->mWindows.Contains(aWindow));
   tabGroup->mWindows.AppendElement(aWindow);
@@ -304,17 +308,18 @@ uint32_t TabGroup::Count(bool aActiveOnl
     if (iter.Get()->mDocGroup->IsActive()) {
       ++count;
     }
   }
 
   return count;
 }
 
-/*static*/ bool TabGroup::HasOnlyThrottableTabs() {
+/*static*/
+bool TabGroup::HasOnlyThrottableTabs() {
   if (!sTabGroups) {
     return false;
   }
 
   for (TabGroup* tabGroup = sTabGroups->getFirst(); tabGroup;
        tabGroup =
            static_cast<LinkedListElement<TabGroup>*>(tabGroup)->getNext()) {
     for (auto iter = tabGroup->Iter(); !iter.Done(); iter.Next()) {
--- a/dom/base/Text.cpp
+++ b/dom/base/Text.cpp
@@ -115,18 +115,20 @@ void Text::GetWholeText(nsAString& aWhol
 
     nsIContent* next = first->GetNextSibling();
     MOZ_ASSERT(next && next->IsText(),
                "How did we run out of text before hitting `last`?");
     first = static_cast<Text*>(next);
   }
 }
 
-/* static */ already_AddRefed<Text> Text::Constructor(
-    const GlobalObject& aGlobal, const nsAString& aData, ErrorResult& aRv) {
+/* static */
+already_AddRefed<Text> Text::Constructor(const GlobalObject& aGlobal,
+                                         const nsAString& aData,
+                                         ErrorResult& aRv) {
   nsCOMPtr<nsPIDOMWindowInner> window =
       do_QueryInterface(aGlobal.GetAsSupports());
   if (!window || !window->GetDoc()) {
     aRv.Throw(NS_ERROR_FAILURE);
     return nullptr;
   }
 
   return window->GetDoc()->CreateTextNode(aData);
--- a/dom/base/WindowOrientationObserver.cpp
+++ b/dom/base/WindowOrientationObserver.cpp
@@ -37,16 +37,17 @@ void WindowOrientationObserver::Notify(
   uint16_t currentAngle = aConfiguration.angle();
   if (mAngle != currentAngle && mWindow->AsInner()->IsCurrentInnerWindow()) {
     mAngle = currentAngle;
     mWindow->GetOuterWindow()->DispatchCustomEvent(
         NS_LITERAL_STRING("orientationchange"));
   }
 }
 
-/* static */ int16_t WindowOrientationObserver::OrientationAngle() {
+/* static */
+int16_t WindowOrientationObserver::OrientationAngle() {
   hal::ScreenConfiguration config;
   hal::GetCurrentScreenConfiguration(&config);
   int16_t angle = static_cast<int16_t>(config.angle());
   // config.angle() returns 0, 90, 180 or 270.
   // window.orientation returns -90, 0, 90 or 180.
   return angle <= 180 ? angle : angle - 360;
 }
--- a/dom/base/nsAttrValue.cpp
+++ b/dom/base/nsAttrValue.cpp
@@ -29,29 +29,31 @@
 #include "mozilla/dom/Document.h"
 #include <algorithm>
 
 using namespace mozilla;
 
 #define MISC_STR_PTR(_cont) \
   reinterpret_cast<void*>((_cont)->mStringBits & NS_ATTRVALUE_POINTERVALUE_MASK)
 
-/* static */ MiscContainer* nsAttrValue::AllocMiscContainer() {
+/* static */
+MiscContainer* nsAttrValue::AllocMiscContainer() {
   MOZ_ASSERT(NS_IsMainThread());
   MiscContainer* cont = nullptr;
   Swap(cont, sMiscContainerCache);
 
   if (cont) {
     return new (cont) MiscContainer;
   }
 
   return new MiscContainer;
 }
 
-/* static */ void nsAttrValue::DeallocMiscContainer(MiscContainer* aCont) {
+/* static */
+void nsAttrValue::DeallocMiscContainer(MiscContainer* aCont) {
   MOZ_ASSERT(NS_IsMainThread());
   if (!aCont) {
     return;
   }
 
   if (!sMiscContainerCache) {
     aCont->~MiscContainer();
     sMiscContainerCache = aCont;
--- a/dom/base/nsContentPermissionHelper.cpp
+++ b/dom/base/nsContentPermissionHelper.cpp
@@ -235,28 +235,30 @@ ContentPermissionType::GetOptions(nsIArr
   }
 
   options.forget(aOptions);
   return NS_OK;
 }
 
 // nsContentPermissionUtils
 
-/* static */ uint32_t nsContentPermissionUtils::ConvertPermissionRequestToArray(
+/* static */
+uint32_t nsContentPermissionUtils::ConvertPermissionRequestToArray(
     nsTArray<PermissionRequest>& aSrcArray, nsIMutableArray* aDesArray) {
   uint32_t len = aSrcArray.Length();
   for (uint32_t i = 0; i < len; i++) {
     RefPtr<ContentPermissionType> cpt =
         new ContentPermissionType(aSrcArray[i].type(), aSrcArray[i].options());
     aDesArray->AppendElement(cpt);
   }
   return len;
 }
 
-/* static */ uint32_t nsContentPermissionUtils::ConvertArrayToPermissionRequest(
+/* static */
+uint32_t nsContentPermissionUtils::ConvertArrayToPermissionRequest(
     nsIArray* aSrcArray, nsTArray<PermissionRequest>& aDesArray) {
   uint32_t len = 0;
   aSrcArray->GetLength(&len);
   for (uint32_t i = 0; i < len; i++) {
     nsCOMPtr<nsIContentPermissionType> cpt = do_QueryElementAt(aSrcArray, i);
     nsAutoCString type;
     cpt->GetType(type);
 
@@ -293,42 +295,45 @@ ContentPermissionRequestParentMap() {
 static std::map<PContentPermissionRequestChild*, TabId>&
 ContentPermissionRequestChildMap() {
   MOZ_ASSERT(NS_IsMainThread());
   static std::map<PContentPermissionRequestChild*, TabId>
       sPermissionRequestChildMap;
   return sPermissionRequestChildMap;
 }
 
-/* static */ nsresult nsContentPermissionUtils::CreatePermissionArray(
+/* static */
+nsresult nsContentPermissionUtils::CreatePermissionArray(
     const nsACString& aType, const nsTArray<nsString>& aOptions,
     nsIArray** aTypesArray) {
   nsCOMPtr<nsIMutableArray> types = do_CreateInstance(NS_ARRAY_CONTRACTID);
   RefPtr<ContentPermissionType> permType =
       new ContentPermissionType(aType, aOptions);
   types->AppendElement(permType);
   types.forget(aTypesArray);
 
   return NS_OK;
 }
 
-/* static */ PContentPermissionRequestParent*
+/* static */
+PContentPermissionRequestParent*
 nsContentPermissionUtils::CreateContentPermissionRequestParent(
     const nsTArray<PermissionRequest>& aRequests, Element* aElement,
     const IPC::Principal& aPrincipal, const IPC::Principal& aTopLevelPrincipal,
     const bool aIsHandlingUserInput, const TabId& aTabId) {
   PContentPermissionRequestParent* parent = new ContentPermissionRequestParent(
       aRequests, aElement, aPrincipal, aTopLevelPrincipal,
       aIsHandlingUserInput);
   ContentPermissionRequestParentMap()[parent] = aTabId;
 
   return parent;
 }
 
-/* static */ nsresult nsContentPermissionUtils::AskPermission(
+/* static */
+nsresult nsContentPermissionUtils::AskPermission(
     nsIContentPermissionRequest* aRequest, nsPIDOMWindowInner* aWindow) {
   NS_ENSURE_STATE(aWindow && aWindow->IsCurrentInnerWindow());
 
   // for content process
   if (XRE_IsContentProcess()) {
     RefPtr<RemotePermissionRequest> req =
         new RemotePermissionRequest(aRequest, aWindow);
 
@@ -376,53 +381,55 @@ nsContentPermissionUtils::CreateContentP
   if (prompt) {
     if (NS_FAILED(prompt->Prompt(aRequest))) {
       return NS_ERROR_FAILURE;
     }
   }
   return NS_OK;
 }
 
-/* static */ nsTArray<PContentPermissionRequestParent*>
+/* static */
+nsTArray<PContentPermissionRequestParent*>
 nsContentPermissionUtils::GetContentPermissionRequestParentById(
     const TabId& aTabId) {
   nsTArray<PContentPermissionRequestParent*> parentArray;
   for (auto& it : ContentPermissionRequestParentMap()) {
     if (it.second == aTabId) {
       parentArray.AppendElement(it.first);
     }
   }
 
   return parentArray;
 }
 
-/* static */ void
-nsContentPermissionUtils::NotifyRemoveContentPermissionRequestParent(
+/* static */
+void nsContentPermissionUtils::NotifyRemoveContentPermissionRequestParent(
     PContentPermissionRequestParent* aParent) {
   auto it = ContentPermissionRequestParentMap().find(aParent);
   MOZ_ASSERT(it != ContentPermissionRequestParentMap().end());
 
   ContentPermissionRequestParentMap().erase(it);
 }
 
-/* static */ nsTArray<PContentPermissionRequestChild*>
+/* static */
+nsTArray<PContentPermissionRequestChild*>
 nsContentPermissionUtils::GetContentPermissionRequestChildById(
     const TabId& aTabId) {
   nsTArray<PContentPermissionRequestChild*> childArray;
   for (auto& it : ContentPermissionRequestChildMap()) {
     if (it.second == aTabId) {
       childArray.AppendElement(it.first);
     }
   }
 
   return childArray;
 }
 
-/* static */ void
-nsContentPermissionUtils::NotifyRemoveContentPermissionRequestChild(
+/* static */
+void nsContentPermissionUtils::NotifyRemoveContentPermissionRequestChild(
     PContentPermissionRequestChild* aChild) {
   auto it = ContentPermissionRequestChildMap().find(aChild);
   MOZ_ASSERT(it != ContentPermissionRequestChildMap().end());
 
   ContentPermissionRequestChildMap().erase(it);
 }
 
 NS_IMPL_ISUPPORTS(nsContentPermissionRequester, nsIContentPermissionRequester)
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
@@ -2724,19 +2724,20 @@ static inline void KeyAppendInt(int32_t 
 
 static inline bool IsAutocompleteOff(const nsIContent* aContent) {
   return aContent->IsElement() &&
          aContent->AsElement()->AttrValueIs(
              kNameSpaceID_None, nsGkAtoms::autocomplete,
              NS_LITERAL_STRING("off"), eIgnoreCase);
 }
 
-/*static*/ nsresult nsContentUtils::GenerateStateKey(nsIContent* aContent,
-                                                     Document* aDocument,
-                                                     nsACString& aKey) {
+/*static*/
+nsresult nsContentUtils::GenerateStateKey(nsIContent* aContent,
+                                          Document* aDocument,
+                                          nsACString& aKey) {
   aKey.Truncate();
 
   uint32_t partID = aDocument ? aDocument->GetPartID() : 0;
 
   // We must have content if we're not using a special state id
   NS_ENSURE_TRUE(aContent, NS_ERROR_FAILURE);
 
   // Don't capture state for anonymous content
@@ -3615,17 +3616,18 @@ static const char gPropertiesFiles[nsCon
     "chrome://global/locale/layout/htmlparser.properties",
     "chrome://global/locale/svg/svg.properties",
     "chrome://branding/locale/brand.properties",
     "chrome://global/locale/commonDialogs.properties",
     "chrome://global/locale/mathml/mathml.properties",
     "chrome://global/locale/security/security.properties",
     "chrome://necko/locale/necko.properties"};
 
-/* static */ nsresult nsContentUtils::EnsureStringBundle(PropertiesFile aFile) {
+/* static */
+nsresult nsContentUtils::EnsureStringBundle(PropertiesFile aFile) {
   if (!sStringBundles[aFile]) {
     if (!sStringBundleService) {
       nsresult rv =
           CallGetService(NS_STRINGBUNDLE_CONTRACTID, &sStringBundleService);
       NS_ENSURE_SUCCESS(rv, rv);
     }
     nsIStringBundle* bundle;
     nsresult rv =
@@ -3706,34 +3708,36 @@ nsresult nsContentUtils::FormatLocalized
     for (uint32_t i = 0; i < paramsLength; ++i) {
       params[i] = aParamArray[i].get();
     }
   }
   return FormatLocalizedString(aFile, aKey, params.get(), paramsLength,
                                aResult);
 }
 
-/* static */ void nsContentUtils::LogSimpleConsoleError(
-    const nsAString& aErrorText, const char* classification,
-    bool aFromPrivateWindow) {
+/* static */
+void nsContentUtils::LogSimpleConsoleError(const nsAString& aErrorText,
+                                           const char* classification,
+                                           bool aFromPrivateWindow) {
   nsCOMPtr<nsIScriptError> scriptError =
       do_CreateInstance(NS_SCRIPTERROR_CONTRACTID);
   if (scriptError) {
     nsCOMPtr<nsIConsoleService> console =
         do_GetService(NS_CONSOLESERVICE_CONTRACTID);
     if (console &&
         NS_SUCCEEDED(scriptError->Init(aErrorText, EmptyString(), EmptyString(),
                                        0, 0, nsIScriptError::errorFlag,
                                        classification, aFromPrivateWindow))) {
       console->LogMessage(scriptError);
     }
   }
 }
 
-/* static */ nsresult nsContentUtils::ReportToConsole(
+/* static */
+nsresult nsContentUtils::ReportToConsole(
     uint32_t aErrorFlags, const nsACString& aCategory,
     const Document* aDocument, PropertiesFile aFile, const char* aMessageName,
     const char16_t** aParams, uint32_t aParamsLength, nsIURI* aURI,
     const nsString& aSourceLine, uint32_t aLineNumber, uint32_t aColumnNumber) {
   NS_ASSERTION((aParams && aParamsLength) || (!aParams && !aParamsLength),
                "Supply either both parameters and their number or no"
                "parameters and 0.");
 
@@ -3747,23 +3751,24 @@ nsresult nsContentUtils::FormatLocalized
   }
   NS_ENSURE_SUCCESS(rv, rv);
 
   return ReportToConsoleNonLocalized(errorText, aErrorFlags, aCategory,
                                      aDocument, aURI, aSourceLine, aLineNumber,
                                      aColumnNumber);
 }
 
-/* static */ void nsContentUtils::ReportEmptyGetElementByIdArg(
-    const Document* aDoc) {
+/* static */
+void nsContentUtils::ReportEmptyGetElementByIdArg(const Document* aDoc) {
   ReportToConsole(nsIScriptError::warningFlag, NS_LITERAL_CSTRING("DOM"), aDoc,
                   nsContentUtils::eDOM_PROPERTIES, "EmptyGetElementByIdParam");
 }
 
-/* static */ nsresult nsContentUtils::ReportToConsoleNonLocalized(
+/* static */
+nsresult nsContentUtils::ReportToConsoleNonLocalized(
     const nsAString& aErrorText, uint32_t aErrorFlags,
     const nsACString& aCategory, const Document* aDocument, nsIURI* aURI,
     const nsString& aSourceLine, uint32_t aLineNumber, uint32_t aColumnNumber,
     MissingErrorLocationMode aLocationMode) {
   uint64_t innerWindowID = 0;
   if (aDocument) {
     if (!aURI) {
       aURI = aDocument->GetDocumentURI();
@@ -3771,17 +3776,18 @@ nsresult nsContentUtils::FormatLocalized
     innerWindowID = aDocument->InnerWindowID();
   }
 
   return ReportToConsoleByWindowID(aErrorText, aErrorFlags, aCategory,
                                    innerWindowID, aURI, aSourceLine,
                                    aLineNumber, aColumnNumber, aLocationMode);
 }
 
-/* static */ nsresult nsContentUtils::ReportToConsoleByWindowID(
+/* static */
+nsresult nsContentUtils::ReportToConsoleByWindowID(
     const nsAString& aErrorText, uint32_t aErrorFlags,
     const nsACString& aCategory, uint64_t aInnerWindowID, nsIURI* aURI,
     const nsString& aSourceLine, uint32_t aLineNumber, uint32_t aColumnNumber,
     MissingErrorLocationMode aLocationMode) {
   nsresult rv;
   if (!sConsoleService) {  // only need to bother null-checking here
     rv = CallGetService(NS_CONSOLESERVICE_CONTRACTID, &sConsoleService);
     NS_ENSURE_SUCCESS(rv, rv);
@@ -5052,17 +5058,18 @@ bool nsContentUtils::IsInInteractiveHTML
   return false;
 }
 
 /* static */
 void nsContentUtils::NotifyInstalledMenuKeyboardListener(bool aInstalling) {
   IMEStateManager::OnInstalledMenuKeyboardListener(aInstalling);
 }
 
-/* static */ bool nsContentUtils::SchemeIs(nsIURI* aURI, const char* aScheme) {
+/* static */
+bool nsContentUtils::SchemeIs(nsIURI* aURI, const char* aScheme) {
   nsCOMPtr<nsIURI> baseURI = NS_GetInnermostURI(aURI);
   NS_ENSURE_TRUE(baseURI, false);
 
   bool isScheme = false;
   return NS_SUCCEEDED(baseURI->SchemeIs(aScheme, &isScheme)) && isScheme;
 }
 
 bool nsContentUtils::IsSystemPrincipal(nsIPrincipal* aPrincipal) {
@@ -6000,20 +6007,22 @@ bool nsContentUtils::CheckMayLoad(nsIPri
       aPrincipal->CheckMayLoad(channelURI, false, aAllowIfInheritsPrincipal));
 }
 
 /* static */
 bool nsContentUtils::CanAccessNativeAnon() {
   return LegacyIsCallerChromeOrNativeCode() || IsCallerContentXBL();
 }
 
-/* static */ nsresult nsContentUtils::DispatchXULCommand(
-    nsIContent* aTarget, bool aTrusted, Event* aSourceEvent,
-    nsIPresShell* aShell, bool aCtrl, bool aAlt, bool aShift, bool aMeta,
-    uint16_t aInputSource) {
+/* static */
+nsresult nsContentUtils::DispatchXULCommand(nsIContent* aTarget, bool aTrusted,
+                                            Event* aSourceEvent,
+                                            nsIPresShell* aShell, bool aCtrl,
+                                            bool aAlt, bool aShift, bool aMeta,
+                                            uint16_t aInputSource) {
   NS_ENSURE_STATE(aTarget);
   Document* doc = aTarget->OwnerDoc();
   nsPresContext* presContext = doc->GetPresContext();
 
   RefPtr<XULCommandEvent> xulCommand =
       new XULCommandEvent(doc, presContext, nullptr);
   xulCommand->InitCommandEvent(NS_LITERAL_STRING("command"), true, true,
                                nsGlobalWindowInner::Cast(doc->GetInnerWindow()),
@@ -9140,18 +9149,19 @@ bool nsContentUtils::IsSpecificAboutPage
   }
 
   // Now check the spec itself
   nsAutoCString spec;
   uri->GetSpecIgnoringRef(spec);
   return spec.EqualsASCII(aUri);
 }
 
-/* static */ void nsContentUtils::SetScrollbarsVisibility(
-    nsIDocShell* aDocShell, bool aVisible) {
+/* static */
+void nsContentUtils::SetScrollbarsVisibility(nsIDocShell* aDocShell,
+                                             bool aVisible) {
   nsCOMPtr<nsIScrollable> scroller = do_QueryInterface(aDocShell);
 
   if (scroller) {
     int32_t prefValue;
 
     if (aVisible) {
       prefValue = nsIScrollable::Scrollbar_Auto;
     } else {
@@ -9160,18 +9170,19 @@ bool nsContentUtils::IsSpecificAboutPage
 
     scroller->SetDefaultScrollbarPreferences(nsIScrollable::ScrollOrientation_Y,
                                              prefValue);
     scroller->SetDefaultScrollbarPreferences(nsIScrollable::ScrollOrientation_X,
                                              prefValue);
   }
 }
 
-/* static */ void nsContentUtils::GetPresentationURL(
-    nsIDocShell* aDocShell, nsAString& aPresentationUrl) {
+/* static */
+void nsContentUtils::GetPresentationURL(nsIDocShell* aDocShell,
+                                        nsAString& aPresentationUrl) {
   MOZ_ASSERT(aDocShell);
 
   // Simulate receiver context for web platform test
   if (Preferences::GetBool("dom.presentation.testing.simulate-receiver")) {
     RefPtr<Document> doc;
 
     nsCOMPtr<nsPIDOMWindowOuter> docShellWin =
         do_QueryInterface(aDocShell->GetScriptGlobalObject());
@@ -9216,18 +9227,18 @@ bool nsContentUtils::IsSpecificAboutPage
   if (!topFrameElt) {
     return;
   }
 
   topFrameElt->GetAttribute(NS_LITERAL_STRING("mozpresentation"),
                             aPresentationUrl);
 }
 
-/* static */ nsIDocShell* nsContentUtils::GetDocShellForEventTarget(
-    EventTarget* aTarget) {
+/* static */
+nsIDocShell* nsContentUtils::GetDocShellForEventTarget(EventTarget* aTarget) {
   nsCOMPtr<nsPIDOMWindowInner> innerWindow;
 
   if (nsCOMPtr<nsINode> node = do_QueryInterface(aTarget)) {
     bool ignore;
     innerWindow =
         do_QueryInterface(node->OwnerDoc()->GetScriptHandlingObject(ignore));
   } else if ((innerWindow = do_QueryInterface(aTarget))) {
     // Nothing else to do
@@ -9275,17 +9286,18 @@ bool nsContentUtils::IsSpecificAboutPage
  * sandboxing is limited to the immediate sandbox.  In the case that aDocument
  * should inherit its origin (e.g. data: URI) but its parent has ended up
  * with a unique origin due to sandboxing further up the parent chain we may
  * end up returning false when we would ideally return true (since we will
  * examine the parent's origin for 'https' and not finding it.)  This means
  * that we may restrict the privileges of some pages unnecessarily in this
  * edge case.
  */
-/* static */ bool nsContentUtils::HttpsStateIsModern(Document* aDocument) {
+/* static */
+bool nsContentUtils::HttpsStateIsModern(Document* aDocument) {
   if (!aDocument) {
     return false;
   }
 
   nsCOMPtr<nsIPrincipal> principal = aDocument->NodePrincipal();
 
   if (principal->IsSystemPrincipal()) {
     return true;
@@ -9334,17 +9346,18 @@ bool nsContentUtils::IsSpecificAboutPage
     if (isTrustworthyOrigin) {
       return true;
     }
   }
 
   return false;
 }
 
-/* static */ void nsContentUtils::TryToUpgradeElement(Element* aElement) {
+/* static */
+void nsContentUtils::TryToUpgradeElement(Element* aElement) {
   NodeInfo* nodeInfo = aElement->NodeInfo();
   RefPtr<nsAtom> typeAtom =
       aElement->GetCustomElementData()->GetCustomElementType();
 
   MOZ_ASSERT(nodeInfo->NameAtom()->Equals(nodeInfo->LocalName()));
   CustomElementDefinition* definition =
       nsContentUtils::LookupCustomElementDefinition(
           nodeInfo->GetDocument(), nodeInfo->NameAtom(),
@@ -9389,17 +9402,18 @@ static void DoCustomElementCreate(Elemen
       element->NodeInfo()->NameAtom() != localName) {
     aRv.Throw(NS_ERROR_DOM_NOT_SUPPORTED_ERR);
     return;
   }
 
   element.forget(aElement);
 }
 
-/* static */ nsresult nsContentUtils::NewXULOrHTMLElement(
+/* static */
+nsresult nsContentUtils::NewXULOrHTMLElement(
     Element** aResult, mozilla::dom::NodeInfo* aNodeInfo,
     FromParser aFromParser, nsAtom* aIsAtom,
     mozilla::dom::CustomElementDefinition* aDefinition) {
   RefPtr<mozilla::dom::NodeInfo> nodeInfo = aNodeInfo;
   MOZ_ASSERT(nodeInfo->NamespaceEquals(kNameSpaceID_XHTML) ||
                  nodeInfo->NamespaceEquals(kNameSpaceID_XUL),
              "Can only create XUL or XHTML elements.");
 
@@ -9587,99 +9601,103 @@ CustomElementRegistry* nsContentUtils::G
   nsPIDOMWindowInner* window = aDoc->GetInnerWindow();
   if (!window) {
     return nullptr;
   }
 
   return window->CustomElements();
 }
 
-/* static */ CustomElementDefinition*
-nsContentUtils::LookupCustomElementDefinition(Document* aDoc, nsAtom* aNameAtom,
-                                              uint32_t aNameSpaceID,
-                                              nsAtom* aTypeAtom) {
+/* static */
+CustomElementDefinition* nsContentUtils::LookupCustomElementDefinition(
+    Document* aDoc, nsAtom* aNameAtom, uint32_t aNameSpaceID,
+    nsAtom* aTypeAtom) {
   if (aNameSpaceID != kNameSpaceID_XUL && aNameSpaceID != kNameSpaceID_XHTML) {
     return nullptr;
   }
 
   RefPtr<CustomElementRegistry> registry = GetCustomElementRegistry(aDoc);
   if (!registry) {
     return nullptr;
   }
 
   return registry->LookupCustomElementDefinition(aNameAtom, aNameSpaceID,
                                                  aTypeAtom);
 }
 
-/* static */ void nsContentUtils::RegisterCallbackUpgradeElement(
-    Element* aElement, nsAtom* aTypeName) {
+/* static */
+void nsContentUtils::RegisterCallbackUpgradeElement(Element* aElement,
+                                                    nsAtom* aTypeName) {
   MOZ_ASSERT(aElement);
 
   Document* doc = aElement->OwnerDoc();
   CustomElementRegistry* registry = GetCustomElementRegistry(doc);
   if (registry) {
     registry->RegisterCallbackUpgradeElement(aElement, aTypeName);
   }
 }
 
-/* static */ void nsContentUtils::RegisterUnresolvedElement(Element* aElement,
-                                                            nsAtom* aTypeName) {
+/* static */
+void nsContentUtils::RegisterUnresolvedElement(Element* aElement,
+                                               nsAtom* aTypeName) {
   MOZ_ASSERT(aElement);
 
   Document* doc = aElement->OwnerDoc();
   CustomElementRegistry* registry = GetCustomElementRegistry(doc);
   if (registry) {
     registry->RegisterUnresolvedElement(aElement, aTypeName);
   }
 }
 
-/* static */ void nsContentUtils::UnregisterUnresolvedElement(
-    Element* aElement) {
+/* static */
+void nsContentUtils::UnregisterUnresolvedElement(Element* aElement) {
   MOZ_ASSERT(aElement);
 
   nsAtom* typeAtom = aElement->GetCustomElementData()->GetCustomElementType();
   Document* doc = aElement->OwnerDoc();
   CustomElementRegistry* registry = GetCustomElementRegistry(doc);
   if (registry) {
     registry->UnregisterUnresolvedElement(aElement, typeAtom);
   }
 }
 
-/* static */ void nsContentUtils::EnqueueUpgradeReaction(
+/* static */
+void nsContentUtils::EnqueueUpgradeReaction(
     Element* aElement, CustomElementDefinition* aDefinition) {
   MOZ_ASSERT(aElement);
 
   Document* doc = aElement->OwnerDoc();
 
   // No DocGroup means no custom element reactions stack.
   if (!doc->GetDocGroup()) {
     return;
   }
 
   CustomElementReactionsStack* stack =
       doc->GetDocGroup()->CustomElementReactionsStack();
   stack->EnqueueUpgradeReaction(aElement, aDefinition);
 }
 
-/* static */ void nsContentUtils::EnqueueLifecycleCallback(
+/* static */
+void nsContentUtils::EnqueueLifecycleCallback(
     Document::ElementCallbackType aType, Element* aCustomElement,
     LifecycleCallbackArgs* aArgs,
     LifecycleAdoptedCallbackArgs* aAdoptedCallbackArgs,
     CustomElementDefinition* aDefinition) {
   // No DocGroup means no custom element reactions stack.
   if (!aCustomElement->OwnerDoc()->GetDocGroup()) {
     return;
   }
 
   CustomElementRegistry::EnqueueLifecycleCallback(
       aType, aCustomElement, aArgs, aAdoptedCallbackArgs, aDefinition);
 }
 
-/* static */ bool nsContentUtils::AttemptLargeAllocationLoad(
-    nsIHttpChannel* aChannel) {
+/* static */
+bool nsContentUtils::AttemptLargeAllocationLoad(nsIHttpChannel* aChannel) {
   MOZ_ASSERT(aChannel);
 
   nsCOMPtr<nsILoadGroup> loadGroup;
   nsresult rv = aChannel->GetLoadGroup(getter_AddRefs(loadGroup));
   if (NS_WARN_IF(NS_FAILED(rv) || !loadGroup)) {
     return false;
   }
 
@@ -9820,17 +9838,18 @@ nsContentUtils::LookupCustomElementDefin
   bool reloadSucceeded = false;
   rv = wbc3->ReloadInFreshProcess(docShell, uri, referrer, triggeringPrincipal,
                                   webnavLoadFlags, csp, &reloadSucceeded);
   NS_ENSURE_SUCCESS(rv, false);
 
   return reloadSucceeded;
 }
 
-/* static */ void nsContentUtils::AppendDocumentLevelNativeAnonymousContentTo(
+/* static */
+void nsContentUtils::AppendDocumentLevelNativeAnonymousContentTo(
     Document* aDocument, nsTArray<nsIContent*>& aElements) {
   MOZ_ASSERT(aDocument);
 #ifdef DEBUG
   size_t oldLength = aElements.Length();
 #endif
 
   if (nsIPresShell* presShell = aDocument->GetShell()) {
     if (nsIFrame* scrollFrame = presShell->GetRootScrollFrame()) {
@@ -9860,18 +9879,20 @@ nsContentUtils::LookupCustomElementDefin
 static void AppendNativeAnonymousChildrenFromFrame(nsIFrame* aFrame,
                                                    nsTArray<nsIContent*>& aKids,
                                                    uint32_t aFlags) {
   if (nsIAnonymousContentCreator* ac = do_QueryFrame(aFrame)) {
     ac->AppendAnonymousContentTo(aKids, aFlags);
   }
 }
 
-/* static */ void nsContentUtils::AppendNativeAnonymousChildren(
-    const nsIContent* aContent, nsTArray<nsIContent*>& aKids, uint32_t aFlags) {
+/* static */
+void nsContentUtils::AppendNativeAnonymousChildren(const nsIContent* aContent,
+                                                   nsTArray<nsIContent*>& aKids,
+                                                   uint32_t aFlags) {
   if (aContent->MayHaveAnonymousChildren()) {
     if (nsIFrame* primaryFrame = aContent->GetPrimaryFrame()) {
       // NAC created by the element's primary frame.
       AppendNativeAnonymousChildrenFromFrame(primaryFrame, aKids, aFlags);
 
       // NAC created by any other non-primary frames for the element.
       AutoTArray<nsIFrame::OwnedAnonBox, 8> ownedAnonBoxes;
       primaryFrame->AppendOwnedAnonBoxes(ownedAnonBoxes);
@@ -9892,17 +9913,18 @@ static void AppendNativeAnonymousChildre
   // The root scroll frame is not the primary frame of the root element.
   // Detect and handle this case.
   if (!(aFlags & nsIContent::eSkipDocumentLevelNativeAnonymousContent) &&
       aContent == aContent->OwnerDoc()->GetRootElement()) {
     AppendDocumentLevelNativeAnonymousContentTo(aContent->OwnerDoc(), aKids);
   }
 }
 
-/* static */ bool nsContentUtils::QueryTriggeringPrincipal(
+/* static */
+bool nsContentUtils::QueryTriggeringPrincipal(
     nsIContent* aLoadingNode, nsIPrincipal* aDefaultPrincipal,
     nsIPrincipal** aTriggeringPrincipal) {
   MOZ_ASSERT(aLoadingNode);
   MOZ_ASSERT(aTriggeringPrincipal);
 
   bool result = false;
   nsCOMPtr<nsIPrincipal> loadingPrincipal = aDefaultPrincipal;
   if (!loadingPrincipal) {
@@ -9938,17 +9960,18 @@ static void AppendNativeAnonymousChildre
   } else {
     // Fallback if the deserialization is failed.
     loadingPrincipal.forget(aTriggeringPrincipal);
   }
 
   return result;
 }
 
-/* static */ void nsContentUtils::GetContentPolicyTypeForUIImageLoading(
+/* static */
+void nsContentUtils::GetContentPolicyTypeForUIImageLoading(
     nsIContent* aLoadingNode, nsIPrincipal** aTriggeringPrincipal,
     nsContentPolicyType& aContentPolicyType, uint64_t* aRequestContextID) {
   MOZ_ASSERT(aRequestContextID);
 
   bool result = QueryTriggeringPrincipal(aLoadingNode, aTriggeringPrincipal);
   if (result) {
     // Set the content policy type to TYPE_INTERNAL_IMAGE_FAVICON for
     // indicating it's a favicon loading.
@@ -9962,17 +9985,18 @@ static void AppendNativeAnonymousChildre
     nsresult rv;
     int64_t val = requestContextID.ToInteger64(&rv);
     *aRequestContextID = NS_SUCCEEDED(rv) ? val : 0;
   } else {
     aContentPolicyType = nsIContentPolicy::TYPE_INTERNAL_IMAGE;
   }
 }
 
-/* static */ nsresult nsContentUtils::CreateJSValueFromSequenceOfObject(
+/* static */
+nsresult nsContentUtils::CreateJSValueFromSequenceOfObject(
     JSContext* aCx, const Sequence<JSObject*>& aTransfer,
     JS::MutableHandle<JS::Value> aValue) {
   if (aTransfer.IsEmpty()) {
     return NS_OK;
   }
 
   JS::Rooted<JSObject*> array(aCx, JS_NewArrayObject(aCx, aTransfer.Length()));
   if (!array) {
@@ -10098,17 +10122,18 @@ already_AddRefed<nsIPluginTag> nsContent
   pluginHost->GetPluginTagForType(
       aMIMEType,
       aNoFakePlugin ? nsPluginHost::eExcludeFake : nsPluginHost::eExcludeNone,
       getter_AddRefs(tag));
 
   return tag.forget();
 }
 
-/* static */ uint32_t nsContentUtils::HtmlObjectContentTypeForMIMEType(
+/* static */
+uint32_t nsContentUtils::HtmlObjectContentTypeForMIMEType(
     const nsCString& aMIMEType, bool aNoFakePlugin, nsIContent* aContent) {
   if (aMIMEType.IsEmpty()) {
     return nsIObjectLoadingContent::TYPE_NULL;
   }
 
   if (imgLoader::SupportImageWithMimeType(aMIMEType.get())) {
     return nsIObjectLoadingContent::TYPE_IMAGE;
   }
@@ -10135,19 +10160,19 @@ already_AddRefed<nsIPluginTag> nsContent
       // ShouldPlay will handle checking for disabled plugins
       return nsIObjectLoadingContent::TYPE_PLUGIN;
     }
   }
 
   return nsIObjectLoadingContent::TYPE_NULL;
 }
 
-/* static */ already_AddRefed<nsISerialEventTarget>
-nsContentUtils::GetEventTargetByLoadInfo(nsILoadInfo* aLoadInfo,
-                                         TaskCategory aCategory) {
+/* static */
+already_AddRefed<nsISerialEventTarget> nsContentUtils::GetEventTargetByLoadInfo(
+    nsILoadInfo* aLoadInfo, TaskCategory aCategory) {
   if (NS_WARN_IF(!aLoadInfo)) {
     return nullptr;
   }
 
   RefPtr<Document> doc;
   aLoadInfo->GetLoadingDocument(getter_AddRefs(doc));
   nsCOMPtr<nsISerialEventTarget> target;
   if (doc) {
@@ -10170,17 +10195,18 @@ nsContentUtils::GetEventTargetByLoadInfo
     }
 
     target = window->TabGroup()->EventTargetFor(aCategory);
   }
 
   return target.forget();
 }
 
-/* static */ bool nsContentUtils::IsLocalRefURL(const nsString& aString) {
+/* static */
+bool nsContentUtils::IsLocalRefURL(const nsString& aString) {
   return !aString.IsEmpty() && aString[0] == '#';
 }
 
 static const uint64_t kIdProcessBits = 32;
 static const uint64_t kIdBits = 64 - kIdProcessBits;
 
 /* static */ uint64_t GenerateProcessSpecificId(uint64_t aId) {
   uint64_t processId = 0;
@@ -10203,44 +10229,48 @@ static const uint64_t kIdBits = 64 - kId
   }
 
   return (processBits << kIdBits) | bits;
 }
 
 // Tab ID is composed in a similar manner of Window ID.
 static uint64_t gNextTabId = 0;
 
-/* static */ uint64_t nsContentUtils::GenerateTabId() {
+/* static */
+uint64_t nsContentUtils::GenerateTabId() {
   return GenerateProcessSpecificId(++gNextTabId);
 }
 
 // Browsing context ID is composed in a similar manner of Window ID.
 static uint64_t gNextBrowsingContextId = 0;
 
-/* static */ uint64_t nsContentUtils::GenerateBrowsingContextId() {
+/* static */
+uint64_t nsContentUtils::GenerateBrowsingContextId() {
   return GenerateProcessSpecificId(++gNextBrowsingContextId);
 }
 
-/* static */ bool nsContentUtils::GetUserIsInteracting() {
+/* static */
+bool nsContentUtils::GetUserIsInteracting() {
   return UserInteractionObserver::sUserActive;
 }
 
-/* static */ bool nsContentUtils::GetSourceMapURL(nsIHttpChannel* aChannel,
-                                                  nsACString& aResult) {
+/* static */
+bool nsContentUtils::GetSourceMapURL(nsIHttpChannel* aChannel,
+                                     nsACString& aResult) {
   nsresult rv =
       aChannel->GetResponseHeader(NS_LITERAL_CSTRING("SourceMap"), aResult);
   if (NS_FAILED(rv)) {
     rv =
         aChannel->GetResponseHeader(NS_LITERAL_CSTRING("X-SourceMap"), aResult);
   }
   return NS_SUCCEEDED(rv);
 }
 
-/* static */ bool nsContentUtils::IsMessageInputEvent(
-    const IPC::Message& aMsg) {
+/* static */
+bool nsContentUtils::IsMessageInputEvent(const IPC::Message& aMsg) {
   if ((aMsg.type() & mozilla::dom::PBrowser::PBrowserStart) ==
       mozilla::dom::PBrowser::PBrowserStart) {
     switch (aMsg.type()) {
       case mozilla::dom::PBrowser::Msg_RealMouseMoveEvent__ID:
       case mozilla::dom::PBrowser::Msg_RealMouseButtonEvent__ID:
       case mozilla::dom::PBrowser::Msg_RealKeyEvent__ID:
       case mozilla::dom::PBrowser::Msg_MouseWheelEvent__ID:
       case mozilla::dom::PBrowser::Msg_RealTouchEvent__ID:
@@ -10308,18 +10338,18 @@ nsContentUtils::UserInteractionObserver:
     NS_WARNING("Unexpected observer notification");
   }
   return NS_OK;
 }
 
 Atomic<bool> nsContentUtils::UserInteractionObserver::sUserActive(false);
 NS_IMPL_ISUPPORTS(nsContentUtils::UserInteractionObserver, nsIObserver)
 
-/* static */ bool nsContentUtils::IsOverridingWindowName(
-    const nsAString& aName) {
+/* static */
+bool nsContentUtils::IsOverridingWindowName(const nsAString& aName) {
   return !aName.IsEmpty() && !aName.LowerCaseEqualsLiteral("_blank") &&
          !aName.LowerCaseEqualsLiteral("_top") &&
          !aName.LowerCaseEqualsLiteral("_parent") &&
          !aName.LowerCaseEqualsLiteral("_self");
 }
 
 // Unfortunately, we can't unwrap an IDL object using only a concrete type.
 // We need to calculate type data based on the IDL typename. Which means
@@ -10347,26 +10377,28 @@ static Result<Ok, nsresult> ExtractExcep
   aMessageOut.AppendLiteral(": ");
 
   nsAutoString message;
   exn->GetMessageMoz(message);
   aMessageOut.Append(message);
   return Ok();
 }
 
-/* static */ void nsContentUtils::ExtractErrorValues(
+/* static */
+void nsContentUtils::ExtractErrorValues(
     JSContext* aCx, JS::Handle<JS::Value> aValue, nsACString& aSourceSpecOut,
     uint32_t* aLineOut, uint32_t* aColumnOut, nsString& aMessageOut) {
   nsAutoString sourceSpec;
   ExtractErrorValues(aCx, aValue, sourceSpec, aLineOut, aColumnOut,
                      aMessageOut);
   CopyUTF16toUTF8(sourceSpec, aSourceSpecOut);
 }
 
-/* static */ void nsContentUtils::ExtractErrorValues(
+/* static */
+void nsContentUtils::ExtractErrorValues(
     JSContext* aCx, JS::Handle<JS::Value> aValue, nsAString& aSourceSpecOut,
     uint32_t* aLineOut, uint32_t* aColumnOut, nsString& aMessageOut) {
   MOZ_ASSERT(aLineOut);
   MOZ_ASSERT(aColumnOut);
 
   if (aValue.isObject()) {
     JS::Rooted<JSObject*> obj(aCx, &aValue.toObject());
 
@@ -10414,67 +10446,73 @@ static Result<Ok, nsresult> ExtractExcep
     } else {
       JS_ClearPendingException(aCx);
     }
   }
 }
 
 #undef EXTRACT_EXN_VALUES
 
-/* static */ bool nsContentUtils::ContentIsLink(nsIContent* aContent) {
+/* static */
+bool nsContentUtils::ContentIsLink(nsIContent* aContent) {
   if (!aContent || !aContent->IsElement()) {
     return false;
   }
 
   if (aContent->IsHTMLElement(nsGkAtoms::a)) {
     return true;
   }
 
   return aContent->AsElement()->AttrValueIs(kNameSpaceID_XLink, nsGkAtoms::type,
                                             nsGkAtoms::simple, eCaseMatters);
 }
 
-/* static */ already_AddRefed<ContentFrameMessageManager>
+/* static */
+already_AddRefed<ContentFrameMessageManager>
 nsContentUtils::TryGetTabChildGlobal(nsISupports* aFrom) {
   RefPtr<nsFrameLoaderOwner> frameLoaderOwner = do_QueryObject(aFrom);
   if (!frameLoaderOwner) {
     return nullptr;
   }
 
   RefPtr<nsFrameLoader> frameLoader = frameLoaderOwner->GetFrameLoader();
   if (!frameLoader) {
     return nullptr;
   }
 
   RefPtr<ContentFrameMessageManager> manager =
       frameLoader->GetTabChildMessageManager();
   return manager.forget();
 }
 
-/* static */ uint32_t nsContentUtils::InnerOrOuterWindowCreated() {
+/* static */
+uint32_t nsContentUtils::InnerOrOuterWindowCreated() {
   MOZ_ASSERT(NS_IsMainThread());
   ++sInnerOrOuterWindowCount;
   return ++sInnerOrOuterWindowSerialCounter;
 }
 
-/* static */ void nsContentUtils::InnerOrOuterWindowDestroyed() {
+/* static */
+void nsContentUtils::InnerOrOuterWindowDestroyed() {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(sInnerOrOuterWindowCount > 0);
   --sInnerOrOuterWindowCount;
 }
 
 static bool JSONCreator(const char16_t* aBuf, uint32_t aLen, void* aData) {
   nsAString* result = static_cast<nsAString*>(aData);
   result->Append(static_cast<const char16_t*>(aBuf),
                  static_cast<uint32_t>(aLen));
   return true;
 }
 
-/* static */ bool nsContentUtils::StringifyJSON(
-    JSContext* aCx, JS::MutableHandle<JS::Value> aValue, nsAString& aOutStr) {
+/* static */
+bool nsContentUtils::StringifyJSON(JSContext* aCx,
+                                   JS::MutableHandle<JS::Value> aValue,
+                                   nsAString& aOutStr) {
   MOZ_ASSERT(aCx);
   aOutStr.Truncate();
   JS::RootedValue value(aCx, aValue.get());
   nsAutoString serializedValue;
   NS_ENSURE_TRUE(JS_Stringify(aCx, &value, nullptr, JS::NullHandleValue,
                               JSONCreator, &serializedValue),
                  false);
   aOutStr = serializedValue;
@@ -10491,28 +10529,28 @@ bool nsContentUtils::
 
   Document* topLevel = aDocument->GetTopLevelContentDocument();
   return topLevel && topLevel->GetShell() &&
          topLevel->GetShell()->GetPresContext() &&
          !topLevel->GetShell()->GetPresContext()->HadContentfulPaint() &&
          nsThreadManager::MainThreadHasPendingHighPriorityEvents();
 }
 
-/* static */ bool nsContentUtils::IsURIInPrefList(nsIURI* aURI,
-                                                  const char* aPrefName) {
+/* static */
+bool nsContentUtils::IsURIInPrefList(nsIURI* aURI, const char* aPrefName) {
   MOZ_ASSERT(aPrefName);
 
   nsAutoCString blackList;
   Preferences::GetCString(aPrefName, blackList);
   ToLowerCase(blackList);
   return IsURIInList(aURI, blackList);
 }
 
-/* static */ bool nsContentUtils::IsURIInList(nsIURI* aURI,
-                                              const nsCString& aBlackList) {
+/* static */
+bool nsContentUtils::IsURIInList(nsIURI* aURI, const nsCString& aBlackList) {
 #ifdef DEBUG
   nsAutoCString blackListLowerCase(aBlackList);
   ToLowerCase(blackListLowerCase);
   MOZ_ASSERT(blackListLowerCase.Equals(aBlackList),
              "The aBlackList argument should be lower-case");
 #endif
 
   if (!aURI) {
--- a/dom/base/nsDOMAttributeMap.cpp
+++ b/dom/base/nsDOMAttributeMap.cpp
@@ -395,16 +395,17 @@ size_t nsDOMAttributeMap::SizeOfIncludin
   for (auto iter = mAttributeCache.ConstIter(); !iter.Done(); iter.Next()) {
     n += aMallocSizeOf(iter.Data().get());
   }
 
   // NB: mContent is non-owning and thus not counted.
   return n;
 }
 
-/* virtual */ JSObject* nsDOMAttributeMap::WrapObject(
-    JSContext* aCx, JS::Handle<JSObject*> aGivenProto) {
+/* virtual */
+JSObject* nsDOMAttributeMap::WrapObject(JSContext* aCx,
+                                        JS::Handle<JSObject*> aGivenProto) {
   return NamedNodeMap_Binding::Wrap(aCx, this, aGivenProto);
 }
 
 DocGroup* nsDOMAttributeMap::GetDocGroup() const {
   return mContent ? mContent->OwnerDoc()->GetDocGroup() : nullptr;
 }
--- a/dom/base/nsDOMDataChannel.cpp
+++ b/dom/base/nsDOMDataChannel.cpp
@@ -43,18 +43,19 @@ nsDOMDataChannel::~nsDOMDataChannel() {
   // Don't call us anymore!  Likely isn't an issue (or maybe just less of
   // one) once we block GC until all the (appropriate) onXxxx handlers
   // are dropped. (See WebRTC spec)
   LOG(("%p: Close()ing %p", this, mDataChannel.get()));
   mDataChannel->SetListener(nullptr, nullptr);
   mDataChannel->Close();
 }
 
-/* virtual */ JSObject* nsDOMDataChannel::WrapObject(
-    JSContext* aCx, JS::Handle<JSObject*> aGivenProto) {
+/* virtual */
+JSObject* nsDOMDataChannel::WrapObject(JSContext* aCx,
+                                       JS::Handle<JSObject*> aGivenProto) {
   return RTCDataChannel_Binding::Wrap(aCx, this, aGivenProto);
 }
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(nsDOMDataChannel)
 
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(nsDOMDataChannel,
                                                   DOMEventTargetHelper)
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
--- a/dom/base/nsDOMMutationObserver.cpp
+++ b/dom/base/nsDOMMutationObserver.cpp
@@ -540,17 +540,18 @@ class MutationObserverMicroTask final : 
     nsDOMMutationObserver::HandleMutations(aAso);
   }
 
   virtual bool Suppressed() override {
     return nsDOMMutationObserver::AllScheduledMutationObserversAreSuppressed();
   }
 };
 
-/* static */ void nsDOMMutationObserver::QueueMutationObserverMicroTask() {
+/* static */
+void nsDOMMutationObserver::QueueMutationObserverMicroTask() {
   CycleCollectedJSContext* ccjs = CycleCollectedJSContext::Get();
   if (!ccjs) {
     return;
   }
 
   RefPtr<MutationObserverMicroTask> momt = new MutationObserverMicroTask();
   ccjs->DispatchToMicroTask(momt.forget());
 }
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -178,17 +178,18 @@ class NativeInputRunnable final : public
   static already_AddRefed<nsIRunnable> Create(
       already_AddRefed<nsIRunnable>&& aEvent);
 };
 
 NativeInputRunnable::NativeInputRunnable(already_AddRefed<nsIRunnable>&& aEvent)
     : PrioritizableRunnable(std::move(aEvent),
                             nsIRunnablePriority::PRIORITY_INPUT) {}
 
-/* static */ already_AddRefed<nsIRunnable> NativeInputRunnable::Create(
+/* static */
+already_AddRefed<nsIRunnable> NativeInputRunnable::Create(
     already_AddRefed<nsIRunnable>&& aEvent) {
   MOZ_ASSERT(NS_IsMainThread());
   nsCOMPtr<nsIRunnable> event(new NativeInputRunnable(std::move(aEvent)));
   return event.forget();
 }
 
 }  // unnamed namespace
 
--- a/dom/base/nsFrameLoader.cpp
+++ b/dom/base/nsFrameLoader.cpp
@@ -2876,19 +2876,21 @@ void nsFrameLoader::ApplySandboxFlags(ui
     nsContentUtils::GetPresentationURL(mDocShell, presentationURL);
     if (!presentationURL.IsEmpty()) {
       sandboxFlags |= SANDBOXED_AUXILIARY_NAVIGATION;
     }
     mDocShell->SetSandboxFlags(sandboxFlags);
   }
 }
 
-/* virtual */ void nsFrameLoader::AttributeChanged(
-    mozilla::dom::Element* aElement, int32_t aNameSpaceID, nsAtom* aAttribute,
-    int32_t aModType, const nsAttrValue* aOldValue) {
+/* virtual */
+void nsFrameLoader::AttributeChanged(mozilla::dom::Element* aElement,
+                                     int32_t aNameSpaceID, nsAtom* aAttribute,
+                                     int32_t aModType,
+                                     const nsAttrValue* aOldValue) {
   MOZ_ASSERT(mObservingOwnerContent);
 
   if (aNameSpaceID != kNameSpaceID_None ||
       (aAttribute != TypeAttrName() && aAttribute != nsGkAtoms::primary)) {
     return;
   }
 
   if (aElement != mOwnerContent) {
--- a/dom/base/nsGlobalWindowCommands.cpp
+++ b/dom/base/nsGlobalWindowCommands.cpp
@@ -1119,17 +1119,18 @@ nsresult nsWindowCommandRegistration::Re
   NS_REGISTER_ONE_COMMAND(nsGoForwardCommand, "cmd_browserForward");
 #endif
 
   NS_REGISTER_ONE_COMMAND(nsLookUpDictionaryCommand, "cmd_lookUpDictionary");
 
   return rv;
 }
 
-/* static */ bool nsGlobalWindowCommands::FindScrollCommand(
+/* static */
+bool nsGlobalWindowCommands::FindScrollCommand(
     const char *aCommandName, KeyboardScrollAction *aOutAction) {
   // Search for a keyboard scroll action to do for this command in
   // browseCommands and physicalBrowseCommands. Each command exists in only one
   // of them, so the order we examine browseCommands and physicalBrowseCommands
   // doesn't matter.
 
   for (size_t i = 0; i < ArrayLength(browseCommands); i++) {
     const BrowseCommand &cmd = browseCommands[i];
--- a/dom/base/nsGlobalWindowInner.cpp
+++ b/dom/base/nsGlobalWindowInner.cpp
@@ -2845,46 +2845,50 @@ void nsGlobalWindowInner::GetOwnProperty
       js::IsObjectInContextCompartment(wrapper, aCx)
           ? WebIDLGlobalNameHash::UnresolvedNamesOnly
           : WebIDLGlobalNameHash::AllNames;
   if (!WebIDLGlobalNameHash::GetNames(aCx, wrapper, nameType, aNames)) {
     aRv.NoteJSContextException(aCx);
   }
 }
 
-/* static */ bool nsGlobalWindowInner::IsPrivilegedChromeWindow(
-    JSContext* aCx, JSObject* aObj) {
+/* static */
+bool nsGlobalWindowInner::IsPrivilegedChromeWindow(JSContext* aCx,
+                                                   JSObject* aObj) {
   // For now, have to deal with XPConnect objects here.
   nsGlobalWindowInner* win = xpc::WindowOrNull(aObj);
   return win && win->IsChromeWindow() &&
          nsContentUtils::ObjectPrincipal(aObj) ==
              nsContentUtils::GetSystemPrincipal();
 }
 
-/* static */ bool nsGlobalWindowInner::OfflineCacheAllowedForContext(
-    JSContext* aCx, JSObject* aObj) {
+/* static */
+bool nsGlobalWindowInner::OfflineCacheAllowedForContext(JSContext* aCx,
+                                                        JSObject* aObj) {
   return IsSecureContextOrObjectIsFromSecureContext(aCx, aObj) ||
          Preferences::GetBool("browser.cache.offline.insecure.enable");
 }
 
-/* static */ bool nsGlobalWindowInner::IsRequestIdleCallbackEnabled(
-    JSContext* aCx, JSObject* aObj) {
+/* static */
+bool nsGlobalWindowInner::IsRequestIdleCallbackEnabled(JSContext* aCx,
+                                                       JSObject* aObj) {
   // The requestIdleCallback should always be enabled for system code.
   return nsContentUtils::RequestIdleCallbackEnabled() ||
          nsContentUtils::IsSystemCaller(aCx);
 }
 
-/* static */ bool nsGlobalWindowInner::RegisterProtocolHandlerAllowedForContext(
+/* static */
+bool nsGlobalWindowInner::RegisterProtocolHandlerAllowedForContext(
     JSContext* aCx, JSObject* aObj) {
   return IsSecureContextOrObjectIsFromSecureContext(aCx, aObj) ||
          Preferences::GetBool("dom.registerProtocolHandler.insecure.enabled");
 }
 
-/* static */ bool nsGlobalWindowInner::DeviceSensorsEnabled(JSContext* aCx,
-                                                            JSObject* aObj) {
+/* static */
+bool nsGlobalWindowInner::DeviceSensorsEnabled(JSContext* aCx, JSObject* aObj) {
   return Preferences::GetBool("device.sensors.enabled");
 }
 
 nsDOMOfflineResourceList* nsGlobalWindowInner::GetApplicationCache(
     ErrorResult& aError) {
   if (!mApplicationCache) {
     nsCOMPtr<nsIWebNavigation> webNav(do_QueryInterface(GetDocShell()));
     if (!webNav || !mDoc) {
@@ -7209,17 +7213,18 @@ void nsGlobalWindowInner::StorageAccessG
     }
   }
 }
 
 mozilla::dom::TabGroup* nsPIDOMWindowInner::TabGroup() {
   return nsGlobalWindowInner::Cast(this)->TabGroupInner();
 }
 
-/* static */ already_AddRefed<nsGlobalWindowInner> nsGlobalWindowInner::Create(
+/* static */
+already_AddRefed<nsGlobalWindowInner> nsGlobalWindowInner::Create(
     nsGlobalWindowOuter* aOuterWindow, bool aIsChrome) {
   RefPtr<nsGlobalWindowInner> window = new nsGlobalWindowInner(aOuterWindow);
   if (aIsChrome) {
     window->mIsChrome = true;
     window->mCleanMessageManager = true;
   }
 
   window->InitWasOffline();
--- a/dom/base/nsGlobalWindowOuter.cpp
+++ b/dom/base/nsGlobalWindowOuter.cpp
@@ -4450,27 +4450,27 @@ bool nsGlobalWindowOuter::SetWidgetFulls
           ?
           // If we enter fullscreen for fullscreen mode, we want
           // the native system behavior.
           aWidget->MakeFullScreenWithNativeTransition(aIsFullscreen, aScreen)
           : aWidget->MakeFullScreen(aIsFullscreen, aScreen);
   return NS_SUCCEEDED(rv);
 }
 
-/* virtual */ void nsGlobalWindowOuter::FullscreenWillChange(
-    bool aIsFullscreen) {
+/* virtual */
+void nsGlobalWindowOuter::FullscreenWillChange(bool aIsFullscreen) {
   if (aIsFullscreen) {
     DispatchCustomEvent(NS_LITERAL_STRING("willenterfullscreen"));
   } else {
     DispatchCustomEvent(NS_LITERAL_STRING("willexitfullscreen"));
   }
 }
 
-/* virtual */ void nsGlobalWindowOuter::FinishFullscreenChange(
-    bool aIsFullscreen) {
+/* virtual */
+void nsGlobalWindowOuter::FinishFullscreenChange(bool aIsFullscreen) {
   if (aIsFullscreen != mFullscreen) {
     NS_WARNING("Failed to toggle fullscreen state of the widget");
     // We failed to make the widget enter fullscreen.
     // Stop further changes and restore the state.
     if (!aIsFullscreen) {
       mFullscreen = false;
       mFullscreenMode = false;
     } else {
@@ -5738,19 +5738,21 @@ nsresult nsGlobalWindowOuter::OpenDialog
                       true,                     // aNavigate
                       nullptr, aExtraArgument,  // Arguments
                       nullptr,                  // aLoadState
                       false,                    // aForceNoOpener
                       _retval);
 }
 
 // Like Open, but passes aNavigate=false.
-/* virtual */ nsresult nsGlobalWindowOuter::OpenNoNavigate(
-    const nsAString& aUrl, const nsAString& aName, const nsAString& aOptions,
-    nsPIDOMWindowOuter** _retval) {
+/* virtual */
+nsresult nsGlobalWindowOuter::OpenNoNavigate(const nsAString& aUrl,
+                                             const nsAString& aName,
+                                             const nsAString& aOptions,
+                                             nsPIDOMWindowOuter** _retval) {
   return OpenInternal(aUrl, aName, aOptions,
                       false,             // aDialog
                       false,             // aContentModal
                       true,              // aCalledNoScript
                       false,             // aDoJSFixups
                       false,             // aNavigate
                       nullptr, nullptr,  // No args
                       nullptr,           // aLoadState
@@ -7770,17 +7772,18 @@ nsGlobalWindowOuter::TemporarilyDisableD
     mTopWindow->mAreDialogsEnabled = mSavedDialogsEnabled;
   }
 }
 
 mozilla::dom::TabGroup* nsPIDOMWindowOuter::TabGroup() {
   return nsGlobalWindowOuter::Cast(this)->TabGroupOuter();
 }
 
-/* static */ already_AddRefed<nsGlobalWindowOuter> nsGlobalWindowOuter::Create(
+/* static */
+already_AddRefed<nsGlobalWindowOuter> nsGlobalWindowOuter::Create(
     nsDocShell* aDocShell, bool aIsChrome) {
   uint64_t outerWindowID = aDocShell->GetOuterWindowID();
   RefPtr<nsGlobalWindowOuter> window = new nsGlobalWindowOuter(outerWindowID);
   if (aIsChrome) {
     window->mIsChrome = true;
   }
   window->SetDocShell(aDocShell);
 
--- a/dom/base/nsNameSpaceManager.cpp
+++ b/dom/base/nsNameSpaceManager.cpp
@@ -29,17 +29,18 @@ using namespace mozilla;
 using namespace mozilla::dom;
 
 static const char* kPrefSVGDisabled = "svg.disabled";
 static const char* kPrefMathMLDisabled = "mathml.disabled";
 static const char* kObservedNSPrefs[] = {kPrefMathMLDisabled, kPrefSVGDisabled,
                                          nullptr};
 StaticRefPtr<nsNameSpaceManager> nsNameSpaceManager::sInstance;
 
-/* static */ nsNameSpaceManager* nsNameSpaceManager::GetInstance() {
+/* static */
+nsNameSpaceManager* nsNameSpaceManager::GetInstance() {
   if (!sInstance) {
     sInstance = new nsNameSpaceManager();
     if (sInstance->Init()) {
       ClearOnShutdown(&sInstance);
     } else {
       delete sInstance;
       sInstance = nullptr;
     }
--- a/dom/base/nsRange.cpp
+++ b/dom/base/nsRange.cpp
@@ -170,18 +170,19 @@ struct IsItemInRangeComparator {
         return 0;
       }
       return 1;
     }
     return -1;
   }
 };
 
-/* static */ bool nsRange::IsNodeSelected(nsINode* aNode, uint32_t aStartOffset,
-                                          uint32_t aEndOffset) {
+/* static */
+bool nsRange::IsNodeSelected(nsINode* aNode, uint32_t aStartOffset,
+                             uint32_t aEndOffset) {
   MOZ_ASSERT(aNode, "bad arg");
 
   nsINode* n = GetNextRangeCommonAncestor(aNode);
   NS_ASSERTION(n || !aNode->IsSelectionDescendant(),
                "orphan selection descendant");
 
   // Collect the selection objects for potential ranges.
   nsTHashtable<nsPtrHashKey<Selection>> ancestorSelections;
@@ -2150,19 +2151,20 @@ int16_t nsRange::CompareBoundaryPoints(u
     return 0;
   }
 
   return nsContentUtils::ComparePoints(ourNode, static_cast<int32_t>(ourOffset),
                                        otherNode,
                                        static_cast<int32_t>(otherOffset));
 }
 
-/* static */ nsresult nsRange::CloneParentsBetween(
-    nsINode* aAncestor, nsINode* aNode, nsINode** aClosestAncestor,
-    nsINode** aFarthestAncestor) {
+/* static */
+nsresult nsRange::CloneParentsBetween(nsINode* aAncestor, nsINode* aNode,
+                                      nsINode** aClosestAncestor,
+                                      nsINode** aFarthestAncestor) {
   NS_ENSURE_ARG_POINTER(
       (aAncestor && aNode && aClosestAncestor && aFarthestAncestor));
 
   *aClosestAncestor = nullptr;
   *aFarthestAncestor = nullptr;
 
   if (aAncestor == aNode) return NS_OK;
 
@@ -2799,17 +2801,18 @@ static nsresult GetPartialTextRect(nsLay
 
         aTextList->AppendElement(renderedText.mString, fallible);
       }
     }
   }
   return NS_OK;
 }
 
-/* static */ void nsRange::CollectClientRectsAndText(
+/* static */
+void nsRange::CollectClientRectsAndText(
     nsLayoutUtils::RectCallback* aCollector, Sequence<nsString>* aTextList,
     nsRange* aRange, nsINode* aStartContainer, uint32_t aStartOffset,
     nsINode* aEndContainer, uint32_t aEndOffset, bool aClampToEdge,
     bool aFlushLayout) {
   // Currently, this method is called with start of end offset of nsRange.
   // So, they must be between 0 - INT32_MAX.
   MOZ_ASSERT(IsValidOffset(aStartOffset));
   MOZ_ASSERT(IsValidOffset(aEndOffset));
@@ -3008,17 +3011,18 @@ nsresult nsRange::GetUsedFontFaces(nsLay
 
 nsINode* nsRange::GetRegisteredCommonAncestor() {
   MOZ_ASSERT(IsInSelection(),
              "GetRegisteredCommonAncestor only valid for range in selection");
   MOZ_ASSERT(mRegisteredCommonAncestor);
   return mRegisteredCommonAncestor;
 }
 
-/* static */ bool nsRange::AutoInvalidateSelection::sIsNested;
+/* static */
+bool nsRange::AutoInvalidateSelection::sIsNested;
 
 nsRange::AutoInvalidateSelection::~AutoInvalidateSelection() {
   if (!mCommonAncestor) {
     return;
   }
   sIsNested = false;
   ::InvalidateAllFrames(mCommonAncestor);
 
@@ -3033,18 +3037,19 @@ nsRange::AutoInvalidateSelection::~AutoI
     // it _were_, then in a debug build GetRegisteredCommonAncestor() would have
     // fatally asserted.
     if (commonAncestor && commonAncestor != mCommonAncestor) {
       ::InvalidateAllFrames(commonAncestor);
     }
   }
 }
 
-/* static */ already_AddRefed<nsRange> nsRange::Constructor(
-    const GlobalObject& aGlobal, ErrorResult& aRv) {
+/* static */
+already_AddRefed<nsRange> nsRange::Constructor(const GlobalObject& aGlobal,
+                                               ErrorResult& aRv) {
   nsCOMPtr<nsPIDOMWindowInner> window =
       do_QueryInterface(aGlobal.GetAsSupports());
   if (!window || !window->GetDoc()) {
     aRv.Throw(NS_ERROR_FAILURE);
     return nullptr;
   }
 
   return window->GetDoc()->CreateRange(aRv);
--- a/dom/base/nsScreen.cpp
+++ b/dom/base/nsScreen.cpp
@@ -14,18 +14,18 @@
 #include "nsIDocShellTreeItem.h"
 #include "nsLayoutUtils.h"
 #include "nsJSUtils.h"
 #include "nsDeviceContext.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
-/* static */ already_AddRefed<nsScreen> nsScreen::Create(
-    nsPIDOMWindowInner* aWindow) {
+/* static */
+already_AddRefed<nsScreen> nsScreen::Create(nsPIDOMWindowInner* aWindow) {
   MOZ_ASSERT(aWindow);
 
   if (!aWindow->GetDocShell()) {
     return nullptr;
   }
 
   nsCOMPtr<nsIScriptGlobalObject> sgo = do_QueryInterface(aWindow);
   NS_ENSURE_TRUE(sgo, nullptr);
--- a/dom/base/nsStyleLinkElement.cpp
+++ b/dom/base/nsStyleLinkElement.cpp
@@ -139,37 +139,38 @@ void nsStyleLinkElement::InitStyleLinkEl
 void nsStyleLinkElement::SetEnableUpdates(bool aEnableUpdates) {
   mUpdatesEnabled = aEnableUpdates;
 }
 
 void nsStyleLinkElement::GetCharset(nsAString& aCharset) {
   aCharset.Truncate();
 }
 
-/* virtual */ void nsStyleLinkElement::OverrideBaseURI(nsIURI* aNewBaseURI) {
+/* virtual */
+void nsStyleLinkElement::OverrideBaseURI(nsIURI* aNewBaseURI) {
   MOZ_ASSERT_UNREACHABLE(
       "Base URI can't be overriden in this implementation "
       "of nsIStyleSheetLinkingElement.");
 }
 
-/* virtual */ void nsStyleLinkElement::SetLineNumber(uint32_t aLineNumber) {
+/* virtual */
+void nsStyleLinkElement::SetLineNumber(uint32_t aLineNumber) {
   mLineNumber = aLineNumber;
 }
 
-/* virtual */ uint32_t nsStyleLinkElement::GetLineNumber() {
-  return mLineNumber;
-}
+/* virtual */
+uint32_t nsStyleLinkElement::GetLineNumber() { return mLineNumber; }
 
-/* virtual */ void nsStyleLinkElement::SetColumnNumber(uint32_t aColumnNumber) {
+/* virtual */
+void nsStyleLinkElement::SetColumnNumber(uint32_t aColumnNumber) {
   mColumnNumber = aColumnNumber;
 }
 
-/* virtual */ uint32_t nsStyleLinkElement::GetColumnNumber() {
-  return mColumnNumber;
-}
+/* virtual */
+uint32_t nsStyleLinkElement::GetColumnNumber() { return mColumnNumber; }
 
 static uint32_t ToLinkMask(const nsAString& aLink) {
   // Keep this in sync with sRelValues in HTMLLinkElement.cpp
   if (aLink.EqualsLiteral("prefetch"))
     return nsStyleLinkElement::ePREFETCH;
   else if (aLink.EqualsLiteral("dns-prefetch"))
     return nsStyleLinkElement::eDNS_PREFETCH;
   else if (aLink.EqualsLiteral("stylesheet"))
--- a/dom/base/nsTextFragment.cpp
+++ b/dom/base/nsTextFragment.cpp
@@ -462,17 +462,18 @@ bool nsTextFragment::Append(const char16
                             MakeSpan(buff + mState.mLength, aLength));
 
   m1b = buff;
   mState.mLength += aLength;
 
   return true;
 }
 
-/* virtual */ size_t nsTextFragment::SizeOfExcludingThis(
+/* virtual */
+size_t nsTextFragment::SizeOfExcludingThis(
     mozilla::MallocSizeOf aMallocSizeOf) const {
   if (Is2b()) {
     return m2b->SizeOfIncludingThisIfUnshared(aMallocSizeOf);
   }
 
   if (mState.mInHeap) {
     return aMallocSizeOf(m1b);
   }
--- a/dom/base/nsWindowMemoryReporter.cpp
+++ b/dom/base/nsWindowMemoryReporter.cpp
@@ -87,17 +87,18 @@ static nsresult NonJSSizeOfTab(nsPIDOMWi
   NS_ENSURE_SUCCESS(rv, rv);
 
   *aDomSize = sizes.mDom;
   *aStyleSize = sizes.mStyle;
   *aOtherSize = sizes.mOther;
   return NS_OK;
 }
 
-/* static */ void nsWindowMemoryReporter::Init() {
+/* static */
+void nsWindowMemoryReporter::Init() {
   MOZ_ASSERT(!sWindowReporter);
   sWindowReporter = new nsWindowMemoryReporter();
   ClearOnShutdown(&sWindowReporter);
   RegisterStrongMemoryReporter(sWindowReporter);
   RegisterNonJSSizeOfTab(NonJSSizeOfTab);
 
   nsCOMPtr<nsIObserverService> os = services::GetObserverService();
   if (os) {
@@ -107,17 +108,18 @@ static nsresult NonJSSizeOfTab(nsPIDOMWi
                     /* weakRef = */ true);
     os->AddObserver(sWindowReporter, "cycle-collector-end",
                     /* weakRef = */ true);
   }
 
   RegisterGhostWindowsDistinguishedAmount(GhostWindowsDistinguishedAmount);
 }
 
-/* static */ nsWindowMemoryReporter* nsWindowMemoryReporter::Get() {
+/* static */
+nsWindowMemoryReporter* nsWindowMemoryReporter::Get() {
   return sWindowReporter;
 }
 
 static already_AddRefed<nsIURI> GetWindowURI(nsGlobalWindowInner* aWindow) {
   NS_ENSURE_TRUE(aWindow, nullptr);
 
   nsCOMPtr<Document> doc = aWindow->GetExtantDoc();
   nsCOMPtr<nsIURI> uri;
@@ -869,29 +871,31 @@ void nsWindowMemoryReporter::CheckForGho
       }
     }
   }
 
   Telemetry::ScalarSetMaximum(
       Telemetry::ScalarID::MEMORYREPORTER_MAX_GHOST_WINDOWS, mGhostWindowCount);
 }
 
-/* static */ int64_t nsWindowMemoryReporter::GhostWindowsDistinguishedAmount() {
+/* static */
+int64_t nsWindowMemoryReporter::GhostWindowsDistinguishedAmount() {
   return sWindowReporter->mGhostWindowCount;
 }
 
 void nsWindowMemoryReporter::KillCheckTimer() {
   if (mCheckTimer) {
     mCheckTimer->Cancel();
     mCheckTimer = nullptr;
   }
 }
 
 #ifdef DEBUG
-/* static */ void nsWindowMemoryReporter::UnlinkGhostWindows() {
+/* static */
+void nsWindowMemoryReporter::UnlinkGhostWindows() {
   if (!sWindowReporter) {
     return;
   }
 
   nsGlobalWindowInner::InnerWindowByIdTable* windowsById =
       nsGlobalWindowInner::GetWindowsTable();
   if (!windowsById) {
     return;
--- a/dom/base/nsWrapperCache.cpp
+++ b/dom/base/nsWrapperCache.cpp
@@ -12,17 +12,18 @@
 #include "mozilla/HoldDropJSObjects.h"
 #include "nsCycleCollectionTraversalCallback.h"
 #include "nsCycleCollector.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
 #ifdef DEBUG
-/* static */ bool nsWrapperCache::HasJSObjectMovedOp(JSObject* aWrapper) {
+/* static */
+bool nsWrapperCache::HasJSObjectMovedOp(JSObject* aWrapper) {
   return js::HasObjectMovedOp(aWrapper);
 }
 #endif
 
 void nsWrapperCache::HoldJSObjects(void* aScriptObjectHolder,
                                    nsScriptObjectTracer* aTracer) {
   cyclecollector::HoldJSObjectsImpl(aScriptObjectHolder, aTracer);
   if (mWrapper && !JS::ObjectIsTenured(mWrapper)) {
--- a/dom/bindings/nsScriptError.cpp
+++ b/dom/bindings/nsScriptError.cpp
@@ -388,17 +388,18 @@ nsScriptErrorBase::GetNotes(nsIArray** a
 
   uint32_t len = mNotes.Length();
   for (uint32_t i = 0; i < len; i++) array->AppendElement(mNotes[i]);
   array.forget(aNotes);
 
   return NS_OK;
 }
 
-/* static */ bool nsScriptErrorBase::ComputeIsFromPrivateWindow(
+/* static */
+bool nsScriptErrorBase::ComputeIsFromPrivateWindow(
     nsGlobalWindowInner* aWindow) {
   // Never mark exceptions from chrome windows as having come from private
   // windows, since we always want them to be reported.
   nsIPrincipal* winPrincipal = aWindow->GetPrincipal();
   return aWindow->IsPrivateBrowsing() &&
          !nsContentUtils::IsSystemPrincipal(winPrincipal);
 }
 
--- a/dom/bindings/test/TestFunctions.cpp
+++ b/dom/bindings/test/TestFunctions.cpp
@@ -10,35 +10,37 @@
 #include "mozilla/dom/WrapperCachedNonISupportsTestInterface.h"
 #include "nsStringBuffer.h"
 #include "mozITestInterfaceJS.h"
 #include "nsComponentManagerUtils.h"
 
 namespace mozilla {
 namespace dom {
 
-/* static */ TestFunctions* TestFunctions::Constructor(GlobalObject& aGlobal,
-                                                       ErrorResult& aRv) {
+/* static */
+TestFunctions* TestFunctions::Constructor(GlobalObject& aGlobal,
+                                          ErrorResult& aRv) {
   return new TestFunctions;
 }
 
-/* static */ void TestFunctions::ThrowUncatchableException(
-    GlobalObject& aGlobal, ErrorResult& aRv) {
+/* static */
+void TestFunctions::ThrowUncatchableException(GlobalObject& aGlobal,
+                                              ErrorResult& aRv) {
   aRv.ThrowUncatchableException();
 }
 
-/* static */ Promise* TestFunctions::PassThroughPromise(GlobalObject& aGlobal,
-                                                        Promise& aPromise) {
+/* static */
+Promise* TestFunctions::PassThroughPromise(GlobalObject& aGlobal,
+                                           Promise& aPromise) {
   return &aPromise;
 }
 
-/* static */ already_AddRefed<Promise>
-TestFunctions::PassThroughCallbackPromise(GlobalObject& aGlobal,
-                                          PromiseReturner& aCallback,
-                                          ErrorResult& aRv) {
+/* static */
+already_AddRefed<Promise> TestFunctions::PassThroughCallbackPromise(
+    GlobalObject& aGlobal, PromiseReturner& aCallback, ErrorResult& aRv) {
   return aCallback.Call(aRv);
 }
 
 void TestFunctions::SetStringData(const nsAString& aString) {
   mStringData = aString;
 }
 
 void TestFunctions::GetStringDataAsAString(nsAString& aString) {
--- a/dom/broadcastchannel/BroadcastChannel.cpp
+++ b/dom/broadcastchannel/BroadcastChannel.cpp
@@ -217,17 +217,18 @@ BroadcastChannel::~BroadcastChannel() {
   MOZ_ASSERT(!mWorkerRef);
 }
 
 JSObject* BroadcastChannel::WrapObject(JSContext* aCx,
                                        JS::Handle<JSObject*> aGivenProto) {
   return BroadcastChannel_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-/* static */ already_AddRefed<BroadcastChannel> BroadcastChannel::Constructor(
+/* static */
+already_AddRefed<BroadcastChannel> BroadcastChannel::Constructor(
     const GlobalObject& aGlobal, const nsAString& aChannel, ErrorResult& aRv) {
   nsCOMPtr<nsPIDOMWindowInner> window =
       do_QueryInterface(aGlobal.GetAsSupports());
   // Window is null in workers.
 
   RefPtr<BroadcastChannel> bc = new BroadcastChannel(window, aChannel);
 
   nsAutoCString origin;
--- a/dom/canvas/ImageBitmap.cpp
+++ b/dom/canvas/ImageBitmap.cpp
@@ -718,43 +718,45 @@ UniquePtr<ImageBitmapCloneData> ImageBit
   RefPtr<SourceSurface> surface = mData->GetAsSourceSurface();
   result->mSurface = surface->GetDataSurface();
   MOZ_ASSERT(result->mSurface);
   result->mWriteOnly = mWriteOnly;
 
   return result;
 }
 
-/* static */ already_AddRefed<ImageBitmap> ImageBitmap::CreateFromSourceSurface(
+/* static */
+already_AddRefed<ImageBitmap> ImageBitmap::CreateFromSourceSurface(
     nsIGlobalObject* aGlobal, gfx::SourceSurface* aSource, ErrorResult& aRv) {
   RefPtr<layers::Image> data = CreateImageFromSurface(aSource);
   RefPtr<ImageBitmap> ret =
       new ImageBitmap(aGlobal, data, false /* writeOnly */);
   ret->mAllocatedImageData = true;
   return ret.forget();
 }
 
-/* static */ already_AddRefed<ImageBitmap> ImageBitmap::CreateFromCloneData(
+/* static */
+already_AddRefed<ImageBitmap> ImageBitmap::CreateFromCloneData(
     nsIGlobalObject* aGlobal, ImageBitmapCloneData* aData) {
   RefPtr<layers::Image> data = CreateImageFromSurface(aData->mSurface);
 
   RefPtr<ImageBitmap> ret =
       new ImageBitmap(aGlobal, data, aData->mWriteOnly, aData->mAlphaType);
 
   ret->mAllocatedImageData = true;
 
   ErrorResult rv;
   ret->SetPictureRect(aData->mPictureRect, rv);
   return ret.forget();
 }
 
-/* static */ already_AddRefed<ImageBitmap>
-ImageBitmap::CreateFromOffscreenCanvas(nsIGlobalObject* aGlobal,
-                                       OffscreenCanvas& aOffscreenCanvas,
-                                       ErrorResult& aRv) {
+/* static */
+already_AddRefed<ImageBitmap> ImageBitmap::CreateFromOffscreenCanvas(
+    nsIGlobalObject* aGlobal, OffscreenCanvas& aOffscreenCanvas,
+    ErrorResult& aRv) {
   // Check write-only mode.
   bool writeOnly = aOffscreenCanvas.IsWriteOnly();
 
   nsLayoutUtils::SurfaceFromElementResult res =
       nsLayoutUtils::SurfaceFromOffscreenCanvas(
           &aOffscreenCanvas, nsLayoutUtils::SFE_WANT_FIRST_FRAME_IF_IMAGE);
 
   RefPtr<SourceSurface> surface = res.GetSourceSurface();
@@ -768,17 +770,18 @@ ImageBitmap::CreateFromOffscreenCanvas(n
 
   RefPtr<ImageBitmap> ret = new ImageBitmap(aGlobal, data, writeOnly);
 
   ret->mAllocatedImageData = true;
 
   return ret.forget();
 }
 
-/* static */ already_AddRefed<ImageBitmap> ImageBitmap::CreateInternal(
+/* static */
+already_AddRefed<ImageBitmap> ImageBitmap::CreateInternal(
     nsIGlobalObject* aGlobal, HTMLImageElement& aImageEl,
     const Maybe<IntRect>& aCropRect, ErrorResult& aRv) {
   // Check if the image element is completely available or not.
   if (!aImageEl.Complete()) {
     aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
     return nullptr;
   }
 
@@ -806,17 +809,18 @@ ImageBitmap::CreateFromOffscreenCanvas(n
   // Set the picture rectangle.
   if (ret && aCropRect.isSome()) {
     ret->SetPictureRect(aCropRect.ref(), aRv);
   }
 
   return ret.forget();
 }
 
-/* static */ already_AddRefed<ImageBitmap> ImageBitmap::CreateInternal(
+/* static */
+already_AddRefed<ImageBitmap> ImageBitmap::CreateInternal(
     nsIGlobalObject* aGlobal, SVGImageElement& aImageEl,
     const Maybe<IntRect>& aCropRect, ErrorResult& aRv) {
   bool writeOnly = true;
 
   // Get the SourceSurface out from the image element and then do security
   // checking.
   RefPtr<SourceSurface> surface =
       GetSurfaceFromElement(aGlobal, aImageEl, &writeOnly, aRv);
@@ -838,17 +842,18 @@ ImageBitmap::CreateFromOffscreenCanvas(n
   // Set the picture rectangle.
   if (ret && aCropRect.isSome()) {
     ret->SetPictureRect(aCropRect.ref(), aRv);
   }
 
   return ret.forget();
 }
 
-/* static */ already_AddRefed<ImageBitmap> ImageBitmap::CreateInternal(
+/* static */
+already_AddRefed<ImageBitmap> ImageBitmap::CreateInternal(
     nsIGlobalObject* aGlobal, HTMLVideoElement& aVideoEl,
     const Maybe<IntRect>& aCropRect, ErrorResult& aRv) {
   aVideoEl.MarkAsContentSource(
       mozilla::dom::HTMLVideoElement::CallerAPI::CREATE_IMAGEBITMAP);
 
   // Check network state.
   if (aVideoEl.NetworkState() == NETWORK_EMPTY) {
     aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
@@ -879,17 +884,18 @@ ImageBitmap::CreateFromOffscreenCanvas(n
   // Set the picture rectangle.
   if (ret && aCropRect.isSome()) {
     ret->SetPictureRect(aCropRect.ref(), aRv);
   }
 
   return ret.forget();
 }
 
-/* static */ already_AddRefed<ImageBitmap> ImageBitmap::CreateInternal(
+/* static */
+already_AddRefed<ImageBitmap> ImageBitmap::CreateInternal(
     nsIGlobalObject* aGlobal, HTMLCanvasElement& aCanvasEl,
     const Maybe<IntRect>& aCropRect, ErrorResult& aRv) {
   if (aCanvasEl.Width() == 0 || aCanvasEl.Height() == 0) {
     aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
     return nullptr;
   }
 
   bool writeOnly = true;
@@ -945,17 +951,18 @@ ImageBitmap::CreateFromOffscreenCanvas(n
   // Set the picture rectangle.
   if (ret && aCropRect.isSome()) {
     ret->SetPictureRect(cropRect, aRv);
   }
 
   return ret.forget();
 }
 
-/* static */ already_AddRefed<ImageBitmap> ImageBitmap::CreateInternal(
+/* static */
+already_AddRefed<ImageBitmap> ImageBitmap::CreateInternal(
     nsIGlobalObject* aGlobal, ImageData& aImageData,
     const Maybe<IntRect>& aCropRect, ErrorResult& aRv) {
   // Copy data into SourceSurface.
   dom::Uint8ClampedArray array;
   DebugOnly<bool> inited = array.Init(aImageData.GetDataObject());
   MOZ_ASSERT(inited);
 
   array.ComputeLengthAndData();
@@ -1001,17 +1008,18 @@ ImageBitmap::CreateFromOffscreenCanvas(n
   ret->mAllocatedImageData = true;
 
   // The cropping information has been handled in the CreateImageFromRawData()
   // function.
 
   return ret.forget();
 }
 
-/* static */ already_AddRefed<ImageBitmap> ImageBitmap::CreateInternal(
+/* static */
+already_AddRefed<ImageBitmap> ImageBitmap::CreateInternal(
     nsIGlobalObject* aGlobal, CanvasRenderingContext2D& aCanvasCtx,
     const Maybe<IntRect>& aCropRect, ErrorResult& aRv) {
   nsCOMPtr<nsPIDOMWindowInner> win = do_QueryInterface(aGlobal);
   nsGlobalWindowInner* window = nsGlobalWindowInner::Cast(win);
   if (NS_WARN_IF(!window) || !window->GetExtantDoc()) {
     aRv.Throw(NS_ERROR_DOM_SECURITY_ERR);
     return nullptr;
   }
@@ -1050,17 +1058,18 @@ ImageBitmap::CreateFromOffscreenCanvas(n
   // Set the picture rectangle.
   if (ret && aCropRect.isSome()) {
     ret->SetPictureRect(aCropRect.ref(), aRv);
   }
 
   return ret.forget();
 }
 
-/* static */ already_AddRefed<ImageBitmap> ImageBitmap::CreateInternal(
+/* static */
+already_AddRefed<ImageBitmap> ImageBitmap::CreateInternal(
     nsIGlobalObject* aGlobal, ImageBitmap& aImageBitmap,
     const Maybe<IntRect>& aCropRect, ErrorResult& aRv) {
   if (!aImageBitmap.mData) {
     aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
     return nullptr;
   }
 
   RefPtr<layers::Image> data = aImageBitmap.mData;
@@ -1269,17 +1278,18 @@ static void AsyncCreateImageBitmapFromBl
   if (NS_WARN_IF(!task)) {
     aPromise->MaybeReject(NS_ERROR_DOM_INVALID_STATE_ERR);
     return;
   }
 
   NS_DispatchToCurrentThread(task);
 }
 
-/* static */ already_AddRefed<Promise> ImageBitmap::Create(
+/* static */
+already_AddRefed<Promise> ImageBitmap::Create(
     nsIGlobalObject* aGlobal, const ImageBitmapSource& aSrc,
     const Maybe<gfx::IntRect>& aCropRect, ErrorResult& aRv) {
   MOZ_ASSERT(aGlobal);
 
   RefPtr<Promise> promise = Promise::Create(aGlobal, aRv);
 
   if (NS_WARN_IF(aRv.Failed())) {
     return nullptr;
@@ -1340,17 +1350,18 @@ static void AsyncCreateImageBitmapFromBl
 
   if (!aRv.Failed()) {
     AsyncFulfillImageBitmapPromise(promise, imageBitmap);
   }
 
   return promise.forget();
 }
 
-/*static*/ JSObject* ImageBitmap::ReadStructuredClone(
+/*static*/
+JSObject* ImageBitmap::ReadStructuredClone(
     JSContext* aCx, JSStructuredCloneReader* aReader, nsIGlobalObject* aParent,
     const nsTArray<RefPtr<DataSourceSurface>>& aClonedSurfaces,
     uint32_t aIndex) {
   MOZ_ASSERT(aCx);
   MOZ_ASSERT(aReader);
   // aParent might be null.
 
   uint32_t picRectX_;
@@ -1405,17 +1416,18 @@ static void AsyncCreateImageBitmapFromBl
     }
 
     imageBitmap->mAllocatedImageData = true;
   }
 
   return &(value.toObject());
 }
 
-/*static*/ bool ImageBitmap::WriteStructuredClone(
+/*static*/
+bool ImageBitmap::WriteStructuredClone(
     JSStructuredCloneWriter* aWriter,
     nsTArray<RefPtr<DataSourceSurface>>& aClonedSurfaces,
     ImageBitmap* aImageBitmap) {
   MOZ_ASSERT(aWriter);
   MOZ_ASSERT(aImageBitmap);
 
   const uint32_t picRectX = BitwiseCast<uint32_t>(aImageBitmap->mPictureRect.x);
   const uint32_t picRectY = BitwiseCast<uint32_t>(aImageBitmap->mPictureRect.y);
@@ -1473,20 +1485,20 @@ size_t ImageBitmap::GetAllocatedSize() c
   const int bytesPerPixel = BytesPerPixel(surface->GetFormat());
   return surface->GetSize().height * surface->GetSize().width * bytesPerPixel;
 }
 
 size_t BindingJSObjectMallocBytes(ImageBitmap* aBitmap) {
   return aBitmap->GetAllocatedSize();
 }
 
-/* static */ already_AddRefed<CreateImageBitmapFromBlob>
-CreateImageBitmapFromBlob::Create(Promise* aPromise, nsIGlobalObject* aGlobal,
-                                  Blob& aBlob, const Maybe<IntRect>& aCropRect,
-                                  nsIEventTarget* aMainThreadEventTarget) {
+/* static */
+already_AddRefed<CreateImageBitmapFromBlob> CreateImageBitmapFromBlob::Create(
+    Promise* aPromise, nsIGlobalObject* aGlobal, Blob& aBlob,
+    const Maybe<IntRect>& aCropRect, nsIEventTarget* aMainThreadEventTarget) {
   // Get the internal stream of the blob.
   nsCOMPtr<nsIInputStream> stream;
   ErrorResult error;
   aBlob.Impl()->CreateInputStream(getter_AddRefs(stream), error);
   if (NS_WARN_IF(error.Failed())) {
     return nullptr;
   }
 
--- a/dom/canvas/ImageBitmapUtils.cpp
+++ b/dom/canvas/ImageBitmapUtils.cpp
@@ -299,17 +299,18 @@ DECLARE_Utils(RGBA32) DECLARE_Utils(BGRA
         DECLARE_Utils(YUV422P) DECLARE_Utils(YUV420P)
             DECLARE_Utils(YUV420SP_NV12) DECLARE_Utils(YUV420SP_NV21)
                 DECLARE_Utils(HSV) DECLARE_Utils(Lab) DECLARE_Utils(Depth)
 #undef DECLARE_Utils
 
     /*
      * ImageBitmapFormatUtils.
      */
-    /* static */ UtilsUniquePtr Utils::GetUtils(ImageBitmapFormat aFormat) {
+    /* static */
+    UtilsUniquePtr Utils::GetUtils(ImageBitmapFormat aFormat) {
   switch (aFormat) {
     case ImageBitmapFormat::RGBA32:
       return UtilsUniquePtr(&Utils_RGBA32::GetInstance());
     case ImageBitmapFormat::BGRA32:
       return UtilsUniquePtr(&Utils_BGRA32::GetInstance());
     case ImageBitmapFormat::RGB24:
       return UtilsUniquePtr(&Utils_RGB24::GetInstance());
     case ImageBitmapFormat::BGR24:
--- a/dom/canvas/OffscreenCanvas.cpp
+++ b/dom/canvas/OffscreenCanvas.cpp
@@ -51,17 +51,18 @@ OffscreenCanvas::OffscreenCanvas(nsIGlob
 
 OffscreenCanvas::~OffscreenCanvas() { ClearResources(); }
 
 JSObject* OffscreenCanvas::WrapObject(JSContext* aCx,
                                       JS::Handle<JSObject*> aGivenProto) {
   return OffscreenCanvas_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-/* static */ already_AddRefed<OffscreenCanvas> OffscreenCanvas::Constructor(
+/* static */
+already_AddRefed<OffscreenCanvas> OffscreenCanvas::Constructor(
     const GlobalObject& aGlobal, uint32_t aWidth, uint32_t aHeight,
     ErrorResult& aRv) {
   nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(aGlobal.GetAsSupports());
   RefPtr<OffscreenCanvas> offscreenCanvas = new OffscreenCanvas(
       global, aWidth, aHeight, layers::LayersBackend::LAYERS_NONE, nullptr);
   return offscreenCanvas.forget();
 }
 
@@ -274,31 +275,32 @@ nsCOMPtr<nsIGlobalObject> OffscreenCanva
   if (NS_IsMainThread()) {
     return GetParentObject();
   }
 
   dom::WorkerPrivate* workerPrivate = dom::GetCurrentThreadWorkerPrivate();
   return workerPrivate->GlobalScope();
 }
 
-/* static */ already_AddRefed<OffscreenCanvas>
-OffscreenCanvas::CreateFromCloneData(nsIGlobalObject* aGlobal,
-                                     OffscreenCanvasCloneData* aData) {
+/* static */
+already_AddRefed<OffscreenCanvas> OffscreenCanvas::CreateFromCloneData(
+    nsIGlobalObject* aGlobal, OffscreenCanvasCloneData* aData) {
   MOZ_ASSERT(aData);
   RefPtr<OffscreenCanvas> wc =
       new OffscreenCanvas(aGlobal, aData->mWidth, aData->mHeight,
                           aData->mCompositorBackendType, aData->mRenderer);
   if (aData->mNeutered) {
     wc->SetNeutered();
   }
   return wc.forget();
 }
 
-/* static */ bool OffscreenCanvas::PrefEnabledOnWorkerThread(JSContext* aCx,
-                                                             JSObject* aObj) {
+/* static */
+bool OffscreenCanvas::PrefEnabledOnWorkerThread(JSContext* aCx,
+                                                JSObject* aObj) {
   if (NS_IsMainThread()) {
     return true;
   }
 
   return DOMPrefs::gfx_offscreencanvas_enabled(aCx, aObj);
 }
 
 NS_IMPL_CYCLE_COLLECTION_INHERITED(OffscreenCanvas, DOMEventTargetHelper,
--- a/dom/canvas/WebGL1Context.cpp
+++ b/dom/canvas/WebGL1Context.cpp
@@ -6,19 +6,18 @@
 #include "WebGL1Context.h"
 
 #include "mozilla/dom/WebGLRenderingContextBinding.h"
 #include "mozilla/Telemetry.h"
 #include "WebGLFormats.h"
 
 namespace mozilla {
 
-/*static*/ WebGL1Context* WebGL1Context::Create() {
-  return new WebGL1Context();
-}
+/*static*/
+WebGL1Context* WebGL1Context::Create() { return new WebGL1Context(); }
 
 WebGL1Context::WebGL1Context() : WebGLContext() {}
 
 WebGL1Context::~WebGL1Context() {}
 
 UniquePtr<webgl::FormatUsageAuthority> WebGL1Context::CreateFormatUsage(
     gl::GLContext* gl) const {
   return webgl::FormatUsageAuthority::CreateForWebGL1(gl);
--- a/dom/canvas/WebGL2Context.cpp
+++ b/dom/canvas/WebGL2Context.cpp
@@ -25,23 +25,21 @@ WebGL2Context::WebGL2Context() : WebGLCo
 
 WebGL2Context::~WebGL2Context() {}
 
 UniquePtr<webgl::FormatUsageAuthority> WebGL2Context::CreateFormatUsage(
     gl::GLContext* gl) const {
   return webgl::FormatUsageAuthority::CreateForWebGL2(gl);
 }
 
-/*static*/ bool WebGL2Context::IsSupported() {
-  return gfxPrefs::WebGL2Enabled();
-}
+/*static*/
+bool WebGL2Context::IsSupported() { return gfxPrefs::WebGL2Enabled(); }
 
-/*static*/ WebGL2Context* WebGL2Context::Create() {
-  return new WebGL2Context();
-}
+/*static*/
+WebGL2Context* WebGL2Context::Create() { return new WebGL2Context(); }
 
 JSObject* WebGL2Context::WrapObject(JSContext* cx,
                                     JS::Handle<JSObject*> givenProto) {
   return dom::WebGL2RenderingContext_Binding::Wrap(cx, this, givenProto);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // WebGL 2 initialisation
--- a/dom/canvas/WebGL2ContextTextures.cpp
+++ b/dom/canvas/WebGL2ContextTextures.cpp
@@ -19,17 +19,18 @@ void WebGL2Context::TexStorage(uint8_t f
   WebGLTexture* tex;
   if (!ValidateTexTarget(this, funcDims, rawTarget, &target, &tex)) return;
 
   tex->TexStorage(target, levels, internalFormat, width, height, depth);
 }
 
 ////////////////////
 
-/*virtual*/ bool WebGL2Context::IsTexParamValid(GLenum pname) const {
+/*virtual*/
+bool WebGL2Context::IsTexParamValid(GLenum pname) const {
   switch (pname) {
     case LOCAL_GL_TEXTURE_BASE_LEVEL:
     case LOCAL_GL_TEXTURE_COMPARE_FUNC:
     case LOCAL_GL_TEXTURE_COMPARE_MODE:
     case LOCAL_GL_TEXTURE_IMMUTABLE_FORMAT:
     case LOCAL_GL_TEXTURE_IMMUTABLE_LEVELS:
     case LOCAL_GL_TEXTURE_MAX_LEVEL:
     case LOCAL_GL_TEXTURE_WRAP_R:
--- a/dom/canvas/WebGLContextTextures.cpp
+++ b/dom/canvas/WebGLContextTextures.cpp
@@ -155,17 +155,18 @@ bool ValidateTexImageTarget(WebGLContext
     return false;
   }
 
   *out_texImageTarget = texImageTarget;
   *out_tex = tex;
   return true;
 }
 
-/*virtual*/ bool WebGLContext::IsTexParamValid(GLenum pname) const {
+/*virtual*/
+bool WebGLContext::IsTexParamValid(GLenum pname) const {
   switch (pname) {
     case LOCAL_GL_TEXTURE_MIN_FILTER:
     case LOCAL_GL_TEXTURE_MAG_FILTER:
     case LOCAL_GL_TEXTURE_WRAP_S:
     case LOCAL_GL_TEXTURE_WRAP_T:
       return true;
 
     case LOCAL_GL_TEXTURE_MAX_ANISOTROPY_EXT:
--- a/dom/canvas/WebGLContextUtils.cpp
+++ b/dom/canvas/WebGLContextUtils.cpp
@@ -562,17 +562,18 @@ const char* GetEnumName(const GLenum val
     XX(NUM_SAMPLE_COUNTS);
     XX(TEXTURE_IMMUTABLE_LEVELS);
 #undef XX
   }
 
   return defaultRet;
 }
 
-/*static*/ void WebGLContext::EnumName(GLenum val, nsCString* out_name) {
+/*static*/
+void WebGLContext::EnumName(GLenum val, nsCString* out_name) {
   const char* name = GetEnumName(val, nullptr);
   if (name) {
     *out_name = name;
     return;
   }
 
   *out_name = nsPrintfCString("<enum 0x%04x>", val);
 }
--- a/dom/canvas/WebGLExtensionEXTColorBufferFloat.cpp
+++ b/dom/canvas/WebGLExtensionEXTColorBufferFloat.cpp
@@ -35,18 +35,18 @@ WebGLExtensionEXTColorBufferFloat::WebGL
   FOO(RG32F);
   FOO(RGBA32F);
 
   FOO(R11F_G11F_B10F);
 
 #undef FOO
 }
 
-/*static*/ bool WebGLExtensionEXTColorBufferFloat::IsSupported(
-    const WebGLContext* webgl) {
+/*static*/
+bool WebGLExtensionEXTColorBufferFloat::IsSupported(const WebGLContext* webgl) {
   if (!webgl->IsWebGL2()) return false;
 
   const gl::GLContext* gl = webgl->GL();
   return gl->IsSupported(gl::GLFeature::EXT_color_buffer_float);
 }
 
 IMPL_WEBGL_EXTENSION_GOOP(WebGLExtensionEXTColorBufferFloat,
                           EXT_color_buffer_float)
--- a/dom/canvas/WebGLFramebuffer.cpp
+++ b/dom/canvas/WebGLFramebuffer.cpp
@@ -1375,20 +1375,22 @@ static void GetBackbufferFormats(const W
       *out_depth = webgl::GetFormat(webgl::EffectiveFormat::DEPTH_COMPONENT16);
     }
     if (options.stencil) {
       *out_stencil = webgl::GetFormat(webgl::EffectiveFormat::STENCIL_INDEX8);
     }
   }
 }
 
-/*static*/ void WebGLFramebuffer::BlitFramebuffer(
-    WebGLContext* webgl, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
-    GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask,
-    GLenum filter) {
+/*static*/
+void WebGLFramebuffer::BlitFramebuffer(WebGLContext* webgl, GLint srcX0,
+                                       GLint srcY0, GLint srcX1, GLint srcY1,
+                                       GLint dstX0, GLint dstY0, GLint dstX1,
+                                       GLint dstY1, GLbitfield mask,
+                                       GLenum filter) {
   const GLbitfield depthAndStencilBits =
       LOCAL_GL_DEPTH_BUFFER_BIT | LOCAL_GL_STENCIL_BUFFER_BIT;
   if (bool(mask & depthAndStencilBits) && filter == LOCAL_GL_LINEAR) {
     webgl->ErrorInvalidOperation(
         "DEPTH_BUFFER_BIT and STENCIL_BUFFER_BIT can"
         " only be used with NEAREST filtering.");
     return;
   }
--- a/dom/canvas/WebGLMemoryTracker.cpp
+++ b/dom/canvas/WebGLMemoryTracker.cpp
@@ -119,89 +119,96 @@ int64_t WebGLMemoryTracker::GetShaderSiz
     for (const WebGLShader* shader = contexts[i]->mShaders.getFirst(); shader;
          shader = shader->getNext()) {
       result += shader->SizeOfIncludingThis(WebGLShaderMallocSizeOf);
     }
   }
   return result;
 }
 
-/*static*/ int64_t WebGLMemoryTracker::GetTextureMemoryUsed() {
+/*static*/
+int64_t WebGLMemoryTracker::GetTextureMemoryUsed() {
   const ContextsArrayType& contexts = Contexts();
   int64_t result = 0;
   for (size_t i = 0; i < contexts.Length(); ++i) {
     for (const WebGLTexture* texture = contexts[i]->mTextures.getFirst();
          texture; texture = texture->getNext()) {
       result += texture->MemoryUsage();
     }
   }
   return result;
 }
 
-/*static*/ int64_t WebGLMemoryTracker::GetTextureCount() {
+/*static*/
+int64_t WebGLMemoryTracker::GetTextureCount() {
   const ContextsArrayType& contexts = Contexts();
   int64_t result = 0;
   for (size_t i = 0; i < contexts.Length(); ++i) {
     for (const WebGLTexture* texture = contexts[i]->mTextures.getFirst();
          texture; texture = texture->getNext()) {
       result++;
     }
   }
   return result;
 }
 
-/*static*/ int64_t WebGLMemoryTracker::GetBufferMemoryUsed() {
+/*static*/
+int64_t WebGLMemoryTracker::GetBufferMemoryUsed() {
   const ContextsArrayType& contexts = Contexts();
   int64_t result = 0;
   for (size_t i = 0; i < contexts.Length(); ++i) {
     for (const WebGLBuffer* buffer = contexts[i]->mBuffers.getFirst(); buffer;
          buffer = buffer->getNext()) {
       result += buffer->ByteLength();
     }
   }
   return result;
 }
 
-/*static*/ int64_t WebGLMemoryTracker::GetBufferCount() {
+/*static*/
+int64_t WebGLMemoryTracker::GetBufferCount() {
   const ContextsArrayType& contexts = Contexts();
   int64_t result = 0;
   for (size_t i = 0; i < contexts.Length(); ++i) {
     for (const WebGLBuffer* buffer = contexts[i]->mBuffers.getFirst(); buffer;
          buffer = buffer->getNext()) {
       result++;
     }
   }
   return result;
 }
 
-/*static*/ int64_t WebGLMemoryTracker::GetRenderbufferMemoryUsed() {
+/*static*/
+int64_t WebGLMemoryTracker::GetRenderbufferMemoryUsed() {
   const ContextsArrayType& contexts = Contexts();
   int64_t result = 0;
   for (size_t i = 0; i < contexts.Length(); ++i) {
     for (const WebGLRenderbuffer* rb = contexts[i]->mRenderbuffers.getFirst();
          rb; rb = rb->getNext()) {
       result += rb->MemoryUsage();
     }
   }
   return result;
 }
 
-/*static*/ int64_t WebGLMemoryTracker::GetRenderbufferCount() {
+/*static*/
+int64_t WebGLMemoryTracker::GetRenderbufferCount() {
   const ContextsArrayType& contexts = Contexts();
   int64_t result = 0;
   for (size_t i = 0; i < contexts.Length(); ++i) {
     for (const WebGLRenderbuffer* rb = contexts[i]->mRenderbuffers.getFirst();
          rb; rb = rb->getNext()) {
       result++;
     }
   }
   return result;
 }
 
-/*static*/ int64_t WebGLMemoryTracker::GetShaderCount() {
+/*static*/
+int64_t WebGLMemoryTracker::GetShaderCount() {
   const ContextsArrayType& contexts = Contexts();
   int64_t result = 0;
   for (size_t i = 0; i < contexts.Length(); ++i) {
     for (const WebGLShader* shader = contexts[i]->mShaders.getFirst(); shader;
          shader = shader->getNext()) {
       result++;
     }
   }
--- a/dom/canvas/WebGLProgram.cpp
+++ b/dom/canvas/WebGLProgram.cpp
@@ -73,17 +73,18 @@ static void AssembleName(const nsCString
     out_name->Append('[');
     out_name->AppendInt(uint64_t(arrayIndex));
     out_name->Append(']');
   }
 }
 
 ////
 
-/*static*/ const webgl::UniformInfo::TexListT* webgl::UniformInfo::GetTexList(
+/*static*/
+const webgl::UniformInfo::TexListT* webgl::UniformInfo::GetTexList(
     WebGLActiveInfo* activeInfo) {
   const auto& webgl = activeInfo->mWebGL;
 
   switch (activeInfo->mElemType) {
     case LOCAL_GL_SAMPLER_2D:
     case LOCAL_GL_SAMPLER_2D_SHADOW:
     case LOCAL_GL_INT_SAMPLER_2D:
     case LOCAL_GL_UNSIGNED_INT_SAMPLER_2D:
--- a/dom/canvas/WebGLShaderValidator.cpp
+++ b/dom/canvas/WebGLShaderValidator.cpp
@@ -203,19 +203,21 @@ webgl::ShaderValidator* WebGLContext::Cr
   return webgl::ShaderValidator::Create(shaderType, spec, outputLanguage,
                                         resources, compileOptions);
 }
 
 ////////////////////////////////////////
 
 namespace webgl {
 
-/*static*/ ShaderValidator* ShaderValidator::Create(
-    GLenum shaderType, ShShaderSpec spec, ShShaderOutput outputLanguage,
-    const ShBuiltInResources& resources, ShCompileOptions compileOptions) {
+/*static*/
+ShaderValidator* ShaderValidator::Create(GLenum shaderType, ShShaderSpec spec,
+                                         ShShaderOutput outputLanguage,
+                                         const ShBuiltInResources& resources,
+                                         ShCompileOptions compileOptions) {
   ShHandle handle =
       sh::ConstructCompiler(shaderType, spec, outputLanguage, &resources);
   MOZ_RELEASE_ASSERT(handle);
   if (!handle) return nullptr;
 
   return new ShaderValidator(handle, compileOptions,
                              resources.MaxVaryingVectors);
 }
--- a/dom/chrome-webidl/WebExtensionPolicy.webidl
+++ b/dom/chrome-webidl/WebExtensionPolicy.webidl
@@ -181,16 +181,30 @@ interface WebExtensionPolicy {
    * for it.
    */
   static WebExtensionPolicy? getByURI(URI uri);
 
   /**
    * Returns true if the URI is restricted for any extension.
    */
   static boolean isRestrictedURI(URI uri);
+
+  /**
+   * When present, the extension is not yet ready to load URLs. In that case,
+   * this policy object is a stub, and the attribute contains a promise which
+   * resolves to a new, non-stub policy object when the extension is ready.
+   *
+   * This may be used to delay operations, such as loading extension pages,
+   * which depend on extensions being fully initialized.
+   *
+   * Note: This will always be either a Promise<WebExtensionPolicy> or null,
+   * but the WebIDL grammar does not allow us to specify a nullable Promise
+   * type.
+   */
+  readonly attribute object? readyPromise;
 };
 
 dictionary WebExtensionInit {
   required DOMString id;
 
   required ByteString mozExtensionHostname;
 
   required DOMString baseURL;
@@ -205,9 +219,11 @@ dictionary WebExtensionInit {
 
   sequence<MatchGlobOrString> webAccessibleResources = [];
 
   sequence<WebExtensionContentScriptInit> contentScripts = [];
 
   DOMString? contentSecurityPolicy = null;
 
   sequence<DOMString>? backgroundScripts = null;
+
+  Promise<WebExtensionPolicy> readyPromise;
 };
--- a/dom/console/Console.cpp
+++ b/dom/console/Console.cpp
@@ -918,18 +918,20 @@ NS_IMPL_CYCLE_COLLECTING_ADDREF(Console)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(Console)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(Console)
   NS_INTERFACE_MAP_ENTRY(nsIObserver)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIObserver)
   NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
 NS_INTERFACE_MAP_END
 
-/* static */ already_AddRefed<Console> Console::Create(
-    JSContext* aCx, nsPIDOMWindowInner* aWindow, ErrorResult& aRv) {
+/* static */
+already_AddRefed<Console> Console::Create(JSContext* aCx,
+                                          nsPIDOMWindowInner* aWindow,
+                                          ErrorResult& aRv) {
   MOZ_ASSERT_IF(NS_IsMainThread(), aWindow);
 
   uint64_t outerWindowID = 0;
   uint64_t innerWindowID = 0;
 
   if (aWindow) {
     innerWindowID = aWindow->WindowID();
 
@@ -947,19 +949,22 @@ NS_INTERFACE_MAP_END
   console->Initialize(aRv);
   if (NS_WARN_IF(aRv.Failed())) {
     return nullptr;
   }
 
   return console.forget();
 }
 
-/* static */ already_AddRefed<Console> Console::CreateForWorklet(
-    JSContext* aCx, nsIGlobalObject* aGlobal, uint64_t aOuterWindowID,
-    uint64_t aInnerWindowID, ErrorResult& aRv) {
+/* static */
+already_AddRefed<Console> Console::CreateForWorklet(JSContext* aCx,
+                                                    nsIGlobalObject* aGlobal,
+                                                    uint64_t aOuterWindowID,
+                                                    uint64_t aInnerWindowID,
+                                                    ErrorResult& aRv) {
   WorkletThread::AssertIsOnWorkletThread();
 
   RefPtr<Console> console =
       new Console(aCx, aGlobal, aOuterWindowID, aInnerWindowID);
   console->Initialize(aRv);
   if (NS_WARN_IF(aRv.Failed())) {
     return nullptr;
   }
@@ -1096,50 +1101,52 @@ METHOD(Trace, "trace")
 METHOD(Dir, "dir");
 METHOD(Dirxml, "dirxml");
 
 METHOD(Group, "group")
 METHOD(GroupCollapsed, "groupCollapsed")
 
 #undef METHOD
 
-/* static */ void Console::Clear(const GlobalObject& aGlobal) {
+/* static */
+void Console::Clear(const GlobalObject& aGlobal) {
   const Sequence<JS::Value> data;
   Method(aGlobal, MethodClear, NS_LITERAL_STRING("clear"), data);
 }
 
-/* static */ void Console::GroupEnd(const GlobalObject& aGlobal) {
+/* static */
+void Console::GroupEnd(const GlobalObject& aGlobal) {
   const Sequence<JS::Value> data;
   Method(aGlobal, MethodGroupEnd, NS_LITERAL_STRING("groupEnd"), data);
 }
 
-/* static */ void Console::Time(const GlobalObject& aGlobal,
-                                const nsAString& aLabel) {
+/* static */
+void Console::Time(const GlobalObject& aGlobal, const nsAString& aLabel) {
   StringMethod(aGlobal, aLabel, Sequence<JS::Value>(), MethodTime,
                NS_LITERAL_STRING("time"));
 }
 
-/* static */ void Console::TimeEnd(const GlobalObject& aGlobal,
-                                   const nsAString& aLabel) {
+/* static */
+void Console::TimeEnd(const GlobalObject& aGlobal, const nsAString& aLabel) {
   StringMethod(aGlobal, aLabel, Sequence<JS::Value>(), MethodTimeEnd,
                NS_LITERAL_STRING("timeEnd"));
 }
 
-/* static */ void Console::TimeLog(const GlobalObject& aGlobal,
-                                   const nsAString& aLabel,
-                                   const Sequence<JS::Value>& aData) {
+/* static */
+void Console::TimeLog(const GlobalObject& aGlobal, const nsAString& aLabel,
+                      const Sequence<JS::Value>& aData) {
   StringMethod(aGlobal, aLabel, aData, MethodTimeLog,
                NS_LITERAL_STRING("timeLog"));
 }
 
-/* static */ void Console::StringMethod(const GlobalObject& aGlobal,
-                                        const nsAString& aLabel,
-                                        const Sequence<JS::Value>& aData,
-                                        MethodName aMethodName,
-                                        const nsAString& aMethodString) {
+/* static */
+void Console::StringMethod(const GlobalObject& aGlobal, const nsAString& aLabel,
+                           const Sequence<JS::Value>& aData,
+                           MethodName aMethodName,
+                           const nsAString& aMethodString) {
   RefPtr<Console> console = GetConsole(aGlobal);
   if (!console) {
     return;
   }
 
   console->StringMethodInternal(aGlobal.Context(), aLabel, aData, aMethodName,
                                 aMethodString);
 }
@@ -1166,47 +1173,50 @@ void Console::StringMethodInternal(JSCon
     if (!data.AppendElement(aData[i], fallible)) {
       return;
     }
   }
 
   MethodInternal(aCx, aMethodName, aMethodString, data);
 }
 
-/* static */ void Console::TimeStamp(const GlobalObject& aGlobal,
-                                     const JS::Handle<JS::Value> aData) {
+/* static */
+void Console::TimeStamp(const GlobalObject& aGlobal,
+                        const JS::Handle<JS::Value> aData) {
   JSContext* cx = aGlobal.Context();
 
   ConsoleCommon::ClearException ce(cx);
 
   Sequence<JS::Value> data;
   SequenceRooter<JS::Value> rooter(cx, &data);
 
   if (aData.isString() && !data.AppendElement(aData, fallible)) {
     return;
   }
 
   Method(aGlobal, MethodTimeStamp, NS_LITERAL_STRING("timeStamp"), data);
 }
 
-/* static */ void Console::Profile(const GlobalObject& aGlobal,
-                                   const Sequence<JS::Value>& aData) {
+/* static */
+void Console::Profile(const GlobalObject& aGlobal,
+                      const Sequence<JS::Value>& aData) {
   ProfileMethod(aGlobal, MethodProfile, NS_LITERAL_STRING("profile"), aData);
 }
 
-/* static */ void Console::ProfileEnd(const GlobalObject& aGlobal,
-                                      const Sequence<JS::Value>& aData) {
+/* static */
+void Console::ProfileEnd(const GlobalObject& aGlobal,
+                         const Sequence<JS::Value>& aData) {
   ProfileMethod(aGlobal, MethodProfileEnd, NS_LITERAL_STRING("profileEnd"),
                 aData);
 }
 
-/* static */ void Console::ProfileMethod(const GlobalObject& aGlobal,
-                                         MethodName aName,
-                                         const nsAString& aAction,
-                                         const Sequence<JS::Value>& aData) {
+/* static */
+void Console::ProfileMethod(const GlobalObject& aGlobal, MethodName aName,
+                            const nsAString& aAction,
+                            const Sequence<JS::Value>& aData) {
   RefPtr<Console> console = GetConsole(aGlobal);
   if (!console) {
     return;
   }
 
   JSContext* cx = aGlobal.Context();
   console->ProfileMethodInternal(cx, aName, aAction, aData);
 }
@@ -1291,31 +1301,32 @@ void Console::ProfileMethodInternal(JSCo
   }
 
   nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
   if (obs) {
     obs->NotifyObservers(wrapper, "console-api-profiler", nullptr);
   }
 }
 
-/* static */ void Console::Assert(const GlobalObject& aGlobal, bool aCondition,
-                                  const Sequence<JS::Value>& aData) {
+/* static */
+void Console::Assert(const GlobalObject& aGlobal, bool aCondition,
+                     const Sequence<JS::Value>& aData) {
   if (!aCondition) {
     Method(aGlobal, MethodAssert, NS_LITERAL_STRING("assert"), aData);
   }
 }
 
-/* static */ void Console::Count(const GlobalObject& aGlobal,
-                                 const nsAString& aLabel) {
+/* static */
+void Console::Count(const GlobalObject& aGlobal, const nsAString& aLabel) {
   StringMethod(aGlobal, aLabel, Sequence<JS::Value>(), MethodCount,
                NS_LITERAL_STRING("count"));
 }
 
-/* static */ void Console::CountReset(const GlobalObject& aGlobal,
-                                      const nsAString& aLabel) {
+/* static */
+void Console::CountReset(const GlobalObject& aGlobal, const nsAString& aLabel) {
   StringMethod(aGlobal, aLabel, Sequence<JS::Value>(), MethodCountReset,
                NS_LITERAL_STRING("countReset"));
 }
 
 namespace {
 
 void StackFrameToStackEntry(JSContext* aCx, nsIStackFrame* aStackFrame,
                             ConsoleStackEntry& aStackEntry) {
@@ -1351,20 +1362,20 @@ void ReifyStack(JSContext* aCx, nsIStack
     }
     stack.swap(caller);
   }
 }
 
 }  // anonymous namespace
 
 // Queue a call to a console method. See the CALL_DELAY constant.
-/* static */ void Console::Method(const GlobalObject& aGlobal,
-                                  MethodName aMethodName,
-                                  const nsAString& aMethodString,
-                                  const Sequence<JS::Value>& aData) {
+/* static */
+void Console::Method(const GlobalObject& aGlobal, MethodName aMethodName,
+                     const nsAString& aMethodString,
+                     const Sequence<JS::Value>& aData) {
   RefPtr<Console> console = GetConsole(aGlobal);
   if (!console) {
     return;
   }
 
   console->MethodInternal(aGlobal.Context(), aMethodName, aMethodString, aData);
 }
 
@@ -2557,35 +2568,36 @@ void Console::AssertIsOnOwningThread() c
   NS_ASSERT_OWNINGTHREAD(Console);
 }
 
 bool Console::IsShuttingDown() const {
   MOZ_ASSERT(mStatus != eUnknown);
   return mStatus == eShuttingDown;
 }
 
-/* static */ already_AddRefed<Console> Console::GetConsole(
-    const GlobalObject& aGlobal) {
+/* static */
+already_AddRefed<Console> Console::GetConsole(const GlobalObject& aGlobal) {
   ErrorResult rv;
   RefPtr<Console> console = GetConsoleInternal(aGlobal, rv);
   if (NS_WARN_IF(rv.Failed()) || !console) {
     rv.SuppressException();
     return nullptr;
   }
 
   console->AssertIsOnOwningThread();
 
   if (console->IsShuttingDown()) {
     return nullptr;
   }
 
   return console.forget();
 }
 
-/* static */ already_AddRefed<Console> Console::GetConsoleInternal(
+/* static */
+already_AddRefed<Console> Console::GetConsoleInternal(
     const GlobalObject& aGlobal, ErrorResult& aRv) {
   // Window
   if (NS_IsMainThread()) {
     nsCOMPtr<nsPIDOMWindowInner> innerWindow =
         do_QueryInterface(aGlobal.GetAsSupports());
 
     // we are probably running a chrome script.
     if (!innerWindow) {
@@ -2712,17 +2724,18 @@ bool Console::MonotonicTimer(JSContext* 
 
   WorkerPrivate* workerPrivate = GetCurrentThreadWorkerPrivate();
   MOZ_ASSERT(workerPrivate);
 
   *aTimeStamp = workerPrivate->TimeStampToDOMHighRes(TimeStamp::Now());
   return true;
 }
 
-/* static */ already_AddRefed<ConsoleInstance> Console::CreateInstance(
+/* static */
+already_AddRefed<ConsoleInstance> Console::CreateInstance(
     const GlobalObject& aGlobal, const ConsoleInstanceOptions& aOptions) {
   RefPtr<ConsoleInstance> console =
       new ConsoleInstance(aGlobal.Context(), aOptions);
   return console.forget();
 }
 
 void Console::MaybeExecuteDumpFunction(JSContext* aCx,
                                        const nsAString& aMethodName,
--- a/dom/console/ConsoleUtils.cpp
+++ b/dom/console/ConsoleUtils.cpp
@@ -14,34 +14,38 @@ namespace mozilla {
 namespace dom {
 
 namespace {
 
 StaticRefPtr<ConsoleUtils> gConsoleUtilsService;
 
 }
 
-/* static */ ConsoleUtils* ConsoleUtils::GetOrCreate() {
+/* static */
+ConsoleUtils* ConsoleUtils::GetOrCreate() {
   if (!gConsoleUtilsService) {
     MOZ_ASSERT(NS_IsMainThread());
 
     gConsoleUtilsService = new ConsoleUtils();
     ClearOnShutdown(&gConsoleUtilsService);
   }
 
   return gConsoleUtilsService;
 }
 
 ConsoleUtils::ConsoleUtils() = default;
 ConsoleUtils::~ConsoleUtils() = default;
 
-/* static */ void ConsoleUtils::ReportForServiceWorkerScope(
-    const nsAString& aScope, const nsAString& aMessage,
-    const nsAString& aFilename, uint32_t aLineNumber, uint32_t aColumnNumber,
-    Level aLevel) {
+/* static */
+void ConsoleUtils::ReportForServiceWorkerScope(const nsAString& aScope,
+                                               const nsAString& aMessage,
+                                               const nsAString& aFilename,
+                                               uint32_t aLineNumber,
+                                               uint32_t aColumnNumber,
+                                               Level aLevel) {
   MOZ_ASSERT(NS_IsMainThread());
 
   RefPtr<ConsoleUtils> service = ConsoleUtils::GetOrCreate();
   if (NS_WARN_IF(!service)) {
     return;
   }
 
   service->ReportForServiceWorkerScopeInternal(
--- a/dom/crypto/WebCryptoThreadPool.cpp
+++ b/dom/crypto/WebCryptoThreadPool.cpp
@@ -18,30 +18,32 @@
 
 namespace mozilla {
 namespace dom {
 
 StaticRefPtr<WebCryptoThreadPool> gInstance;
 
 NS_IMPL_ISUPPORTS(WebCryptoThreadPool, nsIObserver)
 
-/* static */ void WebCryptoThreadPool::Initialize() {
+/* static */
+void WebCryptoThreadPool::Initialize() {
   MOZ_ASSERT(NS_IsMainThread(), "Wrong thread!");
   MOZ_ASSERT(!gInstance, "More than one instance!");
 
   gInstance = new WebCryptoThreadPool();
   NS_WARNING_ASSERTION(gInstance, "Failed create thread pool!");
 
   if (gInstance && NS_FAILED(gInstance->Init())) {
     NS_WARNING("Failed to initialize thread pool!");
     gInstance = nullptr;
   }
 }
 
-/* static */ nsresult WebCryptoThreadPool::Dispatch(nsIRunnable* aRunnable) {
+/* static */
+nsresult WebCryptoThreadPool::Dispatch(nsIRunnable* aRunnable) {
   if (gInstance) {
     return gInstance->DispatchInternal(aRunnable);
   }
 
   // Fail if called on shutdown.
   return NS_ERROR_FAILURE;
 }
 
--- a/dom/events/Clipboard.cpp
+++ b/dom/events/Clipboard.cpp
@@ -173,26 +173,28 @@ already_AddRefed<Promise> Clipboard::Wri
   return Write(aCx, *dataTransfer, aSubjectPrincipal, aRv);
 }
 
 JSObject* Clipboard::WrapObject(JSContext* aCx,
                                 JS::Handle<JSObject*> aGivenProto) {
   return Clipboard_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-/* static */ LogModule* Clipboard::GetClipboardLog() { return gClipboardLog; }
+/* static */
+LogModule* Clipboard::GetClipboardLog() { return gClipboardLog; }
 
-/* static */ bool Clipboard::ReadTextEnabled(JSContext* aCx,
-                                             JSObject* aGlobal) {
+/* static */
+bool Clipboard::ReadTextEnabled(JSContext* aCx, JSObject* aGlobal) {
   nsIPrincipal* prin = nsContentUtils::SubjectPrincipal(aCx);
   return IsTestingPrefEnabled() || prin->GetIsAddonOrExpandedAddonPrincipal() ||
          prin->IsSystemPrincipal();
 }
 
-/* static */ bool Clipboard::IsTestingPrefEnabled() {
+/* static */
+bool Clipboard::IsTestingPrefEnabled() {
   static bool sPrefCached = false;
   static bool sPrefCacheValue = false;
 
   if (!sPrefCached) {
     sPrefCached = true;
     Preferences::AddBoolVarCache(&sPrefCacheValue,
                                  "dom.events.testing.asyncClipboard");
   }
--- a/dom/events/ContentEventHandler.cpp
+++ b/dom/events/ContentEventHandler.cpp
@@ -567,60 +567,66 @@ static uint32_t CountNewlinesInNativeLen
       ++newlines;
       ++nativeOffset;
     }
   }
   return newlines;
 }
 #endif
 
-/* static */ uint32_t ContentEventHandler::GetNativeTextLength(
-    nsIContent* aContent, uint32_t aStartOffset, uint32_t aEndOffset) {
+/* static */
+uint32_t ContentEventHandler::GetNativeTextLength(nsIContent* aContent,
+                                                  uint32_t aStartOffset,
+                                                  uint32_t aEndOffset) {
   MOZ_ASSERT(aEndOffset >= aStartOffset,
              "aEndOffset must be equals or larger than aStartOffset");
   if (NS_WARN_IF(!aContent->IsText())) {
     return 0;
   }
   if (aStartOffset == aEndOffset) {
     return 0;
   }
   return GetTextLength(aContent, LINE_BREAK_TYPE_NATIVE, aEndOffset) -
          GetTextLength(aContent, LINE_BREAK_TYPE_NATIVE, aStartOffset);
 }
 
-/* static */ uint32_t ContentEventHandler::GetNativeTextLength(
-    nsIContent* aContent, uint32_t aMaxLength) {
+/* static */
+uint32_t ContentEventHandler::GetNativeTextLength(nsIContent* aContent,
+                                                  uint32_t aMaxLength) {
   if (NS_WARN_IF(!aContent->IsText())) {
     return 0;
   }
   return GetTextLength(aContent, LINE_BREAK_TYPE_NATIVE, aMaxLength);
 }
 
-/* static */ uint32_t ContentEventHandler::GetNativeTextLengthBefore(
-    nsIContent* aContent, nsINode* aRootNode) {
+/* static */
+uint32_t ContentEventHandler::GetNativeTextLengthBefore(nsIContent* aContent,
+                                                        nsINode* aRootNode) {
   if (NS_WARN_IF(aContent->IsText())) {
     return 0;
   }
   return ShouldBreakLineBefore(aContent, aRootNode)
              ? GetBRLength(LINE_BREAK_TYPE_NATIVE)
              : 0;
 }
 
-/* static inline */ uint32_t ContentEventHandler::GetBRLength(
-    LineBreakType aLineBreakType) {
+/* static inline */
+uint32_t ContentEventHandler::GetBRLength(LineBreakType aLineBreakType) {
 #if defined(XP_WIN)
   // Length of \r\n
   return (aLineBreakType == LINE_BREAK_TYPE_NATIVE) ? 2 : 1;
 #else
   return 1;
 #endif
 }
 
-/* static */ uint32_t ContentEventHandler::GetTextLength(
-    nsIContent* aContent, LineBreakType aLineBreakType, uint32_t aMaxLength) {
+/* static */
+uint32_t ContentEventHandler::GetTextLength(nsIContent* aContent,
+                                            LineBreakType aLineBreakType,
+                                            uint32_t aMaxLength) {
   MOZ_ASSERT(aContent->IsText());
 
   uint32_t textLengthDifference =
 #if defined(XP_WIN)
       // On Windows, the length of a native newline ("\r\n") is twice the length
       // of the XP newline ("\n"), so XP length is equal to the length of the
       // native offset plus the number of newlines encountered in the string.
       (aLineBreakType == LINE_BREAK_TYPE_NATIVE)
@@ -647,18 +653,19 @@ static uint32_t ConvertToXPOffset(nsICon
   // offset minus the number of newlines encountered in the string.
   return aNativeOffset - CountNewlinesInNativeLength(aContent, aNativeOffset);
 #else
   // On other platforms, the native and XP newlines are the same.
   return aNativeOffset;
 #endif
 }
 
-/* static */ bool ContentEventHandler::ShouldBreakLineBefore(
-    nsIContent* aContent, nsINode* aRootNode) {
+/* static */
+bool ContentEventHandler::ShouldBreakLineBefore(nsIContent* aContent,
+                                                nsINode* aRootNode) {
   // We don't need to append linebreak at the start of the root element.
   if (aContent == aRootNode) {
     return false;
   }
 
   // If it's not an HTML element (including other markup language's elements),
   // we shouldn't insert like break before that for now.  Becoming this is a
   // problem must be edge case.  E.g., when ContentEventHandler is used with
@@ -768,30 +775,34 @@ nsresult ContentEventHandler::GenerateFl
 
 static FontRange* AppendFontRange(nsTArray<FontRange>& aFontRanges,
                                   uint32_t aBaseOffset) {
   FontRange* fontRange = aFontRanges.AppendElement();
   fontRange->mStartOffset = aBaseOffset;
   return fontRange;
 }
 
-/* static */ uint32_t ContentEventHandler::GetTextLengthInRange(
+/* static */
+uint32_t ContentEventHandler::GetTextLengthInRange(
     nsIContent* aContent, uint32_t aXPStartOffset, uint32_t aXPEndOffset,
     LineBreakType aLineBreakType) {
   MOZ_ASSERT(aContent->IsText());
 
   return aLineBreakType == LINE_BREAK_TYPE_NATIVE
              ? GetNativeTextLength(aContent, aXPStartOffset, aXPEndOffset)
              : aXPEndOffset - aXPStartOffset;
 }
 
-/* static */ void ContentEventHandler::AppendFontRanges(
-    FontRangeArray& aFontRanges, nsIContent* aContent, uint32_t aBaseOffset,
-    uint32_t aXPStartOffset, uint32_t aXPEndOffset,
-    LineBreakType aLineBreakType) {
+/* static */
+void ContentEventHandler::AppendFontRanges(FontRangeArray& aFontRanges,
+                                           nsIContent* aContent,
+                                           uint32_t aBaseOffset,
+                                           uint32_t aXPStartOffset,
+                                           uint32_t aXPEndOffset,
+                                           LineBreakType aLineBreakType) {
   MOZ_ASSERT(aContent->IsText());
 
   nsIFrame* frame = aContent->GetPrimaryFrame();
   if (!frame) {
     // It is a non-rendered content, create an empty range for it.
     AppendFontRange(aFontRanges, aBaseOffset);
     return;
   }
@@ -1234,28 +1245,30 @@ nsresult ContentEventHandler::SetRawRang
   // Rule #2.5: ]</root>
   rv = aRawRange->SetEnd(mRootContent, mRootContent->GetChildCount());
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return rv;
   }
   return NS_OK;
 }
 
-/* static */ LineBreakType ContentEventHandler::GetLineBreakType(
+/* static */
+LineBreakType ContentEventHandler::GetLineBreakType(
     WidgetQueryContentEvent* aEvent) {
   return GetLineBreakType(aEvent->mUseNativeLineBreak);
 }
 
-/* static */ LineBreakType ContentEventHandler::GetLineBreakType(
+/* static */
+LineBreakType ContentEventHandler::GetLineBreakType(
     WidgetSelectionEvent* aEvent) {
   return GetLineBreakType(aEvent->mUseNativeLineBreak);
 }
 
-/* static */ LineBreakType ContentEventHandler::GetLineBreakType(
-    bool aUseNativeLineBreak) {
+/* static */
+LineBreakType ContentEventHandler::GetLineBreakType(bool aUseNativeLineBreak) {
   return aUseNativeLineBreak ? LINE_BREAK_TYPE_NATIVE : LINE_BREAK_TYPE_XP;
 }
 
 nsresult ContentEventHandler::HandleQueryContentEvent(
     WidgetQueryContentEvent* aEvent) {
   switch (aEvent->mMessage) {
     case eQuerySelectedText:
       return OnQuerySelectedText(aEvent);
@@ -2639,17 +2652,18 @@ nsresult ContentEventHandler::OnQueryDOM
       aEvent->mReply.mWidgetIsHit = true;
     }
   }
 
   aEvent->mSucceeded = true;
   return NS_OK;
 }
 
-/* static */ nsresult ContentEventHandler::GetFlatTextLengthInRange(
+/* static */
+nsresult ContentEventHandler::GetFlatTextLengthInRange(
     const NodePosition& aStartPosition, const NodePosition& aEndPosition,
     nsIContent* aRootContent, uint32_t* aLength, LineBreakType aLineBreakType,
     bool aIsRemovingNode /* = false */) {
   if (NS_WARN_IF(!aRootContent) || NS_WARN_IF(!aStartPosition.IsSet()) ||
       NS_WARN_IF(!aEndPosition.IsSet()) || NS_WARN_IF(!aLength)) {
     return NS_ERROR_INVALID_ARG;
   }
 
--- a/dom/events/DataTransfer.cpp
+++ b/dom/events/DataTransfer.cpp
@@ -598,19 +598,20 @@ void DataTransfer::MozGetDataAt(JSContex
 
   JS::Rooted<JS::Value> result(aCx);
   if (!VariantToJsval(aCx, data, aRetval)) {
     aRv = NS_ERROR_FAILURE;
     return;
   }
 }
 
-/* static */ bool DataTransfer::PrincipalMaySetData(const nsAString& aType,
-                                                    nsIVariant* aData,
-                                                    nsIPrincipal* aPrincipal) {
+/* static */
+bool DataTransfer::PrincipalMaySetData(const nsAString& aType,
+                                       nsIVariant* aData,
+                                       nsIPrincipal* aPrincipal) {
   if (!nsContentUtils::IsSystemPrincipal(aPrincipal)) {
     DataTransferItem::eKind kind = DataTransferItem::KindFromData(aData);
     if (kind == DataTransferItem::KIND_OTHER) {
       NS_WARNING("Disallowing adding non string/file types to DataTransfer");
       return false;
     }
 
     if (aType.EqualsASCII(kFileMime) || aType.EqualsASCII(kFilePromiseMime)) {
--- a/dom/events/EventDispatcher.cpp
+++ b/dom/events/EventDispatcher.cpp
@@ -637,17 +637,18 @@ void EventTargetChainItem::HandleEventTa
     // system group listeners don't affect to the event.
     aVisitor.mEvent->mFlags.mPropagationStopped = false;
     aVisitor.mEvent->mFlags.mImmediatePropagationStopped = false;
   }
 }
 
 static nsTArray<EventTargetChainItem>* sCachedMainThreadChain = nullptr;
 
-/* static */ void EventDispatcher::Shutdown() {
+/* static */
+void EventDispatcher::Shutdown() {
   delete sCachedMainThreadChain;
   sCachedMainThreadChain = nullptr;
 }
 
 EventTargetChainItem* EventTargetChainItemForChromeTarget(
     nsTArray<EventTargetChainItem>& aChain, nsINode* aNode,
     EventTargetChainItem* aChild = nullptr) {
   if (!aNode->IsInComposedDoc()) {
@@ -703,20 +704,23 @@ static bool ShouldClearTargets(WidgetEve
       finalRelatedTarget->SubtreeRoot()->IsShadowRoot()) {
     return true;
   }
   // XXXsmaug Check also all the touch objects.
 
   return false;
 }
 
-/* static */ nsresult EventDispatcher::Dispatch(
-    nsISupports* aTarget, nsPresContext* aPresContext, WidgetEvent* aEvent,
-    Event* aDOMEvent, nsEventStatus* aEventStatus,
-    EventDispatchingCallback* aCallback, nsTArray<EventTarget*>* aTargets) {
+/* static */
+nsresult EventDispatcher::Dispatch(nsISupports* aTarget,
+                                   nsPresContext* aPresContext,
+                                   WidgetEvent* aEvent, Event* aDOMEvent,
+                                   nsEventStatus* aEventStatus,
+                                   EventDispatchingCallback* aCallback,
+                                   nsTArray<EventTarget*>* aTargets) {
   AUTO_PROFILER_LABEL("EventDispatcher::Dispatch", OTHER);
 
   NS_ASSERTION(aEvent, "Trying to dispatch without WidgetEvent!");
   NS_ENSURE_TRUE(!aEvent->mFlags.mIsBeingDispatched,
                  NS_ERROR_DOM_INVALID_STATE_ERR);
   NS_ASSERTION(!aTargets || !aEvent->mMessage, "Wrong parameters!");
 
   // If we're dispatching an already created DOMEvent object, make
@@ -1107,19 +1111,22 @@ static bool ShouldClearTargets(WidgetEve
   if (cd.IsMainThread() && chain.Capacity() == 128 && sCachedMainThreadChain) {
     chain.ClearAndRetainStorage();
     chain.SwapElements(*sCachedMainThreadChain);
   }
 
   return rv;
 }
 
-/* static */ nsresult EventDispatcher::DispatchDOMEvent(
-    nsISupports* aTarget, WidgetEvent* aEvent, Event* aDOMEvent,
-    nsPresContext* aPresContext, nsEventStatus* aEventStatus) {
+/* static */
+nsresult EventDispatcher::DispatchDOMEvent(nsISupports* aTarget,
+                                           WidgetEvent* aEvent,
+                                           Event* aDOMEvent,
+                                           nsPresContext* aPresContext,
+                                           nsEventStatus* aEventStatus) {
   if (aDOMEvent) {
     WidgetEvent* innerEvent = aDOMEvent->WidgetEventPtr();
     NS_ENSURE_TRUE(innerEvent, NS_ERROR_ILLEGAL_VALUE);
 
     bool dontResetTrusted = false;
     if (innerEvent->mFlags.mDispatchedAtLeastOnce) {
       innerEvent->mTarget = nullptr;
       innerEvent->mOriginalTarget = nullptr;
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -3946,38 +3946,40 @@ class MOZ_STACK_CLASS ESMEventCB : publi
                            &aVisitor.mEventStatus);
       }
     }
   }
 
   nsCOMPtr<nsIContent> mTarget;
 };
 
-/*static*/ bool EventStateManager::IsHandlingUserInput() {
+/*static*/
+bool EventStateManager::IsHandlingUserInput() {
   return sUserInputEventDepth > 0;
 }
 
-/*static*/ bool EventStateManager::IsHandlingKeyboardInput() {
+/*static*/
+bool EventStateManager::IsHandlingKeyboardInput() {
   return sUserKeyboardEventDepth > 0;
 }
 
-/*static*/ void EventStateManager::StartHandlingUserInput(
-    EventMessage aMessage) {
+/*static*/
+void EventStateManager::StartHandlingUserInput(EventMessage aMessage) {
   ++sUserInputEventDepth;
   ++sUserInputCounter;
   if (sUserInputEventDepth == 1) {
     sLatestUserInputStart = sHandlingInputStart = TimeStamp::Now();
   }
   if (WidgetEvent::IsKeyEventMessage(aMessage)) {
     ++sUserKeyboardEventDepth;
   }
 }
 
-/*static*/ void EventStateManager::StopHandlingUserInput(
-    EventMessage aMessage) {
+/*static*/
+void EventStateManager::StopHandlingUserInput(EventMessage aMessage) {
   --sUserInputEventDepth;
   if (sUserInputEventDepth == 0) {
     sHandlingInputStart = TimeStamp();
   }
   if (WidgetEvent::IsKeyEventMessage(aMessage)) {
     --sUserKeyboardEventDepth;
   }
 }
@@ -4290,17 +4292,18 @@ void EventStateManager::GeneratePointerE
   if (!PointerEventHandler::IsPointerEventEnabled()) {
     return;
   }
   WidgetPointerEvent pointerEvent(*aEvent);
   pointerEvent.mMessage = aMessage;
   GenerateMouseEnterExit(&pointerEvent);
 }
 
-/* static */ void EventStateManager::UpdateLastRefPointOfMouseEvent(
+/* static */
+void EventStateManager::UpdateLastRefPointOfMouseEvent(
     WidgetMouseEvent* aMouseEvent) {
   if (aMouseEvent->mMessage != eMouseMove &&
       aMouseEvent->mMessage != ePointerMove) {
     return;
   }
 
   // Mouse movement is reported on the MouseEvent.movement{X,Y} fields.
   // Movement is calculated in UIEvent::GetMovementPoint() as:
@@ -4321,18 +4324,18 @@ void EventStateManager::GeneratePointerE
     // the application window. We should report (0,0) movement for this
     // case, so make the current and previous mRefPoints the same.
     aMouseEvent->mLastRefPoint = aMouseEvent->mRefPoint;
   } else {
     aMouseEvent->mLastRefPoint = sLastRefPoint;
   }
 }
 
-/* static */ void
-EventStateManager::ResetPointerToWindowCenterWhilePointerLocked(
+/* static */
+void EventStateManager::ResetPointerToWindowCenterWhilePointerLocked(
     WidgetMouseEvent* aMouseEvent) {
   MOZ_ASSERT(sIsPointerLocked);
   if ((aMouseEvent->mMessage != eMouseMove &&
        aMouseEvent->mMessage != ePointerMove) ||
       !aMouseEvent->mWidget) {
     return;
   }
 
@@ -4364,17 +4367,18 @@ EventStateManager::ResetPointerToWindowC
     // Clear sSynthCenteringPoint so we don't cancel other events
     // targeted at the center.
     if (updateSynthCenteringPoint) {
       sSynthCenteringPoint = kInvalidRefPoint;
     }
   }
 }
 
-/* static */ void EventStateManager::UpdateLastPointerPosition(
+/* static */
+void EventStateManager::UpdateLastPointerPosition(
     WidgetMouseEvent* aMouseEvent) {
   if (aMouseEvent->mMessage != eMouseMove) {
     return;
   }
   sLastRefPoint = aMouseEvent->mRefPoint;
 }
 
 void EventStateManager::GenerateMouseEnterExit(WidgetMouseEvent* aMouseEvent) {
@@ -4458,18 +4462,19 @@ OverOutElementsWrapper* EventStateManage
       mMouseEnterLeaveHelper = new OverOutElementsWrapper();
     }
     return mMouseEnterLeaveHelper;
   }
   return mPointersEnterLeaveHelper.LookupForAdd(pointer->pointerId)
       .OrInsert([]() { return new OverOutElementsWrapper(); });
 }
 
-/* static */ void EventStateManager::SetPointerLock(nsIWidget* aWidget,
-                                                    nsIContent* aElement) {
+/* static */
+void EventStateManager::SetPointerLock(nsIWidget* aWidget,
+                                       nsIContent* aElement) {
   // NOTE: aElement will be nullptr when unlocking.
   sIsPointerLocked = !!aElement;
 
   // Reset mouse wheel transaction
   WheelTransaction::EndTransaction();
 
   // Deal with DnD events
   nsCOMPtr<nsIDragService> dragService =
--- a/dom/events/MessageEvent.cpp
+++ b/dom/events/MessageEvent.cpp
@@ -78,24 +78,26 @@ void MessageEvent::GetSource(
     aValue.SetValue().SetAsWindowProxy() = mWindowSource;
   } else if (mPortSource) {
     aValue.SetValue().SetAsMessagePort() = mPortSource;
   } else if (mServiceWorkerSource) {
     aValue.SetValue().SetAsServiceWorker() = mServiceWorkerSource;
   }
 }
 
-/* static */ already_AddRefed<MessageEvent> MessageEvent::Constructor(
+/* static */
+already_AddRefed<MessageEvent> MessageEvent::Constructor(
     const GlobalObject& aGlobal, const nsAString& aType,
     const MessageEventInit& aParam, ErrorResult& aRv) {
   nsCOMPtr<EventTarget> t = do_QueryInterface(aGlobal.GetAsSupports());
   return Constructor(t, aType, aParam);
 }
 
-/* static */ already_AddRefed<MessageEvent> MessageEvent::Constructor(
+/* static */
+already_AddRefed<MessageEvent> MessageEvent::Constructor(
     EventTarget* aEventTarget, const nsAString& aType,
     const MessageEventInit& aParam) {
   RefPtr<MessageEvent> event = new MessageEvent(aEventTarget, nullptr, nullptr);
 
   event->InitEvent(aType, aParam.mBubbles, aParam.mCancelable);
   bool trusted = event->Init(aEventTarget);
   event->SetTrusted(trusted);
 
--- a/dom/events/PaintRequest.cpp
+++ b/dom/events/PaintRequest.cpp
@@ -22,18 +22,19 @@ NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(Pa
 NS_INTERFACE_TABLE_HEAD(PaintRequest)
   NS_WRAPPERCACHE_INTERFACE_TABLE_ENTRY
   NS_INTERFACE_TABLE_TO_MAP_SEGUE_CYCLE_COLLECTION(PaintRequest)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(PaintRequest)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(PaintRequest)
 
-/* virtual */ JSObject* PaintRequest::WrapObject(
-    JSContext* aCx, JS::Handle<JSObject*> aGivenProto) {
+/* virtual */
+JSObject* PaintRequest::WrapObject(JSContext* aCx,
+                                   JS::Handle<JSObject*> aGivenProto) {
   return PaintRequest_Binding::Wrap(aCx, this, aGivenProto);
 }
 
 already_AddRefed<DOMRect> PaintRequest::ClientRect() {
   RefPtr<DOMRect> clientRect = new DOMRect(this);
   clientRect->SetLayoutRect(mRequest);
   return clientRect.forget();
 }
--- a/dom/events/PointerEventHandler.cpp
+++ b/dom/events/PointerEventHandler.cpp
@@ -38,54 +38,58 @@ class PointerInfo final {
 // capturing it. Additionally keep information about pending capturing content.
 static nsClassHashtable<nsUint32HashKey, PointerCaptureInfo>*
     sPointerCaptureList;
 
 // Keeps information about pointers such as pointerId, activeState, pointerType,
 // primaryState
 static nsClassHashtable<nsUint32HashKey, PointerInfo>* sActivePointersIds;
 
-/* static */ void PointerEventHandler::Initialize() {
+/* static */
+void PointerEventHandler::Initialize() {
   static bool initialized = false;
   if (initialized) {
     return;
   }
   initialized = true;
   Preferences::AddBoolVarCache(&sPointerEventEnabled,
                                "dom.w3c_pointer_events.enabled", true);
   Preferences::AddBoolVarCache(&sPointerEventImplicitCapture,
                                "dom.w3c_pointer_events.implicit_capture", true);
 }
 
-/* static */ void PointerEventHandler::InitializeStatics() {
+/* static */
+void PointerEventHandler::InitializeStatics() {
   MOZ_ASSERT(!sPointerCaptureList, "InitializeStatics called multiple times!");
   sPointerCaptureList =
       new nsClassHashtable<nsUint32HashKey, PointerCaptureInfo>;
   sActivePointersIds = new nsClassHashtable<nsUint32HashKey, PointerInfo>;
 }
 
-/* static */ void PointerEventHandler::ReleaseStatics() {
+/* static */
+void PointerEventHandler::ReleaseStatics() {
   MOZ_ASSERT(sPointerCaptureList, "ReleaseStatics called without Initialize!");
   delete sPointerCaptureList;
   sPointerCaptureList = nullptr;
   delete sActivePointersIds;
   sActivePointersIds = nullptr;
 }
 
-/* static */ bool PointerEventHandler::IsPointerEventEnabled() {
+/* static */
+bool PointerEventHandler::IsPointerEventEnabled() {
   return sPointerEventEnabled;
 }
 
-/* static */ bool
-PointerEventHandler::IsPointerEventImplicitCaptureForTouchEnabled() {
+/* static */
+bool PointerEventHandler::IsPointerEventImplicitCaptureForTouchEnabled() {
   return sPointerEventEnabled && sPointerEventImplicitCapture;
 }
 
-/* static */ void PointerEventHandler::UpdateActivePointerState(
-    WidgetMouseEvent* aEvent) {
+/* static */
+void PointerEventHandler::UpdateActivePointerState(WidgetMouseEvent* aEvent) {
   if (!IsPointerEventEnabled() || !aEvent) {
     return;
   }
   switch (aEvent->mMessage) {
     case eMouseEnterIntoWidget:
       // In this case we have to know information about available mouse pointers
       sActivePointersIds->Put(
           aEvent->pointerId, new PointerInfo(false, aEvent->inputSource, true));
@@ -125,98 +129,104 @@ PointerEventHandler::IsPointerEventImpli
       // pointers
       sActivePointersIds->Remove(aEvent->pointerId);
       break;
     default:
       break;
   }
 }
 
-/* static */ void PointerEventHandler::SetPointerCaptureById(
-    uint32_t aPointerId, nsIContent* aContent) {
+/* static */
+void PointerEventHandler::SetPointerCaptureById(uint32_t aPointerId,
+                                                nsIContent* aContent) {
   MOZ_ASSERT(aContent);
   if (MouseEvent_Binding::MOZ_SOURCE_MOUSE == GetPointerType(aPointerId)) {
     nsIPresShell::SetCapturingContent(aContent, CAPTURE_PREVENTDRAG);
   }
 
   PointerCaptureInfo* pointerCaptureInfo = GetPointerCaptureInfo(aPointerId);
   if (pointerCaptureInfo) {
     pointerCaptureInfo->mPendingContent = aContent;
   } else {
     sPointerCaptureList->Put(aPointerId, new PointerCaptureInfo(aContent));
   }
 }
 
-/* static */ PointerCaptureInfo* PointerEventHandler::GetPointerCaptureInfo(
+/* static */
+PointerCaptureInfo* PointerEventHandler::GetPointerCaptureInfo(
     uint32_t aPointerId) {
   PointerCaptureInfo* pointerCaptureInfo = nullptr;
   sPointerCaptureList->Get(aPointerId, &pointerCaptureInfo);
   return pointerCaptureInfo;
 }
 
-/* static */ void PointerEventHandler::ReleasePointerCaptureById(
-    uint32_t aPointerId) {
+/* static */
+void PointerEventHandler::ReleasePointerCaptureById(uint32_t aPointerId) {
   PointerCaptureInfo* pointerCaptureInfo = GetPointerCaptureInfo(aPointerId);
   if (pointerCaptureInfo && pointerCaptureInfo->mPendingContent) {
     if (MouseEvent_Binding::MOZ_SOURCE_MOUSE == GetPointerType(aPointerId)) {
       nsIPresShell::SetCapturingContent(nullptr, CAPTURE_PREVENTDRAG);
     }
     pointerCaptureInfo->mPendingContent = nullptr;
   }
 }
 
-/* static */ void PointerEventHandler::ReleaseAllPointerCapture() {
+/* static */
+void PointerEventHandler::ReleaseAllPointerCapture() {
   for (auto iter = sPointerCaptureList->Iter(); !iter.Done(); iter.Next()) {
     PointerCaptureInfo* data = iter.UserData();
     if (data && data->mPendingContent) {
       ReleasePointerCaptureById(iter.Key());
     }
   }
 }
 
-/* static */ bool PointerEventHandler::GetPointerInfo(uint32_t aPointerId,
-                                                      bool& aActiveState) {
+/* static */
+bool PointerEventHandler::GetPointerInfo(uint32_t aPointerId,
+                                         bool& aActiveState) {
   PointerInfo* pointerInfo = nullptr;
   if (sActivePointersIds->Get(aPointerId, &pointerInfo) && pointerInfo) {
     aActiveState = pointerInfo->mActiveState;
     return true;
   }
   return false;
 }
 
-/* static */ void PointerEventHandler::MaybeProcessPointerCapture(
-    WidgetGUIEvent* aEvent) {
+/* static */
+void PointerEventHandler::MaybeProcessPointerCapture(WidgetGUIEvent* aEvent) {
   switch (aEvent->mClass) {
     case eMouseEventClass:
       ProcessPointerCaptureForMouse(aEvent->AsMouseEvent());
       break;
     case eTouchEventClass:
       ProcessPointerCaptureForTouch(aEvent->AsTouchEvent());
       break;
     default:
       break;
   }
 }
 
-/* static */ void PointerEventHandler::ProcessPointerCaptureForMouse(
+/* static */
+void PointerEventHandler::ProcessPointerCaptureForMouse(
     WidgetMouseEvent* aEvent) {
   if (!ShouldGeneratePointerEventFromMouse(aEvent)) {
     return;
   }
 
   PointerCaptureInfo* info = GetPointerCaptureInfo(aEvent->pointerId);
   if (!info || info->mPendingContent == info->mOverrideContent) {
     return;
   }
   WidgetPointerEvent localEvent(*aEvent);
   InitPointerEventFromMouse(&localEvent, aEvent, eVoidEvent);
   CheckPointerCaptureState(&localEvent);
 }
 
-/* static */ void PointerEventHandler::ProcessPointerCaptureForTouch(
+/* static */
+void PointerEventHandler::ProcessPointerCaptureForTouch(
     WidgetTouchEvent* aEvent) {
   if (!ShouldGeneratePointerEventFromTouch(aEvent)) {
     return;
   }
 
   for (uint32_t i = 0; i < aEvent->mTouches.Length(); ++i) {
     Touch* touch = aEvent->mTouches[i];
     if (!TouchManager::ShouldConvertTouchToPointer(touch, aEvent)) {
@@ -227,18 +237,18 @@ PointerEventHandler::IsPointerEventImpli
       continue;
     }
     WidgetPointerEvent event(aEvent->IsTrusted(), eVoidEvent, aEvent->mWidget);
     InitPointerEventFromTouch(&event, aEvent, touch, i == 0);
     CheckPointerCaptureState(&event);
   }
 }
 
-/* static */ void PointerEventHandler::CheckPointerCaptureState(
-    WidgetPointerEvent* aEvent) {
+/* static */
+void PointerEventHandler::CheckPointerCaptureState(WidgetPointerEvent* aEvent) {
   // Handle pending pointer capture before any pointer events except
   // gotpointercapture / lostpointercapture.
   if (!aEvent) {
     return;
   }
   MOZ_ASSERT(IsPointerEventEnabled());
   MOZ_ASSERT(aEvent->mClass == ePointerEventClass);
 
@@ -285,18 +295,19 @@ PointerEventHandler::IsPointerEventImpli
   }
 
   captureInfo->mOverrideContent = pendingContent;
   if (captureInfo->Empty()) {
     sPointerCaptureList->Remove(aEvent->pointerId);
   }
 }
 
-/* static */ void PointerEventHandler::ImplicitlyCapturePointer(
-    nsIFrame* aFrame, WidgetEvent* aEvent) {
+/* static */
+void PointerEventHandler::ImplicitlyCapturePointer(nsIFrame* aFrame,
+                                                   WidgetEvent* aEvent) {
   MOZ_ASSERT(aEvent->mMessage == ePointerDown);
   if (!aFrame || !IsPointerEventEnabled() ||
       !IsPointerEventImplicitCaptureForTouchEnabled()) {
     return;
   }
   WidgetPointerEvent* pointerEvent = aEvent->AsPointerEvent();
   NS_WARNING_ASSERTION(pointerEvent,
                        "Call ImplicitlyCapturePointer with non-pointer event");
@@ -310,37 +321,39 @@ PointerEventHandler::IsPointerEventImpli
     target = target->GetParent();
   }
   if (NS_WARN_IF(!target)) {
     return;
   }
   SetPointerCaptureById(pointerEvent->pointerId, target);
 }
 
-/* static */ void PointerEventHandler::ImplicitlyReleasePointerCapture(
-    WidgetEvent* aEvent) {
+/* static */
+void PointerEventHandler::ImplicitlyReleasePointerCapture(WidgetEvent* aEvent) {
   MOZ_ASSERT(aEvent);
   if (aEvent->mMessage != ePointerUp && aEvent->mMessage != ePointerCancel) {
     return;
   }
   WidgetPointerEvent* pointerEvent = aEvent->AsPointerEvent();
   ReleasePointerCaptureById(pointerEvent->pointerId);
   CheckPointerCaptureState(pointerEvent);
 }
 
-/* static */ nsIContent* PointerEventHandler::GetPointerCapturingContent(
+/* static */
+nsIContent* PointerEventHandler::GetPointerCapturingContent(
     uint32_t aPointerId) {
   PointerCaptureInfo* pointerCaptureInfo = GetPointerCaptureInfo(aPointerId);
   if (pointerCaptureInfo) {
     return pointerCaptureInfo->mOverrideContent;
   }
   return nullptr;
 }
 
-/* static */ nsIContent* PointerEventHandler::GetPointerCapturingContent(
+/* static */
+nsIContent* PointerEventHandler::GetPointerCapturingContent(
     WidgetGUIEvent* aEvent) {
   if (!IsPointerEventEnabled() ||
       (aEvent->mClass != ePointerEventClass &&
        aEvent->mClass != eMouseEventClass) ||
       aEvent->mMessage == ePointerDown || aEvent->mMessage == eMouseDown) {
     // Pointer capture should only be applied to all pointer events and mouse
     // events except ePointerDown and eMouseDown;
     return nullptr;
@@ -348,31 +361,32 @@ PointerEventHandler::IsPointerEventImpli
 
   WidgetMouseEvent* mouseEvent = aEvent->AsMouseEvent();
   if (!mouseEvent) {
     return nullptr;
   }
   return GetPointerCapturingContent(mouseEvent->pointerId);
 }
 
-/* static */ void PointerEventHandler::ReleaseIfCaptureByDescendant(
-    nsIContent* aContent) {
+/* static */
+void PointerEventHandler::ReleaseIfCaptureByDescendant(nsIContent* aContent) {
   // We should check that aChild does not contain pointer capturing elements.
   // If it does we should release the pointer capture for the elements.
   for (auto iter = sPointerCaptureList->Iter(); !iter.Done(); iter.Next()) {
     PointerCaptureInfo* data = iter.UserData();
     if (data && data->mPendingContent &&
         nsContentUtils::ContentIsDescendantOf(data->mPendingContent,
                                               aContent)) {
       ReleasePointerCaptureById(iter.Key());
     }
   }
 }
 
-/* static */ void PointerEventHandler::PreHandlePointerEventsPreventDefault(
+/* static */
+void PointerEventHandler::PreHandlePointerEventsPreventDefault(
     WidgetPointerEvent* aPointerEvent, WidgetGUIEvent* aMouseOrTouchEvent) {
   if (!aPointerEvent->mIsPrimary || aPointerEvent->mMessage == ePointerDown) {
     return;
   }
   PointerInfo* pointerInfo = nullptr;
   if (!sActivePointersIds->Get(aPointerEvent->pointerId, &pointerInfo) ||
       !pointerInfo) {
     // The PointerInfo for active pointer should be added for normal cases. But
@@ -388,17 +402,18 @@ PointerEventHandler::IsPointerEventImpli
   }
   aMouseOrTouchEvent->PreventDefault(false);
   aMouseOrTouchEvent->mFlags.mOnlyChromeDispatch = true;
   if (aPointerEvent->mMessage == ePointerUp) {
     pointerInfo->mPreventMouseEventByContent = false;
   }
 }
 
-/* static */ void PointerEventHandler::PostHandlePointerEventsPreventDefault(
+/* static */
+void PointerEventHandler::PostHandlePointerEventsPreventDefault(
     WidgetPointerEvent* aPointerEvent, WidgetGUIEvent* aMouseOrTouchEvent) {
   if (!aPointerEvent->mIsPrimary || aPointerEvent->mMessage != ePointerDown ||
       !aPointerEvent->DefaultPreventedByContent()) {
     return;
   }
   PointerInfo* pointerInfo = nullptr;
   if (!sActivePointersIds->Get(aPointerEvent->pointerId, &pointerInfo) ||
       !pointerInfo) {
@@ -413,17 +428,18 @@ PointerEventHandler::IsPointerEventImpli
   if (!pointerInfo->mActiveState) {
     return;
   }
   aMouseOrTouchEvent->PreventDefault(false);
   aMouseOrTouchEvent->mFlags.mOnlyChromeDispatch = true;
   pointerInfo->mPreventMouseEventByContent = true;
 }
 
-/* static */ void PointerEventHandler::InitPointerEventFromMouse(
+/* static */
+void PointerEventHandler::InitPointerEventFromMouse(
     WidgetPointerEvent* aPointerEvent, WidgetMouseEvent* aMouseEvent,
     EventMessage aMessage) {
   MOZ_ASSERT(aPointerEvent);
   MOZ_ASSERT(aMouseEvent);
   aPointerEvent->pointerId = aMouseEvent->pointerId;
   aPointerEvent->inputSource = aMouseEvent->inputSource;
   aPointerEvent->mMessage = aMessage;
   aPointerEvent->button = aMouseEvent->mMessage == eMouseMove
@@ -432,17 +448,18 @@ PointerEventHandler::IsPointerEventImpli
 
   aPointerEvent->buttons = aMouseEvent->buttons;
   aPointerEvent->pressure =
       aPointerEvent->buttons
           ? aMouseEvent->pressure ? aMouseEvent->pressure : 0.5f
           : 0.0f;
 }
 
-/* static */ void PointerEventHandler::InitPointerEventFromTouch(
+/* static */
+void PointerEventHandler::InitPointerEventFromTouch(
     WidgetPointerEvent* aPointerEvent, WidgetTouchEvent* aTouchEvent,
     mozilla::dom::Touch* aTouch, bool aIsPrimary) {
   MOZ_ASSERT(aPointerEvent);
   MOZ_ASSERT(aTouchEvent);
 
   int16_t button = aTouchEvent->mMessage == eTouchMove
                        ? WidgetMouseEvent::eNoButton
                        : WidgetMouseEvent::eLeftButton;
@@ -462,17 +479,18 @@ PointerEventHandler::IsPointerEventImpli
   aPointerEvent->mTime = aTouchEvent->mTime;
   aPointerEvent->mTimeStamp = aTouchEvent->mTimeStamp;
   aPointerEvent->mFlags = aTouchEvent->mFlags;
   aPointerEvent->button = button;
   aPointerEvent->buttons = buttons;
   aPointerEvent->inputSource = MouseEvent_Binding::MOZ_SOURCE_TOUCH;
 }
 
-/* static */ void PointerEventHandler::DispatchPointerFromMouseOrTouch(
+/* static */
+void PointerEventHandler::DispatchPointerFromMouseOrTouch(
     PresShell* aShell, nsIFrame* aFrame, nsIContent* aContent,
     WidgetGUIEvent* aEvent, bool aDontRetargetEvents, nsEventStatus* aStatus,
     nsIContent** aTargetContent) {
   MOZ_ASSERT(IsPointerEventEnabled());
   MOZ_ASSERT(aFrame || aContent);
   MOZ_ASSERT(aEvent);
 
   EventMessage pointerMessage = eVoidEvent;
@@ -581,34 +599,36 @@ PointerEventHandler::IsPointerEventImpli
         PreHandlePointerEventsPreventDefault(&event, aEvent);
         shell->HandleEvent(aFrame, &event, aDontRetargetEvents, aStatus);
         PostHandlePointerEventsPreventDefault(&event, aEvent);
       }
     }
   }
 }
 
-/* static */ uint16_t PointerEventHandler::GetPointerType(uint32_t aPointerId) {
+/* static */
+uint16_t PointerEventHandler::GetPointerType(uint32_t aPointerId) {
   PointerInfo* pointerInfo = nullptr;
   if (sActivePointersIds->Get(aPointerId, &pointerInfo) && pointerInfo) {
     return pointerInfo->mPointerType;
   }
   return MouseEvent_Binding::MOZ_SOURCE_UNKNOWN;
 }
 
-/* static */ bool PointerEventHandler::GetPointerPrimaryState(
-    uint32_t aPointerId) {
+/* static */
+bool PointerEventHandler::GetPointerPrimaryState(uint32_t aPointerId) {
   PointerInfo* pointerInfo = nullptr;
   if (sActivePointersIds->Get(aPointerId, &pointerInfo) && pointerInfo) {
     return pointerInfo->mPrimaryState;
   }
   return false;
 }
 
-/* static */ void PointerEventHandler::DispatchGotOrLostPointerCaptureEvent(
+/* static */
+void PointerEventHandler::DispatchGotOrLostPointerCaptureEvent(
     bool aIsGotCapture, const WidgetPointerEvent* aPointerEvent,
     nsIContent* aCaptureTarget) {
   Document* targetDoc = aCaptureTarget->OwnerDoc();
   nsCOMPtr<nsIPresShell> shell = targetDoc->GetShell();
   if (NS_WARN_IF(!shell)) {
     return;
   }
 
@@ -636,18 +656,19 @@ PointerEventHandler::IsPointerEventImpli
   localEvent.AssignPointerEventData(*aPointerEvent, true);
   DebugOnly<nsresult> rv = shell->HandleEventWithTarget(
       &localEvent, aCaptureTarget->GetPrimaryFrame(), aCaptureTarget, &status);
 
   NS_WARNING_ASSERTION(NS_SUCCEEDED(rv),
                        "DispatchGotOrLostPointerCaptureEvent failed");
 }
 
-/* static */ void PointerEventHandler::MaybeCacheSpoofedPointerID(
-    uint16_t aInputSource, uint32_t aPointerId) {
+/* static */
+void PointerEventHandler::MaybeCacheSpoofedPointerID(uint16_t aInputSource,
+                                                     uint32_t aPointerId) {
   if (sSpoofedPointerId.isSome() || aInputSource != SPOOFED_POINTER_INTERFACE) {
     return;
   }
 
   sSpoofedPointerId.emplace(aPointerId);
 }
 
 }  // namespace mozilla
--- a/dom/events/WheelHandlingHelper.cpp
+++ b/dom/events/WheelHandlingHelper.cpp
@@ -37,37 +37,37 @@ namespace mozilla {
 
 DeltaValues::DeltaValues(WidgetWheelEvent* aEvent)
     : deltaX(aEvent->mDeltaX), deltaY(aEvent->mDeltaY) {}
 
 /******************************************************************/
 /* mozilla::WheelHandlingUtils                                    */
 /******************************************************************/
 
-/* static */ bool WheelHandlingUtils::CanScrollInRange(nscoord aMin,
-                                                       nscoord aValue,
-                                                       nscoord aMax,
-                                                       double aDirection) {
+/* static */
+bool WheelHandlingUtils::CanScrollInRange(nscoord aMin, nscoord aValue,
+                                          nscoord aMax, double aDirection) {
   return aDirection > 0.0 ? aValue < static_cast<double>(aMax)
                           : static_cast<double>(aMin) < aValue;
 }
 
-/* static */ bool WheelHandlingUtils::CanScrollOn(nsIFrame* aFrame,
-                                                  double aDirectionX,
-                                                  double aDirectionY) {
+/* static */
+bool WheelHandlingUtils::CanScrollOn(nsIFrame* aFrame, double aDirectionX,
+                                     double aDirectionY) {
   nsIScrollableFrame* scrollableFrame = do_QueryFrame(aFrame);
   if (scrollableFrame) {
     return CanScrollOn(scrollableFrame, aDirectionX, aDirectionY);
   }
   nsPluginFrame* pluginFrame = do_QueryFrame(aFrame);
   return pluginFrame && pluginFrame->WantsToHandleWheelEventAsDefaultAction();
 }
 
-/* static */ bool WheelHandlingUtils::CanScrollOn(
-    nsIScrollableFrame* aScrollFrame, double aDirectionX, double aDirectionY) {
+/* static */
+bool WheelHandlingUtils::CanScrollOn(nsIScrollableFrame* aScrollFrame,
+                                     double aDirectionX, double aDirectionY) {
   MOZ_ASSERT(aScrollFrame);
   NS_ASSERTION(aDirectionX || aDirectionY,
                "One of the delta values must be non-zero at least");
 
   nsPoint scrollPt = aScrollFrame->GetScrollPosition();
   nsRect scrollRange = aScrollFrame->GetScrollRange();
   uint32_t directions = aScrollFrame->GetPerceivedScrollingDirections();
 
@@ -108,42 +108,42 @@ WheelHandlingUtils::GetDisregardedWheelS
 
 AutoWeakFrame WheelTransaction::sTargetFrame(nullptr);
 uint32_t WheelTransaction::sTime = 0;
 uint32_t WheelTransaction::sMouseMoved = 0;
 nsITimer* WheelTransaction::sTimer = nullptr;
 int32_t WheelTransaction::sScrollSeriesCounter = 0;
 bool WheelTransaction::sOwnScrollbars = false;
 
-/* static */ bool WheelTransaction::OutOfTime(uint32_t aBaseTime,
-                                              uint32_t aThreshold) {
+/* static */
+bool WheelTransaction::OutOfTime(uint32_t aBaseTime, uint32_t aThreshold) {
   uint32_t now = PR_IntervalToMilliseconds(PR_IntervalNow());
   return (now - aBaseTime > aThreshold);
 }
 
-/* static */ void WheelTransaction::OwnScrollbars(bool aOwn) {
-  sOwnScrollbars = aOwn;
-}
+/* static */
+void WheelTransaction::OwnScrollbars(bool aOwn) { sOwnScrollbars = aOwn; }
 
-/* static */ void WheelTransaction::BeginTransaction(
-    nsIFrame* aTargetFrame, const WidgetWheelEvent* aEvent) {
+/* static */
+void WheelTransaction::BeginTransaction(nsIFrame* aTargetFrame,
+                                        const WidgetWheelEvent* aEvent) {
   NS_ASSERTION(!sTargetFrame, "previous transaction is not finished!");
   MOZ_ASSERT(aEvent->mMessage == eWheel,
              "Transaction must be started with a wheel event");
   ScrollbarsForWheel::OwnWheelTransaction(false);
   sTargetFrame = aTargetFrame;
   sScrollSeriesCounter = 0;
   if (!UpdateTransaction(aEvent)) {
     NS_ERROR("BeginTransaction is called even cannot scroll the frame");
     EndTransaction();
   }
 }
 
-/* static */ bool WheelTransaction::UpdateTransaction(
-    const WidgetWheelEvent* aEvent) {
+/* static */
+bool WheelTransaction::UpdateTransaction(const WidgetWheelEvent* aEvent) {
   nsIFrame* scrollToFrame = GetTargetFrame();
   nsIScrollableFrame* scrollableFrame = scrollToFrame->GetScrollTargetFrame();
   if (scrollableFrame) {
     scrollToFrame = do_QueryFrame(scrollableFrame);
   }
 
   if (!WheelHandlingUtils::CanScrollOn(scrollToFrame, aEvent->mDeltaX,
                                        aEvent->mDeltaY)) {
@@ -164,38 +164,41 @@ bool WheelTransaction::sOwnScrollbars = 
   // 1. Some events doesn't have the correct creation time.
   // 2. If the computer runs slowly by other processes eating the CPU resource,
   //    the event creation time doesn't keep real time.
   sTime = PR_IntervalToMilliseconds(PR_IntervalNow());
   sMouseMoved = 0;
   return true;
 }
 
-/* static */ void WheelTransaction::MayEndTransaction() {
+/* static */
+void WheelTransaction::MayEndTransaction() {
   if (!sOwnScrollbars && ScrollbarsForWheel::IsActive()) {
     ScrollbarsForWheel::OwnWheelTransaction(true);
   } else {
     EndTransaction();
   }
 }
 
-/* static */ void WheelTransaction::EndTransaction() {
+/* static */
+void WheelTransaction::EndTransaction() {
   if (sTimer) {
     sTimer->Cancel();
   }
   sTargetFrame = nullptr;
   sScrollSeriesCounter = 0;
   if (sOwnScrollbars) {
     sOwnScrollbars = false;
     ScrollbarsForWheel::OwnWheelTransaction(false);
     ScrollbarsForWheel::Inactivate();
   }
 }
 
-/* static */ bool WheelTransaction::WillHandleDefaultAction(
+/* static */
+bool WheelTransaction::WillHandleDefaultAction(
     WidgetWheelEvent* aWheelEvent, AutoWeakFrame& aTargetWeakFrame) {
   nsIFrame* lastTargetFrame = GetTargetFrame();
   if (!lastTargetFrame) {
     BeginTransaction(aTargetWeakFrame.GetFrame(), aWheelEvent);
   } else if (lastTargetFrame != aTargetWeakFrame.GetFrame()) {
     EndTransaction();
     BeginTransaction(aTargetWeakFrame.GetFrame(), aWheelEvent);
   } else {
@@ -209,17 +212,18 @@ bool WheelTransaction::sOwnScrollbars = 
   if (!aTargetWeakFrame.IsAlive()) {
     EndTransaction();
     return false;
   }
 
   return true;
 }
 
-/* static */ void WheelTransaction::OnEvent(WidgetEvent* aEvent) {
+/* static */
+void WheelTransaction::OnEvent(WidgetEvent* aEvent) {
   if (!sTargetFrame) {
     return;
   }
 
   if (OutOfTime(sTime, GetTimeoutTime())) {
     // Even if the scroll event which is handled after timeout, but onTimeout
     // was not fired by timer, then the scroll event will scroll old frame,
     // therefore, we should call OnTimeout here and ensure to finish the old
@@ -274,37 +278,39 @@ bool WheelTransaction::sOwnScrollbars = 
     case eDrop:
       EndTransaction();
       return;
     default:
       break;
   }
 }
 
-/* static */ void WheelTransaction::Shutdown() { NS_IF_RELEASE(sTimer); }
+/* static */
+void WheelTransaction::Shutdown() { NS_IF_RELEASE(sTimer); }
 
-/* static */ void WheelTransaction::OnFailToScrollTarget() {
+/* static */
+void WheelTransaction::OnFailToScrollTarget() {
   MOZ_ASSERT(sTargetFrame, "We don't have mouse scrolling transaction");
 
   if (Prefs::sTestMouseScroll) {
     // This event is used for automated tests, see bug 442774.
     nsContentUtils::DispatchTrustedEvent(
         sTargetFrame->GetContent()->OwnerDoc(), sTargetFrame->GetContent(),
         NS_LITERAL_STRING("MozMouseScrollFailed"), CanBubble::eYes,
         Cancelable::eYes);
   }
   // The target frame might be destroyed in the event handler, at that time,
   // we need to finish the current transaction
   if (!sTargetFrame) {
     EndTransaction();
   }
 }
 
-/* static */ void WheelTransaction::OnTimeout(nsITimer* aTimer,
-                                              void* aClosure) {
+/* static */
+void WheelTransaction::OnTimeout(nsITimer* aTimer, void* aClosure) {
   if (!sTargetFrame) {
     // The transaction target was destroyed already
     EndTransaction();
     return;
   }
   // Store the sTargetFrame, the variable becomes null in EndTransaction.
   nsIFrame* frame = sTargetFrame;
   // We need to finish current transaction before DOM event firing. Because
@@ -315,39 +321,41 @@ bool WheelTransaction::sOwnScrollbars = 
     // This event is used for automated tests, see bug 442774.
     nsContentUtils::DispatchTrustedEvent(
         frame->GetContent()->OwnerDoc(), frame->GetContent(),
         NS_LITERAL_STRING("MozMouseScrollTransactionTimeout"), CanBubble::eYes,
         Cancelable::eYes);
   }
 }
 
-/* static */ void WheelTransaction::SetTimeout() {
+/* static */
+void WheelTransaction::SetTimeout() {
   if (!sTimer) {
     sTimer = NS_NewTimer().take();
     if (!sTimer) {
       return;
     }
   }
   sTimer->Cancel();
   DebugOnly<nsresult> rv = sTimer->InitWithNamedFuncCallback(
       OnTimeout, nullptr, GetTimeoutTime(), nsITimer::TYPE_ONE_SHOT,
       "WheelTransaction::SetTimeout");
   NS_WARNING_ASSERTION(NS_SUCCEEDED(rv),
                        "nsITimer::InitWithFuncCallback failed");
 }
 
-/* static */ LayoutDeviceIntPoint WheelTransaction::GetScreenPoint(
-    WidgetGUIEvent* aEvent) {
+/* static */
+LayoutDeviceIntPoint WheelTransaction::GetScreenPoint(WidgetGUIEvent* aEvent) {
   NS_ASSERTION(aEvent, "aEvent is null");
   NS_ASSERTION(aEvent->mWidget, "aEvent-mWidget is null");
   return aEvent->mRefPoint + aEvent->mWidget->WidgetToScreenOffset();
 }
 
-/* static */ DeltaValues WheelTransaction::AccelerateWheelDelta(
+/* static */
+DeltaValues WheelTransaction::AccelerateWheelDelta(
     WidgetWheelEvent* aEvent, bool aAllowScrollSpeedOverride) {
   DeltaValues result(aEvent);
 
   // Don't accelerate the delta values if the event isn't line scrolling.
   if (aEvent->mDeltaMode != dom::WheelEvent_Binding::DOM_DELTA_LINE) {
     return result;
   }
 
@@ -363,23 +371,25 @@ bool WheelTransaction::sOwnScrollbars = 
       result.deltaX = ComputeAcceleratedWheelDelta(result.deltaX, factor);
       result.deltaY = ComputeAcceleratedWheelDelta(result.deltaY, factor);
     }
   }
 
   return result;
 }
 
-/* static */ double WheelTransaction::ComputeAcceleratedWheelDelta(
-    double aDelta, int32_t aFactor) {
+/* static */
+double WheelTransaction::ComputeAcceleratedWheelDelta(double aDelta,
+                                                      int32_t aFactor) {
   return mozilla::ComputeAcceleratedWheelDelta(aDelta, sScrollSeriesCounter,
                                                aFactor);
 }
 
-/* static */ DeltaValues WheelTransaction::OverrideSystemScrollSpeed(
+/* static */
+DeltaValues WheelTransaction::OverrideSystemScrollSpeed(
     WidgetWheelEvent* aEvent) {
   MOZ_ASSERT(sTargetFrame, "We don't have mouse scrolling transaction");
   MOZ_ASSERT(aEvent->mDeltaMode == WheelEvent_Binding::DOM_DELTA_LINE);
 
   // If the event doesn't scroll to both X and Y, we don't need to do anything
   // here.
   if (!aEvent->mDeltaX && !aEvent->mDeltaY) {
     return DeltaValues(aEvent);
@@ -398,83 +408,90 @@ const DeltaValues ScrollbarsForWheel::di
 
 AutoWeakFrame ScrollbarsForWheel::sActiveOwner = nullptr;
 AutoWeakFrame ScrollbarsForWheel::sActivatedScrollTargets[kNumberOfTargets] = {
     nullptr, nullptr, nullptr, nullptr};
 
 bool ScrollbarsForWheel::sHadWheelStart = false;
 bool ScrollbarsForWheel::sOwnWheelTransaction = false;
 
-/* static */ void ScrollbarsForWheel::PrepareToScrollText(
-    EventStateManager* aESM, nsIFrame* aTargetFrame, WidgetWheelEvent* aEvent) {
+/* static */
+void ScrollbarsForWheel::PrepareToScrollText(EventStateManager* aESM,
+                                             nsIFrame* aTargetFrame,
+                                             WidgetWheelEvent* aEvent) {
   if (aEvent->mMessage == eWheelOperationStart) {
     WheelTransaction::OwnScrollbars(false);
     if (!IsActive()) {
       TemporarilyActivateAllPossibleScrollTargets(aESM, aTargetFrame, aEvent);
       sHadWheelStart = true;
     }
   } else {
     DeactivateAllTemporarilyActivatedScrollTargets();
   }
 }
 
-/* static */ void ScrollbarsForWheel::SetActiveScrollTarget(
+/* static */
+void ScrollbarsForWheel::SetActiveScrollTarget(
     nsIScrollableFrame* aScrollTarget) {
   if (!sHadWheelStart) {
     return;
   }
   nsIScrollbarMediator* scrollbarMediator = do_QueryFrame(aScrollTarget);
   if (!scrollbarMediator) {
     return;
   }
   sHadWheelStart = false;
   sActiveOwner = do_QueryFrame(aScrollTarget);
   scrollbarMediator->ScrollbarActivityStarted();
 }
 
-/* static */ void ScrollbarsForWheel::MayInactivate() {
+/* static */
+void ScrollbarsForWheel::MayInactivate() {
   if (!sOwnWheelTransaction && WheelTransaction::GetTargetFrame()) {
     WheelTransaction::OwnScrollbars(true);
   } else {
     Inactivate();
   }
 }
 
-/* static */ void ScrollbarsForWheel::Inactivate() {
+/* static */
+void ScrollbarsForWheel::Inactivate() {
   nsIScrollbarMediator* scrollbarMediator = do_QueryFrame(sActiveOwner);
   if (scrollbarMediator) {
     scrollbarMediator->ScrollbarActivityStopped();
   }
   sActiveOwner = nullptr;
   DeactivateAllTemporarilyActivatedScrollTargets();
   if (sOwnWheelTransaction) {
     sOwnWheelTransaction = false;
     WheelTransaction::OwnScrollbars(false);
     WheelTransaction::EndTransaction();
   }
 }
 
-/* static */ bool ScrollbarsForWheel::IsActive() {
+/* static */
+bool ScrollbarsForWheel::IsActive() {
   if (sActiveOwner) {
     return true;
   }
   for (size_t i = 0; i < kNumberOfTargets; ++i) {
     if (sActivatedScrollTargets[i]) {
       return true;
     }
   }
   return false;
 }
 
-/* static */ void ScrollbarsForWheel::OwnWheelTransaction(bool aOwn) {
+/* static */
+void ScrollbarsForWheel::OwnWheelTransaction(bool aOwn) {
   sOwnWheelTransaction = aOwn;
 }
 
-/* static */ void
-ScrollbarsForWheel::TemporarilyActivateAllPossibleScrollTargets(
+/* static */
+void ScrollbarsForWheel::TemporarilyActivateAllPossibleScrollTargets(
     EventStateManager* aESM, nsIFrame* aTargetFrame, WidgetWheelEvent* aEvent) {
   for (size_t i = 0; i < kNumberOfTargets; i++) {
     const DeltaValues* dir = &directions[i];
     AutoWeakFrame* scrollTarget = &sActivatedScrollTargets[i];
     MOZ_ASSERT(!*scrollTarget, "scroll target still temporarily activated!");
     nsIScrollableFrame* target = do_QueryFrame(aESM->ComputeScrollTarget(
         aTargetFrame, dir->deltaX, dir->deltaY, aEvent,
         EventStateManager::COMPUTE_DEFAULT_ACTION_TARGET));
@@ -482,18 +499,18 @@ ScrollbarsForWheel::TemporarilyActivateA
     if (scrollbarMediator) {
       nsIFrame* targetFrame = do_QueryFrame(target);
       *scrollTarget = targetFrame;
       scrollbarMediator->ScrollbarActivityStarted();
     }
   }
 }
 
-/* static */ void
-ScrollbarsForWheel::DeactivateAllTemporarilyActivatedScrollTargets() {
+/* static */
+void ScrollbarsForWheel::DeactivateAllTemporarilyActivatedScrollTargets() {
   for (size_t i = 0; i < kNumberOfTargets; i++) {
     AutoWeakFrame* scrollTarget = &sActivatedScrollTargets[i];
     if (*scrollTarget) {
       nsIScrollbarMediator* scrollbarMediator = do_QueryFrame(*scrollTarget);
       if (scrollbarMediator) {
         scrollbarMediator->ScrollbarActivityStopped();
       }
       *scrollTarget = nullptr;
@@ -506,17 +523,18 @@ ScrollbarsForWheel::DeactivateAllTempora
 /******************************************************************/
 
 int32_t WheelTransaction::Prefs::sMouseWheelAccelerationStart = -1;
 int32_t WheelTransaction::Prefs::sMouseWheelAccelerationFactor = -1;
 uint32_t WheelTransaction::Prefs::sMouseWheelTransactionTimeout = 1500;
 uint32_t WheelTransaction::Prefs::sMouseWheelTransactionIgnoreMoveDelay = 100;
 bool WheelTransaction::Prefs::sTestMouseScroll = false;
 
-/* static */ void WheelTransaction::Prefs::InitializeStatics() {
+/* static */
+void WheelTransaction::Prefs::InitializeStatics() {
   static bool sIsInitialized = false;
   if (!sIsInitialized) {
     Preferences::AddIntVarCache(&sMouseWheelAccelerationStart,
                                 "mousewheel.acceleration.start", -1);
     Preferences::AddIntVarCache(&sMouseWheelAccelerationFactor,
                                 "mousewheel.acceleration.factor", -1);
     Preferences::AddUintVarCache(&sMouseWheelTransactionTimeout,
                                  "mousewheel.transaction.timeout", 1500);
--- a/dom/fetch/EmptyBody.cpp
+++ b/dom/fetch/EmptyBody.cpp
@@ -42,17 +42,18 @@ EmptyBody::EmptyBody(nsIGlobalObject* aG
       mBodyStream(std::move(aBodyStream)) {
   if (aPrincipalInfo) {
     mPrincipalInfo = MakeUnique<mozilla::ipc::PrincipalInfo>(*aPrincipalInfo);
   }
 }
 
 EmptyBody::~EmptyBody() = default;
 
-/* static */ already_AddRefed<EmptyBody> EmptyBody::Create(
+/* static */
+already_AddRefed<EmptyBody> EmptyBody::Create(
     nsIGlobalObject* aGlobal, mozilla::ipc::PrincipalInfo* aPrincipalInfo,
     AbortSignalImpl* aAbortSignalImpl, const nsACString& aMimeType,
     ErrorResult& aRv) {
   nsCOMPtr<nsIInputStream> bodyStream;
   aRv = NS_NewCStringInputStream(getter_AddRefs(bodyStream), EmptyCString());
   if (NS_WARN_IF(aRv.Failed())) {
     return nullptr;
   }
--- a/dom/fetch/FetchStream.cpp
+++ b/dom/fetch/FetchStream.cpp
@@ -37,22 +37,21 @@ class FetchStream::WorkerShutdown final 
 
  private:
   RefPtr<FetchStream> mStream;
 };
 
 NS_IMPL_ISUPPORTS(FetchStream, nsIInputStreamCallback, nsIObserver,
                   nsISupportsWeakReference)
 
-/* static */ void FetchStream::Create(JSContext* aCx,
-                                      FetchStreamHolder* aStreamHolder,
-                                      nsIGlobalObject* aGlobal,
-                                      nsIInputStream* aInputStream,
-                                      JS::MutableHandle<JSObject*> aStream,
-                                      ErrorResult& aRv) {
+/* static */
+void FetchStream::Create(JSContext* aCx, FetchStreamHolder* aStreamHolder,
+                         nsIGlobalObject* aGlobal, nsIInputStream* aInputStream,
+                         JS::MutableHandle<JSObject*> aStream,
+                         ErrorResult& aRv) {
   MOZ_DIAGNOSTIC_ASSERT(aCx);
   MOZ_DIAGNOSTIC_ASSERT(aStreamHolder);
   MOZ_DIAGNOSTIC_ASSERT(aInputStream);
 
   RefPtr<FetchStream> stream =
       new FetchStream(aGlobal, aStreamHolder, aInputStream);
 
   if (NS_IsMainThread()) {
@@ -354,17 +353,18 @@ FetchStream::OnInputStreamReady(nsIAsync
   }
 
   // The WriteInto callback changes mState to eChecking.
   MOZ_DIAGNOSTIC_ASSERT(mState == eChecking);
 
   return NS_OK;
 }
 
-/* static */ nsresult FetchStream::RetrieveInputStream(
+/* static */
+nsresult FetchStream::RetrieveInputStream(
     JS::ReadableStreamUnderlyingSource* aUnderlyingReadableStreamSource,
     nsIInputStream** aInputStream) {
   MOZ_ASSERT(aUnderlyingReadableStreamSource);
   MOZ_ASSERT(aInputStream);
 
   RefPtr<FetchStream> stream =
       static_cast<FetchStream*>(aUnderlyingReadableStreamSource);
   stream->AssertIsOnOwningThread();
--- a/dom/fetch/FetchStreamReader.cpp
+++ b/dom/fetch/FetchStreamReader.cpp
@@ -34,19 +34,20 @@ NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN(Fet
   NS_IMPL_CYCLE_COLLECTION_TRACE_JS_MEMBER_CALLBACK(mReader)
 NS_IMPL_CYCLE_COLLECTION_TRACE_END
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(FetchStreamReader)
   NS_INTERFACE_MAP_ENTRY(nsIOutputStreamCallback)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIOutputStreamCallback)
 NS_INTERFACE_MAP_END
 
-/* static */ nsresult FetchStreamReader::Create(
-    JSContext* aCx, nsIGlobalObject* aGlobal, FetchStreamReader** aStreamReader,
-    nsIInputStream** aInputStream) {
+/* static */
+nsresult FetchStreamReader::Create(JSContext* aCx, nsIGlobalObject* aGlobal,
+                                   FetchStreamReader** aStreamReader,
+                                   nsIInputStream** aInputStream) {
   MOZ_ASSERT(aCx);
   MOZ_ASSERT(aGlobal);
   MOZ_ASSERT(aStreamReader);
   MOZ_ASSERT(aInputStream);
 
   RefPtr<FetchStreamReader> streamReader = new FetchStreamReader(aGlobal);
 
   nsCOMPtr<nsIAsyncInputStream> pipeIn;
--- a/dom/fetch/Headers.cpp
+++ b/dom/fetch/Headers.cpp
@@ -55,17 +55,18 @@ already_AddRefed<Headers> Headers::Const
     const GlobalObject& aGlobal,
     const OwningHeadersOrByteStringSequenceSequenceOrByteStringByteStringRecord&
         aInit,
     ErrorResult& aRv) {
   nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(aGlobal.GetAsSupports());
   return Create(global, aInit, aRv);
 }
 
-/* static */ already_AddRefed<Headers> Headers::Create(
+/* static */
+already_AddRefed<Headers> Headers::Create(
     nsIGlobalObject* aGlobal,
     const OwningHeadersOrByteStringSequenceSequenceOrByteStringByteStringRecord&
         aInit,
     ErrorResult& aRv) {
   RefPtr<InternalHeaders> ih = new InternalHeaders();
   RefPtr<Headers> headers = new Headers(aGlobal, ih);
 
   if (aInit.IsHeaders()) {
--- a/dom/fetch/InternalRequest.cpp
+++ b/dom/fetch/InternalRequest.cpp
@@ -179,18 +179,18 @@ void InternalRequest::SetContentPolicyTy
 }
 
 void InternalRequest::OverrideContentPolicyType(
     nsContentPolicyType aContentPolicyType) {
   SetContentPolicyType(aContentPolicyType);
   mContentPolicyTypeOverridden = true;
 }
 
-/* static */ RequestDestination
-InternalRequest::MapContentPolicyTypeToRequestDestination(
+/* static */
+RequestDestination InternalRequest::MapContentPolicyTypeToRequestDestination(
     nsContentPolicyType aContentPolicyType) {
   RequestDestination destination = RequestDestination::_empty;
   switch (aContentPolicyType) {
     case nsIContentPolicy::TYPE_OTHER:
       destination = RequestDestination::_empty;
       break;
     case nsIContentPolicy::TYPE_INTERNAL_SCRIPT:
     case nsIContentPolicy::TYPE_INTERNAL_SCRIPT_PRELOAD:
--- a/dom/fetch/Request.cpp
+++ b/dom/fetch/Request.cpp
@@ -242,19 +242,21 @@ class ReferrerSameOriginChecker final : 
 
  private:
   const nsString mReferrerURL;
   nsresult& mResult;
 };
 
 }  // namespace
 
-/*static*/ already_AddRefed<Request> Request::Constructor(
-    const GlobalObject& aGlobal, const RequestOrUSVString& aInput,
-    const RequestInit& aInit, ErrorResult& aRv) {
+/*static*/
+already_AddRefed<Request> Request::Constructor(const GlobalObject& aGlobal,
+                                               const RequestOrUSVString& aInput,
+                                               const RequestInit& aInit,
+                                               ErrorResult& aRv) {
   bool hasCopiedBody = false;
   RefPtr<InternalRequest> request;
 
   nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(aGlobal.GetAsSupports());
 
   RefPtr<AbortSignal> signal;
 
   if (aInput.IsRequest()) {
--- a/dom/fetch/Response.cpp
+++ b/dom/fetch/Response.cpp
@@ -75,28 +75,30 @@ Response::Response(nsIGlobalObject* aGlo
       aInternalResponse->Headers()->Guard() == HeadersGuardEnum::Response);
   SetMimeType();
 
   mozilla::HoldJSObjects(this);
 }
 
 Response::~Response() { mozilla::DropJSObjects(this); }
 
-/* static */ already_AddRefed<Response> Response::Error(
-    const GlobalObject& aGlobal) {
+/* static */
+already_AddRefed<Response> Response::Error(const GlobalObject& aGlobal) {
   nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(aGlobal.GetAsSupports());
   RefPtr<InternalResponse> error =
       InternalResponse::NetworkError(NS_ERROR_FAILURE);
   RefPtr<Response> r = new Response(global, error, nullptr);
   return r.forget();
 }
 
-/* static */ already_AddRefed<Response> Response::Redirect(
-    const GlobalObject& aGlobal, const nsAString& aUrl, uint16_t aStatus,
-    ErrorResult& aRv) {
+/* static */
+already_AddRefed<Response> Response::Redirect(const GlobalObject& aGlobal,
+                                              const nsAString& aUrl,
+                                              uint16_t aStatus,
+                                              ErrorResult& aRv) {
   nsAutoString parsedURL;
 
   if (NS_IsMainThread()) {
     nsCOMPtr<nsIURI> baseURI;
     nsCOMPtr<nsPIDOMWindowInner> inner(
         do_QueryInterface(aGlobal.GetAsSupports()));
     Document* doc = inner ? inner->GetExtantDoc() : nullptr;
     if (doc) {
@@ -153,17 +155,18 @@ Response::~Response() { mozilla::DropJSO
     return nullptr;
   }
   r->GetInternalHeaders()->SetGuard(HeadersGuardEnum::Immutable, aRv);
   MOZ_ASSERT(!aRv.Failed());
 
   return r.forget();
 }
 
-/*static*/ already_AddRefed<Response> Response::Constructor(
+/*static*/
+already_AddRefed<Response> Response::Constructor(
     const GlobalObject& aGlobal,
     const Optional<Nullable<fetch::ResponseBodyInit>>& aBody,
     const ResponseInit& aInit, ErrorResult& aRv) {
   nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(aGlobal.GetAsSupports());
 
   if (aInit.mStatus < 200 || aInit.mStatus > 599) {
     aRv.ThrowRangeError<MSG_INVALID_RESPONSE_STATUSCODE_ERROR>();
     return nullptr;
--- a/dom/file/BaseBlobImpl.cpp
+++ b/dom/file/BaseBlobImpl.cpp
@@ -119,15 +119,16 @@ nsresult BaseBlobImpl::SetMutable(bool a
       return error.StealNSResult();
     }
   }
 
   mImmutable = !aMutable;
   return rv;
 }
 
-/* static */ uint64_t BaseBlobImpl::NextSerialNumber() {
+/* static */
+uint64_t BaseBlobImpl::NextSerialNumber() {
   static Atomic<uint64_t> nextSerialNumber;
   return nextSerialNumber++;
 }
 
 }  // namespace dom
 }  // namespace mozilla
--- a/dom/file/Blob.cpp
+++ b/dom/file/Blob.cpp
@@ -56,34 +56,38 @@ void Blob::MakeValidBlobType(nsAString& 
     }
 
     if (c >= 'A' && c <= 'Z') {
       *iter = c + ('a' - 'A');
     }
   }
 }
 
-/* static */ Blob* Blob::Create(nsISupports* aParent, BlobImpl* aImpl) {
+/* static */
+Blob* Blob::Create(nsISupports* aParent, BlobImpl* aImpl) {
   MOZ_ASSERT(aImpl);
 
   return aImpl->IsFile() ? new File(aParent, aImpl) : new Blob(aParent, aImpl);
 }
 
-/* static */ already_AddRefed<Blob> Blob::CreateStringBlob(
-    nsISupports* aParent, const nsACString& aData,
-    const nsAString& aContentType) {
+/* static */
+already_AddRefed<Blob> Blob::CreateStringBlob(nsISupports* aParent,
+                                              const nsACString& aData,
+                                              const nsAString& aContentType) {
   RefPtr<BlobImpl> blobImpl = StringBlobImpl::Create(aData, aContentType);
   RefPtr<Blob> blob = Blob::Create(aParent, blobImpl);
   MOZ_ASSERT(!blob->mImpl->IsFile());
   return blob.forget();
 }
 
-/* static */ already_AddRefed<Blob> Blob::CreateMemoryBlob(
-    nsISupports* aParent, void* aMemoryBuffer, uint64_t aLength,
-    const nsAString& aContentType) {
+/* static */
+already_AddRefed<Blob> Blob::CreateMemoryBlob(nsISupports* aParent,
+                                              void* aMemoryBuffer,
+                                              uint64_t aLength,
+                                              const nsAString& aContentType) {
   RefPtr<Blob> blob = Blob::Create(
       aParent, new MemoryBlobImpl(aMemoryBuffer, aLength, aContentType));
   MOZ_ASSERT(!blob->mImpl->IsFile());
   return blob.forget();
 }
 
 Blob::Blob(nsISupports* aParent, BlobImpl* aImpl)
     : mImpl(aImpl), mParent(aParent) {
@@ -185,17 +189,18 @@ Blob::GetMutable(bool* aMutable) { retur
 
 NS_IMETHODIMP
 Blob::SetMutable(bool aMutable) { return mImpl->SetMutable(aMutable); }
 
 JSObject* Blob::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) {
   return Blob_Binding::Wrap(aCx, this, aGivenProto);
 }
 
-/* static */ already_AddRefed<Blob> Blob::Constructor(
+/* static */
+already_AddRefed<Blob> Blob::Constructor(
     const GlobalObject& aGlobal, const Optional<Sequence<BlobPart>>& aData,
     const BlobPropertyBag& aBag, ErrorResult& aRv) {
   RefPtr<MultipartBlobImpl> impl = new MultipartBlobImpl();
 
   if (aData.WasPassed()) {
     nsAutoString type(aBag.mType);
     MakeValidBlobType(type);
     impl->InitializeBlob(aData.Value(), type,
--- a/dom/file/File.cpp
+++ b/dom/file/File.cpp
@@ -19,54 +19,62 @@ namespace mozilla {
 namespace dom {
 
 File::File(nsISupports* aParent, BlobImpl* aImpl) : Blob(aParent, aImpl) {
   MOZ_ASSERT(aImpl->IsFile());
 }
 
 File::~File() {}
 
-/* static */ File* File::Create(nsISupports* aParent, BlobImpl* aImpl) {
+/* static */
+File* File::Create(nsISupports* aParent, BlobImpl* aImpl) {
   MOZ_ASSERT(aImpl);
   MOZ_ASSERT(aImpl->IsFile());
 
   return new File(aParent, aImpl);
 }
 
-/* static */ already_AddRefed<File> File::Create(nsISupports* aParent,
-                                                 const nsAString& aName,
-                                                 const nsAString& aContentType,
-                                                 uint64_t aLength,
-                                                 int64_t aLastModifiedDate) {
+/* static */
+already_AddRefed<File> File::Create(nsISupports* aParent,
+                                    const nsAString& aName,
+                                    const nsAString& aContentType,
+                                    uint64_t aLength,
+                                    int64_t aLastModifiedDate) {
   RefPtr<File> file = new File(
       aParent, new BaseBlobImpl(NS_LITERAL_STRING("BaseBlobImpl"), aName,
                                 aContentType, aLength, aLastModifiedDate));
   return file.forget();
 }
 
-/* static */ already_AddRefed<File> File::CreateMemoryFile(
-    nsISupports* aParent, void* aMemoryBuffer, uint64_t aLength,
-    const nsAString& aName, const nsAString& aContentType,
-    int64_t aLastModifiedDate) {
+/* static */
+already_AddRefed<File> File::CreateMemoryFile(nsISupports* aParent,
+                                              void* aMemoryBuffer,
+                                              uint64_t aLength,
+                                              const nsAString& aName,
+                                              const nsAString& aContentType,
+                                              int64_t aLastModifiedDate) {
   RefPtr<File> file =
       new File(aParent, new MemoryBlobImpl(aMemoryBuffer, aLength, aName,
                                            aContentType, aLastModifiedDate));
   return file.forget();
 }
 
-/* static */ already_AddRefed<File> File::CreateFromFile(nsISupports* aParent,
-                                                         nsIFile* aFile) {
+/* static */
+already_AddRefed<File> File::CreateFromFile(nsISupports* aParent,
+                                            nsIFile* aFile) {
   MOZ_DIAGNOSTIC_ASSERT(XRE_IsParentProcess());
   RefPtr<File> file = new File(aParent, new FileBlobImpl(aFile));
   return file.forget();
 }
 
-/* static */ already_AddRefed<File> File::CreateFromFile(
-    nsISupports* aParent, nsIFile* aFile, const nsAString& aName,
-    const nsAString& aContentType) {
+/* static */
+already_AddRefed<File> File::CreateFromFile(nsISupports* aParent,
+                                            nsIFile* aFile,
+                                            const nsAString& aName,
+                                            const nsAString& aContentType) {
   MOZ_DIAGNOSTIC_ASSERT(XRE_IsParentProcess());
   RefPtr<File> file =
       new File(aParent, new FileBlobImpl(aFile, aName, aContentType));
   return file.forget();
 }
 
 JSObject* File::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) {
   return File_Binding::Wrap(aCx, this, aGivenProto);
@@ -97,19 +105,22 @@ void File::GetMozFullPath(nsAString& aFi
   mImpl->GetMozFullPath(aFilename, aGuarantee, aRv);
 }
 
 void File::GetMozFullPathInternal(nsAString& aFileName,
                                   ErrorResult& aRv) const {
   mImpl->GetMozFullPathInternal(aFileName, aRv);
 }
 
-/* static */ already_AddRefed<File> File::Constructor(
-    const GlobalObject& aGlobal, const Sequence<BlobPart>& aData,
-    const nsAString& aName, const FilePropertyBag& aBag, ErrorResult& aRv) {
+/* static */
+already_AddRefed<File> File::Constructor(const GlobalObject& aGlobal,
+                                         const Sequence<BlobPart>& aData,
+                                         const nsAString& aName,
+                                         const FilePropertyBag& aBag,
+                                         ErrorResult& aRv) {
   // Normalizing the filename
   nsString name(aName);
   name.ReplaceChar('/', ':');
 
   RefPtr<MultipartBlobImpl> impl = new MultipartBlobImpl(name);
 
   nsAutoString type(aBag.mType);
   MakeValidBlobType(type);
@@ -122,28 +133,30 @@ void File::GetMozFullPathInternal(nsAStr
   if (aBag.mLastModified.WasPassed()) {
     impl->SetLastModified(aBag.mLastModified.Value());
   }
 
   RefPtr<File> file = new File(aGlobal.GetAsSupports(), impl);
   return file.forget();
 }
 
-/* static */ already_AddRefed<Promise> File::CreateFromNsIFile(
+/* static */
+already_AddRefed<Promise> File::CreateFromNsIFile(
     const GlobalObject& aGlobal, nsIFile* aData,
     const ChromeFilePropertyBag& aBag, SystemCallerGuarantee aGuarantee,
     ErrorResult& aRv) {
   nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(aGlobal.GetAsSupports());
 
   RefPtr<Promise> promise =
       FileCreatorHelper::CreateFile(global, aData, aBag, true, aRv);
   return promise.forget();
 }
 
-/* static */ already_AddRefed<Promise> File::CreateFromFileName(
+/* static */
+already_AddRefed<Promise> File::CreateFromFileName(
     const GlobalObject& aGlobal, const nsAString& aPath,
     const ChromeFilePropertyBag& aBag, SystemCallerGuarantee aGuarantee,
     ErrorResult& aRv) {
   nsCOMPtr<nsIFile> file;
   aRv = NS_NewLocalFile(aPath, false, getter_AddRefs(file));
   if (NS_WARN_IF(aRv.Failed())) {
     return nullptr;
   }
--- a/dom/file/FileCreatorHelper.cpp
+++ b/dom/file/FileCreatorHelper.cpp
@@ -20,17 +20,18 @@
 // replaced by FileCreatorHelper#CreateFileW.
 #ifdef CreateFile
 #  undef CreateFile
 #endif
 
 namespace mozilla {
 namespace dom {
 
-/* static */ already_AddRefed<Promise> FileCreatorHelper::CreateFile(
+/* static */
+already_AddRefed<Promise> FileCreatorHelper::CreateFile(
     nsIGlobalObject* aGlobalObject, nsIFile* aFile,
     const ChromeFilePropertyBag& aBag, bool aIsFromNsIFile, ErrorResult& aRv) {
   MOZ_DIAGNOSTIC_ASSERT(NS_IsMainThread());
 
   RefPtr<Promise> promise = Promise::Create(aGlobalObject, aRv);
   if (NS_WARN_IF(aRv.Failed())) {
     return nullptr;
   }
@@ -72,17 +73,18 @@ namespace dom {
   helper->SendRequest(aFile, aBag, aIsFromNsIFile, aRv);
   if (NS_WARN_IF(aRv.Failed())) {
     return nullptr;
   }
 
   return promise.forget();
 }
 
-/* static */ already_AddRefed<File> FileCreatorHelper::CreateFileInternal(
+/* static */
+already_AddRefed<File> FileCreatorHelper::CreateFileInternal(
     nsPIDOMWindowInner* aWindow, nsIFile* aFile,
     const ChromeFilePropertyBag& aBag, bool aIsFromNsIFile, ErrorResult& aRv) {
   bool lastModifiedPassed = false;
   int64_t lastModified = 0;
   if (aBag.mLastModified.WasPassed()) {
     lastModifiedPassed = true;
     lastModified = aBag.mLastModified.Value();
   }
@@ -140,31 +142,33 @@ void FileCreatorHelper::ResponseReceived
     mPromise->MaybeReject(aRv);
     return;
   }
 
   RefPtr<File> file = File::Create(mWindow, aBlobImpl);
   mPromise->MaybeResolve(file);
 }
 
-/* static */ nsresult FileCreatorHelper::CreateBlobImplForIPC(
+/* static */
+nsresult FileCreatorHelper::CreateBlobImplForIPC(
     const nsAString& aPath, const nsAString& aType, const nsAString& aName,
     bool aLastModifiedPassed, int64_t aLastModified, bool aExistenceCheck,
     bool aIsFromNsIFile, BlobImpl** aBlobImpl) {
   nsCOMPtr<nsIFile> file;
   nsresult rv = NS_NewLocalFile(aPath, true, getter_AddRefs(file));
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return rv;
   }
 
   return CreateBlobImpl(file, aType, aName, aLastModifiedPassed, aLastModified,
                         aExistenceCheck, aIsFromNsIFile, aBlobImpl);
 }
 
-/* static */ nsresult FileCreatorHelper::CreateBlobImpl(
+/* static */
+nsresult FileCreatorHelper::CreateBlobImpl(
     nsIFile* aFile, const nsAString& aType, const nsAString& aName,
     bool aLastModifiedPassed, int64_t aLastModified, bool aExistenceCheck,
     bool aIsFromNsIFile, BlobImpl** aBlobImpl) {
   if (!aExistenceCheck) {
     RefPtr<FileBlobImpl> impl = new FileBlobImpl(aFile);
 
     if (!aName.IsEmpty()) {
       impl->SetName(aName);
--- a/dom/file/FileReader.cpp
+++ b/dom/file/FileReader.cpp
@@ -112,17 +112,18 @@ FileReader::FileReader(nsIGlobalObject* 
   SetDOMStringToNull(mResult);
 }
 
 FileReader::~FileReader() {
   Shutdown();
   DropJSObjects(this);
 }
 
-/* static */ already_AddRefed<FileReader> FileReader::Constructor(
+/* static */
+already_AddRefed<FileReader> FileReader::Constructor(
     const GlobalObject& aGlobal, ErrorResult& aRv) {
   nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(aGlobal.GetAsSupports());
   RefPtr<WeakWorkerRef> workerRef;
 
   if (!NS_IsMainThread()) {
     JSContext* cx = aGlobal.Context();
     WorkerPrivate* workerPrivate = GetWorkerPrivateFromContext(cx);
 
@@ -465,18 +466,19 @@ nsresult FileReader::GetAsDataURL(Blob* 
 
   if (!AppendASCIItoUTF16(encodedData, aResult, fallible)) {
     return NS_ERROR_OUT_OF_MEMORY;
   }
 
   return NS_OK;
 }
 
-/* virtual */ JSObject* FileReader::WrapObject(
-    JSContext* aCx, JS::Handle<JSObject*> aGivenProto) {
+/* virtual */
+JSObject* FileReader::WrapObject(JSContext* aCx,
+                                 JS::Handle<JSObject*> aGivenProto) {
   return FileReader_Binding::Wrap(aCx, this, aGivenProto);
 }
 
 void FileReader::StartProgressEventTimer() {
   if (!mProgressNotifier) {
     mProgressNotifier = NS_NewTimer(mTarget);
   }
 
--- a/dom/file/MemoryBlobImpl.cpp
+++ b/dom/file/MemoryBlobImpl.cpp
@@ -60,22 +60,24 @@ void MemoryBlobImpl::CreateInputStream(n
     aRv.Throw(NS_ERROR_FAILURE);
     return;
   }
 
   aRv = MemoryBlobImpl::DataOwnerAdapter::Create(mDataOwner, mStart, mLength,
                                                  aStream);
 }
 
-/* static */ StaticMutex MemoryBlobImpl::DataOwner::sDataOwnerMutex;
+/* static */
+StaticMutex MemoryBlobImpl::DataOwner::sDataOwnerMutex;
 
 /* static */ StaticAutoPtr<LinkedList<MemoryBlobImpl::DataOwner>>
     MemoryBlobImpl::DataOwner::sDataOwners;
 
-/* static */ bool MemoryBlobImpl::DataOwner::sMemoryReporterRegistered = false;
+/* static */
+bool MemoryBlobImpl::DataOwner::sMemoryReporterRegistered = false;
 
 MOZ_DEFINE_MALLOC_SIZE_OF(MemoryFileDataOwnerMallocSizeOf)
 
 class MemoryBlobImplDataOwnerMemoryReporter final : public nsIMemoryReporter {
   ~MemoryBlobImplDataOwnerMemoryReporter() {}
 
  public:
   NS_DECL_THREADSAFE_ISUPPORTS
@@ -149,17 +151,18 @@ class MemoryBlobImplDataOwnerMemoryRepor
     }
 
     return NS_OK;
   }
 };
 
 NS_IMPL_ISUPPORTS(MemoryBlobImplDataOwnerMemoryReporter, nsIMemoryReporter)
 
-/* static */ void MemoryBlobImpl::DataOwner::EnsureMemoryReporterRegistered() {
+/* static */
+void MemoryBlobImpl::DataOwner::EnsureMemoryReporterRegistered() {
   sDataOwnerMutex.AssertCurrentThreadOwns();
   if (sMemoryReporterRegistered) {
     return;
   }
 
   RegisterStrongMemoryReporter(new MemoryBlobImplDataOwnerMemoryReporter());
 
   sMemoryReporterRegistered = true;
--- a/dom/file/MultipartBlobImpl.cpp
+++ b/dom/file/MultipartBlobImpl.cpp
@@ -17,30 +17,32 @@
 #include "nsContentUtils.h"
 #include "nsIScriptError.h"
 #include "nsIXPConnect.h"
 #include <algorithm>
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
-/* static */ already_AddRefed<MultipartBlobImpl> MultipartBlobImpl::Create(
+/* static */
+already_AddRefed<MultipartBlobImpl> MultipartBlobImpl::Create(
     nsTArray<RefPtr<BlobImpl>>&& aBlobImpls, const nsAString& aName,
     const nsAString& aContentType, ErrorResult& aRv) {
   RefPtr<MultipartBlobImpl> blobImpl =
       new MultipartBlobImpl(std::move(aBlobImpls), aName, aContentType);
   blobImpl->SetLengthAndModifiedDate(aRv);
   if (NS_WARN_IF(aRv.Failed())) {
     return nullptr;
   }
 
   return blobImpl.forget();
 }
 
-/* static */ already_AddRefed<MultipartBlobImpl> MultipartBlobImpl::Create(
+/* static */
+already_AddRefed<MultipartBlobImpl> MultipartBlobImpl::Create(
     nsTArray<RefPtr<BlobImpl>>&& aBlobImpls, const nsAString& aContentType,
     ErrorResult& aRv) {
   RefPtr<MultipartBlobImpl> blobImpl =
       new MultipartBlobImpl(std::move(aBlobImpls), aContentType);
   blobImpl->SetLengthAndModifiedDate(aRv);
   if (NS_WARN_IF(aRv.Failed())) {
     return nullptr;
   }
--- a/dom/file/StreamBlobImpl.cpp
+++ b/dom/file/StreamBlobImpl.cpp
@@ -12,29 +12,31 @@
 #include "nsStringStream.h"
 #include "nsICloneableInputStream.h"
 
 namespace mozilla {
 namespace dom {
 
 NS_IMPL_ISUPPORTS_INHERITED(StreamBlobImpl, BlobImpl, nsIMemoryReporter)
 
-/* static */ already_AddRefed<StreamBlobImpl> StreamBlobImpl::Create(
+/* static */
+already_AddRefed<StreamBlobImpl> StreamBlobImpl::Create(
     already_AddRefed<nsIInputStream> aInputStream,
     const nsAString& aContentType, uint64_t aLength,
     const nsAString& aBlobImplType) {
   nsCOMPtr<nsIInputStream> inputStream = std::move(aInputStream);
 
   RefPtr<StreamBlobImpl> blobImplStream = new StreamBlobImpl(
       inputStream.forget(), aContentType, aLength, aBlobImplType);
   blobImplStream->MaybeRegisterMemoryReporter();
   return blobImplStream.forget();
 }
 
-/* static */ already_AddRefed<StreamBlobImpl> StreamBlobImpl::Create(
+/* static */
+already_AddRefed<StreamBlobImpl> StreamBlobImpl::Create(
     already_AddRefed<nsIInputStream> aInputStream, const nsAString& aName,
     const nsAString& aContentType, int64_t aLastModifiedDate, uint64_t aLength,
     const nsAString& aBlobImplType) {
   nsCOMPtr<nsIInputStream> inputStream = std::move(aInputStream);
 
   RefPtr<StreamBlobImpl> blobImplStream =
       new StreamBlobImpl(inputStream.forget(), aName, aContentType,
                          aLastModifiedDate, aLength, aBlobImplType);
--- a/dom/file/StringBlobImpl.cpp
+++ b/dom/file/StringBlobImpl.cpp
@@ -7,17 +7,18 @@
 #include "StringBlobImpl.h"
 #include "nsStringStream.h"
 
 namespace mozilla {
 namespace dom {
 
 NS_IMPL_ISUPPORTS_INHERITED(StringBlobImpl, BlobImpl, nsIMemoryReporter)
 
-/* static */ already_AddRefed<StringBlobImpl> StringBlobImpl::Create(
+/* static */
+already_AddRefed<StringBlobImpl> StringBlobImpl::Create(
     const nsACString& aData, const nsAString& aContentType) {
   RefPtr<StringBlobImpl> blobImpl = new StringBlobImpl(aData, aContentType);
   RegisterWeakMemoryReporter(blobImpl);
   return blobImpl.forget();
 }
 
 StringBlobImpl::StringBlobImpl(const nsACString& aData,
                                const nsAString& aContentType)
--- a/dom/file/ipc/IPCBlobInputStreamParent.cpp
+++ b/dom/file/ipc/IPCBlobInputStreamParent.cpp
@@ -9,20 +9,20 @@
 #include "mozilla/ipc/IPCStreamUtils.h"
 #include "mozilla/InputStreamLengthHelper.h"
 #include "nsContentUtils.h"
 
 namespace mozilla {
 namespace dom {
 
 template <typename M>
-/* static */ already_AddRefed<IPCBlobInputStreamParent>
-IPCBlobInputStreamParent::Create(nsIInputStream* aInputStream, uint64_t aSize,
-                                 uint64_t aChildID, nsresult* aRv,
-                                 M* aManager) {
+/* static */
+already_AddRefed<IPCBlobInputStreamParent> IPCBlobInputStreamParent::Create(
+    nsIInputStream* aInputStream, uint64_t aSize, uint64_t aChildID,
+    nsresult* aRv, M* aManager) {
   MOZ_ASSERT(aInputStream);
   MOZ_ASSERT(aRv);
 
   nsID id;
   *aRv = nsContentUtils::GenerateUUIDInPlace(id);
   if (NS_WARN_IF(NS_FAILED(*aRv))) {
     return nullptr;
   }
@@ -30,19 +30,19 @@ IPCBlobInputStreamParent::Create(nsIInpu
   IPCBlobInputStreamStorage::Get()->AddStream(aInputStream, id, aSize,
                                               aChildID);
 
   RefPtr<IPCBlobInputStreamParent> parent =
       new IPCBlobInputStreamParent(id, aSize, aManager);
   return parent.forget();
 }
 
-/* static */ already_AddRefed<IPCBlobInputStreamParent>
-IPCBlobInputStreamParent::Create(const nsID& aID, uint64_t aSize,
-                                 PBackgroundParent* aManager) {
+/* static */
+already_AddRefed<IPCBlobInputStreamParent> IPCBlobInputStreamParent::Create(
+    const nsID& aID, uint64_t aSize, PBackgroundParent* aManager) {
   RefPtr<IPCBlobInputStreamParent> actor =
       new IPCBlobInputStreamParent(aID, aSize, aManager);
 
   actor->mCallback = IPCBlobInputStreamStorage::Get()->TakeCallback(aID);
 
   return actor.forget();
 }
 
--- a/dom/file/ipc/IPCBlobInputStreamStorage.cpp
+++ b/dom/file/ipc/IPCBlobInputStreamStorage.cpp
@@ -30,21 +30,21 @@ NS_INTERFACE_MAP_END
 
 NS_IMPL_ADDREF(IPCBlobInputStreamStorage)
 NS_IMPL_RELEASE(IPCBlobInputStreamStorage)
 
 IPCBlobInputStreamStorage::IPCBlobInputStreamStorage() {}
 
 IPCBlobInputStreamStorage::~IPCBlobInputStreamStorage() {}
 
-/* static */ IPCBlobInputStreamStorage* IPCBlobInputStreamStorage::Get() {
-  return gStorage;
-}
+/* static */
+IPCBlobInputStreamStorage* IPCBlobInputStreamStorage::Get() { return gStorage; }
 
-/* static */ void IPCBlobInputStreamStorage::Initialize() {
+/* static */
+void IPCBlobInputStreamStorage::Initialize() {
   MOZ_ASSERT(!gStorage);
 
   gStorage = new IPCBlobInputStreamStorage();
 
   nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
   if (obs) {
     obs->AddObserver(gStorage, "xpcom-shutdown", false);
     obs->AddObserver(gStorage, "ipc:content-shutdown", false);
--- a/dom/file/ipc/IPCBlobInputStreamThread.cpp
+++ b/dom/file/ipc/IPCBlobInputStreamThread.cpp
@@ -72,25 +72,27 @@ class MigrateActorRunnable final : publi
 
   RefPtr<IPCBlobInputStreamChild> mActor;
 };
 
 }  // namespace
 
 NS_IMPL_ISUPPORTS(IPCBlobInputStreamThread, nsIObserver, nsIEventTarget)
 
-/* static */ bool IPCBlobInputStreamThread::IsOnFileEventTarget(
+/* static */
+bool IPCBlobInputStreamThread::IsOnFileEventTarget(
     nsIEventTarget* aEventTarget) {
   MOZ_ASSERT(aEventTarget);
 
   mozilla::StaticMutexAutoLock lock(gIPCBlobThreadMutex);
   return gIPCBlobThread && aEventTarget == gIPCBlobThread->mThread;
 }
 
-/* static */ IPCBlobInputStreamThread* IPCBlobInputStreamThread::GetOrCreate() {
+/* static */
+IPCBlobInputStreamThread* IPCBlobInputStreamThread::GetOrCreate() {
   mozilla::StaticMutexAutoLock lock(gIPCBlobThreadMutex);
 
   if (gShutdownHasStarted) {
     return nullptr;
   }
 
   if (!gIPCBlobThread) {
     gIPCBlobThread = new IPCBlobInputStreamThread();
--- a/dom/file/uri/BlobURL.cpp
+++ b/dom/file/uri/BlobURL.cpp
@@ -121,17 +121,18 @@ nsresult BlobURL::CloneInternal(
 
   BlobURL* u = static_cast<BlobURL*>(simpleClone.get());
   u->mRevoked = mRevoked;
 
   simpleClone.forget(aClone);
   return NS_OK;
 }
 
-/* virtual */ nsresult BlobURL::EqualsInternal(
+/* virtual */
+nsresult BlobURL::EqualsInternal(
     nsIURI* aOther, mozilla::net::nsSimpleURI::RefHandlingEnum aRefHandlingMode,
     bool* aResult) {
   if (!aOther) {
     *aResult = false;
     return NS_OK;
   }
 
   RefPtr<BlobURL> otherUri;
--- a/dom/file/uri/BlobURLProtocolHandler.cpp
+++ b/dom/file/uri/BlobURLProtocolHandler.cpp
@@ -526,58 +526,65 @@ void BlobURLProtocolHandler::Init(void) 
     RegisterStrongMemoryReporter(new BlobURLsReporter());
   }
 }
 
 BlobURLProtocolHandler::BlobURLProtocolHandler() { Init(); }
 
 BlobURLProtocolHandler::~BlobURLProtocolHandler() = default;
 
-/* static */ nsresult BlobURLProtocolHandler::AddDataEntry(
-    BlobImpl* aBlobImpl, nsIPrincipal* aPrincipal, nsACString& aUri) {
+/* static */
+nsresult BlobURLProtocolHandler::AddDataEntry(BlobImpl* aBlobImpl,
+                                              nsIPrincipal* aPrincipal,
+                                              nsACString& aUri) {
   MOZ_ASSERT(aBlobImpl);
   MOZ_ASSERT(aPrincipal);
 
   Init();
 
   nsresult rv = GenerateURIString(aPrincipal, aUri);
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = AddDataEntryInternal(aUri, aBlobImpl, aPrincipal);
   NS_ENSURE_SUCCESS(rv, rv);
 
   BroadcastBlobURLRegistration(aUri, aBlobImpl, aPrincipal);
   return NS_OK;
 }
 
-/* static */ nsresult BlobURLProtocolHandler::AddDataEntry(
-    MediaSource* aMediaSource, nsIPrincipal* aPrincipal, nsACString& aUri) {
+/* static */
+nsresult BlobURLProtocolHandler::AddDataEntry(MediaSource* aMediaSource,
+                                              nsIPrincipal* aPrincipal,
+                                              nsACString& aUri) {
   MOZ_ASSERT(aMediaSource);
   MOZ_ASSERT(aPrincipal);
 
   Init();
 
   nsresult rv = GenerateURIString(aPrincipal, aUri);
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = AddDataEntryInternal(aUri, aMediaSource, aPrincipal);
   NS_ENSURE_SUCCESS(rv, rv);
 
   return NS_OK;
 }
 
-/* static */ nsresult BlobURLProtocolHandler::AddDataEntry(
-    const nsACString& aURI, nsIPrincipal* aPrincipal, BlobImpl* aBlobImpl) {
+/* static */
+nsresult BlobURLProtocolHandler::AddDataEntry(const nsACString& aURI,
+                                              nsIPrincipal* aPrincipal,
+                                              BlobImpl* aBlobImpl) {
   MOZ_ASSERT(aPrincipal);
   MOZ_ASSERT(aBlobImpl);
 
   return AddDataEntryInternal(aURI, aBlobImpl, aPrincipal);
 }
 
-/* static */ bool BlobURLProtocolHandler::GetAllBlobURLEntries(
+/* static */
+bool BlobURLProtocolHandler::GetAllBlobURLEntries(
     nsTArray<BlobURLRegistrationData>& aRegistrations, ContentParent* aCP) {
   MOZ_ASSERT(aCP);
 
   if (!gDataTable) {
     return true;
   }
 
   for (auto iter = gDataTable->ConstIter(); !iter.Done(); iter.Next()) {
@@ -599,18 +606,19 @@ BlobURLProtocolHandler::~BlobURLProtocol
     aRegistrations.AppendElement(BlobURLRegistrationData(
         nsCString(iter.Key()), ipcBlob, IPC::Principal(info->mPrincipal),
         info->mRevoked));
   }
 
   return true;
 }
 
-/*static */ void BlobURLProtocolHandler::RemoveDataEntry(
-    const nsACString& aUri, bool aBroadcastToOtherProcesses) {
+/*static */
+void BlobURLProtocolHandler::RemoveDataEntry(const nsACString& aUri,
+                                             bool aBroadcastToOtherProcesses) {
   if (!gDataTable) {
     return;
   }
 
   DataInfo* info = GetDataInfo(aUri);
   if (!info) {
     return;
   }
@@ -622,32 +630,35 @@ BlobURLProtocolHandler::~BlobURLProtocol
   }
 
   // The timer will take care of removing the entry for real after
   // RELEASING_TIMER milliseconds. In the meantime, the DataInfo, marked as
   // revoked, will not be exposed.
   ReleasingTimerHolder::Create(aUri);
 }
 
-/* static */ void BlobURLProtocolHandler::RemoveDataEntries() {
+/* static */
+void BlobURLProtocolHandler::RemoveDataEntries() {
   if (!gDataTable) {
     return;
   }
 
   gDataTable->Clear();
   delete gDataTable;
   gDataTable = nullptr;
 }
 
-/* static */ bool BlobURLProtocolHandler::HasDataEntry(const nsACString& aUri) {
+/* static */
+bool BlobURLProtocolHandler::HasDataEntry(const nsACString& aUri) {
   return !!GetDataInfo(aUri);
 }
 
-/* static */ nsresult BlobURLProtocolHandler::GenerateURIString(
-    nsIPrincipal* aPrincipal, nsACString& aUri) {
+/* static */
+nsresult BlobURLProtocolHandler::GenerateURIString(nsIPrincipal* aPrincipal,
+                                                   nsACString& aUri) {
   nsresult rv;
   nsCOMPtr<nsIUUIDGenerator> uuidgen =
       do_GetService("@mozilla.org/uuid-generator;1", &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsID id;
   rv = uuidgen->GenerateUUIDInPlace(&id);
   NS_ENSURE_SUCCESS(rv, rv);
@@ -669,32 +680,34 @@ BlobURLProtocolHandler::~BlobURLProtocol
     aUri.Append('/');
   }
 
   aUri += Substring(chars + 1, chars + NSID_LENGTH - 2);
 
   return NS_OK;
 }
 
-/* static */ nsIPrincipal* BlobURLProtocolHandler::GetDataEntryPrincipal(
+/* static */
+nsIPrincipal* BlobURLProtocolHandler::GetDataEntryPrincipal(
     const nsACString& aUri) {
   if (!gDataTable) {
     return nullptr;
   }
 
   DataInfo* res = GetDataInfo(aUri);
 
   if (!res) {
     return nullptr;
   }
 
   return res->mPrincipal;
 }
 
-/* static */ void BlobURLProtocolHandler::Traverse(
+/* static */
+void BlobURLProtocolHandler::Traverse(
     const nsACString& aUri, nsCycleCollectionTraversalCallback& aCallback) {
   if (!gDataTable) {
     return;
   }
 
   DataInfo* res;
   gDataTable->Get(aUri, &res);
   if (!res) {
@@ -822,18 +835,19 @@ BlobURLProtocolHandler::AllowPort(int32_
 }
 
 NS_IMETHODIMP
 BlobURLProtocolHandler::GetScheme(nsACString& result) {
   result.AssignLiteral(BLOBURI_SCHEME);
   return NS_OK;
 }
 
-/* static */ bool BlobURLProtocolHandler::GetBlobURLPrincipal(
-    nsIURI* aURI, nsIPrincipal** aPrincipal) {
+/* static */
+bool BlobURLProtocolHandler::GetBlobURLPrincipal(nsIURI* aURI,
+                                                 nsIPrincipal** aPrincipal) {
   MOZ_ASSERT(aURI);
   MOZ_ASSERT(aPrincipal);
 
   RefPtr<BlobURL> blobURL;
   nsresult rv =
       aURI->QueryInterface(kHOSTOBJECTURICID, getter_AddRefs(blobURL));
   if (NS_FAILED(rv) || !blobURL) {
     return false;
--- a/dom/file/uri/FontTableURIProtocolHandler.cpp
+++ b/dom/file/uri/FontTableURIProtocolHandler.cpp
@@ -8,18 +8,18 @@
 #include "nsIURIMutator.h"
 #include "nsIUUIDGenerator.h"
 #include "nsNetUtil.h"
 #include "nsSimpleURI.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
-/* static */ nsresult FontTableURIProtocolHandler::GenerateURIString(
-    nsACString &aUri) {
+/* static */
+nsresult FontTableURIProtocolHandler::GenerateURIString(nsACString &aUri) {
   nsresult rv;
   nsCOMPtr<nsIUUIDGenerator> uuidgen =
       do_GetService("@mozilla.org/uuid-generator;1", &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsID id;
   rv = uuidgen->GenerateUUIDInPlace(&id);
   NS_ENSURE_SUCCESS(rv, rv);
--- a/dom/filesystem/Directory.cpp
+++ b/dom/filesystem/Directory.cpp
@@ -42,29 +42,33 @@ NS_IMPL_CYCLE_COLLECTION_TRACE_WRAPPERCA
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(Directory)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(Directory)
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(Directory)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
-/* static */ already_AddRefed<Directory> Directory::Constructor(
-    const GlobalObject& aGlobal, const nsAString& aRealPath, ErrorResult& aRv) {
+/* static */
+already_AddRefed<Directory> Directory::Constructor(const GlobalObject& aGlobal,
+                                                   const nsAString& aRealPath,
+                                                   ErrorResult& aRv) {
   nsCOMPtr<nsIFile> path;
   aRv = NS_NewLocalFile(aRealPath, true, getter_AddRefs(path));
   if (NS_WARN_IF(aRv.Failed())) {
     return nullptr;
   }
 
   return Create(aGlobal.GetAsSupports(), path);
 }
 
-/* static */ already_AddRefed<Directory> Directory::Create(
-    nsISupports* aParent, nsIFile* aFile, FileSystemBase* aFileSystem) {
+/* static */
+already_AddRefed<Directory> Directory::Create(nsISupports* aParent,
+                                              nsIFile* aFile,
+                                              FileSystemBase* aFileSystem) {
   MOZ_ASSERT(aParent);
   MOZ_ASSERT(aFile);
 
   RefPtr<Directory> directory = new Directory(aParent, aFile, aFileSystem);
   return directory.forget();
 }
 
 Directory::Directory(nsISupports* aParent, nsIFile* aFile,
--- a/dom/filesystem/FileSystemSecurity.cpp
+++ b/dom/filesystem/FileSystemSecurity.cpp
@@ -13,26 +13,27 @@ namespace mozilla {
 namespace dom {
 
 namespace {
 
 StaticRefPtr<FileSystemSecurity> gFileSystemSecurity;
 
 }  // namespace
 
-/* static */ already_AddRefed<FileSystemSecurity> FileSystemSecurity::Get() {
+/* static */
+already_AddRefed<FileSystemSecurity> FileSystemSecurity::Get() {
   MOZ_ASSERT(NS_IsMainThread());
   AssertIsInMainProcess();
 
   RefPtr<FileSystemSecurity> service = gFileSystemSecurity.get();
   return service.forget();
 }
 
-/* static */ already_AddRefed<FileSystemSecurity>
-FileSystemSecurity::GetOrCreate() {
+/* static */
+already_AddRefed<FileSystemSecurity> FileSystemSecurity::GetOrCreate() {
   MOZ_ASSERT(NS_IsMainThread());
   AssertIsInMainProcess();
 
   if (!gFileSystemSecurity) {
     gFileSystemSecurity = new FileSystemSecurity();
     ClearOnShutdown(&gFileSystemSecurity);
   }
 
--- a/dom/filesystem/FileSystemUtils.cpp
+++ b/dom/filesystem/FileSystemUtils.cpp
@@ -10,29 +10,31 @@ namespace mozilla {
 namespace dom {
 
 namespace {
 
 bool TokenizerIgnoreNothing(char16_t /* aChar */) { return false; }
 
 }  // anonymous namespace
 
-/* static */ bool FileSystemUtils::IsDescendantPath(
-    const nsAString& aPath, const nsAString& aDescendantPath) {
+/* static */
+bool FileSystemUtils::IsDescendantPath(const nsAString& aPath,
+                                       const nsAString& aDescendantPath) {
   // Check the sub-directory path to see if it has the parent path as prefix.
   if (!aDescendantPath.Equals(aPath) &&
       !StringBeginsWith(aDescendantPath, aPath)) {
     return false;
   }
 
   return true;
 }
 
-/* static */ bool FileSystemUtils::IsValidRelativeDOMPath(
-    const nsAString& aPath, nsTArray<nsString>& aParts) {
+/* static */
+bool FileSystemUtils::IsValidRelativeDOMPath(const nsAString& aPath,
+                                             nsTArray<nsString>& aParts) {
   // We don't allow empty relative path to access the root.
   if (aPath.IsEmpty()) {
     return false;
   }
 
   // Leading and trailing "/" are not allowed.
   if (aPath.First() == FILESYSTEM_DOM_PATH_SEPARATOR_CHAR ||
       aPath.Last() == FILESYSTEM_DOM_PATH_SEPARATOR_CHAR) {
@@ -57,17 +59,18 @@ bool TokenizerIgnoreNothing(char16_t /* 
     }
 
     aParts.AppendElement(pathComponent);
   }
 
   return true;
 }
 
-/* static */ nsresult FileSystemUtils::DispatchRunnable(
+/* static */
+nsresult FileSystemUtils::DispatchRunnable(
     nsIGlobalObject* aGlobal, already_AddRefed<nsIRunnable>&& aRunnable) {
   nsCOMPtr<nsIRunnable> runnable = aRunnable;
 
   nsCOMPtr<nsIEventTarget> target;
   if (!aGlobal) {
     target = SystemGroup::EventTargetFor(TaskCategory::Other);
   } else {
     target = aGlobal->EventTargetFor(TaskCategory::Other);
--- a/dom/filesystem/GetDirectoryListingTask.cpp
+++ b/dom/filesystem/GetDirectoryListingTask.cpp
@@ -21,17 +21,18 @@
 
 namespace mozilla {
 namespace dom {
 
 /**
  * GetDirectoryListingTaskChild
  */
 
-/* static */ already_AddRefed<GetDirectoryListingTaskChild>
+/* static */
+already_AddRefed<GetDirectoryListingTaskChild>
 GetDirectoryListingTaskChild::Create(FileSystemBase* aFileSystem,
                                      Directory* aDirectory,
                                      nsIFile* aTargetPath,
                                      const nsAString& aFilters,
                                      ErrorResult& aRv) {
   MOZ_ASSERT(aFileSystem);
   MOZ_ASSERT(aDirectory);
   aFileSystem->AssertIsOnOwningThread();
@@ -166,17 +167,18 @@ void GetDirectoryListingTaskChild::Handl
   mPromise->MaybeResolve(mTargetData);
   mPromise = nullptr;
 }
 
 /**
  * GetDirectoryListingTaskParent
  */
 
-/* static */ already_AddRefed<GetDirectoryListingTaskParent>
+/* static */
+already_AddRefed<GetDirectoryListingTaskParent>
 GetDirectoryListingTaskParent::Create(
     FileSystemBase* aFileSystem,
     const FileSystemGetDirectoryListingParams& aParam,
     FileSystemRequestParent* aParent, ErrorResult& aRv) {
   MOZ_ASSERT(XRE_IsParentProcess(), "Only call from parent process!");
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aFileSystem);
 
--- a/dom/filesystem/GetFileOrDirectoryTask.cpp
+++ b/dom/filesystem/GetFileOrDirectoryTask.cpp
@@ -18,17 +18,18 @@
 
 namespace mozilla {
 namespace dom {
 
 /**
  * GetFileOrDirectoryTaskChild
  */
 
-/* static */ already_AddRefed<GetFileOrDirectoryTaskChild>
+/* static */
+already_AddRefed<GetFileOrDirectoryTaskChild>
 GetFileOrDirectoryTaskChild::Create(FileSystemBase* aFileSystem,
                                     nsIFile* aTargetPath, ErrorResult& aRv) {
   MOZ_ASSERT(NS_IsMainThread(), "Only call on main thread!");
   MOZ_ASSERT(aFileSystem);
 
   nsCOMPtr<nsIGlobalObject> globalObject =
       do_QueryInterface(aFileSystem->GetParentObject());
   if (NS_WARN_IF(!globalObject)) {
@@ -140,17 +141,18 @@ void GetFileOrDirectoryTaskChild::Handle
   mResultFile = nullptr;
   mPromise = nullptr;
 }
 
 /**
  * GetFileOrDirectoryTaskParent
  */
 
-/* static */ already_AddRefed<GetFileOrDirectoryTaskParent>
+/* static */
+already_AddRefed<GetFileOrDirectoryTaskParent>
 GetFileOrDirectoryTaskParent::Create(
     FileSystemBase* aFileSystem,
     const FileSystemGetFileOrDirectoryParams& aParam,
     FileSystemRequestParent* aParent, ErrorResult& aRv) {
   MOZ_ASSERT(XRE_IsParentProcess(), "Only call from parent process!");
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aFileSystem);
 
--- a/dom/filesystem/GetFilesHelper.cpp
+++ b/dom/filesystem/GetFilesHelper.cpp
@@ -561,20 +561,20 @@ GetFilesHelperParent::GetFilesHelperPare
       mContentParent(aContentParent),
       mUUID(aUUID) {}
 
 GetFilesHelperParent::~GetFilesHelperParent() {
   NS_ReleaseOnMainThreadSystemGroup("GetFilesHelperParent::mContentParent",
                                     mContentParent.forget());
 }
 
-/* static */ already_AddRefed<GetFilesHelperParent>
-GetFilesHelperParent::Create(const nsID& aUUID, const nsAString& aDirectoryPath,
-                             bool aRecursiveFlag, ContentParent* aContentParent,
-                             ErrorResult& aRv) {
+/* static */
+already_AddRefed<GetFilesHelperParent> GetFilesHelperParent::Create(
+    const nsID& aUUID, const nsAString& aDirectoryPath, bool aRecursiveFlag,
+    ContentParent* aContentParent, ErrorResult& aRv) {
   MOZ_ASSERT(aContentParent);
 
   RefPtr<GetFilesHelperParent> helper =
       new GetFilesHelperParent(aUUID, aContentParent, aRecursiveFlag);
   helper->SetDirectoryPath(aDirectoryPath);
 
   helper->Work(aRv);
   if (NS_WARN_IF(aRv.Failed())) {
--- a/dom/filesystem/GetFilesTask.cpp
+++ b/dom/filesystem/GetFilesTask.cpp
@@ -19,17 +19,18 @@
 
 namespace mozilla {
 namespace dom {
 
 /**
  * GetFilesTaskChild
  */
 
-/* static */ already_AddRefed<GetFilesTaskChild> GetFilesTaskChild::Create(
+/* static */
+already_AddRefed<GetFilesTaskChild> GetFilesTaskChild::Create(
     FileSystemBase* aFileSystem, Directory* aDirectory, nsIFile* aTargetPath,
     bool aRecursiveFlag, ErrorResult& aRv) {
   MOZ_ASSERT(aFileSystem);
   MOZ_ASSERT(aDirectory);
   aFileSystem->AssertIsOnOwningThread();
 
   nsCOMPtr<nsIGlobalObject> globalObject =
       do_QueryInterface(aFileSystem->GetParentObject());
@@ -131,17 +132,18 @@ void GetFilesTaskChild::HandlerCallback(
   mPromise->MaybeResolve(mTargetData);
   mPromise = nullptr;
 }
 
 /**
  * GetFilesTaskParent
  */
 
-/* static */ already_AddRefed<GetFilesTaskParent> GetFilesTaskParent::Create(
+/* static */
+already_AddRefed<GetFilesTaskParent> GetFilesTaskParent::Create(
     FileSystemBase* aFileSystem, const FileSystemGetFilesParams& aParam,
     FileSystemRequestParent* aParent, ErrorResult& aRv) {
   MOZ_ASSERT(XRE_IsParentProcess(), "Only call from parent process!");
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(aFileSystem);
 
   RefPtr<GetFilesTaskParent> task =
       new GetFilesTaskParent(aFileSystem, aParam, aParent);
--- a/dom/filesystem/compat/CallbackRunnables.cpp
+++ b/dom/filesystem/compat/CallbackRunnables.cpp
@@ -238,32 +238,34 @@ void GetEntryHelper::Error(nsresult aErr
 
     FileSystemUtils::DispatchRunnable(mParentEntry->GetParentObject(),
                                       runnable.forget());
   }
 }
 
 NS_IMPL_ISUPPORTS0(GetEntryHelper);
 
-/* static */ void FileSystemEntryCallbackHelper::Call(
+/* static */
+void FileSystemEntryCallbackHelper::Call(
     nsIGlobalObject* aGlobalObject,
     const Optional<OwningNonNull<FileSystemEntryCallback>>& aEntryCallback,
     FileSystemEntry* aEntry) {
   MOZ_ASSERT(aGlobalObject);
   MOZ_ASSERT(aEntry);
 
   if (aEntryCallback.WasPassed()) {
     RefPtr<EntryCallbackRunnable> runnable =
         new EntryCallbackRunnable(&aEntryCallback.Value(), aEntry);
 
     FileSystemUtils::DispatchRunnable(aGlobalObject, runnable.forget());
   }
 }
 
-/* static */ void ErrorCallbackHelper::Call(
+/* static */
+void ErrorCallbackHelper::Call(
     nsIGlobalObject* aGlobal,
     const Optional<OwningNonNull<ErrorCallback>>& aErrorCallback,
     nsresult aError) {
   MOZ_ASSERT(aGlobal);
   MOZ_ASSERT(NS_FAILED(aError));
 
   if (aErrorCallback.WasPassed()) {
     RefPtr<ErrorCallbackRunnable> runnable =
--- a/dom/filesystem/compat/FileSystem.cpp
+++ b/dom/filesystem/compat/FileSystem.cpp
@@ -17,18 +17,18 @@ NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(Fi
 NS_IMPL_CYCLE_COLLECTING_ADDREF(FileSystem)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(FileSystem)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(FileSystem)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
-/* static */ already_AddRefed<FileSystem> FileSystem::Create(
-    nsIGlobalObject* aGlobalObject)
+/* static */
+already_AddRefed<FileSystem> FileSystem::Create(nsIGlobalObject* aGlobalObject)
 
 {
   MOZ_ASSERT(aGlobalObject);
 
   nsID id;
   nsresult rv = nsContentUtils::GenerateUUIDInPlace(id);
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return nullptr;
--- a/dom/filesystem/compat/FileSystemEntry.cpp
+++ b/dom/filesystem/compat/FileSystemEntry.cpp
@@ -19,17 +19,18 @@ NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(Fi
 NS_IMPL_CYCLE_COLLECTING_ADDREF(FileSystemEntry)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(FileSystemEntry)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(FileSystemEntry)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
-/* static */ already_AddRefed<FileSystemEntry> FileSystemEntry::Create(
+/* static */
+already_AddRefed<FileSystemEntry> FileSystemEntry::Create(
     nsIGlobalObject* aGlobalObject,
     const OwningFileOrDirectory& aFileOrDirectory, FileSystem* aFileSystem) {
   MOZ_ASSERT(aGlobalObject);
   MOZ_ASSERT(aFileSystem);
 
   RefPtr<FileSystemEntry> entry;
   if (aFileOrDirectory.IsFile()) {
     entry = new FileSystemFileEntry(aGlobalObject, aFileOrDirectory.GetAsFile(),
--- a/dom/gamepad/Gamepad.cpp
+++ b/dom/gamepad/Gamepad.cpp
@@ -129,15 +129,16 @@ void Gamepad::SyncState(Gamepad* aOther)
 already_AddRefed<Gamepad> Gamepad::Clone(nsISupports* aParent) {
   RefPtr<Gamepad> out =
       new Gamepad(aParent, mID, mIndex, mHashKey, mMapping, mHand, mDisplayId,
                   mButtons.Length(), mAxes.Length(), mHapticActuators.Length());
   out->SyncState(this);
   return out.forget();
 }
 
-/* virtual */ JSObject* Gamepad::WrapObject(JSContext* aCx,
-                                            JS::Handle<JSObject*> aGivenProto) {
+/* virtual */
+JSObject* Gamepad::WrapObject(JSContext* aCx,
+                              JS::Handle<JSObject*> aGivenProto) {
   return Gamepad_Binding::Wrap(aCx, this, aGivenProto);
 }
 
 }  // namespace dom
 }  // namespace mozilla
--- a/dom/gamepad/GamepadButton.cpp
+++ b/dom/gamepad/GamepadButton.cpp
@@ -15,15 +15,16 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(Gamepad
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(GamepadButton)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
 NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(GamepadButton, mParent)
 
-/* virtual */ JSObject* GamepadButton::WrapObject(
-    JSContext* aCx, JS::Handle<JSObject*> aGivenProto) {
+/* virtual */
+JSObject* GamepadButton::WrapObject(JSContext* aCx,
+                                    JS::Handle<JSObject*> aGivenProto) {
   return GamepadButton_Binding::Wrap(aCx, this, aGivenProto);
 }
 
 }  // namespace dom
 }  // namespace mozilla
--- a/dom/gamepad/GamepadHapticActuator.cpp
+++ b/dom/gamepad/GamepadHapticActuator.cpp
@@ -24,18 +24,19 @@ NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(Ga
 GamepadHapticActuator::GamepadHapticActuator(nsISupports* aParent,
                                              uint32_t aGamepadId,
                                              uint32_t aIndex)
     : mParent(aParent),
       mGamepadId(aGamepadId),
       mType(GamepadHapticActuatorType::Vibration),
       mIndex(aIndex) {}
 
-/* virtual */ JSObject* GamepadHapticActuator::WrapObject(
-    JSContext* aCx, JS::Handle<JSObject*> aGivenProto) {
+/* virtual */
+JSObject* GamepadHapticActuator::WrapObject(JSContext* aCx,
+                                            JS::Handle<JSObject*> aGivenProto) {
   return GamepadHapticActuator_Binding::Wrap(aCx, this, aGivenProto);
 }
 
 nsISupports* GamepadHapticActuator::GetParentObject() const { return mParent; }
 
 #define CLAMP(f, min, max) (((f) < min) ? min : (((f) > max) ? max : (f)))
 
 already_AddRefed<Promise> GamepadHapticActuator::Pulse(double aValue,
--- a/dom/gamepad/GamepadPose.cpp
+++ b/dom/gamepad/GamepadPose.cpp
@@ -20,18 +20,19 @@ GamepadPose::GamepadPose(nsISupports* aP
 
 GamepadPose::GamepadPose(nsISupports* aParent) : Pose(aParent) {
   mozilla::HoldJSObjects(this);
   mPoseState.Clear();
 }
 
 GamepadPose::~GamepadPose() { mozilla::DropJSObjects(this); }
 
-/* virtual */ JSObject* GamepadPose::WrapObject(
-    JSContext* aJSContext, JS::Handle<JSObject*> aGivenProto) {
+/* virtual */
+JSObject* GamepadPose::WrapObject(JSContext* aJSContext,
+                                  JS::Handle<JSObject*> aGivenProto) {
   return GamepadPose_Binding::Wrap(aJSContext, this, aGivenProto);
 }
 
 bool GamepadPose::HasOrientation() const {
   return bool(mPoseState.flags & GamepadCapabilityFlags::Cap_Orientation);
 }
 
 bool GamepadPose::HasPosition() const {
--- a/dom/html/HTMLCanvasElement.cpp
+++ b/dom/html/HTMLCanvasElement.cpp
@@ -224,18 +224,19 @@ HTMLCanvasPrintState::HTMLCanvasPrintSta
     : mIsDone(false),
       mPendingNotify(false),
       mCanvas(aCanvas),
       mContext(aContext),
       mCallback(aCallback) {}
 
 HTMLCanvasPrintState::~HTMLCanvasPrintState() {}
 
-/* virtual */ JSObject* HTMLCanvasPrintState::WrapObject(
-    JSContext* aCx, JS::Handle<JSObject*> aGivenProto) {
+/* virtual */
+JSObject* HTMLCanvasPrintState::WrapObject(JSContext* aCx,
+                                           JS::Handle<JSObject*> aGivenProto) {
   return MozCanvasPrintState_Binding::Wrap(aCx, this, aGivenProto);
 }
 
 nsISupports* HTMLCanvasPrintState::Context() const { return mContext; }
 
 void HTMLCanvasPrintState::Done() {
   if (!mPendingNotify && !mIsDone) {
     // The canvas needs to be invalidated for printing reftests on linux to
@@ -381,18 +382,19 @@ NS_IMPL_CYCLE_COLLECTION_INHERITED(HTMLC
                                    mCurrentContext, mPrintCallback, mPrintState,
                                    mOriginalCanvas, mOffscreenCanvas)
 
 NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED_0(HTMLCanvasElement,
                                                nsGenericHTMLElement)
 
 NS_IMPL_ELEMENT_CLONE(HTMLCanvasElement)
 
-/* virtual */ JSObject* HTMLCanvasElement::WrapNode(
-    JSContext* aCx, JS::Handle<JSObject*> aGivenProto) {
+/* virtual */
+JSObject* HTMLCanvasElement::WrapNode(JSContext* aCx,
+                                      JS::Handle<JSObject*> aGivenProto) {
   return HTMLCanvasElement_Binding::Wrap(aCx, this, aGivenProto);
 }
 
 already_AddRefed<nsICanvasRenderingContextInternal>
 HTMLCanvasElement::CreateContext(CanvasContextType aContextType) {
   // Note that the compositor backend will be LAYERS_NONE if there is no widget.
   RefPtr<nsICanvasRenderingContextInternal> ret =
       CreateContextHelper(aContextType, GetCompositorBackendType());
@@ -1371,17 +1373,18 @@ void HTMLCanvasElement::OnMemoryPressure
     return;
   }
 
   if (mCurrentContext) {
     mCurrentContext->OnMemoryPressure();
   }
 }
 
-/* static */ void HTMLCanvasElement::SetAttrFromAsyncCanvasRenderer(
+/* static */
+void HTMLCanvasElement::SetAttrFromAsyncCanvasRenderer(
     AsyncCanvasRenderer* aRenderer) {
   HTMLCanvasElement* element = aRenderer->mHTMLCanvasElement;
   if (!element) {
     return;
   }
 
   if (element->GetWidthHeight() == aRenderer->GetSize()) {
     return;
@@ -1402,17 +1405,18 @@ void HTMLCanvasElement::OnMemoryPressure
   if (rv.Failed()) {
     NS_WARNING(
         "Failed to set height attribute to a canvas element asynchronously.");
   }
 
   element->mResetLayer = true;
 }
 
-/* static */ void HTMLCanvasElement::InvalidateFromAsyncCanvasRenderer(
+/* static */
+void HTMLCanvasElement::InvalidateFromAsyncCanvasRenderer(
     AsyncCanvasRenderer* aRenderer) {
   HTMLCanvasElement* element = aRenderer->mHTMLCanvasElement;
   if (!element) {
     return;
   }
 
   element->InvalidateCanvasContent(nullptr);
 }
--- a/dom/html/HTMLFormControlsCollection.cpp
+++ b/dom/html/HTMLFormControlsCollection.cpp
@@ -15,17 +15,18 @@
 #include "mozilla/dom/Document.h"
 #include "nsIFormControl.h"
 #include "RadioNodeList.h"
 #include "jsfriendapi.h"
 
 namespace mozilla {
 namespace dom {
 
-/* static */ bool HTMLFormControlsCollection::ShouldBeInElements(
+/* static */
+bool HTMLFormControlsCollection::ShouldBeInElements(
     nsIFormControl* aFormControl) {
   // For backwards compatibility (with 4.x and IE) we must not add
   // <input type=image> elements to the list of form controls in a
   // form.
 
   switch (aFormControl->ControlType()) {
     case NS_FORM_BUTTON_BUTTON:
     case NS_FORM_BUTTON_RESET:
@@ -256,21 +257,21 @@ nsresult HTMLFormControlsCollection::Get
 }
 
 Element* HTMLFormControlsCollection::GetElementAt(uint32_t aIndex) {
   FlushPendingNotifications();
 
   return mElements.SafeElementAt(aIndex, nullptr);
 }
 
-/* virtual */ nsINode* HTMLFormControlsCollection::GetParentObject() {
-  return mForm;
-}
+/* virtual */
+nsINode* HTMLFormControlsCollection::GetParentObject() { return mForm; }
 
-/* virtual */ Element* HTMLFormControlsCollection::GetFirstNamedElement(
+/* virtual */
+Element* HTMLFormControlsCollection::GetFirstNamedElement(
     const nsAString& aName, bool& aFound) {
   Nullable<OwningRadioNodeListOrElement> maybeResult;
   NamedGetter(aName, aFound, maybeResult);
   if (!aFound) {
     return nullptr;
   }
   MOZ_ASSERT(!maybeResult.IsNull());
   const OwningRadioNodeListOrElement& result = maybeResult.Value();
@@ -310,15 +311,16 @@ void HTMLFormControlsCollection::GetSupp
   // Just enumerate mNameLookupTable.  This won't guarantee order, but
   // that's OK, because the HTML5 spec doesn't define an order for
   // this enumeration.
   for (auto iter = mNameLookupTable.Iter(); !iter.Done(); iter.Next()) {
     aNames.AppendElement(iter.Key());
   }
 }
 
-/* virtual */ JSObject* HTMLFormControlsCollection::WrapObject(
+/* virtual */
+JSObject* HTMLFormControlsCollection::WrapObject(
     JSContext* aCx, JS::Handle<JSObject*> aGivenProto) {
   return HTMLFormControlsCollection_Binding::Wrap(aCx, this, aGivenProto);
 }
 
 }  // namespace dom
 }  // namespace mozilla
--- a/dom/html/HTMLFormElement.cpp
+++ b/dom/html/HTMLFormElement.cpp
@@ -914,18 +914,20 @@ HTMLFormElement::GetElementAt(int32_t aI
  * Compares the position of aControl1 and aControl2 in the document
  * @param aControl1 First control to compare.
  * @param aControl2 Second control to compare.
  * @param aForm Parent form of the controls.
  * @return < 0 if aControl1 is before aControl2,
  *         > 0 if aControl1 is after aControl2,
  *         0 otherwise
  */
-/* static */ int32_t HTMLFormElement::CompareFormControlPosition(
-    Element* aElement1, Element* aElement2, const nsIContent* aForm) {
+/* static */
+int32_t HTMLFormElement::CompareFormControlPosition(Element* aElement1,
+                                                    Element* aElement2,
+                                                    const nsIContent* aForm) {
   NS_ASSERTION(aElement1 != aElement2, "Comparing a form control to itself");
 
   // If an element has a @form, we can assume it *might* be able to not have
   // a parent and still be in the form.
   NS_ASSERTION((aElement1->HasAttr(kNameSpaceID_None, nsGkAtoms::form) ||
                 aElement1->GetParent()) &&
                    (aElement2->HasAttr(kNameSpaceID_None, nsGkAtoms::form) ||
                     aElement2->GetParent()),
@@ -950,17 +952,18 @@ HTMLFormElement::GetElementAt(int32_t aI
 #ifdef DEBUG
 /**
  * Checks that all form elements are in document order. Asserts if any pair of
  * consecutive elements are not in increasing document order.
  *
  * @param aControls List of form controls to check.
  * @param aForm Parent form of the controls.
  */
-/* static */ void HTMLFormElement::AssertDocumentOrder(
+/* static */
+void HTMLFormElement::AssertDocumentOrder(
     const nsTArray<nsGenericHTMLFormElement*>& aControls, nsIContent* aForm) {
   // TODO: remove the return statement with bug 598468.
   // This is done to prevent asserts in some edge cases.
   return;
 
   // Only iterate if aControls is not empty, since otherwise
   // |aControls.Length() - 1| will be a very large unsigned number... not what
   // we want here.
@@ -974,17 +977,18 @@ HTMLFormElement::GetElementAt(int32_t aI
 }
 
 /**
  * Copy of the above function, but with RefPtrs.
  *
  * @param aControls List of form controls to check.
  * @param aForm Parent form of the controls.
  */
-/* static */ void HTMLFormElement::AssertDocumentOrder(
+/* static */
+void HTMLFormElement::AssertDocumentOrder(
     const nsTArray<RefPtr<nsGenericHTMLFormElement>>& aControls,
     nsIContent* aForm) {
   // TODO: remove the return statement with bug 598468.
   // This is done to prevent asserts in some edge cases.
   return;
 
   // Only iterate if aControls is not empty, since otherwise
   // |aControls.Length() - 1| will be a very large unsigned number... not what
--- a/dom/html/HTMLFormSubmission.cpp
+++ b/dom/html/HTMLFormSubmission.cpp
@@ -804,17 +804,18 @@ void GetEnumAttr(nsGenericHTMLElement* a
   const nsAttrValue* value = aContent->GetParsedAttr(atom);
   if (value && value->Type() == nsAttrValue::eEnum) {
     *aValue = value->GetEnumValue();
   }
 }
 
 }  // anonymous namespace
 
-/* static */ nsresult HTMLFormSubmission::GetFromForm(
+/* static */
+nsresult HTMLFormSubmission::GetFromForm(
     HTMLFormElement* aForm, nsGenericHTMLElement* aOriginatingElement,
     HTMLFormSubmission** aFormSubmission) {
   // Get all the information necessary to encode the form data
   NS_ASSERTION(aForm->GetComposedDoc(),
                "Should have doc if we're building submission!");
 
   nsresult rv;
 
--- a/dom/html/HTMLImageElement.cpp
+++ b/dom/html/HTMLImageElement.cpp
@@ -1036,18 +1036,18 @@ bool HTMLImageElement::UpdateResponsiveS
   // If we reach this point, either:
   // - there was no selector originally, and there is not one now
   // - there was no selector originally, and there is one now
   // - there was a selector, and there is a different one now
   // - there was a selector, and there is not one now
   return hadSelector || mResponsiveSelector;
 }
 
-/*static */ bool HTMLImageElement::SupportedPictureSourceType(
-    const nsAString& aType) {
+/*static */
+bool HTMLImageElement::SupportedPictureSourceType(const nsAString& aType) {
   nsAutoString type;
   nsAutoString params;
 
   nsContentUtils::SplitMimeType(aType, type, params);
   if (type.IsEmpty()) {
     return true;
   }
 
@@ -1125,17 +1125,18 @@ bool HTMLImageElement::TryCreateResponsi
       sel->SetDefaultSource(src, mSrcTriggeringPrincipal);
     }
   }
 
   mResponsiveSelector = sel;
   return true;
 }
 
-/* static */ bool HTMLImageElement::SelectSourceForTagWithAttrs(
+/* static */
+bool HTMLImageElement::SelectSourceForTagWithAttrs(
     Document* aDocument, bool aIsSourceTag, const nsAString& aSrcAttr,
     const nsAString& aSrcsetAttr, const nsAString& aSizesAttr,
     const nsAString& aTypeAttr, const nsAString& aMediaAttr,
     nsAString& aResult) {
   MOZ_ASSERT(aIsSourceTag || (aTypeAttr.IsEmpty() && aMediaAttr.IsEmpty()),
              "Passing type or media attrs makes no sense without aIsSourceTag");
   MOZ_ASSERT(!aIsSourceTag || aSrcAttr.IsEmpty(),
              "Passing aSrcAttr makes no sense with aIsSourceTag set");
--- a/dom/html/HTMLInputElement.cpp
+++ b/dom/html/HTMLInputElement.cpp
@@ -910,27 +910,28 @@ UploadLastDir::Observe(nsISupports* aSub
 static nsresult FireEventForAccessibility(HTMLInputElement* aTarget,
                                           nsPresContext* aPresContext,
                                           EventMessage aEventMessage);
 #endif
 
 nsTextEditorState* HTMLInputElement::sCachedTextEditorState = nullptr;
 bool HTMLInputElement::sShutdown = false;
 
-/* static */ void HTMLInputElement::ReleaseTextEditorState(
-    nsTextEditorState* aState) {
+/* static */
+void HTMLInputElement::ReleaseTextEditorState(nsTextEditorState* aState) {
   if (!sShutdown && !sCachedTextEditorState) {
     aState->PrepareForReuse();
     sCachedTextEditorState = aState;
   } else {
     delete aState;
   }
 }
 
-/* static */ void HTMLInputElement::Shutdown() {
+/* static */
+void HTMLInputElement::Shutdown() {
   sShutdown = true;
   delete sCachedTextEditorState;
   sCachedTextEditorState = nullptr;
 }
 
 //
 // construction, destruction
 //
@@ -1491,18 +1492,18 @@ void HTMLInputElement::ClearFiles(bool a
   SetFilesOrDirectories(data, aSetValueChanged);
 }
 
 int32_t HTMLInputElement::MonthsSinceJan1970(uint32_t aYear,
                                              uint32_t aMonth) const {
   return (aYear - 1970) * 12 + aMonth - 1;
 }
 
-/* static */ Decimal HTMLInputElement::StringToDecimal(
-    const nsAString& aValue) {
+/* static */
+Decimal HTMLInputElement::StringToDecimal(const nsAString& aValue) {
   if (!IsASCII(aValue)) {
     return Decimal::nan();
   }
   NS_LossyConvertUTF16toASCII asciiString(aValue);
   std::string stdString = asciiString.get();
   return Decimal::fromString(stdString);
 }
 
@@ -2520,17 +2521,18 @@ void HTMLInputElement::SetFiles(FileList
 
   // Update |mFileData->mFilesOrDirectories|
   SetFiles(aFiles, true);
 
   // Update |mFileData->mFileList| without copy
   mFileData->mFileList = aFiles;
 }
 
-/* static */ void HTMLInputElement::HandleNumberControlSpin(void* aData) {
+/* static */
+void HTMLInputElement::HandleNumberControlSpin(void* aData) {
   RefPtr<HTMLInputElement> input = static_cast<HTMLInputElement*>(aData);
 
   NS_ASSERTION(input->mNumberControlSpinnerIsSpinning,
                "Should have called nsRepeatService::Stop()");
 
   nsNumberControlFrame* numberControlFrame =
       do_QueryFrame(input->GetPrimaryFrame());
   if (input->mType != NS_FORM_INPUT_NUMBER || !numberControlFrame) {
@@ -4978,18 +4980,20 @@ uint32_t HTMLInputElement::NumberOfDaysI
 
   if (aMonth != 2) {
     return 30;
   }
 
   return IsLeapYear(aYear) ? 29 : 28;
 }
 
-/* static */ bool HTMLInputElement::DigitSubStringToNumber(
-    const nsAString& aStr, uint32_t aStart, uint32_t aLen, uint32_t* aRetVal) {
+/* static */
+bool HTMLInputElement::DigitSubStringToNumber(const nsAString& aStr,
+                                              uint32_t aStart, uint32_t aLen,
+                                              uint32_t* aRetVal) {
   MOZ_ASSERT(aStr.Length() > (aStart + aLen - 1));
 
   for (uint32_t offset = 0; offset < aLen; ++offset) {
     if (!IsAsciiDigit(aStr[aStart + offset])) {
       return false;
     }
   }
 
@@ -4999,18 +5003,18 @@ uint32_t HTMLInputElement::NumberOfDaysI
 
   return NS_SUCCEEDED(ec);
 }
 
 bool HTMLInputElement::IsValidTime(const nsAString& aValue) const {
   return ParseTime(aValue, nullptr);
 }
 
-/* static */ bool HTMLInputElement::ParseTime(const nsAString& aValue,
-                                              uint32_t* aResult) {
+/* static */
+bool HTMLInputElement::ParseTime(const nsAString& aValue, uint32_t* aResult) {
   /* The string must have the following parts:
    * - HOURS: two digits, value being in [0, 23];
    * - Colon (:);
    * - MINUTES: two digits, value being in [0, 59];
    * - Optional:
    *   - Colon (:);
    *   - SECONDS: two digits, value being in [0, 59];
    *   - Optional:
@@ -5080,88 +5084,94 @@ bool HTMLInputElement::IsValidTime(const
                // some old [and stupid] compilers can't just do the right thing.
                fractionsSeconds *
                    pow(10.0, static_cast<int>(3 - (aValue.Length() - 9)));
   }
 
   return true;
 }
 
-/* static */ bool HTMLInputElement::IsDateTimeTypeSupported(
-    uint8_t aDateTimeInputType) {
+/* static */
+bool HTMLInputElement::IsDateTimeTypeSupported(uint8_t aDateTimeInputType) {
   return ((aDateTimeInputType == NS_FORM_INPUT_DATE ||
            aDateTimeInputType == NS_FORM_INPUT_TIME) &&
           (IsInputDateTimeEnabled() || IsExperimentalFormsEnabled())) ||
          ((aDateTimeInputType == NS_FORM_INPUT_MONTH ||
            aDateTimeInputType == NS_FORM_INPUT_WEEK ||
            aDateTimeInputType == NS_FORM_INPUT_DATETIME_LOCAL) &&
           IsInputDateTimeOthersEnabled());
 }
 
-/* static */ bool HTMLInputElement::IsWebkitFileSystemEnabled() {
+/* static */
+bool HTMLInputElement::IsWebkitFileSystemEnabled() {
   static bool sWebkitFileSystemEnabled = false;
   static bool sWebkitFileSystemPrefCached = false;
   if (!sWebkitFileSystemPrefCached) {
     sWebkitFileSystemPrefCached = true;
     Preferences::AddBoolVarCache(&sWebkitFileSystemEnabled,
                                  "dom.webkitBlink.filesystem.enabled", false);
   }
 
   return sWebkitFileSystemEnabled;
 }
 
-/* static */ bool HTMLInputElement::IsDirPickerEnabled() {
+/* static */
+bool HTMLInputElement::IsDirPickerEnabled() {
   static bool sDirPickerEnabled = false;
   static bool sDirPickerPrefCached = false;
   if (!sDirPickerPrefCached) {
     sDirPickerPrefCached = true;
     Preferences::AddBoolVarCache(&sDirPickerEnabled, "dom.input.dirpicker",
                                  false);
   }
 
   return sDirPickerEnabled;
 }
 
-/* static */ bool HTMLInputElement::IsExperimentalFormsEnabled() {
+/* static */
+bool HTMLInputElement::IsExperimentalFormsEnabled() {
   static bool sExperimentalFormsEnabled = false;
   static bool sExperimentalFormsPrefCached = false;
   if (!sExperimentalFormsPrefCached) {
     sExperimentalFormsPrefCached = true;
     Preferences::AddBoolVarCache(&sExperimentalFormsEnabled,
                                  "dom.experimental_forms", false);
   }
 
   return sExperimentalFormsEnabled;
 }
 
-/* static */ bool HTMLInputElement::IsInputDateTimeEnabled() {
+/* static */
+bool HTMLInputElement::IsInputDateTimeEnabled() {
   static bool sDateTimeEnabled = false;
   static bool sDateTimePrefCached = false;
   if (!sDateTimePrefCached) {
     sDateTimePrefCached = true;
     Preferences::AddBoolVarCache(&sDateTimeEnabled, "dom.forms.datetime",
                                  false);
   }
 
   return sDateTimeEnabled;
 }
 
-/* static */ bool HTMLInputElement::IsInputDateTimeOthersEnabled() {
+/* static */
+bool HTMLInputElement::IsInputDateTimeOthersEnabled() {
   static bool sDateTimeOthersEnabled = false;
   static bool sDateTimeOthersPrefCached = false;
   if (!sDateTimeOthersPrefCached) {
     sDateTimeOthersPrefCached = true;
     Preferences::AddBoolVarCache(&sDateTimeOthersEnabled,
                                  "dom.forms.datetime.others", false);
   }
 
   return sDateTimeOthersEnabled;
 }
 
-/* static */ bool HTMLInputElement::IsInputColorEnabled() {
+/* static */
+bool HTMLInputElement::IsInputColorEnabled() {
   static bool sInputColorEnabled = false;
   static bool sInputColorPrefCached = false;
   if (!sInputColorPrefCached) {
     sInputColorPrefCached = true;
     Preferences::AddBoolVarCache(&sInputColorEnabled, "dom.forms.color", false);
   }
 
   return sInputColorEnabled;
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -1585,17 +1585,18 @@ already_AddRefed<Promise> HTMLMediaEleme
         [promise, result]() { promise->MaybeResolve(result); });
   } else {
     promise->MaybeResolve(result);
   }
 
   return promise.forget();
 }
 
-/* static */ void HTMLMediaElement::MozEnableDebugLog(const GlobalObject&) {
+/* static */
+void HTMLMediaElement::MozEnableDebugLog(const GlobalObject&) {
   DecoderDoctorLogger::EnableLogging();
 }
 
 already_AddRefed<Promise> HTMLMediaElement::MozRequestDebugLog(
     ErrorResult& aRv) {
   RefPtr<Promise> promise = CreateDOMPromise(aRv);
   if (NS_WARN_IF(aRv.Failed())) {
     return nullptr;
--- a/dom/html/HTMLSourceElement.cpp
+++ b/dom/html/HTMLSourceElement.cpp
@@ -42,18 +42,19 @@ bool HTMLSourceElement::MatchesCurrentMe
     nsPresContext* pctx = OwnerDoc()->GetPresContext();
     return pctx && mMediaList->Matches(pctx);
   }
 
   // No media specified
   return true;
 }
 
-/* static */ bool HTMLSourceElement::WouldMatchMediaForDocument(
-    const nsAString& aMedia, const Document* aDocument) {
+/* static */
+bool HTMLSourceElement::WouldMatchMediaForDocument(const nsAString& aMedia,
+                                                   const Document* aDocument) {
   if (aMedia.IsEmpty()) {
     return true;
   }
 
   nsPresContext* pctx = aDocument->GetPresContext();
 
   RefPtr<MediaList> mediaList = MediaList::Create(aMedia);
   return pctx && mediaList->Matches(pctx);
--- a/dom/html/RadioNodeList.cpp
+++ b/dom/html/RadioNodeList.cpp
@@ -10,18 +10,19 @@
 #include "mozilla/dom/RadioNodeListBinding.h"
 #include "js/TypeDecls.h"
 
 #include "HTMLInputElement.h"
 
 namespace mozilla {
 namespace dom {
 
-/* virtual */ JSObject* RadioNodeList::WrapObject(
-    JSContext* aCx, JS::Handle<JSObject*> aGivenProto) {
+/* virtual */
+JSObject* RadioNodeList::WrapObject(JSContext* aCx,
+                                    JS::Handle<JSObject*> aGivenProto) {
   return RadioNodeList_Binding::Wrap(aCx, this, aGivenProto);
 }
 
 HTMLInputElement* GetAsRadio(nsIContent* node) {
   HTMLInputElement* el = HTMLInputElement::FromNode(node);
   if (el && el->ControlType() == NS_FORM_INPUT_RADIO) {
     return el;
   }
--- a/dom/html/input/DateTimeInputTypes.cpp
+++ b/dom/html/input/DateTimeInputTypes.cpp
@@ -15,17 +15,18 @@ const double DateTimeInputTypeBase::kMin
 const double DateTimeInputTypeBase::kMaximumYear = 275760;
 const double DateTimeInputTypeBase::kMaximumMonthInMaximumYear = 9;
 const double DateTimeInputTypeBase::kMaximumWeekInMaximumYear = 37;
 const double DateTimeInputTypeBase::kMsPerDay = 24 * 60 * 60 * 1000;
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
-/* static */ bool DateTimeInputTypeBase::IsInputDateTimeEnabled() {
+/* static */
+bool DateTimeInputTypeBase::IsInputDateTimeEnabled() {
   static bool sDateTimeEnabled = false;
   static bool sDateTimePrefCached = false;
   if (!sDateTimePrefCached) {
     sDateTimePrefCached = true;
     mozilla::Preferences::AddBoolVarCache(&sDateTimeEnabled,
                                           "dom.forms.datetime", false);
   }
 
--- a/dom/html/input/SingleLineTextInputTypes.cpp
+++ b/dom/html/input/SingleLineTextInputTypes.cpp
@@ -158,30 +158,31 @@ nsresult EmailInputType::GetTypeMismatch
       nsContentUtils::eDOM_PROPERTIES, "FormValidationInvalidEmail", aMessage);
 }
 
 nsresult EmailInputType::GetBadInputMessage(nsAString& aMessage) {
   return nsContentUtils::GetLocalizedString(
       nsContentUtils::eDOM_PROPERTIES, "FormValidationInvalidEmail", aMessage);
 }
 
-/* static */ bool EmailInputType::IsValidEmailAddressList(
-    const nsAString& aValue) {
+/* static */
+bool EmailInputType::IsValidEmailAddressList(const nsAString& aValue) {
   HTMLSplitOnSpacesTokenizer tokenizer(aValue, ',');
 
   while (tokenizer.hasMoreTokens()) {
     if (!IsValidEmailAddress(tokenizer.nextToken())) {
       return false;
     }
   }
 
   return !tokenizer.separatorAfterCurrentToken();
 }
 
-/* static */ bool EmailInputType::IsValidEmailAddress(const nsAString& aValue) {
+/* static */
+bool EmailInputType::IsValidEmailAddress(const nsAString& aValue) {
   // Email addresses can't be empty and can't end with a '.' or '-'.
   if (aValue.IsEmpty() || aValue.Last() == '.' || aValue.Last() == '-') {
     return false;
   }
 
   uint32_t atPos;
   nsAutoCString value;
   if (!PunycodeEncodeEmailAddress(aValue, value, &atPos) ||
@@ -235,19 +236,20 @@ nsresult EmailInputType::GetBadInputMess
       // The domain characters have to be in this list to be valid.
       return false;
     }
   }
 
   return true;
 }
 
-/* static */ bool EmailInputType::PunycodeEncodeEmailAddress(
-    const nsAString& aEmail, nsAutoCString& aEncodedEmail,
-    uint32_t* aIndexOfAt) {
+/* static */
+bool EmailInputType::PunycodeEncodeEmailAddress(const nsAString& aEmail,
+                                                nsAutoCString& aEncodedEmail,
+                                                uint32_t* aIndexOfAt) {
   nsAutoCString value = NS_ConvertUTF16toUTF8(aEmail);
   *aIndexOfAt = (uint32_t)value.FindChar('@');
 
   if (*aIndexOfAt == (uint32_t)kNotFound || *aIndexOfAt == value.Length() - 1) {
     aEncodedEmail = value;
     return true;
   }
 
--- a/dom/html/nsGenericHTMLElement.cpp
+++ b/dom/html/nsGenericHTMLElement.cpp
@@ -1138,46 +1138,53 @@ void nsGenericHTMLElement::MapCommonAttr
 
   if (!aDecls.PropertyIsSet(eCSSProperty_display)) {
     if (aAttributes->IndexOfAttr(nsGkAtoms::hidden) >= 0) {
       aDecls.SetKeywordValue(eCSSProperty_display, StyleDisplay::None);
     }
   }
 }
 
-/* static */ const nsGenericHTMLElement::MappedAttributeEntry
+/* static */
+const nsGenericHTMLElement::MappedAttributeEntry
     nsGenericHTMLElement::sCommonAttributeMap[] = {{nsGkAtoms::contenteditable},
                                                    {nsGkAtoms::lang},
                                                    {nsGkAtoms::hidden},
                                                    {nullptr}};
 
-/* static */ const Element::MappedAttributeEntry
+/* static */
+const Element::MappedAttributeEntry
     nsGenericHTMLElement::sImageMarginSizeAttributeMap[] = {{nsGkAtoms::width},
                                                             {nsGkAtoms::height},
                                                             {nsGkAtoms::hspace},
                                                             {nsGkAtoms::vspace},
                                                             {nullptr}};
 
-/* static */ const Element::MappedAttributeEntry
+/* static */
+const Element::MappedAttributeEntry
     nsGenericHTMLElement::sImageAlignAttributeMap[] = {{nsGkAtoms::align},
                                                        {nullptr}};
 
-/* static */ const Element::MappedAttributeEntry
+/* static */
+const Element::MappedAttributeEntry
     nsGenericHTMLElement::sDivAlignAttributeMap[] = {{nsGkAtoms::align},
                                                      {nullptr}};
 
-/* static */ const Element::MappedAttributeEntry
+/* static */
+const Element::MappedAttributeEntry
     nsGenericHTMLElement::sImageBorderAttributeMap[] = {{nsGkAtoms::border},
                                                         {nullptr}};
 
-/* static */ const Element::MappedAttributeEntry
+/* static */
+const Element::MappedAttributeEntry
     nsGenericHTMLElement::sBackgroundAttributeMap[] = {
         {nsGkAtoms::background}, {nsGkAtoms::bgcolor}, {nullptr}};
 
-/* static */ const Element::MappedAttributeEntry
+/* static */
+const Element::MappedAttributeEntry
     nsGenericHTMLElement::sBackgroundColorAttributeMap[] = {
         {nsGkAtoms::bgcolor}, {nullptr}};
 
 void nsGenericHTMLElement::MapImageAlignAttributeInto(
     const nsMappedAttributes* aAttributes, MappedDeclarations& aDecls) {
   const nsAttrValue* value = aAttributes->GetAttr(nsGkAtoms::align);
   if (value && value->Type() == nsAttrValue::eEnum) {
     int32_t align = value->GetEnumValue();
@@ -1441,20 +1448,20 @@ HTMLMenuElement* nsGenericHTMLElement::G
   }
   return nullptr;
 }
 
 bool nsGenericHTMLElement::IsLabelable() const {
   return IsAnyOfHTMLElements(nsGkAtoms::progress, nsGkAtoms::meter);
 }
 
-/* static */ bool nsGenericHTMLElement::MatchLabelsElement(Element* aElement,
-                                                           int32_t aNamespaceID,
-                                                           nsAtom* aAtom,
-                                                           void* aData) {
+/* static */
+bool nsGenericHTMLElement::MatchLabelsElement(Element* aElement,
+                                              int32_t aNamespaceID,
+                                              nsAtom* aAtom, void* aData) {
   HTMLLabelElement* element = HTMLLabelElement::FromNode(aElement);
   return element && element->GetControl() == aData;
 }
 
 already_AddRefed<nsINodeList> nsGenericHTMLElement::Labels() {
   MOZ_ASSERT(IsLabelable(),
              "Labels() only allow labelable elements to use it.");
   nsExtendedDOMSlots* slots = ExtendedDOMSlots();
--- a/dom/html/nsGenericHTMLFrameElement.cpp
+++ b/dom/html/nsGenericHTMLFrameElement.cpp
@@ -234,17 +234,18 @@ void nsGenericHTMLFrameElement::UnbindFr
     // later bug.
     mFrameLoader->Destroy();
     mFrameLoader = nullptr;
   }
 
   nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);
 }
 
-/* static */ int32_t nsGenericHTMLFrameElement::MapScrollingAttribute(
+/* static */
+int32_t nsGenericHTMLFrameElement::MapScrollingAttribute(
     const nsAttrValue* aValue) {
   int32_t mappedValue = nsIScrollable::Scrollbar_Auto;
   if (aValue && aValue->Type() == nsAttrValue::eEnum) {
     switch (aValue->GetEnumValue()) {
       case NS_STYLE_FRAME_OFF:
       case NS_STYLE_FRAME_NOSCROLL:
       case NS_STYLE_FRAME_NO:
         mappedValue = nsIScrollable::Scrollbar_Never;
@@ -260,17 +261,18 @@ static bool PrincipalAllowsBrowserFrame(
   NS_ENSURE_TRUE(permMgr, false);
   uint32_t permission = nsIPermissionManager::DENY_ACTION;
   nsresult rv = permMgr->TestPermissionFromPrincipal(
       aPrincipal, NS_LITERAL_CSTRING("browser"), &permission);
   NS_ENSURE_SUCCESS(rv, false);
   return permission == nsIPermissionManager::ALLOW_ACTION;
 }
 
-/* virtual */ nsresult nsGenericHTMLFrameElement::AfterSetAttr(
+/* virtual */
+nsresult nsGenericHTMLFrameElement::AfterSetAttr(
     int32_t aNameSpaceID, nsAtom* aName, const nsAttrValue* aValue,
     const nsAttrValue* aOldValue, nsIPrincipal* aMaybeScriptedPrincipal,
     bool aNotify) {
   if (aValue) {
     nsAttrValueOrString value(aValue);
     AfterMaybeChangeAttr(aNameSpaceID, aName, &value, aMaybeScriptedPrincipal,
                          aNotify);
   } else {
@@ -417,24 +419,24 @@ bool nsGenericHTMLFrameElement::BrowserF
   return sMozBrowserFramesEnabled;
 }
 
 /**
  * Return true if this frame element really is a mozbrowser.  (It
  * needs to have the right attributes, and its creator must have the right
  * permissions.)
  */
-/* [infallible] */ nsresult nsGenericHTMLFrameElement::GetReallyIsBrowser(
-    bool* aOut) {
+/* [infallible] */
+nsresult nsGenericHTMLFrameElement::GetReallyIsBrowser(bool* aOut) {
   *aOut = mReallyIsBrowser;
   return NS_OK;
 }
 
-/* [infallible] */ NS_IMETHODIMP nsGenericHTMLFrameElement::GetIsolated(
-    bool* aOut) {
+/* [infallible] */
+NS_IMETHODIMP nsGenericHTMLFrameElement::GetIsolated(bool* aOut) {
   *aOut = true;
 
   if (!nsContentUtils::IsSystemPrincipal(NodePrincipal())) {
     return NS_OK;
   }
 
   // Isolation is only disabled if the attribute is present
   *aOut = !HasAttr(kNameSpaceID_None, nsGkAtoms::noisolation);
--- a/dom/html/nsHTMLDocument.cpp
+++ b/dom/html/nsHTMLDocument.cpp
@@ -2830,17 +2830,18 @@ bool nsHTMLDocument::IsEditingOnAfterFlu
   return IsEditingOn();
 }
 
 void nsHTMLDocument::RemovedFromDocShell() {
   mEditingState = eOff;
   Document::RemovedFromDocShell();
 }
 
-/* virtual */ void nsHTMLDocument::DocAddSizeOfExcludingThis(
+/* virtual */
+void nsHTMLDocument::DocAddSizeOfExcludingThis(
     nsWindowSizes& aWindowSizes) const {
   Document::DocAddSizeOfExcludingThis(aWindowSizes);
 
   // Measurement of the following members may be added later if DMD finds it is
   // worthwhile:
   // - mLinks
   // - mAnchors
   // - mMidasCommandManager
--- a/dom/indexedDB/FileInfo.cpp
+++ b/dom/indexedDB/FileInfo.cpp
@@ -217,18 +217,18 @@ NS_IMETHODIMP
 CleanupFileRunnable::Run() {
   MOZ_ASSERT(NS_IsMainThread());
 
   DoCleanup(mFileManager, mFileId);
 
   return NS_OK;
 }
 
-/* static */ already_AddRefed<nsIFile> FileInfo::GetFileForFileInfo(
-    FileInfo* aFileInfo) {
+/* static */
+already_AddRefed<nsIFile> FileInfo::GetFileForFileInfo(FileInfo* aFileInfo) {
   FileManager* fileManager = aFileInfo->Manager();
   nsCOMPtr<nsIFile> directory = fileManager->GetDirectory();
   if (NS_WARN_IF(!directory)) {
     return nullptr;
   }
 
   nsCOMPtr<nsIFile> file =
       FileManager::GetFileForId(directory, aFileInfo->Id());
--- a/dom/indexedDB/ScriptErrorHelper.cpp
+++ b/dom/indexedDB/ScriptErrorHelper.cpp
@@ -139,35 +139,35 @@ class ScriptErrorRunnable final : public
 };
 
 }  // namespace
 
 namespace mozilla {
 namespace dom {
 namespace indexedDB {
 
-/*static*/ void ScriptErrorHelper::Dump(const nsAString& aMessage,
-                                        const nsAString& aFilename,
-                                        uint32_t aLineNumber,
-                                        uint32_t aColumnNumber,
-                                        uint32_t aSeverityFlag, bool aIsChrome,
-                                        uint64_t aInnerWindowID) {
+/*static*/
+void ScriptErrorHelper::Dump(const nsAString& aMessage,
+                             const nsAString& aFilename, uint32_t aLineNumber,
+                             uint32_t aColumnNumber, uint32_t aSeverityFlag,
+                             bool aIsChrome, uint64_t aInnerWindowID) {
   if (NS_IsMainThread()) {
     ScriptErrorRunnable::Dump(aMessage, aFilename, aLineNumber, aColumnNumber,
                               aSeverityFlag, aIsChrome, aInnerWindowID);
   } else {
     RefPtr<ScriptErrorRunnable> runnable =
         new ScriptErrorRunnable(aMessage, aFilename, aLineNumber, aColumnNumber,
                                 aSeverityFlag, aIsChrome, aInnerWindowID);
     MOZ_ALWAYS_SUCCEEDS(
         SystemGroup::Dispatch(TaskCategory::Other, runnable.forget()));
   }
 }
 
-/*static*/ void ScriptErrorHelper::DumpLocalizedMessage(
+/*static*/
+void ScriptErrorHelper::DumpLocalizedMessage(
     const nsACString& aMessageName, const nsAString& aFilename,
     uint32_t aLineNumber, uint32_t aColumnNumber, uint32_t aSeverityFlag,
     bool aIsChrome, uint64_t aInnerWindowID) {
   if (NS_IsMainThread()) {
     ScriptErrorRunnable::DumpLocalizedMessage(
         aMessageName, aFilename, aLineNumber, aColumnNumber, aSeverityFlag,
         aIsChrome, aInnerWindowID);
   } else {
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -1159,17 +1159,18 @@ void ContentChild::LaunchRDDProcess() {
 bool ContentChild::IsAlive() const { return mIsAlive; }
 
 bool ContentChild::IsShuttingDown() const { return mShuttingDown; }
 
 void ContentChild::GetProcessName(nsACString& aName) const {
   aName.Assign(NS_ConvertUTF16toUTF8(mProcessName));
 }
 
-/* static */ void ContentChild::AppendProcessId(nsACString& aName) {
+/* static */
+void ContentChild::AppendProcessId(nsACString& aName) {
   if (!aName.IsEmpty()) {
     aName.Append(' ');
   }
   unsigned pid = getpid();
   aName.Append(nsPrintfCString("(pid %u)", pid));
 }
 
 void ContentChild::InitGraphicsDeviceData(const ContentDeviceData& aData) {
@@ -2822,18 +2823,18 @@ void ContentChild::StartForceKillTimer()
     NS_NewTimerWithFuncCallback(getter_AddRefs(mForceKillTimer),
                                 ContentChild::ForceKillTimerCallback, this,
                                 timeoutSecs * 1000, nsITimer::TYPE_ONE_SHOT,
                                 "dom::ContentChild::StartForceKillTimer");
     MOZ_ASSERT(mForceKillTimer);
   }
 }
 
-/* static */ void ContentChild::ForceKillTimerCallback(nsITimer* aTimer,
-                                                       void* aClosure) {
+/* static */
+void ContentChild::ForceKillTimerCallback(nsITimer* aTimer, void* aClosure) {
   ProcessChild::QuickExit();
 }
 
 mozilla::ipc::IPCResult ContentChild::RecvShutdown() {
   nsCOMPtr<nsIObserverService> os = services::GetObserverService();
   if (os) {
     os->NotifyObservers(this, "content-child-will-shutdown", nullptr);
   }
@@ -3246,18 +3247,19 @@ mozilla::ipc::IPCResult ContentChild::Re
 
     child->Finished(succeeded ? NS_OK : NS_ERROR_OUT_OF_MEMORY);
   }
 
   mGetFilesPendingRequests.Remove(aUUID);
   return IPC_OK();
 }
 
-/* static */ void ContentChild::FatalErrorIfNotUsingGPUProcess(
-    const char* const aErrorMsg, base::ProcessId aOtherPid) {
+/* static */
+void ContentChild::FatalErrorIfNotUsingGPUProcess(const char* const aErrorMsg,
+                                                  base::ProcessId aOtherPid) {
   // If we're communicating with the same process or the UI process then we
   // want to crash normally. Otherwise we want to just warn as the other end
   // must be the GPU process and it crashing shouldn't be fatal for us.
   if (aOtherPid == base::GetCurrentProcId() ||
       (GetSingleton() && GetSingleton()->OtherPid() == aOtherPid)) {
     mozilla::ipc::FatalError(aErrorMsg, false);
   } else {
     nsAutoCString formattedMessage("IPDL error: \"");
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -624,17 +624,18 @@ ContentParent::PreallocateProcess() {
   RefPtr<ContentParent> process = new ContentParent(
       /* aOpener = */ nullptr, NS_LITERAL_STRING(DEFAULT_REMOTE_TYPE),
       eNotRecordingOrReplaying,
       /* aRecordingFile = */ EmptyString());
 
   return process->LaunchSubprocessAsync(PROCESS_PRIORITY_PREALLOC);
 }
 
-/*static*/ void ContentParent::StartUp() {
+/*static*/
+void ContentParent::StartUp() {
   // We could launch sub processes from content process
   // FIXME Bug 1023701 - Stop using ContentParent static methods in
   // child process
   sCanLaunchSubprocesses = true;
 
   if (!XRE_IsParentProcess()) {
     return;
   }
@@ -651,32 +652,33 @@ ContentParent::PreallocateProcess() {
   sSandboxBrokerPolicyFactory = MakeUnique<SandboxBrokerPolicyFactory>();
 #endif
 
 #if defined(XP_MACOSX) && defined(MOZ_CONTENT_SANDBOX)
   sMacSandboxParams = new std::vector<std::string>;
 #endif
 }
 
-/*static*/ void ContentParent::ShutDown() {
+/*static*/
+void ContentParent::ShutDown() {
   // No-op for now.  We rely on normal process shutdown and
   // ClearOnShutdown() to clean up our state.
   sCanLaunchSubprocesses = false;
 
 #if defined(XP_LINUX) && defined(MOZ_CONTENT_SANDBOX)
   sSandboxBrokerPolicyFactory = nullptr;
 #endif
 
 #if defined(XP_MACOSX) && defined(MOZ_CONTENT_SANDBOX)
   sMacSandboxParams = nullptr;
 #endif
 }
 
-/*static*/ uint32_t ContentParent::GetPoolSize(
-    const nsAString& aContentProcessType) {
+/*static*/
+uint32_t ContentParent::GetPoolSize(const nsAString& aContentProcessType) {
   if (!sBrowserContentParents) {
     return 0;
   }
 
   nsTArray<ContentParent*>*