Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
authorSylvestre Ledru <sledru@mozilla.com>
Sun, 28 Apr 2019 09:30:05 +0000
changeset 530515 d091a005f031656890dfead0643ce875f997038e
parent 530514 488caf8c768000d2aa1805c1dc34bd5116f60998
child 530516 8b6c7d4f67eb690753179d5e6ba1635615425ae1
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersEhsan
bugs1519636
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan # ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D28948
accessible/generic/HyperTextAccessible.cpp
chrome/nsChromeRegistry.cpp
dom/base/Document.h
dom/base/nsRange.cpp
dom/canvas/WebGLFormats.cpp
dom/gamepad/windows/WindowsGamepad.cpp
dom/ipc/ContentParent.cpp
dom/l10n/DOMOverlays.cpp
dom/quota/ActorsParent.cpp
dom/quota/QuotaManager.h
dom/quota/StorageManager.cpp
gfx/layers/apz/src/InputQueue.cpp
gfx/layers/apz/src/InputQueue.h
gfx/thebes/gfxPlatform.cpp
gfx/vr/service/OpenVRSession.cpp
gfx/webrender_bindings/WebRenderAPI.cpp
js/public/PropertySpec.h
js/src/frontend/BinASTParserPerTokenizer.cpp
js/src/jit/CodeGenerator.cpp
js/src/jit/Lowering.cpp
js/src/jit/arm/MacroAssembler-arm-inl.h
js/src/jit/arm64/MacroAssembler-arm64-inl.h
js/src/jit/x86-shared/MacroAssembler-x86-shared-inl.h
js/src/vm/Time.cpp
js/src/wasm/WasmAST.h
js/src/wasm/WasmBaselineCompile.cpp
js/src/wasm/WasmInstance.cpp
js/src/wasm/WasmOpIter.h
js/src/wasm/WasmValidate.cpp
js/xpconnect/loader/ScriptPreloader.cpp
layout/base/nsLayoutUtils.h
layout/base/nsPresContext.h
layout/generic/nsGridContainerFrame.h
layout/generic/nsImageFrame.cpp
layout/generic/nsTextFrame.h
layout/style/CSSStyleRule.cpp
layout/style/nsCSSPseudoElements.cpp
layout/xul/nsImageBoxFrame.cpp
layout/xul/nsMenuPopupFrame.cpp
layout/xul/nsXULPopupManager.cpp
mozglue/linker/tests/TestZip.cpp
mozglue/misc/NativeNt.h
mozglue/misc/WindowsProcessMitigations.h
toolkit/xre/nsNativeAppSupportCocoa.mm
widget/gtk/WidgetStyleCache.cpp
widget/gtk/WidgetStyleCache.h
widget/gtk/gtk3drawing.cpp
widget/gtk/nsNativeThemeGTK.cpp
--- a/accessible/generic/HyperTextAccessible.cpp
+++ b/accessible/generic/HyperTextAccessible.cpp
@@ -1843,20 +1843,20 @@ nsresult HyperTextAccessible::ContentToR
     *aRenderedOffset = aContentOffset;
     return NS_OK;
   }
 
   NS_ASSERTION(aFrame->IsTextFrame(), "Need text frame for offset conversion");
   NS_ASSERTION(aFrame->GetPrevContinuation() == nullptr,
                "Call on primary frame only");
 
-  nsIFrame::RenderedText text = aFrame->GetRenderedText(
-      aContentOffset, aContentOffset + 1,
-      nsIFrame::TextOffsetType::OffsetsInContentText,
-      nsIFrame::TrailingWhitespace::DontTrim);
+  nsIFrame::RenderedText text =
+      aFrame->GetRenderedText(aContentOffset, aContentOffset + 1,
+                              nsIFrame::TextOffsetType::OffsetsInContentText,
+                              nsIFrame::TrailingWhitespace::DontTrim);
   *aRenderedOffset = text.mOffsetWithinNodeRenderedText;
 
   return NS_OK;
 }
 
 nsresult HyperTextAccessible::RenderedToContentOffset(
     nsIFrame* aFrame, uint32_t aRenderedOffset, int32_t* aContentOffset) const {
   if (IsTextField()) {
@@ -1866,20 +1866,20 @@ nsresult HyperTextAccessible::RenderedTo
 
   *aContentOffset = 0;
   NS_ENSURE_TRUE(aFrame, NS_ERROR_FAILURE);
 
   NS_ASSERTION(aFrame->IsTextFrame(), "Need text frame for offset conversion");
   NS_ASSERTION(aFrame->GetPrevContinuation() == nullptr,
                "Call on primary frame only");
 
-  nsIFrame::RenderedText text = aFrame->GetRenderedText(
-      aRenderedOffset, aRenderedOffset + 1,
-      nsIFrame::TextOffsetType::OffsetsInRenderedText,
-      nsIFrame::TrailingWhitespace::DontTrim);
+  nsIFrame::RenderedText text =
+      aFrame->GetRenderedText(aRenderedOffset, aRenderedOffset + 1,
+                              nsIFrame::TextOffsetType::OffsetsInRenderedText,
+                              nsIFrame::TrailingWhitespace::DontTrim);
   *aContentOffset = text.mOffsetWithinNodeText;
 
   return NS_OK;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // HyperTextAccessible public
 
--- a/chrome/nsChromeRegistry.cpp
+++ b/chrome/nsChromeRegistry.cpp
@@ -267,17 +267,16 @@ nsChromeRegistry::ConvertChromeURL(nsIUR
     return NS_ERROR_FILE_NOT_FOUND;
   }
 
   return NS_NewURI(aResult, path, nullptr, baseURI);
 }
 
 ////////////////////////////////////////////////////////////////////////
 
-
 void nsChromeRegistry::FlushAllCaches() {
   nsCOMPtr<nsIObserverService> obsSvc = mozilla::services::GetObserverService();
   NS_ASSERTION(obsSvc, "Couldn't get observer service.");
 
   obsSvc->NotifyObservers((nsIChromeRegistry*)this, NS_CHROME_FLUSH_TOPIC,
                           nullptr);
 }
 
--- a/dom/base/Document.h
+++ b/dom/base/Document.h
@@ -2401,17 +2401,16 @@ class Document : public nsINode,
    * document.
    */
   bool HaveFiredDOMTitleChange() const { return mHaveFiredTitleChange; }
 
   Element* GetAnonymousElementByAttribute(nsIContent* aElement,
                                           nsAtom* aAttrName,
                                           const nsAString& aAttrValue) const;
 
-
   /**
    * To batch DOMSubtreeModified, document needs to be informed when
    * a mutation event might be dispatched, even if the event isn't actually
    * created because there are no listeners for it.
    *
    * @param aTarget is the target for the mutation event.
    */
   void MayDispatchMutationEvent(nsINode* aTarget) {
--- a/dom/base/nsRange.cpp
+++ b/dom/base/nsRange.cpp
@@ -2790,20 +2790,20 @@ static nsresult GetPartialTextRect(nsLay
         ExtractRectFromOffset(f, aEndOffset, &r, !rtl, aClampToEdge);
         textContentEnd = aEndOffset;
       }
       r = nsLayoutUtils::TransformFrameRectToAncestor(f, r, relativeTo);
       aCallback->AddRect(r);
 
       // Finally capture the text, if requested.
       if (aTextList) {
-        nsIFrame::RenderedText renderedText = f->GetRenderedText(
-            textContentStart, textContentEnd,
-            nsIFrame::TextOffsetType::OffsetsInContentText,
-            nsIFrame::TrailingWhitespace::DontTrim);
+        nsIFrame::RenderedText renderedText =
+            f->GetRenderedText(textContentStart, textContentEnd,
+                               nsIFrame::TextOffsetType::OffsetsInContentText,
+                               nsIFrame::TrailingWhitespace::DontTrim);
 
         aTextList->AppendElement(renderedText.mString, fallible);
       }
     }
   }
   return NS_OK;
 }
 
--- a/dom/canvas/WebGLFormats.cpp
+++ b/dom/canvas/WebGLFormats.cpp
@@ -814,17 +814,18 @@ UniquePtr<FormatUsageAuthority> FormatUs
   // web-compat. Min-capability mode should mark this as non-renderable.
   fnSet(EffectiveFormat::RGB8, true, true);
 
   fnSet(EffectiveFormat::Luminance8Alpha8, false, true);
   fnSet(EffectiveFormat::Luminance8, false, true);
   fnSet(EffectiveFormat::Alpha8, false, true);
 
   fnSet(EffectiveFormat::DEPTH_COMPONENT16, true, true);
-  fnSet(EffectiveFormat::DEPTH_COMPONENT24, true, true); // Requires WEBGL_depth_texture.
+  fnSet(EffectiveFormat::DEPTH_COMPONENT24, true,
+        true);  // Requires WEBGL_depth_texture.
   fnSet(EffectiveFormat::STENCIL_INDEX8, true, false);
 
   // Added in WebGL 1.0 spec:
   fnSet(EffectiveFormat::DEPTH24_STENCIL8, true, true);
 
   ////////////////////////////////////
   // RB formats
 
