Bug 1508472 - Part 4: Fourth batch of comment fix-ups in preparation for the tree reformat r=sylvestre
authorEhsan Akhgari <ehsan@mozilla.com>
Wed, 28 Nov 2018 09:16:55 +0000
changeset 507697 b4662b6db1b34414494d070e33481193625403d1
parent 507696 628d20bae43fbdfcf6ec3cee2c34cf3dd42626a6
child 507698 0354843436646c05cf3eac5059b65a4bb03e3a6a
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssylvestre
bugs1508472
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1508472 - Part 4: Fourth batch of comment fix-ups in preparation for the tree reformat r=sylvestre This is a best effort attempt at ensuring that the adverse impact of reformatting the entire tree over the comments would be minimal. I've used a combination of strategies including disabling of formatting, some manual formatting and some changes to formatting to work around some clang-format limitations. Differential Revision: https://phabricator.services.mozilla.com/D13193
gfx/gl/GLContextSymbols.h
gfx/gl/GLContextTypes.cpp
gfx/gl/GLScreenBuffer.cpp
gfx/gl/GLScreenBuffer.h
gfx/gl/GLTextureImage.cpp
gfx/gl/GLTextureImage.h
gfx/gl/GLUploadHelpers.cpp
gfx/gl/GLUploadHelpers.h
gfx/gl/MozFramebuffer.cpp
gfx/gl/MozFramebuffer.h
gfx/gl/SharedSurface.cpp
gfx/gl/SharedSurface.h
gfx/gl/SharedSurfaceANGLE.cpp
gfx/gl/SharedSurfaceANGLE.h
gfx/gl/SharedSurfaceD3D11Interop.cpp
gfx/gl/SharedSurfaceD3D11Interop.h
gfx/gl/SharedSurfaceEGL.cpp
gfx/gl/SharedSurfaceEGL.h
gfx/gl/SharedSurfaceGL.cpp
gfx/gl/SharedSurfaceGL.h
gfx/gl/SharedSurfaceGLX.cpp
gfx/gl/SharedSurfaceGLX.h
gfx/gl/SharedSurfaceIO.cpp
gfx/gl/SharedSurfaceIO.h
gfx/gl/SkiaGLGlue.cpp
gfx/gl/SkiaGLGlue.h
gfx/gl/SurfaceTypes.cpp
gfx/gl/SurfaceTypes.h
gfx/gl/WGLLibrary.h
gfx/layers/Layers.cpp
gfx/layers/Layers.h
gfx/layers/TextureSync.cpp
gfx/layers/apz/src/APZCTreeManager.h
gfx/layers/apz/src/Axis.h
gfx/layers/apz/src/FocusState.h
gfx/layers/apz/src/InputBlockState.h
gfx/layers/apz/test/gtest/TestHitTesting.cpp
gfx/layers/composite/AsyncCompositionManager.cpp
gfx/layers/composite/Diagnostics.cpp
gfx/layers/composite/FPSCounter.h
gfx/layers/composite/LayerManagerComposite.h
gfx/layers/composite/TiledContentHost.cpp
gfx/layers/ipc/ImageBridgeChild.h
gfx/layers/ipc/UiCompositorControllerMessageTypes.h
gfx/layers/opengl/GLBlitTextureImageHelper.h
gfx/layers/wr/ClipManager.cpp
gfx/layers/wr/WebRenderCommandBuilder.cpp
gfx/src/nsRect.h
gfx/src/nsRegion.cpp
gfx/thebes/gfxASurface.cpp
gfx/thebes/gfxAlphaRecovery.h
gfx/thebes/gfxBlur.h
gfx/thebes/gfxCoreTextShaper.cpp
gfx/thebes/gfxFont.cpp
gfx/thebes/gfxFontUtils.cpp
gfx/thebes/gfxLineSegment.h
gfx/thebes/gfxPlatform.cpp
gfx/thebes/gfxPrefs.h
gfx/thebes/gfxTextRun.cpp
gfx/thebes/gfxTextRun.h
gfx/thebes/gfxTypes.h
gfx/vr/external_api/moz_external_vr.h
gfx/webrender_bindings/RenderCompositorANGLE.cpp
gfx/webrender_bindings/WebRenderAPI.cpp
image/Decoder.h
image/RasterImage.h
image/SurfaceCache.h
intl/unicharutil/util/nsBidiUtils.h
intl/unicharutil/util/nsUnicodeProperties.cpp
ipc/glue/CrossProcessMutex.h
ipc/glue/GeckoChildProcessHost.cpp
ipc/glue/MessageChannel.cpp
ipc/glue/MessageChannel.h
js/xpconnect/loader/AutoMemMap.h
js/xpconnect/loader/PrecompiledScript.h
js/xpconnect/loader/ScriptCacheActors.h
js/xpconnect/loader/ScriptPreloader-inl.h
js/xpconnect/loader/ScriptPreloader.h
js/xpconnect/loader/URLPreloader.h
js/xpconnect/wrappers/XrayWrapper.cpp
media/gmp-clearkey/0.1/WMFH264Decoder.cpp
media/webrtc/signaling/src/common/Wrapper.h
media/webrtc/signaling/src/media-conduit/AudioConduit.h
media/webrtc/signaling/src/media-conduit/MediaConduitInterface.h
media/webrtc/signaling/src/media-conduit/VideoConduit.h
media/webrtc/signaling/src/mediapipeline/RtpLogger.h
media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.cpp
media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
mfbt/Attributes.h
mfbt/Move.h
mfbt/Span.h
mfbt/ThreadSafeWeakPtr.h
mfbt/WrappingOperations.h
--- a/gfx/gl/GLContextSymbols.h
+++ b/gfx/gl/GLContextSymbols.h
@@ -1,9 +1,9 @@
-/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
+/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*- */
 /* 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 GLCONTEXTSYMBOLS_H_
 #define GLCONTEXTSYMBOLS_H_
 
 #include "GLDefs.h"
--- a/gfx/gl/GLContextTypes.cpp
+++ b/gfx/gl/GLContextTypes.cpp
@@ -1,9 +1,9 @@
-/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
+/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*- */
 /* 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 "GLContextTypes.h"
 #include <cstring>
 
 using namespace mozilla::gl;
--- a/gfx/gl/GLScreenBuffer.cpp
+++ b/gfx/gl/GLScreenBuffer.cpp
@@ -1,9 +1,9 @@
-/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
+/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*- */
 /* 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 "GLScreenBuffer.h"
 
 #include <cstring>
 #include "CompositorTypes.h"
--- a/gfx/gl/GLScreenBuffer.h
+++ b/gfx/gl/GLScreenBuffer.h
@@ -1,9 +1,9 @@
-/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
+/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*- */
 /* 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/. */
 
 /* GLScreenBuffer is the abstraction for the "default framebuffer" used
  * by an offscreen GLContext. Since it's only for offscreen GLContext's,
  * it's only useful for things like WebGL, and is NOT used by the
  * compositor's GLContext. Remember that GLContext provides an abstraction
--- a/gfx/gl/GLTextureImage.cpp
+++ b/gfx/gl/GLTextureImage.cpp
@@ -1,9 +1,9 @@
-/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
+/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*- */
 /* 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 "GLTextureImage.h"
 #include "GLContext.h"
 #include "gfxContext.h"
 #include "gfxPlatform.h"
--- a/gfx/gl/GLTextureImage.h
+++ b/gfx/gl/GLTextureImage.h
@@ -1,9 +1,9 @@
-/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
+/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*- */
 /* 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 GLTEXTUREIMAGE_H_
 #define GLTEXTUREIMAGE_H_
 
 #include "nsRegion.h"
--- a/gfx/gl/GLUploadHelpers.cpp
+++ b/gfx/gl/GLUploadHelpers.cpp
@@ -1,9 +1,9 @@
-/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
+/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*- */
 /* 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 "GLUploadHelpers.h"
 
 #include "GLContext.h"
 #include "mozilla/gfx/2D.h"
--- a/gfx/gl/GLUploadHelpers.h
+++ b/gfx/gl/GLUploadHelpers.h
@@ -1,9 +1,9 @@
-/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
+/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*- */
 /* 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 GLUploadHelpers_h_
 #define GLUploadHelpers_h_
 
 #include "GLDefs.h"
--- a/gfx/gl/MozFramebuffer.cpp
+++ b/gfx/gl/MozFramebuffer.cpp
@@ -1,9 +1,9 @@
-/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
+/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*- */
 /* 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 "MozFramebuffer.h"
 
 #include "GLContext.h"
 #include "mozilla/gfx/Logging.h"
--- a/gfx/gl/MozFramebuffer.h
+++ b/gfx/gl/MozFramebuffer.h
@@ -1,9 +1,9 @@
-/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
+/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*- */
 /* 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 MOZ_FRAMEBUFFER_H_
 #define MOZ_FRAMEBUFFER_H_
 
 #include "gfx2DGlue.h"
--- a/gfx/gl/SharedSurface.cpp
+++ b/gfx/gl/SharedSurface.cpp
@@ -1,9 +1,9 @@
-/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
+/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*- */
 /* 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 "SharedSurface.h"
 
 #include "../2d/2D.h"
 #include "GLBlitHelper.h"
--- a/gfx/gl/SharedSurface.h
+++ b/gfx/gl/SharedSurface.h
@@ -1,9 +1,9 @@
-/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
+/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*- */
 /* 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/. */
 
 /* SharedSurface abstracts an actual surface (can be a GL texture, but
  * not necessarily) that handles sharing.
  * Its specializations are:
  *     SharedSurface_Basic (client-side bitmap, does readback)
--- a/gfx/gl/SharedSurfaceANGLE.cpp
+++ b/gfx/gl/SharedSurfaceANGLE.cpp
@@ -1,9 +1,9 @@
-/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
+/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*- */
 /* 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 "SharedSurfaceANGLE.h"
 
 #include <d3d11.h>
 #include "GLContextEGL.h"
--- a/gfx/gl/SharedSurfaceANGLE.h
+++ b/gfx/gl/SharedSurfaceANGLE.h
@@ -1,9 +1,9 @@
-/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
+/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*- */
 /* 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 SHARED_SURFACE_ANGLE_H_
 #define SHARED_SURFACE_ANGLE_H_
 
 #include <windows.h>
--- a/gfx/gl/SharedSurfaceD3D11Interop.cpp
+++ b/gfx/gl/SharedSurfaceD3D11Interop.cpp
@@ -1,9 +1,9 @@
-/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
+/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*- */
 /* 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 "SharedSurfaceD3D11Interop.h"
 
 #include <d3d11.h>
 #include <d3d11_1.h>
@@ -24,28 +24,30 @@ Example: Render to Direct3D 11 backbuffe
 ID3D11Device *device;
 ID3D11DeviceContext *devCtx;
 IDXGISwapChain *swapChain;
 
 DXGI_SWAP_CHAIN_DESC scd;
 
 <set appropriate swap chain parameters in scd>
 
-hr = D3D11CreateDeviceAndSwapChain(NULL,                        // pAdapter
-                                   D3D_DRIVER_TYPE_HARDWARE,    // DriverType
-                                   NULL,                        // Software
-                                   0,                           // Flags (Do not set D3D11_CREATE_DEVICE_SINGLETHREADED)
-                                   NULL,                        // pFeatureLevels
-                                   0,                           // FeatureLevels
-                                   D3D11_SDK_VERSION,           // SDKVersion
-                                   &scd,                        // pSwapChainDesc
-                                   &swapChain,                  // ppSwapChain
-                                   &device,                     // ppDevice
-                                   NULL,                        // pFeatureLevel
-                                   &devCtx);                    // ppImmediateContext
+hr = D3D11CreateDeviceAndSwapChain(
+         NULL,                        // pAdapter
+         D3D_DRIVER_TYPE_HARDWARE,    // DriverType
+         NULL,                        // Software
+         0,                           // Flags (Do not set
+                                      // D3D11_CREATE_DEVICE_SINGLETHREADED)
+         NULL,                        // pFeatureLevels
+         0,                           // FeatureLevels
+         D3D11_SDK_VERSION,           // SDKVersion
+         &scd,                        // pSwapChainDesc
+         &swapChain,                  // ppSwapChain
+         &device,                     // ppDevice
+         NULL,                        // pFeatureLevel
+         &devCtx);                    // ppImmediateContext
 
 // Fetch the swapchain backbuffer
 ID3D11Texture2D *dxColorbuffer;
 swapChain->GetBuffer(0, __uuidof(ID3D11Texture2D), (LPVOID *)&dxColorbuffer);
 
 // Create depth stencil texture
 ID3D11Texture2D *dxDepthBuffer;
 D3D11_TEXTURE2D_DESC depthDesc;
--- a/gfx/gl/SharedSurfaceD3D11Interop.h
+++ b/gfx/gl/SharedSurfaceD3D11Interop.h
@@ -1,9 +1,9 @@
-/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
+/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*- */
 /* 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 SHARED_SURFACE_D3D11_INTEROP_H_
 #define SHARED_SURFACE_D3D11_INTEROP_H_
 
 #include <windows.h>
--- a/gfx/gl/SharedSurfaceEGL.cpp
+++ b/gfx/gl/SharedSurfaceEGL.cpp
@@ -1,9 +1,9 @@
-/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
+/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*- */
 /* 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 "SharedSurfaceEGL.h"
 
 #include "GLBlitHelper.h"
 #include "GLContextEGL.h"
--- a/gfx/gl/SharedSurfaceEGL.h
+++ b/gfx/gl/SharedSurfaceEGL.h
@@ -1,9 +1,9 @@
-/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
+/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*- */
 /* 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 SHARED_SURFACE_EGL_H_
 #define SHARED_SURFACE_EGL_H_
 
 #include "mozilla/Attributes.h"
--- a/gfx/gl/SharedSurfaceGL.cpp
+++ b/gfx/gl/SharedSurfaceGL.cpp
@@ -1,9 +1,9 @@
-/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
+/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*- */
 /* 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 "SharedSurfaceGL.h"
 
 #include "GLBlitHelper.h"
 #include "GLContext.h"
--- a/gfx/gl/SharedSurfaceGL.h
+++ b/gfx/gl/SharedSurfaceGL.h
@@ -1,9 +1,9 @@
-/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
+/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*- */
 /* 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 SHARED_SURFACE_GL_H_
 #define SHARED_SURFACE_GL_H_
 
 #include "ScopedGLHelpers.h"
--- a/gfx/gl/SharedSurfaceGLX.cpp
+++ b/gfx/gl/SharedSurfaceGLX.cpp
@@ -1,9 +1,9 @@
-/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
+/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*- */
 /* 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 "SharedSurfaceGLX.h"
 #include "gfxXlibSurface.h"
 #include "GLXLibrary.h"
 #include "GLContextProvider.h"
--- a/gfx/gl/SharedSurfaceGLX.h
+++ b/gfx/gl/SharedSurfaceGLX.h
@@ -1,9 +1,9 @@
-/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
+/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*- */
 /* 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 SHARED_SURFACE_GLX_H_
 #define SHARED_SURFACE_GLX_H_
 
 #include "SharedSurface.h"
--- a/gfx/gl/SharedSurfaceIO.cpp
+++ b/gfx/gl/SharedSurfaceIO.cpp
@@ -1,9 +1,9 @@
-/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
+/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*- */
 /* 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 "SharedSurfaceIO.h"
 
 #include "GLContextCGL.h"
 #include "mozilla/DebugOnly.h"
--- a/gfx/gl/SharedSurfaceIO.h
+++ b/gfx/gl/SharedSurfaceIO.h
@@ -1,9 +1,9 @@
-/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
+/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*- */
 /* 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 SHARED_SURFACEIO_H_
 #define SHARED_SURFACEIO_H_
 
 #include "mozilla/RefPtr.h"
--- a/gfx/gl/SkiaGLGlue.cpp
+++ b/gfx/gl/SkiaGLGlue.cpp
@@ -1,9 +1,9 @@
-/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
+/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*- */
 /* 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 "skia/include/gpu/GrContext.h"
 #include "skia/include/gpu/gl/GrGLInterface.h"
 #include "mozilla/gfx/2D.h"
 #include "mozilla/ThreadLocal.h"
--- a/gfx/gl/SkiaGLGlue.h
+++ b/gfx/gl/SkiaGLGlue.h
@@ -1,9 +1,9 @@
-/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
+/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*- */
 /* 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 SKIA_GL_GLUE_H_
 #define SKIA_GL_GLUE_H_
 
 #ifdef USE_SKIA_GPU
--- a/gfx/gl/SurfaceTypes.cpp
+++ b/gfx/gl/SurfaceTypes.cpp
@@ -1,9 +1,9 @@
-/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
+/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*- */
 /* 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 "SurfaceTypes.h"
 
 #include "mozilla/layers/TextureForwarder.h"
 
--- a/gfx/gl/SurfaceTypes.h
+++ b/gfx/gl/SurfaceTypes.h
@@ -1,9 +1,9 @@
-/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40; -*- */
+/* -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*- */
 /* 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 SURFACE_TYPES_H_
 #define SURFACE_TYPES_H_
 
 #include "mozilla/RefPtr.h"
--- a/gfx/gl/WGLLibrary.h
+++ b/gfx/gl/WGLLibrary.h
@@ -61,19 +61,22 @@ public:
         HDC  (GLAPIENTRY * fGetPbufferDC) (HANDLE hPbuffer);
         int  (GLAPIENTRY * fReleasePbufferDC) (HANDLE hPbuffer, HDC dc);
         //BOOL (GLAPIENTRY * fBindTexImage) (HANDLE hPbuffer, int iBuffer);
         //BOOL (GLAPIENTRY * fReleaseTexImage) (HANDLE hPbuffer, int iBuffer);
         BOOL (GLAPIENTRY * fChoosePixelFormat) (HDC hdc, const int* piAttribIList,
                                                 const FLOAT* pfAttribFList,
                                                 UINT nMaxFormats, int* piFormats,
                                                 UINT* nNumFormats);
-        //BOOL (GLAPIENTRY * fGetPixelFormatAttribiv) (HDC hdc, int iPixelFormat,
-        //                                             int iLayerPlane, UINT nAttributes,
-        //                                             int* piAttributes, int* piValues);
+        //BOOL (GLAPIENTRY * fGetPixelFormatAttribiv) (HDC hdc,
+        //                                             int iPixelFormat,
+        //                                             int iLayerPlane,
+        //                                             UINT nAttributes,
+        //                                             int* piAttributes,
+        //                                             int* piValues);
         const char* (GLAPIENTRY * fGetExtensionsStringARB) (HDC hdc);
         HGLRC (GLAPIENTRY * fCreateContextAttribsARB) (HDC hdc, HGLRC hShareContext,
                                                        const int* attribList);
         // WGL_NV_DX_interop:
         BOOL   (GLAPIENTRY * fDXSetResourceShareHandleNV) (void* dxObject,
                                                            HANDLE shareHandle);
         HANDLE (GLAPIENTRY * fDXOpenDeviceNV) (void* dxDevice);
         BOOL   (GLAPIENTRY * fDXCloseDeviceNV) (HANDLE hDevice);
--- a/gfx/layers/Layers.cpp
+++ b/gfx/layers/Layers.cpp
@@ -1464,27 +1464,29 @@ RefLayer::FillSpecificAttributes(Specifi
  *
  * To save resources, the buffer is allocated on first call to StartFrameTimeRecording
  * and recording is paused if no consumer which called StartFrameTimeRecording is able
  * to get valid results (because the cyclic buffer was overwritten since that call).
  *
  * To determine availability of the data upon StopFrameTimeRecording:
  * - mRecording.mNextIndex increases on each RecordFrame, and never resets.
  * - Cyclic buffer position is realized as mNextIndex % bufferSize.
- * - StartFrameTimeRecording returns mNextIndex. When StopFrameTimeRecording is called,
- *   the required start index is passed as an arg, and we're able to calculate the required
- *   length. If this length is bigger than bufferSize, it means data was overwritten.
- *   otherwise, we can return the entire sequence.
- * - To determine if we need to pause, mLatestStartIndex is updated to mNextIndex
- *   on each call to StartFrameTimeRecording. If this index gets overwritten,
- *   it means that all earlier start indices obtained via StartFrameTimeRecording
- *   were also overwritten, hence, no point in recording, so pause.
- * - mCurrentRunStartIndex indicates the oldest index of the recording after which
- *   the recording was not paused. If StopFrameTimeRecording is invoked with a start index
- *   older than this, it means that some frames were not recorded, so data is invalid.
+ * - StartFrameTimeRecording returns mNextIndex. When StopFrameTimeRecording is
+ *   called, the required start index is passed as an arg, and we're able to
+ *   calculate the required length. If this length is bigger than bufferSize, it
+ *   means data was overwritten.  otherwise, we can return the entire sequence.
+ * - To determine if we need to pause, mLatestStartIndex is updated to
+ *   mNextIndex on each call to StartFrameTimeRecording. If this index gets
+ *   overwritten, it means that all earlier start indices obtained via
+ *   StartFrameTimeRecording were also overwritten, hence, no point in
+ *   recording, so pause.
+ * - mCurrentRunStartIndex indicates the oldest index of the recording after
+ *   which the recording was not paused. If StopFrameTimeRecording is invoked
+ *   with a start index older than this, it means that some frames were not
+ *   recorded, so data is invalid.
  */
 uint32_t
 FrameRecorder::StartFrameTimeRecording(int32_t aBufferSize)
 {
   if (mRecording.mIsPaused) {
     mRecording.mIsPaused = false;
 
     if (!mRecording.mIntervals.Length()) { // Initialize recording buffers
--- a/gfx/layers/Layers.h
+++ b/gfx/layers/Layers.h
@@ -126,22 +126,28 @@ class DidCompositeObserver {
 };
 
 class FrameRecorder {
 public:
   /**
    * Record (and return) frame-intervals and paint-times for frames which were presented
    *   between calling StartFrameTimeRecording and StopFrameTimeRecording.
    *
-   * - Uses a cyclic buffer and serves concurrent consumers, so if Stop is called too late
-   *     (elements were overwritten since Start), result is considered invalid and hence empty.
-   * - Buffer is capable of holding 10 seconds @ 60fps (or more if frames were less frequent).
-   *     Can be changed (up to 1 hour) via pref: toolkit.framesRecording.bufferSize.
-   * - Note: the first frame-interval may be longer than expected because last frame
-   *     might have been presented some time before calling StartFrameTimeRecording.
+   * - Uses a cyclic buffer and serves concurrent consumers, so if Stop is
+   *   called too late
+   *     (elements were overwritten since Start), result is considered invalid
+   *      and hence empty.)
+   * - Buffer is capable of holding 10 seconds @ 60fps (or more if frames were
+   *   less frequent).
+   *     Can be changed (up to 1 hour) via pref:
+   *     toolkit.framesRecording.bufferSize.
+   * - Note: the first frame-interval may be longer than expected because last
+   *   frame
+   *     might have been presented some time before calling
+   *     StartFrameTimeRecording.
    */
 
   /**
    * Returns a handle which represents current recording start position.
    */
   virtual uint32_t StartFrameTimeRecording(int32_t aBufferSize);
 
   /**
--- a/gfx/layers/TextureSync.cpp
+++ b/gfx/layers/TextureSync.cpp
@@ -84,18 +84,19 @@ WaitForTextureIdsToUnlock(pid_t pid, con
       if (allCleared) {
         return true;
       }
 
       if (lock.Wait(TimeDuration::FromMilliseconds(kTextureLockTimeout)) == CVStatus::Timeout) {
         return false;
       }
 
-      // In case the monitor gets signaled multiple times, each less than kTextureLockTimeout.
-      // This ensures that the total time we wait is < 2 * kTextureLockTimeout
+      // In case the monitor gets signaled multiple times, each less than
+      // kTextureLockTimeout.  This ensures that the total time we wait is
+      // < 2 * kTextureLockTimeout
       if ((TimeStamp::Now() - start).ToMilliseconds() > (double)kTextureLockTimeout) {
         return false;
       }
     }
   }
 }
 
 void
@@ -280,9 +281,9 @@ TextureSync::CleanupForPid(base::Process
     std::unordered_set<uint64_t>* lockedTextureIds = GetLockedTextureIdsForProcess(aProcessId);
     lockedTextureIds->clear();
   }
   gTextureLockMonitor.NotifyAll();
 }
 
 } // namespace layers
 
-} // namespace mozilla
\ No newline at end of file
+} // namespace mozilla
--- a/gfx/layers/apz/src/APZCTreeManager.h
+++ b/gfx/layers/apz/src/APZCTreeManager.h
@@ -116,17 +116,18 @@ struct ScrollThumbData;
  * The other functions on this class are used by various pieces of client code to
  * notify the APZC instances of events relevant to them. This includes, for example,
  * user input events that drive panning and zooming, changes to the scroll viewport
  * area, and changes to pan/zoom constraints.
  *
  * Note that the ClearTree function MUST be called when this class is no longer needed;
  * see the method documentation for details.
  *
- * Behaviour of APZ is controlled by a number of preferences shown \ref APZCPrefs "here".
+ * Behaviour of APZ is controlled by a number of preferences shown
+ * \ref APZCPrefs "here".
  */
 class APZCTreeManager : public IAPZCTreeManager
                       , public APZInputBridge {
 
   typedef mozilla::layers::AllowedTouchBehavior AllowedTouchBehavior;
   typedef mozilla::layers::AsyncDragMetrics AsyncDragMetrics;
 
   // Helper struct to hold some state while we build the hit-testing tree. The
@@ -180,22 +181,23 @@ public:
    * Preserve nodes and APZC instances where possible, but retire those whose
    * layers are no longer in the layer tree.
    *
    * This must be called on the updater thread as it walks the layer tree.
    *
    * @param aRootLayerTreeId The layer tree ID of the root layer corresponding
    *                         to this APZCTreeManager
    * @param aRoot The root of the (full) layer tree
-   * @param aFirstPaintLayersId The layers id of the subtree to which aIsFirstPaint
-   *                            applies.
-   * @param aIsFirstPaint True if the layers update that this is called in response
-   *                      to included a first-paint. If this is true, the part of
-   *                      the tree that is affected by the first-paint flag is
-   *                      indicated by the aFirstPaintLayersId parameter.
+   * @param aFirstPaintLayersId The layers id of the subtree to which
+   *                            aIsFirstPaint applies.
+   * @param aIsFirstPaint True if the layers update that this is called in
+   *                      response to included a first-paint. If this is true,
+   *                      the part of the tree that is affected by the
+   *                      first-paint flag is indicated by the
+   *                      aFirstPaintLayersId parameter.
    * @param aPaintSequenceNumber The sequence number of the paint that triggered
    *                             this layer update. Note that every layer child
    *                             process' layer subtree has its own sequence
    *                             numbers.
    */
   void UpdateHitTestingTree(LayersId aRootLayerTreeId,
                             Layer* aRoot,
                             bool aIsFirstPaint,
@@ -420,23 +422,30 @@ public:
    * Say B is scroll-grabbing.
    * The touch events go to C because it's the innermost one (so e.g. taps
    * should go through C), but the overscroll handoff chain is B -> C -> A
    * because B is scroll-grabbing.
    * For convenience I'll refer to the three APZC objects as A, B, and C, and
    * to the tree manager object as TM.
    * Here's what happens when C receives a touch-move event:
    *   - C.TrackTouch() calls TM.DispatchScroll() with index = 0.
-   *   - TM.DispatchScroll() calls B.AttemptScroll() (since B is at index 0 in the chain).
-   *   - B.AttemptScroll() scrolls B. If there is overscroll, it calls TM.DispatchScroll() with index = 1.
-   *   - TM.DispatchScroll() calls C.AttemptScroll() (since C is at index 1 in the chain)
-   *   - C.AttemptScroll() scrolls C. If there is overscroll, it calls TM.DispatchScroll() with index = 2.
-   *   - TM.DispatchScroll() calls A.AttemptScroll() (since A is at index 2 in the chain)
-   *   - A.AttemptScroll() scrolls A. If there is overscroll, it calls TM.DispatchScroll() with index = 3.
-   *   - TM.DispatchScroll() discards the rest of the scroll as there are no more elements in the chain.
+   *   - TM.DispatchScroll() calls B.AttemptScroll() (since B is at index 0 in
+   *     the chain).
+   *   - B.AttemptScroll() scrolls B. If there is overscroll, it calls
+   *     TM.DispatchScroll() with index = 1.
+   *   - TM.DispatchScroll() calls C.AttemptScroll() (since C is at index 1 in
+   *     the chain)
+   *   - C.AttemptScroll() scrolls C. If there is overscroll, it calls
+   *     TM.DispatchScroll() with index = 2.
+   *   - TM.DispatchScroll() calls A.AttemptScroll() (since A is at index 2 in
+   *     the chain)
+   *   - A.AttemptScroll() scrolls A. If there is overscroll, it calls
+   *     TM.DispatchScroll() with index = 3.
+   *   - TM.DispatchScroll() discards the rest of the scroll as there are no
+   *     more elements in the chain.
    *
    * Note: this should be used for panning only. For handing off overscroll for
    *       a fling, use DispatchFling().
    */
   void DispatchScroll(AsyncPanZoomController* aApzc,
                       ParentLayerPoint& aStartPoint,
                       ParentLayerPoint& aEndPoint,
                       OverscrollHandoffState& aOverscrollHandoffState);
--- a/gfx/layers/apz/src/Axis.h
+++ b/gfx/layers/apz/src/Axis.h
@@ -250,18 +250,19 @@ public:
    * If a scale will overscroll the axis, this returns the amount and in what
    * direction.
    *
    * |aFocus| is the point at which the scale is focused at. We will offset the
    * scroll offset in such a way that it remains in the same place on the page
    * relative.
    *
    * Note: Unlike most other functions in Axis, this functions operates in
-   *       CSS coordinates so there is no confusion as to whether the ParentLayer
-   *       coordinates it operates in are before or after the scale is applied.
+   *       CSS coordinates so there is no confusion as to whether the
+   *       ParentLayer coordinates it operates in are before or after the scale
+   *       is applied.
    */
   CSSCoord ScaleWillOverscrollAmount(float aScale, CSSCoord aFocus) const;
 
   /**
    * Checks if an axis will overscroll in both directions by computing the
    * content rect and checking that its height/width (depending on the axis)
    * does not overextend past the viewport.
    *
--- a/gfx/layers/apz/src/FocusState.h
+++ b/gfx/layers/apz/src/FocusState.h
@@ -13,27 +13,27 @@
 #include "mozilla/layers/FocusTarget.h" // for FocusTarget
 #include "mozilla/layers/ScrollableLayerGuid.h"   // for ViewID
 #include "mozilla/Mutex.h"  // for Mutex
 
 namespace mozilla {
 namespace layers {
 
 /**
- * This class is used for tracking chrome and content focus targets and calculating
- * global focus information from them for use by APZCTreeManager for async keyboard
- * scrolling.
+ * This class is used for tracking chrome and content focus targets and
+ * calculating global focus information from them for use by APZCTreeManager
+ * for async keyboard scrolling.
  *
  * # Calculating the element to scroll
  *
- * Chrome and content processes have independently focused elements. This makes it
- * difficult to calculate the global focused element and its scrollable frame from
- * the chrome or content side. So instead we send the local focus information from
- * each process to here and then calculate the global focus information. This
- * local information resides in a `focus target`.
+ * Chrome and content processes have independently focused elements. This makes
+ * it difficult to calculate the global focused element and its scrollable
+ * frame from the chrome or content side. So instead we send the local focus
+ * information from each process to here and then calculate the global focus
+ * information. This local information resides in a `focus target`.
  *
  * A focus target indicates that either:
  *    1. The focused element is a remote browser along with its layer tree ID
  *    2. The focused element is not scrollable
  *    3. The focused element is scrollable along with the ViewID's of its
          scrollable layers
  *
  * Using this information we can determine the global focus information by
@@ -49,22 +49,23 @@ namespace layers {
  * don't have the latest focus information, we may incorrectly scroll a target
  * when we shouldn't.
  *
  * A tradeoff is designed here whereby we will maintain deterministic focus
  * changes for user input, but not for other javascript code. The reasoning
  * here is that `setTimeout` and others are already non-deterministic and so it
  * might not be as breaking to web content.
  *
- * To maintain deterministic focus changes for a given stream of user inputs, we
- * invalidate our focus state whenever we receive a user input that may trigger
- * event listeners. We then attach a new sequence number to these events and
- * dispatch them to content. Content will then include the latest sequence number
- * it has processed to every focus update. Using this we can determine whether
- * any potentially focus changing events have yet to be handled by content.
+ * To maintain deterministic focus changes for a given stream of user inputs,
+ * we invalidate our focus state whenever we receive a user input that may
+ * trigger event listeners. We then attach a new sequence number to these
+ * events and dispatch them to content. Content will then include the latest
+ * sequence number it has processed to every focus update. Using this we can
+ * determine whether any potentially focus changing events have yet to be
+ * handled by content.
  *
  * Once we have received the latest focus sequence number from content, we know
  * that all event listeners triggered by user inputs, and their resulting focus
  * changes, have been processed and so we have a current target that we can use
  * again.
  */
 class FocusState final
 {
--- a/gfx/layers/apz/src/InputBlockState.h
+++ b/gfx/layers/apz/src/InputBlockState.h
@@ -460,18 +460,19 @@ public:
    */
   bool TouchActionAllowsPinchZoom() const;
   /**
    * @return false iff touch-action is enabled and the allowed touch behaviors for
    *         this touch block do not allow double-tap zooming.
    */
   bool TouchActionAllowsDoubleTapZoom() const;
   /**
-   * @return false iff touch-action is enabled and the allowed touch behaviors for
-   *         the first touch point do not allow panning in the specified direction(s).
+   * @return false iff touch-action is enabled and the allowed touch behaviors
+   *         for the first touch point do not allow panning in the specified
+   *         direction(s).
    */
   bool TouchActionAllowsPanningX() const;
   bool TouchActionAllowsPanningY() const;
   bool TouchActionAllowsPanningXY() const;
 
   /**
    * Notifies the input block of an incoming touch event so that the block can
    * update its internal slop state. "Slop" refers to the area around the
--- a/gfx/layers/apz/test/gtest/TestHitTesting.cpp
+++ b/gfx/layers/apz/test/gtest/TestHitTesting.cpp
@@ -175,20 +175,24 @@ TEST_F(APZHitTestingTester, HitTesting2)
   SCOPED_GFX_PREF(APZVelocityBias, float, 0.0); // Velocity bias can cause extra repaint requests
 
   CreateHitTesting2LayerTree();
   ScopedLayerTreeRegistration registration(manager, LayersId{0}, root, mcc);
 
   manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0);
 
   // At this point, the following holds (all coordinates in screen pixels):
-  // layers[0] has content from (0,0)-(200,200), clipped by composition bounds (0,0)-(100,100)
-  // layers[1] has content from (10,10)-(90,90), clipped by composition bounds (10,10)-(50,50)
-  // layers[2] has content from (20,60)-(100,100). no clipping as it's not a scrollable layer
-  // layers[3] has content from (20,60)-(180,140), clipped by composition bounds (20,60)-(100,100)
+  // layers[0] has content from (0,0)-(200,200), clipped by composition bounds
+  // (0,0)-(100,100)
+  // layers[1] has content from (10,10)-(90,90), clipped by composition bounds
+  // (10,10)-(50,50)
+  // layers[2] has content from (20,60)-(100,100). no clipping as it's not a
+  // scrollable layer
+  // layers[3] has content from (20,60)-(180,140), clipped by composition
+  // bounds (20,60)-(100,100)
 
   RefPtr<TestAsyncPanZoomController> apzcroot = ApzcOf(root);
   TestAsyncPanZoomController* apzc1 = ApzcOf(layers[1]);
   TestAsyncPanZoomController* apzc3 = ApzcOf(layers[3]);
 
   // Hit an area that's clearly on the root layer but not any of the child layers.
   RefPtr<AsyncPanZoomController> hit = GetTargetAPZC(ScreenPoint(75, 25));
   EXPECT_EQ(apzcroot, hit.get());
--- a/gfx/layers/composite/AsyncCompositionManager.cpp
+++ b/gfx/layers/composite/AsyncCompositionManager.cpp
@@ -931,27 +931,30 @@ AsyncCompositionManager::ApplyAsyncConte
             AsyncTransformMatrix();
 
         AsyncTransformComponentMatrix combinedAsyncTransform;
         bool hasAsyncTransform = false;
         // Only set on the root layer for Android.
         ScreenMargin fixedLayerMargins;
 
         // Each layer has multiple clips:
-        //  - Its local clip, which is fixed to the layer contents, i.e. it moves
-        //    with those async transforms which the layer contents move with.
+        //  - Its local clip, which is fixed to the layer contents, i.e. it
+        //    moves with those async transforms which the layer contents move
+        //    with.
         //  - Its scrolled clip, which moves with all async transforms.
-        //  - For each ScrollMetadata on the layer, a scroll clip. This includes
-        //    the composition bounds and any other clips induced by layout. This
-        //    moves with async transforms from ScrollMetadatas above it.
-        // In this function, these clips are combined into two shadow clip parts:
+        //  - For each ScrollMetadata on the layer, a scroll clip. This
+        //    includes the composition bounds and any other clips induced by
+        //    layout. This moves with async transforms from ScrollMetadatas
+        //    above it.
+        // In this function, these clips are combined into two shadow clip
+        // parts:
         //  - The fixed clip, which consists of the local clip only, initially
         //    transformed by all async transforms.
-        //  - The scrolled clip, which consists of the other clips, transformed by
-        //    the appropriate transforms.
+        //  - The scrolled clip, which consists of the other clips, transformed
+        //    by the appropriate transforms.
         // These two parts are kept separate for now, because for fixed layers, we
         // need to adjust the fixed clip (to cancel out some async transforms).
         // The parts are kept in a cache which is cleared at the beginning of every
         // composite.
         // The final shadow clip for the layer is the intersection of the (possibly
         // adjusted) fixed clip and the scrolled clip.
         ClipParts& clipParts = clipPartsCache[layer];
         clipParts.mFixedClip = layer->GetClipRect();
--- a/gfx/layers/composite/Diagnostics.cpp
+++ b/gfx/layers/composite/Diagnostics.cpp
@@ -74,17 +74,18 @@ Diagnostics::GetFrameOverlayString(const
     gpuTimeString = nsPrintfCString("%0.1fms", mGPUDrawMs.Average()).get();
   }
 
   // DL  = nsDisplayListBuilder
   // FLB = FrameLayerBuilder
   // R   = ClientLayerManager::EndTransaction
   // CP  = ShadowLayerForwarder::EndTransaction (txn build)
   // TX  = LayerTransactionChild::SendUpdate (IPDL serialize+send)
-  // UP  = LayerTransactionParent::RecvUpdate (IPDL deserialize, update, APZ update)
+  // UP  = LayerTransactionParent::RecvUpdate (IPDL deserialize, update, APZ
+  //                                           update)
   // CC_BUILD = Container prepare/composite frame building
   // CC_EXEC  = Container render/composite drawing
   nsPrintfCString line1("FPS: %d (TXN: %d)", fps, txnFps);
   nsPrintfCString line2("[CC] Build: %0.1fms Exec: %0.1fms GPU: %s Fill Ratio: %0.1f/%0.1f",
     mPrepareMs.Average(),
     mCompositeMs.Average(),
     gpuTimeString.c_str(),
     pixelFillRatio,
--- a/gfx/layers/composite/FPSCounter.h
+++ b/gfx/layers/composite/FPSCounter.h
@@ -33,17 +33,18 @@ const int kMaxFrames = 2400;
  * The FPSCounter tracks how often we composite or have a layer transaction.
  * At each composite / layer transaction, we record the timestamp.
  * After kFpsDumpInterval number of composites / transactions, we calculate
  * the average and standard deviation of frames composited. We dump a histogram,
  * which allows for more statistically significant measurements. We also dump
  * absolute frame composite times to a file on the device.
  * The FPS counters displayed on screen are based on how many frames we
  * composited within the last ~1 second. The more accurate measurement is to
- * grab the histogram from stderr or grab the FPS timestamp dumps written to file.
+ * grab the histogram from stderr or grab the FPS timestamp dumps written to
+ * file.
  *
  * To enable dumping to file, enable
  * layers.acceleration.draw-fps.write-to-file pref.
 
   double AddFrameAndGetFps(TimeStamp aCurrentFrame) {
     AddFrame(aCurrentFrame);
     return EstimateFps(aCurrentFrame);
   }
--- a/gfx/layers/composite/LayerManagerComposite.h
+++ b/gfx/layers/composite/LayerManagerComposite.h
@@ -317,31 +317,32 @@ public:
   virtual const char* Name() const override { return ""; }
   virtual bool IsCompositingToScreen() const override;
 
   bool AlwaysScheduleComposite() const override;
 
   /**
    * Post-processes layers before composition. This performs the following:
    *
-   *   - Applies occlusion culling. This restricts the shadow visible region
-   *     of layers that are covered with opaque content.
-   *     |aOpaqueRegion| is the region already known to be covered with opaque
-   *     content, in the post-transform coordinate space of aLayer.
+   *   - Applies occlusion culling. This restricts the shadow visible region of
+   *     layers that are covered with opaque content.  |aOpaqueRegion| is the
+   *     region already known to be covered with opaque content, in the
+   *     post-transform coordinate space of aLayer.
    *
    *   - Recomputes visible regions to account for async transforms.
    *     Each layer accumulates into |aVisibleRegion| its post-transform
    *     (including async transforms) visible region.
    *
-   *   - aRenderTargetClip is the exact clip required for aLayer, in the coordinates
-   *     of the nearest render target (the same as GetEffectiveTransform).
+   *   - aRenderTargetClip is the exact clip required for aLayer, in the
+   *     coordinates of the nearest render target (the same as
+   *     GetEffectiveTransform).
    *
-   *   - aClipFromAncestors is the approximate combined clip from all ancestors, in
-   *     the coordinate space of our parent, but maybe be an overestimate in the
-   *     presence of complex transforms.
+   *   - aClipFromAncestors is the approximate combined clip from all
+   *     ancestors, in the coordinate space of our parent, but maybe be an
+   *     overestimate in the presence of complex transforms.
    */
   void PostProcessLayers(nsIntRegion& aOpaqueRegion);
   void PostProcessLayers(Layer* aLayer,
                          nsIntRegion& aOpaqueRegion,
                          LayerIntRegion& aVisibleRegion,
                          const Maybe<RenderTargetIntRect>& aRenderTargetClip,
                          const Maybe<ParentLayerIntRect>& aClipFromAncestors);
 
--- a/gfx/layers/composite/TiledContentHost.cpp
+++ b/gfx/layers/composite/TiledContentHost.cpp
@@ -6,17 +6,19 @@
 
 #include "TiledContentHost.h"
 #include "gfxPrefs.h"                   // for gfxPrefs
 #include "PaintedLayerComposite.h"      // for PaintedLayerComposite
 #include "mozilla/gfx/BaseSize.h"       // for BaseSize
 #include "mozilla/gfx/Matrix.h"         // for Matrix4x4
 #include "mozilla/gfx/Point.h"          // for IntSize
 #include "mozilla/layers/Compositor.h"  // for Compositor
+// clang-format off
 //#include "mozilla/layers/CompositorBridgeParent.h"  // for CompositorBridgeParent
+// clang-format on
 #include "mozilla/layers/Effects.h"     // for TexturedEffect, Effect, etc
 #include "mozilla/layers/LayerMetricsWrapper.h" // for LayerMetricsWrapper
 #include "mozilla/layers/TextureHostOGL.h"  // for TextureHostOGL
 #ifdef XP_DARWIN
 #include "mozilla/layers/TextureSync.h" // for TextureSync
 #endif
 #include "nsAString.h"
 #include "nsDebug.h"                    // for NS_WARNING
--- a/gfx/layers/ipc/ImageBridgeChild.h
+++ b/gfx/layers/ipc/ImageBridgeChild.h
@@ -74,36 +74,39 @@ bool InImageBridgeChildThread();
  *
  * There are three important phases in the ImageBridge protocol. These three steps
  * can do different things depending if (A) the ImageContainer uses ImageBridge
  * or (B) it does not use ImageBridge:
  *
  * - When an ImageContainer calls its method SetCurrentImage:
  *   - (A) The image is sent directly to the compositor process through the
  *   ImageBridge IPDL protocol.
- *   On the compositor side the image is stored in a global table that associates
- *   the image with an ID corresponding to the ImageContainer, and a composition is
- *   triggered.
+ *   On the compositor side the image is stored in a global table that
+ *   associates the image with an ID corresponding to the ImageContainer, and a
+ *   composition is triggered.
  *   - (B) Since it does not have an ImageBridge, the image is not sent yet.
- *   instead the will be sent to the compositor during the next layer transaction
- *   (on the main thread).
+ *   instead the will be sent to the compositor during the next layer
+ *   transaction (on the main thread).
  *
  * - During a Layer transaction:
- *   - (A) The ImageContainer uses ImageBridge. The image is already available to the
- *   compositor process because it has been sent with SetCurrentImage. Yet, the
- *   CompositableHost on the compositor side will needs the ID referring to the
- *   ImageContainer to access the Image. So during the Swap operation that happens
- *   in the transaction, we swap the container ID rather than the image data.
- *   - (B) Since the ImageContainer does not use ImageBridge, the image data is swaped.
+ *   - (A) The ImageContainer uses ImageBridge. The image is already available
+ *   to the compositor process because it has been sent with SetCurrentImage.
+ *   Yet, the CompositableHost on the compositor side will needs the ID
+ *   referring to the ImageContainer to access the Image. So during the Swap
+ *   operation that happens in the transaction, we swap the container ID rather
+ *   than the image data.
+ *   - (B) Since the ImageContainer does not use ImageBridge, the image data is
+ *   swaped.
  *
  * - During composition:
  *   - (A) The CompositableHost has an AsyncID, it looks up the ID in the
- *   global table to see if there is an image. If there is no image, nothing is rendered.
- *   - (B) The CompositableHost has image data rather than an ID (meaning it is not
- *   using ImageBridge), then it just composites the image data normally.
+ *   global table to see if there is an image. If there is no image, nothing is
+ *   rendered.
+ *   - (B) The CompositableHost has image data rather than an ID (meaning it is
+ *   not using ImageBridge), then it just composites the image data normally.
  *
  * This means that there might be a possibility for the ImageBridge to send the first
  * frame before the first layer transaction that will pass the container ID to the
  * CompositableHost happens. In this (unlikely) case the layer is not composited
  * until the layer transaction happens. This means this scenario is not harmful.
  *
  * Since sending an image through imageBridge triggers compositing, the main thread is
  * not used at all (except for the very first transaction that provides the
--- a/gfx/layers/ipc/UiCompositorControllerMessageTypes.h
+++ b/gfx/layers/ipc/UiCompositorControllerMessageTypes.h
@@ -6,33 +6,37 @@
 
 #ifndef include_gfx_ipc_UiCompositorControllerMessageTypes_h
 #define include_gfx_ipc_UiCompositorControllerMessageTypes_h
 
 namespace mozilla {
 namespace layers {
 
 //
-// NOTE: These values are also defined in mobile/android/geckoview/src/main/java/org/mozilla/gecko/gfx/LayerView.java
-//       and must be kept in sync. Any new message added here must also be added there to the AnimatorMessageType enum.
+// NOTE: These values are also defined in
+// mobile/android/geckoview/src/main/java/org/mozilla/gecko/gfx/LayerView.java
+// and must be kept in sync. Any new message added here must also be added
+// there to the AnimatorMessageType enum.
 //
 
+// clang-format off
 enum UiCompositorControllerMessageTypes {
   STATIC_TOOLBAR_NEEDS_UPDATE      = 0,  // Sent from compositor when the static toolbar wants to hide.
   STATIC_TOOLBAR_READY             = 1,  // Sent from compositor when the static toolbar image has been updated and is ready to animate.
   TOOLBAR_HIDDEN                   = 2,  // Sent to compositor when the real toolbar has been hidden.
   TOOLBAR_VISIBLE                  = 3,  // Sent to compositor when the real toolbar has been made  visible
   TOOLBAR_SHOW                     = 4,  // Sent from compositor when the real toolbar should be shown
   FIRST_PAINT                      = 5,  // Sent from compositor after first paint
   REQUEST_SHOW_TOOLBAR_IMMEDIATELY = 6,  // Sent to the compositor when the snapshot should be shown immediately
   REQUEST_SHOW_TOOLBAR_ANIMATED    = 7,  // Sent to the compositor when the snapshot should be shown with an animation
   REQUEST_HIDE_TOOLBAR_IMMEDIATELY = 8,  // Sent to the compositor when the snapshot should be hidden immediately
   REQUEST_HIDE_TOOLBAR_ANIMATED    = 9,  // Sent to the compositor when the snapshot should be hidden with an animation
   LAYERS_UPDATED                   = 10, // Sent from the compositor when any layer has been updated
   TOOLBAR_SNAPSHOT_FAILED          = 11, // Sent to compositor when the toolbar snapshot fails.
   COMPOSITOR_CONTROLLER_OPEN       = 20, // Compositor controller IPC is open
   IS_COMPOSITOR_CONTROLLER_OPEN    = 21  // Special message sent from controller to query if the compositor controller is open
 };
+// clang-format on
 
 } // namespace layers
 } // namespace mozilla
 
 #endif // include_gfx_ipc_UiCompositorControllerMessageTypes_h
--- a/gfx/layers/opengl/GLBlitTextureImageHelper.h
+++ b/gfx/layers/opengl/GLBlitTextureImageHelper.h
@@ -51,17 +51,18 @@ public:
      * Note: calling this function will cause the following OpenGL state
      * to be changed:
      *
      *   - current program
      *   - framebuffer binding
      *   - viewport
      *   - blend state (will be enabled at end)
      *   - scissor state (will be enabled at end)
-     *   - vertex attrib 0 and 1 (pointer and enable state [enable state will be disabled at exit])
+     *   - vertex attrib 0 and 1 (pointer and enable state [enable state will
+     *     be disabled at exit])
      *   - array buffer binding (will be 0)
      *   - active texture (will be 0)
      *   - texture 0 binding
      */
     void BlitTextureImage(gl::TextureImage *aSrc, const gfx::IntRect& aSrcRect,
                           gl::TextureImage *aDst, const gfx::IntRect& aDstRect);
 };
 
--- a/gfx/layers/wr/ClipManager.cpp
+++ b/gfx/layers/wr/ClipManager.cpp
@@ -12,18 +12,22 @@
 #include "mozilla/layers/StackingContextHelper.h"
 #include "mozilla/layers/WebRenderLayerManager.h"
 #include "mozilla/webrender/WebRenderAPI.h"
 #include "nsDisplayList.h"
 #include "nsStyleStructInlines.h"
 #include "UnitTransforms.h"
 
 #define CLIP_LOG(...)
-//#define CLIP_LOG(...) printf_stderr("CLIP: " __VA_ARGS__)
-//#define CLIP_LOG(...) if (XRE_IsContentProcess()) printf_stderr("CLIP: " __VA_ARGS__)
+/*
+#define CLIP_LOG(...) printf_stderr("CLIP: " __VA_ARGS__)
+#define CLIP_LOG(...) if (XRE_IsContentProcess()) {         \
+                        printf_stderr("CLIP: " __VA_ARGS__) \
+                      }
+*/
 
 namespace mozilla {
 namespace layers {
 
 ClipManager::ClipManager()
   : mManager(nullptr)
   , mBuilder(nullptr)
 {
--- a/gfx/layers/wr/WebRenderCommandBuilder.cpp
+++ b/gfx/layers/wr/WebRenderCommandBuilder.cpp
@@ -280,17 +280,18 @@ UpdateContainerLayerPropertiesAndDetectC
     case DisplayItemType::TYPE_TRANSFORM: {
       auto transformItem = static_cast<nsDisplayTransform*>(aItem);
       Matrix4x4Flagged trans = transformItem->GetTransform();
       changed = aData->mTransform != trans;
 
       if (changed) {
         std::stringstream ss;
         //ss << trans << ' ' << aData->mTransform;
-        //GP("UpdateContainerLayerPropertiesAndDetectChange Matrix %d %s\n", changed, ss.str().c_str());
+        //GP("UpdateContainerLayerPropertiesAndDetectChange Matrix %d %s\n",
+        //   changed, ss.str().c_str());
       }
 
       aData->mTransform = trans;
       break;
     }
     case DisplayItemType::TYPE_OPACITY: {
       auto opacityItem = static_cast<nsDisplayOpacity*>(aItem);
       float opacity = opacityItem->GetOpacity();
@@ -432,19 +433,23 @@ struct DIGroup
       GP("mRect %d %d %d %d\n", aData->mRect.x, aData->mRect.y, aData->mRect.width, aData->mRect.height);
       InvalidateRect(aData->mRect);
       aData->mInvalid = true;
     } else if (aData->mInvalid || /* XXX: handle image load invalidation */ (aItem->IsInvalid(invalid) && invalid.IsEmpty())) {
       MOZ_RELEASE_ASSERT(mLayerBounds.TopLeft() == aData->mGroupOffset);
       UniquePtr<nsDisplayItemGeometry> geometry(aItem->AllocateGeometry(aBuilder));
       /* Instead of doing this dance, let's just invalidate the old rect and the
        * new rect.
-      combined = aData->mClip.ApplyNonRoundedIntersection(aData->mGeometry->ComputeInvalidationRegion());
+      combined =
+        aData->mClip.ApplyNonRoundedIntersection(
+          aData->mGeometry->ComputeInvalidationRegion());
       combined.MoveBy(shift);
-      combined.Or(combined, clip.ApplyNonRoundedIntersection(geometry->ComputeInvalidationRegion()));
+      combined.Or(combined,
+                  clip.ApplyNonRoundedIntersection(
+                    geometry->ComputeInvalidationRegion()));
       aData->mGeometry = std::move(geometry);
       */
       combined = clip.ApplyNonRoundedIntersection(geometry->ComputeInvalidationRegion());
       aData->mGeometry = std::move(geometry);
 
       GP("matrix: %f %f\n", aMatrix._31, aMatrix._32);
       GP("frame invalid invalidate: %s\n", aItem->Name());
       GP("old rect: %d %d %d %d\n",
@@ -673,17 +678,19 @@ struct DIGroup
     bool empty = aStartItem == aEndItem;
     if (empty) {
       ClearImageKey(aWrManager, true);
       return;
     }
 
     PaintItemRange(aGrouper, aStartItem, aEndItem, context, recorder);
 
-    // XXX: set this correctly perhaps using aItem->GetOpaqueRegion(aDisplayListBuilder, &snapped).Contains(paintBounds);?
+    // XXX: set this correctly perhaps using
+    // aItem->GetOpaqueRegion(aDisplayListBuilder, &snapped).
+    //   Contains(paintBounds);?
     wr::OpacityType opacity = wr::OpacityType::HasAlphaChannel;
 
     TakeExternalSurfaces(recorder, mExternalSurfaces, aWrManager, aResources);
     bool hasItems = recorder->Finish();
     GP("%d Finish\n", hasItems);
     Range<uint8_t> bytes((uint8_t*)recorder->mOutputStream.mData, recorder->mOutputStream.mLength);
     if (!mKey) {
       if (!hasItems) // we don't want to send a new image that doesn't have any items in it
--- a/gfx/src/nsRect.h
+++ b/gfx/src/nsRect.h
@@ -137,18 +137,20 @@ struct nsRect :
     nsRect result;
     if (mozilla::gfx::Factory::HasSSE4()) {
       __m128i rect1 = _mm_loadu_si128((__m128i*)&aRect); // x1, y1, w1, h1
       __m128i rect2 = _mm_loadu_si128((__m128i*)this); // x2, y2, w2, h2
 
       __m128i resultRect = _mm_max_epi32(rect1, rect2); // xr, yr, zz, zz
 
 
-      // result.width = std::min<int32_t>(x - result.x + width, aRect.x - result.x + aRect.width);
-      // result.height = std::min<int32_t>(y - result.y + height, aRect.y - result.y + aRect.height);
+      // result.width = std::min<int32_t>(x - result.x + width,
+      //                                  aRect.x - result.x + aRect.width);
+      // result.height = std::min<int32_t>(y - result.y + height,
+      //                                   aRect.y - result.y + aRect.height);
       __m128i widthheight = _mm_min_epi32(_mm_add_epi32(_mm_sub_epi32(rect1, resultRect), _mm_srli_si128(rect1, 8)),
                                           _mm_add_epi32(_mm_sub_epi32(rect2, resultRect), _mm_srli_si128(rect2, 8))); // w, h, zz, zz
       widthheight = _mm_slli_si128(widthheight, 8); // 00, 00, wr, hr
 
       resultRect = _mm_blend_epi16(resultRect, widthheight, 0xF0); // xr, yr, wr, hr
 
       if ((_mm_movemask_ps(_mm_castsi128_ps(_mm_cmplt_epi32(resultRect, _mm_setzero_si128()))) & 0xC) != 0) {
         // It's potentially more efficient to store all 0s. But the non SSE4 code leaves x/y intact
@@ -173,18 +175,20 @@ struct nsRect :
 
   bool IntersectRect(const nsRect& aRect1, const nsRect& aRect2)
   {
     if (mozilla::gfx::Factory::HasSSE4()) {
       __m128i rect1 = _mm_loadu_si128((__m128i*)&aRect1); // x1, y1, w1, h1
       __m128i rect2 = _mm_loadu_si128((__m128i*)&aRect2); // x2, y2, w2, h2
 
       __m128i resultRect = _mm_max_epi32(rect1, rect2); // xr, yr, zz, zz
-      // result.width = std::min<int32_t>(x - result.x + width, aRect.x - result.x + aRect.width);
-      // result.height = std::min<int32_t>(y - result.y + height, aRect.y - result.y + aRect.height);
+      // result.width = std::min<int32_t>(x - result.x + width,
+      //                                  aRect.x - result.x + aRect.width);
+      // result.height = std::min<int32_t>(y - result.y + height,
+      //                                   aRect.y - result.y + aRect.height);
       __m128i widthheight = _mm_min_epi32(_mm_add_epi32(_mm_sub_epi32(rect1, resultRect), _mm_srli_si128(rect1, 8)),
                                           _mm_add_epi32(_mm_sub_epi32(rect2, resultRect), _mm_srli_si128(rect2, 8))); // w, h, zz, zz
       widthheight = _mm_slli_si128(widthheight, 8); // 00, 00, wr, hr
 
       resultRect = _mm_blend_epi16(resultRect, widthheight, 0xF0); // xr, yr, wr, hr
 
       if ((_mm_movemask_ps(_mm_castsi128_ps(_mm_cmpgt_epi32(resultRect, _mm_setzero_si128()))) & 0xC) != 0xC) {
         // It's potentially more efficient to store all 0s. But the non SSE4 code leaves x/y intact
@@ -390,31 +394,34 @@ nsRect::ScaleToOutsidePixels(float aXSca
 
   __m128i rectPacked = _mm_loadu_si128((__m128i*)this); // x, y, w, h
   __m128i topLeft = _mm_slli_si128(rectPacked, 8); // 0, 0, x, y
 
   rectPacked = _mm_add_epi32(rectPacked, topLeft); // X, Y, XMost(), YMost()
 
   __m128 rectFloat = _mm_cvtepi32_ps(rectPacked);
 
-  // Scale i.e. ([ x y xmost ymost ] / aAppUnitsPerPixel) * [ aXScale aYScale aXScale aYScale ]
+  // Scale i.e. ([ x y xmost ymost ] / aAppUnitsPerPixel) *
+  //             [ aXScale aYScale aXScale aYScale ]
   rectFloat = _mm_mul_ps(_mm_div_ps(rectFloat, appUnitsPacked), scalesPacked);
   rectPacked = ceil_ps2epi32(rectFloat); // xx, xx, XMost(), YMost()
   __m128i tmp = floor_ps2epi32(rectFloat); // x, y, xx, xx
 
   // _mm_move_sd is 1 cycle method of getting the blending we want.
   rectPacked = _mm_castpd_si128(_mm_move_sd(_mm_castsi128_pd(rectPacked), _mm_castsi128_pd(tmp))); // x, y, XMost(), YMost()
 
   topLeft = _mm_slli_si128(rectPacked, 8); // 0, 0, r.x, r.y
   rectPacked = _mm_sub_epi32(rectPacked, topLeft); // r.x, r.y, r.w, r.h
 
   // Avoid negative width/height due to overflow.
   __m128i mask = _mm_or_si128(_mm_cmpgt_epi32(rectPacked, _mm_setzero_si128()),
                               _mm_set_epi32(0, 0, 0xFFFFFFFF, 0xFFFFFFFF));
+  // clang-format off
   // Mask will now contain [ 0xFFFFFFFF 0xFFFFFFFF (width <= 0 ? 0 : 0xFFFFFFFF) (height <= 0 ? 0 : 0xFFFFFFFF) ]
+  // clang-format on
   rectPacked = _mm_and_si128(rectPacked, mask);
 
   _mm_storeu_si128((__m128i*)&rect, rectPacked);
 #else
   rect.SetNonEmptyBox(NSToIntFloor(NSAppUnitsToFloatPixels(x,
                                    float(aAppUnitsPerPixel)) * aXScale),
                       NSToIntFloor(NSAppUnitsToFloatPixels(y,
                                    float(aAppUnitsPerPixel)) * aYScale),
--- a/gfx/src/nsRegion.cpp
+++ b/gfx/src/nsRegion.cpp
@@ -336,17 +336,18 @@ void nsRegion::VisitEdges (visit_fn visi
         const int TouchedByTop = 1;
         const int TouchedByBottom = 2;
         // We always start with nothing.
         int oldState = TouchedByNothing;
         // Last state change, adjusted by -1 if the last state change was
         // a change away from 0.
         int lastX = std::min(topStrip->left, bottomStrip->left) - 1;
 
-        // Current edge being considered for top and bottom, 0 - left, 1 - right.
+        // Current edge being considered for top and bottom,
+        // 0 - left, 1 - right.
         bool topEdgeIsLeft = true;
         bool bottomEdgeIsLeft = true;
         while (topStrip != std::end(topBand.mStrips) && bottomStrip != std::end(bottomBand.mStrips)) {
           int topPos;
           int bottomPos;
           if (topEdgeIsLeft) {
             topPos = topStrip->left;
           } else {
@@ -723,17 +724,18 @@ nsIntRegion nsRegion::ScaleToInsidePixel
 // Phase3 = function (G, A, m, n) {
 //   let (t,b,l,r,_) = MaxSum2D(A,m,n)
 //   return rect(G[t],G[l],G[r],G[b]);
 // }
 // MaxSum2D = function (A, m, n) {
 //   S = array(m+1,n+1)
 //   S[0][i] = 0 for i in [0,n]
 //   S[j][0] = 0 for j in [0,m]
-//   S[j][i] = (if A[j-1][i-1] = 0 then some large negative value else A[j-1][i-1])
+//   S[j][i] = (if A[j-1][i-1] = 0 then some large negative value
+//                                 else A[j-1][i-1])
 //           + S[j-1][n] + S[j][i-1] - S[j-1][i-1]
 //
 //   // top, bottom, left, right, area
 //   var maxRect = (-1, -1, -1, -1, 0);
 //
 //   for all (m',m'') in [0, m]^2 {
 //     let B = { S[m'][i] - S[m''][i] | 0 <= i <= n }
 //     let ((l,r),area) = MaxSum1D(B,n+1)
--- a/gfx/thebes/gfxASurface.cpp
+++ b/gfx/thebes/gfxASurface.cpp
@@ -108,17 +108,18 @@ gfxASurface::Release(void)
         return 0;
     }
     return mFloatingRefs;
 }
 
 void
 gfxASurface::SurfaceDestroyFunc(void *data) {
     gfxASurface *surf = (gfxASurface*) data;
-    // fprintf (stderr, "Deleting wrapper for %p (wrapper: %p)\n", surf->mSurface, data);
+    // fprintf (stderr, "Deleting wrapper for %p (wrapper: %p)\n", surf->mSurface,
+    //          data);
     delete surf;
 }
 
 gfxASurface*
 gfxASurface::GetSurfaceWrapper(cairo_surface_t *csurf)
 {
     if (!csurf)
         return nullptr;
--- a/gfx/thebes/gfxAlphaRecovery.h
+++ b/gfx/thebes/gfxAlphaRecovery.h
@@ -84,27 +84,28 @@ public:
      */
 
     static inline uint32_t
     RecoverPixel(uint32_t black, uint32_t white)
     {
         const uint32_t GREEN_MASK = 0x0000FF00;
         const uint32_t ALPHA_MASK = 0xFF000000;
 
-        /* |diff| here is larger when the source image pixel is more transparent.
-           If both renderings are from the same source image composited with OVER,
-           then the color values on white will always be greater than those on
-           black, so |diff| would not overflow.  However, overflow may happen, for
-           example, when a plugin plays a video and the image is rapidly changing.
-           If there is overflow, then behave as if we limit to the difference to
+        /* |diff| here is larger when the source image pixel is more
+           transparent.  If both renderings are from the same source image
+           composited with OVER, then the color values on white will always be
+           greater than those on black, so |diff| would not overflow.  However,
+           overflow may happen, for example, when a plugin plays a video and
+           the image is rapidly changing.  If there is overflow, then behave as
+           if we limit to the difference to
            >= 0, which will make the rendering opaque.  (Without this overflow
            will make the rendering transparent.) */
         uint32_t diff = (white & GREEN_MASK) - (black & GREEN_MASK);
-        /* |diff| is 0xFFFFxx00 on overflow and 0x0000xx00 otherwise, so use this
-            to limit the transparency. */
+        /* |diff| is 0xFFFFxx00 on overflow and 0x0000xx00 otherwise, so use
+           this to limit the transparency. */
         uint32_t limit = diff & ALPHA_MASK;
         /* The alpha bits of the result */
         uint32_t alpha = (ALPHA_MASK - (diff << 16)) | limit;
 
         return alpha | (black & ~ALPHA_MASK);
     }
 };
 
--- a/gfx/thebes/gfxBlur.h
+++ b/gfx/thebes/gfxBlur.h
@@ -154,18 +154,20 @@ public:
      * and calling paint. Do not call Init() if using this method.
      *
      * @param aDestinationCtx     The destination to blur to.
      * @param aDestinationRect    The destination rect in device pixels
      * @param aShadowClipRect     The destiniation inner rect of the
      *                            inset path in device pixels.
      * @param aBlurRadius         The standard deviation of the blur.
      * @param aShadowColor        The color of the blur.
-     * @param aInnerClipRadii     Corner radii for the inside rect if it is a rounded rect.
-     * @param aSkipRect           An area in device pixels we don't have to paint in.
+     * @param aInnerClipRadii     Corner radii for the inside rect if it is a
+     *                            rounded rect.
+     * @param aSkipRect           An area in device pixels we don't have to
+     *                            paint in.
      */
     void BlurInsetBox(gfxContext* aDestinationCtx,
                       const mozilla::gfx::Rect& aDestinationRect,
                       const mozilla::gfx::Rect& aShadowClipRect,
                       const mozilla::gfx::IntSize& aBlurRadius,
                       const mozilla::gfx::Color& aShadowColor,
                       const RectCornerRadii* aInnerClipRadii,
                       const mozilla::gfx::Rect& aSkipRect,
--- a/gfx/thebes/gfxCoreTextShaper.cpp
+++ b/gfx/thebes/gfxCoreTextShaper.cpp
@@ -247,18 +247,20 @@ gfxCoreTextShaper::SetGlyphsFromRun(gfxS
     if (numGlyphs == 0) {
         return NS_OK;
     }
 
     int32_t wordLength = aLength;
 
     // character offsets get really confusing here, as we have to keep track of
     // (a) the text in the actual textRun we're constructing
-    // (c) the string that was handed to CoreText, which contains the text of the font run
-    // (d) the CTRun currently being processed, which may be a sub-run of the CoreText line
+    // (c) the string that was handed to CoreText, which contains the text of
+    // the font run
+    // (d) the CTRun currently being processed, which may be a sub-run of the
+    // CoreText line
 
     // get the source string range within the CTLine's text
     CFRange stringRange = ::CTRunGetStringRange(aCTRun);
     // skip the run if it is entirely outside the actual range of the font run
     if (stringRange.location + stringRange.length <= 0 ||
         stringRange.location >= wordLength) {
         return NS_OK;
     }
--- a/gfx/thebes/gfxFont.cpp
+++ b/gfx/thebes/gfxFont.cpp
@@ -3896,17 +3896,18 @@ gfxFont::SanitizeMetrics(gfxFont::Metric
     }
 
     /**
      * Some CJK fonts have bad underline offset. Therefore, if this is such font,
      * we need to lower the underline offset to bottom of *em* descent.
      * However, if this is system font, we should not do this for the rendering compatibility with
      * another application's UI on the platform.
      * XXX Should not use this hack if the font size is too small?
-     *     Such text cannot be read, this might be used for tight CSS rendering? (E.g., Acid2)
+     *     Such text cannot be read, this might be used for tight CSS
+     *     rendering? (E.g., Acid2)
      */
     if (!mStyle.systemFont && aIsBadUnderlineFont) {
         // First, we need 2 pixels between baseline and underline at least. Because many CJK characters
         // put their glyphs on the baseline, so, 1 pixel is too close for CJK characters.
         aMetrics->underlineOffset = std::min(aMetrics->underlineOffset, -2.0);
 
         // Next, we put the underline to bottom of below of the descent space.
         if (aMetrics->internalLeading + aMetrics->externalLeading > aMetrics->underlineSize) {
--- a/gfx/thebes/gfxFontUtils.cpp
+++ b/gfx/thebes/gfxFontUtils.cpp
@@ -265,17 +265,18 @@ gfxFontUtils::ReadCMAPTableFormat4(const
                                                           endCount));
             }
             if (skipCode < endCount) {
                 aCharacterMap.SetRange(std::max<uint16_t>(startCount,
                                                           skipCode + 1),
                                        endCount);
             }
         } else {
-            // const uint16_t idDelta = ReadShortAt16(idDeltas, i); // Unused: self-documenting.
+            // Unused: self-documenting.
+            // const uint16_t idDelta = ReadShortAt16(idDeltas, i);
             for (uint32_t c = startCount; c <= endCount; ++c) {
                 if (c == 0xFFFF)
                     break;
 
                 const uint16_t *gdata = (idRangeOffset/2
                                          + (c - startCount)
                                          + &idRangeOffsets[i]);
 
--- a/gfx/thebes/gfxLineSegment.h
+++ b/gfx/thebes/gfxLineSegment.h
@@ -12,17 +12,19 @@
 struct gfxLineSegment {
   gfxLineSegment(const gfxPoint &aStart, const gfxPoint &aEnd) 
     : mStart(aStart)
     , mEnd(aEnd)
   {}
 
   bool PointsOnSameSide(const gfxPoint& aOne, const gfxPoint& aTwo)
   {
-    // Solve the equation y - mStart.y - ((mEnd.y - mStart.y)/(mEnd.x - mStart.x))(x - mStart.x) for both points 
+    // Solve the equation
+    // y - mStart.y - ((mEnd.y - mStart.y)/(mEnd.x - mStart.x))(x - mStart.x)
+    // for both points 
   
     gfxFloat deltaY = (mEnd.y - mStart.y);
     gfxFloat deltaX = (mEnd.x - mStart.x);
   
     gfxFloat one = deltaX * (aOne.y - mStart.y) - deltaY * (aOne.x - mStart.x);
     gfxFloat two = deltaX * (aTwo.y - mStart.y) - deltaY * (aTwo.x - mStart.x);
 
     // If both results have the same sign, then we're on the correct side of the line.
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -2257,19 +2257,19 @@ gfxPlatform::GetCMSOutputProfileData(voi
 
 void
 gfxPlatform::CreateCMSOutputProfile()
 {
     if (!gCMSOutputProfile) {
         /* Determine if we're using the internal override to force sRGB as
            an output profile for reftests. See Bug 452125.
 
-           Note that we don't normally (outside of tests) set a
-           default value of this preference, which means nsIPrefBranch::GetBoolPref
-           will typically throw (and leave its out-param untouched).
+           Note that we don't normally (outside of tests) set a default value
+           of this preference, which means nsIPrefBranch::GetBoolPref will
+           typically throw (and leave its out-param untouched).
          */
         if (Preferences::GetBool(GFX_PREF_CMS_FORCE_SRGB, false)) {
             gCMSOutputProfile = GetCMSsRGBProfile();
         }
 
         if (!gCMSOutputProfile) {
             void* mem = nullptr;
             size_t size = 0;
@@ -2877,20 +2877,23 @@ WebRenderHardwareQualificationStatus(boo
 void
 gfxPlatform::InitWebRenderConfig()
 {
   bool prefEnabled = WebRenderPrefEnabled();
   bool envvarEnabled = WebRenderEnvvarEnabled();
 
   // On Nightly:
   //   WR? WR+   => means WR was enabled via gfx.webrender.all.qualified
-  //   WR! WR+   => means WR was enabled via gfx.webrender.{all,enabled} or envvar
+  //   WR! WR+   => means WR was enabled via gfx.webrender.{all,enabled} or
+  //                envvar
   // On Beta/Release:
-  //   WR? WR+   => means WR was enabled via gfx.webrender.all.qualified on qualified hardware
-  //   WR! WR+   => means WR was enabled via envvar, possibly on unqualified hardware.
+  //   WR? WR+   => means WR was enabled via gfx.webrender.all.qualified on
+  //                qualified hardware
+  //   WR! WR+   => means WR was enabled via envvar, possibly on unqualified
+  //                hardware.
   // In all cases WR- means WR was not enabled, for one of many possible reasons.
   ScopedGfxFeatureReporter reporter("WR", prefEnabled || envvarEnabled);
   if (!XRE_IsParentProcess()) {
     // Force-disable WebRender in recording/replaying child processes, which
     // have their own compositor.
     if (recordreplay::IsRecordingOrReplaying()) {
       gfxVars::SetUseWebRender(false);
     }
@@ -3181,17 +3184,18 @@ gfxPlatform::ContentUsesTiling() const
     (gfxPrefs::LayersTilesEnabledIfSkiaPOMTP() &&
       contentUsesSkia &&
       contentUsesPOMTP);
 }
 
 /***
  * The preference "layout.frame_rate" has 3 meanings depending on the value:
  *
- * -1 = Auto (default), use hardware vsync or software vsync @ 60 hz if hw vsync fails.
+ * -1 = Auto (default), use hardware vsync or software vsync @ 60 hz if hw
+ *      vsync fails.
  *  0 = ASAP mode - used during talos testing.
  *  X = Software vsync at a rate of X times per second.
  */
 already_AddRefed<mozilla::gfx::VsyncSource>
 gfxPlatform::CreateHardwareVsyncSource()
 {
   RefPtr<mozilla::gfx::VsyncSource> softwareVsync = new SoftwareVsyncSource();
   return softwareVsync.forget();
--- a/gfx/thebes/gfxPrefs.h
+++ b/gfx/thebes/gfxPrefs.h
@@ -280,19 +280,21 @@ private:
     T GetLiveValue() const {
       return BaseClass::GetLiveValueByName(Prefname());
     }
     bool HasDefaultValue() const override {
       return this->mValue == Default();
     }
   };
 
-  // This is where DECL_GFX_PREF for each of the preferences should go.
-  // We will keep these in an alphabetical order to make it easier to see if
-  // a method accessing a pref already exists. Just add yours in the list.
+  // clang-format off
+
+  // This is where DECL_GFX_PREF for each of the preferences should go.  We
+  // will keep these in an alphabetical order to make it easier to see if a
+  // method accessing a pref already exists. Just add yours in the list.
 
   DECL_GFX_PREF(Live, "accessibility.browsewithcaret", AccessibilityBrowseWithCaret, bool, false);
 
   // The apz prefs are explained in AsyncPanZoomController.cpp
   DECL_GFX_PREF(Live, "apz.allow_checkerboarding",             APZAllowCheckerboarding, bool, true);
   DECL_GFX_PREF(Live, "apz.allow_double_tap_zooming",          APZAllowDoubleTapZooming, bool, true);
   DECL_GFX_PREF(Live, "apz.allow_immediate_handoff",           APZAllowImmediateHandoff, bool, true);
   DECL_GFX_PREF(Live, "apz.allow_zooming",                     APZAllowZooming, bool, false);
@@ -809,19 +811,22 @@ private:
   DECL_GFX_PREF(Live, "webgl.perf.max-warnings",                    WebGLMaxPerfWarnings, int32_t, 0);
   DECL_GFX_PREF(Live, "webgl.perf.max-acceptable-fb-status-invals", WebGLMaxAcceptableFBStatusInvals, int32_t, 0);
   DECL_GFX_PREF(Live, "webgl.perf.spew-frame-allocs",          WebGLSpewFrameAllocs, bool, true);
 
 
   DECL_GFX_PREF(Live, "widget.window-transforms.disabled",     WindowTransformsDisabled, bool, false);
 
   // WARNING:
-  // Please make sure that you've added your new preference to the list above in alphabetical order.
+  // Please make sure that you've added your new preference to the list above
+  // in alphabetical order.
   // Please do not just append it to the end of the list.
 
+  // clang-format on
+
 public:
   // Manage the singleton:
   static gfxPrefs& GetSingleton()
   {
     return sInstance ? *sInstance : CreateAndInitializeSingleton();
   }
   static void DestroySingleton();
   static bool SingletonExists();
--- a/gfx/thebes/gfxTextRun.cpp
+++ b/gfx/thebes/gfxTextRun.cpp
@@ -1124,18 +1124,20 @@ gfxTextRun::BreakAndMeasureText(uint32_t
     }
 
     if (!aborted) {
         width += advance;
     }
 
     // There are three possibilities:
     // 1) all the text fit (width <= aWidth)
-    // 2) some of the text fit up to a break opportunity (width > aWidth && lastBreak >= 0)
-    // 3) none of the text fits before a break opportunity (width > aWidth && lastBreak < 0)
+    // 2) some of the text fit up to a break opportunity (width > aWidth &&
+    //    lastBreak >= 0)
+    // 3) none of the text fits before a break opportunity (width > aWidth &&
+    //    lastBreak < 0)
     uint32_t charsFit;
     bool usedHyphenation = false;
     if (width - trimmableAdvance <= aWidth) {
         charsFit = aMaxLength;
     } else if (lastBreak >= 0) {
         if (lastCandidateBreak >= 0 && lastCandidateBreak != lastBreak) {
             lastBreak = lastCandidateBreak;
             lastBreakTrimmableChars = lastCandidateBreakTrimmableChars;
@@ -3089,17 +3091,18 @@ gfxFontGroup::FindFontForChar(uint32_t a
     // 2. search pref fonts
     gfxFont* font = WhichPrefFontSupportsChar(aCh, aNextCh);
     if (font) {
         *aMatchType = gfxTextRange::MatchType::kPrefsFallback;
         return font;
     }
 
     // 3. use fallback fonts
-    // -- before searching for something else check the font used for the previous character
+    // -- before searching for something else check the font used for the
+    //    previous character
     if (aPrevMatchedFont && aPrevMatchedFont->HasCharacter(aCh)) {
         *aMatchType = gfxTextRange::MatchType::kSystemFallback;
         return aPrevMatchedFont;
     }
 
     // for known "space" characters, don't do a full system-fallback search;
     // we'll synthesize appropriate-width spaces instead of missing-glyph boxes
     if (GetGeneralCategory(aCh) ==
--- a/gfx/thebes/gfxTextRun.h
+++ b/gfx/thebes/gfxTextRun.h
@@ -376,28 +376,34 @@ public:
                                   HyphenationState* aWordState);
 
     /**
      * Finds the longest substring that will fit into the given width.
      * Uses GetHyphenationBreaks and GetSpacing from aProvider.
      * Guarantees the following:
      * -- 0 <= result <= aMaxLength
      * -- result is the maximal value of N such that either
-     *       N < aMaxLength && line break at N && GetAdvanceWidth(Range(aStart, N), aProvider) <= aWidth
-     *   OR  N < aMaxLength && hyphen break at N && GetAdvanceWidth(Range(aStart, N), aProvider) + GetHyphenWidth() <= aWidth
-     *   OR  N == aMaxLength && GetAdvanceWidth(Range(aStart, N), aProvider) <= aWidth
+     *       N < aMaxLength && line break at N &&
+     *       GetAdvanceWidth(Range(aStart, N), aProvider) <= aWidth
+     *   OR  N < aMaxLength && hyphen break at N &&
+     *       GetAdvanceWidth(Range(aStart, N), aProvider) +
+     *       GetHyphenWidth() <= aWidth
+     *   OR  N == aMaxLength &&
+     *       GetAdvanceWidth(Range(aStart, N), aProvider) <= aWidth
      * where GetAdvanceWidth assumes the effect of
-     * SetLineBreaks(Range(aStart, N), aLineBreakBefore, N < aMaxLength, aProvider)
+     * SetLineBreaks(Range(aStart, N),
+     *               aLineBreakBefore, N < aMaxLength, aProvider)
      * -- if no such N exists, then result is the smallest N such that
      *       N < aMaxLength && line break at N
      *   OR  N < aMaxLength && hyphen break at N
      *   OR  N == aMaxLength
      *
      * The call has the effect of
-     * SetLineBreaks(Range(aStart, result), aLineBreakBefore, result < aMaxLength, aProvider)
+     * SetLineBreaks(Range(aStart, result), aLineBreakBefore,
+     *               result < aMaxLength, aProvider)
      * and the returned metrics and the invariants above reflect this.
      *
      * @param aMaxLength this can be UINT32_MAX, in which case the length used
      * is up to the end of the string
      * @param aLineBreakBefore set to true if and only if there is an actual
      * line break at the start of this string.
      * @param aSuppressBreak what break should be suppressed.
      * @param aTrimWhitespace if non-null, then we allow a trailing run of
@@ -411,21 +417,25 @@ public:
      * @param aMetrics if non-null, we fill this in for the returned substring.
      * If a hyphenation break was used, the hyphen is NOT included in the returned metrics.
      * @param aBoundingBoxType whether to make the bounding box in aMetrics tight
      * @param aDrawTargetForTightBoundingbox a reference DrawTarget to get the
      * tight bounding box, if requested
      * @param aUsedHyphenation if non-null, records if we selected a hyphenation break
      * @param aLastBreak if non-null and result is aMaxLength, we set this to
      * the maximal N such that
-     *       N < aMaxLength && line break at N && GetAdvanceWidth(Range(aStart, N), aProvider) <= aWidth
-     *   OR  N < aMaxLength && hyphen break at N && GetAdvanceWidth(Range(aStart, N), aProvider) + GetHyphenWidth() <= aWidth
+     *       N < aMaxLength && line break at N &&
+     *       GetAdvanceWidth(Range(aStart, N), aProvider) <= aWidth
+     *   OR  N < aMaxLength && hyphen break at N &&
+     *       GetAdvanceWidth(Range(aStart, N), aProvider) +
+     *         GetHyphenWidth() <= aWidth
      * or UINT32_MAX if no such N exists, where GetAdvanceWidth assumes
      * the effect of
-     * SetLineBreaks(Range(aStart, N), aLineBreakBefore, N < aMaxLength, aProvider)
+     * SetLineBreaks(Range(aStart, N), aLineBreakBefore,
+     *               N < aMaxLength, aProvider)
      *
      * @param aCanWordWrap true if we can break between any two grapheme
      * clusters. This is set by overflow-wrap|word-wrap: break-word
      *
      * @param aBreakPriority in/out the priority of the break opportunity
      * saved in the line. If we are prioritizing break opportunities, we will
      * not set a break with a lower priority. @see gfxBreakPriority.
      *
--- a/gfx/thebes/gfxTypes.h
+++ b/gfx/thebes/gfxTypes.h
@@ -19,18 +19,19 @@ typedef void (*thebes_destroy_func_t) (v
  */
 typedef double gfxFloat;
 
 /**
  * Priority of a line break opportunity.
  *
  * eNoBreak       The line has no break opportunities
  * eWordWrapBreak The line has a break opportunity only within a word. With
- *                overflow-wrap|word-wrap: break-word we will break at this point only if
- *                there are no other break opportunities in the line.
+ *                overflow-wrap|word-wrap: break-word we will break at this
+ *                point only if there are no other break opportunities in the
+ *                line.
  * eNormalBreak   The line has a break opportunity determined by the standard
  *                line-breaking algorithm.
  *
  * Future expansion: split eNormalBreak into multiple priorities, e.g.
  *                    punctuation break and whitespace break (bug 389710).
  *                   As and when we implement it, text-wrap: unrestricted will
  *                    mean that priorities are ignored and all line-break
  *                    opportunities are equal.
--- a/gfx/vr/external_api/moz_external_vr.h
+++ b/gfx/vr/external_api/moz_external_vr.h
@@ -271,17 +271,19 @@ struct VRDisplayState
 
   // When true, indicates that the VR service has shut down
   bool shutdown;
   // Minimum number of milliseconds to wait before attempting
   // to start the VR service again
   uint32_t mMinRestartInterval;
   char mDisplayName[kVRDisplayNameMaxLen];
   // eight byte character code identifier
-  // LSB first, so "ABCDEFGH" -> ('H'<<56) + ('G'<<48) + ('F'<<40) + ('E'<<32) + ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
+  // LSB first, so "ABCDEFGH" -> ('H'<<56) + ('G'<<48) + ('F'<<40) +
+  //                             ('E'<<32) + ('D'<<24) + ('C'<<16) +
+  //                             ('B'<<8) + 'A').
   uint64_t mEightCC;
   VRDisplayCapabilityFlags mCapabilityFlags;
   VRFieldOfView mEyeFOV[VRDisplayState::NumEyes];
   Point3D_POD mEyeTranslation[VRDisplayState::NumEyes];
   IntSize_POD mEyeResolution;
   bool mSuppressFrames;
   bool mIsConnected;
   bool mIsMounted;
--- a/gfx/webrender_bindings/RenderCompositorANGLE.cpp
+++ b/gfx/webrender_bindings/RenderCompositorANGLE.cpp
@@ -158,17 +158,18 @@ RenderCompositorANGLE::Initialize()
 
     DXGI_SWAP_CHAIN_DESC1 desc{};
     desc.Width = 0;
     desc.Height = 0;
     desc.Format = DXGI_FORMAT_B8G8R8A8_UNORM;
     desc.SampleDesc.Count = 1;
     desc.SampleDesc.Quality = 0;
     desc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
-    // Do not use DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL, since it makes HWND unreusable.
+    // Do not use DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL, since it makes HWND
+    // unreusable.
     //desc.BufferCount = 2;
     //desc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL;
     desc.BufferCount = 1;
     desc.SwapEffect = DXGI_SWAP_EFFECT_SEQUENTIAL;
     desc.Scaling = DXGI_SCALING_NONE;
     desc.Flags = 0;
 
     hr = dxgiFactory2->CreateSwapChainForHwnd(mDevice, hwnd, &desc,
--- a/gfx/webrender_bindings/WebRenderAPI.cpp
+++ b/gfx/webrender_bindings/WebRenderAPI.cpp
@@ -12,18 +12,22 @@
 #include "mozilla/gfx/gfxVars.h"
 #include "mozilla/layers/CompositorThread.h"
 #include "mozilla/webrender/RenderCompositor.h"
 #include "mozilla/widget/CompositorWidget.h"
 #include "mozilla/layers/SynchronousTask.h"
 #include "TextDrawTarget.h"
 
 #define WRDL_LOG(...)
-//#define WRDL_LOG(...) printf_stderr("WRDL(%p): " __VA_ARGS__)
-//#define WRDL_LOG(...) if (XRE_IsContentProcess()) printf_stderr("WRDL(%p): " __VA_ARGS__)
+/*
+#define WRDL_LOG(...) printf_stderr("WRDL(%p): " __VA_ARGS__)
+#define WRDL_LOG(...) if (XRE_IsContentProcess()) {              \
+                        printf_stderr("WRDL(%p): " __VA_ARGS__); \
+                      }
+*/
 
 namespace mozilla {
 namespace wr {
 
 using layers::Stringify;
 
 MOZ_DEFINE_MALLOC_SIZE_OF(WebRenderMallocSizeOf)
 
--- a/image/Decoder.h
+++ b/image/Decoder.h
@@ -129,17 +129,18 @@ public:
    * Decodes, reading all data currently available in the SourceBuffer.
    *
    * If more data is needed and @aOnResume is non-null, Decode() will schedule
    * @aOnResume to be called when more data is available.
    *
    * @return a LexerResult which may indicate:
    *   - the image has been successfully decoded (TerminalState::SUCCESS), or
    *   - the image has failed to decode (TerminalState::FAILURE), or
-   *   - the decoder is yielding until it gets more data (Yield::NEED_MORE_DATA), or
+   *   - the decoder is yielding until it gets more data
+   *     (Yield::NEED_MORE_DATA), or
    *   - the decoder is yielding to allow the caller to access intermediate
    *     output (Yield::OUTPUT_AVAILABLE).
    */
   LexerResult Decode(IResumable* aOnResume = nullptr);
 
   /**
    * Terminate this decoder in a failure state, just as if the decoder
    * implementation had returned TerminalState::FAILURE from DoDecode().
--- a/image/RasterImage.h
+++ b/image/RasterImage.h
@@ -183,19 +183,19 @@ public:
   /**
    * Sends the provided progress notifications to ProgressTracker.
    *
    * Main-thread only.
    *
    * @param aProgress    The progress notifications to send.
    * @param aInvalidRect An invalidation rect to send.
    * @param aFrameCount  If Some(), an updated count of the number of frames of
-   *                     animation the decoder has finished decoding so far. This
-   *                     is a lower bound for the total number of animation
-   *                     frames this image has.
+   *                     animation the decoder has finished decoding so far.
+   *                     This is a lower bound for the total number of
+   *                     animation frames this image has.
    * @param aDecoderFlags The decoder flags used by the decoder that generated
    *                      these notifications, or DefaultDecoderFlags() if the
    *                      notifications don't come from a decoder.
    * @param aSurfaceFlags The surface flags used by the decoder that generated
    *                      these notifications, or DefaultSurfaceFlags() if the
    *                      notifications don't come from a decoder.
    */
   void NotifyProgress(Progress aProgress,
--- a/image/SurfaceCache.h
+++ b/image/SurfaceCache.h
@@ -282,18 +282,18 @@ struct SurfaceCache
    * FAILURE if it failed to insert the cache entry, which could happen because
    * of capacity reasons, or because it was already freed by the OS. If the
    * cache entry isn't associated with a locked image, checking for SUCCESS or
    * FAILURE is useless: the entry might expire immediately after being
    * inserted, even though Insert() returned SUCCESS. Thus, many callers do not
    * need to check the result of Insert() at all.
    *
    * @param aProvider    The new cache entry to insert into the cache.
-   * @return SUCCESS if the cache entry was inserted successfully. (But see above
-   *           for more information about when you should check this.)
+   * @return SUCCESS if the cache entry was inserted successfully. (But see
+   *           above for more information about when you should check this.)
    *         FAILURE if the cache entry could not be inserted, e.g. for capacity
    *           reasons. (But see above for more information about when you
    *           should check this.)
    *         FAILURE_ALREADY_PRESENT if an entry with the same ImageKey and
    *           SurfaceKey already exists in the cache.
    */
   static InsertOutcome Insert(NotNull<ISurfaceProvider*> aProvider);
 
--- a/intl/unicharutil/util/nsBidiUtils.h
+++ b/intl/unicharutil/util/nsBidiUtils.h
@@ -83,37 +83,46 @@ typedef enum nsCharType nsCharType;
 
 #define CHARTYPE_IS_RTL(val) ( ( (val) == eCharType_RightToLeft) || ( (val) == eCharType_RightToLeftArabic) )
 
 #define CHARTYPE_IS_WEAK(val) ( ( (val) == eCharType_EuropeanNumberSeparator)    \
                            || ( (val) == eCharType_EuropeanNumberTerminator) \
                            || ( ( (val) > eCharType_ArabicNumber) && ( (val) != eCharType_RightToLeftArabic) ) )
 
   /**
-   * Inspects a Unichar, converting numbers to Arabic or Hindi forms and returning them
+   * Inspects a Unichar, converting numbers to Arabic or Hindi forms and
+   * returning them
    * @param aChar is the character
-   * @param aPrevCharArabic is true if the previous character in the string is an Arabic char
+   * @param aPrevCharArabic is true if the previous character in the string is
+   *        an Arabic char
    * @param aNumFlag specifies the conversion to perform:
    *        IBMBIDI_NUMERAL_NOMINAL:      don't do any conversion
-   *        IBMBIDI_NUMERAL_HINDI:        convert to Hindi forms (Unicode 0660-0669)
-   *        IBMBIDI_NUMERAL_ARABIC:       convert to Arabic forms (Unicode 0030-0039)
-   *        IBMBIDI_NUMERAL_HINDICONTEXT: convert numbers in Arabic text to Hindi, otherwise to Arabic
+   *        IBMBIDI_NUMERAL_HINDI:        convert to Hindi forms
+   *                                        (Unicode 0660-0669)
+   *        IBMBIDI_NUMERAL_ARABIC:       convert to Arabic forms
+   *                                        (Unicode 0030-0039)
+   *        IBMBIDI_NUMERAL_HINDICONTEXT: convert numbers in Arabic text to
+   *                                      Hindi, otherwise to Arabic
    * @return the converted Unichar
    */
   char16_t HandleNumberInChar(char16_t aChar, bool aPrevCharArabic, uint32_t aNumFlag);
 
   /**
-   * Scan a Unichar string, converting numbers to Arabic or Hindi forms in place
+   * Scan a Unichar string, converting numbers to Arabic or Hindi forms in
+   * place
    * @param aBuffer is the string
    * @param aSize is the size of aBuffer
    * @param aNumFlag specifies the conversion to perform:
    *        IBMBIDI_NUMERAL_NOMINAL:      don't do any conversion
-   *        IBMBIDI_NUMERAL_HINDI:        convert to Hindi forms (Unicode 0660-0669)
-   *        IBMBIDI_NUMERAL_ARABIC:       convert to Arabic forms (Unicode 0030-0039)
-   *        IBMBIDI_NUMERAL_HINDICONTEXT: convert numbers in Arabic text to Hindi, otherwise to Arabic
+   *        IBMBIDI_NUMERAL_HINDI:        convert to Hindi forms
+   *                                        (Unicode 0660-0669)
+   *        IBMBIDI_NUMERAL_ARABIC:       convert to Arabic forms
+   *                                        (Unicode 0030-0039)
+   *        IBMBIDI_NUMERAL_HINDICONTEXT: convert numbers in Arabic text to
+   *                                      Hindi, otherwise to Arabic
    */
   nsresult HandleNumbers(char16_t* aBuffer, uint32_t aSize, uint32_t  aNumFlag);
 
   /**
    * Give a UTF-32 codepoint
    * return true if the codepoint is a Bidi control character (LRM, RLM, ALM;
    * LRE, RLE, PDF, LRO, RLO; LRI, RLI, FSI, PDI).
    * Return false, otherwise
--- a/intl/unicharutil/util/nsUnicodeProperties.cpp
+++ b/intl/unicharutil/util/nsUnicodeProperties.cpp
@@ -59,16 +59,17 @@ array.
 
 The division of the remaining 16 bits into Page and Char fields is
 adjusted for each property (by experiment using the generation tool)
 to provide the most compact storage, depending on the distribution
 of values.
 */
 
 const nsUGenCategory sDetailedToGeneralCategory[] = {
+  // clang-format off
   /*
    * The order here corresponds to the HB_UNICODE_GENERAL_CATEGORY_* constants
    * of the hb_unicode_general_category_t enum in gfx/harfbuzz/src/hb-unicode.h.
    */
   /* CONTROL */             nsUGenCategory::kOther,
   /* FORMAT */              nsUGenCategory::kOther,
   /* UNASSIGNED */          nsUGenCategory::kOther,
   /* PRIVATE_USE */         nsUGenCategory::kOther,
@@ -93,19 +94,21 @@ const nsUGenCategory sDetailedToGeneralC
   /* OPEN_PUNCTUATION */    nsUGenCategory::kPunctuation,
   /* CURRENCY_SYMBOL */     nsUGenCategory::kSymbol,
   /* MODIFIER_SYMBOL */     nsUGenCategory::kSymbol,
   /* MATH_SYMBOL */         nsUGenCategory::kSymbol,
   /* OTHER_SYMBOL */        nsUGenCategory::kSymbol,
   /* LINE_SEPARATOR */      nsUGenCategory::kSeparator,
   /* PARAGRAPH_SEPARATOR */ nsUGenCategory::kSeparator,
   /* SPACE_SEPARATOR */     nsUGenCategory::kSeparator
+  // clang-format on
 };
 
 const hb_unicode_general_category_t sICUtoHBcategory[U_CHAR_CATEGORY_COUNT] = {
+  // clang-format off
   HB_UNICODE_GENERAL_CATEGORY_UNASSIGNED, // U_GENERAL_OTHER_TYPES = 0,
   HB_UNICODE_GENERAL_CATEGORY_UPPERCASE_LETTER, // U_UPPERCASE_LETTER = 1,
   HB_UNICODE_GENERAL_CATEGORY_LOWERCASE_LETTER, // U_LOWERCASE_LETTER = 2,
   HB_UNICODE_GENERAL_CATEGORY_TITLECASE_LETTER, // U_TITLECASE_LETTER = 3,
   HB_UNICODE_GENERAL_CATEGORY_MODIFIER_LETTER, // U_MODIFIER_LETTER = 4,
   HB_UNICODE_GENERAL_CATEGORY_OTHER_LETTER, // U_OTHER_LETTER = 5,
   HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK, // U_NON_SPACING_MARK = 6,
   HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK, // U_ENCLOSING_MARK = 7,
@@ -126,16 +129,17 @@ const hb_unicode_general_category_t sICU
   HB_UNICODE_GENERAL_CATEGORY_CONNECT_PUNCTUATION, // U_CONNECTOR_PUNCTUATION = 22,
   HB_UNICODE_GENERAL_CATEGORY_OTHER_PUNCTUATION, // U_OTHER_PUNCTUATION = 23,
   HB_UNICODE_GENERAL_CATEGORY_MATH_SYMBOL, // U_MATH_SYMBOL = 24,
   HB_UNICODE_GENERAL_CATEGORY_CURRENCY_SYMBOL, // U_CURRENCY_SYMBOL = 25,
   HB_UNICODE_GENERAL_CATEGORY_MODIFIER_SYMBOL, // U_MODIFIER_SYMBOL = 26,
   HB_UNICODE_GENERAL_CATEGORY_OTHER_SYMBOL, // U_OTHER_SYMBOL = 27,
   HB_UNICODE_GENERAL_CATEGORY_INITIAL_PUNCTUATION, // U_INITIAL_PUNCTUATION = 28,
   HB_UNICODE_GENERAL_CATEGORY_FINAL_PUNCTUATION, // U_FINAL_PUNCTUATION = 29,
+  // clang-format on
 };
 
 #define DEFINE_BMP_1PLANE_MAPPING_GET_FUNC(prefix_) \
   uint32_t Get##prefix_(uint32_t aCh) \
   { \
     if (aCh >= UNICODE_BMP_LIMIT) { \
       return aCh; \
     } \
--- a/ipc/glue/CrossProcessMutex.h
+++ b/ipc/glue/CrossProcessMutex.h
@@ -19,17 +19,18 @@
 namespace IPC {
 template<typename T>
 struct ParamTraits;
 } // namespace IPC
 
 //
 // Provides:
 //
-//  - CrossProcessMutex, a non-recursive mutex that can be shared across processes
+//  - CrossProcessMutex, a non-recursive mutex that can be shared across
+//    processes
 //  - CrossProcessMutexAutoLock, an RAII class for ensuring that Mutexes are
 //    properly locked and unlocked
 //
 // Using CrossProcessMutexAutoLock/CrossProcessMutexAutoUnlock is MUCH
 // preferred to making bare calls to CrossProcessMutex.Lock and Unlock.
 //
 namespace mozilla {
 #if defined(OS_WIN)
--- a/ipc/glue/GeckoChildProcessHost.cpp
+++ b/ipc/glue/GeckoChildProcessHost.cpp
@@ -776,17 +776,18 @@ GeckoChildProcessHost::PerformAsyncLaunc
       mLaunchOptions->fds_to_remap
         .push_back(std::pair<int,int>(childCrashFd, childCrashRemapFd));
       // "true" == crash reporting enabled
       childArgv.push_back("true");
     } else {
       // "false" == crash reporting disabled
       childArgv.push_back("false");
     }
-#elif defined(MOZ_WIDGET_COCOA) // defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS)
+#elif defined(MOZ_WIDGET_COCOA) /* defined(OS_LINUX) || defined(OS_BSD) || \
+                                   defined(OS_SOLARIS) */
     childArgv.push_back(CrashReporter::GetChildNotificationPipe());
 #endif  // defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS)
   }
 
   int fd = PR_FileDesc2NativeHandle(crashAnnotationWritePipe);
   mLaunchOptions->fds_to_remap.push_back(
     std::make_pair(fd, CrashReporter::GetAnnotationTimeCrashFd()));
 
--- a/ipc/glue/MessageChannel.cpp
+++ b/ipc/glue/MessageChannel.cpp
@@ -1725,18 +1725,19 @@ MessageChannel::Call(Message* aMsg, Mess
 
 #ifdef OS_WIN
         // We need to limit the scoped of neuteredRgn to this spot in the code.
         // Window neutering can't be enabled during some plugin calls because
         // we then risk the neutered window procedure being subclassed by a
         // plugin.
         {
             NeuteredWindowRegion neuteredRgn(mFlags & REQUIRE_DEFERRED_MESSAGE_PROTECTION);
-            /* We should pump messages at this point to ensure that the IPC peer
-               does not become deadlocked on a pending inter-thread SendMessage() */
+            /* We should pump messages at this point to ensure that the IPC
+               peer does not become deadlocked on a pending inter-thread
+               SendMessage() */
             neuteredRgn.PumpOnce();
         }
 #endif
 
         // Now might be the time to process a message deferred because of race
         // resolution.
         MaybeUndeferIncall();
 
@@ -1923,18 +1924,18 @@ MessageChannel::ShouldRunMessage(const M
     }
 
     // If we've timed out a message and we're awaiting the reply to the timed
     // out message, we have to be careful what messages we process. Here's what
     // can go wrong:
     // 1. child sends a NOT_NESTED sync message S
     // 2. parent sends a NESTED_INSIDE_SYNC sync message H at the same time
     // 3. parent times out H
-    // 4. child starts processing H and sends a NESTED_INSIDE_SYNC message H' nested
-    //    within the same transaction
+    // 4. child starts processing H and sends a NESTED_INSIDE_SYNC message H'
+    //    nested within the same transaction
     // 5. parent dispatches S and sends reply
     // 6. child asserts because it instead expected a reply to H'.
     //
     // To solve this, we refuse to process S in the parent until we get a reply
     // to H. More generally, let the timed out message be M. We don't process a
     // message unless the child would need the response to that message in order
     // to process M. Those messages are the ones that have a higher nested level
     // than M or that are part of the same transaction as M.
--- a/ipc/glue/MessageChannel.h
+++ b/ipc/glue/MessageChannel.h
@@ -752,22 +752,23 @@ private:
     // in-msg.
     //
     // The second case is |C<|, an Interrupt in-call; the other side must be blocked.
     // (There's a subtlety here: this in-call might have raced with an
     // out-call, but we detect that with the mechanism below,
     // |mRemoteStackDepth|, and races don't matter to the queue.)
     //
     // Final case, the other side replied to our most recent out-call |R<|.
-    // If that was the *only* out-call on our stack, |?{mInterruptStack.size() == 1}|,
-    // then other side "finished with us," and went back to its own business.
-    // That business might have included sending any number of async message
-    // |A<*| until sending a blocking message |(S< | C<)|.  If we had more than
-    // one Interrupt call on our stack, the other side *better* not have sent us
-    // another blocking message, because it's blocked on a reply from us.
+    // If that was the *only* out-call on our stack,
+    // |?{mInterruptStack.size() == 1}|, then other side "finished with us,"
+    // and went back to its own business.  That business might have included
+    // sending any number of async message |A<*| until sending a blocking
+    // message |(S< | C<)|.  If we had more than one Interrupt call on our
+    // stack, the other side *better* not have sent us another blocking
+    // message, because it's blocked on a reply from us.
     //
     MessageQueue mPending;
 
     // The number of messages in mPending for which IsAlwaysDeferred is false
     // (i.e., the number of messages that might not be deferred, depending on
     // context).
     size_t mMaybeDeferredPendingCount;
 
--- a/js/xpconnect/loader/AutoMemMap.h
+++ b/js/xpconnect/loader/AutoMemMap.h
@@ -1,9 +1,9 @@
-/* -*-  Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4; -*- */
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4; -*- */
 /* 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 loader_AutoMemMap_h
 #define loader_AutoMemMap_h
 
 #include "mozilla/FileUtils.h"
--- a/js/xpconnect/loader/PrecompiledScript.h
+++ b/js/xpconnect/loader/PrecompiledScript.h
@@ -1,9 +1,9 @@
-/* -*-  Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
+/* -*- Mode: C++; 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/. */
 
 #ifndef mozilla_dom_PrecompiledScript_h
 #define mozilla_dom_PrecompiledScript_h
 
 #include "mozilla/dom/BindingDeclarations.h"
--- a/js/xpconnect/loader/ScriptCacheActors.h
+++ b/js/xpconnect/loader/ScriptCacheActors.h
@@ -1,9 +1,9 @@
-/* -*-  Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; -*- */
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; -*- */
 /* 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 ScriptCache_h
 #define ScriptCache_h
 
 #include "mozilla/ScriptPreloader.h"
--- a/js/xpconnect/loader/ScriptPreloader-inl.h
+++ b/js/xpconnect/loader/ScriptPreloader-inl.h
@@ -1,9 +1,9 @@
-/* -*-  Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; -*- */
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; -*- */
 /* 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 ScriptPreloader_inl_h
 #define ScriptPreloader_inl_h
 
 #include "mozilla/Attributes.h"
--- a/js/xpconnect/loader/ScriptPreloader.h
+++ b/js/xpconnect/loader/ScriptPreloader.h
@@ -1,9 +1,9 @@
-/* -*-  Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; -*- */
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; -*- */
 /* 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 ScriptPreloader_h
 #define ScriptPreloader_h
 
 #include "mozilla/CheckedInt.h"
--- a/js/xpconnect/loader/URLPreloader.h
+++ b/js/xpconnect/loader/URLPreloader.h
@@ -1,9 +1,9 @@
-/* -*-  Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; -*- */
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; -*- */
 /* 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 URLPreloader_h
 #define URLPreloader_h
 
 #include "mozilla/FileLocation.h"
--- a/js/xpconnect/wrappers/XrayWrapper.cpp
+++ b/js/xpconnect/wrappers/XrayWrapper.cpp
@@ -758,22 +758,24 @@ JSXrayTraits::defineProperty(JSContext* 
 {
     *defined = false;
     RootedObject holder(cx, ensureHolder(cx, wrapper));
     if (!holder) {
         return false;
     }
 
 
-    // Object and Array instances are special. For those cases, we forward property
-    // definitions to the underlying object if the following conditions are met:
+    // Object and Array instances are special. For those cases, we forward
+    // property definitions to the underlying object if the following
+    // conditions are met:
     // * The property being defined is a value-prop.
-    // * The property being defined is either a primitive or subsumed by the target.
-    // * As seen from the Xray, any existing property that we would overwrite is an
-    //   |own| value-prop.
+    // * The property being defined is either a primitive or subsumed by the
+    //   target.
+    // * As seen from the Xray, any existing property that we would overwrite
+    //   is an |own| value-prop.
     //
     // To avoid confusion, we disallow expandos on Object and Array instances, and
     // therefore raise an exception here if the above conditions aren't met.
     JSProtoKey key = getProtoKey(holder);
     bool isInstance = !isPrototype(holder);
     bool isObjectOrArray = (key == JSProto_Object || key == JSProto_Array);
     if (isObjectOrArray && isInstance) {
         RootedObject target(cx, getTargetObject(wrapper));
--- a/media/gmp-clearkey/0.1/WMFH264Decoder.cpp
+++ b/media/gmp-clearkey/0.1/WMFH264Decoder.cpp
@@ -269,17 +269,18 @@ WMFH264Decoder::GetOutputSample(IMFSampl
   CComPtr<IMFSample> sample;
   hr = CreateOutputSample(&sample);
   ENSURE(SUCCEEDED(hr), hr);
 
   output.pSample = sample;
 
   DWORD status = 0;
   hr = mDecoder->ProcessOutput(0, 1, &output, &status);
-  //LOG(L"WMFH264Decoder::GetOutputSample() ProcessOutput returned 0x%x\n", hr);
+  // LOG(L"WMFH264Decoder::GetOutputSample() ProcessOutput returned 0x%x\n",
+  //     hr);
   CComPtr<IMFCollection> events = output.pEvents; // Ensure this is released.
 
   if (hr == MF_E_TRANSFORM_STREAM_CHANGE) {
     // Type change. Probably geometric apperature change.
     hr = SetDecoderOutputType();
     ENSURE(SUCCEEDED(hr), hr);
 
     return GetOutputSample(aOutSample);
--- a/media/webrtc/signaling/src/common/Wrapper.h
+++ b/media/webrtc/signaling/src/common/Wrapper.h
@@ -6,38 +6,48 @@
 
 /*
  * Wrapper - Helper class for wrapper objects.
  *
  * This helps to construct a shared_ptr object which wraps access to an underlying handle.
  * (The handle could be a pointer to some low-level type, a conventional C handle, an int ID, a GUID, etc.)
  *
  * Usage:
- *   To obtain a FooPtr from a foo_handle_t, call FooPtr Foo::wrap(foo_handle_t);
+ *   To obtain a FooPtr from a foo_handle_t, call
+ *     FooPtr Foo::wrap(foo_handle_t);
  *
- * To implement Foo using Wrapper, Foo needs to include this macro in its class definition:
+ * To implement Foo using Wrapper, Foo needs to include this macro in its class
+ * definition:
  *   CSF_DECLARE_WRAP(Foo, foo_handle_t);
- * It also needs to include this in the cpp file, to provide the wrap() implementation and define the static Wrapper.
+ * It also needs to include this in the cpp file, to provide the wrap()
+ * implementation and define the static Wrapper.
  *   CSF_IMPLEMENT_WRAP(Foo, foo_handle_t);
- * These are all declared in common/Wrapper.h - Foo.h needs to include this too.
- * The client needs to declare Foo(foo_handle_t) as private, and provide a suitable implementation, as well as
- *   implementing wrappers for any other functions to be exposed.
+ * These are all declared in common/Wrapper.h - Foo.h needs to include this
+ * too.
+ * The client needs to declare Foo(foo_handle_t) as private, and provide a
+ * suitable implementation, as well as implementing wrappers for any other
+ * functions to be exposed.
  * The client needs to implement ~Foo() to perform any cleanup as usual.
  *
- * wrap() will always return the same FooPtr for a given foo_handle_t, it will not construct additional objects
- *        if a suitable one already exists.
- * changeHandle() is used in rare cases where the underlying handle is changed, but the wrapper object is intended
- *                to remain.  This is the case for the "fake" CC_DPCall generated on CC_DPLine::CreateCall(), where
- *                the correct IDPCall* is provided later.
- * reset() is a cleanup step to wipe the handle map and allow memory to be reclaimed.
+ * wrap() will always return the same FooPtr for a given foo_handle_t, it will
+ * not construct additional objects if a suitable one already exists.
+ * changeHandle() is used in rare cases where the underlying handle is changed,
+ *                but the wrapper object is intended to remain.  This is the
+ *                case for the "fake" CC_DPCall generated on
+ *                CC_DPLine::CreateCall(), where the correct IDPCall* is
+ *                provided later.
+ * reset() is a cleanup step to wipe the handle map and allow memory to be
+ * reclaimed.
  *
  * Future enhancements:
- * - For now, objects remain in the map forever.  Better would be to add a releaseHandle() function which would
- *   allow the map to be emptied as underlying handles expired.  While we can't force the client to give up its
- *   shared_ptr<Foo> objects, we can remove our own copy, for instance on a call ended event.
+ * - For now, objects remain in the map forever.  Better would be to add a
+ *   releaseHandle() function which would allow the map to be emptied as
+ *   underlying handles expired.  While we can't force the client to give up
+ *   its shared_ptr<Foo> objects, we can remove our own copy, for instance on a
+ *   call ended event.
  */
 
 #include <map>
 #include "prlock.h"
 #include "mozilla/Assertions.h"
 
 /*
  * Wrapper has its own autolock class because the instances are declared
--- a/media/webrtc/signaling/src/media-conduit/AudioConduit.h
+++ b/media/webrtc/signaling/src/media-conduit/AudioConduit.h
@@ -94,53 +94,62 @@ public:
    * Register External Transport to this Conduit. RTP and RTCP frames from the VoiceEngine
    * shall be passed to the registered transport for transporting externally.
    */
   MediaConduitErrorCode SetTransmitterTransport(RefPtr<TransportInterface> aTransport) override;
 
   MediaConduitErrorCode SetReceiverTransport(RefPtr<TransportInterface> aTransport) override;
 
   /**
-   * Function to deliver externally captured audio sample for encoding and transport
+   * Function to deliver externally captured audio sample for encoding and
+   * transport
    * @param audioData [in]: Pointer to array containing a frame of audio
-   * @param lengthSamples [in]: Length of audio frame in samples in multiple of 10 milliseconds
-   *                             Ex: Frame length is 160, 320, 440 for 16, 32, 44 kHz sampling rates
-                                    respectively.
-                                    audioData[] should be of lengthSamples in size
-                                    say, for 16kz sampling rate, audioData[] should contain 160
-                                    samples of 16-bits each for a 10m audio frame.
-   * @param samplingFreqHz [in]: Frequency/rate of the sampling in Hz ( 16000, 32000 ...)
-   * @param capture_delay [in]:  Approx Delay from recording until it is delivered to VoiceEngine
-                                 in milliseconds.
-   * NOTE: ConfigureSendMediaCodec() SHOULD be called before this function can be invoked
-   *       This ensures the inserted audio-samples can be transmitted by the conduit
-   *
+   * @param lengthSamples [in]: Length of audio frame in samples in multiple of
+   *                             10 milliseconds
+   *                             Ex: Frame length is 160, 320, 440 for 16, 32,
+   *                             44 kHz sampling rates respectively.
+   *                             audioData[] should be of lengthSamples in
+   *                             size say, for 16kz sampling rate,
+   *                             audioData[] should contain 160 samples of
+   *                             16-bits each for a 10m audio frame.
+   * @param samplingFreqHz [in]: Frequency/rate of the sampling in Hz
+   *                             ( 16000, 32000 ...)
+   * @param capture_delay [in]:  Approx Delay from recording until it is
+   *                             delivered to VoiceEngine in milliseconds.
+   * NOTE: ConfigureSendMediaCodec() SHOULD be called before this function can
+   * be invoked. This ensures the inserted audio-samples can be transmitted by
+   * the conduit
    */
   MediaConduitErrorCode SendAudioFrame(const int16_t speechData[],
                                        int32_t lengthSamples,
                                        int32_t samplingFreqHz,
                                        uint32_t channels,
                                        int32_t capture_time) override;
 
   /**
-   * Function to grab a decoded audio-sample from the media engine for rendering
-   * / playoutof length 10 milliseconds.
+   * Function to grab a decoded audio-sample from the media engine for
+   * rendering / playoutof length 10 milliseconds.
    *
-   * @param speechData [in]: Pointer to a array to which a 10ms frame of audio will be copied
-   * @param samplingFreqHz [in]: Frequency of the sampling for playback in Hertz (16000, 32000,..)
-   * @param capture_delay [in]: Estimated Time between reading of the samples to rendering/playback
+   * @param speechData [in]: Pointer to a array to which a 10ms frame of audio
+   *                         will be copied
+   * @param samplingFreqHz [in]: Frequency of the sampling for playback in
+   *                             Hertz (16000, 32000,..)
+   * @param capture_delay [in]: Estimated Time between reading of the samples
+   *                            to rendering/playback
    * @param lengthSamples [in]: Contain maximum length of speechData array.
-   * @param lengthSamples [out]: Will contain length of the audio frame in samples at return.
-                                 Ex: A value of 160 implies 160 samples each of 16-bits was copied
-                                     into speechData
+   * @param lengthSamples [out]: Will contain length of the audio frame in
+   *                             samples at return.
+   *                             Ex: A value of 160 implies 160 samples each of
+   *                             16-bits was copied into speechData
    * NOTE: This function should be invoked every 10 milliseconds for the best
-   *          peformance
-   * NOTE: ConfigureRecvMediaCodec() SHOULD be called before this function can be invoked
-   *       This ensures the decoded samples are ready for reading and playout is enabled.
-   *
+   * peformance
+   * NOTE: ConfigureRecvMediaCodec() SHOULD be called before this function can
+   * be invoked
+   * This ensures the decoded samples are ready for reading and playout is
+   * enabled.
    */
    MediaConduitErrorCode GetAudioFrame(int16_t speechData[],
                                        int32_t samplingFreqHz,
                                        int32_t capture_delay,
                                        int& lengthSamples) override;
 
 
   /**
--- a/media/webrtc/signaling/src/media-conduit/MediaConduitInterface.h
+++ b/media/webrtc/signaling/src/media-conduit/MediaConduitInterface.h
@@ -199,17 +199,18 @@ public:
   virtual std::vector<unsigned int> GetLocalSSRCs() = 0;
 
   /**
   * Adds negotiated RTP header extensions to the the conduit. Unknown extensions
   * are ignored.
   * @param aDirection the local direction to set the RTP header extensions for
   * @param aExtensions the RTP header extensions to set
   * @return if all extensions were set it returns a success code,
-  *         if an extension fails to set it may immediately return an error code
+  *         if an extension fails to set it may immediately return an error
+  *         code
   * TODO webrtc.org 64 update: make return type void again
   */
   virtual MediaConduitErrorCode
   SetLocalRTPExtensions(MediaSessionConduitLocalDirection aDirection,
                         const RtpExtList& aExtensions) = 0;
 
   virtual bool GetRemoteSSRC(unsigned int* ssrc) = 0;
   virtual bool SetRemoteSSRC(unsigned int ssrc) = 0;
@@ -452,29 +453,30 @@ public:
   virtual MediaConduitErrorCode SendVideoFrame(
     const webrtc::VideoFrame& frame) = 0;
 
   virtual MediaConduitErrorCode ConfigureCodecMode(webrtc::VideoCodecMode) = 0;
 
   /**
    * Function to configure send codec for the video session
    * @param sendSessionConfig: CodecConfiguration
-   * @result: On Success, the video engine is configured with passed in codec for send
-   *          On failure, video engine transmit functionality is disabled.
-   * NOTE: This API can be invoked multiple time. Invoking this API may involve restarting
-   *        transmission sub-system on the engine
+   * @result: On Success, the video engine is configured with passed in codec
+   *          for send. On failure, video engine transmit functionality is
+   *          disabled.
+   * NOTE: This API can be invoked multiple time. Invoking this API may involve
+   *       restarting transmission sub-system on the engine
    *
    */
   virtual MediaConduitErrorCode ConfigureSendMediaCodec(const VideoCodecConfig* sendSessionConfig) = 0;
 
   /**
    * Function to configurelist of receive codecs for the video session
    * @param sendSessionConfig: CodecConfiguration
-   * NOTE: This API can be invoked multiple time. Invoking this API may involve restarting
-   *        reception sub-system on the engine
+   * NOTE: This API can be invoked multiple time. Invoking this API may involve
+   *       restarting reception sub-system on the engine
    *
    */
   virtual MediaConduitErrorCode ConfigureRecvMediaCodecs(
       const std::vector<UniquePtr<VideoCodecConfig>>& recvCodecConfigList) = 0;
 
   /**
     * These methods allow unit tests to double-check that the
     * rtcp-fb settings are as expected.
@@ -525,51 +527,60 @@ public:
   virtual ~AudioSessionConduit() {}
 
   Type type() const override { return AUDIO; }
 
   MediaConduitErrorCode
   SetLocalRTPExtensions(MediaSessionConduitLocalDirection aDirection,
                         const RtpExtList& extensions) override = 0;
   /**
-   * Function to deliver externally captured audio sample for encoding and transport
+   * Function to deliver externally captured audio sample for encoding and
+   * transport
    * @param audioData [in]: Pointer to array containing a frame of audio
-   * @param lengthSamples [in]: Length of audio frame in samples in multiple of 10 milliseconds
-  *                             Ex: Frame length is 160, 320, 440 for 16, 32, 44 kHz sampling rates
-                                    respectively.
-                                    audioData[] is lengthSamples in size
-                                    say, for 16kz sampling rate, audioData[] should contain 160
-                                    samples of 16-bits each for a 10m audio frame.
-   * @param samplingFreqHz [in]: Frequency/rate of the sampling in Hz ( 16000, 32000 ...)
-   * @param capture_delay [in]:  Approx Delay from recording until it is delivered to VoiceEngine
-                                 in milliseconds.
-   * NOTE: ConfigureSendMediaCodec() SHOULD be called before this function can be invoked
-   *       This ensures the inserted audio-samples can be transmitted by the conduit
+   * @param lengthSamples [in]: Length of audio frame in samples in multiple of
+   *                            10 milliseconds
+   *                            Ex: Frame length is 160, 320, 440 for 16, 32,
+   *                                44 kHz sampling rates respectively.
+   *                                audioData[] is lengthSamples in size
+   *                                say, for 16kz sampling rate, audioData[]
+   *                                should contain 160 samples of 16-bits each
+   *                                for a 10m audio frame.
+   * @param samplingFreqHz [in]: Frequency/rate of the sampling in Hz ( 16000,
+   *                             32000 ...)
+   * @param capture_delay [in]:  Approx Delay from recording until it is
+   *                             delivered to VoiceEngine in milliseconds.
+   * NOTE: ConfigureSendMediaCodec() SHOULD be called before this function can
+   * be invoked. This ensures the inserted audio-samples can be transmitted by
+   * the conduit.
    *
    */
   virtual MediaConduitErrorCode SendAudioFrame(const int16_t audioData[],
                                                int32_t lengthSamples,
                                                int32_t samplingFreqHz,
                                                uint32_t channels,
                                                int32_t capture_delay) = 0;
 
   /**
    * Function to grab a decoded audio-sample from the media engine for rendering
    * / playoutof length 10 milliseconds.
    *
-   * @param speechData [in]: Pointer to a array to which a 10ms frame of audio will be copied
-   * @param samplingFreqHz [in]: Frequency of the sampling for playback in Hertz (16000, 32000,..)
-   * @param capture_delay [in]: Estimated Time between reading of the samples to rendering/playback
-   * @param lengthSamples [out]: Will contain length of the audio frame in samples at return.
-                                 Ex: A value of 160 implies 160 samples each of 16-bits was copied
-                                     into speechData
+   * @param speechData [in]: Pointer to a array to which a 10ms frame of audio
+   *                         will be copied
+   * @param samplingFreqHz [in]: Frequency of the sampling for playback in
+   *                             Hertz (16000, 32000,..)
+   * @param capture_delay [in]: Estimated Time between reading of the samples
+   *                            to rendering/playback
+   * @param lengthSamples [out]: Will contain length of the audio frame in
+   *                             samples at return.
+   *                             Ex: A value of 160 implies 160 samples each of
+   *                                 16-bits was copied into speechData
    * NOTE: This function should be invoked every 10 milliseconds for the best
-   *          peformance
-   * NOTE: ConfigureRecvMediaCodec() SHOULD be called before this function can be invoked
-   *       This ensures the decoded samples are ready for reading.
+   * peformance
+   * NOTE: ConfigureRecvMediaCodec() SHOULD be called before this function can
+   * be invoked. This ensures the decoded samples are ready for reading.
    *
    */
   virtual MediaConduitErrorCode GetAudioFrame(int16_t speechData[],
                                               int32_t samplingFreqHz,
                                               int32_t capture_delay,
                                               int& lengthSamples) = 0;
 
   /**
--- a/media/webrtc/signaling/src/media-conduit/VideoConduit.h
+++ b/media/webrtc/signaling/src/media-conduit/VideoConduit.h
@@ -120,31 +120,33 @@ public:
   /**
    * Function to configure sending codec mode for different content
    */
   MediaConduitErrorCode ConfigureCodecMode(webrtc::VideoCodecMode) override;
 
    /**
    * Function to configure send codec for the video session
    * @param sendSessionConfig: CodecConfiguration
-   * @result: On Success, the video engine is configured with passed in codec for send
+   * @result: On Success, the video engine is configured with passed in codec
+   *          for send
    *          On failure, video engine transmit functionality is disabled.
-   * NOTE: This API can be invoked multiple time. Invoking this API may involve restarting
-   *        transmission sub-system on the engine.
+   * NOTE: This API can be invoked multiple time. Invoking this API may involve
+   * restarting transmission sub-system on the engine.
    */
   MediaConduitErrorCode ConfigureSendMediaCodec(const VideoCodecConfig* codecInfo) override;
 
   /**
    * Function to configure list of receive codecs for the video session
    * @param sendSessionConfig: CodecConfiguration
-   * @result: On Success, the video engine is configured with passed in codec for send
+   * @result: On Success, the video engine is configured with passed in codec
+   *          for send
    *          Also the playout is enabled.
    *          On failure, video engine transmit functionality is disabled.
-   * NOTE: This API can be invoked multiple time. Invoking this API may involve restarting
-   *        transmission sub-system on the engine.
+   * NOTE: This API can be invoked multiple time. Invoking this API may involve
+   * restarting transmission sub-system on the engine.
    */
    MediaConduitErrorCode ConfigureRecvMediaCodecs(
        const std::vector<UniquePtr<VideoCodecConfig>>& codecConfigList) override;
 
   /**
    * Register Transport for this Conduit. RTP and RTCP frames from the VideoEngine
    * shall be passed to the registered transport for transporting externally.
    */
--- a/media/webrtc/signaling/src/mediapipeline/RtpLogger.h
+++ b/media/webrtc/signaling/src/mediapipeline/RtpLogger.h
@@ -10,17 +10,18 @@
 #include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h"
 #include "mtransport/mediapacket.h"
 
 namespace mozilla {
 
 /* This class logs RTP and RTCP packets in hex in a format compatible to
  * text2pcap.
  * Example to convert the MOZ log file into a PCAP file:
- *   egrep '(RTP_PACKET|RTCP_PACKET)' moz.log | text2pcap -D -n -l 1 -i 17 -u 1234,1235 -t '%H:%M:%S.' - rtp.pcap
+ *   egrep '(RTP_PACKET|RTCP_PACKET)' moz.log | \
+ *     text2pcap -D -n -l 1 -i 17 -u 1234,1235 -t '%H:%M:%S.' - rtp.pcap
  */
 class RtpLogger {
 public:
   static bool IsPacketLoggingOn();
   static void LogPacket(const MediaPacket& packet, bool input,
                         std::string desc);
 };
 
--- a/media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.cpp
+++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionCtx.cpp
@@ -182,17 +182,18 @@ void PeerConnectionCtx::Destroy() {
   }
 
   StopWebRtcLog();
 }
 
 // Telemetry reporting every second after start of first call.
 // The threading model around the media pipelines is weird:
 // - The pipelines are containers,
-// - containers that are only safe on main thread, with members only safe on STS,
+// - containers that are only safe on main thread, with members only safe on
+//   STS,
 // - hence the there and back again approach.
 
 static auto
 FindId(const Sequence<RTCInboundRTPStreamStats>& aArray,
        const nsString &aId) -> decltype(aArray.Length()) {
   for (decltype(aArray.Length()) i = 0; i < aArray.Length(); i++) {
     if (aArray[i].mId.Value() == aId) {
       return i;
--- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
+++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
@@ -1210,17 +1210,18 @@ PeerConnectionImpl::CreateDataChannel(co
 //
 // Without it, each weak-ref call in this file would look like this:
 //
 //  nsCOMPtr<nsISupportsWeakReference> tmp = do_QueryReferent(mPCObserver);
 //  if (!tmp) {
 //    return;
 //  }
 //  RefPtr<nsSupportsWeakReference> tmp2 = do_QueryObject(tmp);
-//  RefPtr<PeerConnectionObserver> pco = static_cast<PeerConnectionObserver*>(&*tmp2);
+//  RefPtr<PeerConnectionObserver> pco =
+//    static_cast<PeerConnectionObserver*>(&*tmp2);
 
 static already_AddRefed<PeerConnectionObserver>
 do_QueryObjectReferent(nsIWeakReference* aRawPtr) {
   nsCOMPtr<nsISupportsWeakReference> tmp = do_QueryReferent(aRawPtr);
   if (!tmp) {
     return nullptr;
   }
   RefPtr<nsSupportsWeakReference> tmp2 = do_QueryObject(tmp);
--- a/mfbt/Attributes.h
+++ b/mfbt/Attributes.h
@@ -567,18 +567,18 @@
  *   a new expression (unless placement new is being used). If a member of
  *   another class uses this class, or if another class inherits from this
  *   class, then it is considered to be a stack class as well, although this
  *   attribute need not be provided in such cases.
  * MOZ_NONHEAP_CLASS: Applies to all classes. Any class with this annotation is
  *   expected to live on the stack or in static storage, so it is a compile-time
  *   error to use it, or an array of such objects, as the type of a new
  *   expression. If a member of another class uses this class, or if another
- *   class inherits from this class, then it is considered to be a non-heap class
- *   as well, although this attribute need not be provided in such cases.
+ *   class inherits from this class, then it is considered to be a non-heap
+ *   class as well, although this attribute need not be provided in such cases.
  * MOZ_HEAP_CLASS: Applies to all classes. Any class with this annotation is
  *   expected to live on the heap, so it is a compile-time error to use it, or
  *   an array of such objects, as the type of a variable declaration, or as a
  *   temporary object. If a member of another class uses this class, or if
  *   another class inherits from this class, then it is considered to be a heap
  *   class as well, although this attribute need not be provided in such cases.
  * MOZ_NON_TEMPORARY_CLASS: Applies to all classes. Any class with this
  *   annotation is expected not to live in a temporary. If a member of another
@@ -632,46 +632,48 @@
  *   validating the usage of pointers otherwise.
  *
  *   Example uses include owned pointers inside of unions, and pointers stored
  *   in POD types where a using a smart pointer class would make the object
  *   non-POD.
  * MOZ_NON_OWNING_REF: Applies to declarations of pointers to reference counted
  *   types.  This attribute tells the compiler that the raw pointer is a weak
  *   reference, which is ensured to be valid by a guarantee that the reference
- *   will be nulled before the pointer becomes invalid.  This can make the compiler
- *   ignore these pointers when validating the usage of pointers otherwise.
+ *   will be nulled before the pointer becomes invalid.  This can make the
+ *   compiler ignore these pointers when validating the usage of pointers
+ *   otherwise.
  *
  *   Examples include an mOwner pointer, which is nulled by the owning class's
  *   destructor, and is null-checked before dereferencing.
- * MOZ_UNSAFE_REF: Applies to declarations of pointers to reference counted types.
- *   Occasionally there are non-owning references which are valid, but do not take
- *   the form of a MOZ_NON_OWNING_REF.  Their safety may be dependent on the behaviour
- *   of API consumers.  The string argument passed to this macro documents the safety
- *   conditions.  This can make the compiler ignore these pointers when validating
- *   the usage of pointers elsewhere.
+ * MOZ_UNSAFE_REF: Applies to declarations of pointers to reference counted
+ *   types.  Occasionally there are non-owning references which are valid, but
+ *   do not take the form of a MOZ_NON_OWNING_REF.  Their safety may be
+ *   dependent on the behaviour of API consumers.  The string argument passed
+ *   to this macro documents the safety conditions.  This can make the compiler
+ *   ignore these pointers when validating the usage of pointers elsewhere.
  *
- *   Examples include an nsAtom* member which is known at compile time to point to a
- *   static atom which is valid throughout the lifetime of the program, or an API which
- *   stores a pointer, but doesn't take ownership over it, instead requiring the API
- *   consumer to correctly null the value before it becomes invalid.
+ *   Examples include an nsAtom* member which is known at compile time to point
+ *   to a static atom which is valid throughout the lifetime of the program, or
+ *   an API which stores a pointer, but doesn't take ownership over it, instead
+ *   requiring the API consumer to correctly null the value before it becomes
+ *   invalid.
  *
- *   Use of this annotation is discouraged when a strong reference or one of the above
- *   two annotations can be used instead.
+ *   Use of this annotation is discouraged when a strong reference or one of
+ *   the above two annotations can be used instead.
  * MOZ_NO_ADDREF_RELEASE_ON_RETURN: Applies to function declarations.  Makes it
  *   a compile time error to call AddRef or Release on the return value of a
  *   function.  This is intended to be used with operator->() of our smart
  *   pointer classes to ensure that the refcount of an object wrapped in a
  *   smart pointer is not manipulated directly.
  * MOZ_MUST_USE_TYPE: Applies to type declarations.  Makes it a compile time
  *   error to not use the return value of a function which has this type.  This
  *   is intended to be used with types which it is an error to not use.
  * MOZ_NEEDS_NO_VTABLE_TYPE: Applies to template class declarations.  Makes it
- *   a compile time error to instantiate this template with a type parameter which
- *   has a VTable.
+ *   a compile time error to instantiate this template with a type parameter
+ *   which has a VTable.
  * MOZ_NON_MEMMOVABLE: Applies to class declarations for types that are not safe
  *   to be moved in memory using memmove().
  * MOZ_NEEDS_MEMMOVABLE_TYPE: Applies to template class declarations where the
  *   template arguments are required to be safe to move in memory using
  *   memmove().  Passing MOZ_NON_MEMMOVABLE types to these templates is a
  *   compile time error.
  * MOZ_NEEDS_MEMMOVABLE_MEMBERS: Applies to class declarations where each member
  *   must be safe to move in memory using memmove().  MOZ_NON_MEMMOVABLE types
@@ -686,31 +688,32 @@
  *   function. This annotation can be used in those cases.
  * MOZ_INHERIT_TYPE_ANNOTATIONS_FROM_TEMPLATE_ARGS: Applies to template class
  *   declarations where an instance of the template should be considered, for
  *   static analysis purposes, to inherit any type annotations (such as
  *   MOZ_MUST_USE_TYPE and MOZ_STACK_CLASS) from its template arguments.
  * MOZ_INIT_OUTSIDE_CTOR: Applies to class member declarations. Occasionally
  *   there are class members that are not initialized in the constructor,
  *   but logic elsewhere in the class ensures they are initialized prior to use.
- *   Using this attribute on a member disables the check that this member must be
- *   initialized in constructors via list-initialization, in the constructor body,
- *   or via functions called from the constructor body.
+ *   Using this attribute on a member disables the check that this member must
+ *   be initialized in constructors via list-initialization, in the constructor
+ *   body, or via functions called from the constructor body.
  * MOZ_IS_CLASS_INIT: Applies to class method declarations. Occasionally the
- *   constructor doesn't initialize all of the member variables and another function
- *   is used to initialize the rest. This marker is used to make the static analysis
- *   tool aware that the marked function is part of the initialization process
- *   and to include the marked function in the scan mechanism that determines which
- *   member variables still remain uninitialized.
+ *   constructor doesn't initialize all of the member variables and another
+ *   function is used to initialize the rest. This marker is used to make the
+ *   static analysis tool aware that the marked function is part of the
+ *   initialization process and to include the marked function in the scan
+ *   mechanism that determines which member variables still remain
+ *   uninitialized.
  * MOZ_NON_PARAM: Applies to types. Makes it compile time error to use the type
  *   in parameter without pointer or reference.
- * MOZ_NON_AUTOABLE: Applies to class declarations. Makes it a compile time error to
- *   use `auto` in place of this type in variable declarations.  This is intended to
- *   be used with types which are intended to be implicitly constructed into other
- *   other types before being assigned to variables.
+ * MOZ_NON_AUTOABLE: Applies to class declarations. Makes it a compile time
+ *   error to use `auto` in place of this type in variable declarations.  This
+ *   is intended to be used with types which are intended to be implicitly
+ *   constructed into other other types before being assigned to variables.
  * MOZ_REQUIRED_BASE_METHOD: Applies to virtual class method declarations.
  *   Sometimes derived classes override methods that need to be called by their
  *   overridden counterparts. This marker indicates that the marked method must
  *   be called by the method that it overrides.
  * MOZ_MUST_RETURN_FROM_CALLER: Applies to function or method declarations.
  *   Callers of the annotated function/method must return from that function
  *   within the calling block using an explicit `return` statement.
  *   Only calls to Constructors, references to local and member variables,
--- a/mfbt/Move.h
+++ b/mfbt/Move.h
@@ -132,17 +132,18 @@ namespace mozilla {
  *   C::C(X&& x, Y&  y) : x(std::move(x)), y(y)       { }
  *   C::C(X&& x, Y&& y) : x(std::move(x)), y(std::move(y)) { }
  *
  * To avoid this, C++11 has tweaks to make it possible to write what you mean.
  * The four constructor overloads above can be written as one constructor
  * template like so[0]:
  *
  *   template <typename XArg, typename YArg>
- *   C::C(XArg&& x, YArg&& y) : x(std::forward<XArg>(x)), y(std::forward<YArg>(y)) { }
+ *   C::C(XArg&& x, YArg&& y) : x(std::forward<XArg>(x)),
+ *                              y(std::forward<YArg>(y)) { }
  *
  * ("'Don't Repeat Yourself'? What's that?")
  *
  * This takes advantage of two new rules in C++11:
  *
  * - First, when a function template takes an argument that is an rvalue
  *   reference to a template argument (like 'XArg&& x' and 'YArg&& y' above),
  *   then when the argument is applied to an lvalue, the template argument
--- a/mfbt/Span.h
+++ b/mfbt/Span.h
@@ -443,18 +443,21 @@ public:
   using const_iterator =
     span_details::span_iterator<Span<ElementType, Extent>, true>;
   using reverse_iterator = std::reverse_iterator<iterator>;
   using const_reverse_iterator = std::reverse_iterator<const_iterator>;
 
   constexpr static const index_type extent = Extent;
 
   // [Span.cons], Span constructors, copy, assignment, and destructor
-  // "Dependent" is needed to make "span_details::enable_if_t<(Dependent || Extent == 0 || Extent == mozilla::MaxValue<size_t>::value)>" SFINAE,
-  // since "span_details::enable_if_t<(Extent == 0 || Extent == mozilla::MaxValue<size_t>::value)>" is ill-formed when Extent is neither of the extreme values.
+  // "Dependent" is needed to make "span_details::enable_if_t<(Dependent ||
+  //   Extent == 0 || Extent == mozilla::MaxValue<size_t>::value)>" SFINAE,
+  // since "span_details::enable_if_t<(Extent == 0 || Extent ==
+  //   mozilla::MaxValue<size_t>::value)>" is ill-formed when Extent is neither
+  //   of the extreme values.
   /**
    * Constructor with no args.
    */
   template<
     bool Dependent = false,
     class = span_details::enable_if_t<
       (Dependent || Extent == 0 || Extent == mozilla::MaxValue<size_t>::value)>>
   constexpr Span()
--- a/mfbt/ThreadSafeWeakPtr.h
+++ b/mfbt/ThreadSafeWeakPtr.h
@@ -38,17 +38,18 @@
  *   {
  *     RefPtr<C> strong = new C;
  *     if (strong) {
  *       strong->doStuff();
  *     }
  *     // Make a new weak reference to the object from the strong reference.
  *     weak = strong;
  *   }
- *   MOZ_ASSERT(!bool(weak), "Weak pointers are cleared after all strong references are released.");
+ *   MOZ_ASSERT(!bool(weak), "Weak pointers are cleared after all "
+ *                           "strong references are released.");
  *
  *   // Convert the weak reference to a strong reference for usage.
  *   RefPtr<C> other(weak);
  *   if (other) {
  *     other->doStuff();
  *   }
  */
 
--- a/mfbt/WrappingOperations.h
+++ b/mfbt/WrappingOperations.h
@@ -137,19 +137,22 @@ public:
  *   WrappingAdd(uint32_t(42), uint32_t(17)) is 59 (59 mod 2**32);
  *   WrappingAdd(uint8_t(240), uint8_t(20)) is 4 (260 mod 2**8).
  *
  * Unsigned WrappingAdd acts exactly like C++ unsigned addition.
  *
  * For N-bit signed integer types, this is equivalent to adding the two numbers
  * wrapped to unsigned, then wrapping the sum mod 2**N to the signed range:
  *
- *   WrappingAdd(int16_t(32767), int16_t(3)) is -32766 ((32770 mod 2**16) - 2**16);
- *   WrappingAdd(int8_t(-128), int8_t(-128)) is 0 (256 mod 2**8);
- *   WrappingAdd(int32_t(-42), int32_t(-17)) is -59 ((8589934533 mod 2**32) - 2**32).
+ *   WrappingAdd(int16_t(32767), int16_t(3)) is
+ *     -32766 ((32770 mod 2**16) - 2**16);
+ *   WrappingAdd(int8_t(-128), int8_t(-128)) is
+ *     0 (256 mod 2**8);
+ *   WrappingAdd(int32_t(-42), int32_t(-17)) is
+ *     -59 ((8589934533 mod 2**32) - 2**32).
  *
  * There's no equivalent to this operation in C++, as C++ signed addition that
  * overflows has undefined behavior.  But it's how such addition *tends* to
  * behave with most compilers, unless an optimization or similar -- quite
  * permissibly -- triggers different behavior.
  */
 template<typename T>
 constexpr T
@@ -248,17 +251,18 @@ public:
  * So it's especially important to use WrappingMultiply for wraparound math with
  * uint16_t.  That quirk aside, this function acts like you *thought* C++
  * unsigned multiplication always worked.
  *
  * For N-bit signed integer types, this is equivalent to multiplying the two
  * numbers wrapped to unsigned, then wrapping the product mod 2**N to the signed
  * range:
  *
- *   WrappingMultiply(int16_t(-456), int16_t(123)) is 9448 ((-56088 mod 2**16) + 2**16);
+ *   WrappingMultiply(int16_t(-456), int16_t(123)) is
+ *     9448 ((-56088 mod 2**16) + 2**16);
  *   WrappingMultiply(int32_t(-7), int32_t(-9)) is 63 (63 mod 2**32);
  *   WrappingMultiply(int8_t(16), int8_t(24)) is -128 ((384 mod 2**8) - 2**8);
  *   WrappingMultiply(int8_t(16), int8_t(255)) is -16 ((4080 mod 2**8) - 2**8).
  *
  * There's no equivalent to this operation in C++, as C++ signed
  * multiplication that overflows has undefined behavior.  But it's how such
  * multiplication *tends* to behave with most compilers, unless an optimization
  * or similar -- quite permissibly -- triggers different behavior.