Merge mozilla-central to autoland. a=merge
authorCosmin Sabou <csabou@mozilla.com>
Sat, 19 Jan 2019 12:10:17 +0200
changeset 514586 1dc975db382c545cc8c05cc10214446af0963d34
parent 514585 1342b278cd2d47f74014b3676fe82069b3dcf3b5 (current diff)
parent 514582 f90bab5af97efa714181eea7fad45cf8cf14e3ea (diff)
child 514587 ad12ab81d5700ffbbb900eba3c9079d258c58dbc
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Merge mozilla-central to autoland. a=merge
dom/chrome-webidl/XULScrollElement.webidl
dom/xul/XULScrollElement.cpp
dom/xul/XULScrollElement.h
layout/painting/nsDisplayList.cpp
testing/web-platform/meta/css/css-scroll-anchoring/start-edge-in-block-layout-direction.html.ini
toolkit/themes/osx/global/arrow/arrow-dn-dis.png
toolkit/themes/osx/global/arrow/arrow-dn.png
--- a/.clang-format
+++ b/.clang-format
@@ -19,8 +19,9 @@ NS_IMPL_CYCLE_COLLECTION_.*_END|\
 NS_INTERFACE_TABLE_END|\
 NS_INTERFACE_TABLE_TAIL.*|\
 NS_INTERFACE_MAP_END_.*|\
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END_INHERITED|\
 NS_IMPL_CYCLE_COLLECTION_UNLINK_END_INHERITED|\
 NS_QUERYFRAME_TAIL.*$"
 
 SortIncludes: false
+IndentPPDirectives: AfterHash
--- a/.taskcluster.yml
+++ b/.taskcluster.yml
@@ -33,20 +33,17 @@ tasks:
             - $if: 'tasks_for == "hg-push"'
               then:
                 name: "Gecko Decision Task"
                 description: 'The task that creates all of the other tasks in the task graph'
               else:
                 $if: 'tasks_for == "action"'
                 then:
                   name: "Action: ${action.title}"
-                  description: |
-                      ${action.description}
-                      
-                      Action triggered by clientID `${clientId}`
+                  description: '${action.description}'
                 else:
                   name: "Decision Task for cron job ${cron.job_name}"
                   description: 'Created by a [cron task](https://tools.taskcluster.net/tasks/${cron.task_id})'
 
         provisionerId: "aws-provisioner-v1"
         workerType: "gecko-${repository.level}-decision"
 
         tags:
--- a/accessible/android/SessionAccessibility.cpp
+++ b/accessible/android/SessionAccessibility.cpp
@@ -15,23 +15,23 @@
 #include "nsViewManager.h"
 #include "nsIPersistentProperties2.h"
 
 #include "mozilla/dom/TabParent.h"
 #include "mozilla/a11y/DocAccessibleParent.h"
 #include "mozilla/a11y/DocManager.h"
 
 #ifdef DEBUG
-#include <android/log.h>
-#define AALOG(args...) \
-  __android_log_print(ANDROID_LOG_INFO, "GeckoAccessibilityNative", ##args)
+#  include <android/log.h>
+#  define AALOG(args...) \
+    __android_log_print(ANDROID_LOG_INFO, "GeckoAccessibilityNative", ##args)
 #else
-#define AALOG(args...) \
-  do {                 \
-  } while (0)
+#  define AALOG(args...) \
+    do {                 \
+    } while (0)
 #endif
 
 template <>
 const char nsWindow::NativePtr<mozilla::a11y::SessionAccessibility>::sName[] =
     "SessionAccessibility";
 
 using namespace mozilla::a11y;
 
--- a/accessible/atk/Platform.cpp
+++ b/accessible/atk/Platform.cpp
@@ -10,17 +10,17 @@
 #include "nsIGConfService.h"
 #include "nsIServiceManager.h"
 #include "nsMai.h"
 #include "AtkSocketAccessible.h"
 #include "prenv.h"
 #include "prlink.h"
 
 #ifdef MOZ_ENABLE_DBUS
-#include <dbus/dbus.h>
+#  include <dbus/dbus.h>
 #endif
 #include <gtk/gtk.h>
 
 #ifdef MOZ_WIDGET_GTK
 extern "C" __attribute__((weak, visibility("default"))) int
 atk_bridge_adaptor_init(int*, char**[]);
 #endif
 
--- a/accessible/base/AccIterator.cpp
+++ b/accessible/base/AccIterator.cpp
@@ -1,17 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "AccIterator.h"
 
 #include "AccGroupInfo.h"
 #ifdef MOZ_XUL
-#include "XULTreeAccessible.h"
+#  include "XULTreeAccessible.h"
 #endif
 
 #include "mozilla/dom/HTMLLabelElement.h"
 
 using namespace mozilla;
 using namespace mozilla::a11y;
 
 ////////////////////////////////////////////////////////////////////////////////
--- a/accessible/base/DocManager.cpp
+++ b/accessible/base/DocManager.cpp
@@ -12,17 +12,17 @@
 #include "DocAccessibleChild.h"
 #include "DocAccessibleParent.h"
 #include "nsAccessibilityService.h"
 #include "Platform.h"
 #include "RootAccessibleWrap.h"
 #include "xpcAccessibleDocument.h"
 
 #ifdef A11Y_LOG
-#include "Logging.h"
+#  include "Logging.h"
 #endif
 
 #include "mozilla/EventListenerManager.h"
 #include "mozilla/dom/Event.h"  // for Event
 #include "nsContentUtils.h"
 #include "nsCURILoader.h"
 #include "nsDocShellLoadTypes.h"
 #include "nsIChannel.h"
--- a/accessible/base/EventQueue.cpp
+++ b/accessible/base/EventQueue.cpp
@@ -7,17 +7,17 @@
 
 #include "Accessible-inl.h"
 #include "nsEventShell.h"
 #include "DocAccessible.h"
 #include "DocAccessibleChild.h"
 #include "nsAccessibilityService.h"
 #include "nsTextEquivUtils.h"
 #ifdef A11Y_LOG
-#include "Logging.h"
+#  include "Logging.h"
 #endif
 
 using namespace mozilla;
 using namespace mozilla::a11y;
 
 // Defines the number of selection add/remove events in the queue when they
 // aren't packed into single selection within event.
 const unsigned int kSelChangeCountToPack = 5;
--- a/accessible/base/EventTree.cpp
+++ b/accessible/base/EventTree.cpp
@@ -6,17 +6,17 @@
 #include "EventTree.h"
 
 #include "Accessible-inl.h"
 #include "EmbeddedObjCollector.h"
 #include "NotificationController.h"
 #include "nsEventShell.h"
 #include "DocAccessible.h"
 #ifdef A11Y_LOG
-#include "Logging.h"
+#  include "Logging.h"
 #endif
 
 #include "mozilla/UniquePtr.h"
 
 using namespace mozilla;
 using namespace mozilla::a11y;
 
 ////////////////////////////////////////////////////////////////////////////////
--- a/accessible/base/NotificationController.h
+++ b/accessible/base/NotificationController.h
@@ -11,17 +11,17 @@
 
 #include "mozilla/Tuple.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsRefreshDriver.h"
 
 #include <utility>
 
 #ifdef A11Y_LOG
-#include "Logging.h"
+#  include "Logging.h"
 #endif
 
 namespace mozilla {
 namespace a11y {
 
 class DocAccessible;
 
 /**
--- a/accessible/base/Platform.h
+++ b/accessible/base/Platform.h
@@ -6,18 +6,18 @@
 
 #ifndef mozilla_a11y_Platform_h
 #define mozilla_a11y_Platform_h
 
 #include <stdint.h>
 #include "nsStringFwd.h"
 
 #if defined(ANDROID)
-#include "nsTArray.h"
-#include "nsRect.h"
+#  include "nsTArray.h"
+#  include "nsRect.h"
 #endif
 
 namespace mozilla {
 namespace a11y {
 
 class ProxyAccessible;
 
 enum EPlatformDisabledState {
--- a/accessible/base/nsAccessibilityService.cpp
+++ b/accessible/base/nsAccessibilityService.cpp
@@ -25,38 +25,38 @@
 #include "nsAttrName.h"
 #include "nsDOMTokenList.h"
 #include "nsEventShell.h"
 #include "nsIURI.h"
 #include "nsTextFormatter.h"
 #include "OuterDocAccessible.h"
 #include "Role.h"
 #ifdef MOZ_ACCESSIBILITY_ATK
-#include "RootAccessibleWrap.h"
+#  include "RootAccessibleWrap.h"
 #endif
 #include "States.h"
 #include "Statistics.h"
 #include "TextLeafAccessibleWrap.h"
 #include "TreeWalker.h"
 #include "xpcAccessibleApplication.h"
 #include "xpcAccessibleDocument.h"
 
 #ifdef MOZ_ACCESSIBILITY_ATK
-#include "AtkSocketAccessible.h"
+#  include "AtkSocketAccessible.h"
 #endif
 
 #ifdef XP_WIN
-#include "mozilla/a11y/Compatibility.h"
-#include "mozilla/dom/ContentChild.h"
-#include "HTMLWin32ObjectAccessible.h"
-#include "mozilla/StaticPtr.h"
+#  include "mozilla/a11y/Compatibility.h"
+#  include "mozilla/dom/ContentChild.h"
+#  include "HTMLWin32ObjectAccessible.h"
+#  include "mozilla/StaticPtr.h"
 #endif
 
 #ifdef A11Y_LOG
-#include "Logging.h"
+#  include "Logging.h"
 #endif
 
 #include "nsExceptionHandler.h"
 #include "nsImageFrame.h"
 #include "nsINamed.h"
 #include "nsIObserverService.h"
 #include "nsLayoutUtils.h"
 #include "nsPluginFrame.h"
@@ -70,28 +70,28 @@
 #include "mozilla/dom/DOMStringList.h"
 #include "mozilla/dom/EventTarget.h"
 #include "mozilla/dom/HTMLTableElement.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/Services.h"
 #include "nsDeckFrame.h"
 
 #ifdef MOZ_XUL
-#include "XULAlertAccessible.h"
-#include "XULComboboxAccessible.h"
-#include "XULElementAccessibles.h"
-#include "XULFormControlAccessible.h"
-#include "XULListboxAccessibleWrap.h"
-#include "XULMenuAccessibleWrap.h"
-#include "XULTabAccessible.h"
-#include "XULTreeGridAccessibleWrap.h"
+#  include "XULAlertAccessible.h"
+#  include "XULComboboxAccessible.h"
+#  include "XULElementAccessibles.h"
+#  include "XULFormControlAccessible.h"
+#  include "XULListboxAccessibleWrap.h"
+#  include "XULMenuAccessibleWrap.h"
+#  include "XULTabAccessible.h"
+#  include "XULTreeGridAccessibleWrap.h"
 #endif
 
 #if defined(XP_WIN) || defined(MOZ_ACCESSIBILITY_ATK)
-#include "nsNPAPIPluginInstance.h"
+#  include "nsNPAPIPluginInstance.h"
 #endif
 
 using namespace mozilla;
 using namespace mozilla::a11y;
 using namespace mozilla::dom;
 
 /**
  * Accessibility service force enable/disable preference.
@@ -143,26 +143,26 @@ static bool MustBeAccessible(nsIContent*
   return false;
 }
 
 /**
  * Used by XULMap.h to map both menupopup and popup elements
  */
 #ifdef MOZ_XUL
 Accessible* CreateMenupopupAccessible(Element* aElement, Accessible* aContext) {
-#ifdef MOZ_ACCESSIBILITY_ATK
+#  ifdef MOZ_ACCESSIBILITY_ATK
   // ATK considers this node to be redundant when within menubars, and it makes
   // menu navigation with assistive technologies more difficult
   // XXX In the future we will should this for consistency across the
   // nsIAccessible implementations on each platform for a consistent scripting
   // environment, but then strip out redundant accessibles in the AccessibleWrap
   // class for each platform.
   nsIContent* parent = aElement->GetParent();
   if (parent && parent->IsXULElement(nsGkAtoms::menu)) return nullptr;
-#endif
+#  endif
 
   return new XULMenupopupAccessible(aElement, aContext->Document());
 }
 #endif
 
 ////////////////////////////////////////////////////////////////////////////////
 // Accessible constructors
 
@@ -207,29 +207,29 @@ static int32_t sPlatformDisabledState = 
 
 static const HTMLMarkupMapInfo sHTMLMarkupMapList[] = {
 #include "MarkupMap.h"
 };
 
 #undef MARKUPMAP
 
 #ifdef MOZ_XUL
-#define XULMAP(atom, ...) {nsGkAtoms::atom, __VA_ARGS__},
+#  define XULMAP(atom, ...) {nsGkAtoms::atom, __VA_ARGS__},
 
-#define XULMAP_TYPE(atom, new_type)                                         \
-  XULMAP(atom, [](Element* aElement, Accessible* aContext) -> Accessible* { \
-    return new new_type(aElement, aContext->Document());                    \
-  })
+#  define XULMAP_TYPE(atom, new_type)                                         \
+    XULMAP(atom, [](Element* aElement, Accessible* aContext) -> Accessible* { \
+      return new new_type(aElement, aContext->Document());                    \
+    })
 
 static const XULMarkupMapInfo sXULMarkupMapList[] = {
-#include "XULMap.h"
+#  include "XULMap.h"
 };
 
-#undef XULMAP_TYPE
-#undef XULMAP
+#  undef XULMAP_TYPE
+#  undef XULMAP
 #endif
 
 #undef Attr
 #undef AttrFromDOM
 #undef AttrFromDOMIf
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsAccessibilityService
@@ -401,17 +401,17 @@ already_AddRefed<Accessible> nsAccessibi
     nsPluginFrame* aFrame, nsIContent* aContent, Accessible* aContext) {
   // nsPluginFrame means a plugin, so we need to use the accessibility support
   // of the plugin.
   if (aFrame->GetRect().IsEmpty()) return nullptr;
 
 #if defined(XP_WIN) || defined(MOZ_ACCESSIBILITY_ATK)
   RefPtr<nsNPAPIPluginInstance> pluginInstance = aFrame->GetPluginInstance();
   if (pluginInstance) {
-#ifdef XP_WIN
+#  ifdef XP_WIN
     if (!sPendingPlugins->Contains(aContent) &&
         (Preferences::GetBool("accessibility.delay_plugins") ||
          Compatibility::IsJAWS() || Compatibility::IsWE())) {
       RefPtr<PluginTimerCallBack> cb = new PluginTimerCallBack(aContent);
       nsCOMPtr<nsITimer> timer;
       NS_NewTimerWithCallback(
           getter_AddRefs(timer), cb,
           Preferences::GetUint("accessibility.delay_plugin_time"),
@@ -429,31 +429,31 @@ already_AddRefed<Accessible> nsAccessibi
     // Note: pluginPort will be null if windowless.
     HWND pluginPort = nullptr;
     aFrame->GetPluginPort(&pluginPort);
 
     RefPtr<Accessible> accessible = new HTMLWin32ObjectOwnerAccessible(
         aContent, aContext->Document(), pluginPort);
     return accessible.forget();
 
-#elif MOZ_ACCESSIBILITY_ATK
+#  elif MOZ_ACCESSIBILITY_ATK
     if (!AtkSocketAccessible::gCanEmbed) return nullptr;
 
     // Note this calls into the plugin, so crazy things may happen and aFrame
     // may go away.
     nsCString plugId;
     nsresult rv = pluginInstance->GetValueFromPlugin(
         NPPVpluginNativeAccessibleAtkPlugId, &plugId);
     if (NS_SUCCEEDED(rv) && !plugId.IsEmpty()) {
       RefPtr<AtkSocketAccessible> socketAccessible =
           new AtkSocketAccessible(aContent, aContext->Document(), plugId);
 
       return socketAccessible.forget();
     }
-#endif
+#  endif
   }
 #endif
 
   return nullptr;
 }
 
 void nsAccessibilityService::DeckPanelSwitched(nsIPresShell* aPresShell,
                                                nsIContent* aDeckNode,
--- a/accessible/base/nsCoreUtils.cpp
+++ b/accessible/base/nsCoreUtils.cpp
@@ -58,18 +58,18 @@ bool nsCoreUtils::HasClickListener(nsICo
       aContent->GetExistingListenerManager();
 
   return listenerManager &&
          (listenerManager->HasListenersFor(nsGkAtoms::onclick) ||
           listenerManager->HasListenersFor(nsGkAtoms::onmousedown) ||
           listenerManager->HasListenersFor(nsGkAtoms::onmouseup));
 }
 
-void nsCoreUtils::DispatchClickEvent(XULTreeElement *aTree,
-                                     int32_t aRowIndex, nsTreeColumn *aColumn,
+void nsCoreUtils::DispatchClickEvent(XULTreeElement *aTree, int32_t aRowIndex,
+                                     nsTreeColumn *aColumn,
                                      const nsAString &aPseudoElt) {
   RefPtr<dom::Element> tcElm = aTree->GetTreeBody();
   if (!tcElm) return;
 
   Document *document = tcElm->GetUncomposedDoc();
   if (!document) return;
 
   nsCOMPtr<nsIPresShell> presShell = document->GetShell();
--- a/accessible/generic/Accessible-inl.h
+++ b/accessible/generic/Accessible-inl.h
@@ -7,17 +7,17 @@
 #ifndef mozilla_a11y_Accessible_inl_h_
 #define mozilla_a11y_Accessible_inl_h_
 
 #include "DocAccessible.h"
 #include "ARIAMap.h"
 #include "nsCoreUtils.h"
 
 #ifdef A11Y_LOG
-#include "Logging.h"
+#  include "Logging.h"
 #endif
 
 namespace mozilla {
 namespace a11y {
 
 inline mozilla::a11y::role Accessible::Role() const {
   const nsRoleMapEntry* roleMapEntry = ARIARoleMap();
   if (!roleMapEntry || roleMapEntry->roleRule != kUseMapRole)
--- a/accessible/generic/DocAccessible-inl.h
+++ b/accessible/generic/DocAccessible-inl.h
@@ -11,17 +11,17 @@
 #include "nsAccessibilityService.h"
 #include "nsAccessiblePivot.h"
 #include "NotificationController.h"
 #include "States.h"
 #include "nsIScrollableFrame.h"
 #include "mozilla/dom/DocumentInlines.h"
 
 #ifdef A11Y_LOG
-#include "Logging.h"
+#  include "Logging.h"
 #endif
 
 namespace mozilla {
 namespace a11y {
 
 inline Accessible* DocAccessible::AccessibleOrTrueContainer(
     nsINode* aNode, int aIgnoreARIAHidden) const {
   // HTML comboboxes have no-content list accessible as an intermediate
--- a/accessible/generic/OuterDocAccessible.cpp
+++ b/accessible/generic/OuterDocAccessible.cpp
@@ -9,17 +9,17 @@
 #include "nsAccUtils.h"
 #include "DocAccessible-inl.h"
 #include "mozilla/a11y/DocAccessibleParent.h"
 #include "mozilla/dom/TabParent.h"
 #include "Role.h"
 #include "States.h"
 
 #ifdef A11Y_LOG
-#include "Logging.h"
+#  include "Logging.h"
 #endif
 
 using namespace mozilla;
 using namespace mozilla::a11y;
 
 ////////////////////////////////////////////////////////////////////////////////
 // OuterDocAccessible
 ////////////////////////////////////////////////////////////////////////////////
--- a/accessible/generic/RootAccessible.cpp
+++ b/accessible/generic/RootAccessible.cpp
@@ -14,17 +14,17 @@
 #include "nsAccessibilityService.h"
 #include "nsAccUtils.h"
 #include "nsCoreUtils.h"
 #include "nsEventShell.h"
 #include "Relation.h"
 #include "Role.h"
 #include "States.h"
 #ifdef MOZ_XUL
-#include "XULTreeAccessible.h"
+#  include "XULTreeAccessible.h"
 #endif
 
 #include "mozilla/dom/BindingUtils.h"
 #include "mozilla/dom/CustomEvent.h"
 #include "mozilla/dom/Element.h"
 #include "mozilla/dom/ScriptSettings.h"
 
 #include "nsIDocShellTreeItem.h"
@@ -38,17 +38,17 @@
 #include "nsIServiceManager.h"
 #include "nsPIDOMWindow.h"
 #include "nsIWebBrowserChrome.h"
 #include "nsReadableUtils.h"
 #include "nsFocusManager.h"
 #include "nsGlobalWindow.h"
 
 #ifdef MOZ_XUL
-#include "nsIXULWindow.h"
+#  include "nsIXULWindow.h"
 #endif
 
 using namespace mozilla;
 using namespace mozilla::a11y;
 using namespace mozilla::dom;
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsISupports
--- a/accessible/generic/TableAccessible.cpp
+++ b/accessible/generic/TableAccessible.cpp
@@ -22,26 +22,26 @@ bool TableAccessible::IsProbablyLayoutTa
   // a couple cells  at the beginning or end of a row/col, and especially when
   // they occur at the edge of a table?
 
   // XXX For now debugging descriptions are always on via SHOW_LAYOUT_HEURISTIC
   // This will allow release trunk builds to be used by testers to refine
   // the algorithm. Integrate it into Logging.
   // Change to |#define SHOW_LAYOUT_HEURISTIC DEBUG| before final release
 #ifdef SHOW_LAYOUT_HEURISTIC
-#define RETURN_LAYOUT_ANSWER(isLayout, heuristic)                          \
-  {                                                                        \
-    mLayoutHeuristic = isLayout                                            \
-                           ? NS_LITERAL_STRING("layout table: " heuristic) \
-                           : NS_LITERAL_STRING("data table: " heuristic);  \
-    return isLayout;                                                       \
-  }
+#  define RETURN_LAYOUT_ANSWER(isLayout, heuristic)                          \
+    {                                                                        \
+      mLayoutHeuristic = isLayout                                            \
+                             ? NS_LITERAL_STRING("layout table: " heuristic) \
+                             : NS_LITERAL_STRING("data table: " heuristic);  \
+      return isLayout;                                                       \
+    }
 #else
-#define RETURN_LAYOUT_ANSWER(isLayout, heuristic) \
-  { return isLayout; }
+#  define RETURN_LAYOUT_ANSWER(isLayout, heuristic) \
+    { return isLayout; }
 #endif
 
   Accessible* thisacc = AsAccessible();
 
   // Need to see all elements while document is being edited.
   if (thisacc->Document()->State() & states::EDITABLE) {
     RETURN_LAYOUT_ANSWER(false, "In editable document");
   }
--- a/accessible/ipc/DocAccessibleParent.cpp
+++ b/accessible/ipc/DocAccessibleParent.cpp
@@ -8,22 +8,22 @@
 #include "mozilla/a11y/Platform.h"
 #include "mozilla/dom/TabParent.h"
 #include "xpcAccessibleDocument.h"
 #include "xpcAccEvents.h"
 #include "nsAccUtils.h"
 #include "nsCoreUtils.h"
 
 #if defined(XP_WIN)
-#include "AccessibleWrap.h"
-#include "Compatibility.h"
-#include "mozilla/mscom/PassthruProxy.h"
-#include "mozilla/mscom/Ptr.h"
-#include "nsWinUtils.h"
-#include "RootAccessible.h"
+#  include "AccessibleWrap.h"
+#  include "Compatibility.h"
+#  include "mozilla/mscom/PassthruProxy.h"
+#  include "mozilla/mscom/Ptr.h"
+#  include "nsWinUtils.h"
+#  include "RootAccessible.h"
 #endif
 
 namespace mozilla {
 namespace a11y {
 uint64_t DocAccessibleParent::sMaxDocID = 0;
 
 mozilla::ipc::IPCResult DocAccessibleParent::RecvShowEvent(
     const ShowEventData& aData, const bool& aFromUser) {
@@ -697,31 +697,31 @@ void DocAccessibleParent::SendParentCOMP
       mscom::PassthruProxy::Wrap<IDispatch>(WrapNotNull(nativeAcc)));
 
   IDispatchHolder::COMPtrType ptr(mscom::ToProxyUniquePtr(std::move(wrapped)));
   IDispatchHolder holder(std::move(ptr));
   if (!PDocAccessibleParent::SendParentCOMProxy(holder)) {
     return;
   }
 
-#if defined(MOZ_CONTENT_SANDBOX)
+#  if defined(MOZ_CONTENT_SANDBOX)
   mParentProxyStream = holder.GetPreservedStream();
-#endif  // defined(MOZ_CONTENT_SANDBOX)
+#  endif  // defined(MOZ_CONTENT_SANDBOX)
 }
 
 void DocAccessibleParent::SetEmulatedWindowHandle(HWND aWindowHandle) {
   if (!aWindowHandle && mEmulatedWindowHandle && IsTopLevel()) {
     ::DestroyWindow(mEmulatedWindowHandle);
   }
   mEmulatedWindowHandle = aWindowHandle;
 }
 
 mozilla::ipc::IPCResult DocAccessibleParent::RecvGetWindowedPluginIAccessible(
     const WindowsHandle& aHwnd, IAccessibleHolder* aPluginCOMProxy) {
-#if defined(MOZ_CONTENT_SANDBOX)
+#  if defined(MOZ_CONTENT_SANDBOX)
   // We don't actually want the accessible object for aHwnd, but rather the
   // one that belongs to its child (see HTMLWin32ObjectAccessible).
   HWND childWnd = ::GetWindow(reinterpret_cast<HWND>(aHwnd), GW_CHILD);
   if (!childWnd) {
     // We're seeing this in the wild - the plugin is windowed but we no longer
     // have a window.
     return IPC_OK();
   }
@@ -733,19 +733,19 @@ mozilla::ipc::IPCResult DocAccessiblePar
     // This might happen if the plugin doesn't handle WM_GETOBJECT properly.
     // We should not consider that a failure.
     return IPC_OK();
   }
 
   aPluginCOMProxy->Set(IAccessibleHolder::COMPtrType(rawAccPlugin));
 
   return IPC_OK();
-#else
+#  else
   return IPC_FAIL(this, "Message unsupported in this build configuration");
-#endif
+#  endif
 }
 
 mozilla::ipc::IPCResult DocAccessibleParent::RecvFocusEvent(
     const uint64_t& aID, const LayoutDeviceIntRect& aCaretRect) {
   if (mShutdown) {
     return IPC_OK();
   }
 
@@ -774,26 +774,26 @@ mozilla::ipc::IPCResult DocAccessiblePar
 
 #endif  // defined(XP_WIN)
 
 #if !defined(XP_WIN)
 mozilla::ipc::IPCResult DocAccessibleParent::RecvBatch(
     const uint64_t& aBatchType, nsTArray<BatchData>&& aData) {
   // Only do something in Android. We can't ifdef the entire protocol out in
   // the ipdl because it doesn't allow preprocessing.
-#if defined(ANDROID)
+#  if defined(ANDROID)
   nsTArray<ProxyAccessible*> proxies(aData.Length());
   for (size_t i = 0; i < aData.Length(); i++) {
     DocAccessibleParent* doc = static_cast<DocAccessibleParent*>(
         aData.ElementAt(i).Document().get_PDocAccessibleParent());
     MOZ_ASSERT(doc);
     ProxyAccessible* proxy = doc->GetAccessible(aData.ElementAt(i).ID());
     MOZ_ASSERT(proxy);
     proxies.AppendElement(proxy);
   }
   ProxyBatch(this, aBatchType, proxies, aData);
-#endif  // defined(XP_WIN)
+#  endif  // defined(XP_WIN)
   return IPC_OK();
 }
 #endif  // !defined(XP_WIN)
 
 }  // namespace a11y
 }  // namespace mozilla
--- a/accessible/ipc/DocAccessibleParent.h
+++ b/accessible/ipc/DocAccessibleParent.h
@@ -246,20 +246,20 @@ class DocAccessibleParent : public Proxy
 
   nsTArray<uint64_t> mChildDocs;
   uint64_t mParentDoc;
 
 #if defined(XP_WIN)
   // The handle associated with the emulated window that contains this document
   HWND mEmulatedWindowHandle;
 
-#if defined(MOZ_CONTENT_SANDBOX)
+#  if defined(MOZ_CONTENT_SANDBOX)
   mscom::PreservedStreamPtr mParentProxyStream;
-#endif  // defined(MOZ_CONTENT_SANDBOX)
-#endif  // defined(XP_WIN)
+#  endif  // defined(MOZ_CONTENT_SANDBOX)
+#endif    // defined(XP_WIN)
 
   /*
    * Conceptually this is a map from IDs to proxies, but we store the ID in the
    * proxy object so we can't use a real map.
    */
   nsTHashtable<ProxyEntry> mAccessibles;
   uint64_t mActorID;
   bool mTopLevel;
--- a/accessible/ipc/IPCTypes.h
+++ b/accessible/ipc/IPCTypes.h
@@ -3,17 +3,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_a11y_IPCTypes_h
 #define mozilla_a11y_IPCTypes_h
 
 #ifdef ACCESSIBILITY
-#include "mozilla/a11y/Role.h"
+#  include "mozilla/a11y/Role.h"
 
 namespace IPC {
 
 template <>
 struct ParamTraits<mozilla::a11y::role>
     : public ContiguousEnumSerializerInclusive<mozilla::a11y::role,
                                                mozilla::a11y::role::NOTHING,
                                                mozilla::a11y::role::LAST_ROLE> {
@@ -31,35 +31,35 @@ typedef uint32_t role;
 /**
  * Since IPDL does not support preprocessing, this header file allows us to
  * define types used by PDocAccessible differently depending on platform.
  */
 
 #if defined(XP_WIN) && defined(ACCESSIBILITY)
 
 // So that we don't include a bunch of other Windows junk.
-#if !defined(COM_NO_WINDOWS_H)
-#define COM_NO_WINDOWS_H
-#endif  // !defined(COM_NO_WINDOWS_H)
+#  if !defined(COM_NO_WINDOWS_H)
+#    define COM_NO_WINDOWS_H
+#  endif  // !defined(COM_NO_WINDOWS_H)
 
 // COM headers pull in MSXML which conflicts with our own XMLDocument class.
 // This define excludes those conflicting definitions.
-#if !defined(__XMLDocument_FWD_DEFINED__)
-#define __XMLDocument_FWD_DEFINED__
-#endif  // !defined(__XMLDocument_FWD_DEFINED__)
+#  if !defined(__XMLDocument_FWD_DEFINED__)
+#    define __XMLDocument_FWD_DEFINED__
+#  endif  // !defined(__XMLDocument_FWD_DEFINED__)
 
-#include <combaseapi.h>
+#  include <combaseapi.h>
 
-#include "mozilla/a11y/COMPtrTypes.h"
+#  include "mozilla/a11y/COMPtrTypes.h"
 
 // This define in rpcndr.h messes up our code, so we must undefine it after
 // COMPtrTypes.h has been included.
-#if defined(small)
-#undef small
-#endif  // defined(small)
+#  if defined(small)
+#    undef small
+#  endif  // defined(small)
 
 #else
 
 namespace mozilla {
 namespace a11y {
 
 typedef uint32_t IAccessibleHolder;
 typedef uint32_t IDispatchHolder;
--- a/accessible/ipc/other/DocAccessibleChild.cpp
+++ b/accessible/ipc/other/DocAccessibleChild.cpp
@@ -14,17 +14,17 @@
 #include "TextLeafAccessible.h"
 #include "ImageAccessible.h"
 #include "TableAccessible.h"
 #include "TableCellAccessible.h"
 #include "nsIPersistentProperties2.h"
 #include "nsISimpleEnumerator.h"
 #include "nsAccUtils.h"
 #ifdef MOZ_ACCESSIBILITY_ATK
-#include "AccessibleWrap.h"
+#  include "AccessibleWrap.h"
 #endif
 
 namespace mozilla {
 namespace a11y {
 
 Accessible* DocAccessibleChild::IdToAccessible(const uint64_t& aID) const {
   if (!aID) return mDoc;
 
--- a/accessible/ipc/win/handler/AccessibleHandler.cpp
+++ b/accessible/ipc/win/handler/AccessibleHandler.cpp
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #if defined(MOZILLA_INTERNAL_API)
-#error This code is NOT for internal Gecko use!
+#  error This code is NOT for internal Gecko use!
 #endif  // defined(MOZILLA_INTERNAL_API)
 
 #include "AccessibleHandler.h"
 #include "AccessibleHandlerControl.h"
 #include "HandlerChildEnumerator.h"
 #include "HandlerRelation.h"
 
 #include "Factory.h"
--- a/accessible/ipc/win/handler/AccessibleHandler.h
+++ b/accessible/ipc/win/handler/AccessibleHandler.h
@@ -23,32 +23,32 @@
 #define NEWEST_IA2_IID IIDFOR(NEWEST_IA2_INTERFACE)
 
 #if defined(__midl) || defined(__WIDL__)
 
 import NEWEST_IA2_IDL;
 
 #else
 
-#include "HandlerData.h"
+#  include "HandlerData.h"
 
-#include <windows.h>
+#  include <windows.h>
 
-#if !defined(MOZILLA_INTERNAL_API)
+#  if !defined(MOZILLA_INTERNAL_API)
 
-#include "Accessible2_3.h"
-#include "AccessibleHyperlink.h"
-#include "AccessibleHypertext2.h"
-#include "AccessibleTableCell.h"
-#include "Handler.h"
-#include "mozilla/mscom/StructStream.h"
-#include "mozilla/UniquePtr.h"
+#    include "Accessible2_3.h"
+#    include "AccessibleHyperlink.h"
+#    include "AccessibleHypertext2.h"
+#    include "AccessibleTableCell.h"
+#    include "Handler.h"
+#    include "mozilla/mscom/StructStream.h"
+#    include "mozilla/UniquePtr.h"
 
-#include <ocidl.h>
-#include <servprov.h>
+#    include <ocidl.h>
+#    include <servprov.h>
 
 namespace mozilla {
 namespace a11y {
 
 class AccessibleHandler final : public mscom::Handler,
                                 public NEWEST_IA2_INTERFACE,
                                 public IServiceProvider,
                                 public IProvideClassInfo,
@@ -301,13 +301,13 @@ inline static BSTR CopyBSTR(BSTR aSrc) {
   }
 
   return ::SysAllocStringLen(aSrc, ::SysStringLen(aSrc));
 }
 
 }  // namespace a11y
 }  // namespace mozilla
 
-#endif  // !defined(MOZILLA_INTERNAL_API)
+#  endif  // !defined(MOZILLA_INTERNAL_API)
 
 #endif  // defined(__midl)
 
 #endif  // mozilla_a11y_AccessibleHandler_h
--- a/accessible/ipc/win/handler/AccessibleHandlerControl.cpp
+++ b/accessible/ipc/win/handler/AccessibleHandlerControl.cpp
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #if defined(MOZILLA_INTERNAL_API)
-#error This code is NOT for internal Gecko use!
+#  error This code is NOT for internal Gecko use!
 #endif  // defined(MOZILLA_INTERNAL_API)
 
 #include "AccessibleHandlerControl.h"
 
 #include "AccessibleHandler.h"
 
 #include "AccessibleEventId.h"
 
--- a/accessible/ipc/win/handler/AccessibleHandlerControl.h
+++ b/accessible/ipc/win/handler/AccessibleHandlerControl.h
@@ -1,26 +1,26 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #if defined(MOZILLA_INTERNAL_API)
-#error This code is NOT for internal Gecko use!
+#  error This code is NOT for internal Gecko use!
 #endif  // defined(MOZILLA_INTERNAL_API)
 
 #ifndef mozilla_a11y_AccessibleHandlerControl_h
-#define mozilla_a11y_AccessibleHandlerControl_h
+#  define mozilla_a11y_AccessibleHandlerControl_h
 
-#include "Factory.h"
-#include "HandlerData.h"
-#include "IUnknownImpl.h"
-#include "mozilla/mscom/Registration.h"
-#include "mozilla/NotNull.h"
+#  include "Factory.h"
+#  include "HandlerData.h"
+#  include "IUnknownImpl.h"
+#  include "mozilla/mscom/Registration.h"
+#  include "mozilla/NotNull.h"
 
 namespace mozilla {
 namespace a11y {
 
 namespace detail {
 
 class TextChange final {
  public:
--- a/accessible/ipc/win/handler/HandlerChildEnumerator.cpp
+++ b/accessible/ipc/win/handler/HandlerChildEnumerator.cpp
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #if defined(MOZILLA_INTERNAL_API)
-#error This code is NOT for internal Gecko use!
+#  error This code is NOT for internal Gecko use!
 #endif  // defined(MOZILLA_INTERNAL_API)
 
 #include "HandlerChildEnumerator.h"
 #include "HandlerTextLeaf.h"
 #include "mozilla/Assertions.h"
 
 namespace mozilla {
 namespace a11y {
--- a/accessible/ipc/win/handler/HandlerChildEnumerator.h
+++ b/accessible/ipc/win/handler/HandlerChildEnumerator.h
@@ -1,24 +1,24 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #if defined(MOZILLA_INTERNAL_API)
-#error This code is NOT for internal Gecko use!
+#  error This code is NOT for internal Gecko use!
 #endif  // defined(MOZILLA_INTERNAL_API)
 
 #ifndef mozilla_a11y_HandlerChildEnumerator_h
-#define mozilla_a11y_HandlerChildEnumerator_h
+#  define mozilla_a11y_HandlerChildEnumerator_h
 
-#include "AccessibleHandler.h"
-#include "IUnknownImpl.h"
-#include "mozilla/RefPtr.h"
+#  include "AccessibleHandler.h"
+#  include "IUnknownImpl.h"
+#  include "mozilla/RefPtr.h"
 
 namespace mozilla {
 namespace a11y {
 
 class HandlerChildEnumerator final : public IEnumVARIANT {
  public:
   explicit HandlerChildEnumerator(AccessibleHandler* aHandler,
                                   IGeckoBackChannel* aGeckoBackChannel);
--- a/accessible/ipc/win/handler/HandlerRelation.cpp
+++ b/accessible/ipc/win/handler/HandlerRelation.cpp
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #if defined(MOZILLA_INTERNAL_API)
-#error This code is NOT for internal Gecko use!
+#  error This code is NOT for internal Gecko use!
 #endif  // defined(MOZILLA_INTERNAL_API)
 
 #include "HandlerRelation.h"
 #include "mozilla/Assertions.h"
 
 #include "AccessibleRelation_i.c"
 
 namespace mozilla {
--- a/accessible/ipc/win/handler/HandlerRelation.h
+++ b/accessible/ipc/win/handler/HandlerRelation.h
@@ -1,24 +1,24 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #if defined(MOZILLA_INTERNAL_API)
-#error This code is NOT for internal Gecko use!
+#  error This code is NOT for internal Gecko use!
 #endif  // defined(MOZILLA_INTERNAL_API)
 
 #ifndef mozilla_a11y_HandlerRelation_h
-#define mozilla_a11y_HandlerRelation_h
+#  define mozilla_a11y_HandlerRelation_h
 
-#include "AccessibleHandler.h"
-#include "IUnknownImpl.h"
-#include "mozilla/RefPtr.h"
+#  include "AccessibleHandler.h"
+#  include "IUnknownImpl.h"
+#  include "mozilla/RefPtr.h"
 
 namespace mozilla {
 namespace a11y {
 
 class HandlerRelation final : public IAccessibleRelation {
  public:
   explicit HandlerRelation(AccessibleHandler* aHandler, IARelationData& aData);
 
--- a/accessible/ipc/win/handler/HandlerTextLeaf.cpp
+++ b/accessible/ipc/win/handler/HandlerTextLeaf.cpp
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #if defined(MOZILLA_INTERNAL_API)
-#error This code is NOT for internal Gecko use!
+#  error This code is NOT for internal Gecko use!
 #endif  // defined(MOZILLA_INTERNAL_API)
 
 #include "HandlerTextLeaf.h"
 #include "mozilla/Assertions.h"
 
 namespace mozilla {
 namespace a11y {
 
--- a/accessible/ipc/win/handler/HandlerTextLeaf.h
+++ b/accessible/ipc/win/handler/HandlerTextLeaf.h
@@ -1,24 +1,24 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #if defined(MOZILLA_INTERNAL_API)
-#error This code is NOT for internal Gecko use!
+#  error This code is NOT for internal Gecko use!
 #endif  // defined(MOZILLA_INTERNAL_API)
 
 #ifndef mozilla_a11y_HandlerTextLeaf_h
-#define mozilla_a11y_HandlerTextLeaf_h
+#  define mozilla_a11y_HandlerTextLeaf_h
 
-#include "AccessibleHandler.h"
-#include "IUnknownImpl.h"
-#include "mozilla/RefPtr.h"
+#  include "AccessibleHandler.h"
+#  include "IUnknownImpl.h"
+#  include "mozilla/RefPtr.h"
 
 namespace mozilla {
 namespace a11y {
 
 class HandlerTextLeaf final : public IAccessible2, public IServiceProvider {
  public:
   explicit HandlerTextLeaf(IDispatch *aParent, long aIndexInParent, HWND aHwnd,
                            AccChildData &aData);
--- a/accessible/windows/msaa/AccessibleWrap.cpp
+++ b/accessible/windows/msaa/AccessibleWrap.cpp
@@ -22,17 +22,17 @@
 #include "ServiceProvider.h"
 #include "Relation.h"
 #include "Role.h"
 #include "RootAccessible.h"
 #include "sdnAccessible.h"
 #include "States.h"
 
 #ifdef A11Y_LOG
-#include "Logging.h"
+#  include "Logging.h"
 #endif
 
 #include "nsIMutableArray.h"
 #include "nsIFrame.h"
 #include "nsIScrollableFrame.h"
 #include "mozilla/dom/NodeInfo.h"
 #include "mozilla/dom/TabParent.h"
 #include "nsIServiceManager.h"
--- a/accessible/windows/msaa/AccessibleWrap.h
+++ b/accessible/windows/msaa/AccessibleWrap.h
@@ -19,17 +19,17 @@
 #include "mozilla/a11y/ProxyAccessible.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/mscom/Utils.h"
 
 #if defined(__GNUC__) || defined(__clang__)
 // Inheriting from both XPCOM and MSCOM interfaces causes a lot of warnings
 // about virtual functions being hidden by each other. This is done by
 // design, so silence the warning.
-#pragma GCC diagnostic ignored "-Woverloaded-virtual"
+#  pragma GCC diagnostic ignored "-Woverloaded-virtual"
 #endif
 
 namespace mozilla {
 namespace a11y {
 class DocProxyAccessibleWrap;
 
 class AccessibleWrap : public Accessible,
                        public ia2Accessible,
@@ -296,16 +296,16 @@ static inline AccessibleWrap *WrapperFor
   return reinterpret_cast<AccessibleWrap *>(aProxy->GetWrapper());
 }
 
 }  // namespace a11y
 }  // namespace mozilla
 
 #ifdef XP_WIN
 // Undo the windows.h damage
-#undef GetMessage
-#undef CreateEvent
-#undef GetClassName
-#undef GetBinaryType
-#undef RemoveDirectory
+#  undef GetMessage
+#  undef CreateEvent
+#  undef GetClassName
+#  undef GetBinaryType
+#  undef RemoveDirectory
 #endif
 
 #endif
--- a/accessible/windows/msaa/Compatibility.cpp
+++ b/accessible/windows/msaa/Compatibility.cpp
@@ -81,22 +81,22 @@ bool Compatibility::IsModuleVersionLessT
 
 static WindowsDllInterceptor sUser32Interceptor;
 static WindowsDllInterceptor::FuncHookType<decltype(&InSendMessageEx)>
     sInSendMessageExStub;
 static bool sInSendMessageExHackEnabled = false;
 static PVOID sVectoredExceptionHandler = nullptr;
 
 #if defined(_MSC_VER)
-#include <intrin.h>
-#pragma intrinsic(_ReturnAddress)
-#define RETURN_ADDRESS() _ReturnAddress()
+#  include <intrin.h>
+#  pragma intrinsic(_ReturnAddress)
+#  define RETURN_ADDRESS() _ReturnAddress()
 #elif defined(__GNUC__) || defined(__clang__)
-#define RETURN_ADDRESS() \
-  __builtin_extract_return_addr(__builtin_return_address(0))
+#  define RETURN_ADDRESS() \
+    __builtin_extract_return_addr(__builtin_return_address(0))
 #endif
 
 static inline bool IsCurrentThreadInBlockingMessageSend(
     const DWORD aStateBits) {
   // From the MSDN docs for InSendMessageEx
   return (aStateBits & (ISMEX_REPLIED | ISMEX_SEND)) == ISMEX_SEND;
 }
 
--- a/accessible/windows/msaa/CompatibilityUIA.cpp
+++ b/accessible/windows/msaa/CompatibilityUIA.cpp
@@ -17,26 +17,26 @@
 #include "nsTHashtable.h"
 #include "nsUnicharUtils.h"
 #include "nsWinUtils.h"
 
 #include "NtUndoc.h"
 
 #if defined(UIA_LOGGING)
 
-#define LOG_ERROR(FuncName)                                       \
-  {                                                               \
-    DWORD err = ::GetLastError();                                 \
-    nsPrintfCString msg(#FuncName " failed with code %u\n", err); \
-    ::OutputDebugStringA(msg.get());                              \
-  }
+#  define LOG_ERROR(FuncName)                                       \
+    {                                                               \
+      DWORD err = ::GetLastError();                                 \
+      nsPrintfCString msg(#FuncName " failed with code %u\n", err); \
+      ::OutputDebugStringA(msg.get());                              \
+    }
 
 #else
 
-#define LOG_ERROR(FuncName)
+#  define LOG_ERROR(FuncName)
 
 #endif  // defined(UIA_LOGGING)
 
 struct ByteArrayDeleter {
   void operator()(void* aBuf) { delete[] reinterpret_cast<char*>(aBuf); }
 };
 
 typedef UniquePtr<OBJECT_DIRECTORY_INFORMATION, ByteArrayDeleter> ObjDirInfoPtr;
--- a/accessible/windows/msaa/HTMLWin32ObjectAccessible.h
+++ b/accessible/windows/msaa/HTMLWin32ObjectAccessible.h
@@ -4,17 +4,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_a11y_HTMLWin32ObjectAccessible_h_
 #define mozilla_a11y_HTMLWin32ObjectAccessible_h_
 
 #include "BaseAccessibles.h"
 
 #if defined(MOZ_CONTENT_SANDBOX)
-#include "mozilla/mscom/Ptr.h"
+#  include "mozilla/mscom/Ptr.h"
 #endif
 
 struct IAccessible;
 
 namespace mozilla {
 namespace a11y {
 
 class HTMLWin32ObjectOwnerAccessible : public AccessibleWrap {
--- a/accessible/windows/msaa/IUnknownImpl.h
+++ b/accessible/windows/msaa/IUnknownImpl.h
@@ -12,23 +12,23 @@
 #undef CreateEvent  // thank you windows you're such a helper
 #include "nsError.h"
 
 // Avoid warning C4509 like "nonstandard extension used:
 // 'AccessibleWrap::[acc_getName]' uses SEH and 'name' has destructor.
 // At this point we're catching a crash which is of much greater
 // importance than the missing dereference for the nsCOMPtr<>
 #ifdef _MSC_VER
-#pragma warning(disable : 4509)
+#  pragma warning(disable : 4509)
 #endif
 
 #if defined(__GNUC__) || defined(__clang__)
-#define ATTRIBUTE_UNUSED __attribute__((unused))
+#  define ATTRIBUTE_UNUSED __attribute__((unused))
 #else
-#define ATTRIBUTE_UNUSED
+#  define ATTRIBUTE_UNUSED
 #endif
 
 namespace mozilla {
 namespace a11y {
 
 class AutoRefCnt {
  public:
   AutoRefCnt() : mValue(0) {}
--- a/accessible/windows/msaa/LazyInstantiator.cpp
+++ b/accessible/windows/msaa/LazyInstantiator.cpp
@@ -20,17 +20,17 @@
 #include "nsIFile.h"
 #include "nsXPCOM.h"
 #include "RootAccessibleWrap.h"
 #include "WinUtils.h"
 
 #include <oaidl.h>
 
 #if !defined(STATE_SYSTEM_NORMAL)
-#define STATE_SYSTEM_NORMAL (0)
+#  define STATE_SYSTEM_NORMAL (0)
 #endif  // !defined(STATE_SYSTEM_NORMAL)
 
 namespace mozilla {
 namespace a11y {
 
 static const wchar_t kLazyInstantiatorProp[] =
     L"mozilla::a11y::LazyInstantiator";
 
--- a/accessible/windows/msaa/NtUndoc.h
+++ b/accessible/windows/msaa/NtUndoc.h
@@ -9,25 +9,25 @@
 
 #include <winternl.h>
 
 #if defined(__cplusplus)
 extern "C" {
 #endif
 
 #ifndef STATUS_INFO_LENGTH_MISMATCH
-#define STATUS_INFO_LENGTH_MISMATCH ((NTSTATUS)0xC0000004L)
+#  define STATUS_INFO_LENGTH_MISMATCH ((NTSTATUS)0xC0000004L)
 #endif
 
 #ifndef STATUS_BUFFER_TOO_SMALL
-#define STATUS_BUFFER_TOO_SMALL ((NTSTATUS)0xC0000023L)
+#  define STATUS_BUFFER_TOO_SMALL ((NTSTATUS)0xC0000023L)
 #endif
 
 #ifndef STATUS_MORE_ENTRIES
-#define STATUS_MORE_ENTRIES ((NTSTATUS)0x00000105L)
+#  define STATUS_MORE_ENTRIES ((NTSTATUS)0x00000105L)
 #endif
 
 enum UndocSystemInformationClass { SystemExtendedHandleInformation = 64 };
 
 struct SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX {
   PVOID mObject;
   ULONG_PTR mPid;
   ULONG_PTR mHandle;
--- a/accessible/windows/msaa/Platform.cpp
+++ b/accessible/windows/msaa/Platform.cpp
@@ -20,17 +20,17 @@
 #include "mozilla/mscom/Utils.h"
 #include "mozilla/StaticPtr.h"
 #include "mozilla/WindowsVersion.h"
 #include "nsDirectoryServiceDefs.h"
 #include "nsDirectoryServiceUtils.h"
 #include "ProxyWrappers.h"
 
 #if defined(MOZ_TELEMETRY_REPORTING)
-#include "mozilla/Telemetry.h"
+#  include "mozilla/Telemetry.h"
 #endif  // defined(MOZ_TELEMETRY_REPORTING)
 
 using namespace mozilla;
 using namespace mozilla::a11y;
 using namespace mozilla::mscom;
 
 static StaticAutoPtr<RegisteredProxy> gRegCustomProxy;
 static StaticAutoPtr<RegisteredProxy> gRegProxy;
@@ -317,24 +317,24 @@ static void AppendVersionInfo(nsIFile* a
   aStrToAppend.Append(dot);
   aStrToAppend.AppendInt(build);
 }
 
 static void AccumulateInstantiatorTelemetry(const nsAString& aValue) {
   MOZ_ASSERT(NS_IsMainThread());
 
   if (!aValue.IsEmpty()) {
-#if defined(MOZ_TELEMETRY_REPORTING)
+#  if defined(MOZ_TELEMETRY_REPORTING)
     Telemetry::ScalarSet(Telemetry::ScalarID::A11Y_INSTANTIATORS, aValue);
-#endif  // defined(MOZ_TELEMETRY_REPORTING)
-#if defined(MOZ_CRASHREPORTER)
+#  endif  // defined(MOZ_TELEMETRY_REPORTING)
+#  if defined(MOZ_CRASHREPORTER)
     CrashReporter::AnnotateCrashReport(
         CrashReporter::Annotation::AccessibilityClient,
         NS_ConvertUTF16toUTF8(aValue));
-#endif  // defined(MOZ_CRASHREPORTER)
+#  endif  // defined(MOZ_CRASHREPORTER)
   }
 }
 
 static void GatherInstantiatorTelemetry(nsIFile* aClientExe) {
   MOZ_ASSERT(!NS_IsMainThread());
 
   nsString value;
   nsresult rv = aClientExe->GetLeafName(value);
--- a/accessible/xpcom/xpcAccessibilityService.cpp
+++ b/accessible/xpcom/xpcAccessibilityService.cpp
@@ -4,17 +4,17 @@
 
 #include "xpcAccessibilityService.h"
 
 #include "nsAccessiblePivot.h"
 #include "nsAccessibilityService.h"
 #include "Platform.h"
 
 #ifdef A11Y_LOG
-#include "Logging.h"
+#  include "Logging.h"
 #endif
 
 using namespace mozilla;
 using namespace mozilla::a11y;
 using namespace mozilla::dom;
 
 xpcAccessibilityService* xpcAccessibilityService::gXPCAccessibilityService =
     nullptr;
--- a/accessible/xul/XULElementAccessibles.cpp
+++ b/accessible/xul/XULElementAccessibles.cpp
@@ -12,17 +12,17 @@
 #include "nsCoreUtils.h"
 #include "nsTextEquivUtils.h"
 #include "Relation.h"
 #include "Role.h"
 #include "States.h"
 #include "TextUpdater.h"
 
 #ifdef A11Y_LOG
-#include "Logging.h"
+#  include "Logging.h"
 #endif
 
 #include "nsNameSpaceManager.h"
 #include "nsNetUtil.h"
 #include "nsString.h"
 #include "nsTextBoxFrame.h"
 
 using namespace mozilla::a11y;
--- a/browser/app/nsBrowserApp.cpp
+++ b/browser/app/nsBrowserApp.cpp
@@ -3,54 +3,54 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsXULAppAPI.h"
 #include "mozilla/XREAppData.h"
 #include "application.ini.h"
 #include "mozilla/Bootstrap.h"
 #if defined(XP_WIN)
-#include <windows.h>
-#include <stdlib.h>
+#  include <windows.h>
+#  include <stdlib.h>
 #elif defined(XP_UNIX)
-#include <sys/resource.h>
-#include <unistd.h>
+#  include <sys/resource.h>
+#  include <unistd.h>
 #endif
 
 #include <stdio.h>
 #include <stdarg.h>
 #include <time.h>
 
 #include "nsCOMPtr.h"
 #include "nsIFile.h"
 
 #ifdef XP_WIN
-#include "LauncherProcessWin.h"
+#  include "LauncherProcessWin.h"
 
-#define XRE_WANT_ENVIRON
-#define strcasecmp _stricmp
-#ifdef MOZ_SANDBOX
-#include "mozilla/sandboxing/SandboxInitialization.h"
-#endif
+#  define XRE_WANT_ENVIRON
+#  define strcasecmp _stricmp
+#  ifdef MOZ_SANDBOX
+#    include "mozilla/sandboxing/SandboxInitialization.h"
+#  endif
 #endif
 #include "BinaryPath.h"
 
 #include "nsXPCOMPrivate.h"  // for MAXPATHLEN and XPCOM_DLL
 
 #include "mozilla/Sprintf.h"
 #include "mozilla/StartupTimeline.h"
 #include "mozilla/WindowsDllBlocklist.h"
 
 #ifdef LIBFUZZER
-#include "FuzzerDefs.h"
+#  include "FuzzerDefs.h"
 #endif
 
 #ifdef MOZ_LINUX_32_SSE2_STARTUP_ERROR
-#include <cpuid.h>
-#include "mozilla/Unused.h"
+#  include <cpuid.h>
+#  include "mozilla/Unused.h"
 
 static bool IsSSE2Available() {
   // The rest of the app has been compiled to assume that SSE2 is present
   // unconditionally, so we can't use the normal copy of SSE.cpp here.
   // Since SSE.cpp caches the results and we need them only transiently,
   // instead of #including SSE.cpp here, let's just inline the specific check
   // that's needed.
   unsigned int level = 1u;
@@ -79,55 +79,55 @@ static const char sSSE2Message[] =
   MOZ_UNUSED(
       write(STDERR_FILENO, sSSE2Message, MOZ_ARRAY_LENGTH(sSSE2Message) - 1));
   // _exit() instead of exit() to avoid running the usual "at exit" code.
   _exit(255);
 }
 #endif
 
 #if !defined(MOZ_WIDGET_COCOA) && !defined(MOZ_WIDGET_ANDROID)
-#define MOZ_BROWSER_CAN_BE_CONTENTPROC
-#include "../../ipc/contentproc/plugin-container.cpp"
+#  define MOZ_BROWSER_CAN_BE_CONTENTPROC
+#  include "../../ipc/contentproc/plugin-container.cpp"
 #endif
 
 using namespace mozilla;
 
 #ifdef XP_MACOSX
-#define kOSXResourcesFolder "Resources"
+#  define kOSXResourcesFolder "Resources"
 #endif
 #define kDesktopFolder "browser"
 
 static MOZ_FORMAT_PRINTF(1, 2) void Output(const char* fmt, ...) {
   va_list ap;
   va_start(ap, fmt);
 
 #ifndef XP_WIN
   vfprintf(stderr, fmt, ap);
 #else
   char msg[2048];
   vsnprintf_s(msg, _countof(msg), _TRUNCATE, fmt, ap);
 
   wchar_t wide_msg[2048];
   MultiByteToWideChar(CP_UTF8, 0, msg, -1, wide_msg, _countof(wide_msg));
-#if MOZ_WINCONSOLE
+#  if MOZ_WINCONSOLE
   fwprintf_s(stderr, wide_msg);
-#else
+#  else
   // Linking user32 at load-time interferes with the DLL blocklist (bug 932100).
   // This is a rare codepath, so we can load user32 at run-time instead.
   HMODULE user32 = LoadLibraryW(L"user32.dll");
   if (user32) {
     decltype(MessageBoxW)* messageBoxW =
         (decltype(MessageBoxW)*)GetProcAddress(user32, "MessageBoxW");
     if (messageBoxW) {
       messageBoxW(nullptr, wide_msg, L"Firefox",
                   MB_OK | MB_ICONERROR | MB_SETFOREGROUND);
     }
     FreeLibrary(user32);
   }
-#endif
+#  endif
 #endif
 
   va_end(ap);
 }
 
 /**
  * Return true if |arg| matches the given argument name.
  */
@@ -191,22 +191,22 @@ static int do_main(int argc, char* argv[
     config.appDataPath = kDesktopFolder;
   }
 
 #if defined(XP_WIN) && defined(MOZ_SANDBOX)
   sandbox::BrokerServices* brokerServices =
       sandboxing::GetInitializedBrokerServices();
   sandboxing::PermissionsService* permissionsService =
       sandboxing::GetPermissionsService();
-#if defined(MOZ_CONTENT_SANDBOX)
+#  if defined(MOZ_CONTENT_SANDBOX)
   if (!brokerServices) {
     Output("Couldn't initialize the broker services.\n");
     return 255;
   }
-#endif
+#  endif
   config.sandboxBrokerServices = brokerServices;
   config.sandboxPermissionsService = permissionsService;
 #endif
 
 #ifdef LIBFUZZER
   if (getenv("LIBFUZZER"))
     gBootstrap->XRE_LibFuzzerSetDriver(fuzzer::FuzzerDriver);
 #endif
@@ -240,38 +240,38 @@ uint32_t gBlocklistInitFlags = eDllBlock
 
 int main(int argc, char* argv[], char* envp[]) {
   mozilla::TimeStamp start = mozilla::TimeStamp::Now();
 
 #ifdef MOZ_BROWSER_CAN_BE_CONTENTPROC
   // We are launching as a content process, delegate to the appropriate
   // main
   if (argc > 1 && IsArg(argv[1], "contentproc")) {
-#ifdef HAS_DLL_BLOCKLIST
+#  ifdef HAS_DLL_BLOCKLIST
     DllBlocklist_Initialize(eDllBlocklistInitFlagIsChildProcess);
-#endif
-#if defined(XP_WIN) && defined(MOZ_SANDBOX)
+#  endif
+#  if defined(XP_WIN) && defined(MOZ_SANDBOX)
     // We need to initialize the sandbox TargetServices before InitXPCOMGlue
     // because we might need the sandbox broker to give access to some files.
     if (IsSandboxedProcess() && !sandboxing::GetInitializedTargetServices()) {
       Output("Failed to initialize the sandbox target services.");
       return 255;
     }
-#endif
+#  endif
 
     nsresult rv = InitXPCOMGlue();
     if (NS_FAILED(rv)) {
       return 255;
     }
 
     int result = content_process_main(gBootstrap.get(), argc, argv);
 
-#if defined(DEBUG) && defined(HAS_DLL_BLOCKLIST)
+#  if defined(DEBUG) && defined(HAS_DLL_BLOCKLIST)
     DllBlocklist_Shutdown();
-#endif
+#  endif
 
     // InitXPCOMGlue calls NS_LogInit, so we need to balance it here.
     gBootstrap->NS_LogTerm();
 
     return result;
   }
 #endif
 
--- a/browser/app/winlauncher/DllBlocklistWin.cpp
+++ b/browser/app/winlauncher/DllBlocklistWin.cpp
@@ -21,19 +21,19 @@
         const_cast<wchar_t*>(s)                                              \
   }
 
 #define DLL_BLOCKLIST_ENTRY(name, ...) \
   {MOZ_LITERAL_UNICODE_STRING(L##name), __VA_ARGS__},
 #define DLL_BLOCKLIST_STRING_TYPE UNICODE_STRING
 
 #if defined(MOZ_LAUNCHER_PROCESS) || defined(NIGHTLY_BUILD)
-#include "mozilla/WindowsDllBlocklistDefs.h"
+#  include "mozilla/WindowsDllBlocklistDefs.h"
 #else
-#include "mozilla/WindowsDllBlocklistCommon.h"
+#  include "mozilla/WindowsDllBlocklistCommon.h"
 DLL_BLOCKLIST_DEFINITIONS_BEGIN
 DLL_BLOCKLIST_DEFINITIONS_END
 #endif
 
 extern uint32_t gBlocklistInitFlags;
 
 static const HANDLE kCurrentProcess = reinterpret_cast<HANDLE>(-1);
 
--- a/browser/app/winlauncher/LauncherProcessWin.cpp
+++ b/browser/app/winlauncher/LauncherProcessWin.cpp
@@ -26,18 +26,18 @@
 #include <processthreadsapi.h>
 
 #include "DllBlocklistWin.h"
 #include "ErrorHandler.h"
 #include "LaunchUnelevated.h"
 #include "ProcThreadAttributes.h"
 
 #if defined(MOZ_LAUNCHER_PROCESS)
-#include "mozilla/LauncherRegistryInfo.h"
-#include "SameBinary.h"
+#  include "mozilla/LauncherRegistryInfo.h"
+#  include "SameBinary.h"
 #endif  // defined(MOZ_LAUNCHER_PROCESS)
 
 /**
  * At this point the child process has been created in a suspended state. Any
  * additional startup work (eg, blocklist setup) should go here.
  *
  * @return Ok if browser startup should proceed
  */
@@ -51,18 +51,18 @@ static mozilla::LauncherVoidResult PostC
   return mozilla::Ok();
 #else
   return mozilla::InitializeDllBlocklistOOP(aChildProcess);
 #endif  // defined(MOZ_ASAN) || defined(_M_ARM64)
 }
 
 #if !defined( \
     PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_PREFER_SYSTEM32_ALWAYS_ON)
-#define PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_PREFER_SYSTEM32_ALWAYS_ON \
-  (0x00000001ULL << 60)
+#  define PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_PREFER_SYSTEM32_ALWAYS_ON \
+    (0x00000001ULL << 60)
 #endif  // !defined(PROCESS_CREATION_MITIGATION_POLICY_IMAGE_LOAD_PREFER_SYSTEM32_ALWAYS_ON)
 
 #if (_WIN32_WINNT < 0x0602)
 BOOL WINAPI
 SetProcessMitigationPolicy(PROCESS_MITIGATION_POLICY aMitigationPolicy,
                            PVOID aBuffer, SIZE_T aBufferLen);
 #endif  // (_WIN32_WINNT >= 0x0602)
 
--- a/browser/components/build/nsBrowserCompsCID.h
+++ b/browser/components/build/nsBrowserCompsCID.h
@@ -1,24 +1,24 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef XP_WIN
-#define NS_WINIEHISTORYENUMERATOR_CID                \
-  {                                                  \
-    0x93480624, 0x806e, 0x4756, {                    \
-      0xb7, 0xcb, 0x0f, 0xb7, 0xdd, 0x74, 0x6a, 0x8f \
-    }                                                \
-  }
+#  define NS_WINIEHISTORYENUMERATOR_CID                \
+    {                                                  \
+      0x93480624, 0x806e, 0x4756, {                    \
+        0xb7, 0xcb, 0x0f, 0xb7, 0xdd, 0x74, 0x6a, 0x8f \
+      }                                                \
+    }
 
-#define NS_IEHISTORYENUMERATOR_CONTRACTID \
-  "@mozilla.org/profile/migrator/iehistoryenumerator;1"
+#  define NS_IEHISTORYENUMERATOR_CONTRACTID \
+    "@mozilla.org/profile/migrator/iehistoryenumerator;1"
 #endif
 
 #define NS_SHELLSERVICE_CID                         \
   {                                                 \
     0x63c7b9f4, 0xcc8, 0x43f8, {                    \
       0xb6, 0x66, 0xa, 0x66, 0x16, 0x55, 0xcb, 0x73 \
     }                                               \
   }
@@ -52,17 +52,17 @@
 #define NS_BROWSERDIRECTORYPROVIDER_CID              \
   {                                                  \
     0x6deb193c, 0xf87d, 0x4078, {                    \
       0xbc, 0x78, 0x5e, 0x64, 0x65, 0x5b, 0x4d, 0x62 \
     }                                                \
   }
 
 #if defined(MOZ_WIDGET_COCOA)
-#define NS_MACATTRIBUTIONSERVICE_CONTRACTID "@mozilla.org/mac-attribution;1"
+#  define NS_MACATTRIBUTIONSERVICE_CONTRACTID "@mozilla.org/mac-attribution;1"
 
-#define NS_MACATTRIBUTIONSERVICE_CID                 \
-  {                                                  \
-    0x6FC66A78, 0x6CBC, 0x4B3F, {                    \
-      0xB7, 0xBA, 0x37, 0x92, 0x89, 0xB2, 0x92, 0x76 \
-    }                                                \
-  }
+#  define NS_MACATTRIBUTIONSERVICE_CID                 \
+    {                                                  \
+      0x6FC66A78, 0x6CBC, 0x4B3F, {                    \
+        0xB7, 0xBA, 0x37, 0x92, 0x89, 0xB2, 0x92, 0x76 \
+      }                                                \
+    }
 #endif
--- a/browser/components/build/nsModule.cpp
+++ b/browser/components/build/nsModule.cpp
@@ -4,29 +4,29 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/ModuleUtils.h"
 
 #include "nsBrowserCompsCID.h"
 #include "DirectoryProvider.h"
 
 #if defined(XP_WIN)
-#include "nsWindowsShellService.h"
+#  include "nsWindowsShellService.h"
 #elif defined(XP_MACOSX)
-#include "nsMacShellService.h"
+#  include "nsMacShellService.h"
 #elif defined(MOZ_WIDGET_GTK)
-#include "nsGNOMEShellService.h"
+#  include "nsGNOMEShellService.h"
 #endif
 
 #if defined(MOZ_WIDGET_COCOA)
-#include "nsMacAttribution.h"
+#  include "nsMacAttribution.h"
 #endif
 
 #if defined(XP_WIN)
-#include "nsIEHistoryEnumerator.h"
+#  include "nsIEHistoryEnumerator.h"
 #endif
 
 #include "AboutRedirector.h"
 #include "nsIAboutModule.h"
 
 #include "nsNetCID.h"
 
 using namespace mozilla::browser;
--- a/browser/components/shell/nsGNOMEShellService.cpp
+++ b/browser/components/shell/nsGNOMEShellService.cpp
@@ -24,17 +24,17 @@
 #include "nsServiceManagerUtils.h"
 #include "nsComponentManagerUtils.h"
 #include "nsIImageLoadingContent.h"
 #include "imgIRequest.h"
 #include "imgIContainer.h"
 #include "mozilla/Sprintf.h"
 #include "mozilla/dom/Element.h"
 #if defined(MOZ_WIDGET_GTK)
-#include "nsIImageToPixbuf.h"
+#  include "nsIImageToPixbuf.h"
 #endif
 #include "nsXULAppAPI.h"
 #include "gfxPlatform.h"
 
 #include <glib.h>
 #include <glib-object.h>
 #include <gtk/gtk.h>
 #include <gdk/gdk.h>
--- a/browser/components/shell/nsWindowsShellService.cpp
+++ b/browser/components/shell/nsWindowsShellService.cpp
@@ -31,34 +31,34 @@
 #include "nsXULAppAPI.h"
 #include "mozilla/WindowsVersion.h"
 #include "mozilla/dom/Element.h"
 
 #include "windows.h"
 #include "shellapi.h"
 
 #ifdef _WIN32_WINNT
-#undef _WIN32_WINNT
+#  undef _WIN32_WINNT
 #endif
 #define _WIN32_WINNT 0x0600
 #define INITGUID
 #undef NTDDI_VERSION
 #define NTDDI_VERSION NTDDI_WIN8
 // Needed for access to IApplicationActivationManager
 #include <shlobj.h>
 #include "WinUtils.h"
 
 #include <mbstring.h>
 #include <shlwapi.h>
 
 #include <lm.h>
 #undef ACCESS_READ
 
 #ifndef MAX_BUF
-#define MAX_BUF 4096
+#  define MAX_BUF 4096
 #endif
 
 #define REG_SUCCEEDED(val) (val == ERROR_SUCCESS)
 
 #define REG_FAILED(val) (val != ERROR_SUCCESS)
 
 #define APP_REG_NAME_BASE L"Firefox-"
 
--- a/browser/extensions/pdfjs/README.mozilla
+++ b/browser/extensions/pdfjs/README.mozilla
@@ -1,5 +1,5 @@
 This is the PDF.js project output, https://github.com/mozilla/pdf.js
 
-Current extension version is: 2.1.189
+Current extension version is: 2.1.196
 
-Taken from upstream commit: 5cb00b79
+Taken from upstream commit: cdbc33ba
--- a/browser/extensions/pdfjs/content/build/pdf.js
+++ b/browser/extensions/pdfjs/content/build/pdf.js
@@ -118,18 +118,18 @@ return /******/ (function(modules) { // 
 /************************************************************************/
 /******/ ([
 /* 0 */
 /***/ (function(module, exports, __w_pdfjs_require__) {
 
 "use strict";
 
 
-var pdfjsVersion = '2.1.189';
-var pdfjsBuild = '5cb00b79';
+var pdfjsVersion = '2.1.196';
+var pdfjsBuild = 'cdbc33ba';
 
 var pdfjsSharedUtil = __w_pdfjs_require__(1);
 
 var pdfjsDisplayAPI = __w_pdfjs_require__(7);
 
 var pdfjsDisplayTextLayer = __w_pdfjs_require__(19);
 
 var pdfjsDisplayAnnotationLayer = __w_pdfjs_require__(20);
@@ -5149,17 +5149,17 @@ function _fetchDocument(worker, source, 
 
   if (pdfDataRangeTransport) {
     source.length = pdfDataRangeTransport.length;
     source.initialData = pdfDataRangeTransport.initialData;
   }
 
   return worker.messageHandler.sendWithPromise('GetDocRequest', {
     docId,
-    apiVersion: '2.1.189',
+    apiVersion: '2.1.196',
     source: {
       data: source.data,
       url: source.url,
       password: source.password,
       disableAutoFetch: source.disableAutoFetch,
       rangeChunkSize: source.rangeChunkSize,
       length: source.length
     },
@@ -6880,19 +6880,19 @@ const InternalRenderTask = function Inte
       }
     }
 
   }
 
   return InternalRenderTask;
 }();
 
-const version = '2.1.189';
+const version = '2.1.196';
 exports.version = version;
-const build = '5cb00b79';
+const build = 'cdbc33ba';
 exports.build = build;
 
 /***/ }),
 /* 8 */
 /***/ (function(module, exports, __w_pdfjs_require__) {
 
 "use strict";
 
@@ -10561,17 +10561,17 @@ class Metadata {
     this._metadata = Object.create(null);
 
     if (xmlDocument) {
       this._parse(xmlDocument);
     }
   }
 
   _repair(data) {
-    return data.replace(/>\\376\\377([^<]+)/g, function (all, codes) {
+    return data.replace(/^([^<]+)/, '').replace(/>\\376\\377([^<]+)/g, function (all, codes) {
       let bytes = codes.replace(/\\([0-3])([0-7])([0-7])/g, function (code, d1, d2, d3) {
         return String.fromCharCode(d1 * 64 + d2 * 8 + d3 * 1);
       }).replace(/&(amp|apos|gt|lt|quot);/g, function (str, name) {
         switch (name) {
           case 'amp':
             return '&';
 
           case 'apos':
@@ -10637,17 +10637,18 @@ class Metadata {
           let name = entry.nodeName.toLowerCase();
           this._metadata[name] = entry.textContent.trim();
         }
       }
     }
   }
 
   get(name) {
-    return this._metadata[name] || null;
+    const data = this._metadata[name];
+    return typeof data !== 'undefined' ? data : null;
   }
 
   getAll() {
     return this._metadata;
   }
 
   has(name) {
     return typeof this._metadata[name] !== 'undefined';
--- a/browser/extensions/pdfjs/content/build/pdf.worker.js
+++ b/browser/extensions/pdfjs/content/build/pdf.worker.js
@@ -118,18 +118,18 @@ return /******/ (function(modules) { // 
 /************************************************************************/
 /******/ ([
 /* 0 */
 /***/ (function(module, exports, __w_pdfjs_require__) {
 
 "use strict";
 
 
-var pdfjsVersion = '2.1.189';
-var pdfjsBuild = '5cb00b79';
+var pdfjsVersion = '2.1.196';
+var pdfjsBuild = 'cdbc33ba';
 
 var pdfjsCoreWorker = __w_pdfjs_require__(1);
 
 exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler;
 
 /***/ }),
 /* 1 */
 /***/ (function(module, exports, __w_pdfjs_require__) {
@@ -370,17 +370,17 @@ var WorkerMessageHandler = {
   },
 
   createDocumentHandler(docParams, port) {
     var pdfManager;
     var terminated = false;
     var cancelXHRs = null;
     var WorkerTasks = [];
     let apiVersion = docParams.apiVersion;
-    let workerVersion = '2.1.189';
+    let workerVersion = '2.1.196';
 
     if (apiVersion !== workerVersion) {
       throw new Error(`The API version "${apiVersion}" does not match ` + `the Worker version "${workerVersion}".`);
     }
 
     var docId = docParams.docId;
     var docBaseUrl = docParams.docBaseUrl;
     var workerHandlerName = docParams.docId + '_worker';
--- a/browser/extensions/pdfjs/content/web/viewer.js
+++ b/browser/extensions/pdfjs/content/web/viewer.js
@@ -4902,17 +4902,17 @@ class PDFFindBar {
           current,
           total
         }, '{{current}} of {{total}} matches');
       }
     }
 
     Promise.resolve(matchesCountMsg).then(msg => {
       this.findResultsCount.textContent = msg;
-      this.findResultsCount.classList[!total ? 'add' : 'remove']('hidden');
+      this.findResultsCount.classList.toggle('hidden', !total);
 
       this._adjustWidth();
     });
   }
 
   open() {
     if (!this.opened) {
       this.opened = true;
@@ -5986,20 +5986,29 @@ class PDFHistory {
       const baseUrl = document.location.href.split('#')[0];
 
       if (!baseUrl.startsWith('file://')) {
         newUrl = `${baseUrl}#${destination.hash}`;
       }
     }
 
     if (shouldReplace) {
-      window.history.replaceState(newState, '', newUrl);
+      if (newUrl) {
+        window.history.replaceState(newState, '', newUrl);
+      } else {
+        window.history.replaceState(newState, '');
+      }
     } else {
       this._maxUid = this._uid;
-      window.history.pushState(newState, '', newUrl);
+
+      if (newUrl) {
+        window.history.pushState(newState, '', newUrl);
+      } else {
+        window.history.pushState(newState, '');
+      }
     }
   }
 
   _tryPushCurrentPosition(temporary = false) {
     if (!this._position) {
       return;
     }
 
--- a/browser/extensions/pdfjs/moz.yaml
+++ b/browser/extensions/pdfjs/moz.yaml
@@ -15,15 +15,15 @@ origin:
   description: Portable Document Format (PDF) viewer that is built with HTML5
 
   # Full URL for the package's homepage/etc
   # Usually different from repository url
   url: https://github.com/mozilla/pdf.js
 
   # Human-readable identifier for this version/release
   # Generally "version NNN", "tag SSS", "bookmark SSS"
-  release: version 2.1.189
+  release: version 2.1.196
 
   # The package's license, where possible using the mnemonic from
   # https://spdx.org/licenses/
   # Multiple licenses can be specified (as a YAML list)
   # A "LICENSE" file must exist containing the full license text
   license: Apache-2.0
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -1673,21 +1673,23 @@ option('--enable-hardening', env='MOZ_SE
 
 
 @depends('--enable-hardening', '--enable-address-sanitizer',
          '--enable-optimize', c_compiler, target)
 def security_hardening_cflags(hardening_flag, asan, optimize, c_compiler, target):
     compiler_is_gccish = c_compiler.type in ('gcc', 'clang')
 
     flags = []
+    ldflags = []
     js_flags = []
-
-    # FORTIFY_SOURCE ------------------------------------
+    js_ldflags = []
+
     # If hardening is explicitly enabled, or not explicitly disabled
     if hardening_flag.origin == "default" or hardening_flag:
+        # FORTIFY_SOURCE ------------------------------------
         # Require optimization for FORTIFY_SOURCE. See Bug 1417452
         # Also, undefine it before defining it just in case a distro adds it, see Bug 1418398
         if compiler_is_gccish and optimize and not asan:
             # Don't enable FORTIFY_SOURCE on Android on the top-level, but do enable in js/
             if target.os != 'Android':
                 flags.append("-U_FORTIFY_SOURCE")
                 flags.append("-D_FORTIFY_SOURCE=2")
             js_flags.append("-U_FORTIFY_SOURCE")
@@ -1696,37 +1698,48 @@ def security_hardening_cflags(hardening_
         # fstack-protector ------------------------------------
         # Enable only if hardening is not disabled and ASAN is
         # not on as ASAN will catch the crashes for us
         if compiler_is_gccish and not asan:
             # mingw-clang cross-compile toolchain has bugs with stack protector
             if target.os != 'WINNT' or c_compiler == 'gcc':
                 flags.append("-fstack-protector-strong")
 
+        # ASLR ------------------------------------------------
+        # ASLR (dynamicbase) is enabled by default in clang-cl; but the
+        # mingw-clang build requires it to be explicitly enabled
+        if target.os == 'WINNT' and c_compiler.type == 'clang':
+            ldflags.append("-Wl,--dynamicbase")
+            js_ldflags.append("-Wl,--dynamicbase")
+
     # If ASAN _is_ on, undefine FOTIFY_SOURCE just to be safe
     if asan:
         flags.append("-U_FORTIFY_SOURCE")
         js_flags.append("-U_FORTIFY_SOURCE")
 
     # fno-common -----------------------------------------
     # Do not merge variables for ASAN; can detect some subtle bugs
     if asan:
         # clang-cl does not recognize the flag, it must be passed down to clang
         if c_compiler.type == 'clang-cl':
             flags.append("-Xclang")
         flags.append("-fno-common")
 
     return namespace(
         flags=flags,
+        ldflags=ldflags,
         js_flags=js_flags,
+        js_ldflags=js_ldflags,
     )
 
 
 add_old_configure_assignment('MOZ_HARDENING_CFLAGS', security_hardening_cflags.flags)
+add_old_configure_assignment('MOZ_HARDENING_LDFLAGS', security_hardening_cflags.ldflags)
 add_old_configure_assignment('MOZ_HARDENING_CFLAGS_JS', security_hardening_cflags.js_flags)
+add_old_configure_assignment('MOZ_HARDENING_LDFLAGS_JS', security_hardening_cflags.js_ldflags)
 
 # Code Coverage
 # ==============================================================
 
 js_option('--enable-coverage', env='MOZ_CODE_COVERAGE',
           help='Enable code coverage')
 
 
--- a/build/unix/elfhack/elfhack.cpp
+++ b/build/unix/elfhack/elfhack.cpp
@@ -10,26 +10,26 @@
 #include "elfxx.h"
 #include "mozilla/CheckedInt.h"
 
 #define ver "0"
 #define elfhack_data ".elfhack.data.v" ver
 #define elfhack_text ".elfhack.text.v" ver
 
 #ifndef R_ARM_V4BX
-#define R_ARM_V4BX 0x28
+#  define R_ARM_V4BX 0x28
 #endif
 #ifndef R_ARM_CALL
-#define R_ARM_CALL 0x1c
+#  define R_ARM_CALL 0x1c
 #endif
 #ifndef R_ARM_JUMP24
-#define R_ARM_JUMP24 0x1d
+#  define R_ARM_JUMP24 0x1d
 #endif
 #ifndef R_ARM_THM_JUMP24
-#define R_ARM_THM_JUMP24 0x1e
+#  define R_ARM_THM_JUMP24 0x1e
 #endif
 
 char *rundir = nullptr;
 
 template <typename T>
 struct wrapped {
   T value;
 };
--- a/build/unix/elfhack/inject.c
+++ b/build/unix/elfhack/inject.c
@@ -8,21 +8,21 @@
 #include <sys/mman.h>
 #include <elf.h>
 
 /* The Android NDK headers define those */
 #undef Elf_Ehdr
 #undef Elf_Addr
 
 #if defined(__LP64__)
-#define Elf_Ehdr Elf64_Ehdr
-#define Elf_Addr Elf64_Addr
+#  define Elf_Ehdr Elf64_Ehdr
+#  define Elf_Addr Elf64_Addr
 #else
-#define Elf_Ehdr Elf32_Ehdr
-#define Elf_Addr Elf32_Addr
+#  define Elf_Ehdr Elf32_Ehdr
+#  define Elf_Addr Elf32_Addr
 #endif
 
 extern __attribute__((visibility("hidden"))) void original_init(int argc,
                                                                 char **argv,
                                                                 char **env);
 
 extern __attribute__((visibility("hidden"))) Elf32_Rel relhack[];
 extern __attribute__((visibility("hidden"))) Elf_Ehdr elf_header;
--- a/build/unix/elfhack/test.c
+++ b/build/unix/elfhack/test.c
@@ -78,41 +78,41 @@ DEF(cheat)
 DEF(by)
 DEF(including)
 DEF(these)
 DEF(phrases)
 DEF(several)
 DEF(times)
 
 #else
-#pragma GCC visibility push(default)
-#include <stdlib.h>
-#include <stdio.h>
+#  pragma GCC visibility push(default)
+#  include <stdlib.h>
+#  include <stdio.h>
 
-#define DEF(w) static const char str_##w[] = #w;
-#include "test.c"
-#undef DEF
+#  define DEF(w) static const char str_##w[] = #  w;
+#  include "test.c"
+#  undef DEF
 
 const char *strings[] = {
-#define DEF(w) str_##w,
-#include "test.c"
-#include "test.c"
-#include "test.c"
+#  define DEF(w) str_##w,
+#  include "test.c"
+#  include "test.c"
+#  include "test.c"
 };
 
 /* Create a hole between two zones of relative relocations */
 const int hole[] = {42, 42, 42, 42};
 
 const char *strings2[] = {
-#include "test.c"
-#include "test.c"
-#include "test.c"
-#include "test.c"
-#include "test.c"
-#undef DEF
+#  include "test.c"
+#  include "test.c"
+#  include "test.c"
+#  include "test.c"
+#  include "test.c"
+#  undef DEF
 };
 
 static int ret = 1;
 
 int print_status() {
   fprintf(stderr, "%s\n", ret ? "FAIL" : "PASS");
   return ret;
 }
@@ -139,30 +139,30 @@ void end_test() {
     // Avoid the dummy variable being stripped out at link time because
     // it's unused.
     dummy = 1;
   }
 }
 
 void test() {
   int i = 0, j = 0;
-#define DEF_(a, i, w) \
-  if (a[i++] != str_##w) return;
-#define DEF(w) DEF_(strings, i, w)
-#include "test.c"
-#include "test.c"
-#include "test.c"
-#undef DEF
-#define DEF(w) DEF_(strings2, j, w)
-#include "test.c"
-#include "test.c"
-#include "test.c"
-#include "test.c"
-#include "test.c"
-#undef DEF
+#  define DEF_(a, i, w) \
+    if (a[i++] != str_##w) return;
+#  define DEF(w) DEF_(strings, i, w)
+#  include "test.c"
+#  include "test.c"
+#  include "test.c"
+#  undef DEF
+#  define DEF(w) DEF_(strings2, j, w)
+#  include "test.c"
+#  include "test.c"
+#  include "test.c"
+#  include "test.c"
+#  include "test.c"
+#  undef DEF
   if (i != sizeof(strings) / sizeof(strings[0]) &&
       j != sizeof(strings2) / sizeof(strings2[0]))
     fprintf(stderr, "WARNING: Test doesn't cover the whole array\n");
   end_test();
 }
 
-#pragma GCC visibility pop
+#  pragma GCC visibility pop
 #endif
--- a/build/unix/stdc++compat/stdc++compat.cpp
+++ b/build/unix/stdc++compat/stdc++compat.cpp
@@ -33,18 +33,18 @@ WARNING: all symbols from this file must
 overlap with libstdc++.
 */
 
 #define GLIBCXX_VERSION(a, b, c) (((a) << 16) | ((b) << 8) | (c))
 
 #if MOZ_LIBSTDCXX_VERSION >= GLIBCXX_VERSION(3, 4, 18)
 // Implementation of utility functions for the prime rehash policy used in
 // unordered_map and unordered_set.
-#include <unordered_map>
-#include <tr1/unordered_map>
+#  include <unordered_map>
+#  include <tr1/unordered_map>
 namespace std {
 size_t __attribute__((weak))
 __detail::_Prime_rehash_policy::_M_next_bkt(size_t __n) const {
   tr1::__detail::_Prime_rehash_policy policy(_M_max_load_factor);
   size_t ret = policy._M_next_bkt(__n);
   _M_next_resize = policy._M_next_resize;
   return ret;
 }
@@ -98,35 +98,35 @@ extern "C" void __attribute__((weak)) __
 namespace std {
 __attribute__((weak)) runtime_error::runtime_error(char const* s)
     : runtime_error(std::string(s)) {}
 }  // namespace std
 #endif
 
 #if MOZ_LIBSTDCXX_VERSION >= GLIBCXX_VERSION(3, 4, 21)
 /* Expose the definitions for the old ABI, allowing us to call its functions */
-#define _GLIBCXX_THREAD_ABI_COMPAT 1
-#include <thread>
+#  define _GLIBCXX_THREAD_ABI_COMPAT 1
+#  include <thread>
 
 namespace std {
 /* The old ABI has a thread::_M_start_thread(shared_ptr<_Impl_base>),
  * while the new has thread::_M_start_thread(unique_ptr<_State>, void(*)()).
  * There is an intermediate ABI at version 3.4.21, with
  * thread::_M_start_thread(shared_ptr<_Impl_base>, void(*)()).
  * The void(*)() parameter is only there to keep a reference to pthread_create
  * on the caller side, and is unused in the implementation
  * We're creating an entry point for the new and intermediate ABIs, and make
  * them call the old ABI. */
 
 __attribute__((weak)) void thread::_M_start_thread(shared_ptr<_Impl_base> impl,
                                                    void (*)()) {
   _M_start_thread(std::move(impl));
 }
 
-#if MOZ_LIBSTDCXX_VERSION >= GLIBCXX_VERSION(3, 4, 22)
+#  if MOZ_LIBSTDCXX_VERSION >= GLIBCXX_VERSION(3, 4, 22)
 /* We need a _Impl_base-derived class wrapping a _State to call the old ABI
  * from what we got by diverting the new API */
 struct StateWrapper : public thread::_Impl_base {
   unique_ptr<thread::_State> mState;
 
   StateWrapper(unique_ptr<thread::_State> aState) : mState(std::move(aState)) {}
 
   void _M_run() override { mState->_M_run(); }
@@ -136,17 +136,17 @@ struct StateWrapper : public thread::_Im
                                                    void (*)()) {
   auto impl = std::make_shared<StateWrapper>(std::move(aState));
   _M_start_thread(std::move(impl));
 }
 
 /* For some reason this is a symbol exported by new versions of libstdc++,
  * even though the destructor is default there too */
 __attribute__((weak)) thread::_State::~_State() = default;
-#endif
+#  endif
 }  // namespace std
 #endif
 
 #if MOZ_LIBSTDCXX_VERSION >= GLIBCXX_VERSION(3, 4, 21)
 namespace std {
 /* Instantiate this template to avoid GLIBCXX_3.4.21 symbol versions
  * depending on optimization level */
 template basic_ios<char, char_traits<char> >::operator bool() const;
--- a/chrome/nsChromeRegistryChrome.cpp
+++ b/chrome/nsChromeRegistryChrome.cpp
@@ -6,19 +6,19 @@
 
 #include "mozilla/dom/ContentParent.h"
 #include "RegistryMessageUtils.h"
 #include "nsResProtocolHandler.h"
 
 #include "nsChromeRegistryChrome.h"
 
 #if defined(XP_WIN)
-#include <windows.h>
+#  include <windows.h>
 #elif defined(XP_MACOSX)
-#include <CoreServices/CoreServices.h>
+#  include <CoreServices/CoreServices.h>
 #endif
 
 #include "nsArrayEnumerator.h"
 #include "nsComponentManager.h"
 #include "nsEnumeratorUtils.h"
 #include "nsNetUtil.h"
 #include "nsStringEnumerator.h"
 #include "nsTextFormatter.h"
--- a/config/external/nspr/prcpucfg.h
+++ b/config/external/nspr/prcpucfg.h
@@ -6,26 +6,26 @@
 #ifndef NSPR_PRCPUCFG_H_
 #define NSPR_PRCPUCFG_H_
 
 /*
  * Need to support conditionals that are defined in both the top-level build
  * system as well as NSS' build system for now.
  */
 #if defined(XP_DARWIN) || defined(DARWIN)
-#include "md/_darwin.cfg"
+#  include "md/_darwin.cfg"
 #elif defined(XP_WIN) || defined(_WINDOWS)
-#include "md/_win95.cfg"
+#  include "md/_win95.cfg"
 #elif defined(__FreeBSD__)
-#include "md/_freebsd.cfg"
+#  include "md/_freebsd.cfg"
 #elif defined(__NetBSD__)
-#include "md/_netbsd.cfg"
+#  include "md/_netbsd.cfg"
 #elif defined(__OpenBSD__)
-#include "md/_openbsd.cfg"
+#  include "md/_openbsd.cfg"
 #elif defined(__linux__)
-#include "md/_linux.cfg"
+#  include "md/_linux.cfg"
 #elif defined(__sun__)
-#include "md/_solaris.cfg"
+#  include "md/_solaris.cfg"
 #else
-#error "Unsupported platform!"
+#  error "Unsupported platform!"
 #endif
 
 #endif /* NSPR_PRCPUCFG_H_ */
--- a/config/nsinstall.c
+++ b/config/nsinstall.c
@@ -20,39 +20,39 @@
 #include <string.h>
 #include <unistd.h>
 #include <utime.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include "pathsub.h"
 
 #ifdef HAVE_GETOPT_H
-#include <getopt.h>
+#  include <getopt.h>
 #endif
 
 #ifdef SUNOS4
-#include "sunos4.h"
+#  include "sunos4.h"
 #endif
 
 #ifdef NEXTSTEP
-#include <bsd/libc.h>
+#  include <bsd/libc.h>
 #endif
 
 #ifdef __QNX__
-#include <unix.h>
+#  include <unix.h>
 #endif
 
 #ifdef NEED_S_ISLNK
-#if !defined(S_ISLNK) && defined(S_IFLNK)
-#define S_ISLNK(a) (((a)&S_IFMT) == S_IFLNK)
-#endif
+#  if !defined(S_ISLNK) && defined(S_IFLNK)
+#    define S_ISLNK(a) (((a)&S_IFMT) == S_IFLNK)
+#  endif
 #endif
 
 #ifndef _DIRECTORY_SEPARATOR
-#define _DIRECTORY_SEPARATOR "/"
+#  define _DIRECTORY_SEPARATOR "/"
 #endif /* _DIRECTORY_SEPARATOR */
 
 #ifdef NEED_FCHMOD_PROTO
 extern int fchmod(int fildes, mode_t mode);
 #endif
 
 static void usage(void) {
   fprintf(stderr,
@@ -152,21 +152,21 @@ static void copyfile(char *name, char *t
 
   if (ftruncate(tofd, sb.st_size) < 0) fail("cannot truncate %s", toname);
 #if !defined(VMS)
   if (dotimes) {
     utb.actime = sb.st_atime;
     utb.modtime = sb.st_mtime;
     if (utime(toname, &utb) < 0) fail("cannot set times of %s", toname);
   }
-#ifdef HAVE_FCHMOD
+#  ifdef HAVE_FCHMOD
   if (fchmod(tofd, mode) < 0)
-#else
+#  else
   if (chmod(toname, mode) < 0)
-#endif
+#  endif
     fail("cannot change mode of %s", toname);
 #endif
   if ((owner || group) && fchown(tofd, uid, gid) < 0)
     fail("cannot change owner of %s", toname);
 
   /* Must check for delayed (NFS) write errors on close. */
   if (close(tofd) < 0) fail("cannot write to %s", toname);
   close(fromfd);
@@ -285,36 +285,36 @@ int main(int argc, char **argv) {
   if ((stat(todir, &sb) < 0 || !S_ISDIR(sb.st_mode)) &&
       mkdirs(todir, 0777) < 0) {
     fail("cannot make directory %s", todir);
   }
   if (onlydir) return 0;
 
   if (!cwd) {
 #ifndef NEEDS_GETCWD
-#ifndef GETCWD_CANT_MALLOC
+#  ifndef GETCWD_CANT_MALLOC
     cwd = getcwd(0, PATH_MAX);
-#else
+#  else
     cwd = malloc(PATH_MAX + 1);
     cwd = getcwd(cwd, PATH_MAX);
-#endif
+#  endif
 #else
     cwd = malloc(PATH_MAX + 1);
     cwd = getwd(cwd);
 #endif
   }
 
   xchdir(todir);
 #ifndef NEEDS_GETCWD
-#ifndef GETCWD_CANT_MALLOC
+#  ifndef GETCWD_CANT_MALLOC
   todir = getcwd(0, PATH_MAX);
-#else
+#  else
   todir = malloc(PATH_MAX + 1);
   todir = getcwd(todir, PATH_MAX);
-#endif
+#  endif
 #else
   todir = malloc(PATH_MAX + 1);
   todir = getwd(todir);
 #endif
   tdlen = strlen(todir);
   xchdir(cwd);
   tdlen = strlen(todir);
 
--- a/config/pathsub.c
+++ b/config/pathsub.c
@@ -15,21 +15,21 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
 #include <sys/stat.h>
 #include "pathsub.h"
 
 #ifdef USE_REENTRANT_LIBC
-#include <libc_r.h>
+#  include <libc_r.h>
 #endif
 
 #ifdef SUNOS4
-#include "sunos4.h"
+#  include "sunos4.h"
 #endif
 
 char *program;
 
 void fail(const char *format, ...) {
   int error;
   va_list ap;
 
@@ -65,17 +65,17 @@ char *getcomponent(char *path, char *nam
     } while (*path != '/' && *path != '\0');
   }
   *name = '\0';
   while (*path == '/') path++;
   return path;
 }
 
 #ifdef LAME_READDIR
-#include <sys/param.h>
+#  include <sys/param.h>
 /*
 ** The static buffer in Unixware's readdir is too small.
 */
 struct dirent *readdir(DIR *d) {
   static struct dirent *buf = NULL;
 
   if (buf == NULL)
     buf = (struct dirent *)malloc(sizeof(struct dirent) + MAXPATHLEN);
--- a/config/pathsub.h
+++ b/config/pathsub.h
@@ -9,17 +9,17 @@
 ** Pathname subroutines.
 **
 ** Brendan Eich, 8/29/95
 */
 #include <limits.h>
 #include <sys/types.h>
 
 #ifndef PATH_MAX
-#define PATH_MAX 1024
+#  define PATH_MAX 1024
 #endif
 
 /*
  * Just prevent stupidity
  */
 #undef NAME_MAX
 #define NAME_MAX 256
 
--- a/devtools/client/shared/widgets/FastListWidget.js
+++ b/devtools/client/shared/widgets/FastListWidget.js
@@ -188,19 +188,18 @@ FastListWidget.prototype = {
    *        The element to make visible.
    */
   ensureElementIsVisible: function(element) {
     if (!element) {
       return;
     }
 
     // Ensure the element is visible but not scrolled horizontally.
-    const scrollbox = this._list;
-    scrollbox.ensureElementIsVisible(element);
-    scrollbox.scrollBy(-this._list.clientWidth, 0);
+    element.scrollIntoView({ block: "nearest" });
+    this._list.scrollBy(-this._list.clientWidth, 0);
   },
 
   /**
    * Sets the text displayed in this container when empty.
    * @param string aValue
    */
   set _textWhenEmpty(value) {
     if (this._emptyTextNode) {
--- a/devtools/client/shared/widgets/SideMenuWidget.jsm
+++ b/devtools/client/shared/widgets/SideMenuWidget.jsm
@@ -221,19 +221,18 @@ SideMenuWidget.prototype = {
    *        The element to make visible.
    */
   ensureElementIsVisible: function(aElement) {
     if (!aElement) {
       return;
     }
 
     // Ensure the element is visible but not scrolled horizontally.
-    const scrollbox = this._list;
-    scrollbox.ensureElementIsVisible(aElement);
-    scrollbox.scrollBy(-this._list.clientWidth, 0);
+    aElement.scrollIntoView({ block: "nearest" });
+    this._list.scrollBy(-this._list.clientWidth, 0);
   },
 
   /**
    * Shows all the groups, even the ones with no visible children.
    */
   showEmptyGroups: function() {
     for (const group of this._orderedGroupElementsArray) {
       group.hidden = false;
--- a/devtools/client/shared/widgets/SimpleListWidget.jsm
+++ b/devtools/client/shared/widgets/SimpleListWidget.jsm
@@ -165,19 +165,18 @@ SimpleListWidget.prototype = {
    *        The element to make visible.
    */
   ensureElementIsVisible: function(aElement) {
     if (!aElement) {
       return;
     }
 
     // Ensure the element is visible but not scrolled horizontally.
-    const scrollbox = this._list;
-    scrollbox.ensureElementIsVisible(aElement);
-    scrollbox.scrollBy(-this._list.clientWidth, 0);
+    aElement.scrollIntoView({ block: "nearest" });
+    this._list.scrollBy(-this._list.clientWidth, 0);
   },
 
   /**
    * Sets the text displayed permanently in this container as a header.
    * @param string aValue
    */
   set _textAsHeader(aValue) {
     if (this._headerTextNode) {
--- a/devtools/client/shared/widgets/VariablesView.jsm
+++ b/devtools/client/shared/widgets/VariablesView.jsm
@@ -785,17 +785,17 @@ VariablesView.prototype = {
   _focusItem: function(aItem, aCollapseFlag) {
     if (!aItem.focusable) {
       return false;
     }
     if (aCollapseFlag) {
       aItem.collapse();
     }
     aItem._target.focus();
-    this._list.ensureElementIsVisible(aItem._arrow);
+    aItem._arrow.scrollIntoView({ block: "nearest" });
     return true;
   },
 
   /**
    * Listener handling a key down event on the view.
    */
   _onViewKeyDown: function(e) {
     const item = this.getFocusedItem();
@@ -3964,17 +3964,17 @@ Editable.prototype = {
     // element's specified label location.
     const input = this._input = this._variable.document.createXULElement("textbox");
     input.className = "plain " + this.className;
     input.setAttribute("value", initialString);
     input.setAttribute("flex", "1");
 
     // Replace the specified label with a textbox input element.
     label.parentNode.replaceChild(input, label);
-    this._variable._variablesView._list.ensureElementIsVisible(input);
+    input.scrollIntoView({ block: "nearest" });
     input.select();
 
     // When the value is a string (displayed as "value"), then we probably want
     // to change it to another string in the textbox, so to avoid typing the ""
     // again, tackle with the selection bounds just a bit.
     if (initialString.match(/^".+"$/)) {
       input.selectionEnd--;
       input.selectionStart++;
--- a/docshell/base/nsAboutRedirector.cpp
+++ b/docshell/base/nsAboutRedirector.cpp
@@ -7,21 +7,21 @@
 #include "nsAboutRedirector.h"
 #include "nsNetUtil.h"
 #include "nsAboutProtocolUtils.h"
 #include "nsBaseChannel.h"
 #include "mozilla/ArrayUtils.h"
 #include "nsIProtocolHandler.h"
 
 #if defined(MOZ_WIDGET_ANDROID) && defined(RELEASE_OR_BETA)
-#define ABOUT_CONFIG_BLOCKED_GV
+#  define ABOUT_CONFIG_BLOCKED_GV
 #endif
 
 #ifdef ABOUT_CONFIG_BLOCKED_GV
-#include "mozilla/jni/Utils.h"  // for mozilla::jni::IsFennec()
+#  include "mozilla/jni/Utils.h"  // for mozilla::jni::IsFennec()
 #endif
 
 NS_IMPL_ISUPPORTS(nsAboutRedirector, nsIAboutModule)
 
 struct RedirEntry {
   const char* id;
   const char* url;
   uint32_t flags;
--- a/docshell/base/nsDefaultURIFixup.cpp
+++ b/docshell/base/nsDefaultURIFixup.cpp
@@ -7,17 +7,17 @@
 #include "nsNetCID.h"
 #include "nsNetUtil.h"
 #include "nsIProtocolHandler.h"
 
 #include "nsIFile.h"
 #include <algorithm>
 
 #ifdef MOZ_TOOLKIT_SEARCH
-#include "nsIBrowserSearchService.h"
+#  include "nsIBrowserSearchService.h"
 #endif
 
 #include "nsIURIFixup.h"
 #include "nsIURIMutator.h"
 #include "nsDefaultURIFixup.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/dom/ContentChild.h"
 #include "mozilla/ipc/IPCStreamUtils.h"
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -4,20 +4,20 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsDocShell.h"
 
 #include <algorithm>
 
 #ifdef XP_WIN
-#include <process.h>
-#define getpid _getpid
+#  include <process.h>
+#  define getpid _getpid
 #else
-#include <unistd.h>  // for getpid()
+#  include <unistd.h>  // for getpid()
 #endif
 
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/AutoRestore.h"
 #include "mozilla/BasePrincipal.h"
 #include "mozilla/Casting.h"
 #include "mozilla/Encoding.h"
@@ -204,27 +204,27 @@
 #include "mozilla/NullPrincipal.h"
 #include "Navigator.h"
 #include "prenv.h"
 #include "URIUtils.h"
 
 #include "timeline/JavascriptTimelineMarker.h"
 
 #ifdef MOZ_PLACES
-#include "nsIFaviconService.h"
-#include "mozIPlacesPendingOperation.h"
+#  include "nsIFaviconService.h"
+#  include "mozIPlacesPendingOperation.h"
 #endif
 
 #if NS_PRINT_PREVIEW
-#include "nsIDocumentViewerPrint.h"
-#include "nsIWebBrowserPrint.h"
+#  include "nsIDocumentViewerPrint.h"
+#  include "nsIWebBrowserPrint.h"
 #endif
 
 #ifdef MOZ_TOOLKIT_SEARCH
-#include "nsIBrowserSearchService.h"
+#  include "nsIBrowserSearchService.h"
 #endif
 
 using namespace mozilla;
 using namespace mozilla::dom;
 using namespace mozilla::net;
 
 // Threshold value in ms for META refresh based redirects
 #define REFRESH_REDIRECT_TIMER 15000
@@ -1057,19 +1057,18 @@ nsDOMNavigationTiming* nsDocShell::GetNa
     innerOriginURI = NS_GetInnermostURI(originURI);
   }
 
   rv = targetDocument->NodePrincipal()->GetURI(getter_AddRefs(targetURI));
   if (NS_SUCCEEDED(rv) && targetURI) {
     innerTargetURI = NS_GetInnermostURI(targetURI);
   }
 
-  return innerOriginURI && innerTargetURI &&
-    SchemeIsFile(innerOriginURI) &&
-    SchemeIsFile(innerTargetURI);
+  return innerOriginURI && innerTargetURI && SchemeIsFile(innerOriginURI) &&
+         SchemeIsFile(innerTargetURI);
 }
 
 nsPresContext* nsDocShell::GetEldestPresContext() {
   nsIContentViewer* viewer = mContentViewer;
   while (viewer) {
     nsIContentViewer* prevViewer = viewer->GetPreviousViewer();
     if (!prevViewer) {
       return viewer->GetPresContext();
@@ -5503,18 +5502,18 @@ nsDocShell::GetAllowMixedContentAndConne
   // now get the document from sameTypeRoot
   RefPtr<Document> rootDoc = sameTypeRoot->GetDocument();
   if (rootDoc) {
     nsCOMPtr<nsIPrincipal> rootPrincipal = rootDoc->NodePrincipal();
 
     // For things with system principal (e.g. scratchpad) there is no uri
     // aRootHasSecureConnection should be false.
     nsCOMPtr<nsIURI> rootUri = rootPrincipal->GetURI();
-    if (nsContentUtils::IsSystemPrincipal(rootPrincipal) ||
-        !rootUri || !SchemeIsHTTPS(rootUri)) {
+    if (nsContentUtils::IsSystemPrincipal(rootPrincipal) || !rootUri ||
+        !SchemeIsHTTPS(rootUri)) {
       *aRootHasSecureConnection = false;
     }
 
     // Check the root doc's channel against the root docShell's
     // mMixedContentChannel to see if they are the same. If they are the same,
     // the user has overriden the block.
     nsCOMPtr<nsIDocShell> rootDocShell = do_QueryInterface(sameTypeRoot);
     nsCOMPtr<nsIChannel> mixedChannel;
@@ -9765,19 +9764,18 @@ nsresult nsDocShell::DoURILoad(nsDocShel
   bool inheritAttrs = false, inheritPrincipal = false;
 
   if (aLoadState->PrincipalToInherit()) {
     inheritAttrs = nsContentUtils::ChannelShouldInheritPrincipal(
         aLoadState->PrincipalToInherit(), aLoadState->URI(),
         true,  // aInheritForAboutBlank
         isSrcdoc);
 
-    bool isURIUniqueOrigin =
-        nsIOService::IsDataURIUniqueOpaqueOrigin() &&
-        SchemeIsData(aLoadState->URI());
+    bool isURIUniqueOrigin = nsIOService::IsDataURIUniqueOpaqueOrigin() &&
+                             SchemeIsData(aLoadState->URI());
     inheritPrincipal = inheritAttrs && !isURIUniqueOrigin;
   }
 
   nsLoadFlags loadFlags = mDefaultLoadFlags;
   nsSecurityFlags securityFlags =
       nsILoadInfo::SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL;
 
   if (aLoadState->FirstParty()) {
@@ -9887,18 +9885,18 @@ nsresult nsDocShell::DoURILoad(nsDocShel
   } else if (SchemeIsViewSource(aLoadState->URI())) {
     nsViewSourceHandler* vsh = nsViewSourceHandler::GetInstance();
     NS_ENSURE_TRUE(vsh, NS_ERROR_FAILURE);
 
     rv = vsh->NewSrcdocChannel(aLoadState->URI(), baseURI, aSrcdoc, loadInfo,
                                getter_AddRefs(channel));
   } else {
     rv = NS_NewInputStreamChannelInternal(
-      getter_AddRefs(channel), aLoadState->URI(), aSrcdoc,
-      NS_LITERAL_CSTRING("text/html"), loadInfo, true);
+        getter_AddRefs(channel), aLoadState->URI(), aSrcdoc,
+        NS_LITERAL_CSTRING("text/html"), loadInfo, true);
     NS_ENSURE_SUCCESS(rv, rv);
     nsCOMPtr<nsIInputStreamChannel> isc = do_QueryInterface(channel);
     MOZ_ASSERT(isc);
     isc->SetBaseURI(baseURI);
   }
 
   // Navigational requests that are same origin need to be upgraded in case
   // upgrade-insecure-requests is present. Please note that in that case
--- a/docshell/base/nsDocShellEditorData.h
+++ b/docshell/base/nsDocShellEditorData.h
@@ -2,17 +2,17 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #ifndef nsDocShellEditorData_h__
 #define nsDocShellEditorData_h__
 
 #ifndef nsCOMPtr_h___
-#include "nsCOMPtr.h"
+#  include "nsCOMPtr.h"
 #endif
 
 #include "mozilla/HTMLEditor.h"
 #include "mozilla/RefPtr.h"
 #include "nsIHTMLDocument.h"
 
 class nsIDocShell;
 class nsIEditingSession;
--- a/docshell/base/nsDocShellLoadTypes.h
+++ b/docshell/base/nsDocShellLoadTypes.h
@@ -4,37 +4,37 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef nsDocShellLoadTypes_h_
 #define nsDocShellLoadTypes_h_
 
 #ifdef MOZILLA_INTERNAL_API
 
-#include "nsDOMNavigationTiming.h"
-#include "nsIDocShell.h"
-#include "nsIWebNavigation.h"
+#  include "nsDOMNavigationTiming.h"
+#  include "nsIDocShell.h"
+#  include "nsIWebNavigation.h"
 
 /**
  * Load flag for error pages. This uses one of the reserved flag
  * values from nsIWebNavigation.
  */
-#define LOAD_FLAGS_ERROR_PAGE 0x0001U
+#  define LOAD_FLAGS_ERROR_PAGE 0x0001U
 
-#define MAKE_LOAD_TYPE(type, flags) ((type) | ((flags) << 16))
-#define LOAD_TYPE_HAS_FLAGS(type, flags) ((type) & ((flags) << 16))
+#  define MAKE_LOAD_TYPE(type, flags) ((type) | ((flags) << 16))
+#  define LOAD_TYPE_HAS_FLAGS(type, flags) ((type) & ((flags) << 16))
 
 /**
  * These are flags that confuse ConvertLoadTypeToDocShellLoadInfo and should
  * not be passed to MAKE_LOAD_TYPE.  In particular this includes all flags
  * above 0xffff (e.g. LOAD_FLAGS_BYPASS_CLASSIFIER), since MAKE_LOAD_TYPE would
  * just shift them out anyway.
  */
-#define EXTRA_LOAD_FLAGS \
-  (LOAD_FLAGS_FIRST_LOAD | LOAD_FLAGS_ALLOW_POPUPS | 0xffff0000)
+#  define EXTRA_LOAD_FLAGS \
+    (LOAD_FLAGS_FIRST_LOAD | LOAD_FLAGS_ALLOW_POPUPS | 0xffff0000)
 
 /* load types are legal combinations of load commands and flags
  *
  * NOTE:
  *  Remember to update the IsValidLoadType function below if you change this
  *  enum to ensure bad flag combinations will be rejected.
  */
 enum LoadType : uint32_t {
--- a/docshell/build/nsDocShellModule.cpp
+++ b/docshell/build/nsDocShellModule.cpp
@@ -21,20 +21,20 @@
 #include "nsOSHelperAppService.h"
 #include "nsOSPermissionRequest.h"
 #include "nsExternalProtocolHandler.h"
 #include "nsPrefetchService.h"
 #include "nsOfflineCacheUpdate.h"
 #include "nsLocalHandlerApp.h"
 #include "ContentHandlerService.h"
 #ifdef MOZ_ENABLE_DBUS
-#include "nsDBusHandlerApp.h"
+#  include "nsDBusHandlerApp.h"
 #endif
 #if defined(MOZ_WIDGET_ANDROID)
-#include "nsExternalURLHandlerService.h"
+#  include "nsExternalURLHandlerService.h"
 #endif
 
 // session history
 #include "nsSHEntry.h"
 #include "nsSHEntryShared.h"
 #include "nsSHistory.h"
 
 using mozilla::dom::ContentHandlerService;
--- a/docshell/shistory/nsSHistory.cpp
+++ b/docshell/shistory/nsSHistory.cpp
@@ -220,19 +220,19 @@ NS_INTERFACE_MAP_BEGIN(nsSHistory)
   NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
 NS_INTERFACE_MAP_END
 
 // static
 uint32_t nsSHistory::CalcMaxTotalViewers() {
 // This value allows tweaking how fast the allowed amount of content viewers
 // grows with increasing amounts of memory. Larger values mean slower growth.
 #ifdef ANDROID
-#define MAX_TOTAL_VIEWERS_BIAS 15.9
+#  define MAX_TOTAL_VIEWERS_BIAS 15.9
 #else
-#define MAX_TOTAL_VIEWERS_BIAS 14
+#  define MAX_TOTAL_VIEWERS_BIAS 14
 #endif
 
   // Calculate an estimate of how many ContentViewers we should cache based
   // on RAM.  This assumes that the average ContentViewer is 4MB (conservative)
   // and caps the max at 8 ContentViewers
   //
   // TODO: Should we split the cache memory betw. ContentViewer caching and
   // nsCacheService?
@@ -655,28 +655,28 @@ nsresult nsSHistory::PrintHistory() {
   for (int32_t i = 0; i < Length(); i++) {
     nsCOMPtr<nsISHEntry> entry = mEntries[i];
     nsCOMPtr<nsILayoutHistoryState> layoutHistoryState =
         entry->GetLayoutHistoryState();
     nsCOMPtr<nsIURI> uri = entry->GetURI();
     nsString title;
     entry->GetTitle(title);
 
-#if 0
+#  if 0
     nsAutoCString url;
     if (uri) {
       uri->GetSpec(url);
     }
 
     printf("**** SH Entry #%d: %x\n", i, entry.get());
     printf("\t\t URL = %s\n", url.get());
 
     printf("\t\t Title = %s\n", NS_LossyConvertUTF16toASCII(title).get());
     printf("\t\t layout History Data = %x\n", layoutHistoryState.get());
-#endif
+#  endif
   }
 
   return NS_OK;
 }
 #endif
 
 void nsSHistory::WindowIndices(int32_t aIndex, int32_t* aOutStartIndex,
                                int32_t* aOutEndIndex) {
--- a/dom/animation/Animation.h
+++ b/dom/animation/Animation.h
@@ -20,17 +20,17 @@
 #include "mozilla/dom/AnimationEffect.h"
 #include "mozilla/dom/AnimationTimeline.h"
 #include "mozilla/dom/Promise.h"
 #include "nsCSSPropertyID.h"
 #include "nsIGlobalObject.h"
 
 // X11 has a #define for CurrentTime.
 #ifdef CurrentTime
-#undef CurrentTime
+#  undef CurrentTime
 #endif
 
 struct JSContext;
 class nsCSSPropertyIDSet;
 class nsIFrame;
 
 namespace mozilla {
 
--- a/dom/base/AttrArray.h
+++ b/dom/base/AttrArray.h
@@ -164,18 +164,18 @@ class AttrArray {
   /**
    * Guts of UpdateMappedAttrRuleMapper for the case  when we have mapped attrs.
    */
   nsresult DoUpdateMappedAttrRuleMapper(nsMappedAttributeElement& aElement);
 
 #ifdef _MSC_VER
 // Disable MSVC warning 'nonstandard extension used: zero-sized array in
 // struct/union'
-#pragma warning(push)
-#pragma warning(disable : 4200)
+#  pragma warning(push)
+#  pragma warning(disable : 4200)
 #endif
   class Impl {
    public:
     constexpr static size_t AllocationSizeForAttributes(uint32_t aAttrCount) {
       return sizeof(Impl) + aAttrCount * sizeof(InternalAttr);
     }
 
     mozilla::Span<const InternalAttr> NonMappedAttrs() const {
@@ -196,17 +196,17 @@ class AttrArray {
 
     // Manually refcounted.
     nsMappedAttributes* mMappedAttrs;
 
     // Allocated in the same buffer as `Impl`.
     InternalAttr mBuffer[0];
   };
 #ifdef _MSC_VER
-#pragma warning(pop)
+#  pragma warning(pop)
 #endif
 
   mozilla::Span<InternalAttr> NonMappedAttrs() {
     return mImpl ? mImpl->NonMappedAttrs() : mozilla::Span<InternalAttr>();
   }
 
   mozilla::Span<const InternalAttr> NonMappedAttrs() const {
     return mImpl ? mImpl->NonMappedAttrs()
--- a/dom/base/DOMException.h
+++ b/dom/base/DOMException.h
@@ -4,18 +4,18 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_DOMException_h__
 #define mozilla_dom_DOMException_h__
 
 // We intentionally shadow non-virtual methods, but gcc gets confused.
 #ifdef __GNUC__
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Woverloaded-virtual"
+#  pragma GCC diagnostic push
+#  pragma GCC diagnostic ignored "-Woverloaded-virtual"
 #endif
 
 #include <stdint.h>
 #include "jspubtd.h"
 #include "nsCOMPtr.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsID.h"
 #include "nsWrapperCache.h"
@@ -172,12 +172,12 @@ class DOMException : public Exception {
 
   uint16_t mCode;
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #ifdef __GNUC__
-#pragma GCC diagnostic pop
+#  pragma GCC diagnostic pop
 #endif
 
 #endif
--- a/dom/base/DocGroup.cpp
+++ b/dom/base/DocGroup.cpp
@@ -8,20 +8,20 @@
 #include "mozilla/dom/DOMTypes.h"
 #include "mozilla/dom/TabGroup.h"
 #include "mozilla/PerformanceUtils.h"
 #include "mozilla/StaticPrefs.h"
 #include "mozilla/Telemetry.h"
 #include "nsIDocShell.h"
 #include "nsDOMMutationObserver.h"
 #if defined(XP_WIN)
-#include <processthreadsapi.h>  // for GetCurrentProcessId()
+#  include <processthreadsapi.h>  // for GetCurrentProcessId()
 #else
-#include <unistd.h>  // for getpid()
-#endif               // defined(XP_WIN)
+#  include <unistd.h>  // for getpid()
+#endif                 // defined(XP_WIN)
 
 namespace mozilla {
 namespace dom {
 
 AutoTArray<RefPtr<DocGroup>, 2>* DocGroup::sPendingDocGroups = nullptr;
 
 /* static */ nsresult DocGroup::GetKey(nsIPrincipal* aPrincipal,
                                        nsACString& aKey) {
--- a/dom/base/Document.cpp
+++ b/dom/base/Document.cpp
@@ -261,22 +261,22 @@
 #include "mozilla/ServoStyleSet.h"
 #include "mozilla/StyleSheet.h"
 #include "mozilla/StyleSheetInlines.h"
 #include "mozilla/dom/SVGDocument.h"
 #include "mozilla/dom/SVGSVGElement.h"
 #include "mozilla/dom/DocGroup.h"
 #include "mozilla/dom/TabGroup.h"
 #ifdef MOZ_XUL
-#include "mozilla/dom/XULBroadcastManager.h"
-#include "mozilla/dom/XULPersist.h"
-#include "nsIXULWindow.h"
-#include "nsXULCommandDispatcher.h"
-#include "nsXULPopupManager.h"
-#include "nsIDocShellTreeOwner.h"
+#  include "mozilla/dom/XULBroadcastManager.h"
+#  include "mozilla/dom/XULPersist.h"
+#  include "nsIXULWindow.h"
+#  include "nsXULCommandDispatcher.h"
+#  include "nsXULPopupManager.h"
+#  include "nsIDocShellTreeOwner.h"
 #endif
 #include "nsIPresShellInlines.h"
 #include "mozilla/dom/BoxObject.h"
 
 #include "mozilla/DocLoadingTimelineMarker.h"
 
 #include "mozilla/dom/WindowGlobalChild.h"
 
@@ -7336,17 +7336,17 @@ void Document::CollectDescendantDocument
         aDescendants.AppendElement(entry->mSubDocument);
       }
       subdoc->CollectDescendantDocuments(aDescendants, aCallback);
     }
   }
 }
 
 #ifdef DEBUG_bryner
-#define DEBUG_PAGE_CACHE
+#  define DEBUG_PAGE_CACHE
 #endif
 
 bool Document::CanSavePresentation(nsIRequest* aNewRequest) {
   if (!IsBFCachingAllowed()) {
     return false;
   }
 
   if (EventHandlingSuppressed()) {
--- a/dom/base/Document.h
+++ b/dom/base/Document.h
@@ -59,21 +59,21 @@
 #include "mozilla/ServoBindingTypes.h"
 #include "mozilla/StyleSheet.h"
 #include "mozilla/TimeStamp.h"
 #include "mozilla/UniquePtr.h"
 #include <bitset>  // for member
 
 // windows.h #defines CreateEvent
 #ifdef CreateEvent
-#undef CreateEvent
+#  undef CreateEvent
 #endif
 
 #ifdef MOZILLA_INTERNAL_API
-#include "mozilla/dom/DocumentBinding.h"
+#  include "mozilla/dom/DocumentBinding.h"
 #else
 namespace mozilla {
 namespace dom {
 class ElementCreationOptionsOrString;
 }  // namespace dom
 }  // namespace mozilla
 #endif  // MOZILLA_INTERNAL_API
 
--- a/dom/base/Element.cpp
+++ b/dom/base/Element.cpp
@@ -76,22 +76,22 @@
 #include "mozilla/dom/DirectionalityUtils.h"
 #include "mozilla/dom/Document.h"
 #include "mozilla/dom/DocumentInlines.h"
 #include "nsAttrValueOrString.h"
 #include "nsAttrValueInlines.h"
 #include "nsCSSPseudoElements.h"
 #include "nsWindowSizes.h"
 #ifdef MOZ_XUL
-#include "nsXULElement.h"
+#  include "nsXULElement.h"
 #endif /* MOZ_XUL */
 #include "SVGElement.h"
 #include "nsFrameSelection.h"
 #ifdef DEBUG
-#include "nsRange.h"
+#  include "nsRange.h"
 #endif
 
 #include "nsBindingManager.h"
 #include "nsXBLBinding.h"
 #include "nsPIDOMWindow.h"
 #include "nsPIBoxObject.h"
 #include "mozilla/dom/DOMRect.h"
 #include "nsSVGUtils.h"
@@ -174,19 +174,19 @@ namespace dom {
 // assert so that the error message actually displays the sizes.
 // On 32 bit systems the actual allocated size varies a bit between
 // OSes/compilers.
 //
 // We need different numbers on certain build types to deal with the owning
 // thread pointer that comes with the non-threadsafe refcount on
 // nsIContent.
 #ifdef MOZ_THREAD_SAFETY_OWNERSHIP_CHECKS_SUPPORTED
-#define EXTRA_DOM_NODE_BYTES 8
+#  define EXTRA_DOM_NODE_BYTES 8
 #else
-#define EXTRA_DOM_NODE_BYTES 0
+#  define EXTRA_DOM_NODE_BYTES 0
 #endif
 
 #define ASSERT_NODE_SIZE(type, opt_size_64, opt_size_32)              \
   template <int a, int sizeOn64, int sizeOn32>                        \
   struct Check##type##Size {                                          \
     static_assert((sizeof(void*) == 8 && a == sizeOn64) ||            \
                       (sizeof(void*) == 4 && a <= sizeOn32),          \
                   "DOM size changed");                                \
--- a/dom/base/FragmentOrElement.cpp
+++ b/dom/base/FragmentOrElement.cpp
@@ -59,21 +59,21 @@
 #include "nsDOMString.h"
 #include "nsIScriptSecurityManager.h"
 #include "mozilla/InternalMutationEvent.h"
 #include "mozilla/MouseEvents.h"
 #include "nsNodeUtils.h"
 #include "nsAttrValueOrString.h"
 #include "nsQueryObject.h"
 #ifdef MOZ_XUL
-#include "nsXULElement.h"
+#  include "nsXULElement.h"
 #endif /* MOZ_XUL */
 #include "nsFrameSelection.h"
 #ifdef DEBUG
-#include "nsRange.h"
+#  include "nsRange.h"
 #endif
 
 #include "nsBindingManager.h"
 #include "nsFrameLoader.h"
 #include "nsXBLBinding.h"
 #include "nsPIDOMWindow.h"
 #include "nsPIBoxObject.h"
 #include "nsSVGUtils.h"
--- a/dom/base/IntlUtils.h
+++ b/dom/base/IntlUtils.h
@@ -11,17 +11,17 @@
 #include "xpcprivate.h"
 
 class nsPIDOMWindowInner;
 
 namespace mozilla {
 namespace dom {
 
 #ifdef XP_WIN
-#undef GetLocaleInfo
+#  undef GetLocaleInfo
 #endif
 
 class IntlUtils final : public nsISupports, public nsWrapperCache {
  public:
   explicit IntlUtils(nsPIDOMWindowInner* aWindow);
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(IntlUtils)
--- a/dom/base/Link.cpp
+++ b/dom/base/Link.cpp
@@ -5,19 +5,19 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "Link.h"
 
 #include "mozilla/EventStates.h"
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/dom/Element.h"
 #if defined(MOZ_PLACES)
-#include "mozilla/places/History.h"
+#  include "mozilla/places/History.h"
 #else
-#include "mozilla/IHistory.h"
+#  include "mozilla/IHistory.h"
 #endif
 #include "nsIURL.h"
 #include "nsIURIMutator.h"
 #include "nsISizeOf.h"
 #include "nsIDocShell.h"
 #include "nsIPrefetchService.h"
 #include "nsCPrefetchService.h"
 #include "nsStyleLinkElement.h"
--- a/dom/base/MessageManagerGlobal.cpp
+++ b/dom/base/MessageManagerGlobal.cpp
@@ -5,20 +5,20 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/dom/MessageManagerGlobal.h"
 #include "mozilla/IntentionalCrash.h"
 #include "mozilla/dom/DOMPrefs.h"
 #include "nsContentUtils.h"
 
 #ifdef ANDROID
-#include <android/log.h>
+#  include <android/log.h>
 #endif
 #ifdef XP_WIN
-#include <windows.h>
+#  include <windows.h>
 #endif
 
 namespace mozilla {
 namespace dom {
 
 void MessageManagerGlobal::Dump(const nsAString& aStr) {
   if (!DOMPrefs::DumpEnabled()) {
     return;
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
@@ -90,17 +90,17 @@
 #include "nsIUploadChannel2.h"
 #include "mozilla/dom/FormData.h"
 #include "nsIDocShell.h"
 
 #include "mozilla/dom/WorkerPrivate.h"
 #include "mozilla/dom/WorkerRunnable.h"
 
 #if defined(XP_LINUX)
-#include "mozilla/Hal.h"
+#  include "mozilla/Hal.h"
 #endif
 
 #include "mozilla/EMEUtils.h"
 #include "mozilla/DetailedPromise.h"
 #include "mozilla/Unused.h"
 
 namespace mozilla {
 namespace dom {
--- a/dom/base/PopupBlocker.h
+++ b/dom/base/PopupBlocker.h
@@ -56,19 +56,19 @@ class PopupBlocker final {
   static void Initialize();
   static void Shutdown();
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #ifdef MOZILLA_INTERNAL_API
-#define NS_AUTO_POPUP_STATE_PUSHER nsAutoPopupStatePusherInternal
+#  define NS_AUTO_POPUP_STATE_PUSHER nsAutoPopupStatePusherInternal
 #else
-#define NS_AUTO_POPUP_STATE_PUSHER nsAutoPopupStatePusherExternal
+#  define NS_AUTO_POPUP_STATE_PUSHER nsAutoPopupStatePusherExternal
 #endif
 
 // Helper class that helps with pushing and popping popup control
 // state. Note that this class looks different from within code that's
 // part of the layout library than it does in code outside the layout
 // library.  We give the two object layouts different names so the symbols
 // don't conflict, but code should always use the name
 // |nsAutoPopupStatePusher|.
--- a/dom/base/Selection.cpp
+++ b/dom/base/Selection.cpp
@@ -76,19 +76,19 @@ using namespace mozilla;
 using namespace mozilla::dom;
 
 //#define DEBUG_TABLE 1
 
 static bool IsValidSelectionPoint(nsFrameSelection* aFrameSel, nsINode* aNode);
 
 #ifdef PRINT_RANGE
 static void printRange(nsRange* aDomRange);
-#define DEBUG_OUT_RANGE(x) printRange(x)
+#  define DEBUG_OUT_RANGE(x) printRange(x)
 #else
-#define DEBUG_OUT_RANGE(x)
+#  define DEBUG_OUT_RANGE(x)
 #endif  // PRINT_RANGE
 
 /******************************************************************************
  * Utility methods defined in nsISelectionController.idl
  ******************************************************************************/
 
 namespace mozilla {
 
--- a/dom/base/StructuredCloneHolder.cpp
+++ b/dom/base/StructuredCloneHolder.cpp
@@ -39,18 +39,18 @@
 #include "mozilla/gfx/2D.h"
 #include "mozilla/ipc/BackgroundChild.h"
 #include "mozilla/ipc/BackgroundUtils.h"
 #include "mozilla/ipc/PBackgroundSharedTypes.h"
 #include "MultipartBlobImpl.h"
 #include "nsQueryObject.h"
 
 #ifdef MOZ_WEBRTC
-#include "mozilla/dom/RTCCertificate.h"
-#include "mozilla/dom/RTCCertificateBinding.h"
+#  include "mozilla/dom/RTCCertificate.h"
+#  include "mozilla/dom/RTCCertificateBinding.h"
 #endif
 
 using namespace mozilla::ipc;
 
 namespace mozilla {
 namespace dom {
 
 namespace {
--- a/dom/base/StructuredCloneHolder.h
+++ b/dom/base/StructuredCloneHolder.h
@@ -12,17 +12,17 @@
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/Move.h"
 #include "mozilla/UniquePtr.h"
 #include "mozilla/dom/BindingDeclarations.h"
 #include "nsISupports.h"
 #include "nsTArray.h"
 
 #ifdef DEBUG
-#include "nsIThread.h"
+#  include "nsIThread.h"
 #endif
 
 class nsIInputStream;
 
 namespace mozilla {
 class ErrorResult;
 namespace layers {
 class Image;
--- a/dom/base/nsCCUncollectableMarker.cpp
+++ b/dom/base/nsCCUncollectableMarker.cpp
@@ -46,17 +46,17 @@ using namespace mozilla::dom;
 
 static bool sInited = 0;
 // The initial value of sGeneration should not be the same as the
 // value it is given at xpcom-shutdown, because this will make any GCs
 // before we first CC benignly violate the black-gray invariant, due
 // to dom::TraceBlackJS().
 uint32_t nsCCUncollectableMarker::sGeneration = 1;
 #ifdef MOZ_XUL
-#include "nsXULPrototypeCache.h"
+#  include "nsXULPrototypeCache.h"
 #endif
 
 NS_IMPL_ISUPPORTS(nsCCUncollectableMarker, nsIObserver)
 
 /* static */
 nsresult nsCCUncollectableMarker::Init() {
   if (sInited) {
     return NS_OK;
--- a/dom/base/nsContentList.cpp
+++ b/dom/base/nsContentList.cpp
@@ -26,19 +26,19 @@
 #include "jsfriendapi.h"
 #include <algorithm>
 #include "mozilla/dom/NodeInfoInlines.h"
 #include "mozilla/MruCache.h"
 
 #include "PLDHashTable.h"
 
 #ifdef DEBUG_CONTENT_LIST
-#define ASSERT_IN_SYNC AssertInSync()
+#  define ASSERT_IN_SYNC AssertInSync()
 #else
-#define ASSERT_IN_SYNC PR_BEGIN_MACRO PR_END_MACRO
+#  define ASSERT_IN_SYNC PR_BEGIN_MACRO PR_END_MACRO
 #endif
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
 nsBaseContentList::~nsBaseContentList() {}
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(nsBaseContentList)
--- a/dom/base/nsContentPolicy.cpp
+++ b/dom/base/nsContentPolicy.cpp
@@ -41,30 +41,30 @@ nsresult NS_NewContentPolicy(nsIContentP
   return NS_OK;
 }
 
 nsContentPolicy::nsContentPolicy() : mPolicies(NS_CONTENTPOLICY_CATEGORY) {}
 
 nsContentPolicy::~nsContentPolicy() {}
 
 #ifdef DEBUG
-#define WARN_IF_URI_UNINITIALIZED(uri, name)            \
-  PR_BEGIN_MACRO                                        \
-  if ((uri)) {                                          \
-    nsAutoCString spec;                                 \
-    (uri)->GetAsciiSpec(spec);                          \
-    if (spec.IsEmpty()) {                               \
-      NS_WARNING(name " is uninitialized, fix caller"); \
-    }                                                   \
-  }                                                     \
-  PR_END_MACRO
+#  define WARN_IF_URI_UNINITIALIZED(uri, name)            \
+    PR_BEGIN_MACRO                                        \
+    if ((uri)) {                                          \
+      nsAutoCString spec;                                 \
+      (uri)->GetAsciiSpec(spec);                          \
+      if (spec.IsEmpty()) {                               \
+        NS_WARNING(name " is uninitialized, fix caller"); \
+      }                                                   \
+    }                                                     \
+    PR_END_MACRO
 
 #else  // ! defined(DEBUG)
 
-#define WARN_IF_URI_UNINITIALIZED(uri, name)
+#  define WARN_IF_URI_UNINITIALIZED(uri, name)
 
 #endif  // defined(DEBUG)
 
 inline nsresult nsContentPolicy::CheckPolicy(CPMethod policyMethod,
                                              nsIURI *contentLocation,
                                              nsILoadInfo *loadInfo,
                                              const nsACString &mimeType,
                                              int16_t *decision) {
--- a/dom/base/nsContentSink.h
+++ b/dom/base/nsContentSink.h
@@ -47,31 +47,31 @@ class Document;
 class ScriptLoader;
 }  // namespace dom
 }  // namespace mozilla
 
 #ifdef DEBUG
 
 extern mozilla::LazyLogModule gContentSinkLogModuleInfo;
 
-#define SINK_TRACE_CALLS 0x1
-#define SINK_TRACE_REFLOW 0x2
-#define SINK_ALWAYS_REFLOW 0x4
+#  define SINK_TRACE_CALLS 0x1
+#  define SINK_TRACE_REFLOW 0x2
+#  define SINK_ALWAYS_REFLOW 0x4
 
-#define SINK_LOG_TEST(_lm, _bit) (int((_lm)->Level()) & (_bit))
+#  define SINK_LOG_TEST(_lm, _bit) (int((_lm)->Level()) & (_bit))
 
-#define SINK_TRACE(_lm, _bit, _args) \
-  do {                               \
-    if (SINK_LOG_TEST(_lm, _bit)) {  \
-      printf_stderr _args;           \
-    }                                \
-  } while (0)
+#  define SINK_TRACE(_lm, _bit, _args) \
+    do {                               \
+      if (SINK_LOG_TEST(_lm, _bit)) {  \
+        printf_stderr _args;           \
+      }                                \
+    } while (0)
 
 #else
-#define SINK_TRACE(_lm, _bit, _args)
+#  define SINK_TRACE(_lm, _bit, _args)
 #endif
 
 #undef SINK_NO_INCREMENTAL
 
 //----------------------------------------------------------------------
 
 class nsContentSink : public nsICSSLoaderObserver,
                       public nsSupportsWeakReference,
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
@@ -237,17 +237,17 @@
 #include "mozilla/Encoding.h"
 #include "nsXULElement.h"
 #include "mozilla/RecordReplay.h"
 
 #include "nsIBidiKeyboard.h"
 
 #if defined(XP_WIN)
 // Undefine LoadImage to prevent naming conflict with Windows.
-#undef LoadImage
+#  undef LoadImage
 #endif
 
 extern "C" int MOZ_XMLTranslateEntity(const char* ptr, const char* end,
                                       const char** next, char16_t* result);
 extern "C" int MOZ_XMLCheckQName(const char* ptr, const char* end, int ns_aware,
                                  const char** colon);
 
 class imgLoader;
--- a/dom/base/nsContentUtils.h
+++ b/dom/base/nsContentUtils.h
@@ -5,21 +5,21 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* A namespace class for static content utilities. */
 
 #ifndef nsContentUtils_h___
 #define nsContentUtils_h___
 
 #if defined(XP_WIN)
-#include <float.h>
+#  include <float.h>
 #endif
 
 #if defined(SOLARIS)
-#include <ieeefp.h>
+#  include <ieeefp.h>
 #endif
 
 #include "js/TypeDecls.h"
 #include "js/Value.h"
 #include "js/RootingAPI.h"
 #include "mozilla/dom/FromParser.h"
 #include "mozilla/BasicEvents.h"
 #include "mozilla/CORSMode.h"
@@ -45,17 +45,17 @@
 #include "mozilla/RangeBoundary.h"
 #include "nsIContentPolicy.h"
 #include "mozilla/dom/Document.h"
 #include "nsPIDOMWindow.h"
 #include "nsRFPService.h"
 
 #if defined(XP_WIN)
 // Undefine LoadImage to prevent naming conflict with Windows.
-#undef LoadImage
+#  undef LoadImage
 #endif
 
 class imgICache;
 class imgIContainer;
 class imgINotificationObserver;
 class imgIRequest;
 class imgLoader;
 class imgRequestProxy;
--- a/dom/base/nsCopySupport.cpp
+++ b/dom/base/nsCopySupport.cpp
@@ -38,23 +38,23 @@
 
 // image copy stuff
 #include "nsIImageLoadingContent.h"
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsContentUtils.h"
 #include "nsContentCID.h"
 
 #ifdef XP_WIN
-#include "nsCExternalHandlerService.h"
-#include "nsEscape.h"
-#include "nsIMIMEInfo.h"
-#include "nsIMIMEService.h"
-#include "nsIURL.h"
-#include "nsReadableUtils.h"
-#include "nsXULAppAPI.h"
+#  include "nsCExternalHandlerService.h"
+#  include "nsEscape.h"
+#  include "nsIMIMEInfo.h"
+#  include "nsIMIMEService.h"
+#  include "nsIURL.h"
+#  include "nsReadableUtils.h"
+#  include "nsXULAppAPI.h"
 #endif
 
 #include "mozilla/ContentEvents.h"
 #include "mozilla/dom/Element.h"
 #include "mozilla/EventDispatcher.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/dom/Selection.h"
 #include "mozilla/IntegerRange.h"
--- a/dom/base/nsDOMDataChannel.cpp
+++ b/dom/base/nsDOMDataChannel.cpp
@@ -28,17 +28,17 @@
 
 #undef LOG
 #define LOG(args) \
   MOZ_LOG(mozilla::gDataChannelLog, mozilla::LogLevel::Debug, args)
 
 // Since we've moved the windows.h include down here, we have to explicitly
 // undef GetBinaryType, otherwise we'll get really odd conflicts
 #ifdef GetBinaryType
-#undef GetBinaryType
+#  undef GetBinaryType
 #endif
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
 nsDOMDataChannel::~nsDOMDataChannel() {
   // Don't call us anymore!  Likely isn't an issue (or maybe just less of
   // one) once we block GC until all the (appropriate) onXxxx handlers
--- a/dom/base/nsDOMNavigationTiming.cpp
+++ b/dom/base/nsDOMNavigationTiming.cpp
@@ -15,17 +15,17 @@
 #include "nsIScriptSecurityManager.h"
 #include "prtime.h"
 #include "nsIURI.h"
 #include "nsPrintfCString.h"
 #include "mozilla/dom/PerformanceNavigation.h"
 #include "mozilla/TimeStamp.h"
 #include "mozilla/Telemetry.h"
 #ifdef MOZ_GECKO_PROFILER
-#include "ProfilerMarkerPayload.h"
+#  include "ProfilerMarkerPayload.h"
 #endif
 
 using namespace mozilla;
 
 namespace mozilla {
 
 LazyLogModule gPageLoadLog("PageLoad");
 #define PAGELOAD_LOG(args) MOZ_LOG(gPageLoadLog, LogLevel::Debug, args)
--- a/dom/base/nsDOMWindowUtils.cpp
+++ b/dom/base/nsDOMWindowUtils.cpp
@@ -59,18 +59,18 @@
 #include "nsIContentViewer.h"
 #include "mozilla/StyleAnimationValue.h"
 #include "mozilla/dom/File.h"
 #include "mozilla/dom/FileBinding.h"
 #include "mozilla/dom/DOMRect.h"
 #include <algorithm>
 
 #if defined(MOZ_X11) && defined(MOZ_WIDGET_GTK)
-#include <gdk/gdk.h>
-#include <gdk/gdkx.h>
+#  include <gdk/gdk.h>
+#  include <gdk/gdkx.h>
 #endif
 
 #include "Layers.h"
 #include "gfxPrefs.h"
 
 #include "mozilla/dom/AudioDeviceInfo.h"
 #include "mozilla/dom/Element.h"
 #include "mozilla/dom/TabChild.h"
@@ -112,17 +112,17 @@
 #include "mozilla/StyleSheetInlines.h"
 #include "mozilla/gfx/GPUProcessManager.h"
 #include "mozilla/dom/TimeoutManager.h"
 #include "mozilla/PreloadedStyleSheet.h"
 #include "mozilla/layers/WebRenderBridgeChild.h"
 #include "mozilla/layers/WebRenderLayerManager.h"
 
 #ifdef XP_WIN
-#undef GetClassName
+#  undef GetClassName
 #endif
 
 using namespace mozilla;
 using namespace mozilla::dom;
 using namespace mozilla::ipc;
 using namespace mozilla::layers;
 using namespace mozilla::widget;
 using namespace mozilla::gfx;
--- a/dom/base/nsFocusManager.cpp
+++ b/dom/base/nsFocusManager.cpp
@@ -59,25 +59,25 @@
 #include "mozilla/IMEStateManager.h"
 #include "mozilla/LookAndFeel.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/Services.h"
 #include "mozilla/Unused.h"
 #include <algorithm>
 
 #ifdef MOZ_XUL
-#include "nsIDOMXULMenuListElement.h"
+#  include "nsIDOMXULMenuListElement.h"
 #endif
 
 #ifdef ACCESSIBILITY
-#include "nsAccessibilityService.h"
+#  include "nsAccessibilityService.h"
 #endif
 
 #ifndef XP_MACOSX
-#include "nsIScriptError.h"
+#  include "nsIScriptError.h"
 #endif
 
 using namespace mozilla;
 using namespace mozilla::dom;
 using namespace mozilla::widget;
 
 // Two types of focus pr logging are available:
 //   'Focus' for normal focus manager calls
--- a/dom/base/nsFrameLoader.cpp
+++ b/dom/base/nsFrameLoader.cpp
@@ -102,27 +102,27 @@
 #include "mozilla/dom/ChildSHistory.h"
 #include "mozilla/dom/ChromeBrowsingContext.h"
 
 #include "mozilla/dom/HTMLBodyElement.h"
 
 #include "mozilla/ContentPrincipal.h"
 
 #ifdef XP_WIN
-#include "mozilla/plugins/PPluginWidgetParent.h"
-#include "../plugins/ipc/PluginWidgetParent.h"
+#  include "mozilla/plugins/PPluginWidgetParent.h"
+#  include "../plugins/ipc/PluginWidgetParent.h"
 #endif
 
 #ifdef MOZ_XUL
-#include "nsXULPopupManager.h"
+#  include "nsXULPopupManager.h"
 #endif
 
 #ifdef NS_PRINTING
-#include "mozilla/embedding/printingui/PrintingParent.h"
-#include "nsIWebBrowserPrint.h"
+#  include "mozilla/embedding/printingui/PrintingParent.h"
+#  include "nsIWebBrowserPrint.h"
 #endif
 
 using namespace mozilla;
 using namespace mozilla::hal;
 using namespace mozilla::dom;
 using namespace mozilla::dom::ipc;
 using namespace mozilla::layers;
 using namespace mozilla::layout;
--- a/dom/base/nsFrameMessageManager.cpp
+++ b/dom/base/nsFrameMessageManager.cpp
@@ -58,23 +58,23 @@
 #include "nsPrintfCString.h"
 #include "nsXULAppAPI.h"
 #include "nsQueryObject.h"
 #include "xpcprivate.h"
 #include <algorithm>
 #include "chrome/common/ipc_channel.h"  // for IPC::Channel::kMaximumMessageSize
 
 #ifdef XP_WIN
-#if defined(SendMessage)
-#undef SendMessage
-#endif
+#  if defined(SendMessage)
+#    undef SendMessage
+#  endif
 #endif
 
 #ifdef FUZZING
-#include "MessageManagerFuzzer.h"
+#  include "MessageManagerFuzzer.h"
 #endif
 
 using namespace mozilla;
 using namespace mozilla::dom;
 using namespace mozilla::dom::ipc;
 
 nsFrameMessageManager::nsFrameMessageManager(MessageManagerCallback* aCallback,
                                              MessageManagerFlags aFlags)
--- a/dom/base/nsGlobalWindowCommands.cpp
+++ b/dom/base/nsGlobalWindowCommands.cpp
@@ -102,17 +102,17 @@ constexpr const char *sSelectRightString
 constexpr const char *sSelectUpString = "cmd_selectUp";
 constexpr const char *sSelectDownString = "cmd_selectDown";
 constexpr const char *sSelectLeft2String = "cmd_selectLeft2";
 constexpr const char *sSelectRight2String = "cmd_selectRight2";
 constexpr const char *sSelectUp2String = "cmd_selectUp2";
 constexpr const char *sSelectDown2String = "cmd_selectDown2";
 
 #if 0
-#pragma mark -
+#  pragma mark -
 #endif
 
 // a base class for selection-related commands, for code sharing
 class nsSelectionCommandsBase : public nsIControllerCommand {
  public:
   NS_DECL_ISUPPORTS
   NS_IMETHOD IsCommandEnabled(const char *aCommandName,
                               nsISupports *aCommandContext,
@@ -168,17 +168,17 @@ class nsPhysicalSelectCommand : public n
  public:
   NS_IMETHOD DoCommand(const char *aCommandName,
                        nsISupports *aCommandContext) override;
 
   // no member variables, please, we're stateless!
 };
 
 #if 0
-#pragma mark -
+#  pragma mark -
 #endif
 
 NS_IMPL_ISUPPORTS(nsSelectionCommandsBase, nsIControllerCommand)
 
 NS_IMETHODIMP
 nsSelectionCommandsBase::IsCommandEnabled(const char *aCommandName,
                                           nsISupports *aCommandContext,
                                           bool *outCmdEnabled) {
@@ -224,17 +224,17 @@ nsresult nsSelectionCommandsBase::GetSel
   nsCOMPtr<nsIPresShell> presShell;
   GetPresShellFromWindow(aWindow, getter_AddRefs(presShell));
   if (presShell) return CallQueryInterface(presShell, aSelCon);
 
   return NS_ERROR_FAILURE;
 }
 
 #if 0
-#pragma mark -
+#  pragma mark -
 #endif
 
 // Helpers for nsSelectMoveScrollCommand and nsPhysicalSelectMoveScrollCommand
 static void AdjustFocusAfterCaretMove(nsPIDOMWindowOuter *aWindow) {
   // adjust the focus to the new caret position
   nsIFocusManager *fm = nsFocusManager::GetFocusManager();
   if (fm) {
     RefPtr<dom::Element> result;
@@ -379,17 +379,17 @@ nsresult nsPhysicalSelectMoveScrollComma
       return (selCont->*(cmd.scroll))(forward);
     }
   }
 
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 #if 0
-#pragma mark -
+#  pragma mark -
 #endif
 
 static const struct SelectCommand {
   const char *reverse, *forward;
   nsresult (NS_STDCALL nsISelectionController::*select)(bool, bool);
 } selectCommands[] = {{sSelectCharPreviousString, sSelectCharNextString,
                        &nsISelectionController::CharacterMove},
                       {sSelectWordPreviousString, sSelectWordNextString,
@@ -417,17 +417,17 @@ nsresult nsSelectCommand::DoCommand(cons
     if (forward || !strcmp(aCommandName, selectCommands[i].reverse)) {
       return (selCont->*(selectCommands[i].select))(forward, true);
     }
   }
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 #if 0
-#pragma mark -
+#  pragma mark -
 #endif
 
 static const struct PhysicalSelectCommand {
   const char *command;
   int16_t direction, amount;
 } physicalSelectCommands[] = {
     {sSelectLeftString, nsISelectionController::MOVE_LEFT, 0},
     {sSelectRightString, nsISelectionController::MOVE_RIGHT, 0},
@@ -451,17 +451,17 @@ nsresult nsPhysicalSelectCommand::DoComm
                                    physicalSelectCommands[i].amount, true);
     }
   }
 
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 #if 0
-#pragma mark -
+#  pragma mark -
 #endif
 
 class nsClipboardCommand final : public nsIControllerCommand {
   ~nsClipboardCommand() {}
 
  public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSICONTROLLERCOMMAND
@@ -545,17 +545,17 @@ nsClipboardCommand::GetCommandStateParam
 
 nsresult nsClipboardCommand::DoCommandParams(const char *aCommandName,
                                              nsICommandParams *aParams,
                                              nsISupports *aContext) {
   return DoCommand(aCommandName, aContext);
 }
 
 #if 0
-#pragma mark -
+#  pragma mark -
 #endif
 
 class nsSelectionCommand : public nsIControllerCommand {
  public:
   NS_DECL_ISUPPORTS
   NS_DECL_NSICONTROLLERCOMMAND
 
  protected:
@@ -640,17 +640,17 @@ nsresult nsSelectionCommand::GetContentV
   nsCOMPtr<nsIContentViewerEdit> edit(do_QueryInterface(viewer));
   NS_ENSURE_TRUE(edit, NS_ERROR_FAILURE);
 
   edit.forget(aEditInterface);
   return NS_OK;
 }
 
 #if 0
-#pragma mark -
+#  pragma mark -
 #endif
 
 #define NS_DECL_CLIPBOARD_COMMAND(_cmd)                                       \
   class _cmd : public nsSelectionCommand {                                    \
    protected:                                                                 \
     virtual nsresult IsClipboardCommandEnabled(const char *aCommandName,      \
                                                nsIContentViewerEdit *aEdit,   \
                                                bool *outCmdEnabled) override; \
@@ -673,17 +673,17 @@ nsresult nsClipboardCopyLinkCommand::IsC
 
 nsresult nsClipboardCopyLinkCommand::DoClipboardCommand(
     const char *aCommandName, nsIContentViewerEdit *aEdit,
     nsICommandParams *aParams) {
   return aEdit->CopyLinkLocation();
 }
 
 #if 0
-#pragma mark -
+#  pragma mark -
 #endif
 
 nsresult nsClipboardImageCommands::IsClipboardCommandEnabled(
     const char *aCommandName, nsIContentViewerEdit *aEdit,
     bool *outCmdEnabled) {
   return aEdit->GetInImage(outCmdEnabled);
 }
 
@@ -698,17 +698,17 @@ nsresult nsClipboardImageCommands::DoCli
                       nsIContentViewerEdit::COPY_IMAGE_HTML;
   if (aParams) {
     copyFlags = aParams->AsCommandParams()->GetInt("imageCopy");
   }
   return aEdit->CopyImage(copyFlags);
 }
 
 #if 0
-#pragma mark -
+#  pragma mark -
 #endif
 
 nsresult nsClipboardSelectAllNoneCommands::IsClipboardCommandEnabled(
     const char *aCommandName, nsIContentViewerEdit *aEdit,
     bool *outCmdEnabled) {
   *outCmdEnabled = true;
   return NS_OK;
 }
@@ -717,17 +717,17 @@ nsresult nsClipboardSelectAllNoneCommand
     const char *aCommandName, nsIContentViewerEdit *aEdit,
     nsICommandParams *aParams) {
   if (!nsCRT::strcmp(sSelectAllString, aCommandName)) return aEdit->SelectAll();
 
   return aEdit->ClearSelection();
 }
 
 #if 0
-#pragma mark -
+#  pragma mark -
 #endif
 
 nsresult nsClipboardGetContentsCommand::IsClipboardCommandEnabled(
     const char *aCommandName, nsIContentViewerEdit *aEdit,
     bool *outCmdEnabled) {
   return aEdit->GetCanGetContents(outCmdEnabled);
 }
 
--- a/dom/base/nsGlobalWindowInner.cpp
+++ b/dom/base/nsGlobalWindowInner.cpp
@@ -34,17 +34,17 @@
 #include "mozilla/dom/StorageUtils.h"
 #include "mozilla/dom/Timeout.h"
 #include "mozilla/dom/TimeoutHandler.h"
 #include "mozilla/dom/TimeoutManager.h"
 #include "mozilla/dom/VisualViewport.h"
 #include "mozilla/dom/WindowProxyHolder.h"
 #include "mozilla/IntegerPrintfMacros.h"
 #if defined(MOZ_WIDGET_ANDROID)
-#include "mozilla/dom/WindowOrientationObserver.h"
+#  include "mozilla/dom/WindowOrientationObserver.h"
 #endif
 #include "nsDOMOfflineResourceList.h"
 #include "nsError.h"
 #include "nsIIdleService.h"
 #include "nsISizeOfEventTarget.h"
 #include "nsDOMJSUtils.h"
 #include "nsArrayUtils.h"
 #include "nsDOMWindowList.h"
@@ -145,43 +145,43 @@
 #include "nsIControllers.h"
 #include "nsIControllerContext.h"
 #include "nsGlobalWindowCommands.h"
 #include "nsQueryObject.h"
 #include "nsContentUtils.h"
 #include "nsCSSProps.h"
 #include "nsIURIFixup.h"
 #ifndef DEBUG
-#include "nsIAppStartup.h"
-#include "nsToolkitCompsCID.h"
+#  include "nsIAppStartup.h"
+#  include "nsToolkitCompsCID.h"
 #endif
 #include "nsCDefaultURIFixup.h"
 #include "mozilla/EventDispatcher.h"
 #include "mozilla/EventStateManager.h"
 #include "nsIObserverService.h"
 #include "nsFocusManager.h"
 #include "nsIXULWindow.h"
 #include "nsITimedChannel.h"
 #include "nsServiceManagerUtils.h"
 #ifdef MOZ_XUL
-#include "nsIDOMXULControlElement.h"
-#include "nsMenuPopupFrame.h"
+#  include "nsIDOMXULControlElement.h"
+#  include "nsMenuPopupFrame.h"
 #endif
 #include "mozilla/dom/CustomEvent.h"
 #include "nsIJARChannel.h"
 #include "nsIScreenManager.h"
 #include "nsIEffectiveTLDService.h"
 #include "nsICSSDeclaration.h"
 
 #include "xpcprivate.h"
 
 #ifdef NS_PRINTING
-#include "nsIPrintSettings.h"
-#include "nsIPrintSettingsService.h"
-#include "nsIWebBrowserPrint.h"
+#  include "nsIPrintSettings.h"
+#  include "nsIPrintSettingsService.h"
+#  include "nsIWebBrowserPrint.h"
 #endif
 
 #include "nsWindowRoot.h"
 #include "nsNetCID.h"
 #include "nsIArray.h"
 
 #include "nsBindingManager.h"
 #include "nsXBLService.h"
@@ -246,45 +246,45 @@
 #include "mozilla/dom/SharedWorker.h"
 #include "mozilla/dom/ServiceWorker.h"
 #include "mozilla/dom/ServiceWorkerRegistration.h"
 #include "mozilla/dom/ServiceWorkerRegistrationDescriptor.h"
 #include "mozilla/dom/U2F.h"
 #include "mozilla/dom/WebIDLGlobalNameHash.h"
 #include "mozilla/dom/Worklet.h"
 #ifdef HAVE_SIDEBAR
-#include "mozilla/dom/ExternalBinding.h"
+#  include "mozilla/dom/ExternalBinding.h"
 #endif
 
 #ifdef MOZ_WEBSPEECH
-#include "mozilla/dom/SpeechSynthesis.h"
+#  include "mozilla/dom/SpeechSynthesis.h"
 #endif
 
 #include "mozilla/dom/ClientManager.h"
 #include "mozilla/dom/ClientSource.h"
 #include "mozilla/dom/ClientState.h"
 
 #include "mozilla/dom/WindowGlobalChild.h"
 
 // Apple system headers seem to have a check() macro.  <sigh>
 #ifdef check
 class nsIScriptTimeoutHandler;
-#undef check
+#  undef check
 #endif  // check
 #include "AccessCheck.h"
 
 #ifdef ANDROID
-#include <android/log.h>
+#  include <android/log.h>
 #endif
 
 #ifdef XP_WIN
-#include <process.h>
-#define getpid _getpid
+#  include <process.h>
+#  define getpid _getpid
 #else
-#include <unistd.h>  // for getpid()
+#  include <unistd.h>  // for getpid()
 #endif
 
 using namespace mozilla;
 using namespace mozilla::dom;
 using namespace mozilla::dom::ipc;
 using mozilla::TimeDuration;
 using mozilla::TimeStamp;
 using mozilla::dom::cache::CacheStorage;
@@ -2745,17 +2745,17 @@ bool nsGlobalWindowInner::ResolveCompone
   }
 
   FillPropertyDescriptor(aDesc, aGlobal, JS::ObjectValue(*components), false);
 
   return true;
 }
 
 #ifdef RELEASE_OR_BETA
-#define USE_CONTROLLERS_SHIM
+#  define USE_CONTROLLERS_SHIM
 #endif
 
 #ifdef USE_CONTROLLERS_SHIM
 static const JSClass ControllersShimClass = {"Controllers", 0};
 static const JSClass XULControllersShimClass = {"XULControllers", 0};
 #endif
 
 bool nsGlobalWindowInner::DoResolve(
@@ -7081,18 +7081,19 @@ void nsGlobalWindowInner::FireOnNewGloba
   // AutoEntryScript required to invoke debugger hook, which is a
   // Gecko-specific concept at present.
   AutoEntryScript aes(this, "nsGlobalWindowInner report new global");
   JS::Rooted<JSObject*> global(aes.cx(), GetWrapper());
   JS_FireOnNewGlobalObject(aes.cx(), global);
 }
 
 #if defined(_WINDOWS_) && !defined(MOZ_WRAPPED_WINDOWS_H)
-#pragma message("wrapper failure reason: " MOZ_WINDOWS_WRAPPER_DISABLED_REASON)
-#error "Never include unwrapped windows.h in this file!"
+#  pragma message( \
+      "wrapper failure reason: " MOZ_WINDOWS_WRAPPER_DISABLED_REASON)
+#  error "Never include unwrapped windows.h in this file!"
 #endif
 
 already_AddRefed<Promise> nsGlobalWindowInner::CreateImageBitmap(
     JSContext* aCx, const ImageBitmapSource& aImage, ErrorResult& aRv) {
   return ImageBitmap::Create(this, aImage, Nothing(), aRv);
 }
 
 already_AddRefed<Promise> nsGlobalWindowInner::CreateImageBitmap(
--- a/dom/base/nsGlobalWindowOuter.cpp
+++ b/dom/base/nsGlobalWindowOuter.cpp
@@ -36,17 +36,17 @@
 #include "mozilla/dom/StorageNotifierService.h"
 #include "mozilla/dom/StorageUtils.h"
 #include "mozilla/dom/Timeout.h"
 #include "mozilla/dom/TimeoutHandler.h"
 #include "mozilla/dom/TimeoutManager.h"
 #include "mozilla/dom/WindowProxyHolder.h"
 #include "mozilla/IntegerPrintfMacros.h"
 #if defined(MOZ_WIDGET_ANDROID)
-#include "mozilla/dom/WindowOrientationObserver.h"
+#  include "mozilla/dom/WindowOrientationObserver.h"
 #endif
 #include "nsError.h"
 #include "nsIIdleService.h"
 #include "nsISizeOfEventTarget.h"
 #include "nsDOMJSUtils.h"
 #include "nsArrayUtils.h"
 #include "nsDOMWindowList.h"
 #include "mozilla/dom/WakeLock.h"
@@ -148,18 +148,18 @@
 #include "nsIControllerContext.h"
 #include "nsGlobalWindowCommands.h"
 #include "nsQueryObject.h"
 #include "nsContentUtils.h"
 #include "nsCSSProps.h"
 #include "nsIURIFixup.h"
 #include "nsIURIMutator.h"
 #ifndef DEBUG
-#include "nsIAppStartup.h"
-#include "nsToolkitCompsCID.h"
+#  include "nsIAppStartup.h"
+#  include "nsToolkitCompsCID.h"
 #endif
 #include "nsCDefaultURIFixup.h"
 #include "mozilla/EventDispatcher.h"
 #include "mozilla/EventStateManager.h"
 #include "nsIObserverService.h"
 #include "nsFocusManager.h"
 #include "nsIXULWindow.h"
 #include "nsITimedChannel.h"
@@ -167,19 +167,19 @@
 #include "mozilla/dom/CustomEvent.h"
 #include "nsIJARChannel.h"
 #include "nsIScreenManager.h"
 #include "nsIEffectiveTLDService.h"
 
 #include "xpcprivate.h"
 
 #ifdef NS_PRINTING
-#include "nsIPrintSettings.h"
-#include "nsIPrintSettingsService.h"
-#include "nsIWebBrowserPrint.h"
+#  include "nsIPrintSettings.h"
+#  include "nsIPrintSettingsService.h"
+#  include "nsIWebBrowserPrint.h"
 #endif
 
 #include "nsWindowRoot.h"
 #include "nsNetCID.h"
 #include "nsIArray.h"
 
 #include "XULDocument.h"
 #include "nsIDOMXULCommandDispatcher.h"
@@ -241,39 +241,39 @@
 #include "mozilla/dom/NavigatorBinding.h"
 #include "mozilla/dom/ImageBitmap.h"
 #include "mozilla/dom/ImageBitmapBinding.h"
 #include "mozilla/dom/ServiceWorkerRegistration.h"
 #include "mozilla/dom/U2F.h"
 #include "mozilla/dom/WebIDLGlobalNameHash.h"
 #include "mozilla/dom/Worklet.h"
 #ifdef HAVE_SIDEBAR
-#include "mozilla/dom/ExternalBinding.h"
+#  include "mozilla/dom/ExternalBinding.h"
 #endif
 
 #ifdef MOZ_WEBSPEECH
-#include "mozilla/dom/SpeechSynthesis.h"
+#  include "mozilla/dom/SpeechSynthesis.h"
 #endif
 
 // Apple system headers seem to have a check() macro.  <sigh>
 #ifdef check
 class nsIScriptTimeoutHandler;
-#undef check
+#  undef check
 #endif  // check
 #include "AccessCheck.h"
 
 #ifdef ANDROID
-#include <android/log.h>
+#  include <android/log.h>
 #endif
 
 #ifdef XP_WIN
-#include <process.h>
-#define getpid _getpid
+#  include <process.h>
+#  define getpid _getpid
 #else
-#include <unistd.h>  // for getpid()
+#  include <unistd.h>  // for getpid()
 #endif
 
 using namespace mozilla;
 using namespace mozilla::dom;
 using namespace mozilla::dom::ipc;
 using mozilla::BasePrincipal;
 using mozilla::OriginAttributes;
 using mozilla::TimeStamp;
@@ -4697,27 +4697,27 @@ void nsGlobalWindowOuter::PrintOuter(Err
       if (printSettingsAreGlobal) {
         printSettingsService->GetGlobalPrintSettings(
             getter_AddRefs(printSettings));
 
         nsAutoString printerName;
         printSettings->GetPrinterName(printerName);
 
         bool shouldGetDefaultPrinterName = printerName.IsEmpty();
-#ifdef MOZ_X11
+#  ifdef MOZ_X11
         // In Linux, GTK backend does not support per printer settings.
         // Calling GetDefaultPrinterName causes a sandbox violation (see Bug
         // 1329216). The printer name is not needed anywhere else on Linux
         // before it gets to the parent. In the parent, we will then query the
         // default printer name if no name is set. Unless we are in the parent,
         // we will skip this part.
         if (!XRE_IsParentProcess()) {
           shouldGetDefaultPrinterName = false;
         }
-#endif
+#  endif
         if (shouldGetDefaultPrinterName) {
           printSettingsService->GetDefaultPrinterName(printerName);
           printSettings->SetPrinterName(printerName);
         }
         printSettingsService->InitPrintSettingsFromPrinter(printerName,
                                                            printSettings);
         printSettingsService->InitPrintSettingsFromPrefs(
             printSettings, true, nsIPrintSettings::kInitSaveAll);
@@ -7239,18 +7239,19 @@ void nsGlobalWindowOuter::ReportLargeAll
       return;  // Don't report a message to the console
   }
 
   nsContentUtils::ReportToConsole(errorFlags, NS_LITERAL_CSTRING("DOM"), mDoc,
                                   nsContentUtils::eDOM_PROPERTIES, message);
 }
 
 #if defined(_WINDOWS_) && !defined(MOZ_WRAPPED_WINDOWS_H)
-#pragma message("wrapper failure reason: " MOZ_WINDOWS_WRAPPER_DISABLED_REASON)
-#error "Never include unwrapped windows.h in this file!"
+#  pragma message( \
+      "wrapper failure reason: " MOZ_WINDOWS_WRAPPER_DISABLED_REASON)
+#  error "Never include unwrapped windows.h in this file!"
 #endif
 
 // Helper called by methods that move/resize the window,
 // to ensure the presContext (if any) is aware of resolution
 // change that may happen in multi-monitor configuration.
 void nsGlobalWindowOuter::CheckForDPIChange() {
   if (mDocShell) {
     RefPtr<nsPresContext> presContext = mDocShell->GetPresContext();
--- a/dom/base/nsINode.cpp
+++ b/dom/base/nsINode.cpp
@@ -105,17 +105,17 @@
 #include "nsChildContentList.h"
 #include "mozilla/dom/NodeBinding.h"
 #include "mozilla/dom/BindingDeclarations.h"
 #include "xpcprivate.h"
 
 #include "XPathGenerator.h"
 
 #ifdef ACCESSIBILITY
-#include "mozilla/dom/AccessibleNode.h"
+#  include "mozilla/dom/AccessibleNode.h"
 #endif
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
 nsINode::nsSlots::nsSlots() : mWeakReference(nullptr) {}
 
 nsINode::nsSlots::~nsSlots() {
@@ -140,20 +140,20 @@ void nsINode::nsSlots::Unlink() {
 }
 
 //----------------------------------------------------------------------
 
 #ifdef MOZILLA_INTERNAL_API
 nsINode::nsINode(already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
     : mNodeInfo(std::move(aNodeInfo)),
       mParent(nullptr)
-#ifndef BOOL_FLAGS_ON_WRAPPER_CACHE
+#  ifndef BOOL_FLAGS_ON_WRAPPER_CACHE
       ,
       mBoolFlags(0)
-#endif
+#  endif
       ,
       mChildCount(0),
       mPreviousOrLastSibling(nullptr),
       mSubtreeRoot(this),
       mSlots(nullptr) {
 }
 #endif
 
--- a/dom/base/nsINode.h
+++ b/dom/base/nsINode.h
@@ -25,19 +25,19 @@
 #include "mozilla/dom/DOMString.h"
 #include "mozilla/dom/BindingDeclarations.h"
 #include "mozilla/dom/NodeBinding.h"
 #include "nsTHashtable.h"
 #include <iosfwd>
 
 // Including 'windows.h' will #define GetClassInfo to something else.
 #ifdef XP_WIN
-#ifdef GetClassInfo
-#undef GetClassInfo
-#endif
+#  ifdef GetClassInfo
+#    undef GetClassInfo
+#  endif
 #endif
 
 class AttrArray;
 class nsAttrChildContentList;
 class nsDOMAttributeMap;
 class nsIAnimationObserver;
 class nsIContent;
 class nsIFrame;
--- a/dom/base/nsImageLoadingContent.cpp
+++ b/dom/base/nsImageLoadingContent.cpp
@@ -50,17 +50,17 @@
 #include "mozilla/EventStates.h"
 #include "mozilla/dom/Element.h"
 #include "mozilla/dom/ImageTracker.h"
 #include "mozilla/dom/ScriptSettings.h"
 #include "mozilla/Preferences.h"
 
 #ifdef LoadImage
 // Undefine LoadImage to prevent naming conflict with Windows.
-#undef LoadImage
+#  undef LoadImage
 #endif
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
 #ifdef DEBUG_chb
 static void PrintReqURL(imgIRequest* req) {
   if (!req) {
--- a/dom/base/nsImageLoadingContent.h
+++ b/dom/base/nsImageLoadingContent.h
@@ -36,17 +36,17 @@ class AsyncEventDispatcher;
 namespace dom {
 class Document;
 class Element;
 }  // namespace dom
 }  // namespace mozilla
 
 #ifdef LoadImage
 // Undefine LoadImage to prevent naming conflict with Windows.
-#undef LoadImage
+#  undef LoadImage
 #endif
 
 class nsImageLoadingContent : public nsIImageLoadingContent {
   template <typename T>
   using Maybe = mozilla::Maybe<T>;
   using Nothing = mozilla::Nothing;
   using OnNonvisible = mozilla::OnNonvisible;
   using Visibility = mozilla::Visibility;
--- a/dom/base/nsJSEnvironment.cpp
+++ b/dom/base/nsJSEnvironment.cpp
@@ -33,20 +33,20 @@
 #include "nsContentUtils.h"
 #include "mozilla/EventDispatcher.h"
 #include "nsIContent.h"
 #include "nsCycleCollector.h"
 #include "nsXPCOMCIDInternal.h"
 #include "nsIXULRuntime.h"
 #include "nsTextFormatter.h"
 #ifdef XP_WIN
-#include <process.h>
-#define getpid _getpid
+#  include <process.h>
+#  define getpid _getpid
 #else
-#include <unistd.h>  // for getpid()
+#  include <unistd.h>  // for getpid()
 #endif
 #include "xpcpublic.h"
 
 #include "jsapi.h"
 #include "js/PropertySpec.h"
 #include "js/SliceBudget.h"
 #include "js/Wrapper.h"
 #include "nsIArray.h"
@@ -66,17 +66,17 @@
 #include "mozilla/dom/ScriptSettings.h"
 #include "mozilla/CycleCollectedJSRuntime.h"
 #include "mozilla/SystemGroup.h"
 #include "nsRefreshDriver.h"
 #include "nsJSPrincipals.h"
 
 #ifdef XP_MACOSX
 // AssertMacros.h defines 'check' and conflicts with AccessCheck.h
-#undef check
+#  undef check
 #endif
 #include "AccessCheck.h"
 
 #include "mozilla/Logging.h"
 #include "prthread.h"
 
 #include "mozilla/Preferences.h"
 #include "mozilla/Telemetry.h"
@@ -96,17 +96,17 @@
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
 const size_t gStackSize = 8192;
 
 // Thank you Microsoft!
 #ifdef CompareString
-#undef CompareString
+#  undef CompareString
 #endif
 
 #define NS_SHRINK_GC_BUFFERS_DELAY 4000  // ms
 
 // The amount of time we wait from the first request to GC to actually
 // doing the first GC.
 #define NS_FIRST_GC_DELAY 10000  // ms
 
@@ -956,17 +956,17 @@ nsresult nsJSContext::AddSupportsPrimiti
       break;
     }
   }
   return NS_OK;
 }
 
 #ifdef MOZ_JPROF
 
-#include <signal.h>
+#  include <signal.h>
 
 inline bool IsJProfAction(struct sigaction* action) {
   return (action->sa_sigaction &&
           (action->sa_flags & (SA_RESTART | SA_SIGINFO)) ==
               (SA_RESTART | SA_SIGINFO));
 }
 
 void NS_JProfStartProfiling();
--- a/dom/base/nsJSUtils.cpp
+++ b/dom/base/nsJSUtils.cpp
@@ -338,19 +338,19 @@ nsresult nsJSUtils::ExecutionContext::De
              "BinAST decoding is not supported in non-syntactic scopes");
 
   if (mSkip) {
     return mRv;
   }
 
   MOZ_ASSERT(aBuf);
   MOZ_ASSERT(mRetValue.isUndefined());
-#ifdef DEBUG
+#  ifdef DEBUG
   mWantsReturnValue = !aCompileOptions.noScriptRval;
-#endif
+#  endif
 
   mScript.set(JS::DecodeBinAST(mCx, aCompileOptions, aBuf, aLength));
 
   if (!mScript) {
     mSkip = true;
     mRv = EvaluationExceptionToNSResult(mCx);
     return mRv;
   }
--- a/dom/base/nsNodeUtils.cpp
+++ b/dom/base/nsNodeUtils.cpp
@@ -14,17 +14,17 @@
 #include "mozilla/dom/Element.h"
 #include "nsIMutationObserver.h"
 #include "mozilla/EventListenerManager.h"
 #include "nsIXPConnect.h"
 #include "PLDHashTable.h"
 #include "nsCOMArray.h"
 #include "nsPIDOMWindow.h"
 #ifdef MOZ_XUL
-#include "nsXULElement.h"
+#  include "nsXULElement.h"
 #endif
 #include "nsBindingManager.h"
 #include "nsGenericHTMLElement.h"
 #include "mozilla/AnimationTarget.h"
 #include "mozilla/Assertions.h"
 #include "mozilla/ErrorResult.h"
 #include "mozilla/dom/Animation.h"
 #include "mozilla/dom/HTMLImageElement.h"
@@ -43,20 +43,20 @@ using namespace mozilla::dom;
 using mozilla::AutoJSContext;
 
 enum class IsRemoveNotification {
   Yes,
   No,
 };
 
 #ifdef DEBUG
-#define COMPOSED_DOC_DECL \
-  const bool wasInComposedDoc = !!node->GetComposedDoc();
+#  define COMPOSED_DOC_DECL \
+    const bool wasInComposedDoc = !!node->GetComposedDoc();
 #else
-#define COMPOSED_DOC_DECL
+#  define COMPOSED_DOC_DECL
 #endif
 
 // This macro expects the ownerDocument of content_ to be in scope as
 // |Document* doc|
 #define IMPL_MUTATION_NOTIFICATION(func_, content_, params_, remove_)         \
   PR_BEGIN_MACRO                                                              \
   bool needsEnterLeave = doc->MayHaveDOMMutationObservers();                  \
   if (needsEnterLeave) {                                                      \
--- a/dom/base/nsObjectLoadingContent.cpp
+++ b/dom/base/nsObjectLoadingContent.cpp
@@ -90,19 +90,19 @@
 #include "mozilla/dom/HTMLEmbedElement.h"
 #include "mozilla/dom/HTMLObjectElement.h"
 #include "mozilla/LoadInfo.h"
 #include "nsChannelClassifier.h"
 #include "nsFocusManager.h"
 
 #ifdef XP_WIN
 // Thanks so much, Microsoft! :(
-#ifdef CreateEvent
-#undef CreateEvent
-#endif
+#  ifdef CreateEvent
+#    undef CreateEvent
+#  endif
 #endif  // XP_WIN
 
 static NS_DEFINE_CID(kAppShellCID, NS_APPSHELL_CID);
 
 static const char kPrefYoutubeRewrite[] = "plugins.rewrite_youtube_embeds";
 static const char kPrefBlockURIs[] = "browser.safebrowsing.blockedURIs.enabled";
 static const char kPrefFavorFallbackMode[] = "plugins.favorfallback.mode";
 static const char kPrefFavorFallbackRules[] = "plugins.favorfallback.rules";
--- a/dom/base/nsTextNode.cpp
+++ b/dom/base/nsTextNode.cpp
@@ -13,17 +13,17 @@
 #include "nsContentUtils.h"
 #include "mozilla/dom/DirectionalityUtils.h"
 #include "mozilla/dom/Document.h"
 #include "nsIDOMEventListener.h"
 #include "nsThreadUtils.h"
 #include "nsStubMutationObserver.h"
 #include "mozilla/IntegerPrintfMacros.h"
 #ifdef DEBUG
-#include "nsRange.h"
+#  include "nsRange.h"
 #endif
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
 /**
  * class used to implement attr() generated content
  */
--- a/dom/base/nsWindowMemoryReporter.cpp
+++ b/dom/base/nsWindowMemoryReporter.cpp
@@ -16,17 +16,17 @@
 #include "mozilla/Telemetry.h"
 #include "nsNetCID.h"
 #include "nsPrintfCString.h"
 #include "XPCJSMemoryReporter.h"
 #include "js/MemoryMetrics.h"
 #include "nsQueryObject.h"
 #include "nsServiceManagerUtils.h"
 #ifdef MOZ_XUL
-#include "nsXULPrototypeCache.h"
+#  include "nsXULPrototypeCache.h"
 #endif
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
 StaticRefPtr<nsWindowMemoryReporter> sWindowReporter;
 
 /**
--- a/dom/base/nsWindowRoot.cpp
+++ b/dom/base/nsWindowRoot.cpp
@@ -22,17 +22,17 @@
 #include "nsIController.h"
 #include "xpcpublic.h"
 #include "nsCycleCollectionParticipant.h"
 #include "mozilla/dom/TabParent.h"
 #include "mozilla/dom/HTMLTextAreaElement.h"
 #include "mozilla/dom/HTMLInputElement.h"
 
 #ifdef MOZ_XUL
-#include "nsXULElement.h"
+#  include "nsXULElement.h"
 #endif
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
 nsWindowRoot::nsWindowRoot(nsPIDOMWindowOuter* aWindow) {
   mWindow = aWindow;
 
--- a/dom/base/nsWrapperCache.h
+++ b/dom/base/nsWrapperCache.h
@@ -41,17 +41,17 @@ class nsWindowRoot;
 // of nsINode, but others (such as MSVC) are not.
 //
 // So we just store mBoolFlags directly on nsWrapperCache on 64-bit platforms.
 // This may waste space for some other nsWrapperCache-derived objects that have
 // a 32-bit field as their first member, but those objects are unlikely to be as
 // numerous or performance-critical as DOM nodes.
 #ifdef HAVE_64BIT_BUILD
 static_assert(sizeof(void*) == 8, "These architectures should be 64-bit");
-#define BOOL_FLAGS_ON_WRAPPER_CACHE
+#  define BOOL_FLAGS_ON_WRAPPER_CACHE
 #else
 static_assert(sizeof(void*) == 4, "Only support 32-bit and 64-bit");
 #endif
 
 /**
  * Class to store the wrapper for an object. This can only be used with objects
  * that only have one non-security wrapper at a time (for an XPCWrappedNative
  * this is usually ensured by setting an explicit parent in the PreCreate hook
--- a/dom/base/test/gtest/TestMimeType.cpp
+++ b/dom/base/test/gtest/TestMimeType.cpp
@@ -176,31 +176,31 @@ TEST(MimeType, CString) {
   ASSERT_TRUE(parsed) << "Parsing succeeded";
   nsCString out;
   parsed->Serialize(out);
   ASSERT_TRUE(out.Equals(NS_LITERAL_CSTRING("text/html;charset=\"()\"")))
       << "Duplicate parameter #2";
 }
 
 #ifdef _MSC_VER
-#pragma warning(push)
-#pragma warning(disable : 4819)
+#  pragma warning(push)
+#  pragma warning(disable : 4819)
 #endif
 TEST(MimeType, NonAlphanumericParametersAreQuoted) {
   const auto in = NS_LITERAL_STRING("text/html;test=\x00FF\\;charset=gbk");
   UniquePtr<MimeType> parsed = MimeType::Parse(in);
   ASSERT_TRUE(parsed) << "Parsing succeeded";
   nsString out;
   parsed->Serialize(out);
   ASSERT_TRUE(out.Equals(
       NS_LITERAL_STRING("text/html;test=\"\x00FF\\\\\";charset=gbk")))
       << "Non-alphanumeric parameters are quoted";
 }
 #ifdef _MSC_VER
-#pragma warning(pop)
+#  pragma warning(pop)
 #endif
 
 TEST(MimeType, ParameterQuotedIfHasLeadingWhitespace1) {
   const auto in = NS_LITERAL_STRING("text/html;charset= g\\\"bk");
   UniquePtr<MimeType> parsed = MimeType::Parse(in);
   ASSERT_TRUE(parsed) << "Parsing succeeded";
   nsAutoString out;
   parsed->Serialize(out);
--- a/dom/bindings/BindingUtils.cpp
+++ b/dom/bindings/BindingUtils.cpp
@@ -62,17 +62,16 @@
 #include "mozilla/dom/XULTextElementBinding.h"
 #include "mozilla/dom/XULTreeElementBinding.h"
 #include "mozilla/dom/Promise.h"
 #include "mozilla/dom/WebIDLGlobalNameHash.h"
 #include "mozilla/dom/WorkerPrivate.h"
 #include "mozilla/dom/WorkerScope.h"
 #include "mozilla/dom/XrayExpandoClass.h"
 #include "mozilla/dom/WindowProxyHolder.h"
-#include "mozilla/dom/XULScrollElementBinding.h"
 #include "mozilla/jsipc/CrossProcessObjectWrappers.h"
 #include "ipc/ErrorIPCUtils.h"
 #include "mozilla/UseCounter.h"
 #include "mozilla/dom/DocGroup.h"
 #include "nsXULElement.h"
 
 namespace mozilla {
 namespace dom {
@@ -1604,18 +1603,18 @@ static void DEBUG_CheckXBLLookup(JSConte
     DEBUG_CheckXBLCallable(cx, JS_FUNC_TO_DATA_PTR(JSObject*, desc->getter));
   }
   if (desc->setter) {
     MOZ_ASSERT(desc->attrs & JSPROP_SETTER);
     DEBUG_CheckXBLCallable(cx, JS_FUNC_TO_DATA_PTR(JSObject*, desc->setter));
   }
 }
 #else
-#define DEBUG_CheckXBLLookup(a, b) \
-  {}
+#  define DEBUG_CheckXBLLookup(a, b) \
+    {}
 #endif
 
 /* static */ bool XrayResolveOwnProperty(
     JSContext* cx, JS::Handle<JSObject*> wrapper, JS::Handle<JSObject*> obj,
     JS::Handle<jsid> id, JS::MutableHandle<JS::PropertyDescriptor> desc,
     bool& cacheOnHolder) {
   cacheOnHolder = false;
 
@@ -3614,18 +3613,16 @@ bool HTMLConstructor(JSContext* aCx, uns
       cb = XULPopupElement_Binding::GetConstructorObject;
     } else if (definition->mLocalName == nsGkAtoms::iframe ||
                definition->mLocalName == nsGkAtoms::browser ||
                definition->mLocalName == nsGkAtoms::editor) {
       cb = XULFrameElement_Binding::GetConstructorObject;
     } else if (definition->mLocalName == nsGkAtoms::menu ||
                definition->mLocalName == nsGkAtoms::menulist) {
       cb = XULMenuElement_Binding::GetConstructorObject;
-    } else if (definition->mLocalName == nsGkAtoms::scrollbox) {
-      cb = XULScrollElement_Binding::GetConstructorObject;
     } else if (definition->mLocalName == nsGkAtoms::tree) {
       cb = XULTreeElement_Binding::GetConstructorObject;
     } else {
       cb = XULElement_Binding::GetConstructorObject;
     }
   }
 
   int32_t tag = eHTMLTag_userdefined;
--- a/dom/bindings/BindingUtils.h
+++ b/dom/bindings/BindingUtils.h
@@ -697,23 +697,23 @@ bool DefineUnforgeableAttributes(JSConte
                                  const Prefable<const JSPropertySpec>* props);
 
 #define HAS_MEMBER_TYPEDEFS \
  private:                   \
   typedef char yes[1];      \
   typedef char no[2]
 
 #ifdef _MSC_VER
-#define HAS_MEMBER_CHECK(_name) \
-  template <typename V>         \
-  static yes& Check##_name(char(*)[(&V::_name == 0) + 1])
+#  define HAS_MEMBER_CHECK(_name) \
+    template <typename V>         \
+    static yes& Check##_name(char(*)[(&V::_name == 0) + 1])
 #else
-#define HAS_MEMBER_CHECK(_name) \
-  template <typename V>         \
-  static yes& Check##_name(char(*)[sizeof(&V::_name) + 1])
+#  define HAS_MEMBER_CHECK(_name) \
+    template <typename V>         \
+    static yes& Check##_name(char(*)[sizeof(&V::_name) + 1])
 #endif
 
 #define HAS_MEMBER(_memberName, _valueName) \
  private:                                   \
   HAS_MEMBER_CHECK(_memberName);            \
   template <typename V>                     \
   static no& Check##_memberName(...);       \
                                             \
--- a/dom/bindings/ErrorIPCUtils.h
+++ b/dom/bindings/ErrorIPCUtils.h
@@ -5,17 +5,17 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "ipc/IPCMessageUtils.h"
 #include "mozilla/ErrorResult.h"
 #include "mozilla/Assertions.h"
 #include "mozilla/Move.h"
 
 #ifndef IPC_ErrorIPCUtils_h
-#define IPC_ErrorIPCUtils_h
+#  define IPC_ErrorIPCUtils_h
 
 namespace IPC {
 
 template <>
 struct ParamTraits<mozilla::dom::ErrNum>
     : public ContiguousEnumSerializer<
           mozilla::dom::ErrNum, mozilla::dom::ErrNum(0),
           mozilla::dom::ErrNum(mozilla::dom::Err_Limit)> {};
@@ -27,19 +27,19 @@ struct ParamTraits<mozilla::ErrorResult>
   static void Write(Message* aMsg, const paramType& aParam) {
     // It should be the case that mMightHaveUnreportedJSException can only be
     // true when we're expecting a JS exception.  We cannot send such messages
     // over the IPC channel since there is no sane way of transferring the JS
     // value over to the other side.  Callers should never do that.
     MOZ_ASSERT_IF(aParam.IsJSException(),
                   aParam.mMightHaveUnreportedJSException);
     if (aParam.IsJSException()
-#ifdef DEBUG
+#  ifdef DEBUG
         || aParam.mMightHaveUnreportedJSException
-#endif
+#  endif
     ) {
       MOZ_CRASH(
           "Cannot encode an ErrorResult representing a Javascript exception");
     }
 
     WriteParam(aMsg, aParam.mResult);
     WriteParam(aMsg, aParam.IsErrorWithMessage());
     WriteParam(aMsg, aParam.IsDOMException());
--- a/dom/bindings/ErrorResult.h
+++ b/dom/bindings/ErrorResult.h
@@ -55,19 +55,19 @@ enum ErrNum {
 #undef MSG_DEF
   Err_Limit
 };
 
 // Debug-only compile-time table of the number of arguments of each error, for
 // use in static_assert.
 #if defined(DEBUG) && (defined(__clang__) || defined(__GNUC__))
 uint16_t constexpr ErrorFormatNumArgs[] = {
-#define MSG_DEF(_name, _argc, _exn, _str) _argc,
-#include "mozilla/dom/Errors.msg"
-#undef MSG_DEF
+#  define MSG_DEF(_name, _argc, _exn, _str) _argc,
+#  include "mozilla/dom/Errors.msg"
+#  undef MSG_DEF
 };
 #endif
 
 uint16_t GetErrorArgCount(const ErrNum aErrorNumber);
 
 namespace binding_detail {
 void ThrowErrorMessage(JSContext* aCx, const unsigned aErrorNumber, ...);
 }  // namespace binding_detail
--- a/dom/bindings/test/TestBindingHeader.h
+++ b/dom/bindings/test/TestBindingHeader.h
@@ -27,17 +27,17 @@ class TestExternalInterface;
 class Promise;
 }  // namespace dom
 }  // namespace mozilla
 
 // We don't export TestCodeGenBinding.h, but it's right in our parent dir.
 #ifdef XP_WIN
 // If we're on windows, simulate including windows.h. This step will cause
 // compilation failure if NeedsWindowsUndef is not defined.
-#define NO_ERROR 0x1
+#  define NO_ERROR 0x1
 #endif
 #include "../TestCodeGenBinding.h"
 
 extern bool TestFuncControlledMember(JSContext*, JSObject*);
 
 namespace mozilla {
 namespace dom {
 
--- a/dom/broadcastchannel/BroadcastChannel.cpp
+++ b/dom/broadcastchannel/BroadcastChannel.cpp
@@ -20,17 +20,17 @@
 #include "nsContentUtils.h"
 
 #include "nsIBFCacheEntry.h"
 #include "nsICookieService.h"
 #include "mozilla/dom/Document.h"
 #include "nsISupportsPrimitives.h"
 
 #ifdef XP_WIN
-#undef PostMessage
+#  undef PostMessage
 #endif
 
 namespace mozilla {
 
 using namespace ipc;
 
 namespace dom {
 
--- a/dom/broadcastchannel/BroadcastChannelService.cpp
+++ b/dom/broadcastchannel/BroadcastChannelService.cpp
@@ -6,17 +6,17 @@
 
 #include "BroadcastChannelService.h"
 #include "BroadcastChannelParent.h"
 #include "mozilla/dom/File.h"
 #include "mozilla/dom/IPCBlobUtils.h"
 #include "mozilla/ipc/BackgroundParent.h"
 
 #ifdef XP_WIN
-#undef PostMessage
+#  undef PostMessage
 #endif
 
 namespace mozilla {
 
 using namespace ipc;
 
 namespace dom {
 
--- a/dom/broadcastchannel/BroadcastChannelService.h
+++ b/dom/broadcastchannel/BroadcastChannelService.h
@@ -7,17 +7,17 @@
 #ifndef mozilla_dom_BroadcastChannelService_h
 #define mozilla_dom_BroadcastChannelService_h
 
 #include "nsISupportsImpl.h"
 #include "nsHashKeys.h"
 #include "nsClassHashtable.h"
 
 #ifdef XP_WIN
-#undef PostMessage
+#  undef PostMessage
 #endif
 
 namespace mozilla {
 namespace dom {
 
 class BroadcastChannelParent;
 class ClonedMessageData;
 
--- a/dom/browser-element/BrowserElementParent.cpp
+++ b/dom/browser-element/BrowserElementParent.cpp
@@ -6,17 +6,17 @@
 
 #include "TabParent.h"
 
 // TabParent.h transitively includes <windows.h>, which does
 //   #define CreateEvent CreateEventW
 // That messes up our call to EventDispatcher::CreateEvent below.
 
 #ifdef CreateEvent
-#undef CreateEvent
+#  undef CreateEvent
 #endif
 
 #include "BrowserElementParent.h"
 #include "mozilla/EventDispatcher.h"
 #include "mozilla/dom/HTMLIFrameElement.h"
 #include "mozilla/dom/ToJSValue.h"
 #include "mozilla/dom/WindowProxyHolder.h"
 #include "nsIInterfaceRequestorUtils.h"
--- a/dom/canvas/CanvasRenderingContext2D.cpp
+++ b/dom/canvas/CanvasRenderingContext2D.cpp
@@ -122,27 +122,27 @@
 #include "mozilla/layers/CanvasClient.h"
 #include "mozilla/layers/WebRenderUserData.h"
 #include "mozilla/layers/WebRenderCanvasRenderer.h"
 
 #undef free  // apparently defined by some windows header, clashing with a
              // free() method in SkTypes.h
 #include "SkiaGLGlue.h"
 #ifdef USE_SKIA
-#include "SurfaceTypes.h"
-#include "GLBlitHelper.h"
-#include "ScopedGLHelpers.h"
+#  include "SurfaceTypes.h"
+#  include "GLBlitHelper.h"
+#  include "ScopedGLHelpers.h"
 #endif
 
 using mozilla::gl::GLContext;
 using mozilla::gl::GLContextProvider;
 using mozilla::gl::SkiaGLGlue;
 
 #ifdef XP_WIN
-#include "gfxWindowsPlatform.h"
+#  include "gfxWindowsPlatform.h"
 #endif
 
 // windows.h (included by chromium code) defines this, in its infinite wisdom
 #undef DrawText
 
 using namespace mozilla;
 using namespace mozilla::CanvasUtils;
 using namespace mozilla::css;
--- a/dom/canvas/MurmurHash3.cpp
+++ b/dom/canvas/MurmurHash3.cpp
@@ -14,44 +14,44 @@ namespace {
 
 //-----------------------------------------------------------------------------
 // Platform-specific functions and macros
 
 // Microsoft Visual Studio
 
 #if defined(_MSC_VER)
 
-#define FORCE_INLINE __forceinline
+#  define FORCE_INLINE __forceinline
 
-#define ROTL32(x, y) _rotl(x, y)
-#define ROTL64(x, y) _rotl64(x, y)
+#  define ROTL32(x, y) _rotl(x, y)
+#  define ROTL64(x, y) _rotl64(x, y)
 
-#define BIG_CONSTANT(x) (x)
+#  define BIG_CONSTANT(x) (x)
 
 // Other compilers
 
 #else  // defined(_MSC_VER)
 
 // We can't do always_inline, becasue -Werror -Wattribute will trigger
 // a "might not be able to inline" warning.
 //#define	FORCE_INLINE __attribute__((always_inline))
-#define FORCE_INLINE inline
+#  define FORCE_INLINE inline
 
 inline uint32_t rotl32(uint32_t x, int8_t r) {
   return (x << r) | (x >> (32 - r));
 }
 
 inline uint64_t rotl64(uint64_t x, int8_t r) {
   return (x << r) | (x >> (64 - r));
 }
 
-#define ROTL32(x, y) rotl32(x, y)
-#define ROTL64(x, y) rotl64(x, y)
+#  define ROTL32(x, y) rotl32(x, y)
+#  define ROTL64(x, y) rotl64(x, y)
 
-#define BIG_CONSTANT(x) (x##LLU)
+#  define BIG_CONSTANT(x) (x##LLU)
 
 #endif  // !defined(_MSC_VER)
 
 //-----------------------------------------------------------------------------
 // Block read - if your platform needs to do endian-swapping or can only
 // handle aligned reads, do the conversion here
 
 FORCE_INLINE uint32_t getblock(const uint32_t *p, int i) { return p[i]; }
--- a/dom/canvas/WebGLContext.cpp
+++ b/dom/canvas/WebGLContext.cpp
@@ -72,21 +72,21 @@
 #include "WebGLSampler.h"
 #include "WebGLShader.h"
 #include "WebGLSync.h"
 #include "WebGLTransformFeedback.h"
 #include "WebGLVertexArray.h"
 #include "WebGLVertexAttribData.h"
 
 #ifdef MOZ_WIDGET_COCOA
-#include "nsCocoaFeatures.h"
+#  include "nsCocoaFeatures.h"
 #endif
 
 #ifdef XP_WIN
-#include "WGLLibrary.h"
+#  include "WGLLibrary.h"
 #endif
 
 // Generated
 #include "mozilla/dom/WebGLRenderingContextBinding.h"
 
 namespace mozilla {
 
 using namespace mozilla::dom;
--- a/dom/canvas/WebGLContextGL.cpp
+++ b/dom/canvas/WebGLContextGL.cpp
@@ -40,17 +40,17 @@
 #include "jsfriendapi.h"
 
 #include "WebGLTexelConversions.h"
 #include "WebGLValidateStrings.h"
 #include <algorithm>
 
 // needed to check if current OS is lower than 10.7
 #if defined(MOZ_WIDGET_COCOA)
-#include "nsCocoaFeatures.h"
+#  include "nsCocoaFeatures.h"
 #endif
 
 #include "mozilla/DebugOnly.h"
 #include "mozilla/dom/BindingUtils.h"
 #include "mozilla/dom/ImageData.h"
 #include "mozilla/dom/ToJSValue.h"
 #include "mozilla/EndianUtils.h"
 #include "mozilla/RefPtr.h"
--- a/dom/canvas/WebGLContextTextures.cpp
+++ b/dom/canvas/WebGLContextTextures.cpp
@@ -35,17 +35,17 @@
 #include "jsfriendapi.h"
 
 #include "WebGLTexelConversions.h"
 #include "WebGLValidateStrings.h"
 #include <algorithm>
 
 // needed to check if current OS is lower than 10.7
 #if defined(MOZ_WIDGET_COCOA)
-#include "nsCocoaFeatures.h"
+#  include "nsCocoaFeatures.h"
 #endif
 
 #include "mozilla/DebugOnly.h"
 #include "mozilla/dom/BindingUtils.h"
 #include "mozilla/dom/ImageData.h"
 #include "mozilla/dom/ToJSValue.h"
 #include "mozilla/EndianUtils.h"
 
--- a/dom/canvas/WebGLContextValidate.cpp
+++ b/dom/canvas/WebGLContextValidate.cpp
@@ -25,17 +25,17 @@
 #include "WebGLShader.h"
 #include "WebGLTexture.h"
 #include "WebGLUniformLocation.h"
 #include "WebGLValidateStrings.h"
 #include "WebGLVertexArray.h"
 #include "WebGLVertexAttribData.h"
 
 #if defined(MOZ_WIDGET_COCOA)
-#include "nsCocoaFeatures.h"
+#  include "nsCocoaFeatures.h"
 #endif
 
 ////////////////////
 // Minimum value constants defined in GLES 2.0.25 $6.2 "State Tables":
 const uint32_t kMinMaxVertexAttribs = 8;            // Page 164
 const uint32_t kMinMaxVertexUniformVectors = 128;   // Page 164
 const uint32_t kMinMaxFragmentUniformVectors = 16;  // Page 164
 const uint32_t kMinMaxVaryingVectors = 8;           // Page 164
--- a/dom/canvas/WebGLTexelConversions.h
+++ b/dom/canvas/WebGLTexelConversions.h
@@ -21,26 +21,26 @@
  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
 #ifndef WEBGLTEXELCONVERSIONS_H_
-#define WEBGLTEXELCONVERSIONS_H_
+#  define WEBGLTEXELCONVERSIONS_H_
 
-#ifdef __SUNPRO_CC
-#define __restrict
-#endif
+#  ifdef __SUNPRO_CC
+#    define __restrict
+#  endif
 
-#include "WebGLTypes.h"
-#include <stdint.h>
-#include "mozilla/Attributes.h"
-#include "mozilla/Casting.h"
+#  include "WebGLTypes.h"
+#  include <stdint.h>
+#  include "mozilla/Attributes.h"
+#  include "mozilla/Casting.h"
 
 namespace mozilla {
 
 bool ConvertImage(size_t width, size_t height, const void* srcBegin,
                   size_t srcStride, gl::OriginPos srcOrigin,
                   WebGLTexelFormat srcFormat, bool srcPremultiplied,
                   void* dstBegin, size_t dstStride, gl::OriginPos dstOrigin,
                   WebGLTexelFormat dstFormat, bool dstPremultiplied,
deleted file mode 100644
--- a/dom/chrome-webidl/XULScrollElement.webidl
+++ /dev/null
@@ -1,15 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-[HTMLConstructor, Func="IsChromeOrXBL"]
-interface XULScrollElement : XULElement {
-  [Throws]
-  void scrollToElement(Element child);
-  [Throws]
-  void scrollByIndex(long aIndexes);
-  [Throws]
-  void ensureElementIsVisible(Element child);
-};
--- a/dom/chrome-webidl/moz.build
+++ b/dom/chrome-webidl/moz.build
@@ -53,17 +53,16 @@ WEBIDL_FILES = [
     'SessionStoreUtils.webidl',
     'StructuredCloneHolder.webidl',
     'TelemetryStopwatch.webidl',
     'WebExtensionContentScript.webidl',
     'WebExtensionPolicy.webidl',
     'WindowGlobalActors.webidl',
     'XULFrameElement.webidl',
     'XULMenuElement.webidl',
-    'XULScrollElement.webidl',
     'XULTextElement.webidl',
     'XULTreeElement.webidl'
 ]
 
 if CONFIG['MOZ_PLACES']:
     WEBIDL_FILES += [
         'PlacesEvent.webidl',
         'PlacesObservers.webidl',
--- a/dom/clients/manager/ClientHandle.h
+++ b/dom/clients/manager/ClientHandle.h
@@ -7,17 +7,17 @@
 #define _mozilla_dom_ClientHandle_h
 
 #include "mozilla/dom/ClientInfo.h"
 #include "mozilla/dom/ClientOpPromise.h"
 #include "mozilla/dom/ClientThing.h"
 #include "mozilla/MozPromise.h"
 
 #ifdef XP_WIN
-#undef PostMessage
+#  undef PostMessage
 #endif
 
 namespace mozilla {
 
 namespace dom {
 
 class ClientManager;
 class ClientHandleChild;
--- a/dom/clients/manager/ClientOpenWindowUtils.cpp
+++ b/dom/clients/manager/ClientOpenWindowUtils.cpp
@@ -18,17 +18,17 @@
 #include "nsIWebProgressListener.h"
 #include "nsIWindowWatcher.h"
 #include "nsIXPConnect.h"
 #include "nsNetUtil.h"
 #include "nsPIDOMWindow.h"
 #include "nsPIWindowWatcher.h"
 
 #ifdef MOZ_WIDGET_ANDROID
-#include "FennecJNIWrappers.h"
+#  include "FennecJNIWrappers.h"
 #endif
 
 namespace mozilla {
 namespace dom {
 
 namespace {
 
 class WebProgressListener final : public nsIWebProgressListener,
--- a/dom/clients/manager/ClientSource.h
+++ b/dom/clients/manager/ClientSource.h
@@ -8,17 +8,17 @@
 
 #include "mozilla/dom/ClientInfo.h"
 #include "mozilla/dom/ClientOpPromise.h"
 #include "mozilla/dom/ClientThing.h"
 #include "mozilla/dom/ServiceWorkerDescriptor.h"
 #include "mozilla/Variant.h"
 
 #ifdef XP_WIN
-#undef PostMessage
+#  undef PostMessage
 #endif
 
 class nsIDocShell;
 class nsIGlobalObject;
 class nsISerialEventTarget;
 class nsPIDOMWindowInner;
 
 namespace mozilla {
--- a/dom/commandhandler/nsCommandManager.cpp
+++ b/dom/commandhandler/nsCommandManager.cpp
@@ -77,17 +77,17 @@ nsCommandManager::CommandStatusChanged(c
                         aCommandName, u"command_status_changed");
     }
   }
 
   return NS_OK;
 }
 
 #if 0
-#pragma mark -
+#  pragma mark -
 #endif
 
 NS_IMETHODIMP
 nsCommandManager::AddCommandObserver(nsIObserver* aCommandObserver,
                                      const char* aCommandToObserve) {
   NS_ENSURE_ARG(aCommandObserver);
 
   // XXX todo: handle special cases of aCommandToObserve being null, or empty
--- a/dom/events/EventDispatcher.cpp
+++ b/dom/events/EventDispatcher.cpp
@@ -57,24 +57,24 @@
 #include "mozilla/MiscEvents.h"
 #include "mozilla/MouseEvents.h"
 #include "mozilla/Telemetry.h"
 #include "mozilla/TextEvents.h"
 #include "mozilla/TouchEvents.h"
 #include "mozilla/Unused.h"
 
 #ifdef MOZ_TASK_TRACER
-#include "GeckoTaskTracer.h"
-#include "mozilla/dom/Element.h"
-#include "mozilla/Likely.h"
+#  include "GeckoTaskTracer.h"
+#  include "mozilla/dom/Element.h"
+#  include "mozilla/Likely.h"
 using namespace mozilla::tasktracer;
 #endif
 
 #ifdef MOZ_GECKO_PROFILER
-#include "ProfilerMarkerPayload.h"
+#  include "ProfilerMarkerPayload.h"
 #endif
 
 namespace mozilla {
 
 using namespace dom;
 
 class ELMCreationDetector {
  public:
--- a/dom/events/EventDispatcher.h
+++ b/dom/events/EventDispatcher.h
@@ -1,27 +1,27 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifdef MOZILLA_INTERNAL_API
-#ifndef mozilla_EventDispatcher_h_
-#define mozilla_EventDispatcher_h_
+#  ifndef mozilla_EventDispatcher_h_
+#    define mozilla_EventDispatcher_h_
 
-#include "mozilla/dom/BindingDeclarations.h"
-#include "mozilla/dom/Touch.h"
-#include "mozilla/EventForwards.h"
-#include "mozilla/Maybe.h"
-#include "nsCOMPtr.h"
-#include "nsTArray.h"
+#    include "mozilla/dom/BindingDeclarations.h"
+#    include "mozilla/dom/Touch.h"
+#    include "mozilla/EventForwards.h"
+#    include "mozilla/Maybe.h"
+#    include "nsCOMPtr.h"
+#    include "nsTArray.h"
 
 // Microsoft's API Name hackery sucks
-#undef CreateEvent
+#    undef CreateEvent
 
 class nsIContent;
 class nsPresContext;
 
 template <class E>
 class nsCOMArray;
 
 namespace mozilla {
@@ -365,10 +365,10 @@ class EventDispatcher {
   /**
    * Called at shutting down.
    */
   static void Shutdown();
 };
 
 }  // namespace mozilla
 
-#endif  // mozilla_EventDispatcher_h_
+#  endif  // mozilla_EventDispatcher_h_
 #endif
--- a/dom/events/EventNameList.h
+++ b/dom/events/EventNameList.h
@@ -48,109 +48,109 @@
  * enclosed in NON_IDL_EVENT.  If NON_IDL_EVENT is not defined, it
  * will be defined to the empty string.
  *
  * If you change which macros event names are enclosed in, please
  * update the tests for bug 689564 and bug 659350 as needed.
  */
 
 #ifdef MESSAGE_TO_EVENT
-#ifdef EVENT
-#error "Don't define EVENT"
-#endif /* EVENT */
-#ifdef WINDOW_ONLY_EVENT
-#error "Don't define WINDOW_ONLY_EVENT"
-#endif /* WINDOW_ONLY_EVENT */
-#ifdef TOUCH_EVENT
-#error "Don't define TOUCH_EVENT"
-#endif /* TOUCH_EVENT */
-#ifdef DOCUMENT_ONLY_EVENT
-#error "Don't define DOCUMENT_ONLY_EVENT"
-#endif /* DOCUMENT_ONLY_EVENT */
-#ifdef NON_IDL_EVENT
-#error "Don't define NON_IDL_EVENT"
-#endif /* NON_IDL_EVENT */
+#  ifdef EVENT
+#    error "Don't define EVENT"
+#  endif /* EVENT */
+#  ifdef WINDOW_ONLY_EVENT
+#    error "Don't define WINDOW_ONLY_EVENT"
+#  endif /* WINDOW_ONLY_EVENT */
+#  ifdef TOUCH_EVENT
+#    error "Don't define TOUCH_EVENT"
+#  endif /* TOUCH_EVENT */
+#  ifdef DOCUMENT_ONLY_EVENT
+#    error "Don't define DOCUMENT_ONLY_EVENT"
+#  endif /* DOCUMENT_ONLY_EVENT */
+#  ifdef NON_IDL_EVENT
+#    error "Don't define NON_IDL_EVENT"
+#  endif /* NON_IDL_EVENT */
 
-#define EVENT MESSAGE_TO_EVENT
-#define WINDOW_ONLY_EVENT MESSAGE_TO_EVENT
-#define TOUCH_EVENT MESSAGE_TO_EVENT
-#define DOCUMENT_ONLY_EVENT MESSAGE_TO_EVENT
-#define NON_IDL_EVENT MESSAGE_TO_EVENT
+#  define EVENT MESSAGE_TO_EVENT
+#  define WINDOW_ONLY_EVENT MESSAGE_TO_EVENT
+#  define TOUCH_EVENT MESSAGE_TO_EVENT
+#  define DOCUMENT_ONLY_EVENT MESSAGE_TO_EVENT
+#  define NON_IDL_EVENT MESSAGE_TO_EVENT
 #endif /* MESSAGE_TO_EVENT */
 
 #ifdef DEFINED_FORWARDED_EVENT
-#error "Don't define DEFINED_FORWARDED_EVENT"
+#  error "Don't define DEFINED_FORWARDED_EVENT"
 #endif /* DEFINED_FORWARDED_EVENT */
 
 #ifndef FORWARDED_EVENT
-#define FORWARDED_EVENT EVENT
-#define DEFINED_FORWARDED_EVENT
+#  define FORWARDED_EVENT EVENT
+#  define DEFINED_FORWARDED_EVENT
 #endif /* FORWARDED_EVENT */
 
 #ifdef DEFINED_WINDOW_ONLY_EVENT
-#error "Don't define DEFINED_WINDOW_ONLY_EVENT"
+#  error "Don't define DEFINED_WINDOW_ONLY_EVENT"
 #endif /* DEFINED_WINDOW_ONLY_EVENT */
 
 #ifndef WINDOW_ONLY_EVENT
-#define WINDOW_ONLY_EVENT(_name, _message, _type, _struct)
-#define DEFINED_WINDOW_ONLY_EVENT
+#  define WINDOW_ONLY_EVENT(_name, _message, _type, _struct)
+#  define DEFINED_WINDOW_ONLY_EVENT
 #endif /* WINDOW_ONLY_EVENT */
 
 #ifdef DEFINED_WINDOW_EVENT
-#error "Don't define DEFINED_WINDOW_EVENT"
+#  error "Don't define DEFINED_WINDOW_EVENT"
 #endif /* DEFINED_WINDOW_EVENT */
 
 #ifndef WINDOW_EVENT
-#define WINDOW_EVENT WINDOW_ONLY_EVENT
-#define DEFINED_WINDOW_EVENT
+#  define WINDOW_EVENT WINDOW_ONLY_EVENT
+#  define DEFINED_WINDOW_EVENT
 #endif /* WINDOW_EVENT */
 
 #ifdef DEFINED_TOUCH_EVENT
-#error "Don't define DEFINED_TOUCH_EVENT"
+#  error "Don't define DEFINED_TOUCH_EVENT"
 #endif /* DEFINED_TOUCH_EVENT */
 
 #ifndef TOUCH_EVENT
-#define TOUCH_EVENT(_name, _message, _type, _struct)
-#define DEFINED_TOUCH_EVENT
+#  define TOUCH_EVENT(_name, _message, _type, _struct)
+#  define DEFINED_TOUCH_EVENT
 #endif /* TOUCH_EVENT */
 
 #ifdef DEFINED_DOCUMENT_ONLY_EVENT
-#error "Don't define DEFINED_DOCUMENT_ONLY_EVENT"
+#  error "Don't define DEFINED_DOCUMENT_ONLY_EVENT"
 #endif /* DEFINED_DOCUMENT_ONLY_EVENT */
 
 #ifndef DOCUMENT_ONLY_EVENT
-#define DOCUMENT_ONLY_EVENT(_name, _message, _type, _struct)
-#define DEFINED_DOCUMENT_ONLY_EVENT
+#  define DOCUMENT_ONLY_EVENT(_name, _message, _type, _struct)
+#  define DEFINED_DOCUMENT_ONLY_EVENT
 #endif /* DOCUMENT_ONLY_EVENT */
 
 #ifdef DEFINED_NON_IDL_EVENT
-#error "Don't define DEFINED_NON_IDL_EVENT"
+#  error "Don't define DEFINED_NON_IDL_EVENT"
 #endif /* DEFINED_NON_IDL_EVENT */
 
 #ifndef NON_IDL_EVENT
-#define NON_IDL_EVENT(_name, _message, _type, _struct)
-#define DEFINED_NON_IDL_EVENT
+#  define NON_IDL_EVENT(_name, _message, _type, _struct)
+#  define DEFINED_NON_IDL_EVENT
 #endif /* NON_IDL_EVENT */
 
 #ifdef DEFINED_ERROR_EVENT
-#error "Don't define DEFINED_ERROR_EVENT"
+#  error "Don't define DEFINED_ERROR_EVENT"
 #endif /* DEFINED_ERROR_EVENT */
 
 #ifndef ERROR_EVENT
-#define ERROR_EVENT FORWARDED_EVENT
-#define DEFINED_ERROR_EVENT
+#  define ERROR_EVENT FORWARDED_EVENT
+#  define DEFINED_ERROR_EVENT
 #endif /* ERROR_EVENT */
 
 #ifdef DEFINED_BEFOREUNLOAD_EVENT
-#error "Don't define DEFINED_BEFOREUNLOAD_EVENT"
+#  error "Don't define DEFINED_BEFOREUNLOAD_EVENT"
 #endif /* DEFINED_BEFOREUNLOAD_EVENT */
 
 #ifndef BEFOREUNLOAD_EVENT
-#define BEFOREUNLOAD_EVENT WINDOW_EVENT
-#define DEFINED_BEFOREUNLOAD_EVENT
+#  define BEFOREUNLOAD_EVENT WINDOW_EVENT
+#  define DEFINED_BEFOREUNLOAD_EVENT
 #endif /* BEFOREUNLOAD_EVENT */
 
 EVENT(abort, eImageAbort, EventNameType_All, eBasicEventClass)
 EVENT(bounce, eMarqueeBounce, EventNameType_HTMLMarqueeOnly, eBasicEventClass)
 EVENT(canplay, eCanPlay, EventNameType_HTML, eBasicEventClass)
 EVENT(canplaythrough, eCanPlayThrough, EventNameType_HTML, eBasicEventClass)
 EVENT(change, eFormChange, EventNameType_HTMLXUL, eBasicEventClass)
 EVENT(CheckboxStateChange, eFormCheckboxStateChange, EventNameType_None,
@@ -533,54 +533,54 @@ EVENT(webkittransitionend, eWebkitTransi
       eTransitionEventClass)
 #endif
 
 NON_IDL_EVENT(audioprocess, eAudioProcess, EventNameType_None, eBasicEventClass)
 
 NON_IDL_EVENT(complete, eAudioComplete, EventNameType_None, eBasicEventClass)
 
 #ifdef DEFINED_FORWARDED_EVENT
-#undef DEFINED_FORWARDED_EVENT
-#undef FORWARDED_EVENT
+#  undef DEFINED_FORWARDED_EVENT
+#  undef FORWARDED_EVENT
 #endif /* DEFINED_FORWARDED_EVENT */
 
 #ifdef DEFINED_WINDOW_EVENT
-#undef DEFINED_WINDOW_EVENT
-#undef WINDOW_EVENT
+#  undef DEFINED_WINDOW_EVENT
+#  undef WINDOW_EVENT
 #endif /* DEFINED_WINDOW_EVENT */
 
 #ifdef DEFINED_WINDOW_ONLY_EVENT
-#undef DEFINED_WINDOW_ONLY_EVENT
-#undef WINDOW_ONLY_EVENT
+#  undef DEFINED_WINDOW_ONLY_EVENT
+#  undef WINDOW_ONLY_EVENT
 #endif /* DEFINED_WINDOW_ONLY_EVENT */
 
 #ifdef DEFINED_TOUCH_EVENT
-#undef DEFINED_TOUCH_EVENT
-#undef TOUCH_EVENT
+#  undef DEFINED_TOUCH_EVENT
+#  undef TOUCH_EVENT
 #endif /* DEFINED_TOUCH_EVENT */
 
 #ifdef DEFINED_DOCUMENT_ONLY_EVENT
-#undef DEFINED_DOCUMENT_ONLY_EVENT
-#undef DOCUMENT_ONLY_EVENT
+#  undef DEFINED_DOCUMENT_ONLY_EVENT
+#  undef DOCUMENT_ONLY_EVENT
 #endif /* DEFINED_DOCUMENT_ONLY_EVENT */
 
 #ifdef DEFINED_NON_IDL_EVENT
-#undef DEFINED_NON_IDL_EVENT
-#undef NON_IDL_EVENT
+#  undef DEFINED_NON_IDL_EVENT
+#  undef NON_IDL_EVENT
 #endif /* DEFINED_NON_IDL_EVENT */
 
 #ifdef DEFINED_ERROR_EVENT
-#undef DEFINED_ERROR_EVENT
-#undef ERROR_EVENT
+#  undef DEFINED_ERROR_EVENT
+#  undef ERROR_EVENT
 #endif /* DEFINED_ERROR_EVENT */
 
 #ifdef DEFINED_BEFOREUNLOAD_EVENT
-#undef DEFINED_BEFOREUNLOAD_EVENT
-#undef BEFOREUNLOAD_EVENT
+#  undef DEFINED_BEFOREUNLOAD_EVENT
+#  undef BEFOREUNLOAD_EVENT
 #endif /* BEFOREUNLOAD_EVENT */
 
 #ifdef MESSAGE_TO_EVENT
-#undef EVENT
-#undef WINDOW_ONLY_EVENT
-#undef TOUCH_EVENT
-#undef DOCUMENT_ONLY_EVENT
-#undef NON_IDL_EVENT
+#  undef EVENT
+#  undef WINDOW_ONLY_EVENT
+#  undef TOUCH_EVENT
+#  undef DOCUMENT_ONLY_EVENT
+#  undef NON_IDL_EVENT
 #endif /* MESSAGE_TO_EVENT */
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -80,33 +80,33 @@
 #include "nsServiceManagerUtils.h"
 #include "nsITimer.h"
 #include "nsFontMetrics.h"
 #include "nsIDragService.h"
 #include "nsIDragSession.h"
 #include "mozilla/dom/DataTransfer.h"
 #include "nsContentAreaDragDrop.h"
 #ifdef MOZ_XUL
-#include "nsTreeBodyFrame.h"
+#  include "nsTreeBodyFrame.h"
 #endif
 #include "nsIController.h"
 #include "nsICommandParams.h"
 #include "mozilla/Services.h"
 #include "mozilla/dom/ContentParent.h"
 #include "mozilla/dom/HTMLLabelElement.h"
 #include "mozilla/dom/Selection.h"
 
 #include "mozilla/Preferences.h"
 #include "mozilla/LookAndFeel.h"
 #include "GeckoProfiler.h"
 #include "Units.h"
 #include "nsIObjectLoadingContent.h"
 
 #ifdef XP_MACOSX
-#import <ApplicationServices/ApplicationServices.h>
+#  import <ApplicationServices/ApplicationServices.h>
 #endif
 
 namespace mozilla {
 
 using namespace dom;
 
 static const LayoutDeviceIntPoint kInvalidRefPoint =
     LayoutDeviceIntPoint(-1, -1);
@@ -217,17 +217,17 @@ EventStateManager::WheelPrefs* EventStat
     nullptr;
 bool EventStateManager::WheelPrefs::sWheelEventsEnabledOnPlugins = true;
 bool EventStateManager::WheelPrefs::sIsAutoDirEnabled = false;
 bool EventStateManager::WheelPrefs::sHonoursRootForAutoDir = false;
 EventStateManager::DeltaAccumulator*
     EventStateManager::DeltaAccumulator::sInstance = nullptr;
 
 constexpr const StyleCursorKind kInvalidCursorKind =
-  static_cast<StyleCursorKind>(255);
+    static_cast<StyleCursorKind>(255);
 
 EventStateManager::EventStateManager()
     : mLockCursor(kInvalidCursorKind),
       mLastFrameConsumedSetCursor(false),
       mCurrentTarget(nullptr),
       // init d&d gesture state machine variables
       mGestureDownPoint(0, 0),
       mGestureModifiers(0),
@@ -3660,17 +3660,18 @@ void EventStateManager::UpdateCursor(nsP
     // Check whether or not to show the busy cursor
     nsCOMPtr<nsIDocShell> docShell(aPresContext->GetDocShell());
     if (!docShell) return;
     auto busyFlags = docShell->GetBusyFlags();
 
     // Show busy cursor everywhere before page loads
     // and just replace the arrow cursor after page starts loading
     if (busyFlags & nsIDocShell::BUSY_FLAGS_BUSY &&
-        (cursor == StyleCursorKind::Auto || cursor == StyleCursorKind::Default)) {
+        (cursor == StyleCursorKind::Auto ||
+         cursor == StyleCursorKind::Default)) {
       cursor = StyleCursorKind::Progress;
       container = nullptr;
     }
   }
 
   if (aTargetFrame) {
     SetCursor(cursor, container, haveHotspot, hotspotX, hotspotY,
               aTargetFrame->GetNearestWidget(), false);
--- a/dom/events/TextComposition.cpp
+++ b/dom/events/TextComposition.cpp
@@ -20,27 +20,27 @@
 #include "mozilla/StaticPrefs.h"
 #include "mozilla/TextComposition.h"
 #include "mozilla/TextEvents.h"
 #include "mozilla/Unused.h"
 #include "mozilla/dom/TabParent.h"
 
 #ifdef XP_MACOSX
 // Some defiens will be conflict with OSX SDK
-#define TextRange _TextRange
-#define TextRangeArray _TextRangeArray
-#define Comment _Comment
+#  define TextRange _TextRange
+#  define TextRangeArray _TextRangeArray
+#  define Comment _Comment
 #endif
 
 #include "nsPluginInstanceOwner.h"
 
 #ifdef XP_MACOSX
-#undef TextRange
-#undef TextRangeArray
-#undef Comment
+#  undef TextRange
+#  undef TextRangeArray
+#  undef Comment
 #endif
 
 using namespace mozilla::widget;
 
 namespace mozilla {
 
 #define IDEOGRAPHIC_SPACE (NS_LITERAL_STRING(u"\x3000"))
 
--- a/dom/fetch/FetchConsumer.cpp
+++ b/dom/fetch/FetchConsumer.cpp
@@ -21,17 +21,17 @@
 #include "mozilla/ipc/PBackgroundSharedTypes.h"
 #include "nsIInputStreamPump.h"
 #include "nsIThreadRetargetableRequest.h"
 #include "nsProxyRelease.h"
 
 // Undefine the macro of CreateFile to avoid FileCreatorHelper#CreateFile being
 // replaced by FileCreatorHelper#CreateFileW.
 #ifdef CreateFile
-#undef CreateFile
+#  undef CreateFile
 #endif
 
 namespace mozilla {
 namespace dom {
 
 namespace {
 
 template <class Derived>
--- a/dom/fetch/InternalRequest.h
+++ b/dom/fetch/InternalRequest.h
@@ -12,19 +12,19 @@
 #include "mozilla/dom/RequestBinding.h"
 #include "mozilla/LoadTainting.h"
 #include "mozilla/net/ReferrerPolicy.h"
 
 #include "nsIContentPolicy.h"
 #include "nsIInputStream.h"
 #include "nsISupportsImpl.h"
 #ifdef DEBUG
-#include "nsIURLParser.h"
-#include "nsNetCID.h"
-#include "nsServiceManagerUtils.h"
+#  include "nsIURLParser.h"
+#  include "nsNetCID.h"
+#  include "nsServiceManagerUtils.h"
 #endif
 
 namespace mozilla {
 
 namespace ipc {
 class PrincipalInfo;
 }  // namespace ipc
 
--- a/dom/file/FileCreatorHelper.cpp
+++ b/dom/file/FileCreatorHelper.cpp
@@ -14,17 +14,17 @@
 #include "mozilla/dom/Promise.h"
 #include "nsContentUtils.h"
 #include "nsPIDOMWindow.h"
 #include "nsIFile.h"
 
 // Undefine the macro of CreateFile to avoid FileCreatorHelper#CreateFile being
 // replaced by FileCreatorHelper#CreateFileW.
 #ifdef CreateFile
-#undef CreateFile
+#  undef CreateFile
 #endif
 
 namespace mozilla {
 namespace dom {
 
 /* static */ already_AddRefed<Promise> FileCreatorHelper::CreateFile(
     nsIGlobalObject* aGlobalObject, nsIFile* aFile,
     const ChromeFilePropertyBag& aBag, bool aIsFromNsIFile, ErrorResult& aRv) {
--- a/dom/file/FileCreatorHelper.h
+++ b/dom/file/FileCreatorHelper.h
@@ -10,17 +10,17 @@
 #include "mozilla/Attributes.h"
 #include "mozilla/ErrorResult.h"
 #include "mozilla/RefPtr.h"
 #include "nsISupportsImpl.h"
 
 // Undefine the macro of CreateFile to avoid FileCreatorHelper#CreateFile being
 // replaced by FileCreatorHelper#CreateFileW.
 #ifdef CreateFile
-#undef CreateFile
+#  undef CreateFile
 #endif
 
 class nsIFile;
 class nsIGlobalObject;
 class nsPIDOMWindowInner;
 
 namespace mozilla {
 namespace dom {
--- a/dom/filehandle/ActorsParent.cpp
+++ b/dom/filehandle/ActorsParent.cpp
@@ -36,21 +36,21 @@
 #include "nsTArray.h"
 #include "nsThreadPool.h"
 #include "nsThreadUtils.h"
 #include "nsXPCOMCIDInternal.h"
 
 #define DISABLE_ASSERTS_FOR_FUZZING 0
 
 #if DISABLE_ASSERTS_FOR_FUZZING
-#define ASSERT_UNLESS_FUZZING(...) \
-  do {                             \
-  } while (0)
+#  define ASSERT_UNLESS_FUZZING(...) \
+    do {                             \
+    } while (0)
 #else
-#define ASSERT_UNLESS_FUZZING(...) MOZ_ASSERT(false, __VA_ARGS__)
+#  define ASSERT_UNLESS_FUZZING(...) MOZ_ASSERT(false, __VA_ARGS__)
 #endif
 
 namespace mozilla {
 namespace dom {
 
 using namespace mozilla::dom::quota;
 using namespace mozilla::ipc;
 
--- a/dom/gamepad/ipc/GamepadEventChannelChild.h
+++ b/dom/gamepad/ipc/GamepadEventChannelChild.h
@@ -1,17 +1,17 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #include "mozilla/dom/PGamepadEventChannelChild.h"
 
 #ifndef mozilla_dom_GamepadEventChannelChild_h_
-#define mozilla_dom_GamepadEventChannelChild_h_
+#  define mozilla_dom_GamepadEventChannelChild_h_
 
 namespace mozilla {
 namespace dom {
 
 class GamepadEventChannelChild final : public PGamepadEventChannelChild {
  public:
   GamepadEventChannelChild() {}
   ~GamepadEventChannelChild() {}
--- a/dom/gamepad/ipc/GamepadEventChannelParent.h
+++ b/dom/gamepad/ipc/GamepadEventChannelParent.h
@@ -1,17 +1,17 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #include "mozilla/dom/PGamepadEventChannelParent.h"
 
 #ifndef mozilla_dom_GamepadEventChannelParent_h_
-#define mozilla_dom_GamepadEventChannelParent_h_
+#  define mozilla_dom_GamepadEventChannelParent_h_
 
 namespace mozilla {
 namespace dom {
 
 class GamepadEventChannelParent final : public PGamepadEventChannelParent {
  public:
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(GamepadEventChannelParent)
   GamepadEventChannelParent();
--- a/dom/gamepad/ipc/GamepadTestChannelChild.h
+++ b/dom/gamepad/ipc/GamepadTestChannelChild.h
@@ -3,17 +3,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/dom/PGamepadTestChannelChild.h"
 #include "mozilla/dom/Promise.h"
 
 #ifndef mozilla_dom_GamepadTestChannelChild_h_
-#define mozilla_dom_GamepadTestChannelChild_h_
+#  define mozilla_dom_GamepadTestChannelChild_h_
 
 namespace mozilla {
 namespace dom {
 
 class GamepadTestChannelChild final : public PGamepadTestChannelChild {
  public:
   GamepadTestChannelChild() {}
   ~GamepadTestChannelChild() {}
--- a/dom/gamepad/ipc/GamepadTestChannelParent.h
+++ b/dom/gamepad/ipc/GamepadTestChannelParent.h
@@ -2,17 +2,17 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/dom/PGamepadTestChannelParent.h"
 
 #ifndef mozilla_dom_GamepadTestChannelParent_h_
-#define mozilla_dom_GamepadTestChannelParent_h_
+#  define mozilla_dom_GamepadTestChannelParent_h_
 
 namespace mozilla {
 namespace dom {
 
 class GamepadTestChannelParent final : public PGamepadTestChannelParent {
  public:
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(GamepadTestChannelParent)
   GamepadTestChannelParent() : mShuttingdown(false) {}
--- a/dom/gamepad/windows/WindowsGamepad.cpp
+++ b/dom/gamepad/windows/WindowsGamepad.cpp
@@ -3,17 +3,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include <algorithm>
 #include <cstddef>
 
 #ifndef UNICODE
-#define UNICODE
+#  define UNICODE
 #endif
 #include <windows.h>
 #include <hidsdi.h>
 #include <stdio.h>
 #include <xinput.h>
 
 #include "nsIComponentManager.h"
 #include "nsITimer.h"
@@ -48,17 +48,17 @@ const uint32_t kDevicesChangedStableDela
 // Both DirectInput and XInput are polling-driven here,
 // so we need to poll it periodically.
 // 50ms is arbitrarily chosen.
 const uint32_t kWindowsGamepadPollInterval = 50;
 
 const UINT kRawInputError = (UINT)-1;
 
 #ifndef XUSER_MAX_COUNT
-#define XUSER_MAX_COUNT 4
+#  define XUSER_MAX_COUNT 4
 #endif
 
 const struct {
   int usagePage;
   int usage;
 } kUsagePages[] = {
     // USB HID usage tables, page 1
     {kDesktopUsagePage, 4},  // Joystick
--- a/dom/geolocation/nsGeolocation.cpp
+++ b/dom/geolocation/nsGeolocation.cpp
@@ -31,30 +31,30 @@
 #include "nsPIDOMWindow.h"
 #include "nsServiceManagerUtils.h"
 #include "nsThreadUtils.h"
 #include "nsXULAppAPI.h"
 
 class nsIPrincipal;
 
 #ifdef MOZ_WIDGET_ANDROID
-#include "AndroidLocationProvider.h"
+#  include "AndroidLocationProvider.h"
 #endif
 
 #ifdef MOZ_GPSD
-#include "GpsdLocationProvider.h"
+#  include "GpsdLocationProvider.h"
 #endif
 
 #ifdef MOZ_WIDGET_COCOA
-#include "CoreLocationLocationProvider.h"
+#  include "CoreLocationLocationProvider.h"
 #endif
 
 #ifdef XP_WIN
-#include "WindowsLocationProvider.h"
-#include "mozilla/WindowsVersion.h"
+#  include "WindowsLocationProvider.h"
+#  include "mozilla/WindowsVersion.h"
 #endif
 
 // Some limit to the number of get or watch geolocation requests
 // that a window can make.
 #define MAX_GEO_REQUESTS_PER_WINDOW 1500
 
 // This preference allows to override the "secure context" by
 // default policy.
@@ -520,21 +520,21 @@ nsresult nsGeolocationService::Init() {
 
   obs->AddObserver(this, "xpcom-shutdown", false);
 
 #ifdef MOZ_WIDGET_ANDROID
   mProvider = new AndroidLocationProvider();
 #endif
 
 #ifdef MOZ_WIDGET_GTK
-#ifdef MOZ_GPSD
+#  ifdef MOZ_GPSD
   if (Preferences::GetBool("geo.provider.use_gpsd", false)) {
     mProvider = new GpsdLocationProvider();
   }
-#endif
+#  endif
 #endif
 
 #ifdef MOZ_WIDGET_COCOA
   if (Preferences::GetBool("geo.provider.use_corelocation", true)) {
     mProvider = new CoreLocationLocationProvider();
   }
 #endif
 
--- a/dom/html/HTMLCanvasElement.h
+++ b/dom/html/HTMLCanvasElement.h
@@ -1,29 +1,29 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #if !defined(mozilla_dom_HTMLCanvasElement_h)
-#define mozilla_dom_HTMLCanvasElement_h
+#  define mozilla_dom_HTMLCanvasElement_h
 
-#include "mozilla/Attributes.h"
-#include "mozilla/WeakPtr.h"
-#include "nsIDOMEventListener.h"
-#include "nsIObserver.h"
-#include "nsGenericHTMLElement.h"
-#include "nsGkAtoms.h"
-#include "nsSize.h"
-#include "nsError.h"
+#  include "mozilla/Attributes.h"
+#  include "mozilla/WeakPtr.h"
+#  include "nsIDOMEventListener.h"
+#  include "nsIObserver.h"
+#  include "nsGenericHTMLElement.h"
+#  include "nsGkAtoms.h"
+#  include "nsSize.h"
+#  include "nsError.h"
 
-#include "mozilla/dom/BindingDeclarations.h"
-#include "mozilla/dom/CanvasRenderingContextHelper.h"
-#include "mozilla/gfx/Rect.h"
-#include "mozilla/layers/LayersTypes.h"
+#  include "mozilla/dom/BindingDeclarations.h"
+#  include "mozilla/dom/CanvasRenderingContextHelper.h"
+#  include "mozilla/gfx/Rect.h"
+#  include "mozilla/layers/LayersTypes.h"
 
 class nsICanvasRenderingContextInternal;
 class nsITimerCallback;
 
 namespace mozilla {
 
 class WebGLContext;
 
--- a/dom/html/HTMLEmbedElement.cpp
+++ b/dom/html/HTMLEmbedElement.cpp
@@ -11,18 +11,18 @@
 
 #include "mozilla/dom/Document.h"
 #include "nsIPluginDocument.h"
 #include "nsThreadUtils.h"
 #include "nsIScriptError.h"
 #include "nsIWidget.h"
 #include "nsContentUtils.h"
 #ifdef XP_MACOSX
-#include "mozilla/EventDispatcher.h"
-#include "mozilla/dom/Event.h"
+#  include "mozilla/EventDispatcher.h"
+#  include "mozilla/dom/Event.h"
 #endif
 #include "mozilla/dom/HTMLObjectElement.h"
 
 NS_IMPL_NS_NEW_HTML_ELEMENT_CHECK_PARSER(Embed)
 
 namespace mozilla {
 namespace dom {
 
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -1,35 +1,35 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifdef XP_WIN
-#include "objbase.h"
+#  include "objbase.h"
 // Some Windows header defines this, so undef it as it conflicts with our
 // function of the same name.
-#undef GetCurrentTime
+#  undef GetCurrentTime
 #endif
 
 #include "mozilla/dom/HTMLMediaElement.h"
 #include "AudioChannelService.h"
 #include "AudioDeviceInfo.h"
 #include "AudioStreamTrack.h"
 #include "AutoplayPolicy.h"
 #include "ChannelMediaDecoder.h"
 #include "DOMMediaStream.h"
 #include "DecoderDoctorDiagnostics.h"
 #include "DecoderDoctorLogger.h"
 #include "DecoderTraits.h"
 #include "FrameStatistics.h"
 #include "GMPCrashHelper.h"
 #ifdef MOZ_ANDROID_HLS_SUPPORT
-#include "HLSDecoder.h"
+#  include "HLSDecoder.h"
 #endif
 #include "HTMLMediaElement.h"
 #include "ImageContainer.h"
 #include "Layers.h"
 #include "MP4Decoder.h"
 #include "MediaContainerType.h"
 #include "MediaError.h"
 #include "MediaManager.h"
--- a/dom/html/HTMLMediaElement.h
+++ b/dom/html/HTMLMediaElement.h
@@ -24,17 +24,17 @@
 #include "mozilla/StateWatching.h"
 #include "nsGkAtoms.h"
 #include "PrincipalChangeObserver.h"
 #include "nsStubMutationObserver.h"
 #include "MediaSegment.h"  // for PrincipalHandle, GraphTime
 
 // X.h on Linux #defines CurrentTime as 0L, so we have to #undef it here.
 #ifdef CurrentTime
-#undef CurrentTime
+#  undef CurrentTime
 #endif
 
 #include "mozilla/dom/HTMLMediaElementBinding.h"
 
 // Define to output information on decoding and painting framerate
 /* #define DEBUG_FRAME_RATE 1 */
 
 typedef uint16_t nsMediaNetworkState;
--- a/dom/html/HTMLObjectElement.cpp
+++ b/dom/html/HTMLObjectElement.cpp
@@ -15,19 +15,19 @@
 #include "nsError.h"
 #include "mozilla/dom/Document.h"
 #include "nsIPluginDocument.h"
 #include "nsIObjectFrame.h"
 #include "nsNPAPIPluginInstance.h"
 #include "nsIWidget.h"
 #include "nsContentUtils.h"
 #ifdef XP_MACOSX
-#include "mozilla/EventDispatcher.h"
-#include "mozilla/dom/Event.h"
-#include "nsFocusManager.h"
+#  include "mozilla/EventDispatcher.h"
+#  include "mozilla/dom/Event.h"
+#  include "nsFocusManager.h"
 #endif
 
 namespace mozilla {
 namespace dom {
 
 HTMLObjectElement::HTMLObjectElement(
     already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo,
     FromParser aFromParser)
--- a/dom/html/HTMLTrackElement.cpp
+++ b/dom/html/HTMLTrackElement.cpp
@@ -4,17 +4,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/dom/HTMLTrackElement.h"
 #include "mozilla/dom/Element.h"
 #include "mozilla/dom/HTMLMediaElement.h"
 #ifdef XP_WIN
 // HTMLTrackElement.webidl defines ERROR, but so does windows.h:
-#undef ERROR
+#  undef ERROR
 #endif
 #include "WebVTTListener.h"
 #include "mozilla/LoadInfo.h"
 #include "mozilla/dom/HTMLTrackElementBinding.h"
 #include "mozilla/dom/HTMLUnknownElement.h"
 #include "nsAttrValueInlines.h"
 #include "nsCOMPtr.h"
 #include "nsContentPolicyUtils.h"
--- a/dom/indexedDB/ActorsChild.cpp
+++ b/dom/indexedDB/ActorsChild.cpp
@@ -47,27 +47,27 @@
 #include "nsPIDOMWindow.h"
 #include "nsThreadUtils.h"
 #include "nsTraceRefcnt.h"
 #include "PermissionRequestBase.h"
 #include "ProfilerHelpers.h"
 #include "ReportInternalError.h"
 
 #ifdef DEBUG
-#include "IndexedDatabaseManager.h"
+#  include "IndexedDatabaseManager.h"
 #endif
 
 #define GC_ON_IPC_MESSAGES 0
 
 #if defined(DEBUG) || GC_ON_IPC_MESSAGES
 
-#include "js/GCAPI.h"
-#include "nsJSEnvironment.h"
-
-#define BUILD_GC_ON_IPC_MESSAGES
+#  include "js/GCAPI.h"
+#  include "nsJSEnvironment.h"
+
+#  define BUILD_GC_ON_IPC_MESSAGES
 
 #endif  // DEBUG || GC_ON_IPC_MESSAGES
 
 namespace mozilla {
 
 using ipc::PrincipalInfo;
 
 namespace dom {
@@ -98,21 +98,21 @@ ThreadLocal::~ThreadLocal() {
  * Helpers
  ******************************************************************************/
 
 namespace {
 
 void MaybeCollectGarbageOnIPCMessage() {
 #ifdef BUILD_GC_ON_IPC_MESSAGES
   static const bool kCollectGarbageOnIPCMessages =
-#if GC_ON_IPC_MESSAGES
+#  if GC_ON_IPC_MESSAGES
       true;
-#else
+#  else
       false;
-#endif  // GC_ON_IPC_MESSAGES
+#  endif  // GC_ON_IPC_MESSAGES
 
   if (!kCollectGarbageOnIPCMessages) {
     return;
   }
 
   static bool haveWarnedAboutGC = false;
   static bool haveWarnedAboutNonMainThread = false;
 
--- a/dom/indexedDB/ActorsParent.cpp
+++ b/dom/indexedDB/ActorsParent.cpp
@@ -112,28 +112,28 @@
 #include "prsystem.h"
 #include "prtime.h"
 #include "ReportInternalError.h"
 #include "snappy/snappy.h"
 
 #define DISABLE_ASSERTS_FOR_FUZZING 0
 
 #if DISABLE_ASSERTS_FOR_FUZZING
-#define ASSERT_UNLESS_FUZZING(...) \
-  do {                             \
-  } while (0)
+#  define ASSERT_UNLESS_FUZZING(...) \
+    do {                             \
+    } while (0)
 #else
-#define ASSERT_UNLESS_FUZZING(...) MOZ_ASSERT(false, __VA_ARGS__)
+#  define ASSERT_UNLESS_FUZZING(...) MOZ_ASSERT(false, __VA_ARGS__)
 #endif
 
 #define IDB_DEBUG_LOG(_args) \
   MOZ_LOG(IndexedDatabaseManager::GetLoggingModule(), LogLevel::Debug, _args)
 
 #if defined(MOZ_WIDGET_ANDROID)
-#define IDB_MOBILE
+#  define IDB_MOBILE
 #endif
 
 namespace mozilla {
 
 MOZ_TYPE_SPECIFIC_SCOPED_POINTER_TEMPLATE(ScopedPRFileDesc, PRFileDesc,
                                           PR_Close);
 
 namespace dom {
--- a/dom/indexedDB/IDBFactory.cpp
+++ b/dom/indexedDB/IDBFactory.cpp
@@ -36,17 +36,17 @@
 #include "nsServiceManagerUtils.h"
 #include "ProfilerHelpers.h"
 #include "ReportInternalError.h"
 
 // Include this last to avoid path problems on Windows.
 #include "ActorsChild.h"
 
 #ifdef DEBUG
-#include "nsContentUtils.h"  // For assertions.
+#  include "nsContentUtils.h"  // For assertions.
 #endif
 
 namespace mozilla {
 namespace dom {
 
 using namespace mozilla::dom::indexedDB;
 using namespace mozilla::dom::quota;
 using namespace mozilla::ipc;
--- a/dom/indexedDB/IndexedDatabaseInlines.h
+++ b/dom/indexedDB/IndexedDatabaseInlines.h
@@ -3,17 +3,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef IndexedDatabaseInlines_h
 #define IndexedDatabaseInlines_h
 
 #ifndef mozilla_dom_indexeddatabase_h__
-#error Must include IndexedDatabase.h first
+#  error Must include IndexedDatabase.h first
 #endif
 
 #include "FileInfo.h"
 #include "IDBMutableFile.h"
 #include "mozilla/dom/indexedDB/PBackgroundIDBSharedTypes.h"
 #include "mozilla/dom/File.h"
 #include "nsIInputStream.h"
 
--- a/dom/indexedDB/IndexedDatabaseManager.cpp
+++ b/dom/indexedDB/IndexedDatabaseManager.cpp
@@ -915,24 +915,24 @@ void IndexedDatabaseManager::LoggingMode
   if (!Preferences::GetBool(kPrefLoggingEnabled)) {
     sLoggingMode = Logging_Disabled;
     return;
   }
 
   bool useProfiler =
 #if defined(DEBUG) || defined(MOZ_GECKO_PROFILER)
       Preferences::GetBool(kPrefLoggingProfiler);
-#if !defined(MOZ_GECKO_PROFILER)
+#  if !defined(MOZ_GECKO_PROFILER)
   if (useProfiler) {
     NS_WARNING(
         "IndexedDB cannot create profiler marks because this build does "
         "not have profiler extensions enabled!");
     useProfiler = false;
   }
-#endif
+#  endif
 #else
       false;
 #endif
 
   const bool logDetails = Preferences::GetBool(kPrefLoggingDetails);
 
   if (useProfiler) {
     sLoggingMode = logDetails ? Logging_DetailedProfilerMarks
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifdef MOZ_WIDGET_GTK
-#include <gtk/gtk.h>
+#  include <gtk/gtk.h>
 #endif
 
 #include "ContentChild.h"
 
 #include "GeckoProfiler.h"
 #include "TabChild.h"
 #include "HandlerServiceChild.h"
 
@@ -93,36 +93,36 @@
 #include "imgLoader.h"
 #include "GMPServiceChild.h"
 #include "nsISimpleEnumerator.h"
 #include "nsIStringBundle.h"
 #include "nsIWorkerDebuggerManager.h"
 #include "nsGeolocation.h"
 
 #if !defined(XP_WIN)
-#include "mozilla/Omnijar.h"
+#  include "mozilla/Omnijar.h"
 #endif
 
 #ifdef MOZ_GECKO_PROFILER
-#include "ChildProfilerController.h"
+#  include "ChildProfilerController.h"
 #endif
 
 #if defined(MOZ_CONTENT_SANDBOX)
-#include "mozilla/SandboxSettings.h"
-#if defined(XP_WIN)
-#include "mozilla/sandboxTarget.h"
-#elif defined(XP_LINUX)
-#include "mozilla/Sandbox.h"
-#include "mozilla/SandboxInfo.h"
-#include "CubebUtils.h"
-#elif defined(XP_MACOSX)
-#include "mozilla/Sandbox.h"
-#elif defined(__OpenBSD__)
-#include <unistd.h>
-#endif
+#  include "mozilla/SandboxSettings.h"
+#  if defined(XP_WIN)
+#    include "mozilla/sandboxTarget.h"
+#  elif defined(XP_LINUX)
+#    include "mozilla/Sandbox.h"
+#    include "mozilla/SandboxInfo.h"
+#    include "CubebUtils.h"
+#  elif defined(XP_MACOSX)
+#    include "mozilla/Sandbox.h"
+#  elif defined(__OpenBSD__)
+#    include <unistd.h>
+#  endif
 #endif
 
 #include "mozilla/Unused.h"
 
 #include "mozInlineSpellChecker.h"
 #include "nsDocShell.h"
 #include "nsDocShellLoadState.h"
 #include "nsIConsoleListener.h"
@@ -152,17 +152,17 @@
 #include "nsAnonymousTemporaryFile.h"
 #include "nsClipboardProxy.h"
 #include "nsDirectoryService.h"
 #include "nsDirectoryServiceUtils.h"
 #include "nsDirectoryServiceDefs.h"
 #include "nsContentPermissionHelper.h"
 #include "nsPluginHost.h"
 #ifdef NS_PRINTING
-#include "nsPrintingProxy.h"
+#  include "nsPrintingProxy.h"
 #endif
 #include "nsWindowMemoryReporter.h"
 
 #include "IHistory.h"
 #include "nsNetUtil.h"
 
 #include "base/message_loop.h"
 #include "base/process_util.h"
@@ -173,62 +173,62 @@
 
 #include "nsIGeolocationProvider.h"
 #include "mozilla/dom/PCycleCollectWithLogsChild.h"
 
 #include "nsIScriptSecurityManager.h"
 #include "mozilla/dom/BlobURLProtocolHandler.h"
 
 #ifdef MOZ_WEBRTC
-#include "signaling/src/peerconnection/WebrtcGlobalChild.h"
+#  include "signaling/src/peerconnection/WebrtcGlobalChild.h"
 #endif
 
 #include "nsPermission.h"
 #include "nsPermissionManager.h"
 
 #include "PermissionMessageUtils.h"
 
 #if defined(MOZ_WIDGET_ANDROID)
-#include "APKOpen.h"
+#  include "APKOpen.h"
 #endif
 
 #ifdef XP_WIN
-#include <process.h>
-#define getpid _getpid
-#include "mozilla/widget/AudioSession.h"
-#include "mozilla/audio/AudioNotificationReceiver.h"
+#  include <process.h>
+#  define getpid _getpid
+#  include "mozilla/widget/AudioSession.h"
+#  include "mozilla/audio/AudioNotificationReceiver.h"
 #endif
 
 #if defined(XP_MACOSX)
-#include "nsMacUtilsImpl.h"
-#include <CoreServices/CoreServices.h>
+#  include "nsMacUtilsImpl.h"
+#  include <CoreServices/CoreServices.h>
 // Info.plist key associated with the developer repo path
-#define MAC_DEV_REPO_KEY "MozillaDeveloperRepoPath"
+#  define MAC_DEV_REPO_KEY "MozillaDeveloperRepoPath"
 // Info.plist key associated with the developer repo object directory
-#define MAC_DEV_OBJ_KEY "MozillaDeveloperObjPath"
+#  define MAC_DEV_OBJ_KEY "MozillaDeveloperObjPath"
 #endif /* XP_MACOSX */
 
 #ifdef MOZ_X11
-#include "mozilla/X11Util.h"
+#  include "mozilla/X11Util.h"
 #endif
 
 #ifdef ACCESSIBILITY
-#include "nsAccessibilityService.h"
-#ifdef XP_WIN
-#include "mozilla/a11y/AccessibleWrap.h"
-#endif
+#  include "nsAccessibilityService.h"
+#  ifdef XP_WIN
+#    include "mozilla/a11y/AccessibleWrap.h"
+#  endif
 #endif
 
 #include "mozilla/dom/File.h"
 #include "mozilla/dom/PPresentationChild.h"
 #include "mozilla/dom/PresentationIPCService.h"
 #include "mozilla/ipc/InputStreamUtils.h"
 
 #ifdef MOZ_WEBSPEECH
-#include "mozilla/dom/PSpeechSynthesisChild.h"
+#  include "mozilla/dom/PSpeechSynthesisChild.h"
 #endif
 
 #include "ClearOnShutdown.h"
 #include "ProcessUtils.h"
 #include "URIUtils.h"
 #include "nsContentUtils.h"
 #include "nsIPrincipal.h"
 #include "DomainPolicy.h"
@@ -242,21 +242,21 @@
 #include "gfxPlatform.h"
 #include "nscore.h"  // for NS_FREE_PERMANENT_DATA
 #include "VRManagerChild.h"
 #include "private/pprio.h"
 #include "nsString.h"
 #include "MMPrinter.h"
 
 #ifdef MOZ_WIDGET_GTK
-#include "nsAppRunner.h"
+#  include "nsAppRunner.h"
 #endif
 
 #ifdef MOZ_CODE_COVERAGE
-#include "mozilla/CodeCoverageHandler.h"
+#  include "mozilla/CodeCoverageHandler.h"
 #endif
 
 using namespace mozilla;
 using namespace mozilla::docshell;
 using namespace mozilla::dom::ipc;
 using namespace mozilla::media;
 using namespace mozilla::embedding;
 using namespace mozilla::gmp;
@@ -551,29 +551,30 @@ ContentChild::ContentChild()
   // happens without requiring the observer service at this time.
   if (!sShutdownCanary) {
     sShutdownCanary = new ShutdownCanary();
     ClearOnShutdown(&sShutdownCanary, ShutdownPhase::Shutdown);
   }
 }
 
 #ifdef _MSC_VER
-#pragma warning(push)
-#pragma warning(disable : 4722) /* Silence "destructor never returns" warning \
-                                 */
+#  pragma warning(push)
+#  pragma warning(                                                  \
+      disable : 4722) /* Silence "destructor never returns" warning \
+                       */
 #endif
 
 ContentChild::~ContentChild() {
 #ifndef NS_FREE_PERMANENT_DATA
   MOZ_CRASH("Content Child shouldn't be destroyed.");
 #endif
 }
 
 #ifdef _MSC_VER
-#pragma warning(pop)
+#  pragma warning(pop)
 #endif
 
 NS_INTERFACE_MAP_BEGIN(ContentChild)
   NS_INTERFACE_MAP_ENTRY(nsIContentChild)
   NS_INTERFACE_MAP_ENTRY(nsIWindowProvider)
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, nsIContentChild)
 NS_INTERFACE_MAP_END
 
@@ -603,21 +604,21 @@ bool ContentChild::Init(MessageLoop* aIO
   // on its own when deciding which backend to use, and when starting under
   // XWayland, it may choose to start with the wayland backend
   // instead of the x11 backend.
   // The DISPLAY environment variable is normally set by the parent process.
   // The MOZ_GDK_DISPLAY environment variable is set from nsAppRunner.cpp
   // when --display is set by the command line.
   if (!gfxPlatform::IsHeadless()) {
     const char* display_name = PR_GetEnv("MOZ_GDK_DISPLAY");
-#ifndef MOZ_WAYLAND
+#  ifndef MOZ_WAYLAND
     if (!display_name) {
       display_name = PR_GetEnv("DISPLAY");
     }
-#endif
+#  endif
     if (display_name) {
       int argc = 3;
       char option_name[] = "--display";
       char* argv[] = {
           // argv0 is unused because g_set_prgname() was called in
           // XRE_InitChildProcess().
           nullptr, option_name, const_cast<char*>(display_name), nullptr};
       char** argvp = argv;
@@ -1476,19 +1477,19 @@ static bool StartMacOSContentSandbox() {
 
   // Actual security benefits are only acheived when we additionally deny
   // future connections, however this currently breaks WebGL so it's not done
   // by default.
   if (Preferences::GetBool(
           "security.sandbox.content.mac.disconnect-windowserver")) {
     CGError result = CGSSetDenyWindowServerConnections(true);
     MOZ_DIAGNOSTIC_ASSERT(result == kCGErrorSuccess);
-#if !MOZ_DIAGNOSTIC_ASSERT_ENABLED
+#  if !MOZ_DIAGNOSTIC_ASSERT_ENABLED
     Unused << result;
-#endif
+#  endif
   }
 
   // If the sandbox is already enabled, there's nothing more to do here.
   if (Preferences::GetBool("security.sandbox.content.mac.earlyinit") &&
       !recordreplay::IsRecordingOrReplaying()) {
     return true;
   }
 
@@ -1563,29 +1564,29 @@ static bool StartMacOSContentSandbox() {
 
   if (profileDir) {
     info.hasSandboxedProfile = true;
     info.profileDir.assign(profileDirPath.get());
   } else {
     info.hasSandboxedProfile = false;
   }
 
-#ifdef DEBUG
+#  ifdef DEBUG
   // When a content process dies intentionally (|NoteIntentionalCrash|), for
   // tests it wants to log that it did this. Allow writing to this location
   // that the testrunner wants.
   char* bloatLog = PR_GetEnv("XPCOM_MEM_BLOAT_LOG");
   if (bloatLog != nullptr) {
     // |bloatLog| points to a specific file, but we actually write to a sibling
     // of that path.
     nsAutoCString bloatDirectoryPath =
         nsMacUtilsImpl::GetDirectoryPath(bloatLog);
     info.debugWriteDir.assign(bloatDirectoryPath.get());
   }
-#endif  // DEBUG
+#  endif  // DEBUG
 
   std::string err;
   if (!mozilla::StartMacSandbox(info, err)) {
     NS_WARNING(err.c_str());
     MOZ_CRASH("sandbox_init() failed");
   }
 
   return true;
@@ -1593,53 +1594,53 @@ static bool StartMacOSContentSandbox() {
 #endif
 
 mozilla::ipc::IPCResult ContentChild::RecvSetProcessSandbox(
     const MaybeFileDesc& aBroker) {
   // We may want to move the sandbox initialization somewhere else
   // at some point; see bug 880808.
 #if defined(MOZ_CONTENT_SANDBOX)
   bool sandboxEnabled = true;
-#if defined(XP_LINUX)
+#  if defined(XP_LINUX)
   // On Linux, we have to support systems that can't use any sandboxing.
   if (!SandboxInfo::Get().CanSandboxContent()) {
     sandboxEnabled = false;
   } else {
     // Pre-start audio before sandboxing; see bug 1443612.
     if (!Preferences::GetBool("media.cubeb.sandbox")) {
       Unused << CubebUtils::GetCubebContext();
     }
   }
 
   if (sandboxEnabled) {
     sandboxEnabled = SetContentProcessSandbox(
         ContentProcessSandboxParams::ForThisProcess(aBroker));
   }
-#elif defined(XP_WIN)
+#  elif defined(XP_WIN)
   mozilla::SandboxTarget::Instance()->StartSandbox();
-#elif defined(XP_MACOSX)
+#  elif defined(XP_MACOSX)
   sandboxEnabled = StartMacOSContentSandbox();
-#elif defined(__OpenBSD__)
+#  elif defined(__OpenBSD__)
   sandboxEnabled = StartOpenBSDSandbox(GeckoProcessType_Content);
   /* dont overwrite an existing session dbus address, but ensure it is set */
   if (!PR_GetEnv("DBUS_SESSION_BUS_ADDRESS")) {
     static LazyLogModule sPledgeLog("SandboxPledge");
     MOZ_LOG(sPledgeLog, LogLevel::Debug,
             ("no session dbus found, faking one\n"));
     PR_SetEnv("DBUS_SESSION_BUS_ADDRESS=");
   }
-#endif
+#  endif
 
   CrashReporter::AnnotateCrashReport(
       CrashReporter::Annotation::ContentSandboxEnabled, sandboxEnabled);
-#if defined(XP_LINUX) && !defined(OS_ANDROID)
+#  if defined(XP_LINUX) && !defined(OS_ANDROID)
   CrashReporter::AnnotateCrashReport(
       CrashReporter::Annotation::ContentSandboxCapabilities,
       static_cast<int>(SandboxInfo::Get().AsInteger()));
-#endif /* XP_LINUX && !OS_ANDROID */
+#  endif /* XP_LINUX && !OS_ANDROID */
   CrashReporter::AnnotateCrashReport(CrashReporter::Annotation::RemoteType,
                                      NS_ConvertUTF16toUTF8(GetRemoteType()));
 #endif /* MOZ_CONTENT_SANDBOX */
 
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult ContentChild::RecvBidiKeyboardNotify(
@@ -2436,23 +2437,23 @@ mozilla::ipc::IPCResult ContentChild::Re
     os->NotifyObservers(nullptr, "memory-pressure", reason.get());
   }
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult ContentChild::RecvActivateA11y(
     const uint32_t& aMainChromeTid, const uint32_t& aMsaaID) {
 #ifdef ACCESSIBILITY
-#ifdef XP_WIN
+#  ifdef XP_WIN
   MOZ_ASSERT(aMainChromeTid != 0);
   mMainChromeTid = aMainChromeTid;
 
   MOZ_ASSERT(aMsaaID != 0);
   mMsaaID = aMsaaID;
-#endif  // XP_WIN
+#  endif  // XP_WIN
 
   // Start accessibility in content process if it's running in chrome
   // process.
   GetOrCreateAccService(nsAccessibilityService::eMainProcess);
 #endif  // ACCESSIBILITY
   return IPC_OK();
 }
 
@@ -3586,17 +3587,17 @@ mozilla::ipc::IPCResult ContentChild::Re
 
   window->Dispatch(TaskCategory::Other, event.forget());
   return IPC_OK();
 }
 
 }  // namespace dom
 
 #if defined(__OpenBSD__) && defined(MOZ_CONTENT_SANDBOX)
-#include <unistd.h>
+#  include <unistd.h>
 
 static LazyLogModule sPledgeLog("SandboxPledge");
 
 bool StartOpenBSDSandbox(GeckoProcessType type) {
   nsAutoCString promisesString;
   nsAutoCString processTypeString;
 
   switch (type) {
--- a/dom/ipc/ContentChild.h
+++ b/dom/ipc/ContentChild.h
@@ -18,17 +18,17 @@
 #include "nsHashKeys.h"
 #include "nsIObserver.h"
 #include "nsTHashtable.h"
 #include "nsRefPtrHashtable.h"
 
 #include "nsIWindowProvider.h"
 
 #if defined(XP_MACOSX) && defined(MOZ_CONTENT_SANDBOX)
-#include "nsIFile.h"
+#  include "nsIFile.h"
 #endif
 
 struct ChromePackage;
 class nsIObserver;
 struct SubstitutionMapping;
 struct OverrideMapping;
 class nsIDomainPolicy;
 class nsIURIClassifierCallback;
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -9,31 +9,31 @@
 #include "base/basictypes.h"
 #include "base/shared_memory.h"
 
 #include "ContentParent.h"
 #include "ProcessUtils.h"
 #include "TabParent.h"
 
 #if defined(ANDROID) || defined(LINUX)
-#include <sys/time.h>
-#include <sys/resource.h>
+#  include <sys/time.h>
+#  include <sys/resource.h>
 #endif
 
 #include "chrome/common/process_watcher.h"
 
 #include "mozilla/a11y/PDocAccessible.h"
 #include "GeckoProfiler.h"
 #include "GMPServiceParent.h"
 #include "HandlerServiceParent.h"
 #include "IHistory.h"
 #include "imgIContainer.h"
 #if defined(XP_WIN) && defined(ACCESSIBILITY)
-#include "mozilla/a11y/AccessibleWrap.h"
-#include "mozilla/a11y/Compatibility.h"
+#  include "mozilla/a11y/AccessibleWrap.h"
+#  include "mozilla/a11y/Compatibility.h"
 #endif
 #include "mozilla/AntiTrackingCommon.h"
 #include "mozilla/BasePrincipal.h"
 #include "mozilla/ClearOnShutdown.h"
 #include "mozilla/StyleSheetInlines.h"
 #include "mozilla/DataStorage.h"
 #include "mozilla/devtools/HeapSnapshotTempFileHelperParent.h"
 #include "mozilla/docshell/OfflineCacheUpdateParent.h"
@@ -210,82 +210,82 @@
 #include "nsICaptivePortalService.h"
 #include "nsIObjectLoadingContent.h"
 #include "nsIBidiKeyboard.h"
 #include "nsLayoutStylesheetCache.h"
 
 #include "mozilla/Sprintf.h"
 
 #ifdef MOZ_WEBRTC
-#include "signaling/src/peerconnection/WebrtcGlobalParent.h"
+#  include "signaling/src/peerconnection/WebrtcGlobalParent.h"
 #endif
 
 #if defined(XP_MACOSX)
-#include "nsMacUtilsImpl.h"
+#  include "nsMacUtilsImpl.h"
 #endif
 
 #if defined(ANDROID) || defined(LINUX)
-#include "nsSystemInfo.h"
+#  include "nsSystemInfo.h"
 #endif
 
 #if defined(XP_LINUX)
-#include "mozilla/Hal.h"
+#  include "mozilla/Hal.h"
 #endif
 
 #ifdef ANDROID
-#include "gfxAndroidPlatform.h"
+#  include "gfxAndroidPlatform.h"
 #endif
 
 #include "nsPermissionManager.h"
 
 #ifdef MOZ_WIDGET_ANDROID
-#include "AndroidBridge.h"
+#  include "AndroidBridge.h"
 #endif
 
 #ifdef MOZ_WIDGET_GTK
-#include <gdk/gdk.h>
+#  include <gdk/gdk.h>
 #endif
 
 #include "mozilla/RemoteSpellCheckEngineParent.h"
 
 #include "Crypto.h"
 
 #ifdef MOZ_WEBSPEECH
-#include "mozilla/dom/SpeechSynthesisParent.h"
+#  include "mozilla/dom/SpeechSynthesisParent.h"
 #endif
 
 #if defined(MOZ_CONTENT_SANDBOX)
-#include "mozilla/SandboxSettings.h"
-#if defined(XP_LINUX)
-#include "mozilla/SandboxInfo.h"
-#include "mozilla/SandboxBroker.h"
-#include "mozilla/SandboxBrokerPolicyFactory.h"
-#endif
+#  include "mozilla/SandboxSettings.h"
+#  if defined(XP_LINUX)
+#    include "mozilla/SandboxInfo.h"
+#    include "mozilla/SandboxBroker.h"
+#    include "mozilla/SandboxBrokerPolicyFactory.h"
+#  endif
 #endif
 
 #ifdef MOZ_TOOLKIT_SEARCH
-#include "nsIBrowserSearchService.h"
+#  include "nsIBrowserSearchService.h"
 #endif
 
 #ifdef XP_WIN
-#include "mozilla/audio/AudioNotificationSender.h"
-#include "mozilla/widget/AudioSession.h"
+#  include "mozilla/audio/AudioNotificationSender.h"
+#  include "mozilla/widget/AudioSession.h"
 #endif
 
 #ifdef ACCESSIBILITY
-#include "nsAccessibilityService.h"
+#  include "nsAccessibilityService.h"
 #endif
 
 #ifdef MOZ_GECKO_PROFILER
-#include "nsIProfiler.h"
-#include "ProfilerParent.h"
+#  include "nsIProfiler.h"
+#  include "ProfilerParent.h"
 #endif
 
 #ifdef MOZ_CODE_COVERAGE
-#include "mozilla/CodeCoverageHandler.h"
+#  include "mozilla/CodeCoverageHandler.h"
 #endif
 
 // For VP9Benchmark::sBenchmarkFpsPref
 #include "Benchmark.h"
 
 static NS_DEFINE_CID(kCClipboardCID, NS_CLIPBOARD_CID);
 
 using base::KillProcess;
@@ -1342,26 +1342,26 @@ void ContentParent::Init() {
     obs->NotifyObservers(static_cast<nsIObserver*>(this), "ipc:content-created",
                          cpId.get());
   }
 
 #ifdef ACCESSIBILITY
   // If accessibility is running in chrome process then start it in content
   // process.
   if (nsIPresShell::IsAccessibilityActive()) {
-#if defined(XP_WIN)
+#  if defined(XP_WIN)
     // Don't init content a11y if we detect an incompat version of JAWS in use.
     if (!mozilla::a11y::Compatibility::IsOldJAWS()) {
       Unused << SendActivateA11y(
           ::GetCurrentThreadId(),
           a11y::AccessibleWrap::GetContentProcessIdFor(ChildID()));
     }
-#else
+#  else
     Unused << SendActivateA11y(0, 0);
-#endif
+#  endif
   }
 #endif
 
 #ifdef MOZ_GECKO_PROFILER
   Unused << SendInitProfiler(ProfilerParent::CreateForProcess(OtherPid()));
 #endif
 
   // Ensure that the default set of permissions are avaliable in the content
@@ -2062,30 +2062,30 @@ static void CacheSandboxParams(std::vect
     }
     nsCString objDirPath;
     Unused << objDir->GetNativePath(objDirPath);
     aCachedParams.push_back("-sbTestingReadPath");
     aCachedParams.push_back(objDirPath.get());
   }
 
   // DEBUG_WRITE_DIR
-#ifdef DEBUG
+#  ifdef DEBUG
   // When a content process dies intentionally (|NoteIntentionalCrash|), for
   // tests it wants to log that it did this. Allow writing to this location
   // that the testrunner wants.
   char* bloatLog = PR_GetEnv("XPCOM_MEM_BLOAT_LOG");
   if (bloatLog != nullptr) {
     // |bloatLog| points to a specific file, but we actually write to a sibling
     // of that path.
     nsAutoCString bloatDirectoryPath =
         nsMacUtilsImpl::GetDirectoryPath(bloatLog);
     aCachedParams.push_back("-sbDebugWriteDir");
     aCachedParams.push_back(bloatDirectoryPath.get());
   }
-#endif  // DEBUG
+#  endif  // DEBUG
 }
 
 // Append sandboxing command line parameters.
 void ContentParent::AppendSandboxParams(std::vector<std::string>& aArgs) {
   MOZ_ASSERT(sMacSandboxParams != nullptr);
 
   // An empty sMacSandboxParams indicates this is the
   // first invocation and we don't have cached params yet.
@@ -2665,34 +2665,34 @@ void ContentParent::InitInternal(Process
   MaybeFileDesc brokerFd = void_t();
   // XXX: Checking the pref here makes it possible to enable/disable sandboxing
   // during an active session. Currently the pref is only used for testing
   // purpose. If the decision is made to permanently rely on the pref, this
   // should be changed so that it is required to restart firefox for the change
   // of value to take effect.
   shouldSandbox = IsContentSandboxEnabled();
 
-#ifdef XP_LINUX
+#  ifdef XP_LINUX
   if (shouldSandbox) {
     MOZ_ASSERT(!mSandboxBroker);
     bool isFileProcess = mRemoteType.EqualsLiteral(FILE_REMOTE_TYPE);
     UniquePtr<SandboxBroker::Policy> policy =
         sSandboxBrokerPolicyFactory->GetContentPolicy(Pid(), isFileProcess);
     if (policy) {
       brokerFd = FileDescriptor();
       mSandboxBroker =
           SandboxBroker::Create(std::move(policy), Pid(), brokerFd);
       if (!mSandboxBroker) {
         KillHard("SandboxBroker::Create failed");
         return;
       }
       MOZ_ASSERT(static_cast<const FileDescriptor&>(brokerFd).IsValid());
     }
   }
-#endif
+#  endif
   if (shouldSandbox && !SendSetProcessSandbox(brokerFd)) {
     KillHard("SandboxInitFailed");
   }
 #endif
 
   if (!ServiceWorkerParentInterceptEnabled()) {
     RefPtr<ServiceWorkerRegistrar> swr = ServiceWorkerRegistrar::Get();
     MOZ_ASSERT(swr);
@@ -3140,27 +3140,27 @@ ContentParent::Observe(nsISupports* aSub
   } else if (!strcmp(aTopic, "last-pb-context-exited")) {
     Unused << SendLastPrivateDocShellDestroyed();
   }
 #ifdef ACCESSIBILITY
   else if (aData && !strcmp(aTopic, "a11y-init-or-shutdown")) {
     if (*aData == '1') {
       // Make sure accessibility is running in content process when
       // accessibility gets initiated in chrome process.
-#if defined(XP_WIN)
+#  if defined(XP_WIN)
       // Don't init content a11y if we detect an incompat version of JAWS in
       // use.
       if (!mozilla::a11y::Compatibility::IsOldJAWS()) {
         Unused << SendActivateA11y(
             ::GetCurrentThreadId(),
             a11y::AccessibleWrap::GetContentProcessIdFor(ChildID()));
       }
-#else
+#  else
       Unused << SendActivateA11y(0, 0);
-#endif
+#  endif
     } else {
       // If possible, shut down accessibility in content process when
       // accessibility gets shutdown in chrome process.
       Unused << SendShutdownA11y();
     }
   }
 #endif
   else if (!strcmp(aTopic, "cacheservice:empty-cache")) {
--- a/dom/ipc/ContentProcess.cpp
+++ b/dom/ipc/ContentProcess.cpp
@@ -8,25 +8,25 @@
 
 #include "ContentProcess.h"
 #include "base/shared_memory.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/Scheduler.h"
 #include "mozilla/recordreplay/ParentIPC.h"
 
 #if defined(XP_MACOSX) && defined(MOZ_CONTENT_SANDBOX)
-#include <stdlib.h>
-#include "mozilla/Sandbox.h"
+#  include <stdlib.h>
+#  include "mozilla/Sandbox.h"
 #endif
 
 #if (defined(XP_WIN) || defined(XP_MACOSX)) && defined(MOZ_CONTENT_SANDBOX)
-#include "mozilla/SandboxSettings.h"
-#include "nsAppDirectoryServiceDefs.h"
-#include "nsDirectoryService.h"
-#include "nsDirectoryServiceDefs.h"
+#  include "mozilla/SandboxSettings.h"
+#  include "nsAppDirectoryServiceDefs.h"
+#  include "nsDirectoryService.h"
+#  include "nsDirectoryServiceDefs.h"
 #endif
 
 using mozilla::ipc::IOThreadChild;
 
 namespace mozilla {
 namespace dom {
 
 #if defined(XP_WIN) && defined(MOZ_CONTENT_SANDBOX)
@@ -193,26 +193,26 @@ bool ContentProcess::Init(int aArgc, cha
   }
 
   mContent.Init(IOThreadChild::message_loop(), ParentPid(), *parentBuildID,
                 IOThreadChild::channel(), *childID, *isForBrowser);
 
   mXREEmbed.Start();
 #if (defined(XP_MACOSX)) && defined(MOZ_CONTENT_SANDBOX)
   mContent.SetProfileDir(profileDir);
-#if defined(DEBUG)
+#  if defined(DEBUG)
   // For WebReplay middleman processes, the sandbox is
   // started after receiving the SetProcessSandbox message.
   if (IsContentSandboxEnabled() &&
       Preferences::GetBool("security.sandbox.content.mac.earlyinit") &&
       !recordreplay::IsMiddleman()) {
     AssertMacSandboxEnabled();
   }
-#endif /* DEBUG */
-#endif /* XP_MACOSX && MOZ_CONTENT_SANDBOX */
+#  endif /* DEBUG */
+#endif   /* XP_MACOSX && MOZ_CONTENT_SANDBOX */
 
 #if defined(XP_WIN) && defined(MOZ_CONTENT_SANDBOX)
   SetUpSandboxEnvironment();
 #endif
 
   return true;
 }
 
--- a/dom/ipc/ContentProcess.h
+++ b/dom/ipc/ContentProcess.h
@@ -7,17 +7,17 @@
 #ifndef dom_tabs_ContentThread_h
 #define dom_tabs_ContentThread_h 1
 
 #include "mozilla/ipc/ProcessChild.h"
 #include "mozilla/ipc/ScopedXREEmbed.h"
 #include "ContentChild.h"
 
 #if defined(XP_WIN)
-#include "mozilla/mscom/MainThreadRuntime.h"
+#  include "mozilla/mscom/MainThreadRuntime.h"
 #endif
 
 namespace mozilla {
 namespace dom {
 
 /**
  * ContentProcess is a singleton on the content process which represents
  * the main thread where tab instances live.
--- a/dom/ipc/ContentProcessManager.cpp
+++ b/dom/ipc/ContentProcessManager.cpp
@@ -11,21 +11,21 @@
 #include "mozilla/StaticPtr.h"
 #include "mozilla/ClearOnShutdown.h"
 
 #include "nsPrintfCString.h"
 #include "nsIScriptSecurityManager.h"
 
 // XXX need another bug to move this to a common header.
 #ifdef DISABLE_ASSERTS_FOR_FUZZING
-#define ASSERT_UNLESS_FUZZING(...) \
-  do {                             \
-  } while (0)
+#  define ASSERT_UNLESS_FUZZING(...) \
+    do {                             \
+    } while (0)
 #else
-#define ASSERT_UNLESS_FUZZING(...) MOZ_ASSERT(false, __VA_ARGS__)
+#  define ASSERT_UNLESS_FUZZING(...) MOZ_ASSERT(false, __VA_ARGS__)
 #endif
 
 namespace mozilla {
 namespace dom {
 
 /* static */
 StaticAutoPtr<ContentProcessManager> ContentProcessManager::sSingleton;
 
--- a/dom/ipc/MemMapSnapshot.cpp
+++ b/dom/ipc/MemMapSnapshot.cpp
@@ -9,17 +9,17 @@
 #include "base/eintr_wrapper.h"
 #include "base/file_util.h"
 #include "mozilla/ResultExtensions.h"
 #include "mozilla/ScopeExit.h"
 #include "mozilla/ipc/FileDescriptorUtils.h"
 #include "nsIFile.h"
 
 #ifdef XP_UNIX
-#include <sys/stat.h>
+#  include <sys/stat.h>
 #endif
 
 namespace mozilla {
 
 using loader::AutoMemMap;
 
 namespace ipc {
 
@@ -102,13 +102,13 @@ Result<Ok, nsresult> MemMapSnapshot::Fre
   nsCOMPtr<nsIFile> file;
   MOZ_TRY(NS_NewNativeLocalFile(mPath, /* followLinks = */ false,
                                 getter_AddRefs(file)));
 
   return aMem.init(file);
 }
 
 #else
-#error "Unsupported build configuration"
+#  error "Unsupported build configuration"
 #endif
 
 }  // namespace ipc
 }  // namespace mozilla
--- a/dom/ipc/MemMapSnapshot.h
+++ b/dom/ipc/MemMapSnapshot.h
@@ -8,17 +8,17 @@
 #define dom_ipc_MemMapSnapshot_h
 
 #include "mozilla/AutoMemMap.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/Maybe.h"
 #include "mozilla/RangedPtr.h"
 #include "mozilla/Result.h"
 #ifdef XP_WIN
-#include "mozilla/ipc/FileDescriptor.h"
+#  include "mozilla/ipc/FileDescriptor.h"
 #endif
 
 namespace mozilla {
 namespace ipc {
 
 /**
  * A helper class for creating a read-only snapshot of memory-mapped data.
  *
--- a/dom/ipc/PreallocatedProcessManager.cpp
+++ b/dom/ipc/PreallocatedProcessManager.cpp
@@ -69,18 +69,17 @@ class PreallocatedProcessManagerImpl fin
   RefPtr<ContentParent> mPreallocatedProcess;
   nsTHashtable<nsUint64HashKey> mBlockers;
 
   bool IsEmpty() const { return !mPreallocatedProcess && !mLaunchInProgress; }
 };
 
 /* static */ StaticRefPtr<PreallocatedProcessManagerImpl>
     PreallocatedProcessManagerImpl::sSingleton;
-/* static */ uint32_t
-    PreallocatedProcessManagerImpl::sPrelaunchDelayMS = 0;
+/* static */ uint32_t PreallocatedProcessManagerImpl::sPrelaunchDelayMS = 0;
 
 /* static */ PreallocatedProcessManagerImpl*
 PreallocatedProcessManagerImpl::Singleton() {
   MOZ_ASSERT(NS_IsMainThread());
   if (!sSingleton) {
     sSingleton = new PreallocatedProcessManagerImpl();
     sSingleton->Init();
     ClearOnShutdown(&sSingleton);
@@ -96,20 +95,19 @@ PreallocatedProcessManagerImpl::Prealloc
 
 PreallocatedProcessManagerImpl::~PreallocatedProcessManagerImpl() {
   // This shouldn't happen, because the promise callbacks should
   // hold strong references, but let't make absolutely sure:
   MOZ_RELEASE_ASSERT(!mLaunchInProgress);
 }
 
 void PreallocatedProcessManagerImpl::Init() {
-  Preferences::AddUintVarCache(
-    &sPrelaunchDelayMS,
-    "dom.ipc.processPrelaunch.delayMs",
-    DEFAULT_ALLOCATE_DELAY);
+  Preferences::AddUintVarCache(&sPrelaunchDelayMS,
+                               "dom.ipc.processPrelaunch.delayMs",
+                               DEFAULT_ALLOCATE_DELAY);
   Preferences::AddStrongObserver(this, "dom.ipc.processPrelaunch.enabled");
   // We have to respect processCount at all time. This is especially important
   // for testing.
   Preferences::AddStrongObserver(this, "dom.ipc.processCount");
   nsCOMPtr<nsIObserverService> os = services::GetObserverService();
   if (os) {
     os->AddObserver(this, "ipc:content-shutdown",
                     /* weakRef = */ false);
--- a/dom/ipc/ProcessHangMonitor.cpp
+++ b/dom/ipc/ProcessHangMonitor.cpp
@@ -31,17 +31,17 @@
 #include "nsPluginHost.h"
 #include "nsThreadUtils.h"
 
 #include "base/task.h"
 #include "base/thread.h"
 
 #ifdef XP_WIN
 // For IsDebuggerPresent()
-#include <windows.h>
+#  include <windows.h>
 #endif
 
 using namespace mozilla;
 using namespace mozilla::dom;
 using namespace mozilla::ipc;
 
 /*
  * Basic architecture:
--- a/dom/ipc/ProcessPriorityManager.cpp
+++ b/dom/ipc/ProcessPriorityManager.cpp
@@ -30,65 +30,66 @@
 #include "nsTHashtable.h"
 #include "nsQueryObject.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 using namespace mozilla::hal;
 
 #ifdef XP_WIN
-#include <process.h>
-#define getpid _getpid
+#  include <process.h>
+#  define getpid _getpid
 #else
-#include <unistd.h>
+#  include <unistd.h>
 #endif
 
 #ifdef LOG
-#undef LOG
+#  undef LOG
 #endif
 
 // Use LOGP inside a ParticularProcessPriorityManager method; use LOG
 // everywhere else.  LOGP prints out information about the particular process
 // priority manager.
 //
 // (Wow, our logging story is a huge mess.)
 
 // #define ENABLE_LOGGING 1
 
 #if defined(ANDROID) && defined(ENABLE_LOGGING)
-#include <android/log.h>
-#define LOG(fmt, ...)                                                        \
-  __android_log_print(ANDROID_LOG_INFO, "Gecko:ProcessPriorityManager", fmt, \
-                      ##__VA_ARGS__)
-#define LOGP(fmt, ...)                                                         \
-  __android_log_print(ANDROID_LOG_INFO, "Gecko:ProcessPriorityManager",        \
-                      "[%schild-id=%" PRIu64 ", pid=%d] " fmt,                 \
-                      NameWithComma().get(), static_cast<uint64_t>(ChildID()), \
-                      Pid(), ##__VA_ARGS__)
+#  include <android/log.h>
+#  define LOG(fmt, ...)                                                        \
+    __android_log_print(ANDROID_LOG_INFO, "Gecko:ProcessPriorityManager", fmt, \
+                        ##__VA_ARGS__)
+#  define LOGP(fmt, ...)                                                \
+    __android_log_print(                                                \
+        ANDROID_LOG_INFO, "Gecko:ProcessPriorityManager",               \
+        "[%schild-id=%" PRIu64 ", pid=%d] " fmt, NameWithComma().get(), \
+        static_cast<uint64_t>(ChildID()), Pid(), ##__VA_ARGS__)
 
 #elif defined(ENABLE_LOGGING)
-#define LOG(fmt, ...) \
-  printf("ProcessPriorityManager - " fmt "\n", ##__VA_ARGS__)
-#define LOGP(fmt, ...)                                                         \
-  printf("ProcessPriorityManager[%schild-id=%" PRIu64 ", pid=%d] - " fmt "\n", \
-         NameWithComma().get(), static_cast<uint64_t>(ChildID()), Pid(),       \
-         ##__VA_ARGS__)
+#  define LOG(fmt, ...) \
+    printf("ProcessPriorityManager - " fmt "\n", ##__VA_ARGS__)
+#  define LOGP(fmt, ...)                                                   \
+    printf("ProcessPriorityManager[%schild-id=%" PRIu64 ", pid=%d] - " fmt \
+           "\n",                                                           \
+           NameWithComma().get(), static_cast<uint64_t>(ChildID()), Pid(), \
+           ##__VA_ARGS__)
 #else
 static LogModule* GetPPMLog() {
   static LazyLogModule sLog("ProcessPriorityManager");
   return sLog;
 }
-#define LOG(fmt, ...)                   \
-  MOZ_LOG(GetPPMLog(), LogLevel::Debug, \
-          ("ProcessPriorityManager - " fmt, ##__VA_ARGS__))
-#define LOGP(fmt, ...)                                                      \
-  MOZ_LOG(GetPPMLog(), LogLevel::Debug,                                     \
-          ("ProcessPriorityManager[%schild-id=%" PRIu64 ", pid=%d] - " fmt, \
-           NameWithComma().get(), static_cast<uint64_t>(ChildID()), Pid(),  \
-           ##__VA_ARGS__))
+#  define LOG(fmt, ...)                   \
+    MOZ_LOG(GetPPMLog(), LogLevel::Debug, \
+            ("ProcessPriorityManager - " fmt, ##__VA_ARGS__))
+#  define LOGP(fmt, ...)                                                      \
+    MOZ_LOG(GetPPMLog(), LogLevel::Debug,                                     \
+            ("ProcessPriorityManager[%schild-id=%" PRIu64 ", pid=%d] - " fmt, \
+             NameWithComma().get(), static_cast<uint64_t>(ChildID()), Pid(),  \
+             ##__VA_ARGS__))
 #endif
 
 namespace {
 
 class ParticularProcessPriorityManager;
 
 /**
  * This singleton class does the work to implement the process priority manager
--- a/dom/ipc/TabChild.cpp
+++ b/dom/ipc/TabChild.cpp
@@ -5,17 +5,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "base/basictypes.h"
 
 #include "TabChild.h"
 
 #include "gfxPrefs.h"
 #ifdef ACCESSIBILITY
-#include "mozilla/a11y/DocAccessibleChild.h"
+#  include "mozilla/a11y/DocAccessibleChild.h"
 #endif
 #include "Layers.h"
 #include "ContentChild.h"
 #include "TabParent.h"
 #include "js/JSON.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/BrowserElementParent.h"
 #include "mozilla/ClearOnShutdown.h"
@@ -124,24 +124,24 @@
 #include "nsISupportsPrimitives.h"
 #include "mozilla/Telemetry.h"
 #include "nsDocShellLoadState.h"
 #include "nsWebBrowser.h"
 #include "mozilla/dom/WindowGlobalChild.h"
 #include "MMPrinter.h"
 
 #ifdef XP_WIN
-#include "mozilla/plugins/PluginWidgetChild.h"
+#  include "mozilla/plugins/PluginWidgetChild.h"
 #endif
 
 #ifdef NS_PRINTING
-#include "nsIPrintSession.h"
-#include "nsIPrintSettings.h"
-#include "nsIPrintSettingsService.h"
-#include "nsIWebBrowserPrint.h"
+#  include "nsIPrintSession.h"
+#  include "nsIPrintSettings.h"
+#  include "nsIPrintSettingsService.h"
+#  include "nsIWebBrowserPrint.h"
 #endif
 
 #define BROWSER_ELEMENT_CHILD_SCRIPT \
   NS_LITERAL_STRING("chrome://global/content/BrowserElementChild.js")
 
 #define TABC_LOG(...)
 // #define TABC_LOG(...) printf_stderr("TABC: " __VA_ARGS__)
 
--- a/dom/ipc/TabParent.cpp
+++ b/dom/ipc/TabParent.cpp
@@ -4,18 +4,18 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "base/basictypes.h"
 
 #include "TabParent.h"
 
 #ifdef ACCESSIBILITY
-#include "mozilla/a11y/DocAccessibleParent.h"
-#include "nsAccessibilityService.h"
+#  include "mozilla/a11y/DocAccessibleParent.h"
+#  include "nsAccessibilityService.h"
 #endif
 #include "mozilla/BrowserElementParent.h"
 #include "mozilla/dom/ChromeMessageSender.h"
 #include "mozilla/dom/ContentBridgeParent.h"
 #include "mozilla/dom/ContentParent.h"
 #include "mozilla/dom/DataTransfer.h"
 #include "mozilla/dom/DataTransferItemList.h"
 #include "mozilla/dom/Event.h"
@@ -66,17 +66,17 @@
 #include "nsIWebProtocolHandlerRegistrar.h"
 #include "nsIXULBrowserWindow.h"
 #include "nsIXULWindow.h"
 #include "nsViewManager.h"
 #include "nsVariant.h"
 #include "nsIWidget.h"
 #include "nsNetUtil.h"
 #ifndef XP_WIN
-#include "nsJARProtocolHandler.h"
+#  include "nsJARProtocolHandler.h"
 #endif
 #include "nsPIDOMWindow.h"
 #include "nsPrintfCString.h"
 #include "nsServiceManagerUtils.h"
 #include "nsThreadUtils.h"
 #include "PermissionMessageUtils.h"
 #include "StructuredCloneData.h"
 #include "ColorPickerParent.h"
@@ -100,27 +100,27 @@
 #include "mozilla/WebBrowserPersistDocumentParent.h"
 #include "ProcessPriorityManager.h"
 #include "nsString.h"
 #include "IHistory.h"
 #include "mozilla/dom/WindowGlobalParent.h"
 #include "mozilla/dom/ChromeBrowsingContext.h"
 
 #ifdef XP_WIN
-#include "mozilla/plugins/PluginWidgetParent.h"
+#  include "mozilla/plugins/PluginWidgetParent.h"
 #endif
 
 #if defined(XP_WIN) && defined(ACCESSIBILITY)
-#include "mozilla/a11y/AccessibleWrap.h"
-#include "mozilla/a11y/Compatibility.h"
-#include "mozilla/a11y/nsWinUtils.h"
+#  include "mozilla/a11y/AccessibleWrap.h"
+#  include "mozilla/a11y/Compatibility.h"
+#  include "mozilla/a11y/nsWinUtils.h"
 #endif
 
 #ifdef MOZ_ANDROID_HISTORY
-#include "GeckoViewHistory.h"
+#  include "GeckoViewHistory.h"
 #endif
 
 using namespace mozilla::dom;
 using namespace mozilla::ipc;
 using namespace mozilla::layers;
 using namespace mozilla::layout;
 using namespace mozilla::services;
 using namespace mozilla::widget;
@@ -878,52 +878,52 @@ mozilla::ipc::IPCResult TabParent::RecvP
     MOZ_ASSERT(aParentID);
     if (!aParentID) {
       return IPC_FAIL_NO_REASON(this);
     }
 
     auto parentDoc = static_cast<a11y::DocAccessibleParent*>(aParentDoc);
     mozilla::ipc::IPCResult added = parentDoc->AddChildDoc(doc, aParentID);
     if (!added) {
-#ifdef DEBUG
+#  ifdef DEBUG
       return added;
-#else
+#  else
       return IPC_OK();
-#endif
+#  endif
     }
 
-#ifdef XP_WIN
+#  ifdef XP_WIN
     MOZ_ASSERT(aDocCOMProxy.IsNull());
     a11y::WrapperFor(doc)->SetID(aMsaaID);
     if (a11y::nsWinUtils::IsWindowEmulationStarted()) {
       doc->SetEmulatedWindowHandle(parentDoc->GetEmulatedWindowHandle());
     }
-#endif
+#  endif
 
     return IPC_OK();
   } else {
     // null aParentDoc means this document is at the top level in the child
     // process.  That means it makes no sense to get an id for an accessible
     // that is its parent.
     MOZ_ASSERT(!aParentID);
     if (aParentID) {
       return IPC_FAIL_NO_REASON(this);
     }
 
     doc->SetTopLevel();
     a11y::DocManager::RemoteDocAdded(doc);
-#ifdef XP_WIN
+#  ifdef XP_WIN
     a11y::WrapperFor(doc)->SetID(aMsaaID);
     MOZ_ASSERT(!aDocCOMProxy.IsNull());
 
     RefPtr<IAccessible> proxy(aDocCOMProxy.Get());
     doc->SetCOMInterface(proxy);
     doc->MaybeInitWindowEmulation();
     doc->SendParentCOMProxy();
-#endif
+#  endif
   }
 #endif
   return IPC_OK();
 }
 
 a11y::DocAccessibleParent* TabParent::GetTopLevelDocAccessible() const {
 #ifdef ACCESSIBILITY
   // XXX Consider managing non top level PDocAccessibles with their parent
--- a/dom/ipc/nsIContentParent.cpp
+++ b/dom/ipc/nsIContentParent.cpp
@@ -29,21 +29,21 @@
 #include "nsIWebBrowserChrome.h"
 #include "nsPrintfCString.h"
 #include "xpcpublic.h"
 
 using namespace mozilla::jsipc;
 
 // XXX need another bug to move this to a common header.
 #ifdef DISABLE_ASSERTS_FOR_FUZZING
-#define ASSERT_UNLESS_FUZZING(...) \
-  do {                             \
-  } while (0)
+#  define ASSERT_UNLESS_FUZZING(...) \
+    do {                             \
+    } while (0)
 #else
-#define ASSERT_UNLESS_FUZZING(...) MOZ_ASSERT(false, __VA_ARGS__)
+#  define ASSERT_UNLESS_FUZZING(...) MOZ_ASSERT(false, __VA_ARGS__)
 #endif
 
 namespace mozilla {
 namespace dom {
 
 nsIContentParent::nsIContentParent() {
   mMessageManager = nsFrameMessageManager::NewProcessMessageManager(true);
 }
--- a/dom/localstorage/ActorsParent.cpp
+++ b/dom/localstorage/ActorsParent.cpp
@@ -41,25 +41,25 @@
 #include "nsISimpleEnumerator.h"
 #include "nsNetUtil.h"
 #include "nsRefPtrHashtable.h"
 #include "ReportInternalError.h"
 
 #define DISABLE_ASSERTS_FOR_FUZZING 0
 
 #if DISABLE_ASSERTS_FOR_FUZZING
-#define ASSERT_UNLESS_FUZZING(...) \
-  do {                             \
-  } while (0)
+#  define ASSERT_UNLESS_FUZZING(...) \
+    do {                             \
+    } while (0)
 #else
-#define ASSERT_UNLESS_FUZZING(...) MOZ_ASSERT(false, __VA_ARGS__)
+#  define ASSERT_UNLESS_FUZZING(...) MOZ_ASSERT(false, __VA_ARGS__)
 #endif
 
 #if defined(MOZ_WIDGET_ANDROID)
-#define LS_MOBILE
+#  define LS_MOBILE
 #endif
 
 namespace mozilla {
 namespace dom {
 
 using namespace mozilla::dom::quota;
 using namespace mozilla::dom::StorageUtils;
 using namespace mozilla::ipc;
--- a/dom/media/AudioCompactor.cpp
+++ b/dom/media/AudioCompactor.cpp
@@ -1,16 +1,16 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #include "AudioCompactor.h"
 #if defined(MOZ_MEMORY)
-#include "mozmemory.h"
+#  include "mozmemory.h"
 #endif
 
 namespace mozilla {
 
 static size_t MallocGoodSize(size_t aSize) {
 #if defined(MOZ_MEMORY)
   return malloc_good_size(aSize);
 #else
--- a/dom/media/AudioCompactor.h
+++ b/dom/media/AudioCompactor.h
@@ -1,19 +1,19 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #if !defined(AudioCompactor_h)
-#define AudioCompactor_h
+#  define AudioCompactor_h
 
-#include "MediaQueue.h"
-#include "MediaData.h"
-#include "VideoUtils.h"
+#  include "MediaQueue.h"
+#  include "MediaData.h"
+#  include "VideoUtils.h"
 
 namespace mozilla {
 
 class AudioCompactor {
  public:
   explicit AudioCompactor(MediaQueue<AudioData>& aQueue) : mQueue(aQueue) {
     // Determine padding size used by AlignedBuffer.
     size_t paddedSize = AlignedAudioBuffer::AlignmentPaddingSize();
--- a/dom/media/AudioConfig.h
+++ b/dom/media/AudioConfig.h
@@ -1,20 +1,20 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #if !defined(AudioLayout_h)
-#define AudioLayout_h
+#  define AudioLayout_h
 
-#include <cstdint>
-#include <initializer_list>
-#include "mozilla/MathAlgorithms.h"
-#include "nsTArray.h"
+#  include <cstdint>
+#  include <initializer_list>
+#  include "mozilla/MathAlgorithms.h"
+#  include "nsTArray.h"
 
 namespace mozilla {
 
 class AudioConfig {
  public:
   // Channel definition is conveniently defined to be in the same order as
   // WAVEFORMAT && SMPTE, even though this is unused for now.
   enum Channel {
@@ -180,23 +180,23 @@ class AudioConfig {
   enum SampleFormat {
     FORMAT_NONE = 0,
     FORMAT_U8,
     FORMAT_S16,
     FORMAT_S24LSB,
     FORMAT_S24,
     FORMAT_S32,
     FORMAT_FLT,
-#if defined(MOZ_SAMPLE_TYPE_FLOAT32)
+#  if defined(MOZ_SAMPLE_TYPE_FLOAT32)
     FORMAT_DEFAULT = FORMAT_FLT
-#elif defined(MOZ_SAMPLE_TYPE_S16)
+#  elif defined(MOZ_SAMPLE_TYPE_S16)
     FORMAT_DEFAULT = FORMAT_S16
-#else
-#error "Not supported audio type"
-#endif
+#  else
+#    error "Not supported audio type"
+#  endif
   };
 
   AudioConfig(const ChannelLayout& aChannelLayout, uint32_t aRate,
               AudioConfig::SampleFormat aFormat = FORMAT_DEFAULT,
               bool aInterleaved = true);
   AudioConfig(const ChannelLayout& aChannelLayout, uint32_t aChannels,
               uint32_t aRate,
               AudioConfig::SampleFormat aFormat = FORMAT_DEFAULT,
--- a/dom/media/AudioConverter.h
+++ b/dom/media/AudioConverter.h
@@ -1,18 +1,18 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #if !defined(AudioConverter_h)
-#define AudioConverter_h
+#  define AudioConverter_h
 
-#include "MediaInfo.h"
+#  include "MediaInfo.h"
 
 // Forward declaration
 typedef struct SpeexResamplerState_ SpeexResamplerState;
 
 namespace mozilla {
 
 template <AudioConfig::SampleFormat T>
 struct AudioDataBufferTypeChooser;
--- a/dom/media/AudioSegment.h
+++ b/dom/media/AudioSegment.h
@@ -7,17 +7,17 @@
 #define MOZILLA_AUDIOSEGMENT_H_
 
 #include "MediaSegment.h"
 #include "AudioSampleFormat.h"
 #include "AudioChannelFormat.h"
 #include "SharedBuffer.h"
 #include "WebAudioUtils.h"
 #ifdef MOZILLA_INTERNAL_API
-#include "mozilla/TimeStamp.h"
+#  include "mozilla/TimeStamp.h"
 #endif
 #include <float.h>
 
 namespace mozilla {
 struct AudioChunk;
 class AudioSegment;
 }  // namespace mozilla
 DECLARE_USE_COPY_CONSTRUCTORS(mozilla::AudioChunk)
--- a/dom/media/AudioStream.cpp
+++ b/dom/media/AudioStream.cpp
@@ -16,17 +16,17 @@
 #include "mozilla/Unused.h"
 #include <algorithm>
 #include "mozilla/Telemetry.h"
 #include "CubebUtils.h"
 #include "nsPrintfCString.h"
 #include "gfxPrefs.h"
 #include "AudioConverter.h"
 #if defined(XP_WIN)
-#include "nsXULAppAPI.h"
+#  include "nsXULAppAPI.h"
 #endif
 
 namespace mozilla {
 
 #undef LOG
 #undef LOGW
 #undef LOGE
 
--- a/dom/media/AudioStream.h
+++ b/dom/media/AudioStream.h
@@ -1,31 +1,31 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #if !defined(AudioStream_h_)
-#define AudioStream_h_
+#  define AudioStream_h_
 
-#include "AudioSampleFormat.h"
-#include "CubebUtils.h"
-#include "MediaInfo.h"
-#include "mozilla/Monitor.h"
-#include "mozilla/RefPtr.h"
-#include "mozilla/TimeStamp.h"
-#include "mozilla/UniquePtr.h"
-#include "nsAutoPtr.h"
-#include "nsCOMPtr.h"
-#include "nsThreadUtils.h"
-#include "soundtouch/SoundTouchFactory.h"
+#  include "AudioSampleFormat.h"
+#  include "CubebUtils.h"
+#  include "MediaInfo.h"
+#  include "mozilla/Monitor.h"
+#  include "mozilla/RefPtr.h"
+#  include "mozilla/TimeStamp.h"
+#  include "mozilla/UniquePtr.h"
+#  include "nsAutoPtr.h"
+#  include "nsCOMPtr.h"
+#  include "nsThreadUtils.h"
+#  include "soundtouch/SoundTouchFactory.h"
 
-#if defined(XP_WIN)
-#include "mozilla/audio/AudioNotificationReceiver.h"
-#endif
+#  if defined(XP_WIN)
+#    include "mozilla/audio/AudioNotificationReceiver.h"
+#  endif
 
 namespace mozilla {
 
 struct CubebDestroyPolicy {
   void operator()(cubeb_stream* aStream) const {
     cubeb_stream_destroy(aStream);
   }
 };
@@ -147,19 +147,19 @@ class AudioBufferWriter : private AudioB
   using AudioBufferCursor::Available;
 };
 
 // Access to a single instance of this class must be synchronized by
 // callers, or made from a single thread.  One exception is that access to
 // GetPosition, GetPositionInFrames, SetVolume, and Get{Rate,Channels},
 // SetMicrophoneActive is thread-safe without external synchronization.
 class AudioStream final
-#if defined(XP_WIN)
+#  if defined(XP_WIN)
     : public audio::DeviceChangeListener
-#endif
+#  endif
 {
   virtual ~AudioStream();
 
  public:
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(AudioStream)
 
   class Chunk {
    public:
@@ -213,20 +213,20 @@ class AudioStream final
   nsresult Start();
 
   // Pause audio playback.
   void Pause();
 
   // Resume audio playback.
   void Resume();
 
-#if defined(XP_WIN)
+#  if defined(XP_WIN)
   // Reset stream to the default device.
   void ResetDefaultDevice() override;
-#endif
+#  endif
 
   // Return the position in microseconds of the audio frame being played by
   // the audio hardware, compensated for playback rate change. Thread-safe.
   int64_t GetPosition();
 
   // Return the position, measured in audio frames played since the stream
   // was opened, of the audio hardware.  Thread-safe.
   int64_t GetPositionInFrames();
--- a/dom/media/AutoplayPolicy.cpp
+++ b/dom/media/AutoplayPolicy.cpp
@@ -230,18 +230,19 @@ static bool IsAllowedToPlayInternal(cons
    * 4. check whether media is allowed under current blocking model
    *    (only support user-gesture-activation)
    */
   if (aContext.IsOffline()) {
     return true;
   }
 
   nsPIDOMWindowInner* window = aContext.GetParentObject();
-  Document* approver = aContext.GetParentObject() ?
-      ApproverDocOf(*(window->GetExtantDoc())) : nullptr;
+  Document* approver = aContext.GetParentObject()
+                           ? ApproverDocOf(*(window->GetExtantDoc()))
+                           : nullptr;
   if (IsSiteInAutoplayWhiteList(approver)) {
     AUTOPLAY_LOG(
         "Allow autoplay as document has permanent autoplay permission.");
     return true;
   }
 
   if (DefaultAutoplayBehaviour() == nsIAutoplay::ALLOWED &&
       !IsSiteInAutoplayBlackList(approver)) {
--- a/dom/media/AutoplayPolicy.h
+++ b/dom/media/AutoplayPolicy.h
@@ -1,18 +1,18 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #if !defined(AutoplayPolicy_h_)
-#define AutoplayPolicy_h_
+#  define AutoplayPolicy_h_
 
-#include "mozilla/NotNull.h"
+#  include "mozilla/NotNull.h"
 
 namespace mozilla {
 namespace dom {
 
 class HTMLMediaElement;
 class AudioContext;
 class Document;
 
--- a/dom/media/BackgroundVideoDecodingPermissionObserver.h
+++ b/dom/media/BackgroundVideoDecodingPermissionObserver.h
@@ -1,18 +1,18 @@
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #if !defined(BackgroundVideoDecodingPermissionObserver_h_)
-#define BackgroundVideoDecodingPermissionObserver_h_
+#  define BackgroundVideoDecodingPermissionObserver_h_
 
-#include "nsIObserver.h"
-#include "nsISupportsImpl.h"
+#  include "nsIObserver.h"
+#  include "nsISupportsImpl.h"
 
 class nsISupports;
 class nsPIDOMWindowOuter;
 
 namespace mozilla {
 
 namespace dom {
 class Document;
--- a/dom/media/Benchmark.cpp
+++ b/dom/media/Benchmark.cpp
@@ -20,17 +20,17 @@
 #include "mozilla/SystemGroup.h"
 #include "mozilla/TaskQueue.h"
 #include "mozilla/Telemetry.h"
 #include "mozilla/dom/ContentChild.h"
 #include "mozilla/gfx/gfxVars.h"
 #include "nsIGfxInfo.h"
 
 #ifndef MOZ_WIDGET_ANDROID
-#include "WebMSample.h"
+#  include "WebMSample.h"
 #endif
 
 using namespace mozilla::gfx;
 
 namespace mozilla {
 
 // Update this version number to force re-running the benchmark. Such as when
 // an improvement to FFVP9 or LIBVPX is deemed worthwhile.
@@ -42,27 +42,27 @@ const char* VP9Benchmark::sBenchmarkFpsV
 bool VP9Benchmark::sHasRunTest = false;
 
 // static
 bool VP9Benchmark::ShouldRun() {
 #if defined(MOZ_WIDGET_ANDROID)
   // Assume that the VP9 software decoder will always be too slow.
   return false;
 #else
-#if defined(MOZ_APPLEMEDIA)
+#  if defined(MOZ_APPLEMEDIA)
   const nsCOMPtr<nsIGfxInfo> gfxInfo = services::GetGfxInfo();
   nsString vendorID, deviceID;
   gfxInfo->GetAdapterVendorID(vendorID);
   // We won't run the VP9 benchmark on mac using an Intel GPU as performance are
   // poor, see bug 1404042.
   if (vendorID.EqualsLiteral("0x8086")) {
     return false;
   }
   // Fall Through
-#endif
+#  endif
   return true;
 #endif
 }
 
 // static
 uint32_t VP9Benchmark::MediaBenchmarkVp9Fps() {
   if (!ShouldRun()) {
     return 0;
--- a/dom/media/BufferMediaResource.h
+++ b/dom/media/BufferMediaResource.h
@@ -1,19 +1,19 @@
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #if !defined(BufferMediaResource_h_)
-#define BufferMediaResource_h_
+#  define BufferMediaResource_h_
 
-#include "MediaResource.h"
-#include "nsISeekableStream.h"
-#include <algorithm>
+#  include "MediaResource.h"
+#  include "nsISeekableStream.h"
+#  include <algorithm>
 
 namespace mozilla {
 
 DDLoggedTypeDeclNameAndBase(BufferMediaResource, MediaResource);
 
 // A simple MediaResource based on an in memory buffer.  This class accepts
 // the address and the length of the buffer, and simulates a read/seek API
 // on top of it.  The Read implementation involves copying memory, which is
--- a/dom/media/CubebUtils.cpp
+++ b/dom/media/CubebUtils.cpp
@@ -2,17 +2,17 @@
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "CubebUtils.h"
 
 #ifdef MOZ_WEBRTC
-#include "CubebDeviceEnumerator.h"
+#  include "CubebDeviceEnumerator.h"
 #endif
 #include "MediaInfo.h"
 #include "mozilla/AbstractThread.h"
 #include "mozilla/dom/ContentChild.h"
 #include "mozilla/dom/AudioDeviceInfo.h"
 #include "mozilla/ipc/FileDescriptor.h"
 #include "mozilla/Logging.h"
 #include "mozilla/Preferences.h"
@@ -25,17 +25,17 @@
 #include "nsDebug.h"
 #include "nsIStringBundle.h"
 #include "nsString.h"
 #include "nsThreadUtils.h"
 #include "prdtoa.h"
 #include <algorithm>
 #include <stdint.h>
 #ifdef MOZ_WIDGET_ANDROID
-#include "GeneratedJNIWrappers.h"
+#  include "GeneratedJNIWrappers.h"
 #endif
 
 #define AUDIOIPC_POOL_SIZE_DEFAULT 2
 #define AUDIOIPC_STACK_SIZE_DEFAULT (64 * 4096)
 
 #define PREF_VOLUME_SCALE "media.volume_scale"
 #define PREF_CUBEB_BACKEND "media.cubeb.backend"
 #define PREF_CUBEB_OUTPUT_DEVICE "media.cubeb.output_device"
@@ -50,17 +50,17 @@
 // Hidden pref to disable BMO 1427011 experiment; can be removed once proven.
 #define PREF_CUBEB_DISABLE_DEVICE_SWITCHING \
   "media.cubeb.disable_device_switching"
 #define PREF_CUBEB_SANDBOX "media.cubeb.sandbox"
 #define PREF_AUDIOIPC_POOL_SIZE "media.audioipc.pool_size"
 #define PREF_AUDIOIPC_STACK_SIZE "media.audioipc.stack_size"
 
 #if (defined(XP_LINUX) && !defined(MOZ_WIDGET_ANDROID)) || defined(XP_MACOSX)
-#define MOZ_CUBEB_REMOTING
+#  define MOZ_CUBEB_REMOTING
 #endif
 
 extern "C" {
 
 // This must match AudioIpcInitParams in media/audioipc/client/src/lib.rs.
 // TODO: Generate this from the Rust definition rather than duplicating it.
 struct AudioIpcInitParams {
   mozilla::ipc::FileDescriptor::PlatformHandleType mServerConnection;
@@ -390,21 +390,21 @@ ipc::FileDescriptor CreateAudioIPCConnec
       audioipc_server_new_client(sServerHandle);
   ipc::FileDescriptor fd(rawFD);
   if (!fd.IsValid()) {
     MOZ_LOG(gCubebLog, LogLevel::Error, ("audioipc_server_new_client failed"));
     return ipc::FileDescriptor();
   }
   // Close rawFD since FileDescriptor's ctor cloned it.
   // TODO: Find cleaner cross-platform way to close rawFD.
-#ifdef XP_WIN
+#  ifdef XP_WIN
   CloseHandle(rawFD);
-#else
+#  else
   close(rawFD);
-#endif
+#  endif
   return fd;
 #else
   return ipc::FileDescriptor();
 #endif
 }
 
 cubeb* GetCubebContextUnlocked() {
   sMutex.AssertCurrentThreadOwns();
--- a/dom/media/CubebUtils.h
+++ b/dom/media/CubebUtils.h
@@ -1,20 +1,20 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #if !defined(CubebUtils_h_)
-#define CubebUtils_h_
+#  define CubebUtils_h_
 
-#include "cubeb/cubeb.h"
-#include "nsString.h"
-#include "mozilla/RefPtr.h"
+#  include "cubeb/cubeb.h"
+#  include "nsString.h"
+#  include "mozilla/RefPtr.h"
 
 class AudioDeviceInfo;
 
 namespace mozilla {
 namespace CubebUtils {
 
 typedef cubeb_devid AudioDeviceID;
 
@@ -43,20 +43,20 @@ uint32_t GetCubebPlaybackLatencyInMillis
 uint32_t GetCubebMSGLatencyInFrames(cubeb_stream_params* params);
 bool CubebLatencyPrefSet();
 void GetCurrentBackend(nsAString& aBackend);
 void GetDeviceCollection(nsTArray<RefPtr<AudioDeviceInfo>>& aDeviceInfos,
                          Side aSide);
 cubeb_stream_prefs GetDefaultStreamPrefs();
 char* GetForcedOutputDevice();
 
-#ifdef MOZ_WIDGET_ANDROID
+#  ifdef MOZ_WIDGET_ANDROID
 uint32_t AndroidGetAudioOutputSampleRate();
 uint32_t AndroidGetAudioOutputFramesPerBuffer();
-#endif
+#  endif
 
-#ifdef ENABLE_SET_CUBEB_BACKEND
+#  ifdef ENABLE_SET_CUBEB_BACKEND
 void ForceSetCubebContext(cubeb* aCubebContext);
-#endif
+#  endif
 }  // namespace CubebUtils
 }  // namespace mozilla
 
 #endif  // CubebUtils_h_
--- a/dom/media/DOMMediaStream.cpp
+++ b/dom/media/DOMMediaStream.cpp
@@ -29,17 +29,17 @@
 #include "nsIScriptError.h"
 #include "nsIUUIDGenerator.h"
 #include "nsPIDOMWindow.h"
 #include "nsProxyRelease.h"
 #include "nsRFPService.h"
 #include "nsServiceManagerUtils.h"
 
 #ifdef LOG
-#undef LOG
+#  undef LOG
 #endif
 
 using namespace mozilla;
 using namespace mozilla::dom;
 using namespace mozilla::layers;
 using namespace mozilla::media;
 
 static LazyLogModule gMediaStreamLog("MediaStream");
--- a/dom/media/DecoderTraits.cpp
+++ b/dom/media/DecoderTraits.cpp
@@ -12,21 +12,21 @@
 
 #include "OggDecoder.h"
 #include "OggDemuxer.h"
 
 #include "WebMDecoder.h"
 #include "WebMDemuxer.h"
 
 #ifdef MOZ_ANDROID_HLS_SUPPORT
-#include "HLSDecoder.h"
+#  include "HLSDecoder.h"
 #endif
 #ifdef MOZ_FMP4
-#include "MP4Decoder.h"
-#include "MP4Demuxer.h"
+#  include "MP4Decoder.h"
+#  include "MP4Demuxer.h"
 #endif
 #include "MediaFormatReader.h"
 
 #include "MP3Decoder.h"
 #include "MP3Demuxer.h"
 
 #include "WaveDecoder.h"
 #include "WaveDemuxer.h"
--- a/dom/media/GraphDriver.cpp
+++ b/dom/media/GraphDriver.cpp
@@ -10,26 +10,26 @@
 #include "mozilla/dom/WorkletThread.h"
 #include "mozilla/SharedThreadPool.h"
 #include "mozilla/ClearOnShutdown.h"
 #include "mozilla/Unused.h"
 #include "CubebUtils.h"
 #include "Tracing.h"
 
 #ifdef MOZ_WEBRTC
-#include "webrtc/MediaEngineWebRTC.h"
+#  include "webrtc/MediaEngineWebRTC.h"
 #endif
 
 #ifdef XP_MACOSX
-#include <sys/sysctl.h>
+#  include <sys/sysctl.h>
 #endif
 
 extern mozilla::LazyLogModule gMediaStreamGraphLog;
 #ifdef LOG
-#undef LOG
+#  undef LOG
 #endif  // LOG
 #define LOG(type, msg) MOZ_LOG(gMediaStreamGraphLog, type, msg)
 
 namespace mozilla {
 
 GraphDriver::GraphDriver(MediaStreamGraphImpl* aGraphImpl)
     : mIterationStart(0),
       mIterationEnd(0),
--- a/dom/media/GraphDriver.h
+++ b/dom/media/GraphDriver.h
@@ -13,17 +13,17 @@
 #include "SelfRef.h"
 #include "mozilla/Atomics.h"
 #include "mozilla/SharedThreadPool.h"
 #include "mozilla/StaticPtr.h"
 
 #include <thread>
 
 #if defined(XP_WIN)
-#include "mozilla/audio/AudioNotificationReceiver.h"
+#  include "mozilla/audio/AudioNotificationReceiver.h"
 #endif
 
 struct cubeb_stream;
 
 template <>
 class nsAutoRefTraits<cubeb_stream> : public nsPointerRefTraits<cubeb_stream> {
  public:
   static void Release(cubeb_stream* aStream) { cubeb_stream_destroy(aStream); }
--- a/dom/media/MediaChannelStatistics.h
+++ b/dom/media/MediaChannelStatistics.h
@@ -1,17 +1,17 @@
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #if !defined(MediaChannelStatistics_h_)
-#define MediaChannelStatistics_h_
+#  define MediaChannelStatistics_h_
 
-#include "mozilla/TimeStamp.h"
+#  include "mozilla/TimeStamp.h"
 
 namespace mozilla {
 
 // Number of bytes we have accumulated before we assume the connection download
 // rate can be reliably calculated. 57 Segments at IW=3 allows slow start to
 // reach a CWND of 30 (See bug 831998)
 static const int64_t RELIABLE_DATA_THRESHOLD = 57 * 1460;
 
--- a/dom/media/MediaData.cpp
+++ b/dom/media/MediaData.cpp
@@ -12,18 +12,18 @@
 #include "YCbCrUtils.h"
 #include "mozilla/layers/ImageBridgeChild.h"
 #include "mozilla/layers/KnowsCompositor.h"
 #include "mozilla/layers/SharedRGBImage.h"
 
 #include <stdint.h>
 
 #ifdef XP_WIN
-#include "mozilla/WindowsVersion.h"
-#include "mozilla/layers/D3D11YCbCrImage.h"
+#  include "mozilla/WindowsVersion.h"
+#  include "mozilla/layers/D3D11YCbCrImage.h"
 #endif
 
 namespace mozilla {
 
 using namespace mozilla::gfx;
 using layers::ImageContainer;
 using layers::PlanarYCbCrData;
 using layers::PlanarYCbCrImage;
--- a/dom/media/MediaData.h
+++ b/dom/media/MediaData.h
@@ -1,30 +1,30 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #if !defined(MediaData_h)
-#define MediaData_h
+#  define MediaData_h
 
-#include "AudioConfig.h"
-#include "AudioSampleFormat.h"
-#include "ImageTypes.h"
-#include "SharedBuffer.h"
-#include "TimeUnits.h"
-#include "mozilla/CheckedInt.h"
-#include "mozilla/PodOperations.h"
-#include "mozilla/RefPtr.h"
-#include "mozilla/Span.h"
-#include "mozilla/UniquePtr.h"
-#include "mozilla/UniquePtrExtensions.h"
-#include "mozilla/gfx/Rect.h"
-#include "nsString.h"
-#include "nsTArray.h"
+#  include "AudioConfig.h"
+#  include "AudioSampleFormat.h"
+#  include "ImageTypes.h"
+#  include "SharedBuffer.h"
+#  include "TimeUnits.h"
+#  include "mozilla/CheckedInt.h"
+#  include "mozilla/PodOperations.h"
+#  include "mozilla/RefPtr.h"
+#  include "mozilla/Span.h"
+#  include "mozilla/UniquePtr.h"
+#  include "mozilla/UniquePtrExtensions.h"
+#  include "mozilla/gfx/Rect.h"
+#  include "nsString.h"
+#  include "nsTArray.h"
 
 namespace mozilla {
 
 namespace layers {
 class Image;
 class ImageContainer;
 class KnowsCompositor;
 }  // namespace layers
--- a/dom/media/MediaDataDemuxer.h
+++ b/dom/media/MediaDataDemuxer.h
@@ -1,28 +1,28 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #if !defined(MediaDataDemuxer_h)
-#define MediaDataDemuxer_h
+#  define MediaDataDemuxer_h
 
-#include "DecoderDoctorLogger.h"
-#include "mozilla/MozPromise.h"
-#include "mozilla/UniquePtr.h"
+#  include "DecoderDoctorLogger.h"
+#  include "mozilla/MozPromise.h"
+#  include "mozilla/UniquePtr.h"
 
-#include "MediaData.h"
-#include "MediaInfo.h"
-#include "MediaResult.h"
-#include "TimeUnits.h"
-#include "nsISupportsImpl.h"
-#include "mozilla/RefPtr.h"
-#include "nsTArray.h"
+#  include "MediaData.h"
+#  include "MediaInfo.h"
+#  include "MediaResult.h"
+#  include "TimeUnits.h"
+#  include "nsISupportsImpl.h"
+#  include "mozilla/RefPtr.h"
+#  include "nsTArray.h"
 
 namespace mozilla {
 
 class MediaTrackDemuxer;
 class TrackMetadataHolder;
 
 DDLoggedTypeDeclName(MediaDataDemuxer);
 DDLoggedTypeName(MediaTrackDemuxer);
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -40,17 +40,17 @@ using namespace mozilla::layers;
 using namespace mozilla::media;
 
 namespace mozilla {
 
 // GetCurrentTime is defined in winbase.h as zero argument macro forwarding to
 // GetTickCount() and conflicts with MediaDecoder::GetCurrentTime
 // implementation.
 #ifdef GetCurrentTime
-#undef GetCurrentTime
+#  undef GetCurrentTime
 #endif
 
 // avoid redefined macro in unified build
 #undef LOG
 #undef DUMP
 
 LazyLogModule gMediaDecoderLog("MediaDecoder");
 #define LOG(x, ...) \
--- a/dom/media/MediaDecoder.h
+++ b/dom/media/MediaDecoder.h
@@ -1,41 +1,41 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #if !defined(MediaDecoder_h_)
-#define MediaDecoder_h_
+#  define MediaDecoder_h_
 
-#include "BackgroundVideoDecodingPermissionObserver.h"
-#include "DecoderDoctorDiagnostics.h"
-#include "MediaContainerType.h"
-#include "MediaDecoderOwner.h"
-#include "MediaEventSource.h"
-#include "MediaMetadataManager.h"
-#include "MediaPromiseDefs.h"
-#include "MediaResource.h"
-#include "MediaStatistics.h"
-#include "MediaStreamGraph.h"
-#include "SeekTarget.h"
-#include "TimeUnits.h"
-#include "TrackID.h"
-#include "mozilla/Atomics.h"
-#include "mozilla/CDMProxy.h"
-#include "mozilla/MozPromise.h"
-#include "mozilla/ReentrantMonitor.h"
-#include "mozilla/StateMirroring.h"
-#include "mozilla/StateWatching.h"
-#include "nsAutoPtr.h"
-#include "nsCOMPtr.h"
-#include "nsIObserver.h"
-#include "nsISupports.h"
-#include "nsITimer.h"
+#  include "BackgroundVideoDecodingPermissionObserver.h"
+#  include "DecoderDoctorDiagnostics.h"
+#  include "MediaContainerType.h"
+#  include "MediaDecoderOwner.h"
+#  include "MediaEventSource.h"
+#  include "MediaMetadataManager.h"
+#  include "MediaPromiseDefs.h"
+#  include "MediaResource.h"
+#  include "MediaStatistics.h"
+#  include "MediaStreamGraph.h"
+#  include "SeekTarget.h"
+#  include "TimeUnits.h"
+#  include "TrackID.h"
+#  include "mozilla/Atomics.h"
+#  include "mozilla/CDMProxy.h"
+#  include "mozilla/MozPromise.h"
+#  include "mozilla/ReentrantMonitor.h"
+#  include "mozilla/StateMirroring.h"
+#  include "mozilla/StateWatching.h"
+#  include "nsAutoPtr.h"
+#  include "nsCOMPtr.h"
+#  include "nsIObserver.h"
+#  include "nsISupports.h"
+#  include "nsITimer.h"
 
 class nsIPrincipal;
 
 namespace mozilla {
 
 namespace dom {
 class MediaMemoryInfo;
 }
@@ -48,19 +48,19 @@ class MediaFormatReader;
 class MediaDecoderStateMachine;
 struct MediaPlaybackEvent;
 
 enum class Visibility : uint8_t;
 
 // GetCurrentTime is defined in winbase.h as zero argument macro forwarding to
 // GetTickCount() and conflicts with MediaDecoder::GetCurrentTime
 // implementation.
-#ifdef GetCurrentTime
-#undef GetCurrentTime
-#endif
+#  ifdef GetCurrentTime
+#    undef GetCurrentTime
+#  endif
 
 struct MOZ_STACK_CLASS MediaDecoderInit {
   MediaDecoderOwner* const mOwner;
   const double mVolume;
   const bool mPreservesPitch;
   const double mPlaybackRate;
   const bool mMinimizePreroll;
   const bool mHasSuspendTaint;
@@ -363,19 +363,19 @@ class MediaDecoder : public DecoderDocto
 
   void EnsureTelemetryReported();
 
   static bool IsOggEnabled();
   static bool IsOpusEnabled();
   static bool IsWaveEnabled();
   static bool IsWebMEnabled();
 
-#ifdef MOZ_WMF
+#  ifdef MOZ_WMF
   static bool IsWMFEnabled();
-#endif
+#  endif
 
   // Return the frame decode/paint related statistics.
   FrameStatistics& GetFrameStatistics() { return *mFrameStats; }
 
   void UpdateReadyState() {
     MOZ_ASSERT(NS_IsMainThread());
     MOZ_DIAGNOSTIC_ASSERT(!IsShutdown());
     GetOwner()->UpdateReadyState();
--- a/dom/media/MediaDecoderStateMachine.h
+++ b/dom/media/MediaDecoderStateMachine.h
@@ -75,34 +75,34 @@ decoders will have an opportunity to run
 
 During playback the audio thread will be idle (via a Wait() on the
 monitor) if the audio queue is empty. Otherwise it constantly pops
 audio data off the queue and plays it with a blocking write to the audio
 hardware (via AudioStream).
 
 */
 #if !defined(MediaDecoderStateMachine_h__)
-#define MediaDecoderStateMachine_h__
+#  define MediaDecoderStateMachine_h__
 
-#include "ImageContainer.h"
-#include "MediaDecoder.h"
-#include "MediaDecoderOwner.h"
-#include "MediaEventSource.h"
-#include "MediaFormatReader.h"
-#include "MediaMetadataManager.h"
-#include "MediaQueue.h"
-#include "MediaSink.h"
-#include "MediaStatistics.h"
-#include "MediaTimer.h"
-#include "SeekJob.h"
-#include "mozilla/Attributes.h"
-#include "mozilla/ReentrantMonitor.h"
-#include "mozilla/StateMirroring.h"
-#include "nsAutoPtr.h"
-#include "nsThreadUtils.h"
+#  include "ImageContainer.h"
+#  include "MediaDecoder.h"
+#  include "MediaDecoderOwner.h"
+#  include "MediaEventSource.h"
+#  include "MediaFormatReader.h"
+#  include "MediaMetadataManager.h"
+#  include "MediaQueue.h"
+#  include "MediaSink.h"
+#  include "MediaStatistics.h"
+#  include "MediaTimer.h"
+#  include "SeekJob.h"
+#  include "mozilla/Attributes.h"
+#  include "mozilla/ReentrantMonitor.h"
+#  include "mozilla/StateMirroring.h"
+#  include "nsAutoPtr.h"
+#  include "nsThreadUtils.h"
 
 namespace mozilla {
 
 class AbstractThread;
 class AudioSegment;
 class DecodedStream;
 class DOMMediaStream;
 class OutputStreamManager;
--- a/dom/media/MediaFormatReader.h
+++ b/dom/media/MediaFormatReader.h
@@ -1,32 +1,32 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #if !defined(MediaFormatReader_h_)
-#define MediaFormatReader_h_
+#  define MediaFormatReader_h_
 
-#include "mozilla/Atomics.h"
-#include "mozilla/Maybe.h"
-#include "mozilla/Mutex.h"
-#include "mozilla/StateMirroring.h"
-#include "mozilla/StaticPrefs.h"
-#include "mozilla/TaskQueue.h"
+#  include "mozilla/Atomics.h"
+#  include "mozilla/Maybe.h"
+#  include "mozilla/Mutex.h"
+#  include "mozilla/StateMirroring.h"
+#  include "mozilla/StaticPrefs.h"
+#  include "mozilla/TaskQueue.h"
 
-#include "FrameStatistics.h"
-#include "MediaEventSource.h"
-#include "MediaDataDemuxer.h"
-#include "MediaMetadataManager.h"
-#include "MediaPromiseDefs.h"
-#include "nsAutoPtr.h"
-#include "PDMFactory.h"
-#include "SeekTarget.h"
+#  include "FrameStatistics.h"
+#  include "MediaEventSource.h"
+#  include "MediaDataDemuxer.h"
+#  include "MediaMetadataManager.h"
+#  include "MediaPromiseDefs.h"
+#  include "nsAutoPtr.h"
+#  include "PDMFactory.h"
+#  include "SeekTarget.h"
 
 namespace mozilla {
 
 class CDMProxy;
 class GMPCrashHelper;
 class MediaResource;
 class VideoFrameContainer;
 
--- a/dom/media/MediaInfo.h
+++ b/dom/media/MediaInfo.h
@@ -1,29 +1,29 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #if !defined(MediaInfo_h)
-#define MediaInfo_h
+#  define MediaInfo_h
 
-#include "mozilla/UniquePtr.h"
-#include "mozilla/RefPtr.h"
-#include "nsDataHashtable.h"
-#include "nsString.h"
-#include "nsTArray.h"
-#include "AudioConfig.h"
-#include "ImageTypes.h"
-#include "MediaData.h"
-#include "TrackID.h"  // for TrackID
-#include "TimeUnits.h"
-#include "mozilla/gfx/Point.h"  // for gfx::IntSize
-#include "mozilla/gfx/Rect.h"   // for gfx::IntRect
-#include "mozilla/gfx/Types.h"  // for gfx::ColorDepth
+#  include "mozilla/UniquePtr.h"
+#  include "mozilla/RefPtr.h"
+#  include "nsDataHashtable.h"
+#  include "nsString.h"
+#  include "nsTArray.h"
+#  include "AudioConfig.h"
+#  include "ImageTypes.h"
+#  include "MediaData.h"
+#  include "TrackID.h"  // for TrackID
+#  include "TimeUnits.h"
+#  include "mozilla/gfx/Point.h"  // for gfx::IntSize
+#  include "mozilla/gfx/Rect.h"   // for gfx::IntRect
+#  include "mozilla/gfx/Types.h"  // for gfx::ColorDepth
 
 namespace mozilla {
 
 class AudioInfo;
 class VideoInfo;
 class TextInfo;
 
 class MetadataTag {
--- a/dom/media/MediaManager.cpp
+++ b/dom/media/MediaManager.cpp
@@ -69,33 +69,33 @@
 #include "nsIUUIDGenerator.h"
 #include "nspr.h"
 #include "nss.h"
 #include "pk11pub.h"
 
 /* Using WebRTC backend on Desktops (Mac, Windows, Linux), otherwise default */
 #include "MediaEngineDefault.h"
 #if defined(MOZ_WEBRTC)
-#include "MediaEngineWebRTC.h"
-#include "browser_logging/WebRtcLog.h"
-#include "webrtc/modules/audio_processing/include/audio_processing.h"
+#  include "MediaEngineWebRTC.h"
+#  include "browser_logging/WebRtcLog.h"
+#  include "webrtc/modules/audio_processing/include/audio_processing.h"
 #endif
 
 #if defined(XP_WIN)
-#include "mozilla/WindowsVersion.h"
-#include <objbase.h>
-#include <winsock2.h>
-#include <iphlpapi.h>
-#include <tchar.h>
+#  include "mozilla/WindowsVersion.h"
+#  include <objbase.h>
+#  include <winsock2.h>
+#  include <iphlpapi.h>
+#  include <tchar.h>
 #endif
 
 // GetCurrentTime is defined in winbase.h as zero argument macro forwarding to
 // GetTickCount() and conflicts with MediaStream::GetCurrentTime.
 #ifdef GetCurrentTime
-#undef GetCurrentTime
+#  undef GetCurrentTime
 #endif
 
 // XXX Workaround for bug 986974 to maintain the existing broken semantics
 template <>
 struct nsIMediaDevice::COMTypeInfo<mozilla::MediaDevice, void> {
   static const nsIID kIID;
 };
 const nsIID nsIMediaDevice::COMTypeInfo<mozilla::MediaDevice, void>::kIID =
@@ -185,17 +185,17 @@ already_AddRefed<nsIAsyncShutdownClient>
   MOZ_RELEASE_ASSERT(NS_SUCCEEDED(rv));
   return shutdownPhase.forget();
 }
 }  // namespace
 
 namespace mozilla {
 
 #ifdef LOG
-#undef LOG
+#  undef LOG
 #endif
 
 LazyLogModule gMediaManagerLog("MediaManager");
 #define LOG(...) MOZ_LOG(gMediaManagerLog, LogLevel::Debug, (__VA_ARGS__))
 
 using dom::BasicTrackSource;
 using dom::ConstrainDOMStringParameters;
 using dom::ConstrainDoubleRange;
--- a/dom/media/MediaManager.h
+++ b/dom/media/MediaManager.h
@@ -31,17 +31,17 @@
 #include "mozilla/dom/NavigatorBinding.h"
 #include "mozilla/media/MediaChild.h"
 #include "mozilla/media/MediaParent.h"
 #include "mozilla/Logging.h"
 #include "mozilla/UniquePtr.h"
 #include "DOMMediaStream.h"
 
 #ifdef MOZ_WEBRTC
-#include "mtransport/runnable_utils.h"
+#  include "mtransport/runnable_utils.h"
 #endif
 
 // Note, these suck in Windows headers, unfortunately.
 #include "base/thread.h"
 #include "base/task.h"
 
 namespace mozilla {
 namespace dom {
--- a/dom/media/MediaMetadataManager.h
+++ b/dom/media/MediaMetadataManager.h
@@ -1,24 +1,24 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #if !defined(MediaMetadataManager_h__)
-#define MediaMetadataManager_h__
+#  define MediaMetadataManager_h__
 
-#include "mozilla/AbstractThread.h"
-#include "mozilla/LinkedList.h"
+#  include "mozilla/AbstractThread.h"
+#  include "mozilla/LinkedList.h"
 
-#include "nsAutoPtr.h"
-#include "MediaEventSource.h"
-#include "TimeUnits.h"
-#include "VideoUtils.h"
+#  include "nsAutoPtr.h"
+#  include "MediaEventSource.h"
+#  include "TimeUnits.h"
+#  include "VideoUtils.h"
 
 namespace mozilla {
 
 class TimedMetadata;
 typedef MediaEventProducerExc<TimedMetadata> TimedMetadataEventProducer;
 typedef MediaEventSourceExc<TimedMetadata> TimedMetadataEventSource;
 
 // A struct that contains the metadata of a media, and the time at which those
--- a/dom/media/MediaQueue.h
+++ b/dom/media/MediaQueue.h
@@ -1,22 +1,22 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #if !defined(MediaQueue_h_)
-#define MediaQueue_h_
+#  define MediaQueue_h_
 
-#include "mozilla/RecursiveMutex.h"
-#include "mozilla/TaskQueue.h"
+#  include "mozilla/RecursiveMutex.h"
+#  include "mozilla/TaskQueue.h"
 
-#include "nsDeque.h"
-#include "MediaEventSource.h"
-#include "TimeUnits.h"
+#  include "nsDeque.h"
+#  include "MediaEventSource.h"
+#  include "TimeUnits.h"
 
 namespace mozilla {
 
 // Thread and type safe wrapper around nsDeque.
 template <class T>
 class MediaQueueDeallocator : public nsDequeFunctor {
   virtual void operator()(void* aObject) override {
     RefPtr<T> releaseMe = dont_AddRef(static_cast<T*>(aObject));
--- a/dom/media/MediaRecorder.cpp
+++ b/dom/media/MediaRecorder.cpp
@@ -36,17 +36,17 @@
 #include "nsIPermissionManager.h"
 #include "nsIPrincipal.h"
 #include "nsIScriptError.h"
 #include "nsMimeTypes.h"
 #include "nsProxyRelease.h"
 #include "nsTArray.h"
 
 #ifdef LOG
-#undef LOG
+#  undef LOG
 #endif
 
 mozilla::LazyLogModule gMediaRecorderLog("MediaRecorder");
 #define LOG(type, msg) MOZ_LOG(gMediaRecorderLog, type, msg)
 
 namespace mozilla {
 
 namespace dom {
--- a/dom/media/MediaResource.h
+++ b/dom/media/MediaResource.h
@@ -1,24 +1,24 @@
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #if !defined(MediaResource_h_)
-#define MediaResource_h_
+#  define MediaResource_h_
 
-#include "DecoderDoctorLogger.h"
-#include "Intervals.h"
-#include "MediaData.h"
-#include "mozilla/Attributes.h"
-#include "mozilla/GuardObjects.h"
-#include "mozilla/UniquePtr.h"
-#include "nsISeekableStream.h"
-#include "nsThreadUtils.h"
+#  include "DecoderDoctorLogger.h"
+#  include "Intervals.h"
+#  include "MediaData.h"
+#  include "mozilla/Attributes.h"
+#  include "mozilla/GuardObjects.h"
+#  include "mozilla/UniquePtr.h"
+#  include "nsISeekableStream.h"
+#  include "nsThreadUtils.h"
 
 namespace mozilla {
 
 // Represents a section of contiguous media, with a start and end offset.
 // Used to denote ranges of data which are cached.
 
 typedef media::Interval<int64_t> MediaByteRange;
 typedef media::IntervalSet<int64_t> MediaByteRangeSet;
--- a/dom/media/MediaResult.h
+++ b/dom/media/MediaResult.h
@@ -62,17 +62,17 @@ class MediaResult {
  private:
   nsresult mCode;
   nsCString mMessage;
   TimeStamp
       mGPUCrashTimeStamp;  // Used in bug 1393399 for temporary telemetry usage.
 };
 
 #ifdef _MSC_VER
-#define RESULT_DETAIL(arg, ...) \
-  nsPrintfCString("%s: " arg, __FUNCSIG__, ##__VA_ARGS__)
+#  define RESULT_DETAIL(arg, ...) \
+    nsPrintfCString("%s: " arg, __FUNCSIG__, ##__VA_ARGS__)
 #else
-#define RESULT_DETAIL(arg, ...) \
-  nsPrintfCString("%s: " arg, __PRETTY_FUNCTION__, ##__VA_ARGS__)
+#  define RESULT_DETAIL(arg, ...) \
+    nsPrintfCString("%s: " arg, __PRETTY_FUNCTION__, ##__VA_ARGS__)
 #endif
 
 }  // namespace mozilla
 #endif  // MediaResult_h_
--- a/dom/media/MediaSegment.h
+++ b/dom/media/MediaSegment.h
@@ -5,17 +5,17 @@
 
 #ifndef MOZILLA_MEDIASEGMENT_H_
 #define MOZILLA_MEDIASEGMENT_H_
 
 #include "nsTArray.h"
 #include "nsIPrincipal.h"
 #include "nsProxyRelease.h"
 #ifdef MOZILLA_INTERNAL_API
-#include "mozilla/TimeStamp.h"
+#  include "mozilla/TimeStamp.h"
 #endif
 #include <algorithm>
 
 namespace mozilla {
 
 /**
  * Track or graph rate in Hz. Maximum 1 << TRACK_RATE_MAX_BITS Hz. This
  * maximum avoids overflow in conversions between track rates and conversions
--- a/dom/media/MediaShutdownManager.h
+++ b/dom/media/MediaShutdownManager.h
@@ -1,25 +1,25 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #if !defined(MediaShutdownManager_h_)
-#define MediaShutdownManager_h_
+#  define MediaShutdownManager_h_
 
-#include "mozilla/Monitor.h"
-#include "mozilla/RefPtr.h"
-#include "mozilla/StaticPtr.h"
-#include "nsCOMPtr.h"
-#include "nsIAsyncShutdown.h"
-#include "nsIThread.h"
-#include "nsHashKeys.h"
-#include "nsTHashtable.h"
+#  include "mozilla/Monitor.h"
+#  include "mozilla/RefPtr.h"
+#  include "mozilla/StaticPtr.h"
+#  include "nsCOMPtr.h"
+#  include "nsIAsyncShutdown.h"
+#  include "nsIThread.h"
+#  include "nsHashKeys.h"
+#  include "nsTHashtable.h"
 
 namespace mozilla {
 
 class MediaDecoder;
 
 // The MediaShutdownManager manages shutting down the MediaDecoder
 // infrastructure in response to an xpcom-shutdown notification.
 // This happens when Gecko is shutting down in the middle of operation.
--- a/dom/media/MediaStreamError.h
+++ b/dom/media/MediaStreamError.h
@@ -10,17 +10,17 @@
 #include "mozilla/Attributes.h"
 #include "mozilla/ErrorResult.h"
 #include "nsWrapperCache.h"
 #include "js/TypeDecls.h"
 #include "nsPIDOMWindow.h"
 #include "mozilla/RefPtr.h"
 
 #if defined(XP_WIN) && defined(GetMessage)
-#undef GetMessage
+#  undef GetMessage
 #endif
 
 namespace mozilla {
 
 namespace dom {
 
 #define MOZILLA_DOM_MEDIASTREAMERROR_IMPLEMENTATION_IID \
   {                                                     \
--- a/dom/media/MediaStreamGraph.cpp
+++ b/dom/media/MediaStreamGraph.cpp
@@ -43,17 +43,17 @@ using namespace mozilla::gfx;
 using namespace mozilla::media;
 
 mozilla::AsyncLogger gMSGTraceLogger("MSGTracing");
 
 namespace mozilla {
 
 LazyLogModule gMediaStreamGraphLog("MediaStreamGraph");
 #ifdef LOG
-#undef LOG
+#  undef LOG
 #endif  // LOG
 #define LOG(type, msg) MOZ_LOG(gMediaStreamGraphLog, type, msg)
 
 enum SourceMediaStream::TrackCommands : uint32_t {
   TRACK_CREATE = TrackEventCommand::TRACK_EVENT_CREATED,
   TRACK_END = TrackEventCommand::TRACK_EVENT_ENDED,
 };
 
@@ -907,25 +907,25 @@ void MediaStreamGraphImpl::NotifyOutputD
 void MediaStreamGraphImpl::NotifyInputData(const AudioDataValue* aBuffer,
                                            size_t aFrames, TrackRate aRate,
                                            uint32_t aChannels) {
 #ifdef ANDROID
   if (!mInputDeviceUsers.GetValue(mInputDeviceID)) {
     return;
   }
 #else
-#ifdef DEBUG
+#  ifdef DEBUG
   {
     MonitorAutoLock lock(mMonitor);
     // Either we have an audio input device, or we just removed the audio input
     // this iteration, and we're switching back to an output-only driver next
     // iteration.
     MOZ_ASSERT(mInputDeviceID || CurrentDriver()->Switching());
   }
-#endif
+#  endif
   if (!mInputDeviceID) {
     return;
   }
 #endif
   nsTArray<RefPtr<AudioDataListener>>* listeners =
       mInputDeviceUsers.GetValue(mInputDeviceID);
   MOZ_ASSERT(listeners);
   for (auto& listener : *listeners) {
--- a/dom/media/MediaStreamGraph.h
+++ b/dom/media/MediaStreamGraph.h
@@ -252,17 +252,17 @@ struct TrackBound {
  * collected via cycle collection. Destroy messages will be sent
  * for those objects in arbitrary order and the MediaStreamGraph has to be able
  * to handle this.
  */
 
 // GetCurrentTime is defined in winbase.h as zero argument macro forwarding to
 // GetTickCount() and conflicts with MediaStream::GetCurrentTime.
 #ifdef GetCurrentTime
-#undef GetCurrentTime
+#  undef GetCurrentTime
 #endif
 
 class MediaStream : public mozilla::LinkedListElement<MediaStream> {
  public:
   NS_INLINE_DECL_THREADSAFE_REFCOUNTING(MediaStream)
 
   explicit MediaStream();
 
--- a/dom/media/MediaStreamListener.cpp
+++ b/dom/media/MediaStreamListener.cpp
@@ -7,17 +7,17 @@
 
 #include "AudioSegment.h"
 #include "VideoSegment.h"
 #include "StreamTracks.h"
 
 namespace mozilla {
 
 #ifdef LOG
-#undef LOG
+#  undef LOG
 #endif
 
 #define LOG(type, msg) MOZ_LOG(gMediaStreamGraphLog, type, msg)
 
 void DirectMediaStreamTrackListener::MirrorAndDisableSegment(
     AudioSegment& aFrom, AudioSegment& aTo) {
   aTo.Clear();
   aTo.AppendNullData(aFrom.GetDuration());
--- a/dom/media/MediaStreamTrack.cpp
+++ b/dom/media/MediaStreamTrack.cpp
@@ -12,17 +12,17 @@
 #include "mozilla/BasePrincipal.h"
 #include "mozilla/dom/Promise.h"
 #include "nsContentUtils.h"
 #include "nsIUUIDGenerator.h"
 #include "nsServiceManagerUtils.h"
 #include "systemservices/MediaUtils.h"
 
 #ifdef LOG
-#undef LOG
+#  undef LOG
 #endif
 
 static mozilla::LazyLogModule gMediaStreamTrackLog("MediaStreamTrack");
 #define LOG(type, msg) MOZ_LOG(gMediaStreamTrackLog, type, msg)
 
 using namespace mozilla::media;
 
 namespace mozilla {
--- a/dom/media/MediaTimer.h
+++ b/dom/media/MediaTimer.h
@@ -1,36 +1,36 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #if !defined(MediaTimer_h_)
-#define MediaTimer_h_
+#  define MediaTimer_h_
 
-#include "mozilla/AbstractThread.h"
-#include "mozilla/IntegerPrintfMacros.h"
-#include "mozilla/Monitor.h"
-#include "mozilla/MozPromise.h"
-#include "mozilla/RefPtr.h"
-#include "mozilla/TimeStamp.h"
-#include "mozilla/Unused.h"
-#include "nsITimer.h"
-#include <queue>
+#  include "mozilla/AbstractThread.h"
+#  include "mozilla/IntegerPrintfMacros.h"
+#  include "mozilla/Monitor.h"
+#  include "mozilla/MozPromise.h"
+#  include "mozilla/RefPtr.h"
+#  include "mozilla/TimeStamp.h"
+#  include "mozilla/Unused.h"
+#  include "nsITimer.h"
+#  include <queue>
 
 namespace mozilla {
 
 extern LazyLogModule gMediaTimerLog;
 
-#define TIMER_LOG(x, ...)                                    \
-  MOZ_ASSERT(gMediaTimerLog);                                \
-  MOZ_LOG(gMediaTimerLog, LogLevel::Debug,                   \
-          ("[MediaTimer=%p relative_t=%" PRId64 "]" x, this, \
-           RelativeMicroseconds(TimeStamp::Now()), ##__VA_ARGS__))
+#  define TIMER_LOG(x, ...)                                    \
+    MOZ_ASSERT(gMediaTimerLog);                                \
+    MOZ_LOG(gMediaTimerLog, LogLevel::Debug,                   \
+            ("[MediaTimer=%p relative_t=%" PRId64 "]" x, this, \
+             RelativeMicroseconds(TimeStamp::Now()), ##__VA_ARGS__))
 
 // This promise type is only exclusive because so far there isn't a reason for
 // it not to be. Feel free to change that.
 typedef MozPromise<bool, bool, /* IsExclusive = */ true> MediaTimerPromise;
 
 // Timers only know how to fire at a given thread, which creates an impedence
 // mismatch with code that operates with TaskQueues. This class solves
 // that mismatch with a dedicated (but shared) thread and a nice MozPromise-y
--- a/dom/media/StreamTracks.cpp
+++ b/dom/media/StreamTracks.cpp
@@ -7,17 +7,17 @@
 #include "mozilla/Logging.h"
 #include <algorithm>
 
 namespace mozilla {
 
 #ifdef DEBUG
 
 extern LazyLogModule gMediaStreamGraphLog;
-#define STREAM_LOG(type, msg) MOZ_LOG(gMediaStreamGraphLog, type, msg)
+#  define STREAM_LOG(type, msg) MOZ_LOG(gMediaStreamGraphLog, type, msg)
 
 void StreamTracks::DumpTrackInfo() const {
   STREAM_LOG(LogLevel::Info, ("Dumping StreamTracks"));
   for (uint32_t i = 0; i < mTracks.Length(); ++i) {
     Track* track = mTracks[i];
     if (track->IsEnded()) {
       STREAM_LOG(LogLevel::Info, ("Track[%d] %d: ended", i, track->GetID()));
     } else {
--- a/dom/media/Tracing.h
+++ b/dom/media/Tracing.h
@@ -12,62 +12,63 @@
 #include <cstdio>
 
 #include "AsyncLogger.h"
 
 #include "mozilla/Attributes.h"
 #include "mozilla/UniquePtr.h"
 
 #if defined(_WIN32)
-#include <process.h>
-#define getpid() _getpid()
+#  include <process.h>
+#  define getpid() _getpid()
 #else
-#include <unistd.h>
+#  include <unistd.h>
 #endif
 
 #if defined(_MSC_VER)
 // MSVC
-#define FUNCTION_SIGNATURE __FUNCSIG__
+#  define FUNCTION_SIGNATURE __FUNCSIG__
 #elif defined(__GNUC__)
 // gcc, clang
-#define FUNCTION_SIGNATURE __PRETTY_FUNCTION__
+#  define FUNCTION_SIGNATURE __PRETTY_FUNCTION__
 #endif
 
 #ifdef TRACING
 /* TRACE is for use in the real-time audio rendering thread.
  * It would be better to always pass in the thread id. However, the thread an
  * audio callback runs on can change when the underlying audio device change,
  * and also it seems to be called from a thread pool in a round-robin fashion
  * when audio remoting is activated, making the traces unreadable.
  * The thread on which the AudioCallbackDriver::DataCallback is to always
  * be thread 0, and the budget is set to always be thread 1. This allows
  * displaying those elements in two separate lanes.
  * The other thread have "normal" tid. Hashing allows being able to get a
  * string representation that is unique and guaranteed to be portable. */
-#define TRACE_AUDIO_CALLBACK() \
-  AutoTracer trace(gMSGTraceLogger, FUNCTION_SIGNATURE, getpid(), 0);
-#define TRACE_AUDIO_CALLBACK_BUDGET(aFrames, aSampleRate)             \
-  AutoTracer budget(gMSGTraceLogger, "Real-time budget", getpid(), 1, \
-                    AutoTracer::EventType::BUDGET, aFrames, aSampleRate);
-#define TRACE_AUDIO_CALLBACK_COMMENT(aFmt, ...)                      \
-  AutoTracer trace(gMSGTraceLogger, FUNCTION_SIGNATURE, getpid(), 0, \
-                   AutoTracer::EventType::DURATION, aFmt, ##__VA_ARGS__);
-#define TRACE()                                                   \
-  AutoTracer trace(gMSGTraceLogger, FUNCTION_SIGNATURE, getpid(), \
-                   std::hash<std::thread::id>{}(std::this_thread::get_id()));
-#define TRACE_COMMENT(aFmt, ...)                                             \
-  AutoTracer trace(gMSGTraceLogger, FUNCTION_SIGNATURE, getpid(),            \
-                   std::hash<std::thread::id>{}(std::this_thread::get_id()), \
-                   AutoTracer::EventType::DURATION, aFmt, ##__VA_ARGS__);
+#  define TRACE_AUDIO_CALLBACK() \
+    AutoTracer trace(gMSGTraceLogger, FUNCTION_SIGNATURE, getpid(), 0);
+#  define TRACE_AUDIO_CALLBACK_BUDGET(aFrames, aSampleRate)             \
+    AutoTracer budget(gMSGTraceLogger, "Real-time budget", getpid(), 1, \
+                      AutoTracer::EventType::BUDGET, aFrames, aSampleRate);
+#  define TRACE_AUDIO_CALLBACK_COMMENT(aFmt, ...)                      \
+    AutoTracer trace(gMSGTraceLogger, FUNCTION_SIGNATURE, getpid(), 0, \
+                     AutoTracer::EventType::DURATION, aFmt, ##__VA_ARGS__);
+#  define TRACE()                                      \
+    AutoTracer trace(                                  \
+        gMSGTraceLogger, FUNCTION_SIGNATURE, getpid(), \
+        std::hash<std::thread::id>{}(std::this_thread::get_id()));
+#  define TRACE_COMMENT(aFmt, ...)                                             \
+    AutoTracer trace(gMSGTraceLogger, FUNCTION_SIGNATURE, getpid(),            \
+                     std::hash<std::thread::id>{}(std::this_thread::get_id()), \
+                     AutoTracer::EventType::DURATION, aFmt, ##__VA_ARGS__);
 #else
-#define TRACE_AUDIO_CALLBACK()
-#define TRACE_AUDIO_CALLBACK_BUDGET(aFrames, aSampleRate)
-#define TRACE_AUDIO_CALLBACK_COMMENT(aFmt, ...)
-#define TRACE()
-#define TRACE_COMMENT(aFmt, ...)
+#  define TRACE_AUDIO_CALLBACK()
+#  define TRACE_AUDIO_CALLBACK_BUDGET(aFrames, aSampleRate)
+#  define TRACE_AUDIO_CALLBACK_COMMENT(aFmt, ...)
+#  define TRACE()
+#  define TRACE_COMMENT(aFmt, ...)
 #endif
 
 class MOZ_RAII AutoTracer {
  public:
   static const int32_t BUFFER_SIZE =
       mozilla::AsyncLogger::MAX_MESSAGE_LENGTH / 2;
 
   enum class EventType { DURATION, BUDGET };
@@ -135,12 +136,12 @@ class MOZ_RAII AutoTracer {
   // vizualizer.
   const uint64_t mPID;
   // The thread ID of the calling thread, will be displayed in a separate
   // section in the trace visualizer.
   const uint64_t mTID;
 };
 
 #if defined(_WIN32)
-#undef getpid
+#  undef getpid
 #endif
 
 #endif /* TRACING_H */
--- a/dom/media/TrackUnionStream.cpp
+++ b/dom/media/TrackUnionStream.cpp
@@ -31,17 +31,17 @@
 
 using namespace mozilla::layers;
 using namespace mozilla::dom;
 using namespace mozilla::gfx;
 
 namespace mozilla {
 
 #ifdef STREAM_LOG
-#undef STREAM_LOG
+#  undef STREAM_LOG
 #endif
 
 LazyLogModule gTrackUnionStreamLog("TrackUnionStream");
 #define STREAM_LOG(type, msg) MOZ_LOG(gTrackUnionStreamLog, type, msg)
 
 TrackUnionStream::TrackUnionStream()
     : ProcessedMediaStream(), mNextAvailableTrackID(1) {}
 
--- a/dom/media/VorbisUtils.h
+++ b/dom/media/VorbisUtils.h
@@ -3,25 +3,25 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef VORBISUTILS_H_
 #define VORBISUTILS_H_
 
 #ifdef MOZ_SAMPLE_TYPE_S16
-#include <ogg/os_types.h>
+#  include <ogg/os_types.h>
 typedef ogg_int32_t VorbisPCMValue;
 
-#define MOZ_CLIP_TO_15(x) ((x) < -32768 ? -32768 : (x) <= 32767 ? (x) : 32767)
+#  define MOZ_CLIP_TO_15(x) ((x) < -32768 ? -32768 : (x) <= 32767 ? (x) : 32767)
 // Convert the output of vorbis_synthesis_pcmout to a AudioDataValue
-#define MOZ_CONVERT_VORBIS_SAMPLE(x) \
-  (static_cast<AudioDataValue>(MOZ_CLIP_TO_15((x) >> 9)))
+#  define MOZ_CONVERT_VORBIS_SAMPLE(x) \
+    (static_cast<AudioDataValue>(MOZ_CLIP_TO_15((x) >> 9)))
 
 #else /* MOZ_SAMPLE_TYPE_FLOAT32 */
 
 typedef float VorbisPCMValue;
 
-#define MOZ_CONVERT_VORBIS_SAMPLE(x) (x)
+#  define MOZ_CONVERT_VORBIS_SAMPLE(x) (x)
 
 #endif
 
 #endif /* VORBISUTILS_H_ */
--- a/dom/media/XiphExtradata.h
+++ b/dom/media/XiphExtradata.h
@@ -1,17 +1,17 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #if !defined(XiphExtradata_h)
-#define XiphExtradata_h
+#  define XiphExtradata_h
 
-#include "MediaData.h"
+#  include "MediaData.h"
 
 namespace mozilla {
 
 /* This converts a list of headers to the canonical form of extradata for Xiph
    codecs in non-Ogg containers. We use it to pass those headers from demuxer
    to decoder even when demuxing from an Ogg cotainer. */
 bool XiphHeadersToExtradata(MediaByteBuffer* aCodecSpecificConfig,
                             const nsTArray<const unsigned char*>& aHeaders,
--- a/dom/media/bridge/MediaModule.cpp
+++ b/dom/media/bridge/MediaModule.cpp
@@ -2,28 +2,28 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "mozilla/ModuleUtils.h"
 #include "nsIClassInfoImpl.h"
 
 #ifdef MOZ_WEBRTC
 
-#include "PeerConnectionImpl.h"
+#  include "PeerConnectionImpl.h"
 
-#define PEERCONNECTION_CID                           \
-  {                                                  \
-    0xb93af7a1, 0x3411, 0x44a8, {                    \
-      0xbd, 0x0a, 0x8a, 0xf3, 0xdd, 0xe4, 0xd8, 0xd8 \
-    }                                                \
-  }
+#  define PEERCONNECTION_CID                           \
+    {                                                  \
+      0xb93af7a1, 0x3411, 0x44a8, {                    \
+        0xbd, 0x0a, 0x8a, 0xf3, 0xdd, 0xe4, 0xd8, 0xd8 \
+      }                                                \
+    }
 
-#define PEERCONNECTION_CONTRACTID "@mozilla.org/peerconnection;1"
+#  define PEERCONNECTION_CONTRACTID "@mozilla.org/peerconnection;1"
 
-#include "stun_socket_filter.h"
+#  include "stun_socket_filter.h"
 
 NS_DEFINE_NAMED_CID(NS_STUN_UDP_SOCKET_FILTER_HANDLER_CID)
 NS_DEFINE_NAMED_CID(NS_STUN_TCP_SOCKET_FILTER_HANDLER_CID)
 
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsStunUDPSocketFilterHandler)
 NS_GENERIC_FACTORY_CONSTRUCTOR(nsStunTCPSocketFilterHandler)
 
 namespace mozilla {
--- a/dom/media/doctor/DecoderDoctorDiagnostics.cpp
+++ b/dom/media/doctor/DecoderDoctorDiagnostics.cpp
@@ -15,17 +15,17 @@
 #include "nsIObserverService.h"
 #include "nsIScriptError.h"
 #include "nsITimer.h"
 #include "nsPluginHost.h"
 #include "nsPrintfCString.h"
 #include "VideoUtils.h"
 
 #if defined(MOZ_FFMPEG)
-#include "FFmpegRuntimeLinker.h"
+#  include "FFmpegRuntimeLinker.h"
 #endif
 
 static mozilla::LazyLogModule sDecoderDoctorLog("DecoderDoctor");
 #define DD_LOG(level, arg, ...) \
   MOZ_LOG(sDecoderDoctorLog, level, (arg, ##__VA_ARGS__))
 #define DD_DEBUG(arg, ...) DD_LOG(mozilla::LogLevel::Debug, arg, ##__VA_ARGS__)
 #define DD_INFO(arg, ...) DD_LOG(mozilla::LogLevel::Info, arg, ##__VA_ARGS__)
 #define DD_WARN(arg, ...) DD_LOG(mozilla::LogLevel::Warning, arg, ##__VA_ARGS__)
--- a/dom/media/doctor/DecoderDoctorLogger.h
+++ b/dom/media/doctor/DecoderDoctorLogger.h
@@ -404,19 +404,19 @@ class DecoderDoctorLifeLogger {
                                          _arg);                               \
     }                                                                         \
   } while (0)
 
 #ifdef DEBUG
 // Do a printf format check in DEBUG, with the downside that side-effects (from
 // evaluating the arguments) may happen twice! Who would do that anyway?
 static void inline MOZ_FORMAT_PRINTF(1, 2) DDLOGPRCheck(const char*, ...) {}
-#define DDLOGPR_CHECK(_fmt, ...) DDLOGPRCheck(_fmt, ##__VA_ARGS__)
+#  define DDLOGPR_CHECK(_fmt, ...) DDLOGPRCheck(_fmt, ##__VA_ARGS__)
 #else
-#define DDLOGPR_CHECK(_fmt, ...)
+#  define DDLOGPR_CHECK(_fmt, ...)
 #endif
 
 // Log a printf'd string. Discouraged, please try using DDLOG instead.
 #define DDLOGPR(_category, _label, _format, ...)                            \
   do {                                                                      \
     if (DecoderDoctorLogger::IsDDLoggingEnabled()) {                        \
       DDLOGPR_CHECK(_format, ##__VA_ARGS__);                                \
       DecoderDoctorLogger::EagerLogPrintf(this, _category, _label, _format, \
@@ -438,34 +438,34 @@ static void inline MOZ_FORMAT_PRINTF(1, 
     if (DecoderDoctorLogger::IsDDLoggingEnabled()) {                \
       DecoderDoctorLogger::UnlinkParentAndChild(this, __VA_ARGS__); \
     }                                                               \
   } while (0)
 
 // Log a printf'd string to DDLogger and/or MOZ_LOG, with an EXplicit `this`.
 // Don't even call MOZ_LOG on Android non-release/beta; See Logging.h.
 #if !defined(ANDROID) || !defined(RELEASE_OR_BETA)
-#define DDMOZ_LOGEX(_this, _logModule, _logLevel, _format, ...)                \
-  do {                                                                         \
-    if (DecoderDoctorLogger::IsDDLoggingEnabled() ||                           \
-        MOZ_LOG_TEST(_logModule, _logLevel)) {                                 \
-      DDLOGPR_CHECK(_format, ##__VA_ARGS__);                                   \
-      DecoderDoctorLogger::MozLogPrintf(_this, _logModule, _logLevel, _format, \
-                                        ##__VA_ARGS__);                        \
-    }                                                                          \
-  } while (0)
+#  define DDMOZ_LOGEX(_this, _logModule, _logLevel, _format, ...)       \
+    do {                                                                \
+      if (DecoderDoctorLogger::IsDDLoggingEnabled() ||                  \
+          MOZ_LOG_TEST(_logModule, _logLevel)) {                        \
+        DDLOGPR_CHECK(_format, ##__VA_ARGS__);                          \
+        DecoderDoctorLogger::MozLogPrintf(_this, _logModule, _logLevel, \
+                                          _format, ##__VA_ARGS__);      \
+      }                                                                 \
+    } while (0)
 #else
-#define DDMOZ_LOGEX(_this, _logModule, _logLevel, _format, ...)                \
-  do {                                                                         \
-    if (DecoderDoctorLogger::IsDDLoggingEnabled()) {                           \
-      DDLOGPR_CHECK(_format, ##__VA_ARGS__);                                   \
-      DecoderDoctorLogger::MozLogPrintf(_this, _logModule, _logLevel, _format, \
-                                        ##__VA_ARGS__);                        \
-    }                                                                          \
-  } while (0)
+#  define DDMOZ_LOGEX(_this, _logModule, _logLevel, _format, ...)       \
+    do {                                                                \
+      if (DecoderDoctorLogger::IsDDLoggingEnabled()) {                  \
+        DDLOGPR_CHECK(_format, ##__VA_ARGS__);                          \
+        DecoderDoctorLogger::MozLogPrintf(_this, _logModule, _logLevel, \
+                                          _format, ##__VA_ARGS__);      \
+      }                                                                 \
+    } while (0)
 #endif
 
 // Log a printf'd string to DDLogger and/or MOZ_LOG.
 #define DDMOZ_LOG(_logModule, _logLevel, _format, ...) \
   DDMOZ_LOGEX(this, _logModule, _logLevel, _format, ##__VA_ARGS__)
 
 }  // namespace mozilla
 
--- a/dom/media/eme/EMEUtils.h
+++ b/dom/media/eme/EMEUtils.h
@@ -15,33 +15,33 @@
 namespace mozilla {
 
 namespace dom {
 class ArrayBufferViewOrArrayBuffer;
 }
 
 #ifndef EME_LOG
 LogModule* GetEMELog();
-#define EME_LOG(...) \
-  MOZ_LOG(GetEMELog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
-#define EME_LOG_ENABLED() MOZ_LOG_TEST(GetEMELog(), mozilla::LogLevel::Debug)
+#  define EME_LOG(...) \
+    MOZ_LOG(GetEMELog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
+#  define EME_LOG_ENABLED() MOZ_LOG_TEST(GetEMELog(), mozilla::LogLevel::Debug)
 #endif
 
 #ifndef EME_VERBOSE_LOG
 LogModule* GetEMEVerboseLog();
-#define EME_VERBOSE_LOG(...) \
-  MOZ_LOG(GetEMEVerboseLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
+#  define EME_VERBOSE_LOG(...) \
+    MOZ_LOG(GetEMEVerboseLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
 #else
-#ifndef EME_LOG
-#define EME_LOG(...)
-#endif
+#  ifndef EME_LOG
+#    define EME_LOG(...)
+#  endif
 
-#ifndef EME_VERBOSE_LOG
-#define EME_VERBOSE_LOG(...)
-#endif
+#  ifndef EME_VERBOSE_LOG
+#    define EME_VERBOSE_LOG(...)
+#  endif
 #endif
 
 // Helper function to extract a copy of data coming in from JS in an
 // (ArrayBuffer or ArrayBufferView) IDL typed function argument.
 //
 // Only call this on a properly initialized ArrayBufferViewOrArrayBuffer.
 void CopyArrayBufferViewOrArrayBufferData(
     const dom::ArrayBufferViewOrArrayBuffer& aBufferOrView,
--- a/dom/media/eme/MediaKeySystemAccess.cpp
+++ b/dom/media/eme/MediaKeySystemAccess.cpp
@@ -7,17 +7,17 @@
 #include "mozilla/dom/MediaKeySystemAccess.h"
 #include "mozilla/dom/MediaKeySystemAccessBinding.h"
 #include "mozilla/dom/MediaKeySession.h"
 #include "mozilla/Preferences.h"
 #include "mozilla/StaticPrefs.h"
 #include "MediaContainerType.h"
 #include "nsMimeTypes.h"
 #ifdef XP_WIN
-#include "WMFDecoderModule.h"
+#  include "WMFDecoderModule.h"
 #endif
 #include "nsContentCID.h"
 #include "nsServiceManagerUtils.h"
 #include "mozIGeckoMediaPluginService.h"
 #include "VideoUtils.h"
 #include "mozilla/Services.h"
 #include "nsIObserverService.h"
 #include "mozilla/EMEUtils.h"
@@ -29,19 +29,19 @@
 #include "DecoderDoctorDiagnostics.h"
 #include "WebMDecoder.h"
 #include "mozilla/StaticPtr.h"
 #include "mozilla/ClearOnShutdown.h"
 #include "nsUnicharUtils.h"
 #include "mozilla/dom/MediaSource.h"
 #include "DecoderTraits.h"
 #ifdef MOZ_WIDGET_ANDROID
-#include "AndroidDecoderModule.h"
-#include "FennecJNIWrappers.h"
-#include "GeneratedJNIWrappers.h"
+#  include "AndroidDecoderModule.h"
+#  include "FennecJNIWrappers.h"
+#  include "GeneratedJNIWrappers.h"
 #endif
 #include <functional>
 
 namespace mozilla {
 namespace dom {
 
 NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(MediaKeySystemAccess, mParent)
 NS_IMPL_CYCLE_COLLECTING_ADDREF(MediaKeySystemAccess)
--- a/dom/media/eme/MediaKeySystemAccessManager.cpp
+++ b/dom/media/eme/MediaKeySystemAccessManager.cpp
@@ -7,20 +7,20 @@
 #include "mozilla/EMEUtils.h"
 #include "nsServiceManagerUtils.h"
 #include "nsComponentManagerUtils.h"
 #include "nsIObserverService.h"
 #include "mozilla/Services.h"
 #include "mozilla/StaticPrefs.h"
 #include "mozilla/DetailedPromise.h"
 #ifdef XP_WIN
-#include "mozilla/WindowsVersion.h"
+#  include "mozilla/WindowsVersion.h"
 #endif
 #ifdef XP_MACOSX
-#include "nsCocoaFeatures.h"
+#  include "nsCocoaFeatures.h"
 #endif
 #include "nsPrintfCString.h"
 #include "nsContentUtils.h"
 #include "nsIScriptError.h"
 #include "mozilla/Unused.h"
 #include "nsDataHashtable.h"
 
 namespace mozilla {
--- a/dom/media/eme/MediaKeys.cpp
+++ b/dom/media/eme/MediaKeys.cpp
@@ -11,24 +11,24 @@
 #include "mozilla/dom/MediaKeyMessageEvent.h"
 #include "mozilla/dom/MediaKeyError.h"
 #include "mozilla/dom/MediaKeySession.h"
 #include "mozilla/dom/MediaKeyStatusMap.h"
 #include "mozilla/dom/DOMException.h"
 #include "mozilla/dom/UnionTypes.h"
 #include "mozilla/Telemetry.h"
 #ifdef MOZ_WIDGET_ANDROID
-#include "mozilla/MediaDrmCDMProxy.h"
+#  include "mozilla/MediaDrmCDMProxy.h"
 #endif
 #include "mozilla/EMEUtils.h"
 #include "nsContentUtils.h"
 #include "nsIScriptObjectPrincipal.h"
 #include "nsContentTypeParser.h"
 #ifdef XP_WIN
-#include "mozilla/WindowsVersion.h"
+#  include "mozilla/WindowsVersion.h"
 #endif
 #include "nsContentCID.h"
 #include "nsServiceManagerUtils.h"
 #include "mozilla/dom/MediaKeySystemAccess.h"
 #include "nsPrintfCString.h"
 #include "ChromiumCDMProxy.h"
 
 namespace mozilla {
--- a/dom/media/eme/mediadrm/MediaDrmProxySupport.h
+++ b/dom/media/eme/mediadrm/MediaDrmProxySupport.h
@@ -17,19 +17,19 @@ namespace mozilla {
 enum MediaDrmSessionType {
   kKeyStreaming = 1,
   kKeyOffline = 2,
   kKeyRelease = 3,
 };
 
 #ifndef MDRMN_LOG
 LogModule* GetMDRMNLog();
-#define MDRMN_LOG(x, ...)                          \
-  MOZ_LOG(GetMDRMNLog(), mozilla::LogLevel::Debug, \
-          ("[MediaDrmProxySupport][%s]" x, __FUNCTION__, ##__VA_ARGS__))
+#  define MDRMN_LOG(x, ...)                          \
+    MOZ_LOG(GetMDRMNLog(), mozilla::LogLevel::Debug, \
+            ("[MediaDrmProxySupport][%s]" x, __FUNCTION__, ##__VA_ARGS__))
 #endif
 
 class MediaDrmProxySupport final {
  public:
   explicit MediaDrmProxySupport(const nsAString& aKeySystem);
   ~MediaDrmProxySupport();
 
   /*
--- a/dom/media/encoder/MediaEncoder.cpp
+++ b/dom/media/encoder/MediaEncoder.cpp
@@ -26,22 +26,22 @@
 #include "nsIPrincipal.h"
 #include "nsMimeTypes.h"
 #include "OggWriter.h"
 #include "OpusTrackEncoder.h"
 #include "TimeUnits.h"
 #include "Tracing.h"
 
 #ifdef MOZ_WEBM_ENCODER
-#include "VP8TrackEncoder.h"
-#include "WebMWriter.h"
+#  include "VP8TrackEncoder.h"
+#  include "WebMWriter.h"
 #endif
 
 #ifdef LOG
-#undef LOG
+#  undef LOG
 #endif
 
 mozilla::LazyLogModule gMediaEncoderLog("MediaEncoder");
 #define LOG(type, msg) MOZ_LOG(gMediaEncoderLog, type, msg)
 
 namespace mozilla {
 
 using namespace dom;
--- a/dom/media/fake-cdm/cdm-test-output-protection.h
+++ b/dom/media/fake-cdm/cdm-test-output-protection.h
@@ -1,22 +1,22 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #if defined(XP_WIN)
-#include <d3d9.h>  // needed to prevent re-definition of enums
-#include <stdio.h>
-#include <string>
-#include <vector>
-#include <windows.h>
+#  include <d3d9.h>  // needed to prevent re-definition of enums
+#  include <stdio.h>
+#  include <string>
+#  include <vector>
+#  include <windows.h>
 
-#include "opmapi.h"
+#  include "opmapi.h"
 #endif
 
 namespace mozilla {
 namespace cdmtest {
 
 #if defined(XP_WIN)
 typedef HRESULT(STDAPICALLTYPE* OPMGetVideoOutputsFromHMONITORProc)(
     HMONITOR, OPM_VIDEO_OUTPUT_SEMANTICS, ULONG*, IOPMVideoOutput***);
--- a/dom/media/gmp-plugin-openh264/gmp-fake-openh264.cpp
+++ b/dom/media/gmp-plugin-openh264/gmp-fake-openh264.cpp
@@ -48,19 +48,19 @@
 #include "gmp-video-encode.h"
 #include "gmp-video-decode.h"
 #include "gmp-video-frame-i420.h"
 #include "gmp-video-frame-encoded.h"
 
 #include "mozilla/PodOperations.h"
 
 #if defined(_MSC_VER)
-#define PUBLIC_FUNC __declspec(dllexport)
+#  define PUBLIC_FUNC __declspec(dllexport)
 #else
-#define PUBLIC_FUNC
+#  define PUBLIC_FUNC
 #endif
 
 #define BIG_FRAME 10000
 
 #define GL_CRIT 0
 #define GL_ERROR 1
 #define GL_INFO 2
 #define GL_DEBUG 3
--- a/dom/media/gmp/CDMStorageIdProvider.cpp
+++ b/dom/media/gmp/CDMStorageIdProvider.cpp
@@ -5,17 +5,17 @@
 
 #include "CDMStorageIdProvider.h"
 #include "GMPLog.h"
 #include "nsCOMPtr.h"
 #include "nsComponentManagerUtils.h"
 #include "nsICryptoHash.h"
 
 #ifdef SUPPORT_STORAGE_ID
-#include "rlz/lib/machine_id.h"
+#  include "rlz/lib/machine_id.h"
 #endif
 
 namespace mozilla {
 
 /*static*/ nsCString CDMStorageIdProvider::ComputeStorageId(
     const nsCString& aOriginSalt) {
 #ifndef SUPPORT_STORAGE_ID
   return EmptyCString();
--- a/dom/media/gmp/ChromiumCDMAdapter.cpp
+++ b/dom/media/gmp/ChromiumCDMAdapter.cpp
@@ -9,27 +9,27 @@
 #include "VideoUtils.h"
 #include "gmp-api/gmp-entrypoints.h"
 #include "gmp-api/gmp-video-codec.h"
 #include "WidevineUtils.h"
 #include "GMPLog.h"
 #include "mozilla/Move.h"
 
 #ifdef XP_WIN
-#include "WinUtils.h"
-#include "nsWindowsDllInterceptor.h"
-#include <windows.h>
-#include <strsafe.h>
-#include <unordered_map>
-#include <vector>
+#  include "WinUtils.h"
+#  include "nsWindowsDllInterceptor.h"
+#  include <windows.h>
+#  include <strsafe.h>
+#  include <unordered_map>
+#  include <vector>
 #else
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <fcntl.h>
+#  include <sys/types.h>
+#  include <sys/stat.h>
+#  include <unistd.h>
+#  include <fcntl.h>
 #endif
 
 const GMPPlatformAPI* sPlatform = nullptr;
 
 namespace mozilla {
 
 #ifdef XP_WIN
 static void InitializeHooks();
--- a/dom/media/gmp/GMPChild.cpp
+++ b/dom/media/gmp/GMPChild.cpp
@@ -25,26 +25,26 @@
 #include "base/task.h"
 #include "base/command_line.h"
 #include "ChromiumCDMAdapter.h"
 #include "GMPLog.h"
 
 using namespace mozilla::ipc;
 
 #ifdef XP_WIN
-#include <stdlib.h>  // for _exit()
-#include "WinUtils.h"
+#  include <stdlib.h>  // for _exit()
+#  include "WinUtils.h"
 #else
-#include <unistd.h>  // for _exit()
+#  include <unistd.h>  // for _exit()
 #endif
 
 #if defined(MOZ_GMP_SANDBOX)
-#if defined(XP_MACOSX)
-#include "mozilla/Sandbox.h"
-#endif
+#  if defined(XP_MACOSX)
+#    include "mozilla/Sandbox.h"
+#  endif
 #endif
 
 namespace mozilla {
 
 #undef LOG
 #undef LOGD
 
 extern LogModule* GetGMPLog();
@@ -101,17 +101,17 @@ static bool GetPluginFile(const nsAStrin
   nsAutoString binaryName =
       NS_LITERAL_STRING("lib") + baseName + NS_LITERAL_STRING(".dylib");
 #elif defined(OS_POSIX)
   nsAutoString binaryName =
       NS_LITERAL_STRING("lib") + baseName + NS_LITERAL_STRING(".so");
 #elif defined(XP_WIN)
   nsAutoString binaryName = baseName + NS_LITERAL_STRING(".dll");
 #else
-#error not defined
+#  error not defined
 #endif
   aLibFile->AppendRelativePath(binaryName);
   return true;
 }
 
 static bool GetPluginFile(const nsAString& aPluginPath,
                           nsCOMPtr<nsIFile>& aLibFile) {
   nsCOMPtr<nsIFile> unusedlibDir;
@@ -126,17 +126,17 @@ static nsCString GetNativeTarget(nsIFile
   if (isLink) {
     aFile->GetNativeTarget(path);
   } else {
     aFile->GetNativePath(path);
   }
   return path;
 }
 
-#if defined(MOZ_GMP_SANDBOX)
+#  if defined(MOZ_GMP_SANDBOX)
 static bool GetPluginPaths(const nsAString& aPluginPath,
                            nsCString& aPluginDirectoryPath,
                            nsCString& aPluginFilePath) {
   nsCOMPtr<nsIFile> libDirectory, libFile;
   if (!GetPluginFile(aPluginPath, libDirectory, libFile)) {
     return false;
   }
 
@@ -212,18 +212,18 @@ bool GMPChild::SetMacSandboxInfo(MacSand
   info.pluginInfo.pluginPath.assign(pluginDirectoryPath.get());
   info.pluginInfo.pluginBinaryPath.assign(pluginFilePath.get());
   info.appPath.assign(appPath.get());
   info.appBinaryPath.assign(appBinaryPath.get());
 
   mGMPLoader->SetSandboxInfo(&info);
   return true;
 }
-#endif  // MOZ_GMP_SANDBOX
-#endif  // XP_MACOSX
+#  endif  // MOZ_GMP_SANDBOX
+#endif    // XP_MACOSX
 
 bool GMPChild::Init(const nsAString& aPluginPath, base::ProcessId aParentPid,
                     MessageLoop* aIOLoop, IPC::Channel* aChannel) {
   LOGD("%s pluginPath=%s", __FUNCTION__,
        NS_ConvertUTF16toUTF8(aPluginPath).get());
 
   if (NS_WARN_IF(!Open(aChannel, aParentPid, aIOLoop))) {
     return false;
@@ -325,24 +325,24 @@ bool GMPChild::GetUTF8LibPath(nsACString
   libFile->GetPath(path);
   aOutLibPath = NS_ConvertUTF16toUTF8(path);
 
   return true;
 #endif
 }
 
 #if defined(XP_WIN)
-#define FIREFOX_FILE NS_LITERAL_STRING("firefox.exe")
-#define XUL_LIB_FILE NS_LITERAL_STRING("xul.dll")
+#  define FIREFOX_FILE NS_LITERAL_STRING("firefox.exe")
+#  define XUL_LIB_FILE NS_LITERAL_STRING("xul.dll")
 #elif defined(XP_MACOSX)
-#define FIREFOX_FILE NS_LITERAL_STRING("firefox")
-#define XUL_LIB_FILE NS_LITERAL_STRING("XUL")
+#  define FIREFOX_FILE NS_LITERAL_STRING("firefox")
+#  define XUL_LIB_FILE NS_LITERAL_STRING("XUL")
 #else
-#define FIREFOX_FILE NS_LITERAL_STRING("firefox")
-#define XUL_LIB_FILE NS_LITERAL_STRING("libxul.so")
+#  define FIREFOX_FILE NS_LITERAL_STRING("firefox")
+#  define XUL_LIB_FILE NS_LITERAL_STRING("libxul.so")
 #endif
 
 #if defined(XP_MACOSX)
 static bool GetFirefoxAppPath(nsCOMPtr<nsIFile> aPluginContainerPath,
                               nsCOMPtr<nsIFile>& aOutFirefoxAppPath) {
   // aPluginContainerPath will end with something like:
   // xxxx/NightlyDebug.app/Contents/MacOS/plugin-container.app/Contents/MacOS/plugin-container
   MOZ_ASSERT(aPluginContainerPath);
--- a/dom/media/gmp/GMPContentParent.cpp
+++ b/dom/media/gmp/GMPContentParent.cpp
@@ -12,26 +12,26 @@
 #include "mozIGeckoMediaPluginService.h"
 #include "mozilla/Logging.h"
 #include "mozilla/Unused.h"
 #include "base/task.h"
 
 namespace mozilla {
 
 #ifdef LOG
-#undef LOG
+#  undef LOG
 #endif
 
 extern LogModule* GetGMPLog();
 
 #define LOGD(msg) MOZ_LOG(GetGMPLog(), mozilla::LogLevel::Debug, msg)
 #define LOG(level, msg) MOZ_LOG(GetGMPLog(), (level), msg)
 
 #ifdef __CLASS__
-#undef __CLASS__
+#  undef __CLASS__
 #endif
 #define __CLASS__ "GMPContentParent"
 
 namespace gmp {
 
 GMPContentParent::GMPContentParent(GMPParent* aParent)
     : mParent(aParent), mPluginId(0) {
   if (mParent) {
--- a/dom/media/gmp/GMPCrashHelper.h
+++ b/dom/media/gmp/GMPCrashHelper.h
@@ -1,20 +1,20 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #if !defined(GMPCrashHelper_h_)
-#define GMPCrashHelper_h_
+#  define GMPCrashHelper_h_
 
-#include "MainThreadUtils.h"
-#include "nsISupportsImpl.h"
-#include "nsPIDOMWindow.h"
+#  include "MainThreadUtils.h"
+#  include "nsISupportsImpl.h"
+#  include "nsPIDOMWindow.h"
 
 namespace mozilla {
 
 // For every GMP actor requested, the caller can specify a crash helper,
 // which is an object which supplies the nsPIDOMWindowInner to which we'll
 // dispatch the PluginCrashed event if the GMP crashes.
 // GMPCrashHelper has threadsafe refcounting. Its release method ensures
 // that instances are destroyed on the main thread.
--- a/dom/media/gmp/GMPDiskStorage.cpp
+++ b/dom/media/gmp/GMPDiskStorage.cpp
@@ -16,17 +16,17 @@
 #include "mozIGeckoMediaPluginService.h"
 #include "nsContentCID.h"
 #include "nsServiceManagerUtils.h"
 #include "nsISimpleEnumerator.h"
 
 namespace mozilla {
 
 #ifdef LOG
-#undef LOG
+#  undef LOG
 #endif
 
 extern LogModule* GetGMPLog();
 
 #define LOGD(msg) MOZ_LOG(GetGMPLog(), mozilla::LogLevel::Debug, msg)
 #define LOG(level, msg) MOZ_LOG(GetGMPLog(), (level), msg)
 
 namespace gmp {
--- a/dom/media/gmp/GMPLoader.cpp
+++ b/dom/media/gmp/GMPLoader.cpp
@@ -6,29 +6,29 @@
 
 #include "GMPLoader.h"
 #include <stdio.h>
 #include "mozilla/Attributes.h"
 #include "gmp-entrypoints.h"
 #include "prlink.h"
 #include "prenv.h"
 #if defined(XP_WIN) && defined(MOZ_SANDBOX)
-#include "mozilla/sandboxTarget.h"
-#include "mozilla/sandboxing/SandboxInitialization.h"
-#include "mozilla/sandboxing/sandboxLogging.h"
+#  include "mozilla/sandboxTarget.h"
+#  include "mozilla/sandboxing/SandboxInitialization.h"
+#  include "mozilla/sandboxing/sandboxLogging.h"
 #endif
 #if defined(XP_LINUX) && defined(MOZ_GMP_SANDBOX)
-#include "mozilla/Sandbox.h"
-#include "mozilla/SandboxInfo.h"
+#  include "mozilla/Sandbox.h"
+#  include "mozilla/SandboxInfo.h"
 #endif
 
 #include <string>
 
 #ifdef XP_WIN
-#include "windows.h"
+#  include "windows.h"
 #endif
 
 namespace mozilla {
 namespace gmp {
 class PassThroughGMPAdapter : public GMPAdapter {
  public:
   ~PassThroughGMPAdapter() override {
     // Ensure we're always shutdown, even if caller forgets to call
--- a/dom/media/gmp/GMPLoader.h
+++ b/dom/media/gmp/GMPLoader.h
@@ -8,17 +8,17 @@
 #define GMP_LOADER_H__
 
 #include <stdint.h>
 #include "prlink.h"
 #include "gmp-entrypoints.h"
 #include "mozilla/UniquePtr.h"
 
 #if defined(XP_MACOSX) && defined(MOZ_GMP_SANDBOX)
-#include "mozilla/Sandbox.h"
+#  include "mozilla/Sandbox.h"
 #endif
 
 namespace mozilla {
 namespace gmp {
 
 class SandboxStarter {
  public:
   virtual ~SandboxStarter() {}
--- a/dom/media/gmp/GMPParent.cpp
+++ b/dom/media/gmp/GMPParent.cpp
@@ -17,31 +17,31 @@
 #include "mozilla/ipc/GeckoChildProcessHost.h"
 #include "mozilla/SSE.h"
 #include "mozilla/SyncRunnable.h"
 #include "mozilla/Unused.h"
 #include "nsIObserverService.h"
 #include "GMPTimerParent.h"
 #include "runnable_utils.h"
 #if defined(XP_LINUX) && defined(MOZ_GMP_SANDBOX)
-#include "mozilla/SandboxInfo.h"
+#  include "mozilla/SandboxInfo.h"
 #endif
 #include "CDMStorageIdProvider.h"
 #include "GMPContentParent.h"
 #include "VideoUtils.h"
 
 using mozilla::ipc::GeckoChildProcessHost;
 
 using CrashReporter::AnnotationTable;
 using CrashReporter::GetIDFromMinidump;
 
 #include "mozilla/Telemetry.h"
 
 #ifdef XP_WIN
-#include "WMFDecoderModule.h"
+#  include "WMFDecoderModule.h"
 #endif
 
 #include "mozilla/dom/WidevineCDMManifestBinding.h"
 #include "ChromiumCDMAdapter.h"
 
 namespace mozilla {
 
 #undef LOG
@@ -49,17 +49,17 @@ namespace mozilla {
 
 extern LogModule* GetGMPLog();
 #define LOG(level, x, ...) MOZ_LOG(GetGMPLog(), (level), (x, ##__VA_ARGS__))
 #define LOGD(x, ...)                                                  \
   LOG(mozilla::LogLevel::Debug, "GMPParent[%p|childPid=%d] " x, this, \
       mChildPid, ##__VA_ARGS__)
 
 #ifdef __CLASS__
-#undef __CLASS__
+#  undef __CLASS__
 #endif
 #define __CLASS__ "GMPParent"
 
 namespace gmp {
 
 GMPParent::GMPParent(AbstractThread* aMainThread)
     : mState(GMPStateNotLoaded),
       mProcess(nullptr),
--- a/dom/media/gmp/GMPProcessChild.cpp
+++ b/dom/media/gmp/GMPProcessChild.cpp
@@ -31,17 +31,17 @@ bool GMPProcessChild::Init(int aArgc, ch
   MOZ_ASSERT(values.size() >= 2, "not enough args");
   pluginFilename = NS_ConvertUTF8toUTF16(nsDependentCString(values[1].c_str()));
 #elif defined(OS_WIN)
   std::vector<std::wstring> values =
       CommandLine::ForCurrentProcess()->GetLooseValues();
   MOZ_ASSERT(values.size() >= 1, "not enough loose args");
   pluginFilename = nsDependentString(values[0].c_str());
 #else
-#error Not implemented
+#  error Not implemented
 #endif
 
   BackgroundHangMonitor::Startup();
 
   return mPlugin.Init(pluginFilename, ParentPid(),
                       IOThreadChild::message_loop(), IOThreadChild::channel());
 }
 
--- a/dom/media/gmp/GMPProcessParent.cpp
+++ b/dom/media/gmp/GMPProcessParent.cpp
@@ -4,17 +4,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "GMPProcessParent.h"
 #include "GMPUtils.h"
 #include "nsIFile.h"
 #include "nsIRunnable.h"
 #if defined(XP_WIN) && defined(MOZ_SANDBOX)
-#include "WinUtils.h"
+#  include "WinUtils.h"
 #endif
 #include "GMPLog.h"
 
 #include "base/string_util.h"
 #include "base/process_util.h"
 
 #include <string>
 
--- a/dom/media/gmp/GMPService.cpp
+++ b/dom/media/gmp/GMPService.cpp
@@ -20,17 +20,17 @@
 #include "nsNativeCharsetUtils.h"
 #include "nsIXULAppInfo.h"
 #include "nsIConsoleService.h"
 #include "mozilla/Unused.h"
 #include "nsComponentManagerUtils.h"
 #include "runnable_utils.h"
 #include "VideoUtils.h"
 #if defined(XP_LINUX) && defined(MOZ_GMP_SANDBOX)
-#include "mozilla/SandboxInfo.h"
+#  include "mozilla/SandboxInfo.h"
 #endif
 #include "nsAppDirectoryServiceDefs.h"
 #include "nsDirectoryServiceUtils.h"
 #include "nsDirectoryServiceDefs.h"
 #include "nsHashKeys.h"
 #include "nsIFile.h"
 #include "nsISimpleEnumerator.h"
 #include "nsThreadUtils.h"
@@ -40,29 +40,29 @@
 #include "mozilla/dom/PluginCrashedEvent.h"
 #include "mozilla/EventDispatcher.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/SystemGroup.h"
 
 namespace mozilla {
 
 #ifdef LOG
-#undef LOG
+#  undef LOG
 #endif
 
 LogModule* GetGMPLog() {
   static LazyLogModule sLog("GMP");
   return sLog;
 }
 
 #define LOGD(msg) MOZ_LOG(GetGMPLog(), mozilla::LogLevel::Debug, msg)
 #define LOG(level, msg) MOZ_LOG(GetGMPLog(), (level), msg)
 
 #ifdef __CLASS__
-#undef __CLASS__
+#  undef __CLASS__
 #endif
 #define __CLASS__ "GMPService"
 
 namespace gmp {
 
 static StaticRefPtr<GeckoMediaPluginService> sSingletonService;
 
 class GMPServiceCreateHelper final : public mozilla::Runnable {
--- a/dom/media/gmp/GMPServiceChild.cpp
+++ b/dom/media/gmp/GMPServiceChild.cpp
@@ -19,24 +19,24 @@
 #include "base/task.h"
 #include "nsIObserverService.h"
 #include "nsComponentManagerUtils.h"
 #include "mozilla/SystemGroup.h"
 
 namespace mozilla {
 
 #ifdef LOG
-#undef LOG
+#  undef LOG
 #endif
 
 #define LOGD(msg) MOZ_LOG(GetGMPLog(), mozilla::LogLevel::Debug, msg)
 #define LOG(level, msg) MOZ_LOG(GetGMPLog(), (level), msg)
 
 #ifdef __CLASS__
-#undef __CLASS__
+#  undef __CLASS__
 #endif
 #define __CLASS__ "GMPService"
 
 namespace gmp {
 
 already_AddRefed<GeckoMediaPluginServiceChild>
 GeckoMediaPluginServiceChild::GetSingleton() {
   MOZ_ASSERT(!XRE_IsParentProcess());
--- a/dom/media/gmp/GMPServiceParent.cpp
+++ b/dom/media/gmp/GMPServiceParent.cpp
@@ -23,17 +23,17 @@
 #include "mozilla/Services.h"
 #include "nsNativeCharsetUtils.h"
 #include "nsIConsoleService.h"
 #include "mozilla/Unused.h"
 #include "nsComponentManagerUtils.h"
 #include "runnable_utils.h"
 #include "VideoUtils.h"
 #if defined(XP_LINUX) && defined(MOZ_GMP_SANDBOX)
-#include "mozilla/SandboxInfo.h"
+#  include "mozilla/SandboxInfo.h"
 #endif
 #include "nsAppDirectoryServiceDefs.h"
 #include "nsDirectoryServiceUtils.h"
 #include "nsDirectoryServiceDefs.h"
 #include "nsHashKeys.h"
 #include "nsIFile.h"
 #include "nsISimpleEnumerator.h"
 #include "nsIXULRuntime.h"
@@ -41,24 +41,24 @@
 #include <limits>
 #include "mozilla/SystemGroup.h"
 
 using mozilla::ipc::Transport;
 
 namespace mozilla {
 
 #ifdef LOG
-#undef LOG
+#  undef LOG
 #endif
 
 #define LOGD(msg) MOZ_LOG(GetGMPLog(), mozilla::LogLevel::Debug, msg)
 #define LOG(level, msg) MOZ_LOG(GetGMPLog(), (level), msg)
 
 #ifdef __CLASS__
-#undef __CLASS__
+#  undef __CLASS__
 #endif
 #define __CLASS__ "GMPService"
 
 #define NS_DispatchToMainThread(...) CompileError_UseAbstractMainThreadInstead
 
 namespace gmp {
 
 static const uint32_t NodeIdSaltLength = 32;
--- a/dom/media/gmp/GMPStorageParent.cpp
+++ b/dom/media/gmp/GMPStorageParent.cpp
@@ -7,17 +7,17 @@
 #include "GMPParent.h"
 #include "gmp-storage.h"
 #include "mozilla/Unused.h"
 #include "mozIGeckoMediaPluginService.h"
 
 namespace mozilla {
 
 #ifdef LOG
-#undef LOG
+#  undef LOG
 #endif
 
 extern LogModule* GetGMPLog();
 
 #define LOGD(msg) MOZ_LOG(GetGMPLog(), mozilla::LogLevel::Debug, msg)
 #define LOG(level, msg) MOZ_LOG(GetGMPLog(), (level), msg)
 
 namespace gmp {
--- a/dom/media/gmp/GMPTimerParent.cpp
+++ b/dom/media/gmp/GMPTimerParent.cpp
@@ -6,26 +6,26 @@
 #include "GMPTimerParent.h"
 #include "nsComponentManagerUtils.h"
 #include "mozilla/Unused.h"
 #include "nsAutoPtr.h"
 
 namespace mozilla {
 
 #ifdef LOG
-#undef LOG
+#  undef LOG
 #endif
 
 extern LogModule* GetGMPLog();
 
 #define LOGD(msg) MOZ_LOG(GetGMPLog(), mozilla::LogLevel::Debug, msg)
 #define LOG(level, msg) MOZ_LOG(GetGMPLog(), (level), msg)
 
 #ifdef __CLASS__
-#undef __CLASS__
+#  undef __CLASS__
 #endif
 #define __CLASS__ "GMPParent"
 
 namespace gmp {
 
 GMPTimerParent::GMPTimerParent(nsISerialEventTarget* aGMPEventTarget)
     : mGMPEventTarget(aGMPEventTarget), mIsOpen(true) {}
 
--- a/dom/media/gmp/GMPVideoDecoderChild.cpp
+++ b/dom/media/gmp/GMPVideoDecoderChild.cpp
@@ -193,21 +193,21 @@ bool GMPVideoDecoderChild::Alloc(size_t 
   --mNeedShmemIntrCount;
   if (mPendingDecodeComplete && mNeedShmemIntrCount == 0) {
     mPendingDecodeComplete = false;
     mPlugin->GMPMessageLoop()->PostTask(
         NewRunnableMethod("gmp::GMPVideoDecoderChild::RecvDecodingComplete",
                           this, &GMPVideoDecoderChild::RecvDecodingComplete));
   }
 #else
-#ifdef GMP_SAFE_SHMEM
+#  ifdef GMP_SAFE_SHMEM
   rv = AllocShmem(aSize, aType, aMem);
-#else
+#  else
   rv = AllocUnsafeShmem(aSize, aType, aMem);
-#endif
+#  endif
 #endif
   return rv;
 }
 
 void GMPVideoDecoderChild::Dealloc(Shmem& aMem) {
 #ifndef SHMEM_ALLOC_IN_CHILD
   SendParentShmemForPool(aMem);
 #else
--- a/dom/media/gmp/GMPVideoDecoderParent.cpp
+++ b/dom/media/gmp/GMPVideoDecoderParent.cpp
@@ -14,17 +14,17 @@
 #include "GMPContentParent.h"
 #include "GMPMessageUtils.h"
 #include "mozilla/gmp/GMPTypes.h"
 #include "nsPrintfCString.h"
 
 namespace mozilla {
 
 #ifdef LOG
-#undef LOG
+#  undef LOG
 #endif
 
 extern LogModule* GetGMPLog();
 
 #define LOGV(msg) MOZ_LOG(GetGMPLog(), mozilla::LogLevel::Verbose, msg)
 #define LOGD(msg) MOZ_LOG(GetGMPLog(), mozilla::LogLevel::Debug, msg)
 #define LOGE(msg) MOZ_LOG(GetGMPLog(), mozilla::LogLevel::Error, msg)
 #define LOG(level, msg) MOZ_LOG(GetGMPLog(), (level), msg)
--- a/dom/media/gmp/GMPVideoEncoderChild.cpp
+++ b/dom/media/gmp/GMPVideoEncoderChild.cpp
@@ -185,21 +185,21 @@ bool GMPVideoEncoderChild::Alloc(size_t 
   --mNeedShmemIntrCount;
   if (mPendingEncodeComplete && mNeedShmemIntrCount == 0) {
     mPendingEncodeComplete = false;
     mPlugin->GMPMessageLoop()->PostTask(
         NewRunnableMethod("gmp::GMPVideoEncoderChild::RecvEncodingComplete",
                           this, &GMPVideoEncoderChild::RecvEncodingComplete));
   }
 #else
-#ifdef GMP_SAFE_SHMEM
+#  ifdef GMP_SAFE_SHMEM
   rv = AllocShmem(aSize, aType, aMem);
-#else
+#  else
   rv = AllocUnsafeShmem(aSize, aType, aMem);
-#endif
+#  endif
 #endif
   return rv;
 }
 
 void GMPVideoEncoderChild::Dealloc(Shmem& aMem) {
 #ifndef SHMEM_ALLOC_IN_CHILD
   SendParentShmemForPool(aMem);
 #else
--- a/dom/media/gmp/GMPVideoEncoderParent.cpp
+++ b/dom/media/gmp/GMPVideoEncoderParent.cpp
@@ -17,26 +17,26 @@
 #include "runnable_utils.h"
 #include "GMPUtils.h"
 #include "mozilla/SystemGroup.h"
 #include "GMPCrashHelper.h"
 
 namespace mozilla {
 
 #ifdef LOG
-#undef LOG
+#  undef LOG
 #endif
 
 extern LogModule* GetGMPLog();
 
 #define LOGD(msg) MOZ_LOG(GetGMPLog(), mozilla::LogLevel::Debug, msg)
 #define LOG(level, msg) MOZ_LOG(GetGMPLog(), (level), msg)
 
 #ifdef __CLASS__
-#undef __CLASS__
+#  undef __CLASS__
 #endif
 #define __CLASS__ "GMPVideoEncoderParent"
 
 namespace gmp {
 
 // States:
 // Initial: mIsOpen == false
 //    on InitDecode success -> Open
--- a/dom/media/gtest/GMPTestMonitor.h
+++ b/dom/media/gtest/GMPTestMonitor.h
@@ -2,17 +2,17 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsThreadUtils.h"
 
 #ifndef __GMPTestMonitor_h__
-#define __GMPTestMonitor_h__
+#  define __GMPTestMonitor_h__
 
 class GMPTestMonitor {
  public:
   GMPTestMonitor() : mFinished(false) {}
 
   void AwaitFinished() {
     MOZ_ASSERT(NS_IsMainThread());
     mozilla::SpinEventLoopUntil([&]() { return mFinished; });
--- a/dom/media/hls/HLSDemuxer.h
+++ b/dom/media/hls/HLSDemuxer.h
@@ -1,28 +1,28 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #if !defined(HLSDemuxer_h_)
-#define HLSDemuxer_h_
+#  define HLSDemuxer_h_
 
-#include "GeneratedJNINatives.h"
-#include "GeneratedJNIWrappers.h"
-#include "MediaCodec.h"
-#include "MediaDataDemuxer.h"
-#include "MediaDecoder.h"
-#include "mozilla/Atomics.h"
-#include "mozilla/Maybe.h"
-#include "mozilla/Mutex.h"
-#include "mozilla/TaskQueue.h"
+#  include "GeneratedJNINatives.h"
+#  include "GeneratedJNIWrappers.h"
+#  include "MediaCodec.h"
+#  include "MediaDataDemuxer.h"
+#  include "MediaDecoder.h"
+#  include "mozilla/Atomics.h"
+#  include "mozilla/Maybe.h"
+#  include "mozilla/Mutex.h"
+#  include "mozilla/TaskQueue.h"
 
-#include "VideoUtils.h"
+#  include "VideoUtils.h"
 
 namespace mozilla {
 
 class AbstractThread;
 class MediaResult;
 class HLSTrackDemuxer;
 
 DDLoggedTypeDeclNameAndBase(HLSDemuxer, MediaDataDemuxer);
--- a/dom/media/imagecapture/ImageCapture.h
+++ b/dom/media/imagecapture/ImageCapture.h
@@ -10,17 +10,18 @@
 #include "mozilla/DOMEventTargetHelper.h"
 #include "mozilla/dom/ImageCaptureBinding.h"
 #include "mozilla/Logging.h"
 
 namespace mozilla {
 
 #ifndef IC_LOG
 LogModule* GetICLog();
-#define IC_LOG(...) MOZ_LOG(GetICLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
+#  define IC_LOG(...) \
+    MOZ_LOG(GetICLog(), mozilla::LogLevel::Debug, (__VA_ARGS__))
 #endif
 
 namespace dom {
 
 class Blob;
 class MediaStreamTrack;
 class VideoStreamTrack;
 
--- a/dom/media/ipc/RDDChild.cpp
+++ b/dom/media/ipc/RDDChild.cpp
@@ -4,17 +4,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #include "RDDChild.h"
 
 #include "mozilla/dom/MemoryReportRequest.h"
 #include "mozilla/ipc/CrashReporterHost.h"
 
 #ifdef MOZ_GECKO_PROFILER
-#include "ProfilerParent.h"
+#  include "ProfilerParent.h"
 #endif
 #include "RDDProcessHost.h"
 
 namespace mozilla {
 
 using namespace layers;
 
 RDDChild::RDDChild(RDDProcessHost* aHost) : mHost(aHost), mRDDReady(false) {
--- a/dom/media/ipc/RDDParent.cpp
+++ b/dom/media/ipc/RDDParent.cpp
@@ -1,37 +1,37 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #include "RDDParent.h"
 
 #if defined(XP_WIN)
-#include <process.h>
-#include <dwrite.h>
+#  include <process.h>
+#  include <dwrite.h>
 #endif
 
 #include "mozilla/Assertions.h"
 #include "mozilla/HangDetails.h"
 #include "mozilla/RemoteDecoderManagerChild.h"
 #include "mozilla/RemoteDecoderManagerParent.h"
 #include "mozilla/TimeStamp.h"
 #include "mozilla/dom/MemoryReportRequest.h"
 #include "mozilla/ipc/CrashReporterClient.h"
 #include "mozilla/ipc/ProcessChild.h"
 
 #ifdef MOZ_GECKO_PROFILER
-#include "ChildProfilerController.h"
+#  include "ChildProfilerController.h"
 #endif
 
 #if defined(XP_MACOSX) && defined(MOZ_SANDBOX)
-#include "mozilla/Sandbox.h"
-#include "nsMacUtilsImpl.h"
-#include <Carbon/Carbon.h>  // for CGSSetDenyWindowServerConnections
+#  include "mozilla/Sandbox.h"
+#  include "nsMacUtilsImpl.h"
+#  include <Carbon/Carbon.h>  // for CGSSetDenyWindowServerConnections
 #endif
 
 #include "nsDebugImpl.h"
 #include "nsThreadManager.h"
 #include "ProcessUtils.h"
 
 namespace mozilla {
 
@@ -92,19 +92,19 @@ static void StartRDDMacSandbox() {
   // Activity Monitor will not label the content process as "Not responding"
   // because it's not running a native event loop. See bug 1384336.
   CGSShutdownServerConnections();
 
   // Actual security benefits are only acheived when we additionally deny
   // future connections.
   CGError result = CGSSetDenyWindowServerConnections(true);
   MOZ_DIAGNOSTIC_ASSERT(result == kCGErrorSuccess);
-#if !MOZ_DIAGNOSTIC_ASSERT_ENABLED
+#  if !MOZ_DIAGNOSTIC_ASSERT_ENABLED
   Unused << result;
-#endif
+#  endif
 
   nsAutoCString appPath;
   nsMacUtilsImpl::GetAppPath(appPath);
 
   MacSandboxInfo info;
   info.type = MacSandboxType_Plugin;
   info.shouldLog = Preferences::GetBool("security.sandbox.logging.enabled") ||
                    PR_GetEnv("MOZ_SANDBOX_LOGGING");
--- a/dom/media/ipc/RDDProcessImpl.cpp
+++ b/dom/media/ipc/RDDProcessImpl.cpp
@@ -3,17 +3,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #include "RDDProcessImpl.h"
 
 #include "mozilla/ipc/IOThreadChild.h"
 
 #if defined(OS_WIN) && defined(MOZ_SANDBOX)
-#include "mozilla/sandboxTarget.h"
+#  include "mozilla/sandboxTarget.h"
 #endif
 
 namespace mozilla {
 
 using namespace ipc;
 
 RDDProcessImpl::RDDProcessImpl(ProcessId aParentPid)
     : ProcessChild(aParentPid) {}
--- a/dom/media/ipc/RDDProcessImpl.h
+++ b/dom/media/ipc/RDDProcessImpl.h
@@ -3,17 +3,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #ifndef _include_dom_media_ipc_RDDProcessImpl_h__
 #define _include_dom_media_ipc_RDDProcessImpl_h__
 #include "mozilla/ipc/ProcessChild.h"
 
 #if defined(XP_WIN)
-#include "mozilla/mscom/MainThreadRuntime.h"
+#  include "mozilla/mscom/MainThreadRuntime.h"
 #endif
 
 #include "RDDParent.h"
 
 namespace mozilla {
 
 // This class owns the subprocess instance of a PRDD - which in this case,
 // is a RDDParent. It is instantiated as a singleton in XRE_InitChildProcess.
--- a/dom/media/ipc/RemoteDecoderManagerParent.cpp
+++ b/dom/media/ipc/RemoteDecoderManagerParent.cpp
@@ -1,17 +1,17 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #include "RemoteDecoderManagerParent.h"
 
 #if XP_WIN
-#include <objbase.h>
+#  include <objbase.h>
 #endif
 
 #include "RemoteVideoDecoderParent.h"
 #include "VideoUtils.h"  // for MediaThreadType
 
 namespace mozilla {
 
 StaticRefPtr<nsIThread> sRemoteDecoderManagerParentThread;
--- a/dom/media/ipc/RemoteDecoderModule.cpp
+++ b/dom/media/ipc/RemoteDecoderModule.cpp
@@ -6,17 +6,17 @@
 #include "RemoteDecoderModule.h"
 
 #include "base/thread.h"
 #include "mozilla/dom/ContentChild.h"  // for launching RDD w/ ContentChild
 #include "mozilla/layers/SynchronousTask.h"
 #include "mozilla/StaticPrefs.h"
 
 #ifdef MOZ_AV1
-#include "AOMDecoder.h"
+#  include "AOMDecoder.h"
 #endif
 #include "RemoteDecoderManagerChild.h"
 #include "RemoteMediaDataDecoder.h"
 #include "RemoteVideoDecoderChild.h"
 
 namespace mozilla {
 
 using base::Thread;
--- a/dom/media/ipc/RemoteVideoDecoderParent.cpp
+++ b/dom/media/ipc/RemoteVideoDecoderParent.cpp
@@ -3,17 +3,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #include "RemoteVideoDecoderParent.h"
 
 #include "mozilla/Unused.h"
 
 #ifdef MOZ_AV1
-#include "AOMDecoder.h"
+#  include "AOMDecoder.h"
 #endif
 #include "ImageContainer.h"
 #include "RemoteDecoderManagerParent.h"
 #include "RemoteDecoderModule.h"
 
 namespace mozilla {
 
 using media::TimeUnit;
--- a/dom/media/ipc/VideoDecoderManagerParent.cpp
+++ b/dom/media/ipc/VideoDecoderManagerParent.cpp
@@ -15,17 +15,17 @@
 #include "nsIEventTarget.h"
 #include "nsThreadUtils.h"
 #include "ImageContainer.h"
 #include "mozilla/layers/VideoBridgeChild.h"
 #include "mozilla/layers/ImageDataSerializer.h"
 #include "mozilla/SyncRunnable.h"
 
 #if XP_WIN
-#include <objbase.h>
+#  include <objbase.h>
 #endif
 
 namespace mozilla {
 
 #ifdef XP_WIN
 extern const nsCString GetFoundD3D11BlacklistedDLL();
 extern const nsCString GetFoundD3D9BlacklistedDLL();
 #endif  // XP_WIN
--- a/dom/media/ipc/VideoDecoderParent.cpp
+++ b/dom/media/ipc/VideoDecoderParent.cpp
@@ -8,17 +8,17 @@
 #include "mozilla/layers/CompositorThread.h"
 #include "base/thread.h"
 #include "mozilla/layers/TextureClient.h"
 #include "mozilla/layers/VideoBridgeChild.h"
 #include "mozilla/layers/ImageClient.h"
 #include "MediaInfo.h"
 #include "VideoDecoderManagerParent.h"
 #ifdef XP_WIN
-#include "WMFDecoderModule.h"
+#  include "WMFDecoderModule.h"
 #endif
 
 namespace mozilla {
 
 using base::Thread;
 using media::TimeUnit;
 using namespace ipc;
 using namespace layers;
--- a/dom/media/mediasink/VideoSink.cpp
+++ b/dom/media/mediasink/VideoSink.cpp
@@ -1,18 +1,18 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifdef XP_WIN
 // Include Windows headers required for enabling high precision timers.
-#include "windows.h"
-#include "mmsystem.h"
+#  include "windows.h"
+#  include "mmsystem.h"
 #endif
 
 #include "MediaQueue.h"
 #include "VideoSink.h"
 #include "VideoUtils.h"
 
 #include "mozilla/IntegerPrintfMacros.h"
 #include "mozilla/StaticPrefs.h"
--- a/dom/media/mediasource/ContainerParser.cpp
+++ b/dom/media/mediasource/ContainerParser.cpp
@@ -12,21 +12,21 @@
 #include "mozilla/ErrorResult.h"
 #include "MoofParser.h"
 #include "mozilla/Logging.h"
 #include "mozilla/Maybe.h"
 #include "mozilla/Result.h"
 #include "MediaData.h"
 #include "nsMimeTypes.h"
 #ifdef MOZ_FMP4
-#include "AtomType.h"
-#include "BufferReader.h"
-#include "Index.h"
-#include "MP4Interval.h"
-#include "ByteStream.h"
+#  include "AtomType.h"
+#  include "BufferReader.h"
+#  include "Index.h"
+#  include "MP4Interval.h"
+#  include "ByteStream.h"
 #endif
 #include "nsAutoPtr.h"
 #include "SourceBufferResource.h"
 #include <algorithm>
 
 extern mozilla::LogModule* GetMediaSourceSamplesLog();
 
 #define STRINGIFY(x) #x
--- a/dom/media/mediasource/MediaSource.cpp
+++ b/dom/media/mediasource/MediaSource.cpp
@@ -32,17 +32,17 @@
 #include "nsString.h"
 #include "nsThreadUtils.h"
 #include "mozilla/Logging.h"
 #include "nsServiceManagerUtils.h"
 #include "mozilla/gfx/gfxVars.h"
 #include "mozilla/Sprintf.h"
 
 #ifdef MOZ_WIDGET_ANDROID
-#include "AndroidBridge.h"
+#  include "AndroidBridge.h"
 #endif
 
 struct JSContext;
 class JSObject;
 
 mozilla::LogModule* GetMediaSourceLog() {
   static mozilla::LazyLogModule sLogModule("MediaSource");
   return sLogModule;
--- a/dom/media/mediasource/MediaSourceDemuxer.h
+++ b/dom/media/mediasource/MediaSourceDemuxer.h
@@ -1,25 +1,25 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #if !defined(MediaSourceDemuxer_h_)
-#define MediaSourceDemuxer_h_
+#  define MediaSourceDemuxer_h_
 
-#include "MediaDataDemuxer.h"
-#include "MediaResource.h"
-#include "MediaSource.h"
-#include "TrackBuffersManager.h"
-#include "mozilla/Atomics.h"
-#include "mozilla/Maybe.h"
-#include "mozilla/Monitor.h"
-#include "mozilla/TaskQueue.h"
+#  include "MediaDataDemuxer.h"
+#  include "MediaResource.h"
+#  include "MediaSource.h"
+#  include "TrackBuffersManager.h"
+#  include "mozilla/Atomics.h"
+#  include "mozilla/Maybe.h"
+#  include "mozilla/Monitor.h"
+#  include "mozilla/TaskQueue.h"
 
 namespace mozilla {
 
 class AbstractThread;
 class MediaResult;
 class MediaSourceTrackDemuxer;
 
 DDLoggedTypeDeclNameAndBase(MediaSourceDemuxer, MediaDataDemuxer);
--- a/dom/media/mediasource/SourceBuffer.cpp
+++ b/dom/media/mediasource/SourceBuffer.cpp
@@ -22,17 +22,17 @@
 #include "mozilla/Logging.h"
 #include <time.h>
 #include "TimeUnits.h"
 
 // GetCurrentTime is defined in winbase.h as zero argument macro forwarding to
 // GetTickCount() and conflicts with MediaDecoder::GetCurrentTime
 // implementation.
 #ifdef GetCurrentTime
-#undef GetCurrentTime
+#  undef GetCurrentTime
 #endif
 
 struct JSContext;
 class JSObject;
 
 extern mozilla::LogModule* GetMediaSourceLog();
 extern mozilla::LogModule* GetMediaSourceAPILog();
 
--- a/dom/media/mediasource/TrackBuffersManager.cpp
+++ b/dom/media/mediasource/TrackBuffersManager.cpp
@@ -13,17 +13,17 @@
 #include "mozilla/StaticPrefs.h"
 #include "nsMimeTypes.h"
 #include "SourceBuffer.h"
 #include "SourceBufferResource.h"
 #include "SourceBufferTask.h"
 #include "WebMDemuxer.h"
 
 #ifdef MOZ_FMP4
-#include "MP4Demuxer.h"
+#  include "MP4Demuxer.h"
 #endif
 
 #include <limits>
 
 extern mozilla::LogModule* GetMediaSourceLog();
 
 #define MSE_DEBUG(arg, ...)                                                  \
   DDMOZ_LOG(GetMediaSourceLog(), mozilla::LogLevel::Debug, "(%s)::%s: " arg, \
--- a/dom/media/mp4/MP4Decoder.h
+++ b/dom/media/mp4/MP4Decoder.h
@@ -1,19 +1,19 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #if !defined(MP4Decoder_h_)
-#define MP4Decoder_h_
+#  define MP4Decoder_h_
 
-#include "mozilla/UniquePtr.h"
-#include "nsStringFwd.h"
-#include "nsTArray.h"
+#  include "mozilla/UniquePtr.h"
+#  include "nsStringFwd.h"
+#  include "nsTArray.h"
 
 namespace mozilla {
 
 class MediaContainerType;
 class DecoderDoctorDiagnostics;
 class TrackInfo;
 
 // Decoder that uses a bundled MP4 demuxer and platform decoders to play MP4.
--- a/dom/media/mp4/MP4Demuxer.h
+++ b/dom/media/mp4/MP4Demuxer.h
@@ -1,21 +1,21 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #if !defined(MP4Demuxer_h_)
-#define MP4Demuxer_h_
+#  define MP4Demuxer_h_
 
-#include "mozilla/Maybe.h"
-#include "mozilla/Monitor.h"
-#include "MediaDataDemuxer.h"
-#include "MediaResource.h"
+#  include "mozilla/Maybe.h"
+#  include "mozilla/Monitor.h"
+#  include "MediaDataDemuxer.h"
+#  include "MediaResource.h"
 
 namespace mozilla {
 class MP4TrackDemuxer;
 class ResourceStream;
 
 DDLoggedTypeDeclNameAndBase(MP4Demuxer, MediaDataDemuxer);
 
 class MP4Demuxer : public MediaDataDemuxer,
--- a/dom/media/mp4/MoofParser.cpp
+++ b/dom/media/mp4/MoofParser.cpp
@@ -9,23 +9,23 @@
 #include "MP4Interval.h"
 
 #include "mozilla/CheckedInt.h"
 #include "mozilla/Logging.h"
 
 #if defined(MOZ_FMP4)
 extern mozilla::LogModule* GetDemuxerLog();
 
-#define STRINGIFY(x) #x
-#define TOSTRING(x) STRINGIFY(x)
-#define LOG(name, arg, ...)                          \
-  MOZ_LOG(GetDemuxerLog(), mozilla::LogLevel::Debug, \
-          (TOSTRING(name) "(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
+#  define STRINGIFY(x) #  x
+#  define TOSTRING(x) STRINGIFY(x)
+#  define LOG(name, arg, ...)                          \
+    MOZ_LOG(GetDemuxerLog(), mozilla::LogLevel::Debug, \
+            (TOSTRING(name) "(%p)::%s: " arg, this, __func__, ##__VA_ARGS__))
 #else
-#define LOG(...)
+#  define LOG(...)
 #endif
 
 namespace mozilla {
 
 const uint32_t kKeyIdSize = 16;
 
 bool MoofParser::RebuildFragmentedIndex(const MediaByteRangeSet& aByteRanges) {
   BoxContext context(mSource, aByteRanges);
--- a/dom/media/ogg/OggCodecState.h
+++ b/dom/media/ogg/OggCodecState.h
@@ -1,37 +1,37 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #if !defined(OggCodecState_h_)
-#define OggCodecState_h_
+#  define OggCodecState_h_
 
-#include <ogg/ogg.h>
+#  include <ogg/ogg.h>
 // For MOZ_SAMPLE_TYPE_*
-#include "FlacFrameParser.h"
-#include "VideoUtils.h"
-#include <nsDeque.h>
-#include <nsTArray.h>
-#include <nsClassHashtable.h>
+#  include "FlacFrameParser.h"
+#  include "VideoUtils.h"
+#  include <nsDeque.h>
+#  include <nsTArray.h>
+#  include <nsClassHashtable.h>
 
-#include <theora/theoradec.h>
-#ifdef MOZ_TREMOR
-#include <tremor/ivorbiscodec.h>
-#else
-#include <vorbis/codec.h>
-#endif
+#  include <theora/theoradec.h>
+#  ifdef MOZ_TREMOR
+#    include <tremor/ivorbiscodec.h>
+#  else
+#    include <vorbis/codec.h>
+#  endif
 
 // Uncomment the following to validate that we're predicting the number
 // of Vorbis samples in each packet correctly.
-#define VALIDATE_VORBIS_SAMPLE_CALCULATION
-#ifdef VALIDATE_VORBIS_SAMPLE_CALCULATION
-#include <map>
-#endif
+#  define VALIDATE_VORBIS_SAMPLE_CALCULATION
+#  ifdef VALIDATE_VORBIS_SAMPLE_CALCULATION
+#    include <map>
+#  endif
 
 struct OpusMSDecoder;
 
 namespace mozilla {
 
 class OpusParser;
 
 struct OggPacketDeletePolicy {
@@ -312,22 +312,22 @@ class VorbisState : public OggCodecState
   // packet while being decoded.
   long mPrevVorbisBlockSize;
 
   // Granulepos (end sample) of the last decoded Vorbis packet. This is used
   // to calculate the Vorbis granulepos when we don't find a granulepos to
   // back-propagate from.
   int64_t mGranulepos;
 
-#ifdef VALIDATE_VORBIS_SAMPLE_CALCULATION
+#  ifdef VALIDATE_VORBIS_SAMPLE_CALCULATION
   // When validating that we've correctly predicted Vorbis packets' number
   // of samples, we store each packet's predicted number of samples in this
   // map, and verify we decode the predicted number of samples.
   std::map<ogg_packet*, long> mVorbisPacketSamples;
-#endif
+#  endif
 
   // Records that aPacket is predicted to have aSamples samples.
   // This function has no effect if VALIDATE_VORBIS_SAMPLE_CALCULATION
   // is not defined.
   void RecordVorbisPacketSamples(ogg_packet* aPacket, long aSamples);
 
   // Verifies that aPacket has had its number of samples predicted.
   // This function has no effect if VALIDATE_VORBIS_SAMPLE_CALCULATION
@@ -430,17 +430,17 @@ class OpusState : public OggCodecState {
   // where we may need to trim some samples from the end.
   int64_t mPrevPageGranulepos;
   AudioInfo mInfo;
   OggPacketQueue mHeaders;
 };
 
 // Constructs a 32bit version number out of two 16 bit major,minor
 // version numbers.
-#define SKELETON_VERSION(major, minor) (((major) << 16) | (minor))
+#  define SKELETON_VERSION(major, minor) (((major) << 16) | (minor))
 
 enum EMsgHeaderType {
   eContentType,
   eRole,
   eName,
   eLanguage,
   eTitle,
   eDisplayHint,
--- a/dom/media/ogg/OggCodecStore.h
+++ b/dom/media/ogg/OggCodecStore.h
@@ -1,21 +1,21 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #if !defined(OggCodecStore_h_)
-#define OggCodecStore_h_
+#  define OggCodecStore_h_
 
-#include <ogg/ogg.h>
+#  include <ogg/ogg.h>
 
-#include "OggCodecState.h"
-#include "VideoUtils.h"
-#include "mozilla/Monitor.h"
+#  include "OggCodecState.h"
+#  include "VideoUtils.h"
+#  include "mozilla/Monitor.h"
 
 namespace mozilla {
 
 // Thread safe container to store the codec information and the serial for each
 // streams.
 class OggCodecStore {
  public:
   OggCodecStore();
--- a/dom/media/ogg/OggDecoder.h
+++ b/dom/media/ogg/OggDecoder.h
@@ -1,18 +1,18 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 #if !defined(OggDecoder_h_)
-#define OggDecoder_h_
+#  define OggDecoder_h_
 
-#include "mozilla/UniquePtr.h"
-#include "nsTArray.h"
+#  include "mozilla/UniquePtr.h"
+#  include "nsTArray.h"
 
 namespace mozilla {
 
 class MediaContainerType;
 class TrackInfo;
<