--- a/dom/gamepad/windows/WindowsGamepad.cpp
+++ b/dom/gamepad/windows/WindowsGamepad.cpp
@@ -118,18 +118,17 @@ class Gamepad {
   unsigned numButtons;
 
   nsTArray<bool> buttons;
   struct axisValue {
     HIDP_VALUE_CAPS caps;
     double value;
     bool active;
 
-    axisValue()
-        : value(0.0f), active(false) {}
+    axisValue() : value(0.0f), active(false) {}
     explicit axisValue(const HIDP_VALUE_CAPS& aCaps)
         : caps(aCaps), value(0.0f), active(true) {}
   };
   nsTArray<axisValue> axes;
 
   RefPtr<GamepadRemapper> remapper;
 
   // Used during rescan to find devices that were disconnected.
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -1182,17 +1182,17 @@ BrowserParent* ContentParent::CreateBrow
       return nullptr;
     }
 
     aBrowsingContext->Canonical()->SetOwnerProcessId(
         constructorSender->ChildID());
 
     RefPtr<BrowserParent> browserParent =
         new BrowserParent(constructorSender, tabId, aContext,
-                      aBrowsingContext->Canonical(), chromeFlags);
+                          aBrowsingContext->Canonical(), chromeFlags);
 
     // Open a remote endpoint for our PBrowser actor. DeallocPBrowserParent
     // releases the ref taken.
     ManagedEndpoint<PBrowserChild> childEp =
         constructorSender->OpenPBrowserEndpoint(
             do_AddRef(browserParent).take());
     if (NS_WARN_IF(!childEp.IsValid())) {
       return nullptr;
--- a/dom/l10n/DOMOverlays.cpp
+++ b/dom/l10n/DOMOverlays.cpp
@@ -454,19 +454,19 @@ void DOMOverlays::TranslateElement(Eleme
       if (NS_WARN_IF(aRv.Failed())) {
         return;
       }
     } else {
       // Else parse the translation's HTML into a DocumentFragment,
       // sanitize it and replace the element's content.
       RefPtr<DocumentFragment> fragment =
           new DocumentFragment(aElement.OwnerDoc()->NodeInfoManager());
-      nsContentUtils::ParseFragmentHTML(
-          aTranslation.mValue, fragment, nsGkAtoms::_template,
-          kNameSpaceID_XHTML, false, true);
+      nsContentUtils::ParseFragmentHTML(aTranslation.mValue, fragment,
+                                        nsGkAtoms::_template,
+                                        kNameSpaceID_XHTML, false, true);
       if (NS_WARN_IF(aRv.Failed())) {
         return;
       }
 
       OverlayChildNodes(fragment, &aElement, aErrors, aRv);
       if (NS_WARN_IF(aRv.Failed())) {
         return;
       }
--- a/dom/quota/ActorsParent.cpp
+++ b/dom/quota/ActorsParent.cpp
@@ -5513,17 +5513,18 @@ nsresult QuotaManager::EnsureStorageIsIn
                       "Upgrade function needed due to LocalStorage archive "
                       "version increase.");
 
         while (version != kLocalStorageArchiveVersion) {
           if (version == 0) {
             rv = UpgradeLocalStorageArchiveFrom0To1(connection);
           } /* else if (version == 1) {
             rv = UpgradeLocalStorageArchiveFrom1To2(connection);
-          } */ else {
+          } */
+          else {
             QM_WARNING(
                 "Unable to initialize LocalStorage archive, no upgrade path is "
                 "available!");
             return NS_ERROR_FAILURE;
           }
 
           if (NS_WARN_IF(NS_FAILED(rv))) {
             return rv;
--- a/dom/quota/QuotaManager.h
+++ b/dom/quota/QuotaManager.h
@@ -435,20 +435,20 @@ class QuotaManager final : public Backgr
       nsCOMPtr<mozIStorageConnection>& aConnection);
 
   nsresult DowngradeLocalStorageArchive(
       nsCOMPtr<mozIStorageConnection>& aConnection);
 
   nsresult UpgradeLocalStorageArchiveFrom0To1(
       nsCOMPtr<mozIStorageConnection>& aConnection);
 
-/*
-  nsresult UpgradeLocalStorageArchiveFrom1To2(
-      nsCOMPtr<mozIStorageConnection>& aConnection);
-*/
+  /*
+    nsresult UpgradeLocalStorageArchiveFrom1To2(
+        nsCOMPtr<mozIStorageConnection>& aConnection);
+  */
 
   nsresult InitializeRepository(PersistenceType aPersistenceType);
 
   nsresult InitializeOrigin(PersistenceType aPersistenceType,
                             const nsACString& aGroup, const nsACString& aOrigin,
                             int64_t aAccessTime, bool aPersisted,
                             nsIFile* aDirectory);
 
--- a/dom/quota/StorageManager.cpp
+++ b/dom/quota/StorageManager.cpp
@@ -604,28 +604,29 @@ bool PersistedWorkerMainThreadRunnable::
 
   return true;
 }
 
 nsresult PersistentStoragePermissionRequest::Start() {
   MOZ_ASSERT(NS_IsMainThread());
 
   PromptResult pr;
-  #ifdef MOZ_WIDGET_ANDROID
-  // on Android calling `ShowPrompt` here calls `nsContentPermissionUtils::AskPermission` 
-  // once, and a response of `PromptResult::Pending` calls it again. This results in 
-  // multiple requests for storage access, so we check the prompt prefs only to ensure we
-  // only request it once.
+#ifdef MOZ_WIDGET_ANDROID
+  // on Android calling `ShowPrompt` here calls
+  // `nsContentPermissionUtils::AskPermission` once, and a response of
+  // `PromptResult::Pending` calls it again. This results in multiple requests
+  // for storage access, so we check the prompt prefs only to ensure we only
+  // request it once.
   pr = CheckPromptPrefs();
-  #else
+#else
   nsresult rv = ShowPrompt(pr);
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return rv;
   }
-  #endif
+#endif
   if (pr == PromptResult::Granted) {
     return Allow(JS::UndefinedHandleValue);
   }
   if (pr == PromptResult::Denied) {
     return Cancel();
   }
 
   return nsContentPermissionUtils::AskPermission(this, mWindow);
--- a/gfx/layers/apz/src/InputQueue.cpp
+++ b/gfx/layers/apz/src/InputQueue.cpp
@@ -31,17 +31,18 @@ nsEventStatus InputQueue::ReceiveInputEv
     const Maybe<nsTArray<TouchBehaviorFlags>>& aTouchBehaviors) {
   APZThreadUtils::AssertOnControllerThread();
 
   AutoRunImmediateTimeout timeoutRunner{this};
 
   switch (aEvent.mInputType) {
     case MULTITOUCH_INPUT: {
       const MultiTouchInput& event = aEvent.AsMultiTouchInput();
-      return ReceiveTouchInput(aTarget, aFlags, event, aOutInputBlockId, aTouchBehaviors);
+      return ReceiveTouchInput(aTarget, aFlags, event, aOutInputBlockId,
+                               aTouchBehaviors);
     }
 
     case SCROLLWHEEL_INPUT: {
       const ScrollWheelInput& event = aEvent.AsScrollWheelInput();
       return ReceiveScrollWheelInput(aTarget, aFlags, event, aOutInputBlockId);
     }
 
     case PANGESTURE_INPUT: {
@@ -426,17 +427,18 @@ void InputQueue::MaybeRequestContentResp
   bool waitForMainThread = false;
   if (aBlock->IsTargetConfirmed()) {
     // Content won't prevent-default this, so we can just set the flag directly.
     INPQ_LOG("not waiting for content response on block %p\n", aBlock);
     aBlock->SetContentResponse(false);
   } else {
     waitForMainThread = true;
   }
-  if (aBlock->AsTouchBlock() && !aBlock->AsTouchBlock()->HasAllowedTouchBehaviors()) {
+  if (aBlock->AsTouchBlock() &&
+      !aBlock->AsTouchBlock()->HasAllowedTouchBehaviors()) {
     INPQ_LOG("waiting for main thread touch-action info on block %p\n", aBlock);
     waitForMainThread = true;
   }
   if (waitForMainThread) {
     // We either don't know for sure if aTarget is the right APZC, or we may
     // need to wait to give content the opportunity to prevent-default the
     // touch events. Either way we schedule a timeout so the main thread stuff
     // can run.
--- a/gfx/layers/apz/src/InputQueue.h
+++ b/gfx/layers/apz/src/InputQueue.h
@@ -46,21 +46,21 @@ class InputQueue {
   InputQueue();
 
   /**
    * Notifies the InputQueue of a new incoming input event. The APZC that the
    * input event was targeted to should be provided in the |aTarget| parameter.
    * See the documentation on APZCTreeManager::ReceiveInputEvent for info on
    * return values from this function, including |aOutInputBlockId|.
    */
-  nsEventStatus ReceiveInputEvent(const RefPtr<AsyncPanZoomController>& aTarget,
-                                  TargetConfirmationFlags aFlags,
-                                  const InputData& aEvent,
-                                  uint64_t* aOutInputBlockId,
-                                  const Maybe<nsTArray<TouchBehaviorFlags>>& aTouchBehaviors = Nothing());
+  nsEventStatus ReceiveInputEvent(
+      const RefPtr<AsyncPanZoomController>& aTarget,
+      TargetConfirmationFlags aFlags, const InputData& aEvent,
+      uint64_t* aOutInputBlockId,
+      const Maybe<nsTArray<TouchBehaviorFlags>>& aTouchBehaviors = Nothing());
   /**
    * This function should be invoked to notify the InputQueue when web content
    * decides whether or not it wants to cancel a block of events. The block
    * id to which this applies should be provided in |aInputBlockId|.
    */
   void ContentReceivedInputBlock(uint64_t aInputBlockId, bool aPreventDefault);
   /**
    * This function should be invoked to notify the InputQueue once the target
@@ -167,21 +167,21 @@ class InputQueue {
 
   /**
    * If we need to wait for a content response, schedule that now.
    */
   void MaybeRequestContentResponse(
       const RefPtr<AsyncPanZoomController>& aTarget,
       CancelableBlockState* aBlock);
 
-  nsEventStatus ReceiveTouchInput(const RefPtr<AsyncPanZoomController>& aTarget,
-                                  TargetConfirmationFlags aFlags,
-                                  const MultiTouchInput& aEvent,
-                                  uint64_t* aOutInputBlockId,
-                                  const Maybe<nsTArray<TouchBehaviorFlags>>& aTouchBehaviors);
+  nsEventStatus ReceiveTouchInput(
+      const RefPtr<AsyncPanZoomController>& aTarget,
+      TargetConfirmationFlags aFlags, const MultiTouchInput& aEvent,
+      uint64_t* aOutInputBlockId,
+      const Maybe<nsTArray<TouchBehaviorFlags>>& aTouchBehaviors);
   nsEventStatus ReceiveMouseInput(const RefPtr<AsyncPanZoomController>& aTarget,
                                   TargetConfirmationFlags aFlags,
                                   const MouseInput& aEvent,
                                   uint64_t* aOutInputBlockId);
   nsEventStatus ReceiveScrollWheelInput(
       const RefPtr<AsyncPanZoomController>& aTarget,
       TargetConfirmationFlags aFlags, const ScrollWheelInput& aEvent,
       uint64_t* aOutInputBlockId);
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -566,21 +566,23 @@ static void WebRenderDebugPrefChangeCall
                       wr::DebugFlags_SLOW_FRAME_INDICATOR)
   GFX_WEBRENDER_DEBUG(".texture-cache.clear-evicted",
                       wr::DebugFlags_TEXTURE_CACHE_DBG_CLEAR_EVICTED)
   GFX_WEBRENDER_DEBUG(".picture-caching", wr::DebugFlags_PICTURE_CACHING_DBG)
   GFX_WEBRENDER_DEBUG(".primitives", wr::DebugFlags_PRIMITIVE_DBG)
   // Bit 18 is for the zoom display, which requires the mouse position and thus
   // currently only works in wrench.
   GFX_WEBRENDER_DEBUG(".small-screen", wr::DebugFlags_SMALL_SCREEN)
-  GFX_WEBRENDER_DEBUG(".disable-opaque-pass", wr::DebugFlags_DISABLE_OPAQUE_PASS)
+  GFX_WEBRENDER_DEBUG(".disable-opaque-pass",
+                      wr::DebugFlags_DISABLE_OPAQUE_PASS)
   GFX_WEBRENDER_DEBUG(".disable-alpha-pass", wr::DebugFlags_DISABLE_ALPHA_PASS)
   GFX_WEBRENDER_DEBUG(".disable-clip-masks", wr::DebugFlags_DISABLE_CLIP_MASKS)
   GFX_WEBRENDER_DEBUG(".disable-text-prims", wr::DebugFlags_DISABLE_TEXT_PRIMS)
-  GFX_WEBRENDER_DEBUG(".disable-gradient-prims", wr::DebugFlags_DISABLE_GRADIENT_PRIMS)
+  GFX_WEBRENDER_DEBUG(".disable-gradient-prims",
+                      wr::DebugFlags_DISABLE_GRADIENT_PRIMS)
 #undef GFX_WEBRENDER_DEBUG
 
   gfx::gfxVars::SetWebRenderDebugFlags(flags.bits);
 }
 
 #if defined(USE_SKIA)
 static uint32_t GetSkiaGlyphCacheSize() {
   // Only increase font cache size on non-android to save memory.
--- a/gfx/vr/service/OpenVRSession.cpp
+++ b/gfx/vr/service/OpenVRSession.cpp
@@ -214,17 +214,18 @@ bool GenerateTempFileName(nsCString& aPa
   char fileName[PATH_MAX];
 
   strcpy(fileName, tmp);
   const mode_t prevMask = umask(S_IXUSR | S_IRWXO | S_IRWXG);
   const int fd = mkstemp(fileName);
   umask(prevMask);
   if (fd == -1) {
     NS_WARNING(nsPrintfCString("OpenVR - Creating temp file failed: %s",
-                               strerror(errno)).get());
+                               strerror(errno))
+                   .get());
     return false;
   }
   close(fd);
 
   aPath.Assign(fileName);
   return true;
 }
 #endif  // defined(XP_WIN)
--- a/gfx/webrender_bindings/WebRenderAPI.cpp
+++ b/gfx/webrender_bindings/WebRenderAPI.cpp
@@ -73,18 +73,17 @@ class NewRenderer : public RendererEvent
     bool isMainWindow = true;  // TODO!
     bool supportLowPriorityTransactions = isMainWindow;
     bool supportPictureCaching = isMainWindow;
     wr::Renderer* wrRenderer = nullptr;
     if (!wr_window_new(
             aWindowId, mSize.width, mSize.height,
             supportLowPriorityTransactions,
             gfxPrefs::WebRenderPictureCaching() && supportPictureCaching,
-            gfxPrefs::WebRenderStartDebugServer(),
-            compositor->gl(),
+            gfxPrefs::WebRenderStartDebugServer(), compositor->gl(),
             aRenderThread.GetProgramCache()
                 ? aRenderThread.GetProgramCache()->Raw()
                 : nullptr,
             aRenderThread.GetShaders()
                 ? aRenderThread.GetShaders()->RawShaders()
                 : nullptr,
             aRenderThread.ThreadPool().Raw(), &WebRenderMallocSizeOf,
             &WebRenderMallocEnclosingSizeOf, (uint32_t)wr::RenderRoot::Default,
--- a/js/public/PropertySpec.h
+++ b/js/public/PropertySpec.h
@@ -174,18 +174,19 @@ struct JSPropertySpec {
 
   static constexpr JSPropertySpec selfHostedAccessors(
       const char* name, uint8_t flags, const char* getterName,
       const char* setterName = nullptr) {
     return JSPropertySpec(
         name, flags | JSPROP_GETTER | (setterName ? JSPROP_SETTER : 0),
         AccessorsOrValue::fromAccessors(
             JSPropertySpec::Accessor::selfHostedAccessor(getterName),
-            setterName ? JSPropertySpec::Accessor::selfHostedAccessor(setterName)
-                       : JSPropertySpec::Accessor::noAccessor()));
+            setterName
+                ? JSPropertySpec::Accessor::selfHostedAccessor(setterName)
+                : JSPropertySpec::Accessor::noAccessor()));
   }
 
   static constexpr JSPropertySpec int32Value(const char* name, uint8_t flags,
                                              int32_t n) {
     return JSPropertySpec(name, flags | JSPROP_INTERNAL_USE_BIT,
                           AccessorsOrValue::fromValue(
                               JSPropertySpec::ValueWrapper::int32Value(n)));
   }
@@ -227,19 +228,19 @@ struct JSPropertySpec {
     }
 #endif
     return (flags & JSPROP_GETTER);
   }
 
   static_assert(sizeof(SelfHostedWrapper) == sizeof(JSNativeWrapper),
                 "JSPropertySpec::getter/setter must be compact");
   static_assert(offsetof(SelfHostedWrapper, unused) ==
-                    offsetof(JSNativeWrapper, op) &&
-                offsetof(SelfHostedWrapper, funname) ==
-                    offsetof(JSNativeWrapper, info),
+                        offsetof(JSNativeWrapper, op) &&
+                    offsetof(SelfHostedWrapper, funname) ==
+                        offsetof(JSNativeWrapper, info),
                 "checkAccessorsAreNative below require that "
                 "SelfHostedWrapper::funname overlay "
                 "JSNativeWrapper::info and "
                 "SelfHostedWrapper::unused overlay "
                 "JSNativeWrapper::op");
 
  private:
   void checkAccessorsAreNative() const {
--- a/js/src/frontend/BinASTParserPerTokenizer.cpp
+++ b/js/src/frontend/BinASTParserPerTokenizer.cpp
@@ -360,22 +360,20 @@ JS::Result<FunctionNode*> BinASTParserPe
   BINJS_TRY(pc_->declareFunctionArgumentsObject(usedNames_,
                                                 canSkipLazyClosedOverBindings));
   BINJS_TRY(
       pc_->declareFunctionThis(usedNames_, canSkipLazyClosedOverBindings));
 
   // Check all our bindings after maybe adding function metavars.
   MOZ_TRY(checkFunctionClosedVars());
 
-  BINJS_TRY_DECL(
-      bindings,
-      NewFunctionScopeData(cx_, pc_->functionScope(),
-                           /* hasParameterExprs = */ false,
-                           IsFieldInitializer::No,
-                           alloc_, pc_));
+  BINJS_TRY_DECL(bindings,
+                 NewFunctionScopeData(cx_, pc_->functionScope(),
+                                      /* hasParameterExprs = */ false,
+                                      IsFieldInitializer::No, alloc_, pc_));
 
   funbox->functionScopeBindings().set(*bindings);
 
   if (funbox->function()->isNamedLambda()) {
     BINJS_TRY_DECL(
         recursiveBinding,
         NewLexicalScopeData(cx_, pc_->namedLambdaScope(), alloc_, pc_));
 
--- a/js/src/jit/CodeGenerator.cpp
+++ b/js/src/jit/CodeGenerator.cpp
@@ -14026,29 +14026,30 @@ void CodeGenerator::visitWasmCompareAndS
                     ins->compareType() == MCompare::Compare_UInt32;
   bool selIs32bit = ins->mir()->type() == MIRType::Int32;
 
   if (cmpIs32bit && selIs32bit) {
     Register out = ToRegister(ins->output());
     MOZ_ASSERT(ToRegister(ins->ifTrueExpr()) == out,
                "true expr input is reused for output");
 
-    Assembler::Condition cond = Assembler::InvertCondition(JSOpToCondition(
-                                    ins->compareType(), ins->jsop()));
+    Assembler::Condition cond = Assembler::InvertCondition(
+        JSOpToCondition(ins->compareType(), ins->jsop()));
     const LAllocation* rhs = ins->rightExpr();
     const LAllocation* falseExpr = ins->ifFalseExpr();
     Register lhs = ToRegister(ins->leftExpr());
 
     if (rhs->isRegister()) {
       if (falseExpr->isRegister()) {
         // On arm32, this is the only one of the four cases that can actually
         // happen, since |rhs| and |falseExpr| are marked useAny() by
         // LIRGenerator::visitWasmSelect, and useAny() means "register only"
         // on arm32.
-        masm.cmp32Move32(cond, lhs, ToRegister(rhs), ToRegister(falseExpr), out);
+        masm.cmp32Move32(cond, lhs, ToRegister(rhs), ToRegister(falseExpr),
+                         out);
       } else {
         masm.cmp32Load32(cond, lhs, ToRegister(rhs), ToAddress(falseExpr), out);
       }
     } else {
       if (falseExpr->isRegister()) {
         masm.cmp32Move32(cond, lhs, ToAddress(rhs), ToRegister(falseExpr), out);
       } else {
         masm.cmp32Load32(cond, lhs, ToAddress(rhs), ToAddress(falseExpr), out);
--- a/js/src/jit/Lowering.cpp
+++ b/js/src/jit/Lowering.cpp
@@ -5068,21 +5068,19 @@ void LIRGenerator::visitWasmSelect(MWasm
     JSOp jsop = comp->jsop();
     MCompare::CompareType compTy = comp->compareType();
     // We don't currently generate any other JSOPs for the comparison, and if
     // that changes, we want to know about it.  Hence this assertion.
     MOZ_ASSERT(jsop == JSOP_EQ || jsop == JSOP_NE || jsop == JSOP_LT ||
                jsop == JSOP_GT || jsop == JSOP_LE || jsop == JSOP_GE);
     if (compTy == MCompare::Compare_Int32 ||
         compTy == MCompare::Compare_UInt32) {
-      auto* lir = new (alloc())
-        LWasmCompareAndSelect(useRegister(comp->lhs()), useAny(comp->rhs()),
-                              compTy, jsop,
-                              useRegisterAtStart(ins->trueExpr()),
-                              useAny(ins->falseExpr()));
+      auto* lir = new (alloc()) LWasmCompareAndSelect(
+          useRegister(comp->lhs()), useAny(comp->rhs()), compTy, jsop,
+          useRegisterAtStart(ins->trueExpr()), useAny(ins->falseExpr()));
 
       defineReuseInput(lir, ins, LWasmCompareAndSelect::IfTrueExprIndex);
       return;
     }
     // Otherwise fall through to normal handling, which appears to emit the
     // condexpr itself anyway.
   }
 
--- a/js/src/jit/arm/MacroAssembler-arm-inl.h
+++ b/js/src/jit/arm/MacroAssembler-arm-inl.h
@@ -1901,19 +1901,18 @@ void MacroAssembler::cmp32Move32(Conditi
 
 void MacroAssembler::cmp32Load32(Condition cond, Register lhs,
                                  const Address& rhs, const Address& src,
                                  Register dest) {
   // This is never used, but must be present to facilitate linking on arm.
   MOZ_CRASH("No known use cases");
 }
 
-void MacroAssembler::cmp32Load32(Condition cond, Register lhs,
-                                 Register rhs, const Address& src,
-                                 Register dest) {
+void MacroAssembler::cmp32Load32(Condition cond, Register lhs, Register rhs,
+                                 const Address& src, Register dest) {
   // This is never used, but must be present to facilitate linking on arm.
   MOZ_CRASH("No known use cases");
 }
 
 void MacroAssembler::test32LoadPtr(Condition cond, const Address& addr,
                                    Imm32 mask, const Address& src,
                                    Register dest) {
   MOZ_ASSERT(cond == Assembler::Zero || cond == Assembler::NonZero);
--- a/js/src/jit/arm64/MacroAssembler-arm64-inl.h
+++ b/js/src/jit/arm64/MacroAssembler-arm64-inl.h
@@ -1590,19 +1590,18 @@ void MacroAssembler::cmp32Move32(Conditi
 }
 
 void MacroAssembler::cmp32Load32(Condition cond, Register lhs,
                                  const Address& rhs, const Address& src,
                                  Register dest) {
   MOZ_CRASH("NYI");
 }
 
-void MacroAssembler::cmp32Load32(Condition cond, Register lhs,
-                                 Register rhs, const Address& src,
-                                 Register dest) {
+void MacroAssembler::cmp32Load32(Condition cond, Register lhs, Register rhs,
+                                 const Address& src, Register dest) {
   MOZ_CRASH("NYI");
 }
 
 void MacroAssembler::cmp32MovePtr(Condition cond, Register lhs, Imm32 rhs,
                                   Register src, Register dest) {
   cmp32(lhs, rhs);
   Csel(ARMRegister(dest, 64), ARMRegister(src, 64), ARMRegister(dest, 64),
        cond);
--- a/js/src/jit/x86-shared/MacroAssembler-x86-shared-inl.h
+++ b/js/src/jit/x86-shared/MacroAssembler-x86-shared-inl.h
@@ -994,19 +994,18 @@ void MacroAssembler::cmp32Move32(Conditi
 
 void MacroAssembler::cmp32Load32(Condition cond, Register lhs,
                                  const Address& rhs, const Address& src,
                                  Register dest) {
   cmp32(lhs, Operand(rhs));
   cmovCCl(cond, Operand(src), dest);
 }
 
-void MacroAssembler::cmp32Load32(Condition cond, Register lhs,
-                                 Register rhs, const Address& src,
-                                 Register dest) {
+void MacroAssembler::cmp32Load32(Condition cond, Register lhs, Register rhs,
+                                 const Address& src, Register dest) {
   cmp32(lhs, rhs);
   cmovCCl(cond, Operand(src), dest);
 }
 
 void MacroAssembler::spectreZeroRegister(Condition cond, Register scratch,
                                          Register dest) {
   // Note: use movl instead of move32/xorl to ensure flags are not clobbered.
   movl(Imm32(0), scratch);
--- a/js/src/vm/Time.cpp
+++ b/js/src/vm/Time.cpp
@@ -245,54 +245,54 @@ static int64_t PRMJ_NowImpl() {
     // decreases; the old implementation has this behavior as
     // well.
     needsCalibration = true;
   }
 }
 #endif
 
 #if !ENABLE_INTL_API || MOZ_SYSTEM_ICU
-#ifdef XP_WIN
+#  ifdef XP_WIN
 static void PRMJ_InvalidParameterHandler(const wchar_t* expression,
                                          const wchar_t* function,
                                          const wchar_t* file, unsigned int line,
                                          uintptr_t pReserved) {
   /* empty */
 }
-#endif
+#  endif
 
 /* Format a time value into a buffer. Same semantics as strftime() */
 size_t PRMJ_FormatTime(char* buf, size_t buflen, const char* fmt,
                        const PRMJTime* prtm, int timeZoneYear,
                        int offsetInSeconds) {
   size_t result = 0;
-#if defined(XP_UNIX) || defined(XP_WIN)
+#  if defined(XP_UNIX) || defined(XP_WIN)
   struct tm a;
-#  ifdef XP_WIN
+#    ifdef XP_WIN
   _invalid_parameter_handler oldHandler;
-#    ifndef __MINGW32__
+#      ifndef __MINGW32__
   int oldReportMode;
-#    endif  // __MINGW32__
-#  endif    // XP_WIN
+#      endif  // __MINGW32__
+#    endif    // XP_WIN
 
   memset(&a, 0, sizeof(struct tm));
 
   a.tm_sec = prtm->tm_sec;
   a.tm_min = prtm->tm_min;
   a.tm_hour = prtm->tm_hour;
   a.tm_mday = prtm->tm_mday;
   a.tm_mon = prtm->tm_mon;
   a.tm_wday = prtm->tm_wday;
 
   /*
    * On systems where |struct tm| has members tm_gmtoff and tm_zone, we
    * must fill in those values, or else strftime will return wrong results
    * (e.g., bug 511726, bug 554338).
    */
-#  if defined(HAVE_LOCALTIME_R) && defined(HAVE_TM_ZONE_TM_GMTOFF)
+#    if defined(HAVE_LOCALTIME_R) && defined(HAVE_TM_ZONE_TM_GMTOFF)
   char emptyTimeZoneId[] = "";
   {
     /*
      * Fill out |td| to the time represented by |prtm|, leaving the
      * timezone fields zeroed out. localtime_r will then fill in the
      * timezone fields for that local time according to the system's
      * timezone parameters. Use |timeZoneYear| for the year to ensure the
      * time zone name matches the time zone offset used by the caller.
@@ -317,17 +317,17 @@ size_t PRMJ_FormatTime(char* buf, size_t
     if (t != static_cast<time_t>(-1) && localtime_r(&t, &td)) {
       a.tm_gmtoff = td.tm_gmtoff;
       a.tm_zone = td.tm_zone;
     } else {
       a.tm_gmtoff = offsetInSeconds;
       a.tm_zone = emptyTimeZoneId;
     }
   }
-#  endif
+#    endif
 
   /*
    * Years before 1900 and after 9999 cause strftime() to abort on Windows.
    * To avoid that we replace it with FAKE_YEAR_BASE + year % 100 and then
    * replace matching substrings in the strftime() result with the real year.
    * Note that FAKE_YEAR_BASE should be a multiple of 100 to make 2-digit
    * year formats (%y) work correctly (since we won't find the fake year
    * in that case).
@@ -345,35 +345,35 @@ size_t PRMJ_FormatTime(char* buf, size_t
 
   /*
    * Even with the above, SunOS 4 seems to detonate if tm_zone and tm_gmtoff
    * are null.  This doesn't quite work, though - the timezone is off by
    * tzoff + dst.  (And mktime seems to return -1 for the exact dst
    * changeover time.)
    */
 
-#  ifdef XP_WIN
+#    ifdef XP_WIN
   oldHandler = _set_invalid_parameter_handler(PRMJ_InvalidParameterHandler);
-#    ifndef __MINGW32__
+#      ifndef __MINGW32__
   /*
    * MinGW doesn't have _CrtSetReportMode and defines it to be a no-op.
    * We ifdef it off to avoid warnings about unused variables
    */
   oldReportMode = _CrtSetReportMode(_CRT_ASSERT, 0);
-#    endif  // __MINGW32__
-#  endif    // XP_WIN
+#      endif  // __MINGW32__
+#    endif    // XP_WIN
 
   result = strftime(buf, buflen, fmt, &a);
 
-#  ifdef XP_WIN
+#    ifdef XP_WIN
   _set_invalid_parameter_handler(oldHandler);
-#    ifndef __MINGW32__
+#      ifndef __MINGW32__
   _CrtSetReportMode(_CRT_ASSERT, oldReportMode);
-#    endif  // __MINGW32__
-#  endif    // XP_WIN
+#      endif  // __MINGW32__
+#    endif    // XP_WIN
 
   if (fake_tm_year && result) {
     char real_year[16];
     char fake_year[16];
     size_t real_year_len;
     size_t fake_year_len;
     char* p;
 
@@ -389,12 +389,12 @@ size_t PRMJ_FormatTime(char* buf, size_t
         return 0;
       }
       memmove(p + real_year_len, p + fake_year_len, strlen(p + fake_year_len));
       memcpy(p, real_year, real_year_len);
       result = new_result;
       *(buf + result) = '\0';
     }
   }
-#endif
+#  endif
   return result;
 }
 #endif /* !ENABLE_INTL_API || MOZ_SYSTEM_ICU */
--- a/js/src/wasm/WasmAST.h
+++ b/js/src/wasm/WasmAST.h
@@ -923,20 +923,23 @@ class AstMemOrTableInit : public AstExpr
 class AstTableFill : public AstExpr {
   AstRef targetTable_;
   AstExpr* start_;
   AstExpr* val_;
   AstExpr* len_;
 
  public:
   static const AstExprKind Kind = AstExprKind::TableFill;
-  explicit AstTableFill(AstRef targetTable,
-                        AstExpr* start, AstExpr* val, AstExpr* len)
-      : AstExpr(Kind, ExprType::Void), targetTable_(targetTable),
-        start_(start), val_(val), len_(len) {}
+  explicit AstTableFill(AstRef targetTable, AstExpr* start, AstExpr* val,
+                        AstExpr* len)
+      : AstExpr(Kind, ExprType::Void),
+        targetTable_(targetTable),
+        start_(start),
+        val_(val),
+        len_(len) {}
 
   AstRef& targetTable() { return targetTable_; }
   AstExpr& start() const { return *start_; }
   AstExpr& val() const { return *val_; }
   AstExpr& len() const { return *len_; }
 };
 
 class AstTableGet : public AstExpr {
--- a/js/src/wasm/WasmBaselineCompile.cpp
+++ b/js/src/wasm/WasmBaselineCompile.cpp
@@ -4157,18 +4157,18 @@ class BaseCompiler final : public BaseCo
     }
 
     // Locals are stack allocated.  Mark ref-typed ones in the stackmap
     // accordingly.
     for (const Local& l : localInfo_) {
       if (l.type == MIRType::RefOrNull) {
         uint32_t offs = fr.localOffset(l);
         MOZ_ASSERT(0 == (offs % sizeof(void*)));
-        stackMapGenerator_.machineStackTracker
-                          .setGCPointer(offs / sizeof(void*));
+        stackMapGenerator_.machineStackTracker.setGCPointer(offs /
+                                                            sizeof(void*));
       }
     }
 
     // Copy arguments from registers to stack.
     for (ABIArgIter<const ValTypeVector> i(args); !i.done(); i++) {
       if (!i->argInRegister()) {
         continue;
       }
@@ -4180,18 +4180,18 @@ class BaseCompiler final : public BaseCo
         case MIRType::Int64:
           fr.storeLocalI64(RegI64(i->gpr64()), l);
           break;
         case MIRType::RefOrNull: {
           DebugOnly<uint32_t> offs = fr.localOffset(l);
           MOZ_ASSERT(0 == (offs % sizeof(void*)));
           fr.storeLocalPtr(RegPtr(i->gpr()), l);
           // We should have just visited this local in the preceding loop.
-          MOZ_ASSERT(stackMapGenerator_.machineStackTracker
-                                       .isGCPointer(offs / sizeof(void*)));
+          MOZ_ASSERT(stackMapGenerator_.machineStackTracker.isGCPointer(
+              offs / sizeof(void*)));
           break;
         }
         case MIRType::Double:
           fr.storeLocalF64(RegF64(i->fpu()), l);
           break;
         case MIRType::Float32:
           fr.storeLocalF32(RegF32(i->fpu()), l);
           break;
--- a/js/src/wasm/WasmInstance.cpp
+++ b/js/src/wasm/WasmInstance.cpp
@@ -848,18 +848,17 @@ Instance::tableInit(Instance* instance, 
 
   JS_ReportErrorNumberASCII(TlsContext.get(), GetErrorMessage, nullptr,
                             JSMSG_WASM_OUT_OF_BOUNDS);
   return -1;
 }
 
 /* static */ int32_t /* -1 to signal trap; 0 for ok */
 Instance::tableFill(Instance* instance, uint32_t start, void* value,
-                    uint32_t len, uint32_t tableIndex)
-{
+                    uint32_t len, uint32_t tableIndex) {
   Table& table = *instance->tables()[tableIndex];
   MOZ_RELEASE_ASSERT(table.kind() == TableKind::AnyRef);
 
   if (len == 0) {
     // Even though the length is zero, we must check for a valid offset.  But
     // zero-length operations at the edge of the table are allowed.
     if (start <= table.length()) {
       return 0;
--- a/js/src/wasm/WasmOpIter.h
+++ b/js/src/wasm/WasmOpIter.h
@@ -2028,18 +2028,18 @@ inline bool OpIter<Policy>::readTableGet
     return fail("table.get only on tables of anyref");
   }
 
   infalliblePush(ValType::AnyRef);
   return true;
 }
 
 template <typename Policy>
-inline bool OpIter<Policy>::readTableGrow(uint32_t* tableIndex, Value* initValue,
-                                          Value* delta) {
+inline bool OpIter<Policy>::readTableGrow(uint32_t* tableIndex,
+                                          Value* initValue, Value* delta) {
   MOZ_ASSERT(Classify(op_) == OpKind::TableGrow);
 
   if (!popWithType(ValType::I32, delta)) {
     return false;
   }
   if (!popWithType(ValType::AnyRef, initValue)) {
     return false;
   }
--- a/js/src/wasm/WasmValidate.cpp
+++ b/js/src/wasm/WasmValidate.cpp
@@ -867,18 +867,18 @@ static bool DecodeFunctionBodyExprs(cons
             CHECK(iter.readMemOrTableInit(/*isMem=*/false, &unusedSegIndex,
                                           &unusedTableIndex, &nothing, &nothing,
                                           &nothing));
           }
 #endif
 #ifdef ENABLE_WASM_REFTYPES
           case uint32_t(MiscOp::TableFill): {
             uint32_t unusedTableIndex;
-            CHECK(iter.readTableFill(&unusedTableIndex,
-                                     &nothing, &nothing, &nothing));
+            CHECK(iter.readTableFill(&unusedTableIndex, &nothing, &nothing,
+                                     &nothing));
           }
           case uint32_t(MiscOp::TableGrow): {
             uint32_t unusedTableIndex;
             CHECK(iter.readTableGrow(&unusedTableIndex, &nothing, &nothing));
           }
           case uint32_t(MiscOp::TableSize): {
             uint32_t unusedTableIndex;
             CHECK(iter.readTableSize(&unusedTableIndex));
--- a/js/xpconnect/loader/ScriptPreloader.cpp
+++ b/js/xpconnect/loader/ScriptPreloader.cpp
@@ -252,21 +252,21 @@ void ScriptPreloader::Cleanup() {
   JS_RemoveExtraGCRootsTracer(jsapi.cx(), TraceOp, this);
 
   UnregisterWeakMemoryReporter(this);
 }
 
 void ScriptPreloader::StartCacheWrite() {
   MOZ_ASSERT(!mSaveThread);
 
-  Unused << NS_NewNamedThread("SaveScripts", getter_AddRefs(mSaveThread),
-                              this);
+  Unused << NS_NewNamedThread("SaveScripts", getter_AddRefs(mSaveThread), this);
 
   nsCOMPtr<nsIAsyncShutdownClient> barrier = GetShutdownBarrier();
-  barrier->AddBlocker(this, NS_LITERAL_STRING(__FILE__), __LINE__, EmptyString());
+  barrier->AddBlocker(this, NS_LITERAL_STRING(__FILE__), __LINE__,
+                      EmptyString());
 }
 
 void ScriptPreloader::InvalidateCache() {
   mMonitor.AssertNotCurrentThreadOwns();
   MonitorAutoLock mal(mMonitor);
 
   mCacheInvalidated = true;
 
@@ -1152,17 +1152,18 @@ nsresult ScriptPreloader::GetName(nsAStr
   return NS_OK;
 }
 
 nsresult ScriptPreloader::GetState(nsIPropertyBag** aState) {
   *aState = nullptr;
   return NS_OK;
 }
 
-nsresult ScriptPreloader::BlockShutdown(nsIAsyncShutdownClient* aBarrierClient) {
+nsresult ScriptPreloader::BlockShutdown(
+    nsIAsyncShutdownClient* aBarrierClient) {
   // If we're waiting on a timeout to finish saving, interrupt it and just save
   // immediately.
   mSaveMonitor.NotifyAll();
   return NS_OK;
 }
 
 already_AddRefed<nsIAsyncShutdownClient> ScriptPreloader::GetShutdownBarrier() {
   nsCOMPtr<nsIAsyncShutdownService> svc = components::AsyncShutdown::Service();
--- a/layout/base/nsLayoutUtils.h
+++ b/layout/base/nsLayoutUtils.h
@@ -21,17 +21,17 @@
 #include "nsCSSPropertyIDSet.h"
 #include "nsStyleCoord.h"
 #include "nsStyleConsts.h"
 #include "nsGkAtoms.h"
 #include "mozilla/gfx/2D.h"
 #include "Units.h"
 #include "mozilla/ToString.h"
 #include "mozilla/ReflowOutput.h"
-#include "ImageContainer.h" // for layers::Image
+#include "ImageContainer.h"  // for layers::Image
 #include "gfx2DGlue.h"
 #include "SVGImageContext.h"
 #include <limits>
 #include <algorithm>
 #include "gfxPoint.h"
 #include "nsClassHashtable.h"
 
 class gfxContext;
--- a/layout/base/nsPresContext.h
+++ b/layout/base/nsPresContext.h
@@ -20,17 +20,17 @@
 #include "nsCoord.h"
 #include "nsCOMPtr.h"
 #include "nsRect.h"
 #include "nsStringFwd.h"
 #include "nsFont.h"
 #include "gfxFontConstants.h"
 #include "nsAtom.h"
 #include "nsCRT.h"
-#include "nsIWidgetListener.h" // for nsSizeMode
+#include "nsIWidgetListener.h"  // for nsSizeMode
 #include "nsGkAtoms.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsChangeHint.h"
 #include <algorithm>
 #include "gfxTypes.h"
 #include "gfxRect.h"
 #include "nsTArray.h"
 #include "mozilla/MemoryReporting.h"
--- a/layout/generic/nsGridContainerFrame.h
+++ b/layout/generic/nsGridContainerFrame.h
@@ -87,20 +87,22 @@ class nsGridContainerFrame final : publi
   NS_DECL_FRAMEARENA_HELPERS(nsGridContainerFrame)
   NS_DECL_QUERYFRAME
   using ComputedGridTrackInfo = mozilla::ComputedGridTrackInfo;
   using ComputedGridLineInfo = mozilla::ComputedGridLineInfo;
   using LogicalAxis = mozilla::LogicalAxis;
   using BaselineSharingGroup = mozilla::BaselineSharingGroup;
 
   template <typename T>
-  using PerBaseline = mozilla::EnumeratedArray<BaselineSharingGroup, BaselineSharingGroup(2), T>;
+  using PerBaseline = mozilla::EnumeratedArray<BaselineSharingGroup,
+                                               BaselineSharingGroup(2), T>;
 
   template <typename T>
-  using PerLogicalAxis = mozilla::EnumeratedArray<LogicalAxis, LogicalAxis(2), T>;
+  using PerLogicalAxis =
+      mozilla::EnumeratedArray<LogicalAxis, LogicalAxis(2), T>;
 
   // nsIFrame overrides
   void Reflow(nsPresContext* aPresContext, ReflowOutput& aDesiredSize,
               const ReflowInput& aReflowInput,
               nsReflowStatus& aStatus) override;
   void Init(nsIContent* aContent, nsContainerFrame* aParent,
             nsIFrame* aPrevInFlow) override;
   nscoord GetMinISize(gfxContext* aRenderingContext) override;
--- a/layout/generic/nsImageFrame.cpp
+++ b/layout/generic/nsImageFrame.cpp
@@ -970,32 +970,30 @@ nscoord nsImageFrame::GetContinuationOff
 
 /* virtual */
 nscoord nsImageFrame::GetMinISize(gfxContext* aRenderingContext) {
   // XXX The caller doesn't account for constraints of the block-size,
   // min-block-size, and max-block-size properties.
   DebugOnly<nscoord> result;
   DISPLAY_MIN_INLINE_SIZE(this, result);
   EnsureIntrinsicSizeAndRatio();
-  const auto& iSize = GetWritingMode().IsVertical()
-                                  ? mIntrinsicSize.height
-                                  : mIntrinsicSize.width;
+  const auto& iSize = GetWritingMode().IsVertical() ? mIntrinsicSize.height
+                                                    : mIntrinsicSize.width;
   return iSize.valueOr(0);
 }
 
 /* virtual */
 nscoord nsImageFrame::GetPrefISize(gfxContext* aRenderingContext) {
   // XXX The caller doesn't account for constraints of the block-size,
   // min-block-size, and max-block-size properties.
   DebugOnly<nscoord> result;
   DISPLAY_PREF_INLINE_SIZE(this, result);
   EnsureIntrinsicSizeAndRatio();
-  const auto& iSize = GetWritingMode().IsVertical()
-                                  ? mIntrinsicSize.height
-                                  : mIntrinsicSize.width;
+  const auto& iSize = GetWritingMode().IsVertical() ? mIntrinsicSize.height
+                                                    : mIntrinsicSize.width;
   // convert from normal twips to scaled twips (printing...)
   return iSize.valueOr(0);
 }
 
 /* virtual */
 IntrinsicSize nsImageFrame::GetIntrinsicSize() { return mIntrinsicSize; }
 
 /* virtual */
--- a/layout/generic/nsTextFrame.h
+++ b/layout/generic/nsTextFrame.h
@@ -262,17 +262,18 @@ class nsTextFrame : public nsFrame {
     bool mChanged;
     // an amount to *subtract* from the frame's width (zero if !mChanged)
     nscoord mDeltaWidth;
   };
   TrimOutput TrimTrailingWhiteSpace(DrawTarget* aDrawTarget);
   RenderedText GetRenderedText(
       uint32_t aStartOffset = 0, uint32_t aEndOffset = UINT32_MAX,
       TextOffsetType aOffsetType = TextOffsetType::OffsetsInContentText,
-      TrailingWhitespace aTrimTrailingWhitespace = TrailingWhitespace::Trim) final;
+      TrailingWhitespace aTrimTrailingWhitespace =
+          TrailingWhitespace::Trim) final;
 
   nsOverflowAreas RecomputeOverflow(nsIFrame* aBlockFrame,
                                     bool aIncludeShadows = true);
 
   enum TextRunType {
     // Anything in reflow (but not intrinsic width calculation) or
     // painting should use the inflated text run (i.e., with font size
     // inflation applied).
--- a/layout/style/CSSStyleRule.cpp
+++ b/layout/style/CSSStyleRule.cpp
@@ -191,18 +191,18 @@ nsresult CSSStyleRule::GetSpecificity(ui
 
 nsresult CSSStyleRule::SelectorMatchesElement(Element* aElement,
                                               uint32_t aSelectorIndex,
                                               const nsAString& aPseudo,
                                               bool* aMatches) {
   PseudoStyleType pseudoType = PseudoStyleType::NotPseudo;
   if (!aPseudo.IsEmpty()) {
     RefPtr<nsAtom> pseudoElt = NS_Atomize(aPseudo);
-    pseudoType =
-        nsCSSPseudoElements::GetPseudoType(pseudoElt, CSSEnabledState::IgnoreEnabledState);
+    pseudoType = nsCSSPseudoElements::GetPseudoType(
+        pseudoElt, CSSEnabledState::IgnoreEnabledState);
 
     if (pseudoType == PseudoStyleType::NotPseudo) {
       *aMatches = false;
       return NS_OK;
     }
   }
 
   *aMatches = Servo_StyleRule_SelectorMatchesElement(
--- a/layout/style/nsCSSPseudoElements.cpp
+++ b/layout/style/nsCSSPseudoElements.cpp
@@ -39,20 +39,21 @@ bool nsCSSPseudoElements::IsPseudoElemen
 bool nsCSSPseudoElements::IsCSS2PseudoElement(nsAtom* aAtom) {
   // We don't implement this using PseudoElementHasFlags because callers
   // want to pass things that could be anon boxes.
   MOZ_ASSERT(IsPseudoElement(aAtom), "must be pseudo element");
   bool result = aAtom == nsCSSPseudoElements::after() ||
                 aAtom == nsCSSPseudoElements::before() ||
                 aAtom == nsCSSPseudoElements::firstLetter() ||
                 aAtom == nsCSSPseudoElements::firstLine();
-  NS_ASSERTION(result == PseudoElementHasFlags(
-                             GetPseudoType(aAtom, EnabledState::IgnoreEnabledState),
-                             CSS_PSEUDO_ELEMENT_IS_CSS2),
-               "result doesn't match flags");
+  NS_ASSERTION(
+      result == PseudoElementHasFlags(
+                    GetPseudoType(aAtom, EnabledState::IgnoreEnabledState),
+                    CSS_PSEUDO_ELEMENT_IS_CSS2),
+      "result doesn't match flags");
   return result;
 }
 
 /* static */
 PseudoStyleType nsCSSPseudoElements::GetPseudoType(nsAtom* aAtom,
                                                    EnabledState aEnabledState) {
   Maybe<uint32_t> index = nsStaticAtomUtils::Lookup(aAtom, GetAtomBase(),
                                                     kAtomCount_PseudoElements);
--- a/layout/xul/nsImageBoxFrame.cpp
+++ b/layout/xul/nsImageBoxFrame.cpp
@@ -468,17 +468,18 @@ nsRect nsImageBoxFrame::GetDestRect(cons
     dest = clientRect;
   } else {
     // Determine dest rect based on intrinsic size & ratio, along with
     // 'object-fit' & 'object-position' properties:
     IntrinsicSize intrinsicSize;
     nsSize intrinsicRatio;
     if (mIntrinsicSize.width > 0 && mIntrinsicSize.height > 0) {
       // Image has a valid size; use it as intrinsic size & ratio.
-      intrinsicSize = IntrinsicSize(mIntrinsicSize.width, mIntrinsicSize.height);
+      intrinsicSize =
+          IntrinsicSize(mIntrinsicSize.width, mIntrinsicSize.height);
       intrinsicRatio = mIntrinsicSize;
     } else {
       // Image doesn't have a (valid) intrinsic size.
       // Try to look up intrinsic ratio and use that at least.
       imgCon->GetIntrinsicRatio(&intrinsicRatio);
     }
     aAnchorPoint.emplace();
     dest = nsLayoutUtils::ComputeObjectDestRect(clientRect, intrinsicSize,
--- a/layout/xul/nsMenuPopupFrame.cpp
+++ b/layout/xul/nsMenuPopupFrame.cpp
@@ -1504,20 +1504,19 @@ nsresult nsMenuPopupFrame::SetPopupPosit
   inWayland = !GDK_IS_X11_DISPLAY(gdk_display_get_default());
 #endif
 
   // If a panel is being moved or has flip="none", don't constrain or flip it,
   // in order to avoid visual noise when moving windows between screens.
   // However, if a panel is already constrained or flipped (mIsOffset), then we
   // want to continue to calculate this. Also, always do this for content
   // shells, so that the popup doesn't extend outside the containing frame.
-  if (!inWayland &&
-      (mInContentShell ||
-       (mFlip != FlipType_None &&
-        (!aIsMove || mIsOffset || mPopupType != ePopupTypePanel)))) {
+  if (!inWayland && (mInContentShell || (mFlip != FlipType_None &&
+                                         (!aIsMove || mIsOffset ||
+                                          mPopupType != ePopupTypePanel)))) {
     int32_t appPerDev = presContext->AppUnitsPerDevPixel();
     LayoutDeviceIntRect anchorRectDevPix =
         LayoutDeviceIntRect::FromAppUnitsToNearest(anchorRect, appPerDev);
     LayoutDeviceIntRect rootScreenRectDevPix =
         LayoutDeviceIntRect::FromAppUnitsToNearest(rootScreenRect, appPerDev);
     LayoutDeviceIntRect screenRectDevPix =
         GetConstraintRect(anchorRectDevPix, rootScreenRectDevPix, popupLevel);
     nsRect screenRect =
--- a/layout/xul/nsXULPopupManager.cpp
+++ b/layout/xul/nsXULPopupManager.cpp
@@ -1434,18 +1434,18 @@ void nsXULPopupManager::FirePopupHidingE
       popupFrame->SetPopupState(ePopupShown);
     } else {
       // If the popup has an animate attribute and it is not set to false, check
       // if it has a closing transition and wait for it to finish. The
       // transition may still occur either way, but the view will be hidden and
       // you won't be able to see it. If there is a next popup, indicating that
       // mutliple popups are rolling up, don't wait and hide the popup right
       // away since the effect would likely be undesirable.
-      if (StaticPrefs::xul_panel_animations_enabled() &&
-          !aNextPopup && aPopup->IsElement() &&
+      if (StaticPrefs::xul_panel_animations_enabled() && !aNextPopup &&
+          aPopup->IsElement() &&
           aPopup->AsElement()->HasAttr(kNameSpaceID_None, nsGkAtoms::animate)) {
         // If animate="false" then don't transition at all. If animate="cancel",
         // only show the transition if cancelling the popup or rolling up.
         // Otherwise, always show the transition.
         nsAutoString animate;
         aPopup->AsElement()->GetAttr(kNameSpaceID_None, nsGkAtoms::animate,
                                      animate);
 
--- a/mozglue/linker/tests/TestZip.cpp
+++ b/mozglue/linker/tests/TestZip.cpp
@@ -60,24 +60,24 @@ const char *test_entries[] = {"baz", "fo
  */
 ZIP_DATA(NO_CENTRAL_DIR_ZIP, "no_central_dir.zip");
 const char *no_central_dir_entries[] = {"a", "b", "c", "d"};
 
 TEST(Zip, TestZip)
 {
   Zip::Stream s;
   RefPtr<Zip> z = Zip::Create((void *)TEST_ZIP, TEST_ZIP_SIZE);
-  for (auto& entry : test_entries) {
+  for (auto &entry : test_entries) {
     ASSERT_TRUE(z->GetStream(entry, &s))
     << "Could not get entry \"" << entry << "\"";
   }
 }
 
 TEST(Zip, NoCentralDir)
 {
   Zip::Stream s;
   RefPtr<Zip> z =
       Zip::Create((void *)NO_CENTRAL_DIR_ZIP, NO_CENTRAL_DIR_ZIP_SIZE);
-  for (auto& entry : no_central_dir_entries) {
+  for (auto &entry : no_central_dir_entries) {
     ASSERT_TRUE(z->GetStream(entry, &s))
     << "Could not get entry \"" << entry << "\"";
   }
 }
--- a/mozglue/misc/NativeNt.h
+++ b/mozglue/misc/NativeNt.h
@@ -518,17 +518,17 @@ class MOZ_RAII PEHeaders final {
     }
 
     return Nothing();
   }
 
   // There may be other code sections in the binary besides .text
   Maybe<Span<const uint8_t>> GetTextSectionInfo() const {
     return FindSection(".text", IMAGE_SCN_CNT_CODE | IMAGE_SCN_MEM_EXECUTE |
-                                IMAGE_SCN_MEM_READ);
+                                    IMAGE_SCN_MEM_READ);
   }
 
   static bool IsValid(PIMAGE_IMPORT_DESCRIPTOR aImpDesc) {
     return aImpDesc && aImpDesc->OriginalFirstThunk != 0;
   }
 
   static bool IsValid(PIMAGE_THUNK_DATA aImgThunk) {
     return aImgThunk && aImgThunk->u1.Ordinal != 0;
@@ -549,21 +549,21 @@ class MOZ_RAII PEHeaders final {
   // able to resolve the bounds themselves.
   template <typename T, typename R>
   T RVAToPtrUnchecked(R aRva) const {
     return reinterpret_cast<T>(reinterpret_cast<char*>(mMzHeader) + aRva);
   }
 
   Span<IMAGE_SECTION_HEADER> GetSectionTable() const {
     MOZ_ASSERT(*this);
-    auto base = RVAToPtr<PIMAGE_SECTION_HEADER>(&mPeHeader->OptionalHeader,
-                         mPeHeader->FileHeader.SizeOfOptionalHeader);
+    auto base = RVAToPtr<PIMAGE_SECTION_HEADER>(
+        &mPeHeader->OptionalHeader, mPeHeader->FileHeader.SizeOfOptionalHeader);
     // The Windows loader has an internal limit of 96 sections (per PE spec)
-    auto numSections = std::min(mPeHeader->FileHeader.NumberOfSections,
-                                WORD(96));
+    auto numSections =
+        std::min(mPeHeader->FileHeader.NumberOfSections, WORD(96));
     return MakeSpan(base, numSections);
   }
 
   PIMAGE_RESOURCE_DIRECTORY_ENTRY
   FindResourceEntry(PIMAGE_RESOURCE_DIRECTORY aCurLevel, WORD aId) {
     // Immediately after the IMAGE_RESOURCE_DIRECTORY structure is an array
     // of IMAGE_RESOURCE_DIRECTORY_ENTRY structures. Since this function
     // searches by ID, we need to skip past any named entries before iterating.
--- a/mozglue/misc/WindowsProcessMitigations.h
+++ b/mozglue/misc/WindowsProcessMitigations.h
@@ -11,9 +11,8 @@
 
 namespace mozilla {
 
 MFBT_API bool IsWin32kLockedDown();
 
 }  // namespace mozilla
 
 #endif  // mozilla_WindowsProcessMitigations_h
-
--- a/toolkit/xre/nsNativeAppSupportCocoa.mm
+++ b/toolkit/xre/nsNativeAppSupportCocoa.mm
@@ -64,17 +64,16 @@ nsresult GetNativeWindowPointerFromDOMWi
 void remoteClientNotificationCallback(CFNotificationCenterRef aCenter, void* aObserver,
                                       CFStringRef aName, const void* aObject,
                                       CFDictionaryRef aUserInfo) {
   // Autorelease pool to prevent memory leaks, in case there is no outer pool.
   mozilla::MacAutoreleasePool pool;
   NSDictionary* userInfoDict = (__bridge NSDictionary*)aUserInfo;
   if (userInfoDict && [userInfoDict objectForKey:@"commandLineArgs"] &&
       [userInfoDict objectForKey:@"senderPath"]) {
-
     NSString* senderPath = [userInfoDict objectForKey:@"senderPath"];
     if (![senderPath isEqual:[[NSBundle mainBundle] bundlePath]]) {
       // The caller is not the process at the same path as we are at. Skipping.
       return;
     }
 
     NSArray* args = [userInfoDict objectForKey:@"commandLineArgs"];
     nsCOMPtr<nsICommandLineRunner> cmdLine(new nsCommandLine());
@@ -204,38 +203,34 @@ NS_IMETHODIMP nsNativeAppSupportCocoa::S
   // current user.
   NSString* notificationName = [[[NSBundle mainBundle] bundleIdentifier]
       stringByAppendingString:@".distributedNotification.commandLineArgs"];
 
   BOOL runningInstanceFound = NO;
   if (!shallProceedLikeNoRemote) {
     // We check for other running instances only if -no-remote was not specified.
     // The check is needed so the marAppApplyUpdateSuccess.js test doesn't fail on next call.
-    NSArray* appsWithMatchingId = [NSRunningApplication runningApplicationsWithBundleIdentifier:
-                                    [[NSBundle mainBundle] bundleIdentifier]];
+    NSArray* appsWithMatchingId = [NSRunningApplication
+        runningApplicationsWithBundleIdentifier:[[NSBundle mainBundle] bundleIdentifier]];
     NSString* currentAppBundlePath = [[NSBundle mainBundle] bundlePath];
     NSRunningApplication* currentApp = [NSRunningApplication currentApplication];
     for (NSRunningApplication* app in appsWithMatchingId) {
-      if ([currentAppBundlePath isEqual:[[app bundleURL] path]] &&
-          ![currentApp isEqual:app]) {
+      if ([currentAppBundlePath isEqual:[[app bundleURL] path]] && ![currentApp isEqual:app]) {
         runningInstanceFound = YES;
         break;
       }
     }
   }
 
   if (!shallProceedLikeNoRemote && !mozillaRestarting && runningInstanceFound) {
     // There is another instance of this app already running!
     NSArray* arguments = [[NSProcessInfo processInfo] arguments];
     NSString* senderPath = [[NSBundle mainBundle] bundlePath];
-    CFDictionaryRef userInfoDict = (__bridge CFDictionaryRef) @{@"commandLineArgs" :
-                                                                  arguments,
-                                                                @"senderPath":
-                                                                  senderPath
-                                                                };
+    CFDictionaryRef userInfoDict =
+        (__bridge CFDictionaryRef) @{@"commandLineArgs" : arguments, @"senderPath" : senderPath};
 
     // This code is shared between Firefox, Thunderbird and other Mozilla products.
     // So we need a notification name that is unique to the product, so we
     // do not send a notification to Firefox from Thunderbird and so on. I am using
     // bundle Id (assuming all Mozilla products come wrapped in .app bundles) -
     // it should be unique
     // (e.g., org.mozilla.firefox.distributedNotification.commandLineArgs for Firefox).
     // We also need to make sure the notifications are "local" to the current user,
--- a/widget/gtk/WidgetStyleCache.cpp
+++ b/widget/gtk/WidgetStyleCache.cpp
@@ -1407,18 +1407,18 @@ GtkStyleContext* GetStyleContext(WidgetN
   }
   return style;
 }
 
 GtkStyleContext* CreateStyleContextWithStates(WidgetNodeType aNodeType,
                                               int aScale,
                                               GtkTextDirection aDirection,
                                               GtkStateFlags aStateFlags) {
-  GtkStyleContext* style = GetStyleContext(aNodeType, aScale, aDirection,
-                                           aStateFlags);
+  GtkStyleContext* style =
+      GetStyleContext(aNodeType, aScale, aDirection, aStateFlags);
   GtkWidgetPath* path = gtk_widget_path_copy(gtk_style_context_get_path(style));
 
   if (gtk_check_version(3, 14, 0) == nullptr) {
     static auto sGtkWidgetPathIterGetState =
         (GtkStateFlags(*)(const GtkWidgetPath*, gint))dlsym(
             RTLD_DEFAULT, "gtk_widget_path_iter_get_state");
     static auto sGtkWidgetPathIterSetState =
         (void (*)(GtkWidgetPath*, gint, GtkStateFlags))dlsym(
@@ -1433,15 +1433,15 @@ GtkStyleContext* CreateStyleContextWithS
 
   style = gtk_style_context_new();
   gtk_style_context_set_path(style, path);
   gtk_widget_path_unref(path);
 
   return style;
 }
 
-void StyleContextSetScale(GtkStyleContext *style, gint aScaleFactor) {
+void StyleContextSetScale(GtkStyleContext* style, gint aScaleFactor) {
   // Support HiDPI styles on Gtk 3.20+
   static auto sGtkStyleContextSetScalePtr =
-      (void (*)(GtkStyleContext *, gint))dlsym(
-          RTLD_DEFAULT, "gtk_style_context_set_scale");
+      (void (*)(GtkStyleContext*, gint))dlsym(RTLD_DEFAULT,
+                                              "gtk_style_context_set_scale");
   sGtkStyleContextSetScalePtr(style, aScaleFactor);
 }
--- a/widget/gtk/WidgetStyleCache.h
+++ b/widget/gtk/WidgetStyleCache.h
@@ -47,11 +47,11 @@ GtkStyleContext* GetStyleContext(
  */
 GtkStyleContext* CreateStyleContextWithStates(
     WidgetNodeType aNodeType, int aScale = 1,
     GtkTextDirection aDirection = GTK_TEXT_DIR_NONE,
     GtkStateFlags aStateFlags = GTK_STATE_FLAG_NORMAL);
 
 void ResetWidgetCache(void);
 
-void StyleContextSetScale(GtkStyleContext *style, gint aScaleFactor);
+void StyleContextSetScale(GtkStyleContext* style, gint aScaleFactor);
 
 #endif  // WidgetStyleCache_h
--- a/widget/gtk/gtk3drawing.cpp
+++ b/widget/gtk/gtk3drawing.cpp
@@ -948,18 +948,18 @@ static gint moz_gtk_scrollbar_trough_pai
   return MOZ_GTK_SUCCESS;
 }
 
 static gint moz_gtk_scrollbar_paint(WidgetNodeType widget, cairo_t* cr,
                                     const GdkRectangle* rect,
                                     GtkWidgetState* state,
                                     GtkTextDirection direction) {
   GtkStateFlags state_flags = GetStateFlagsFromGtkWidgetState(state);
-  GtkStyleContext* style = GetStyleContext(widget, state->scale, direction,
-                                           state_flags);
+  GtkStyleContext* style =
+      GetStyleContext(widget, state->scale, direction, state_flags);
 
   moz_gtk_update_scrollbar_style(style, widget, direction);
 
   moz_gtk_draw_styled_frame(style, cr, rect, state->focused);
 
   style = GetStyleContext((widget == MOZ_GTK_SCROLLBAR_HORIZONTAL)
                               ? MOZ_GTK_SCROLLBAR_CONTENTS_HORIZONTAL
                               : MOZ_GTK_SCROLLBAR_CONTENTS_VERTICAL,
@@ -969,18 +969,18 @@ static gint moz_gtk_scrollbar_paint(Widg
   return MOZ_GTK_SUCCESS;
 }
 
 static gint moz_gtk_scrollbar_thumb_paint(WidgetNodeType widget, cairo_t* cr,
                                           const GdkRectangle* aRect,
                                           GtkWidgetState* state,
                                           GtkTextDirection direction) {
   GtkStateFlags state_flags = GetStateFlagsFromGtkWidgetState(state);
-  GtkStyleContext* style = GetStyleContext(widget, state->scale, direction,
-                                           state_flags);
+  GtkStyleContext* style =
+      GetStyleContext(widget, state->scale, direction, state_flags);
 
   GtkOrientation orientation = (widget == MOZ_GTK_SCROLLBAR_THUMB_HORIZONTAL)
                                    ? GTK_ORIENTATION_HORIZONTAL
                                    : GTK_ORIENTATION_VERTICAL;
 
   GdkRectangle rect = *aRect;
 
   const ScrollbarGTKMetrics* metrics =
@@ -993,19 +993,19 @@ static gint moz_gtk_scrollbar_thumb_pain
                     orientation);
 
   return MOZ_GTK_SUCCESS;
 }
 
 static gint moz_gtk_inner_spin_paint(cairo_t* cr, GdkRectangle* rect,
                                      GtkWidgetState* state,
                                      GtkTextDirection direction) {
-  GtkStyleContext* style = GetStyleContext(
-      MOZ_GTK_SPINBUTTON, state->scale, direction,
-      GetStateFlagsFromGtkWidgetState(state));
+  GtkStyleContext* style =
+      GetStyleContext(MOZ_GTK_SPINBUTTON, state->scale, direction,
+                      GetStateFlagsFromGtkWidgetState(state));
 
   gtk_render_background(style, cr, rect->x, rect->y, rect->width, rect->height);
   gtk_render_frame(style, cr, rect->x, rect->y, rect->width, rect->height);
 
   /* hard code these values */
   GdkRectangle arrow_rect;
   arrow_rect.width = 6;
   arrow_rect.height = 6;
@@ -1024,29 +1024,29 @@ static gint moz_gtk_inner_spin_paint(cai
                    arrow_rect.width);
 
   return MOZ_GTK_SUCCESS;
 }
 
 static gint moz_gtk_spin_paint(cairo_t* cr, GdkRectangle* rect,
                                GtkWidgetState* state,
                                GtkTextDirection direction) {
-  GtkStyleContext* style = GetStyleContext(MOZ_GTK_SPINBUTTON, state->scale,
-                                           direction);
+  GtkStyleContext* style =
+      GetStyleContext(MOZ_GTK_SPINBUTTON, state->scale, direction);
   gtk_render_background(style, cr, rect->x, rect->y, rect->width, rect->height);
   gtk_render_frame(style, cr, rect->x, rect->y, rect->width, rect->height);
   return MOZ_GTK_SUCCESS;
 }
 
 static gint moz_gtk_spin_updown_paint(cairo_t* cr, GdkRectangle* rect,
                                       gboolean isDown, GtkWidgetState* state,
                                       GtkTextDirection direction) {
-  GtkStyleContext* style = GetStyleContext(
-      MOZ_GTK_SPINBUTTON, state->scale, direction,
-      GetStateFlagsFromGtkWidgetState(state));
+  GtkStyleContext* style =
+      GetStyleContext(MOZ_GTK_SPINBUTTON, state->scale, direction,
+                      GetStateFlagsFromGtkWidgetState(state));
 
   gtk_render_background(style, cr, rect->x, rect->y, rect->width, rect->height);
   gtk_render_frame(style, cr, rect->x, rect->y, rect->width, rect->height);
 
   /* hard code these values */
   GdkRectangle arrow_rect;
   arrow_rect.width = 6;
   arrow_rect.height = 6;
@@ -1131,40 +1131,38 @@ static gint moz_gtk_scale_thumb_paint(ca
   gtk_render_slider(style, cr, x, y, thumb_width, thumb_height, flags);
 
   return MOZ_GTK_SUCCESS;
 }
 
 static gint moz_gtk_gripper_paint(cairo_t* cr, GdkRectangle* rect,
                                   GtkWidgetState* state,
                                   GtkTextDirection direction) {
-  GtkStyleContext* style = GetStyleContext(
-      MOZ_GTK_GRIPPER, state->scale, direction,
-      GetStateFlagsFromGtkWidgetState(state));
+  GtkStyleContext* style =
+      GetStyleContext(MOZ_GTK_GRIPPER, state->scale, direction,
+                      GetStateFlagsFromGtkWidgetState(state));
   gtk_render_background(style, cr, rect->x, rect->y, rect->width, rect->height);
   gtk_render_frame(style, cr, rect->x, rect->y, rect->width, rect->height);
   return MOZ_GTK_SUCCESS;
 }
 
 static gint moz_gtk_hpaned_paint(cairo_t* cr, GdkRectangle* rect,
                                  GtkWidgetState* state) {
   GtkStyleContext* style =
       GetStyleContext(MOZ_GTK_SPLITTER_SEPARATOR_HORIZONTAL, state->scale,
-                      GTK_TEXT_DIR_LTR,
-                      GetStateFlagsFromGtkWidgetState(state));
+                      GTK_TEXT_DIR_LTR, GetStateFlagsFromGtkWidgetState(state));
   gtk_render_handle(style, cr, rect->x, rect->y, rect->width, rect->height);
   return MOZ_GTK_SUCCESS;
 }
 
 static gint moz_gtk_vpaned_paint(cairo_t* cr, GdkRectangle* rect,
                                  GtkWidgetState* state) {
   GtkStyleContext* style =
       GetStyleContext(MOZ_GTK_SPLITTER_SEPARATOR_VERTICAL, state->scale,
-                      GTK_TEXT_DIR_LTR,
-                      GetStateFlagsFromGtkWidgetState(state));
+                      GTK_TEXT_DIR_LTR, GetStateFlagsFromGtkWidgetState(state));
   gtk_render_handle(style, cr, rect->x, rect->y, rect->width, rect->height);
   return MOZ_GTK_SUCCESS;
 }
 
 // See gtk_entry_draw() for reference.
 static gint moz_gtk_entry_paint(cairo_t* cr, GdkRectangle* rect,
                                 GtkWidgetState* state, GtkStyleContext* style,
                                 WidgetNodeType widget) {
@@ -1203,19 +1201,18 @@ static gint moz_gtk_text_view_paint(cair
   // has focus, but perhaps this may help identify a focused textarea with
   // some themes as GtkTextView backgrounds do not typically render
   // differently with focus.
   GtkStateFlags state_flags =
       state->disabled
           ? GTK_STATE_FLAG_INSENSITIVE
           : state->focused ? GTK_STATE_FLAG_FOCUSED : GTK_STATE_FLAG_NORMAL;
 
-  GtkStyleContext* style_frame =
-      GetStyleContext(MOZ_GTK_SCROLLED_WINDOW, state->scale, direction,
-                      state_flags);
+  GtkStyleContext* style_frame = GetStyleContext(
+      MOZ_GTK_SCROLLED_WINDOW, state->scale, direction, state_flags);
   gtk_render_frame(style_frame, cr, aRect->x, aRect->y, aRect->width,
                    aRect->height);
 
   GdkRectangle rect = *aRect;
   InsetByBorderPadding(&rect, style_frame);
 
   GtkStyleContext* style =
       GetStyleContext(MOZ_GTK_TEXT_VIEW, state->scale, direction, state_flags);
@@ -1279,18 +1276,17 @@ static gint moz_gtk_tree_header_sort_arr
   GtkStyleContext* style;
 
   /* hard code these values */
   arrow_rect.width = 11;
   arrow_rect.height = 11;
   arrow_rect.x = rect->x + (rect->width - arrow_rect.width) / 2;
   arrow_rect.y = rect->y + (rect->height - arrow_rect.height) / 2;
   style = GetStyleContext(MOZ_GTK_TREE_HEADER_SORTARROW, state->scale,
-                          direction,
-                          GetStateFlagsFromGtkWidgetState(state));
+                          direction, GetStateFlagsFromGtkWidgetState(state));
   switch (arrow_type) {
     case GTK_ARROW_LEFT:
       arrow_angle = ARROW_LEFT;
       break;
     case GTK_ARROW_RIGHT:
       arrow_angle = ARROW_RIGHT;
       break;
     case GTK_ARROW_DOWN:
@@ -1330,19 +1326,18 @@ static gint moz_gtk_treeview_expander_pa
    */
   if (expander_state == GTK_EXPANDER_EXPANDED)
     state_flags =
         static_cast<GtkStateFlags>(state_flags | checkbox_check_state);
   else
     state_flags =
         static_cast<GtkStateFlags>(state_flags & ~(checkbox_check_state));
 
-  GtkStyleContext* style =
-      GetStyleContext(MOZ_GTK_TREEVIEW_EXPANDER, state->scale, direction,
-                      state_flags);
+  GtkStyleContext* style = GetStyleContext(
+      MOZ_GTK_TREEVIEW_EXPANDER, state->scale, direction, state_flags);
   gtk_render_expander(style, cr, rect->x, rect->y, rect->width, rect->height);
 
   return MOZ_GTK_SUCCESS;
 }
 
 /* See gtk_separator_draw() for reference.
  */
 static gint moz_gtk_combo_box_paint(cairo_t* cr, GdkRectangle* rect,
@@ -1434,19 +1429,18 @@ static gint moz_gtk_arrow_paint(cairo_t*
       arrow_angle = ARROW_UP;
       break;
   }
   if (arrow_type == GTK_ARROW_NONE) return MOZ_GTK_SUCCESS;
 
   calculate_arrow_rect(GetWidget(MOZ_GTK_BUTTON_ARROW), rect, &arrow_rect,
                        direction);
   GtkStateFlags state_flags = GetStateFlagsFromGtkWidgetState(state);
-  GtkStyleContext* style =
-      GetStyleContext(MOZ_GTK_BUTTON_ARROW, state->scale, direction,
-                      state_flags);
+  GtkStyleContext* style = GetStyleContext(MOZ_GTK_BUTTON_ARROW, state->scale,
+                                           direction, state_flags);
   gtk_render_arrow(style, cr, arrow_angle, arrow_rect.x, arrow_rect.y,
                    arrow_rect.width);
   return MOZ_GTK_SUCCESS;
 }
 
 static gint moz_gtk_combo_box_entry_button_paint(cairo_t* cr,
                                                  GdkRectangle* rect,
                                                  GtkWidgetState* state,
@@ -1479,18 +1473,18 @@ static gint moz_gtk_combo_box_entry_butt
   return MOZ_GTK_SUCCESS;
 }
 
 static gint moz_gtk_container_paint(cairo_t* cr, GdkRectangle* rect,
                                     GtkWidgetState* state,
                                     WidgetNodeType widget_type,
                                     GtkTextDirection direction) {
   GtkStateFlags state_flags = GetStateFlagsFromGtkWidgetState(state);
-  GtkStyleContext* style = GetStyleContext(widget_type, state->scale,
-                                           direction, state_flags);
+  GtkStyleContext* style =
+      GetStyleContext(widget_type, state->scale, direction, state_flags);
   /* this is for drawing a prelight box */
   if (state_flags & GTK_STATE_FLAG_PRELIGHT) {
     gtk_render_background(style, cr, rect->x, rect->y, rect->width,
                           rect->height);
   }
 
   return MOZ_GTK_SUCCESS;
 }
@@ -1506,18 +1500,18 @@ static gint moz_gtk_toggle_label_paint(c
   gtk_render_focus(style, cr, rect->x, rect->y, rect->width, rect->height);
 
   return MOZ_GTK_SUCCESS;
 }
 
 static gint moz_gtk_toolbar_paint(cairo_t* cr, GdkRectangle* rect,
                                   GtkWidgetState* state,
                                   GtkTextDirection direction) {
-  GtkStyleContext* style = GetStyleContext(MOZ_GTK_TOOLBAR, state->scale,
-                                           direction);
+  GtkStyleContext* style =
+      GetStyleContext(MOZ_GTK_TOOLBAR, state->scale, direction);
   gtk_render_background(style, cr, rect->x, rect->y, rect->width, rect->height);
   gtk_render_frame(style, cr, rect->x, rect->y, rect->width, rect->height);
   return MOZ_GTK_SUCCESS;
 }
 
 /* See _gtk_toolbar_paint_space_line() for reference.
  */
 static gint moz_gtk_toolbar_separator_paint(cairo_t* cr, GdkRectangle* rect,
@@ -1565,32 +1559,32 @@ static gint moz_gtk_tooltip_paint(cairo_
   // Tooltip window
   //   Horizontal Box
   //     Icon (not supported by Firefox)
   //     Label
   // Each element can be fully styled by CSS of GTK theme.
   // We have to draw all elements with appropriate offset and right dimensions.
 
   // Tooltip drawing
-  GtkStyleContext* style = GetStyleContext(MOZ_GTK_TOOLTIP, state->scale,
-                                           direction);
+  GtkStyleContext* style =
+      GetStyleContext(MOZ_GTK_TOOLTIP, state->scale, direction);
   GdkRectangle rect = *aRect;
   gtk_render_background(style, cr, rect.x, rect.y, rect.width, rect.height);
   gtk_render_frame(style, cr, rect.x, rect.y, rect.width, rect.height);
 
   // Horizontal Box drawing
   //
   // The box element has hard-coded 6px margin-* GtkWidget properties, which
   // are added between the window dimensions and the CSS margin box of the
   // horizontal box.  The frame of the tooltip window is drawn in the
   // 6px margin.
   // For drawing Horizontal Box we have to inset drawing area by that 6px
   // plus its CSS margin.
-  GtkStyleContext* boxStyle = GetStyleContext(MOZ_GTK_TOOLTIP_BOX,
-                                              state->scale, direction);
+  GtkStyleContext* boxStyle =
+      GetStyleContext(MOZ_GTK_TOOLTIP_BOX, state->scale, direction);
 
   rect.x += 6;
   rect.y += 6;
   rect.width -= 12;
   rect.height -= 12;
 
   InsetByMargin(&rect, boxStyle);
   gtk_render_background(boxStyle, cr, rect.x, rect.y, rect.width, rect.height);
@@ -1627,39 +1621,39 @@ static gint moz_gtk_resizer_paint(cairo_
   cairo_restore(cr);
 
   return MOZ_GTK_SUCCESS;
 }
 
 static gint moz_gtk_frame_paint(cairo_t* cr, GdkRectangle* rect,
                                 GtkWidgetState* state,
                                 GtkTextDirection direction) {
-  GtkStyleContext* style = GetStyleContext(MOZ_GTK_FRAME, state->scale,
-                                           direction);
+  GtkStyleContext* style =
+      GetStyleContext(MOZ_GTK_FRAME, state->scale, direction);
   gtk_render_frame(style, cr, rect->x, rect->y, rect->width, rect->height);
   return MOZ_GTK_SUCCESS;
 }
 
 static gint moz_gtk_progressbar_paint(cairo_t* cr, GdkRectangle* rect,
                                       GtkWidgetState* state,
                                       GtkTextDirection direction) {
-  GtkStyleContext* style = GetStyleContext(MOZ_GTK_PROGRESS_TROUGH,
-                                           state->scale, direction);
+  GtkStyleContext* style =
+      GetStyleContext(MOZ_GTK_PROGRESS_TROUGH, state->scale, direction);
   gtk_render_background(style, cr, rect->x, rect->y, rect->width, rect->height);
   gtk_render_frame(style, cr, rect->x, rect->y, rect->width, rect->height);
 
   return MOZ_GTK_SUCCESS;
 }
 
 static gint moz_gtk_progress_chunk_paint(cairo_t* cr, GdkRectangle* rect,
                                          GtkWidgetState* state,
                                          GtkTextDirection direction,
                                          WidgetNodeType widget) {
-  GtkStyleContext* style = GetStyleContext(MOZ_GTK_PROGRESS_CHUNK,
-                                           state->scale, direction);
+  GtkStyleContext* style =
+      GetStyleContext(MOZ_GTK_PROGRESS_CHUNK, state->scale, direction);
 
   if (widget == MOZ_GTK_PROGRESS_CHUNK_INDETERMINATE ||
       widget == MOZ_GTK_PROGRESS_CHUNK_VERTICAL_INDETERMINATE) {
     /**
      * The bar's size and the bar speed are set depending of the progress'
      * size. These could also be constant for all progress bars easily.
      */
     gboolean vertical =
@@ -1734,18 +1728,18 @@ static gint moz_gtk_tab_paint(cairo_t* c
 
   GtkStyleContext* style;
   GdkRectangle tabRect;
   GdkRectangle focusRect;
   GdkRectangle backRect;
   int initial_gap = 0;
   bool isBottomTab = (widget == MOZ_GTK_TAB_BOTTOM);
 
-  style =
-      GetStyleContext(widget, state->scale, direction, GetStateFlagsFromGtkTabFlags(flags));
+  style = GetStyleContext(widget, state->scale, direction,
+                          GetStateFlagsFromGtkTabFlags(flags));
   tabRect = *rect;
 
   if (flags & MOZ_GTK_TAB_FIRST) {
     gtk_style_context_get_style(style, "initial-gap", &initial_gap, NULL);
     tabRect.width -= initial_gap;
 
     if (direction != GTK_TEXT_DIR_RTL) {
       tabRect.x += initial_gap;
@@ -1896,18 +1890,18 @@ static gint moz_gtk_tab_paint(cairo_t* c
 
   return MOZ_GTK_SUCCESS;
 }
 
 /* tab area*/
 static gint moz_gtk_tabpanels_paint(cairo_t* cr, GdkRectangle* rect,
                                     GtkWidgetState* state,
                                     GtkTextDirection direction) {
-  GtkStyleContext* style = GetStyleContext(MOZ_GTK_TABPANELS, state->scale,
-                                           direction);
+  GtkStyleContext* style =
+      GetStyleContext(MOZ_GTK_TABPANELS, state->scale, direction);
   gtk_render_background(style, cr, rect->x, rect->y, rect->width, rect->height);
   /*
    * The gap size is not needed in moz_gtk_tabpanels_paint because
    * the gap will be painted with the foreground tab in moz_gtk_tab_paint.
    *
    * However, if moz_gtk_tabpanels_paint just uses gtk_render_frame(),
    * the theme will think that there are no tabs and may draw something
    * different.Hence the trick of using two clip regions, and drawing the
@@ -2074,18 +2068,18 @@ static gint moz_gtk_menu_item_paint(Widg
   GtkStateFlags state_flags = GetStateFlagsFromGtkWidgetState(state);
 
   // GTK versions prior to 3.8 render the background and frame only when not
   // a separator and in hover prelight.
   if (minorVersion < 8 && (widget == MOZ_GTK_MENUSEPARATOR ||
                            !(state_flags & GTK_STATE_FLAG_PRELIGHT)))
     return MOZ_GTK_SUCCESS;
 
-  GtkStyleContext* style = GetStyleContext(widget, state->scale,
-                                           direction, state_flags);
+  GtkStyleContext* style =
+      GetStyleContext(widget, state->scale, direction, state_flags);
 
   if (minorVersion < 6) {
     // GTK+ 3.4 saves the style context and adds the menubar class to
     // menubar children, but does each of these only when drawing, not
     // during layout.
     gtk_style_context_save(style);
     if (widget == MOZ_GTK_MENUBARITEM) {
       gtk_style_context_add_class(style, GTK_STYLE_CLASS_MENUBAR);
@@ -2191,28 +2185,28 @@ static gint moz_gtk_info_bar_paint(cairo
   return MOZ_GTK_SUCCESS;
 }
 
 static gint moz_gtk_header_bar_paint(WidgetNodeType widgetType, cairo_t* cr,
                                      GdkRectangle* rect,
                                      GtkWidgetState* state) {
   GtkStateFlags state_flags = GetStateFlagsFromGtkWidgetState(state);
   GtkStyleContext* style =
-      GetStyleContext(widgetType, state->scale, GTK_TEXT_DIR_NONE,
-                      state_flags);
+      GetStyleContext(widgetType, state->scale, GTK_TEXT_DIR_NONE, state_flags);
 
 // Some themes (Adwaita for instance) draws bold dark line at
 // titlebar bottom. It does not fit well with Firefox tabs so
 // draw with some extent to make the titlebar bottom part invisible.
 #define TITLEBAR_EXTENT 4
 
   // We don't need to draw window decoration for MOZ_GTK_HEADER_BAR_MAXIMIZED,
   // i.e. when main window is maximized.
   if (widgetType == MOZ_GTK_HEADER_BAR) {
-    GtkStyleContext* windowStyle = GetStyleContext(MOZ_GTK_WINDOW, state->scale);
+    GtkStyleContext* windowStyle =
+        GetStyleContext(MOZ_GTK_WINDOW, state->scale);
     bool solidDecorations =
         gtk_style_context_has_class(windowStyle, "solid-csd");
     GtkStyleContext* decorationStyle =
         GetStyleContext(solidDecorations ? MOZ_GTK_WINDOW_DECORATION_SOLID
                                          : MOZ_GTK_WINDOW_DECORATION,
                         state->scale, GTK_TEXT_DIR_LTR, state_flags);
 
     gtk_render_background(decorationStyle, cr, rect->x, rect->y, rect->width,
@@ -2474,19 +2468,18 @@ gint moz_gtk_get_widget_border(WidgetNod
                              bottom);
   }
   return MOZ_GTK_SUCCESS;
 }
 
 gint moz_gtk_get_tab_border(gint* left, gint* top, gint* right, gint* bottom,
                             GtkTextDirection direction, GtkTabFlags flags,
                             WidgetNodeType widget) {
-  GtkStyleContext* style =
-      GetStyleContext(widget, 1, direction,
-      GetStateFlagsFromGtkTabFlags(flags));
+  GtkStyleContext* style = GetStyleContext(widget, 1, direction,
+                                           GetStateFlagsFromGtkTabFlags(flags));
 
   *left = *top = *right = *bottom = 0;
   moz_gtk_add_style_padding(style, left, top, right, bottom);
 
   // Gtk >= 3.20 does not use those styles
   if (gtk_check_version(3, 20, 0) != nullptr) {
     int tab_curvature;
 
@@ -2850,24 +2843,26 @@ static void InitScrollbarMetrics(Scrollb
    * the Gtk+ css rule looks like:
    *
    *    "scrollbar:hover contents trough slider"
    *
    *  So we need to apply GtkStateFlags to each widgets in style path.
    */
 
   // thumb
-  style = CreateStyleContextWithStates(thumb, 1, GTK_TEXT_DIR_NONE, aStateFlags);
+  style =
+      CreateStyleContextWithStates(thumb, 1, GTK_TEXT_DIR_NONE, aStateFlags);
   aMetrics->size.thumb = GetMinMarginBox(style);
   gtk_style_context_get_margin(style, gtk_style_context_get_state(style),
                                &aMetrics->margin.thumb);
   g_object_unref(style);
 
   // track
-  style = CreateStyleContextWithStates(track, 1, GTK_TEXT_DIR_NONE, aStateFlags);
+  style =
+      CreateStyleContextWithStates(track, 1, GTK_TEXT_DIR_NONE, aStateFlags);
   aMetrics->border.track = GetMarginBorderPadding(style);
   MozGtkSize trackMinSize = GetMinContentBox(style) + aMetrics->border.track;
   MozGtkSize trackSizeForThumb = aMetrics->size.thumb + aMetrics->border.track;
   g_object_unref(style);
 
   // button
   if (hasButtons) {
     style = CreateStyleContextWithStates(MOZ_GTK_SCROLLBAR_BUTTON, 1,
@@ -3110,19 +3105,19 @@ gint moz_gtk_widget_paint(WidgetNodeType
           cr, rect, state, (GtkArrowType)flags, direction);
       break;
     case MOZ_GTK_TREEVIEW_EXPANDER:
       return moz_gtk_treeview_expander_paint(
           cr, rect, state, (GtkExpanderStyle)flags, direction);
       break;
     case MOZ_GTK_ENTRY:
     case MOZ_GTK_DROPDOWN_ENTRY: {
-      GtkStyleContext* style = GetStyleContext(
-          widget, state->scale, direction,
-          GetStateFlagsFromGtkWidgetState(state));
+      GtkStyleContext* style =
+          GetStyleContext(widget, state->scale, direction,
+                          GetStateFlagsFromGtkWidgetState(state));
       gint ret = moz_gtk_entry_paint(cr, rect, state, style, widget);
       return ret;
     }
     case MOZ_GTK_TEXT_VIEW:
       return moz_gtk_text_view_paint(cr, rect, state, direction);
       break;
     case MOZ_GTK_DROPDOWN:
       return moz_gtk_combo_box_paint(cr, rect, state, direction);
--- a/widget/gtk/nsNativeThemeGTK.cpp
+++ b/widget/gtk/nsNativeThemeGTK.cpp
@@ -791,17 +791,17 @@ bool nsNativeThemeGTK::GetGtkWidgetAndSt
   }
 
   return true;
 }
 
 class SystemCairoClipper : public ClipExporter {
  public:
   explicit SystemCairoClipper(cairo_t* aContext, gint aScaleFactor = 1)
-    : mContext(aContext), mScaleFactor(aScaleFactor) {}
+      : mContext(aContext), mScaleFactor(aScaleFactor) {}
 
   void BeginClip(const Matrix& aTransform) override {
     cairo_matrix_t mat;
     GfxMatrixToCairoMatrix(aTransform, mat);
     cairo_set_matrix(mContext, &mat);
 
     cairo_new_path(mContext);
   }
@@ -813,18 +813,17 @@ class SystemCairoClipper : public ClipEx
 
   void LineTo(const Point& aPoint) override {
     cairo_line_to(mContext, aPoint.x / mScaleFactor, aPoint.y / mScaleFactor);
     mCurrentPoint = aPoint;
   }
 
   void BezierTo(const Point& aCP1, const Point& aCP2,
                 const Point& aCP3) override {
-    cairo_curve_to(mContext,
-                   aCP1.x / mScaleFactor, aCP1.y / mScaleFactor,
+    cairo_curve_to(mContext, aCP1.x / mScaleFactor, aCP1.y / mScaleFactor,
                    aCP2.x / mScaleFactor, aCP2.y / mScaleFactor,
                    aCP3.x / mScaleFactor, aCP3.y / mScaleFactor);
     mCurrentPoint = aCP3;
   }
 
   void QuadraticBezierTo(const Point& aCP1, const Point& aCP2) override {
     Point CP0 = CurrentPoint();
     Point CP1 = (CP0 + aCP1 * 2.0) / 3.0;
@@ -846,50 +845,49 @@ class SystemCairoClipper : public ClipEx
 
   void EndClip() override { cairo_clip(mContext); }
 
   Point CurrentPoint() const override { return mCurrentPoint; }
 
  private:
   cairo_t* mContext;
   Point mCurrentPoint;
-  gint  mScaleFactor;
+  gint mScaleFactor;
 };
 
 static void DrawThemeWithCairo(gfxContext* aContext, DrawTarget* aDrawTarget,
                                GtkWidgetState aState,
                                WidgetNodeType aGTKWidgetType, gint aFlags,
                                GtkTextDirection aDirection, gint aScaleFactor,
                                bool aSnapped, const Point& aDrawOrigin,
                                const nsIntSize& aDrawSize,
                                GdkRectangle& aGDKRect,
                                nsITheme::Transparency aTransparency) {
   bool isX11Display = GDK_IS_X11_DISPLAY(gdk_display_get_default());
   static auto sCairoSurfaceSetDeviceScalePtr =
-      (void (*)(cairo_surface_t *, double, double))dlsym(
-            RTLD_DEFAULT, "cairo_surface_set_device_scale");
+      (void (*)(cairo_surface_t*, double, double))dlsym(
+          RTLD_DEFAULT, "cairo_surface_set_device_scale");
   // Support HiDPI widget styles on Wayland only for now.
-  bool useHiDPIWidgets = !isX11Display &&
-                         (aScaleFactor != 1) &&
+  bool useHiDPIWidgets = !isX11Display && (aScaleFactor != 1) &&
                          (sCairoSurfaceSetDeviceScalePtr != nullptr);
 
   Point drawOffsetScaled;
   Point drawOffsetOriginal;
   Matrix transform;
   if (!aSnapped) {
     // If we are not snapped, we depend on the DT for translation.
     drawOffsetOriginal = aDrawOrigin;
-    drawOffsetScaled = useHiDPIWidgets ? drawOffsetOriginal / aScaleFactor :
-                                         drawOffsetOriginal;
+    drawOffsetScaled = useHiDPIWidgets ? drawOffsetOriginal / aScaleFactor
+                                       : drawOffsetOriginal;
     transform = aDrawTarget->GetTransform().PreTranslate(drawOffsetScaled);
   } else {
     // Otherwise, we only need to take the device offset into account.
     drawOffsetOriginal = aDrawOrigin - aContext->GetDeviceOffset();
-    drawOffsetScaled = useHiDPIWidgets ? drawOffsetOriginal / aScaleFactor :
-                                         drawOffsetOriginal;
+    drawOffsetScaled = useHiDPIWidgets ? drawOffsetOriginal / aScaleFactor
+                                       : drawOffsetOriginal;
     transform = Matrix::Translation(drawOffsetScaled);
   }
 
   if (!useHiDPIWidgets && aScaleFactor != 1) {
     transform.PreScale(aScaleFactor, aScaleFactor);
   }
 
   cairo_matrix_t mat;
@@ -912,20 +910,19 @@ static void DrawThemeWithCairo(gfxContex
       if (borrow.GetXRenderFormat()) {
         surf = cairo_xlib_surface_create_with_xrender_format(
             borrow.GetDisplay(), borrow.GetDrawable(), borrow.GetScreen(),
             borrow.GetXRenderFormat(), size.width, size.height);
       } else {
 #  else
       if (!borrow.GetXRenderFormat()) {
 #  endif
-        surf = cairo_xlib_surface_create(borrow.GetDisplay(),
-                                         borrow.GetDrawable(),
-                                         borrow.GetVisual(),
-                                         size.width, size.height);
+        surf = cairo_xlib_surface_create(
+            borrow.GetDisplay(), borrow.GetDrawable(), borrow.GetVisual(),
+            size.width, size.height);
       }
       if (!NS_WARN_IF(!surf)) {
         Point offset = borrow.GetOffset();
         if (offset != Point()) {
           cairo_surface_set_device_offset(surf, offset.x, offset.y);
         }
         cairo_t* cr = cairo_create(surf);
         if (!NS_WARN_IF(!cr)) {
@@ -967,17 +964,17 @@ static void DrawThemeWithCairo(gfxContex
         sCairoSurfaceSetDeviceScalePtr(surf, aScaleFactor, aScaleFactor);
       }
       if (origin != IntPoint()) {
         cairo_surface_set_device_offset(surf, -origin.x, -origin.y);
       }
       cairo_t* cr = cairo_create(surf);
       if (!NS_WARN_IF(!cr)) {
         RefPtr<SystemCairoClipper> clipper =
-          new SystemCairoClipper(cr, useHiDPIWidgets ? aScaleFactor : 1);
+            new SystemCairoClipper(cr, useHiDPIWidgets ? aScaleFactor : 1);
         aContext->ExportClip(*clipper);
 
         cairo_set_matrix(cr, &mat);
 
         cairo_new_path(cr);
         cairo_rectangle(cr, 0, 0, clipSize.width, clipSize.height);
         cairo_clip(cr);
 
@@ -1023,23 +1020,22 @@ static void DrawThemeWithCairo(gfxContex
 
       // Unmap the surface before using it as a source
       dataSurface->Unmap();
 
       if (cr) {
         // The widget either needs to be masked or has transparency, so use the
         // slower drawing path.
         aDrawTarget->DrawSurface(
-          dataSurface,
-          Rect(aSnapped
-                 ? drawOffsetOriginal -
-                    aDrawTarget->GetTransform().GetTranslation()
-                 : drawOffsetOriginal,
-               Size(aDrawSize)),
-          Rect(0, 0, aDrawSize.width, aDrawSize.height));
+            dataSurface,
+            Rect(aSnapped ? drawOffsetOriginal -
+                                aDrawTarget->GetTransform().GetTranslation()
+                          : drawOffsetOriginal,
+                 Size(aDrawSize)),
+            Rect(0, 0, aDrawSize.width, aDrawSize.height));
         cairo_destroy(cr);
       }
 
       if (surf) {
         cairo_surface_destroy(surf);
       }
     }
   }