Bug 1511854 - Part 2: Fix some more formatting oddities in layout/ after the clang-format. r=TYLin
authorCameron McCormack <cam@mcc.id.au>
Wed, 05 Dec 2018 18:44:05 +0000
changeset 449421 89fd36f5fbe5e90bf16563342819fa6700431ccb
parent 449420 9d18f3b4b898108d8ab5c924d366d145e5e62df0
child 449440 643a4a6bbfe98aacb7f285b8f9e0a001794a9f8e
child 449441 45f63618f66e184f8b20da48fe37fb3f546094f2
push id35162
push usershindli@mozilla.com
push dateWed, 05 Dec 2018 21:34:51 +0000
treeherdermozilla-central@89fd36f5fbe5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersTYLin
bugs1511854
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 1511854 - Part 2: Fix some more formatting oddities in layout/ after the clang-format. r=TYLin Depends on D13686 Differential Revision: https://phabricator.services.mozilla.com/D13775
layout/base/MobileViewportManager.cpp
layout/base/PresShell.cpp
layout/base/StaticPresData.cpp
layout/base/nsBidiPresUtils.cpp
layout/base/nsCSSFrameConstructor.cpp
layout/base/nsCaret.cpp
layout/base/nsDocumentViewer.cpp
layout/base/nsLayoutUtils.cpp
layout/forms/nsListControlFrame.cpp
layout/forms/nsTextControlFrame.cpp
layout/generic/ReflowInput.cpp
layout/generic/ScrollSnap.cpp
layout/generic/ViewportFrame.cpp
layout/generic/nsAbsoluteContainingBlock.cpp
layout/generic/nsContainerFrame.cpp
layout/generic/nsFlexContainerFrame.cpp
layout/generic/nsFloatManager.cpp
layout/generic/nsFrame.cpp
layout/generic/nsFrameSelection.cpp
layout/generic/nsGfxScrollFrame.cpp
layout/generic/nsLineBox.cpp
layout/generic/nsPluginFrame.cpp
layout/generic/nsTextFrame.cpp
layout/generic/nsTextRunTransformations.cpp
layout/mathml/nsMathMLContainerFrame.cpp
layout/mathml/nsMathMLmpaddedFrame.cpp
layout/mathml/nsMathMLmtableFrame.cpp
layout/painting/FrameLayerBuilder.cpp
layout/style/CounterStyleManager.cpp
layout/style/FontFaceSet.cpp
layout/style/StyleSheet.cpp
layout/style/nsStyleStruct.cpp
layout/svg/SVGTextFrame.cpp
layout/tables/nsTableFrame.cpp
layout/xul/nsBoxFrame.cpp
layout/xul/nsImageBoxFrame.cpp
layout/xul/nsMenuFrame.cpp
layout/xul/nsScrollbarFrame.cpp
--- a/layout/base/MobileViewportManager.cpp
+++ b/layout/base/MobileViewportManager.cpp
@@ -275,36 +275,32 @@ void MobileViewportManager::UpdateResolu
       // visible within the display width. Note that "actual content" may be
       // different with respect to CSS pixels because of the CSS viewport size
       // changing.
       //
       // aDisplayWidthChangeRatio is non-empty if:
       // (a) The meta-viewport tag information changes, and so the CSS viewport
       //     might change as a result. If this happens after the content has
       //     been painted, we want to adjust the zoom to compensate. OR
-      // (b) The display size changed from a nonzero value to another nonzero
-      // value.
-      //     This covers the case where e.g. the device was rotated, and again
-      //     we want to adjust the zoom to compensate.
+      // (b) The display size changed from a nonzero value to another
+      //     nonzero value. This covers the case where e.g. the device was
+      //     rotated, and again we want to adjust the zoom to compensate.
       // Note in particular that aDisplayWidthChangeRatio will be None if all
       // that happened was a change in the full-zoom. In this case, we still
       // want to compute a new CSS viewport, but we don't want to update the
       // resolution.
       //
       // Given the above, the algorithm below accounts for all types of changes
       // I can conceive of:
       // 1. screen size changes, CSS viewport does not (pages with no meta
-      // viewport
-      //    or a fixed size viewport)
+      //    viewport or a fixed size viewport)
       // 2. screen size changes, CSS viewport also does (pages with a
-      // device-width
-      //    viewport)
+      //    device-width viewport)
       // 3. screen size remains constant, but CSS viewport changes (meta
-      // viewport
-      //    tag is added or removed)
+      //    viewport tag is added or removed)
       // 4. neither screen size nor CSS viewport changes
       if (aDisplayWidthChangeRatio) {
         newZoom = Some(
             ScaleZoomWithDisplayWidth(zoom, aDisplayWidthChangeRatio.value(),
                                       viewportSize, mMobileViewportSize));
       }
     }
   } else {  // aType == UpdateType::ContentSize
--- a/layout/base/PresShell.cpp
+++ b/layout/base/PresShell.cpp
@@ -359,21 +359,21 @@ class ReflowCountMgr {
 
   void PaintCount(const char* aName, gfxContext* aRenderingContext,
                   nsPresContext* aPresContext, nsIFrame* aFrame,
                   const nsPoint& aOffset, uint32_t aColor);
 
   FILE* GetOutFile() { return mFD; }
 
   void SetPresContext(nsPresContext* aPresContext) {
-    mPresContext = aPresContext;
-  }  // weak reference
+    mPresContext = aPresContext;  // weak reference
+  }
   void SetPresShell(nsIPresShell* aPresShell) {
-    mPresShell = aPresShell;
-  }  // weak reference
+    mPresShell = aPresShell;  // weak reference
+  }
 
   void SetDumpFrameCounts(bool aVal) { mDumpFrameCounts = aVal; }
   void SetDumpFrameByFrameCounts(bool aVal) { mDumpFrameByFrameCounts = aVal; }
   void SetPaintFrameCounts(bool aVal) { mPaintFrameByFrameCounts = aVal; }
 
   bool IsPaintingFrameCounts() { return mPaintFrameByFrameCounts; }
 
  protected:
@@ -701,26 +701,23 @@ static uint32_t sNextPresShellId;
     return true;
   }
   // Otherwise, disabled.
   return false;
 }
 
 nsIPresShell::nsIPresShell()
     : mViewManager(nullptr),
-      mFrameManager(nullptr)
+      mFrameManager(nullptr),
 #ifdef ACCESSIBILITY
-      ,
-      mDocAccessible(nullptr)
+      mDocAccessible(nullptr),
 #endif
 #ifdef DEBUG
-      ,
-      mDrawEventTargetFrame(nullptr)
+      mDrawEventTargetFrame(nullptr),
 #endif
-      ,
       mPaintCount(0),
       mAutoWeakFrames(nullptr),
       mCanvasBackgroundColor(NS_RGBA(0, 0, 0, 0)),
       mSelectionFlags(0),
       mChangeNestCount(0),
       mRenderFlags(0),
       mDidInitialize(false),
       mIsDestroying(false),
@@ -749,27 +746,24 @@ nsIPresShell::nsIPresShell()
       mFontSizeInflationEnabled(false),
       mPaintingIsFrozen(false),
       mIsNeverPainting(false),
       mInFlush(false),
       mCurrentEventFrame(nullptr) {
 }
 
 PresShell::PresShell()
-    : mCaretEnabled(false)
+    : mCaretEnabled(false),
 #ifdef DEBUG
-      ,
       mInVerifyReflow(false),
-      mCurrentReflowRoot(nullptr)
+      mCurrentReflowRoot(nullptr),
 #endif
 #ifdef MOZ_REFLOW_PERF
-      ,
-      mReflowCountMgr(nullptr)
+      mReflowCountMgr(nullptr),
 #endif
-      ,
       mMouseLocation(NS_UNCONSTRAINEDSIZE, NS_UNCONSTRAINEDSIZE),
       mFirstCallbackEventRequest(nullptr),
       mLastCallbackEventRequest(nullptr),
       mLastReflowStart(0.0),
       mLastAnchorScrollPositionY(0),
       mActiveSuppressDisplayport(0),
       mAPZFocusSequenceNumber(0),
       mDocumentLoading(false),
@@ -3912,22 +3906,32 @@ void PresShell::DoFlushPendingNotificati
    * method, make sure to add the relevant SetNeedLayoutFlush or
    * SetNeedStyleFlush calls on the shell.
    */
   FlushType flushType = aFlush.mFlushType;
 
   MOZ_ASSERT(NeedFlush(flushType), "Why did we get called?");
 
 #ifdef MOZ_GECKO_PROFILER
+  // clang-format off
   static const EnumeratedArray<FlushType, FlushType::Count, const char*>
-      flushTypeNames = {"", "Event", "Content", "ContentAndNotify",
-                        // As far as the profiler is concerned,
-                        // EnsurePresShellInitAndFrames and Frames are the same
-                        "Style", "Style", "InterruptibleLayout", "Layout",
-                        "Display"};
+      flushTypeNames = {
+    "",
+    "Event",
+    "Content",
+    "ContentAndNotify",
+    // As far as the profiler is concerned, EnsurePresShellInitAndFrames and
+    // Frames are the same
+    "Style",
+    "Style",
+    "InterruptibleLayout",
+    "Layout",
+    "Display"
+  };
+  // clang-format on
   AUTO_PROFILER_LABEL_DYNAMIC_CSTR("PresShell::DoFlushPendingNotifications",
                                    LAYOUT, flushTypeNames[flushType]);
 #endif
 
 #ifdef ACCESSIBILITY
 #ifdef DEBUG
   if (nsAccessibilityService* accService = GetAccService()) {
     NS_ASSERTION(!accService->IsProcessingRefreshDriverNotification(),
@@ -9852,18 +9856,17 @@ void PresShell::UpdateViewportOverridden
         // Setting the initial viewport will trigger a reflow.
         mMobileViewportManager->SetInitialViewport();
       }
     }
     return;
   }
 
   MOZ_ASSERT(mMobileViewportManager,
-             "Shouldn't reach this without a "
-             "MobileViewportManager.");
+             "Shouldn't reach this without a MobileViewportManager.");
   mMobileViewportManager->Destroy();
   mMobileViewportManager = nullptr;
 
   if (aAfterInitialization) {
     // Force a reflow to our correct size by going back to the docShell
     // and asking it to reassert its size. This is necessary because
     // everything underneath the docShell, like the ViewManager, has been
     // altered by the MobileViewportManager in an irreversible way.
--- a/layout/base/StaticPresData.cpp
+++ b/layout/base/StaticPresData.cpp
@@ -32,19 +32,27 @@ StaticPresData* StaticPresData::Get() {
 StaticPresData::StaticPresData() {
   mLangService = nsLanguageAtomService::GetService();
 }
 
 #define MAKE_FONT_PREF_KEY(_pref, _s0, _s1) \
   _pref.Assign(_s0);                        \
   _pref.Append(_s1);
 
+// clang-format off
 static const char* const kGenericFont[] = {
-    ".variable.",  ".fixed.",   ".serif.",  ".sans-serif.",
-    ".monospace.", ".cursive.", ".fantasy."};
+  ".variable.",
+  ".fixed.",
+  ".serif.",
+  ".sans-serif.",
+  ".monospace.",
+  ".cursive.",
+  ".fantasy."
+};
+// clang-format on
 
 // These are private, use the list in nsFont.h if you want a public list.
 enum {
   eDefaultFont_Variable,
   eDefaultFont_Fixed,
   eDefaultFont_Serif,
   eDefaultFont_SansSerif,
   eDefaultFont_Monospace,
@@ -56,22 +64,34 @@ enum {
 void LangGroupFontPrefs::Initialize(nsAtom* aLangGroupAtom) {
   mLangGroup = aLangGroupAtom;
 
   /* Fetch the font prefs to be used -- see bug 61883 for details.
      Not all prefs are needed upfront. Some are fallback prefs intended
      for the GFX font sub-system...
 
   -- attributes for generic fonts --------------------------------------
-  font.default.[langGroup] = serif | sans-serif - fallback generic font
-  font.name.[generic].[langGroup] = current user' selected font on the pref
-  dialog font.name-list.[generic].[langGroup] = fontname1, fontname2, ...
-  [factory pre-built list] font.size.[generic].[langGroup] = integer - settable
-  by the user font.size-adjust.[generic].[langGroup] = "float" - settable by the
-  user font.minimum-size.[langGroup] = integer - settable by the user
+
+  font.default.[langGroup] = serif | sans-serif
+    fallback generic font
+
+  font.name.[generic].[langGroup]
+    current user' selected font on the pref dialog
+
+  font.name-list.[generic].[langGroup] = fontname1, fontname2, ...
+    [factory pre-built list]
+
+  font.size.[generic].[langGroup] = integer
+    settable by the user
+
+  font.size-adjust.[generic].[langGroup] = "float"
+    settable by the user
+
+  font.minimum-size.[langGroup] = integer
+    settable by the user
   */
 
   nsAutoCString langGroup;
   aLangGroupAtom->ToUTF8String(langGroup);
 
   mDefaultVariableFont.size = nsPresContext::CSSPixelsToAppUnits(16);
   mDefaultFixedFont.size = nsPresContext::CSSPixelsToAppUnits(13);
 
@@ -79,20 +99,27 @@ void LangGroupFontPrefs::Initialize(nsAt
 
   // get font.minimum-size.[langGroup]
 
   MAKE_FONT_PREF_KEY(pref, "font.minimum-size.", langGroup);
 
   int32_t size = Preferences::GetInt(pref.get());
   mMinimumFontSize = nsPresContext::CSSPixelsToAppUnits(size);
 
-  nsFont* fontTypes[] = {&mDefaultVariableFont,  &mDefaultFixedFont,
-                         &mDefaultSerifFont,     &mDefaultSansSerifFont,
-                         &mDefaultMonospaceFont, &mDefaultCursiveFont,
-                         &mDefaultFantasyFont};
+  // clang-format off
+  nsFont* fontTypes[] = {
+    &mDefaultVariableFont,
+    &mDefaultFixedFont,
+    &mDefaultSerifFont,
+    &mDefaultSansSerifFont,
+    &mDefaultMonospaceFont,
+    &mDefaultCursiveFont,
+    &mDefaultFantasyFont
+  };
+  // clang-format on
   static_assert(MOZ_ARRAY_LENGTH(fontTypes) == eDefaultFont_COUNT,
                 "FontTypes array count is not correct");
 
   // Get attributes specific to each generic font. We do not get the user's
   // generic-font-name-to-specific-family-name preferences because its the
   // generic name that should be fed into the cascade. It is up to the GFX
   // code to look up the font prefs to convert generic names to specific
   // family names as necessary.
--- a/layout/base/nsBidiPresUtils.cpp
+++ b/layout/base/nsBidiPresUtils.cpp
@@ -46,18 +46,18 @@ static const char16_t kLRE = 0x202A;
 static const char16_t kRLE = 0x202B;
 static const char16_t kLRO = 0x202D;
 static const char16_t kRLO = 0x202E;
 static const char16_t kPDF = 0x202C;
 static const char16_t kLRI = 0x2066;
 static const char16_t kRLI = 0x2067;
 static const char16_t kFSI = 0x2068;
 static const char16_t kPDI = 0x2069;
+// All characters with Bidi type Segment Separator or Block Separator
 static const char16_t kSeparators[] = {
-    // All characters with Bidi type Segment Separator or Block Separator
     char16_t('\t'), char16_t('\r'),   char16_t('\n'), char16_t(0xb),
     char16_t(0x1c), char16_t(0x1d),   char16_t(0x1e), char16_t(0x1f),
     char16_t(0x85), char16_t(0x2029), char16_t(0)};
 
 #define NS_BIDI_CONTROL_FRAME ((nsIFrame*)0xfffb1d1)
 
 static bool IsIsolateControl(char16_t aChar) {
   return aChar == kLRI || aChar == kRLI || aChar == kFSI;
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -315,19 +315,17 @@ static void AssertAnonymousFlexOrGridIte
                "of flex container frames");
   } else {
     MOZ_ASSERT(aParent->IsGridContainerFrame(),
                "anonymous grid items should only exist as children "
                "of grid container frames");
   }
 }
 #else
-#define AssertAnonymousFlexOrGridItemParent(x, y) \
-  do { /* nothing */                              \
-  } while (0)
+#define AssertAnonymousFlexOrGridItemParent(x, y) PR_BEGIN_MACRO PR_END_MACRO
 #endif
 
 static inline nsContainerFrame* GetFieldSetBlockFrame(
     nsIFrame* aFieldsetFrame) {
   // Depends on the fieldset child frame order - see ConstructFieldSetFrame()
   // below.
   nsIFrame* firstChild = aFieldsetFrame->PrincipalChildList().FirstChild();
   nsIFrame* inner = firstChild && firstChild->GetNextSibling()
@@ -2571,31 +2569,29 @@ void nsCSSFrameConstructor::SetUpDocElem
   [fixed-cb]: the default containing block for fixed-pos content
   [abs-cb]: the default containing block for abs-pos content
 
   Meaning of nsCSSFrameConstructor fields:
     mRootElementFrame is "root element frame".  This is the primary frame for
       the root element.
     mDocElementContainingBlock is the parent of mRootElementFrame
       (i.e. nsCanvasFrame or nsRootBoxFrame)
-
     mPageSequenceFrame is the nsSimplePageSequenceFrame, or null if there isn't
-  one
+      one
   */
 
   // --------- CREATE ROOT FRAME -------
 
   // Create the root frame. The document element's frame is a child of the
   // root frame.
   //
   // The root frame serves two purposes:
   // - reserves space for any margins needed for the document element's frame
   // - renders the document element's background. This ensures the background
-  // covers
-  //   the entire canvas as specified by the CSS2 spec
+  //   covers the entire canvas as specified by the CSS2 spec
 
   nsPresContext* presContext = mPresShell->GetPresContext();
   bool isPaginated = presContext->IsRootPaginatedDocument();
   nsContainerFrame* viewportFrame =
       static_cast<nsContainerFrame*>(GetRootFrame());
   ComputedStyle* viewportPseudoStyle = viewportFrame->Style();
 
   nsContainerFrame* rootFrame = nullptr;
@@ -4180,48 +4176,50 @@ already_AddRefed<ComputedStyle> nsCSSFra
 void nsCSSFrameConstructor::FinishBuildingScrollFrame(
     nsContainerFrame* aScrollFrame, nsIFrame* aScrolledFrame) {
   nsFrameList scrolled(aScrolledFrame, aScrolledFrame);
   aScrollFrame->AppendFrames(kPrincipalList, scrolled);
 }
 
 /**
  * Called to wrap a gfx scrollframe around a frame. The hierarchy will look like
- *this
+ * this
  *
  * ------- for gfx scrollbars ------
  *
  *
  *            ScrollFrame
  *                 ^
  *                 |
  *               Frame (scrolled frame you passed in)
  *
  *
- *-----------------------------------
+ * -----------------------------------
  * LEGEND:
  *
  * ScrollFrame: This is a frame that manages gfx cross platform frame based
- *scrollbars.
+ * scrollbars.
  *
  * @param aContent the content node of the child to wrap.
+
  * @param aScrolledFrame The frame of the content to wrap. This should not be
- *                    Initialized. This method will initialize it with a
- *scrolled pseudo and no nsIContent. The content will be attached to the
- *scrollframe returned.
+ * Initialized. This method will initialize it with a scrolled pseudo and no
+ * nsIContent. The content will be attached to the scrollframe returned.
+
  * @param aContentStyle the style that has already been resolved for the content
- *                      being passed in.
+ * being passed in.
  *
  * @param aParentFrame The parent to attach the scroll frame to
  *
  * @param aNewFrame The new scrollframe or gfx scrollframe that we create. It
- *will contain the scrolled frame you passed in. (returned) If this is not null,
- *we'll just use it
+ * will contain the scrolled frame you passed in. (returned) If this is not
+ * null,  we'll just use it
+ *
  * @param aScrolledContentStyle the style that was resolved for the scrolled
- *frame. (returned)
+ * frame. (returned)
  */
 void nsCSSFrameConstructor::BuildScrollFrame(nsFrameConstructorState& aState,
                                              nsIContent* aContent,
                                              ComputedStyle* aContentStyle,
                                              nsIFrame* aScrolledFrame,
                                              nsContainerFrame* aParentFrame,
                                              nsContainerFrame*& aNewFrame) {
   RefPtr<ComputedStyle> scrolledContentStyle = BeginBuildingScrollFrame(
@@ -8687,82 +8685,82 @@ void nsCSSFrameConstructor::ShouldHaveSp
     bool* aHaveFirstLetterStyle, bool* aHaveFirstLineStyle) {
   *aHaveFirstLetterStyle = ShouldHaveFirstLetterStyle(aContent, aComputedStyle);
   *aHaveFirstLineStyle = ShouldHaveFirstLineStyle(aContent, aComputedStyle);
 }
 
 /* static */
 const nsCSSFrameConstructor::PseudoParentData
     nsCSSFrameConstructor::sPseudoParentData[eParentTypeCount] = {
-        {// Cell
-         FULL_CTOR_FCDATA(FCDATA_IS_TABLE_PART | FCDATA_SKIP_FRAMESET |
+        // Cell
+        {FULL_CTOR_FCDATA(FCDATA_IS_TABLE_PART | FCDATA_SKIP_FRAMESET |
                               FCDATA_USE_CHILD_ITEMS |
                               FCDATA_IS_WRAPPER_ANON_BOX |
                               FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeRow),
                           &nsCSSFrameConstructor::ConstructTableCell),
          nsCSSAnonBoxes::tableCell()},
-        {// Row
-         FULL_CTOR_FCDATA(FCDATA_IS_TABLE_PART | FCDATA_SKIP_FRAMESET |
+        // Row
+        {FULL_CTOR_FCDATA(FCDATA_IS_TABLE_PART | FCDATA_SKIP_FRAMESET |
                               FCDATA_USE_CHILD_ITEMS |
                               FCDATA_IS_WRAPPER_ANON_BOX |
                               FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeRowGroup),
                           &nsCSSFrameConstructor::ConstructTableRowOrRowGroup),
          nsCSSAnonBoxes::tableRow()},
-        {// Row group
-         FULL_CTOR_FCDATA(FCDATA_IS_TABLE_PART | FCDATA_SKIP_FRAMESET |
+        // Row group
+        {FULL_CTOR_FCDATA(FCDATA_IS_TABLE_PART | FCDATA_SKIP_FRAMESET |
                               FCDATA_USE_CHILD_ITEMS |
                               FCDATA_IS_WRAPPER_ANON_BOX |
                               FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeTable),
                           &nsCSSFrameConstructor::ConstructTableRowOrRowGroup),
          nsCSSAnonBoxes::tableRowGroup()},
-        {// Column group
-         FCDATA_DECL(
+        // Column group
+        {FCDATA_DECL(
              FCDATA_IS_TABLE_PART | FCDATA_SKIP_FRAMESET |
                  FCDATA_DISALLOW_OUT_OF_FLOW | FCDATA_USE_CHILD_ITEMS |
                  FCDATA_SKIP_ABSPOS_PUSH |
                  // Not FCDATA_IS_WRAPPER_ANON_BOX, because we don't need to
                  // restyle these: they have non-inheriting styles.
                  FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeTable),
              NS_NewTableColGroupFrame),
          nsCSSAnonBoxes::tableColGroup()},
-        {// Table
-         FULL_CTOR_FCDATA(FCDATA_SKIP_FRAMESET | FCDATA_USE_CHILD_ITEMS |
+        // Table
+        {FULL_CTOR_FCDATA(FCDATA_SKIP_FRAMESET | FCDATA_USE_CHILD_ITEMS |
                               FCDATA_IS_WRAPPER_ANON_BOX,
                           &nsCSSFrameConstructor::ConstructTable),
          nsCSSAnonBoxes::table()},
-        {// Ruby
-         FCDATA_DECL(FCDATA_IS_LINE_PARTICIPANT | FCDATA_USE_CHILD_ITEMS |
+        // Ruby
+        {FCDATA_DECL(FCDATA_IS_LINE_PARTICIPANT | FCDATA_USE_CHILD_ITEMS |
                          FCDATA_IS_WRAPPER_ANON_BOX | FCDATA_SKIP_FRAMESET,
                      NS_NewRubyFrame),
          nsCSSAnonBoxes::ruby()},
-        {// Ruby Base
-         FCDATA_DECL(
+        // Ruby Base
+        {FCDATA_DECL(
              FCDATA_USE_CHILD_ITEMS | FCDATA_IS_LINE_PARTICIPANT |
                  FCDATA_IS_WRAPPER_ANON_BOX |
                  FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeRubyBaseContainer) |
                  FCDATA_SKIP_FRAMESET,
              NS_NewRubyBaseFrame),
          nsCSSAnonBoxes::rubyBase()},
-        {// Ruby Base Container
-         FCDATA_DECL(FCDATA_USE_CHILD_ITEMS | FCDATA_IS_LINE_PARTICIPANT |
+        // Ruby Base Container
+        {FCDATA_DECL(FCDATA_USE_CHILD_ITEMS | FCDATA_IS_LINE_PARTICIPANT |
                          FCDATA_IS_WRAPPER_ANON_BOX |
                          FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeRuby) |
                          FCDATA_SKIP_FRAMESET,
                      NS_NewRubyBaseContainerFrame),
          nsCSSAnonBoxes::rubyBaseContainer()},
-        {// Ruby Text
-         FCDATA_DECL(
+        // Ruby Text
+        {FCDATA_DECL(
              FCDATA_USE_CHILD_ITEMS | FCDATA_IS_LINE_PARTICIPANT |
                  FCDATA_IS_WRAPPER_ANON_BOX |
                  FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeRubyTextContainer) |
                  FCDATA_SKIP_FRAMESET,
              NS_NewRubyTextFrame),
          nsCSSAnonBoxes::rubyText()},
-        {// Ruby Text Container
-         FCDATA_DECL(FCDATA_USE_CHILD_ITEMS | FCDATA_IS_WRAPPER_ANON_BOX |
+        // Ruby Text Container
+        {FCDATA_DECL(FCDATA_USE_CHILD_ITEMS | FCDATA_IS_WRAPPER_ANON_BOX |
                          FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeRuby) |
                          FCDATA_SKIP_FRAMESET,
                      NS_NewRubyTextContainerFrame),
          nsCSSAnonBoxes::rubyTextContainer()}};
 
 void nsCSSFrameConstructor::CreateNeededAnonFlexOrGridItems(
     nsFrameConstructorState& aState, FrameConstructionItemList& aItems,
     nsIFrame* aParentFrame) {
@@ -10918,20 +10916,19 @@ nsIFrame* nsCSSFrameConstructor::Constru
   nsIContent* const content = aItem.mContent;
   ComputedStyle* const computedStyle = aItem.mComputedStyle;
 
   nsInlineFrame* newFrame = NS_NewInlineFrame(mPresShell, computedStyle);
 
   // Initialize the frame
   InitAndRestoreFrame(aState, content, aParentFrame, newFrame);
 
-  nsFrameConstructorSaveState
-      absoluteSaveState;  // definition cannot be inside next block
-                          // because the object's destructor is significant
-                          // this is part of the fix for bug 42372
+  // definition cannot be inside next block because the object's destructor is
+  // significant. this is part of the fix for bug 42372
+  nsFrameConstructorSaveState absoluteSaveState;
 
   bool isAbsPosCB = newFrame->IsAbsPosContainingBlock();
   newFrame->AddStateBits(NS_FRAME_CAN_HAVE_ABSPOS_CHILDREN);
   if (isAbsPosCB) {
     // Relatively positioned frames becomes a container for child
     // frames that are positioned
     aState.PushAbsoluteContainingBlock(newFrame, newFrame, absoluteSaveState);
   }
--- a/layout/base/nsCaret.cpp
+++ b/layout/base/nsCaret.cpp
@@ -664,25 +664,24 @@ nsresult nsCaret::GetCaretFrameForNodeOf
         levelBefore = levels.mLevelBefore;
         levelAfter = levels.mLevelAfter;
 
         if ((levelBefore != levelAfter) || (aBidiLevel != levelBefore)) {
           aBidiLevel = std::max(aBidiLevel,
                                 std::min(levelBefore, levelAfter));  // rule c3
           aBidiLevel = std::min(aBidiLevel,
                                 std::max(levelBefore, levelAfter));  // rule c4
-          if (aBidiLevel == levelBefore                              // rule c1
-              || (aBidiLevel > levelBefore && aBidiLevel < levelAfter &&
-                  IS_SAME_DIRECTION(aBidiLevel, levelBefore))  // rule c5
-              || (aBidiLevel < levelBefore && aBidiLevel > levelAfter &&
-                  IS_SAME_DIRECTION(aBidiLevel, levelBefore)))  // rule c9
+          if (aBidiLevel == levelBefore ||                           // rule c1
+              (aBidiLevel > levelBefore && aBidiLevel < levelAfter &&
+               IS_SAME_DIRECTION(aBidiLevel, levelBefore)) ||  // rule c5
+              (aBidiLevel < levelBefore && aBidiLevel > levelAfter &&
+               IS_SAME_DIRECTION(aBidiLevel, levelBefore)))  // rule c9
           {
             if (theFrame != frameBefore) {
-              if (frameBefore)  // if there is a frameBefore, move into it
-              {
+              if (frameBefore) {  // if there is a frameBefore, move into it
                 theFrame = frameBefore;
                 theFrame->GetOffsets(start, end);
                 theFrameOffset = end;
               } else {
                 // if there is no frameBefore, we must be at the beginning of
                 // the line so we stay with the current frame. Exception: when
                 // the first frame on the line has a different Bidi level from
                 // the paragraph level, there is no real frame for the caret to
@@ -694,20 +693,19 @@ nsresult nsCaret::GetCaretFrameForNodeOf
                                          true, false);
                   if (NS_SUCCEEDED(frameAfter->PeekOffset(&pos))) {
                     theFrame = pos.mResultFrame;
                     theFrameOffset = pos.mContentOffset;
                   }
                 }
               }
             }
-          } else if (aBidiLevel == levelAfter  // rule c2
-                     || (aBidiLevel > levelBefore && aBidiLevel < levelAfter &&
-                         IS_SAME_DIRECTION(aBidiLevel, levelAfter))  // rule c6
-                     ||
+          } else if (aBidiLevel == levelAfter ||  // rule c2
+                     (aBidiLevel > levelBefore && aBidiLevel < levelAfter &&
+                      IS_SAME_DIRECTION(aBidiLevel, levelAfter)) ||  // rule c6
                      (aBidiLevel < levelBefore && aBidiLevel > levelAfter &&
                       IS_SAME_DIRECTION(aBidiLevel, levelAfter)))  // rule c10
           {
             if (theFrame != frameAfter) {
               if (frameAfter) {
                 // if there is a frameAfter, move into it
                 theFrame = frameAfter;
                 theFrame->GetOffsets(start, end);
@@ -727,45 +725,37 @@ nsresult nsCaret::GetCaretFrameForNodeOf
                   if (NS_SUCCEEDED(frameBefore->PeekOffset(&pos))) {
                     theFrame = pos.mResultFrame;
                     theFrameOffset = pos.mContentOffset;
                   }
                 }
               }
             }
           } else if (aBidiLevel > levelBefore &&
-                     aBidiLevel < levelAfter  // rule c7/8
-                     &&
-                     IS_SAME_DIRECTION(
-                         levelBefore,
-                         levelAfter)  // before and after have the same parity
-                     &&
-                     !IS_SAME_DIRECTION(
-                         aBidiLevel, levelAfter))  // caret has different parity
-          {
+                     aBidiLevel < levelAfter &&  // rule c7/8
+                     // before and after have the same parity
+                     IS_SAME_DIRECTION(levelBefore, levelAfter) &&
+                     // caret has different parity
+                     !IS_SAME_DIRECTION(aBidiLevel, levelAfter)) {
             if (NS_SUCCEEDED(aFrameSelection->GetFrameFromLevel(
                     frameAfter, eDirNext, aBidiLevel, &theFrame))) {
               theFrame->GetOffsets(start, end);
               levelAfter = theFrame->GetEmbeddingLevel();
               if (IS_LEVEL_RTL(aBidiLevel))  // c8: caret to the right of the
                                              // rightmost character
                 theFrameOffset = IS_LEVEL_RTL(levelAfter) ? start : end;
               else  // c7: caret to the left of the leftmost character
                 theFrameOffset = IS_LEVEL_RTL(levelAfter) ? end : start;
             }
           } else if (aBidiLevel < levelBefore &&
-                     aBidiLevel > levelAfter  // rule c11/12
-                     &&
-                     IS_SAME_DIRECTION(
-                         levelBefore,
-                         levelAfter)  // before and after have the same parity
-                     &&
-                     !IS_SAME_DIRECTION(
-                         aBidiLevel, levelAfter))  // caret has different parity
-          {
+                     aBidiLevel > levelAfter &&  // rule c11/12
+                     // before and after have the same parity
+                     IS_SAME_DIRECTION(levelBefore, levelAfter) &&
+                     // caret has different parity
+                     !IS_SAME_DIRECTION(aBidiLevel, levelAfter)) {
             if (NS_SUCCEEDED(aFrameSelection->GetFrameFromLevel(
                     frameBefore, eDirPrevious, aBidiLevel, &theFrame))) {
               theFrame->GetOffsets(start, end);
               levelBefore = theFrame->GetEmbeddingLevel();
               if (IS_LEVEL_RTL(aBidiLevel))  // c12: caret to the left of the
                                              // leftmost character
                 theFrameOffset = IS_LEVEL_RTL(levelBefore) ? end : start;
               else  // c11: caret to the right of the rightmost character
--- a/layout/base/nsDocumentViewer.cpp
+++ b/layout/base/nsDocumentViewer.cpp
@@ -2133,18 +2133,18 @@ nsDocumentViewer::Show(void) {
     nsAutoScriptBlocker scriptBlocker;
 
     NS_ASSERTION(!mWindow, "Window already created but no presshell?");
 
     nsCOMPtr<nsIBaseWindow> base_win(mContainer);
     if (base_win) {
       base_win->GetParentWidget(&mParentWidget);
       if (mParentWidget) {
-        mParentWidget
-            ->Release();  // GetParentWidget AddRefs, but mParentWidget is weak
+        // GetParentWidget AddRefs, but mParentWidget is weak
+        mParentWidget->Release();
       }
     }
 
     nsView* containerView = FindContainerView();
 
     nsresult rv = CreateDeviceContext(containerView);
     NS_ENSURE_SUCCESS(rv, rv);
 
@@ -2553,19 +2553,19 @@ nsresult nsDocumentViewer::CreateDeviceC
 mozilla::dom::Selection* nsDocumentViewer::GetDocumentSelection() {
   if (!mPresShell) {
     return nullptr;
   }
 
   return mPresShell->GetCurrentSelection(SelectionType::eNormal);
 }
 
-/* ========================================================================================
+/* ============================================================================
  * nsIContentViewerEdit
- * ========================================================================================
+ * ============================================================================
  */
 
 NS_IMETHODIMP nsDocumentViewer::ClearSelection() {
   // use nsCopySupport::GetSelectionForCopy() ?
   RefPtr<mozilla::dom::Selection> selection = GetDocumentSelection();
   if (!selection) {
     return NS_ERROR_FAILURE;
   }
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -2201,48 +2201,46 @@ static void ConstrainToCoordValues(gfxFl
     excess /= 2;
 
     aStart -= excess;
     aSize = nscoord_MIN;
   }
 }
 
 nsRect nsLayoutUtils::RoundGfxRectToAppRect(const Rect& aRect, float aFactor) {
-  /* Get a new Rect whose units are app units by scaling by the specified
-   * factor. */
+  // Get a new Rect whose units are app units by scaling by the specified
+  // factor.
   Rect scaledRect = aRect;
   scaledRect.ScaleRoundOut(aFactor);
 
-  /* We now need to constrain our results to the max and min values for coords.
-   */
+  // We now need to constrain our results to the max and min values for coords.
   ConstrainToCoordValues(scaledRect.x, scaledRect.width);
   ConstrainToCoordValues(scaledRect.y, scaledRect.height);
 
-  /* Now typecast everything back.  This is guaranteed to be safe. */
+  // Now typecast everything back.  This is guaranteed to be safe.
   if (aRect.IsEmpty()) {
     return nsRect(nscoord(scaledRect.X()), nscoord(scaledRect.Y()), 0, 0);
   } else {
     return nsRect(nscoord(scaledRect.X()), nscoord(scaledRect.Y()),
                   nscoord(scaledRect.Width()), nscoord(scaledRect.Height()));
   }
 }
 
 nsRect nsLayoutUtils::RoundGfxRectToAppRect(const gfxRect& aRect,
                                             float aFactor) {
-  /* Get a new gfxRect whose units are app units by scaling by the specified
-   * factor. */
+  // Get a new gfxRect whose units are app units by scaling by the specified
+  // factor.
   gfxRect scaledRect = aRect;
   scaledRect.ScaleRoundOut(aFactor);
 
-  /* We now need to constrain our results to the max and min values for coords.
-   */
+  // We now need to constrain our results to the max and min values for coords.
   ConstrainToCoordValues(scaledRect.x, scaledRect.width);
   ConstrainToCoordValues(scaledRect.y, scaledRect.height);
 
-  /* Now typecast everything back.  This is guaranteed to be safe. */
+  // Now typecast everything back.  This is guaranteed to be safe.
   if (aRect.IsEmpty()) {
     return nsRect(nscoord(scaledRect.X()), nscoord(scaledRect.Y()), 0, 0);
   } else {
     return nsRect(nscoord(scaledRect.X()), nscoord(scaledRect.Y()),
                   nscoord(scaledRect.Width()), nscoord(scaledRect.Height()));
   }
 }
 
@@ -6660,20 +6658,20 @@ static ImgDrawResult DrawImageInternal(
   nsRect fill;
   fill.IntersectRect(aDest, dest);
   return DrawImageInternal(aContext, aPresContext, image, aSamplingFilter, dest,
                            fill, aAnchorPoint ? *aAnchorPoint : fill.TopLeft(),
                            aDirty, aSVGContext, aImageFlags);
 }
 
 /* static */ void nsLayoutUtils::ComputeSizeForDrawing(
-    imgIContainer* aImage, CSSIntSize& aImageSize, /*outparam*/
-    nsSize& aIntrinsicRatio,                       /*outparam*/
-    bool& aGotWidth,                               /*outparam*/
-    bool& aGotHeight /*outparam*/) {
+    imgIContainer* aImage, /* outparam */ CSSIntSize& aImageSize,
+    /* outparam */ nsSize& aIntrinsicRatio,
+    /* outparam */ bool& aGotWidth,
+    /* outparam */ bool& aGotHeight) {
   aGotWidth = NS_SUCCEEDED(aImage->GetWidth(&aImageSize.width));
   aGotHeight = NS_SUCCEEDED(aImage->GetHeight(&aImageSize.height));
   bool gotRatio = NS_SUCCEEDED(aImage->GetIntrinsicRatio(&aIntrinsicRatio));
 
   if (!(aGotWidth && aGotHeight) && !gotRatio) {
     // We hit an error (say, because the image failed to load or couldn't be
     // decoded) and should return zero size.
     aGotWidth = aGotHeight = true;
--- a/layout/forms/nsListControlFrame.cpp
+++ b/layout/forms/nsListControlFrame.cpp
@@ -34,18 +34,17 @@
 #include "mozilla/Preferences.h"
 #include "mozilla/TextEvents.h"
 #include <algorithm>
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
 // Constants
-const uint32_t kMaxDropDownRows =
-    20;  // This matches the setting for 4.x browsers
+const uint32_t kMaxDropDownRows = 20;  // matches the setting for 4.x browsers
 const int32_t kNothingSelected = -1;
 
 // Static members
 nsListControlFrame* nsListControlFrame::mFocused = nullptr;
 nsString* nsListControlFrame::sIncrementalString = nullptr;
 
 // Using for incremental typing navigation
 #define INCREMENTAL_SEARCH_KEYPRESS_TIME 1000
--- a/layout/forms/nsTextControlFrame.cpp
+++ b/layout/forms/nsTextControlFrame.cpp
@@ -756,18 +756,17 @@ void nsTextControlFrame::SetFocus(bool a
 
   if (!docSel->IsCollapsed()) {
     docSel->RemoveAllRanges(IgnoreErrors());
   }
 }
 
 nsresult nsTextControlFrame::SetFormProperty(nsAtom* aName,
                                              const nsAString& aValue) {
-  if (!mIsProcessing)  // some kind of lock.
-  {
+  if (!mIsProcessing) {  // some kind of lock.
     mIsProcessing = true;
     if (nsGkAtoms::select == aName) {
       // Select all the text.
       //
       // XXX: This is lame, we can't call editor's SelectAll method
       //      because that triggers AutoCopies in unix builds.
       //      Instead, we have to call our own homegrown version
       //      of select all which merely builds a range that selects
--- a/layout/generic/ReflowInput.cpp
+++ b/layout/generic/ReflowInput.cpp
@@ -54,19 +54,18 @@ enum eNormalLineHeightControl {
 static eNormalLineHeightControl sNormalLineHeightControl = eUninitialized;
 
 // Initialize a <b>root</b> reflow state with a rendering context to
 // use for measuring things.
 ReflowInput::ReflowInput(nsPresContext* aPresContext, nsIFrame* aFrame,
                          gfxContext* aRenderingContext,
                          const LogicalSize& aAvailableSpace, uint32_t aFlags)
     : SizeComputationInput(aFrame, aRenderingContext),
-      mCBReflowInput(
-          nullptr)  // will be setup properly later in InitCBReflowInput
-      ,
+      // will be setup properly later in InitCBReflowInput
+      mCBReflowInput(nullptr),
       mBlockDelta(0),
       mOrthogonalLimit(NS_UNCONSTRAINEDSIZE),
       mAvailableWidth(0),
       mAvailableHeight(0),
       mContainingBlockSize(mWritingMode),
       mReflowDepth(0) {
   MOZ_ASSERT(aRenderingContext, "no rendering context");
   MOZ_ASSERT(aPresContext, "no pres context");
@@ -171,19 +170,18 @@ SizeComputationInput::SizeComputationInp
 // is copied from the parent reflow state; the remaining state is
 // computed.
 ReflowInput::ReflowInput(nsPresContext* aPresContext,
                          const ReflowInput& aParentReflowInput,
                          nsIFrame* aFrame, const LogicalSize& aAvailableSpace,
                          const LogicalSize* aContainingBlockSize,
                          uint32_t aFlags)
     : SizeComputationInput(aFrame, aParentReflowInput.mRenderingContext),
-      mCBReflowInput(
-          nullptr)  // will be setup properly later in InitCBReflowInput
-      ,
+      // will be setup properly later in InitCBReflowInput
+      mCBReflowInput(nullptr),
       mBlockDelta(0),
       mOrthogonalLimit(NS_UNCONSTRAINEDSIZE),
       mAvailableWidth(0),
       mAvailableHeight(0),
       mContainingBlockSize(mWritingMode),
       mFlags(aParentReflowInput.mFlags),
       mReflowDepth(aParentReflowInput.mReflowDepth + 1) {
   MOZ_ASSERT(aPresContext, "no pres context");
--- a/layout/generic/ScrollSnap.cpp
+++ b/layout/generic/ScrollSnap.cpp
@@ -52,18 +52,18 @@ class CalcSnapPoints : public SnappingEd
   void AddEdgeInterval(nscoord aInterval, nscoord aMinPos, nscoord aMaxPos,
                        nscoord aOffset, nscoord aDestination, nscoord aStartPos,
                        nscoord aScrollingDirection, nscoord* aBestEdge,
                        bool* aEdgeFound);
   nsPoint GetBestEdge() const;
 
  protected:
   nsIScrollableFrame::ScrollUnit mUnit;
-  nsPoint
-      mDestination;   // gives the position after scrolling but before snapping
+  nsPoint mDestination;  // gives the position after scrolling but before
+                         // snapping
   nsPoint mStartPos;  // gives the position before scrolling
   nsIntPoint mScrollingDirection;  // always -1, 0, or 1
   nsPoint mBestEdge;  // keeps track of the position of the current best edge
   bool mHorizontalEdgeFound;  // true if mBestEdge.x is storing a valid
                               // horizontal edge
   bool mVerticalEdgeFound;    // true if mBestEdge.y is storing a valid vertical
                               // edge
 };
--- a/layout/generic/ViewportFrame.cpp
+++ b/layout/generic/ViewportFrame.cpp
@@ -146,18 +146,18 @@ void ViewportFrame::BuildDisplayListForT
         continue;
       }
       MOZ_ASSERT(ShouldInTopLayerForFullscreen(elem));
       // Inner SVG, MathML elements, as well as children of some XUL
       // elements are not allowed to be out-of-flow. They should not
       // be handled as top layer element here.
       if (!(frame->GetStateBits() & NS_FRAME_OUT_OF_FLOW)) {
         MOZ_ASSERT(!elem->GetParent()->IsHTMLElement(),
-                   "HTML element "
-                   "should always be out-of-flow if in the top layer");
+                   "HTML element should always be out-of-flow if in the top "
+                   "layer");
         continue;
       }
       if (nsIFrame* backdropPh =
               frame->GetChildList(kBackdropList).FirstChild()) {
         MOZ_ASSERT(backdropPh->IsPlaceholderFrame());
         MOZ_ASSERT(!backdropPh->GetNextSibling(), "more than one ::backdrop?");
         MOZ_ASSERT(backdropPh->HasAnyStateBits(NS_FRAME_FIRST_REFLOW),
                    "did you intend to reflow ::backdrop placeholders?");
--- a/layout/generic/nsAbsoluteContainingBlock.cpp
+++ b/layout/generic/nsAbsoluteContainingBlock.cpp
@@ -678,23 +678,23 @@ void nsAbsoluteContainingBlock::ReflowAb
     margin.IStart(outerWM) = margin.IEnd(outerWM) = 0;
   }
   if (kidReflowInput.mFlags.mBOffsetsNeedCSSAlign) {
     margin.BStart(outerWM) = margin.BEnd(outerWM) = 0;
   }
 
   bool constrainBSize =
       (aReflowInput.AvailableBSize() != NS_UNCONSTRAINEDSIZE) &&
-      (aFlags & AbsPosReflowFlags::eConstrainHeight)
+      (aFlags & AbsPosReflowFlags::eConstrainHeight) &&
       // Don't split if told not to (e.g. for fixed frames)
-      && !aDelegatingFrame->IsInlineFrame()
+      !aDelegatingFrame->IsInlineFrame() &&
       // XXX we don't handle splitting frames for inline absolute containing
       // blocks yet
-      && (aKidFrame->GetLogicalRect(aContainingBlock.Size()).BStart(wm) <=
-          aReflowInput.AvailableBSize());
+      (aKidFrame->GetLogicalRect(aContainingBlock.Size()).BStart(wm) <=
+       aReflowInput.AvailableBSize());
   // Don't split things below the fold. (Ideally we shouldn't *have*
   // anything totally below the fold, but we can't position frames
   // across next-in-flow breaks yet.
   if (constrainBSize) {
     kidReflowInput.AvailableBSize() =
         aReflowInput.AvailableBSize() -
         border.ConvertTo(wm, outerWM).BStart(wm) -
         kidReflowInput.ComputedLogicalMargin().BStart(wm);
--- a/layout/generic/nsContainerFrame.cpp
+++ b/layout/generic/nsContainerFrame.cpp
@@ -1732,18 +1732,18 @@ bool nsContainerFrame::RenumberList() {
   }
 
   return fif->RenumberChildFrames(&ordinal, 0, increment, false);
 }
 
 // add in a sanity check for absurdly deep frame trees.  See bug 42138
 // can't just use IsFrameTreeTooDeep() because that method has side effects we
 // don't want
-#define MAX_DEPTH_FOR_LIST_RENUMBERING \
-  200  // 200 open displayable tags is pretty unrealistic
+// 200 open displayable tags is pretty unrealistic
+#define MAX_DEPTH_FOR_LIST_RENUMBERING 200
 
 bool nsContainerFrame::RenumberFrameAndDescendants(int32_t* aOrdinal,
                                                    int32_t aDepth,
                                                    int32_t aIncrement,
                                                    bool aForCounting) {
   MOZ_ASSERT(aOrdinal, "null params are immoral!");
 
   // add in a sanity check for absurdly deep frame trees.  See bug 42138
--- a/layout/generic/nsFlexContainerFrame.cpp
+++ b/layout/generic/nsFlexContainerFrame.cpp
@@ -1996,18 +1996,17 @@ FlexItem::FlexItem(nsIFrame* aChildFrame
       // just share container's WM for simplicity:
       mWM(aContainerWM),
       mIsFrozen(true),
       mHadMinViolation(false),
       mHadMaxViolation(false),
       mHadMeasuringReflow(false),
       mIsStretched(false),
       mIsStrut(true),  // (this is the constructor for making struts, after all)
-      mIsInlineAxisMainAxis(
-          true),  // (doesn't matter b/c we're not doing layout)
+      mIsInlineAxisMainAxis(true),  // (doesn't matter, we're not doing layout)
       mNeedsMinSizeAutoResolution(false),
       mHasAnyAutoMargin(false),
       mAlignSelf(NS_STYLE_ALIGN_FLEX_START) {
   MOZ_ASSERT(mFrame, "expecting a non-null child frame");
   MOZ_ASSERT(
       NS_STYLE_VISIBILITY_COLLAPSE == mFrame->StyleVisibility()->mVisible,
       "Should only make struts for children with 'visibility:collapse'");
   MOZ_ASSERT(!mFrame->IsPlaceholderFrame(),
@@ -2862,18 +2861,18 @@ void FlexLine::ResolveFlexibleLengths(ns
 #endif  // DEBUG
 }
 
 MainAxisPositionTracker::MainAxisPositionTracker(
     const FlexboxAxisTracker& aAxisTracker, const FlexLine* aLine,
     uint8_t aJustifyContent, nscoord aContentBoxMainSize)
     : PositionTracker(aAxisTracker.GetMainAxis(),
                       aAxisTracker.IsMainAxisReversed()),
-      mPackingSpaceRemaining(
-          aContentBoxMainSize),  // we chip away at this below
+      // we chip away at this below
+      mPackingSpaceRemaining(aContentBoxMainSize),
       mNumAutoMarginsInMainAxis(0),
       mNumPackingSpacesRemaining(0),
       mJustifyContent(aJustifyContent) {
   // Extract the flag portion of mJustifyContent and strip off the flag bits
   // NOTE: This must happen before any assignment to mJustifyContent to
   // avoid overwriting the flag bits.
   uint8_t justifyContentFlags = mJustifyContent & NS_STYLE_JUSTIFY_FLAG_BITS;
   mJustifyContent &= ~NS_STYLE_JUSTIFY_FLAG_BITS;
@@ -3844,18 +3843,18 @@ void nsFlexContainerFrame::GenerateFlexL
 
     nscoord itemInnerHypotheticalMainSize = item->GetMainSize();
     nscoord itemOuterHypotheticalMainSize =
         item->GetOuterMainSize(aAxisTracker.GetMainAxis());
 
     // Check if we need to wrap |item| to a new line
     // (i.e. check if its outer hypothetical main size pushes our line over
     // the threshold)
-    if (wrapThreshold !=
-            NS_UNCONSTRAINEDSIZE &&  // Don't wrap if unconstrained.
+    if (wrapThreshold != NS_UNCONSTRAINEDSIZE &&  // Don't wrap if
+                                                  // unconstrained.
         !curLine->IsEmpty()) {  // Don't wrap if this will be line's first item.
       // If the line will be longer than wrapThreshold after adding this item,
       // then wrap to a new line before inserting this item.
       // NOTE: We have to account for the fact that
       // itemOuterHypotheticalMainSize might be huge, if our item is (or
       // contains) a table with "table-layout:fixed". So we use AddChecked()
       // rather than (possibly-overflowing) normal addition, to be sure we don't
       // make the wrong judgement about whether the item fits on this line.
--- a/layout/generic/nsFloatManager.cpp
+++ b/layout/generic/nsFloatManager.cpp
@@ -875,24 +875,23 @@ nsFloatManager::EllipseShapeInfo::Ellips
         //
         // X should be set to the minimum of the values of all of the numbered
         // neighbors summed with the value in that chamfer cell.
         MOZ_ASSERT(index - iSize - 2 < (iSize * bSize) &&
                        index - (iSize * 2) - 1 < (iSize * bSize),
                    "Our distance field most extreme indices should be "
                    "in-bounds.");
 
-        df[index] = std::min<dfType>(
-            df[index - 1] + 5,
-            std::min<dfType>(
-                df[index - iSize] + 5,
-                std::min<dfType>(
-                    df[index - iSize - 1] + 7,
+        // clang-format off
+        df[index] = std::min<dfType>(df[index - 1] + 5,
+                    std::min<dfType>(df[index - iSize] + 5,
+                    std::min<dfType>(df[index - iSize - 1] + 7,
                     std::min<dfType>(df[index - iSize - 2] + 11,
-                                     df[index - (iSize * 2) - 1] + 11))));
+                    df[index - (iSize * 2) - 1] + 11))));
+        // clang-format on
 
         // Check the df value and see if it's less than or equal to the
         // usedMargin5X value.
         if (df[index] <= usedMargin5X) {
           MOZ_ASSERT(iMax < (int32_t)i);
           iMax = i;
         } else {
           // Since we're computing the bottom-right quadrant, there's no way
@@ -1421,32 +1420,27 @@ nsFloatManager::PolygonShapeInfo::Polygo
         // X should be set to the minimum of MAX_MARGIN_5X and the
         // values of all of the numbered neighbors summed with the
         // value in that chamfer cell.
         MOZ_ASSERT(index - (iSize * 2) - 1 < (iSize * bSize) &&
                        index - iSize - 2 < (iSize * bSize),
                    "Our distance field most extreme indices should be "
                    "in-bounds.");
 
-        df[index] = std::min<dfType>(
-            MAX_MARGIN_5X,
-            std::min<dfType>(
-                df[index - (iSize * 2) - 1] + 11,
-                std::min<dfType>(
-                    df[index - (iSize * 2) + 1] + 11,
-                    std::min<dfType>(
-                        df[index - iSize - 2] + 11,
-                        std::min<dfType>(
-                            df[index - iSize - 1] + 7,
-                            std::min<dfType>(
-                                df[index - iSize] + 5,
-                                std::min<dfType>(
-                                    df[index - iSize + 1] + 7,
-                                    std::min<dfType>(df[index - iSize + 2] + 11,
-                                                     df[index - 1] + 5))))))));
+        // clang-format off
+        df[index] = std::min<dfType>(MAX_MARGIN_5X,
+                    std::min<dfType>(df[index - (iSize * 2) - 1] + 11,
+                    std::min<dfType>(df[index - (iSize * 2) + 1] + 11,
+                    std::min<dfType>(df[index - iSize - 2] + 11,
+                    std::min<dfType>(df[index - iSize - 1] + 7,
+                    std::min<dfType>(df[index - iSize] + 5,
+                    std::min<dfType>(df[index - iSize + 1] + 7,
+                    std::min<dfType>(df[index - iSize + 2] + 11,
+                                     df[index - 1] + 5))))))));
+        // clang-format on
       }
     }
   }
 
   // Okay, time for the second pass. This pass is in reverse order from
   // the first pass. All of our opaque pixels have been set to 0, and all
   // of our expanded region pixels have been set to MAX_MARGIN_5X. Other
   // pixels have been set to some value between those two (inclusive) but
@@ -1494,32 +1488,27 @@ nsFloatManager::PolygonShapeInfo::Polygo
         // X should be set to the minimum of its current value and
         // the values of all of the numbered neighbors summed with
         // the value in that chamfer cell.
         MOZ_ASSERT(index + (iSize * 2) + 1 < (iSize * bSize) &&
                        index + iSize + 2 < (iSize * bSize),
                    "Our distance field most extreme indices should be "
                    "in-bounds.");
 
-        df[index] = std::min<dfType>(
-            df[index],
-            std::min<dfType>(
-                df[index + (iSize * 2) + 1] + 11,
-                std::min<dfType>(
-                    df[index + (iSize * 2) - 1] + 11,
-                    std::min<dfType>(
-                        df[index + iSize + 2] + 11,
-                        std::min<dfType>(
-                            df[index + iSize + 1] + 7,
-                            std::min<dfType>(
-                                df[index + iSize] + 5,
-                                std::min<dfType>(
-                                    df[index + iSize - 1] + 7,
-                                    std::min<dfType>(df[index + iSize - 2] + 11,
-                                                     df[index + 1] + 5))))))));
+        // clang-format off
+        df[index] = std::min<dfType>(df[index],
+                    std::min<dfType>(df[index + (iSize * 2) + 1] + 11,
+                    std::min<dfType>(df[index + (iSize * 2) - 1] + 11,
+                    std::min<dfType>(df[index + iSize + 2] + 11,
+                    std::min<dfType>(df[index + iSize + 1] + 7,
+                    std::min<dfType>(df[index + iSize] + 5,
+                    std::min<dfType>(df[index + iSize - 1] + 7,
+                    std::min<dfType>(df[index + iSize - 2] + 11,
+                                     df[index + 1] + 5))))))));
+        // clang-format on
       }
 
       // Finally, we can check the df value and see if it's less than
       // or equal to the usedMargin5X value.
       if (df[index] <= usedMargin5X) {
         if (iMax == -1) {
           iMax = i;
         }
@@ -1976,33 +1965,27 @@ nsFloatManager::ImageShapeInfo::ImageSha
             // values of all of the numbered neighbors summed with the
             // value in that chamfer cell.
             MOZ_ASSERT(index - wEx - 2 < (iSize * bSize) &&
                            index + wEx - 2 < (iSize * bSize) &&
                            index - (wEx * 2) - 1 < (iSize * bSize),
                        "Our distance field most extreme indices should be "
                        "in-bounds.");
 
-            df[index] = std::min<dfType>(
-                MAX_MARGIN_5X,
-                std::min<dfType>(
-                    df[index - wEx - 2] + 11,
-                    std::min<dfType>(
-                        df[index + wEx - 2] + 11,
-                        std::min<dfType>(
-                            df[index - (wEx * 2) - 1] + 11,
-                            std::min<dfType>(
-                                df[index - wEx - 1] + 7,
-                                std::min<dfType>(
-                                    df[index - 1] + 5,
-                                    std::min<dfType>(
-                                        df[index + wEx - 1] + 7,
-                                        std::min<dfType>(
-                                            df[index + (wEx * 2) - 1] + 11,
-                                            df[index - wEx] + 5))))))));
+            // clang-format off
+            df[index] = std::min<dfType>(MAX_MARGIN_5X,
+                        std::min<dfType>(df[index - wEx - 2] + 11,
+                        std::min<dfType>(df[index + wEx - 2] + 11,
+                        std::min<dfType>(df[index - (wEx * 2) - 1] + 11,
+                        std::min<dfType>(df[index - wEx - 1] + 7,
+                        std::min<dfType>(df[index - 1] + 5,
+                        std::min<dfType>(df[index + wEx - 1] + 7,
+                        std::min<dfType>(df[index + (wEx * 2) - 1] + 11,
+                                         df[index - wEx] + 5))))))));
+            // clang-format on
           } else {
             // Row-by-row, starting at the top, each row left-to-right.
             // Backward-looking neighborhood distance from target pixel X
             // with chamfer 5-7-11 looks like:
             //
             // +--+--+--+--+--+
             // |  |11|  |11|  |   ----+
             // +--+--+--+--+--+      /
@@ -2014,33 +1997,27 @@ nsFloatManager::ImageShapeInfo::ImageSha
             // X should be set to the minimum of MAX_MARGIN_5X and the
             // values of all of the numbered neighbors summed with the
             // value in that chamfer cell.
             MOZ_ASSERT(index - (wEx * 2) - 1 < (iSize * bSize) &&
                            index - wEx - 2 < (iSize * bSize),
                        "Our distance field most extreme indices should be "
                        "in-bounds.");
 
-            df[index] = std::min<dfType>(
-                MAX_MARGIN_5X,
-                std::min<dfType>(
-                    df[index - (wEx * 2) - 1] + 11,
-                    std::min<dfType>(
-                        df[index - (wEx * 2) + 1] + 11,
-                        std::min<dfType>(
-                            df[index - wEx - 2] + 11,
-                            std::min<dfType>(
-                                df[index - wEx - 1] + 7,
-                                std::min<dfType>(
-                                    df[index - wEx] + 5,
-                                    std::min<dfType>(
-                                        df[index - wEx + 1] + 7,
-                                        std::min<dfType>(
-                                            df[index - wEx + 2] + 11,
-                                            df[index - 1] + 5))))))));
+            // clang-format off
+            df[index] = std::min<dfType>(MAX_MARGIN_5X,
+                        std::min<dfType>(df[index - (wEx * 2) - 1] + 11,
+                        std::min<dfType>(df[index - (wEx * 2) + 1] + 11,
+                        std::min<dfType>(df[index - wEx - 2] + 11,
+                        std::min<dfType>(df[index - wEx - 1] + 7,
+                        std::min<dfType>(df[index - wEx] + 5,
+                        std::min<dfType>(df[index - wEx + 1] + 7,
+                        std::min<dfType>(df[index - wEx + 2] + 11,
+                                         df[index - 1] + 5))))))));
+            // clang-format on
           }
         }
       }
     }
 
     // Okay, time for the second pass. This pass is in reverse order from
     // the first pass. All of our opaque pixels have been set to 0, and all
     // of our expanded region pixels have been set to MAX_MARGIN_5X. Other
@@ -2103,33 +2080,27 @@ nsFloatManager::ImageShapeInfo::ImageSha
             // the values of all of the numbered neighbors summed with
             // the value in that chamfer cell.
             MOZ_ASSERT(index + wEx + 2 < (wEx * hEx) &&
                            index + (wEx * 2) + 1 < (wEx * hEx) &&
                            index - (wEx * 2) + 1 < (wEx * hEx),
                        "Our distance field most extreme indices should be "
                        "in-bounds.");
 
-            df[index] = std::min<dfType>(
-                df[index],
-                std::min<dfType>(
-                    df[index + wEx + 2] + 11,
-                    std::min<dfType>(
-                        df[index - wEx + 2] + 11,
-                        std::min<dfType>(
-                            df[index + (wEx * 2) + 1] + 11,
-                            std::min<dfType>(
-                                df[index + wEx + 1] + 7,
-                                std::min<dfType>(
-                                    df[index + 1] + 5,
-                                    std::min<dfType>(
-                                        df[index - wEx + 1] + 7,
-                                        std::min<dfType>(
-                                            df[index - (wEx * 2) + 1] + 11,
-                                            df[index + wEx] + 5))))))));
+            // clang-format off
+            df[index] = std::min<dfType>(df[index],
+                        std::min<dfType>(df[index + wEx + 2] + 11,
+                        std::min<dfType>(df[index - wEx + 2] + 11,
+                        std::min<dfType>(df[index + (wEx * 2) + 1] + 11,
+                        std::min<dfType>(df[index + wEx + 1] + 7,
+                        std::min<dfType>(df[index + 1] + 5,
+                        std::min<dfType>(df[index - wEx + 1] + 7,
+                        std::min<dfType>(df[index - (wEx * 2) + 1] + 11,
+                                         df[index + wEx] + 5))))))));
+            // clang-format on
           } else {
             // Row-by-row, starting at the bottom, each row right-to-left.
             // Forward-looking neighborhood distance from target pixel X
             // with chamfer 5-7-11 looks like:
             //
             // +--+--+--+--+--+
             // |  |  | X| 5|  |    <--+
             // +--+--+--+--+--+      /
@@ -2141,33 +2112,27 @@ nsFloatManager::ImageShapeInfo::ImageSha
             // X should be set to the minimum of its current value and
             // the values of all of the numbered neighbors summed with
             // the value in that chamfer cell.
             MOZ_ASSERT(index + (wEx * 2) + 1 < (wEx * hEx) &&
                            index + wEx + 2 < (wEx * hEx),
                        "Our distance field most extreme indices should be "
                        "in-bounds.");
 
-            df[index] = std::min<dfType>(
-                df[index],
-                std::min<dfType>(
-                    df[index + (wEx * 2) + 1] + 11,
-                    std::min<dfType>(
-                        df[index + (wEx * 2) - 1] + 11,
-                        std::min<dfType>(
-                            df[index + wEx + 2] + 11,
-                            std::min<dfType>(
-                                df[index + wEx + 1] + 7,
-                                std::min<dfType>(
-                                    df[index + wEx] + 5,
-                                    std::min<dfType>(
-                                        df[index + wEx - 1] + 7,
-                                        std::min<dfType>(
-                                            df[index + wEx - 2] + 11,
-                                            df[index + 1] + 5))))))));
+            // clang-format off
+            df[index] = std::min<dfType>(df[index],
+                        std::min<dfType>(df[index + (wEx * 2) + 1] + 11,
+                        std::min<dfType>(df[index + (wEx * 2) - 1] + 11,
+                        std::min<dfType>(df[index + wEx + 2] + 11,
+                        std::min<dfType>(df[index + wEx + 1] + 7,
+                        std::min<dfType>(df[index + wEx] + 5,
+                        std::min<dfType>(df[index + wEx - 1] + 7,
+                        std::min<dfType>(df[index + wEx - 2] + 11,
+                                         df[index + 1] + 5))))))));
+            // clang-format on
           }
         }
 
         // Finally, we can check the df value and see if it's less than
         // or equal to the usedMargin5X value.
         if (df[index] <= usedMargin5X) {
           if (iMax == -1) {
             iMax = i;
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -7534,18 +7534,18 @@ nsresult nsFrame::GetNextPrevLineFromeBl
             searchingLine >= (countLines - 1))) {
     // we need to jump to new block frame.
     return NS_ERROR_FAILURE;
   }
   int32_t lineFrameCount;
   nsIFrame* resultFrame = nullptr;
   nsIFrame* farStoppingFrame = nullptr;  // we keep searching until we find a
                                          // "this" frame then we go to next line
-  nsIFrame* nearStoppingFrame =
-      nullptr;  // if we are backing up from edge, stop here
+  nsIFrame* nearStoppingFrame = nullptr;  // if we are backing up from edge,
+                                          // stop here
   nsIFrame* firstFrame;
   nsIFrame* lastFrame;
   nsRect rect;
   bool isBeforeFirstFrame, isAfterLastFrame;
   bool found = false;
 
   nsresult result = NS_OK;
   while (!found) {
@@ -9538,31 +9538,28 @@ void nsFrame::FillCursorInformationFromS
 
 NS_IMETHODIMP
 nsFrame::RefreshSizeCache(nsBoxLayoutState& aState) {
   // XXXbz this comment needs some rewriting to make sense in the
   // post-reflow-branch world.
 
   // Ok we need to compute our minimum, preferred, and maximum sizes.
   // 1) Maximum size. This is easy. Its infinite unless it is overloaded by CSS.
-  // 2) Preferred size. This is a little harder. This is the size the block
-  // would be
-  //      if it were laid out on an infinite canvas. So we can get this by
-  //      reflowing the block with and INTRINSIC width and height. We can also
-  //      do a nice optimization for incremental reflow. If the reflow is
-  //      incremental then we can pass a flag to have the block compute the
-  //      preferred width for us! Preferred height can just be the minimum
-  //      height;
+  // 2) Preferred size. This is a little harder. This is the size the
+  //    block would be if it were laid out on an infinite canvas. So we can
+  //    get this by reflowing the block with and INTRINSIC width and height. We
+  //    can also do a nice optimization for incremental reflow. If the reflow is
+  //    incremental then we can pass a flag to have the block compute the
+  //    preferred width for us! Preferred height can just be the minimum height;
   // 3) Minimum size. This is a toughy. We can pass the block a flag asking for
-  // the max element
-  //    size. That would give us the width. Unfortunately you can only ask for a
-  //    maxElementSize during an incremental reflow. So on other reflows we will
-  //    just have to use 0. The min height on the other hand is fairly easy we
-  //    need to get the largest line height. This can be done with the line
-  //    iterator.
+  //    the max element size. That would give us the width. Unfortunately you
+  //    can only ask for a maxElementSize during an incremental reflow. So on
+  //    other reflows we will just have to use 0. The min height on the other
+  //    hand is fairly easy we need to get the largest line height. This can be
+  //    done with the line iterator.
 
   // if we do have a rendering context
   gfxContext* rendContext = aState.GetRenderingContext();
   if (rendContext) {
     nsPresContext* presContext = aState.PresContext();
 
     // If we don't have any HTML constraints and it's a resize, then nothing in
     // the block could have changed, so no refresh is necessary.
--- a/layout/generic/nsFrameSelection.cpp
+++ b/layout/generic/nsFrameSelection.cpp
@@ -632,19 +632,18 @@ nsresult nsFrameSelection::MoveCaret(nsD
 
   if (!mShell) {
     return NS_OK;
   }
 
   nsPresContext* context = mShell->GetPresContext();
   if (!context) return NS_ERROR_FAILURE;
 
-  nsPoint desiredPos(
-      0,
-      0);  // we must keep this around and revalidate it when its just UP/DOWN
+  // we must keep this around and revalidate it when its just UP/DOWN
+  nsPoint desiredPos(0, 0);
 
   int8_t index = GetIndexFromSelectionType(SelectionType::eNormal);
   RefPtr<Selection> sel = mDomSelections[index];
   if (!sel) return NS_ERROR_NULL_POINTER;
 
   int32_t scrollFlags = Selection::SCROLL_FOR_CARET_MOVE;
   const bool isEditorSelection = sel->IsEditorSelection();
   if (isEditorSelection) {
@@ -960,26 +959,27 @@ nsresult nsFrameSelection::MaintainSelec
     mMaintainRange = anchorFocusRange->CloneRange();
     return NS_OK;
   }
 
   mMaintainRange = nullptr;
   return NS_OK;
 }
 
-/** After moving the caret, its Bidi level is set according to the following
+/**
+ * After moving the caret, its Bidi level is set according to the following
  * rules:
  *
- *  After moving over a character with left/right arrow, set to the Bidi level
+ * After moving over a character with left/right arrow, set to the Bidi level
  * of the last moved over character. After Home and End, set to the paragraph
  * embedding level. After up/down arrow, PageUp/Down, set to the lower level of
  * the 2 surrounding characters. After mouse click, set to the level of the
  * current frame.
  *
- *  The following two methods use GetPrevNextBidiLevels to determine the new
+ * The following two methods use GetPrevNextBidiLevels to determine the new
  * Bidi level. BidiLevelFromMove is called when the caret is moved in response
  * to a keyboard event
  *
  * @param aPresShell is the presentation shell
  * @param aNode is the content node
  * @param aContentOffset is the new caret position, as an offset into aNode
  * @param aAmount is the amount of the move that gave the caret its new position
  * @param aHint is the hint indicating in what logical direction the caret moved
@@ -1240,18 +1240,18 @@ nsresult nsFrameSelection::TakeFocus(nsI
 
       RefPtr<nsRange> newRange = new nsRange(aNewFocus);
 
       newRange->CollapseTo(aNewFocus, aContentOffset);
       mDomSelections[index]->AddRange(*newRange, IgnoreErrors());
       mBatching = batching;
       mChangesDuringBatching = changes;
     } else {
-      bool oldDesiredPosSet =
-          mDesiredPosSet;  // need to keep old desired position if it was set.
+      bool oldDesiredPosSet = mDesiredPosSet;  // need to keep old desired
+                                               // position if it was set.
       mDomSelections[index]->Collapse(aNewFocus, aContentOffset);
       mDesiredPosSet = oldDesiredPosSet;  // now reset desired pos back.
       mBatching = batching;
       mChangesDuringBatching = changes;
     }
     if (aContentEndOffset != aContentOffset) {
       mDomSelections[index]->Extend(aNewFocus, aContentEndOffset);
     }
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -221,20 +221,19 @@ struct MOZ_STACK_CLASS ScrollReflowInput
   // Whether we decided to show the horizontal scrollbar
   MOZ_INIT_OUTSIDE_CTOR
   bool mShowHScrollbar;
   // Whether we decided to show the vertical scrollbar
   MOZ_INIT_OUTSIDE_CTOR
   bool mShowVScrollbar;
 
   ScrollReflowInput(nsIScrollableFrame* aFrame, const ReflowInput& aReflowInput)
-      : mReflowInput(aReflowInput)
+      : mReflowInput(aReflowInput),
         // mBoxState is just used for scrollbars so we don't need to
         // worry about the reflow depth here
-        ,
         mBoxState(aReflowInput.mFrame->PresContext(),
                   aReflowInput.mRenderingContext) {
     ScrollStyles styles = aFrame->GetScrollStyles();
     mHScrollbar = ShouldShowScrollbar(styles.mHorizontal);
     mVScrollbar = ShouldShowScrollbar(styles.mVertical);
   }
 };
 
@@ -1862,20 +1861,21 @@ ComputeBezierAnimationSettingsForOrigin(
     maxMS = Preferences::GetInt(prefMax.get(), kDefaultMaxMS);
 
     static const int32_t kSmoothScrollMaxAllowedAnimationDurationMS = 10000;
     maxMS = clamped(maxMS, 0, kSmoothScrollMaxAllowedAnimationDurationMS);
     minMS = clamped(minMS, 0, maxMS);
   }
 
   // Keep the animation duration longer than the average event intervals
-  //   (to "connect" consecutive scroll animations before the scroll comes to a
-  //   stop).
-  static const double kDefaultDurationToIntervalRatio =
-      2;  // Duplicated at all.js
+  // (to "connect" consecutive scroll animations before the scroll comes to a
+  // stop).
+  //
+  // Default value is duplicated in all.js.
+  static const double kDefaultDurationToIntervalRatio = 2;
   intervalRatio =
       Preferences::GetInt("general.smoothScroll.durationToIntervalRatio",
                           kDefaultDurationToIntervalRatio * 100) /
       100.0;
 
   // Duration should be at least as long as the intervals -> ratio is at least 1
   intervalRatio = std::max(1.0, intervalRatio);
 
--- a/layout/generic/nsLineBox.cpp
+++ b/layout/generic/nsLineBox.cpp
@@ -31,19 +31,18 @@ const uint32_t nsLineBox::kMinChildCount
 #endif
 
 using namespace mozilla;
 
 nsLineBox::nsLineBox(nsIFrame* aFrame, int32_t aCount, bool aIsBlock)
     : mFirstChild(aFrame),
       mWritingMode(),
       mContainerSize(-1, -1),
-      mBounds(WritingMode())  // mBounds will be initialized with the correct
-                              // writing mode when it is set
-      ,
+      mBounds(WritingMode()),  // mBounds will be initialized with the correct
+                               // writing mode when it is set
       mFrames(),
       mAscent(),
       mAllFlags(0),
       mData(nullptr) {
   // Assert that the union elements chosen for initialisation are at
   // least as large as all other elements in their respective unions, so
   // as to ensure that no parts are missed.
   static_assert(sizeof(mFrames) >= sizeof(mChildCount), "nsLineBox init #1");
--- a/layout/generic/nsPluginFrame.cpp
+++ b/layout/generic/nsPluginFrame.cpp
@@ -1176,28 +1176,26 @@ void nsPluginFrame::PrintPlugin(gfxConte
    * rendered before.
    *
    * So, to avoid this, we use PushGroup, which creates a new windows
    * surface, the plugin renders to that, and then we use normal
    * cairo methods to composite that in such that it's recorded using the
    * meta surface.
    */
 
-  /* we'll already be translated into the right spot by gfxWindowsNativeDrawing
-   */
+  // we'll already be translated into the right spot by gfxWindowsNativeDrawing
   nsSize contentSize = GetContentRectRelativeToSelf().Size();
   window.x = 0;
   window.y = 0;
   window.width = presContext->AppUnitsToDevPixels(contentSize.width);
   window.height = presContext->AppUnitsToDevPixels(contentSize.height);
 
   aRenderingContext.Save();
 
-  /* Make sure plugins don't do any damage outside of where they're supposed to
-   */
+  // Make sure plugins don't do any damage outside of where they're supposed to
   aRenderingContext.NewPath();
   gfxRect r(window.x, window.y, window.width, window.height);
   aRenderingContext.Rectangle(r);
   aRenderingContext.Clip();
 
   gfxWindowsNativeDrawing nativeDraw(&aRenderingContext, r);
   do {
     HDC dc = nativeDraw.BeginNativeDrawing();
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -2928,52 +2928,50 @@ static bool IsJustifiableCharacter(const
     return false;
   }
 
   // text-justify: auto
   if (ch < 0x2150u) {
     return false;
   }
   if (aLangIsCJ) {
-    if ((0x2150u <= ch &&
-         ch <= 0x22ffu) ||  // Number Forms, Arrows, Mathematical Operators
-        (0x2460u <= ch && ch <= 0x24ffu) ||  // Enclosed Alphanumerics
-        (0x2580u <= ch &&
-         ch <= 0x27bfu) ||  // Block Elements, Geometric Shapes, Miscellaneous
-                            // Symbols, Dingbats
-        (0x27f0u <= ch &&
-         ch <= 0x2bffu) ||  // Supplemental Arrows-A, Braille Patterns,
-                            // Supplemental Arrows-B, Miscellaneous Mathematical
-                            // Symbols-B, Supplemental Mathematical Operators,
-                            // Miscellaneous Symbols and Arrows
-        (0x2e80u <= ch &&
-         ch <= 0x312fu) ||  // CJK Radicals Supplement, CJK Radicals Supplement,
-                            // Ideographic Description Characters, CJK Symbols
-                            // and Punctuation, Hiragana, Katakana, Bopomofo
-        (0x3190u <= ch &&
-         ch <= 0xabffu) ||  // Kanbun, Bopomofo Extended, Katakana Phonetic
-                            // Extensions, Enclosed CJK Letters and Months, CJK
-                            // Compatibility, CJK Unified Ideographs Extension
-                            // A, Yijing Hexagram Symbols, CJK Unified
-                            // Ideographs, Yi Syllables, Yi Radicals
-        (0xf900u <= ch && ch <= 0xfaffu) ||  // CJK Compatibility Ideographs
-        (0xff5eu <= ch &&
-         ch <= 0xff9fu)  // Halfwidth and Fullwidth Forms(a part)
-    ) {
+    if (  // Number Forms, Arrows, Mathematical Operators
+        (0x2150u <= ch && ch <= 0x22ffu) ||
+        // Enclosed Alphanumerics
+        (0x2460u <= ch && ch <= 0x24ffu) ||
+        // Block Elements, Geometric Shapes, Miscellaneous Symbols, Dingbats
+        (0x2580u <= ch && ch <= 0x27bfu) ||
+        // Supplemental Arrows-A, Braille Patterns, Supplemental Arrows-B,
+        // Miscellaneous Mathematical Symbols-B,
+        // Supplemental Mathematical Operators, Miscellaneous Symbols and Arrows
+        (0x27f0u <= ch && ch <= 0x2bffu) ||
+        // CJK Radicals Supplement, CJK Radicals Supplement, Ideographic
+        // Description Characters, CJK Symbols and Punctuation, Hiragana,
+        // Katakana, Bopomofo
+        (0x2e80u <= ch && ch <= 0x312fu) ||
+        // Kanbun, Bopomofo Extended, Katakana Phonetic Extensions,
+        // Enclosed CJK Letters and Months, CJK Compatibility,
+        // CJK Unified Ideographs Extension A, Yijing Hexagram Symbols,
+        // CJK Unified Ideographs, Yi Syllables, Yi Radicals
+        (0x3190u <= ch && ch <= 0xabffu) ||
+        // CJK Compatibility Ideographs
+        (0xf900u <= ch && ch <= 0xfaffu) ||
+        // Halfwidth and Fullwidth Forms (a part)
+        (0xff5eu <= ch && ch <= 0xff9fu)) {
       return true;
     }
     char16_t ch2;
     if (NS_IS_HIGH_SURROGATE(ch) && aFrag->GetLength() > uint32_t(aPos) + 1 &&
         NS_IS_LOW_SURROGATE(ch2 = aFrag->CharAt(aPos + 1))) {
       uint32_t u = SURROGATE_TO_UCS4(ch, ch2);
-      if (0x20000u <= u &&
-          u <= 0x2ffffu) {  // CJK Unified Ideographs Extension B,
-                            // CJK Unified Ideographs Extension C,
-                            // CJK Unified Ideographs Extension D,
-                            // CJK Compatibility Ideographs Supplement
+      // CJK Unified Ideographs Extension B,
+      // CJK Unified Ideographs Extension C,
+      // CJK Unified Ideographs Extension D,
+      // CJK Compatibility Ideographs Supplement
+      if (0x20000u <= u && u <= 0x2ffffu) {
         return true;
       }
     }
   }
   return false;
 }
 
 void nsTextFrame::ClearMetrics(ReflowOutput& aMetrics) {
@@ -3545,20 +3543,21 @@ void PropertyProvider::CalcTabWidths(Ran
 gfxFloat PropertyProvider::GetHyphenWidth() const {
   if (mHyphenWidth < 0) {
     mHyphenWidth = GetFontGroup()->GetHyphenWidth(this);
   }
   return mHyphenWidth + mLetterSpacing;
 }
 
 static inline bool IS_HYPHEN(char16_t u) {
-  return (u == char16_t('-') || u == 0x058A ||  // ARMENIAN HYPHEN
-          u == 0x2010 ||                        // HYPHEN
-          u == 0x2012 ||                        // FIGURE DASH
-          u == 0x2013);                         // EN DASH
+  return u == char16_t('-') ||  // HYPHEN-MINUS
+         u == 0x058A ||         // ARMENIAN HYPHEN
+         u == 0x2010 ||         // HYPHEN
+         u == 0x2012 ||         // FIGURE DASH
+         u == 0x2013;           // EN DASH
 }
 
 void PropertyProvider::GetHyphenationBreaks(Range aRange,
                                             HyphenType* aBreakBefore) const {
   MOZ_ASSERT(IsInBounds(mStart, mLength, aRange), "Range out of bounds");
   MOZ_ASSERT(mLength != INT32_MAX, "Can't call this with undefined length");
 
   if (!mTextStyle->WhiteSpaceCanWrap(mFrame) ||
--- a/layout/generic/nsTextRunTransformations.cpp
+++ b/layout/generic/nsTextRunTransformations.cpp
@@ -574,56 +574,48 @@ bool nsCaseTransformTextRunFactory::Tran
         }
         break;
 
       case NS_STYLE_TEXT_TRANSFORM_FULL_WIDTH:
         ch = mozilla::unicode::GetFullWidth(ch);
         break;
 
       case NS_STYLE_TEXT_TRANSFORM_FULL_SIZE_KANA: {
+        // clang-format off
         static const uint16_t kSmallKanas[] = {
             // ぁ   ぃ      ぅ      ぇ      ぉ      っ      ゃ      ゅ      ょ
-            0x3041, 0x3043, 0x3045, 0x3047, 0x3049, 0x3063, 0x3083, 0x3085,
-            0x3087,
+            0x3041, 0x3043, 0x3045, 0x3047, 0x3049, 0x3063, 0x3083, 0x3085, 0x3087,
             // ゎ   ゕ      ゖ
             0x308E, 0x3095, 0x3096,
             // ァ   ィ      ゥ      ェ      ォ      ッ      ャ      ュ      ョ
-            0x30A1, 0x30A3, 0x30A5, 0x30A7, 0x30A9, 0x30C3, 0x30E3, 0x30E5,
-            0x30E7,
+            0x30A1, 0x30A3, 0x30A5, 0x30A7, 0x30A9, 0x30C3, 0x30E3, 0x30E5, 0x30E7,
             // ヮ   ヵ      ヶ      ㇰ      ㇱ      ㇲ      ㇳ      ㇴ      ㇵ
-            0x30EE, 0x30F5, 0x30F6, 0x31F0, 0x31F1, 0x31F2, 0x31F3, 0x31F4,
-            0x31F5,
+            0x30EE, 0x30F5, 0x30F6, 0x31F0, 0x31F1, 0x31F2, 0x31F3, 0x31F4, 0x31F5,
             // ㇶ   ㇷ      ㇸ      ㇹ      ㇺ      ㇻ      ㇼ      ㇽ      ㇾ
-            0x31F6, 0x31F7, 0x31F8, 0x31F9, 0x31FA, 0x31FB, 0x31FC, 0x31FD,
-            0x31FE,
+            0x31F6, 0x31F7, 0x31F8, 0x31F9, 0x31FA, 0x31FB, 0x31FC, 0x31FD, 0x31FE,
             // ㇿ
             0x31FF,
             // ァ    ィ       ゥ       ェ       ォ       ャ       ュ       ョ       ッ
-            0xFF67, 0xFF68, 0xFF69, 0xFF6A, 0xFF6B, 0xFF6C, 0xFF6D, 0xFF6E,
-            0xFF6F};
+            0xFF67, 0xFF68, 0xFF69, 0xFF6A, 0xFF6B, 0xFF6C, 0xFF6D, 0xFF6E, 0xFF6F};
         static const uint16_t kFullSizeKanas[] = {
             // あ   い      う      え      お      つ      や      ゆ      よ
-            0x3042, 0x3044, 0x3046, 0x3048, 0x304A, 0x3064, 0x3084, 0x3086,
-            0x3088,
+            0x3042, 0x3044, 0x3046, 0x3048, 0x304A, 0x3064, 0x3084, 0x3086, 0x3088,
             // わ   か      け
             0x308F, 0x304B, 0x3051,
             // ア   イ      ウ      エ      オ      ツ      ヤ      ユ      ヨ
-            0x30A2, 0x30A4, 0x30A6, 0x30A8, 0x30AA, 0x30C4, 0x30E4, 0x30E6,
-            0x30E8,
+            0x30A2, 0x30A4, 0x30A6, 0x30A8, 0x30AA, 0x30C4, 0x30E4, 0x30E6, 0x30E8,
             // ワ   カ      ケ      ク      シ      ス      ト      ヌ      ハ
-            0x30EF, 0x30AB, 0x30B1, 0x30AF, 0x30B7, 0x30B9, 0x30C8, 0x30CC,
-            0x30CF,
+            0x30EF, 0x30AB, 0x30B1, 0x30AF, 0x30B7, 0x30B9, 0x30C8, 0x30CC, 0x30CF,
             // ヒ   フ      ヘ      ホ      ム      ラ      リ      ル      レ
-            0x30D2, 0x30D5, 0x30D8, 0x30DB, 0x30E0, 0x30E9, 0x30EA, 0x30EB,
-            0x30EC,
+            0x30D2, 0x30D5, 0x30D8, 0x30DB, 0x30E0, 0x30E9, 0x30EA, 0x30EB, 0x30EC,
             // ロ
             0x30ED,
             // ア    イ       ウ       エ       オ       ヤ       ユ       ヨ        ツ
-            0xFF71, 0xFF72, 0xFF73, 0xFF74, 0xFF75, 0xFF94, 0xFF95, 0xFF96,
-            0xFF82};
+            0xFF71, 0xFF72, 0xFF73, 0xFF74, 0xFF75, 0xFF94, 0xFF95, 0xFF96, 0xFF82};
+        // clang-format on
 
         size_t index;
         const uint16_t len = MOZ_ARRAY_LENGTH(kSmallKanas);
         if (mozilla::BinarySearch(kSmallKanas, 0, len, ch, &index)) {
           ch = kFullSizeKanas[index];
         }
         break;
       }
--- a/layout/mathml/nsMathMLContainerFrame.cpp
+++ b/layout/mathml/nsMathMLContainerFrame.cpp
@@ -998,22 +998,22 @@ void nsMathMLContainerFrame::UpdateIntri
 // built-in values for lspace & rspace in the Operator Dictionary.
 static int32_t
     kInterFrameSpacingTable[eMathMLFrameType_COUNT][eMathMLFrameType_COUNT] = {
         // in units of muspace.
         // upper half of the byte is set if the
         // spacing is not to be used for scriptlevel > 0
 
         /*           Ord  OpOrd OpInv OpUsr Inner Italic Upright */
-        /*Ord  */ {0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00},
-        /*OpOrd*/ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
-        /*OpInv*/ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
-        /*OpUsr*/ {0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01},
-        /*Inner*/ {0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01},
-        /*Italic*/ {0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01},
+        /*Ord    */ {0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00},
+        /*OpOrd  */ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
+        /*OpInv  */ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
+        /*OpUsr  */ {0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01},
+        /*Inner  */ {0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01},
+        /*Italic */ {0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01},
         /*Upright*/ {0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00}};
 
 #define GET_INTERSPACE(scriptlevel_, frametype1_, frametype2_, space_) \
   /* no space if there is a frame that we know nothing about */        \
   if (frametype1_ == eMathMLFrameType_UNKNOWN ||                       \
       frametype2_ == eMathMLFrameType_UNKNOWN)                         \
     space_ = 0;                                                        \
   else {                                                               \
--- a/layout/mathml/nsMathMLmpaddedFrame.cpp
+++ b/layout/mathml/nsMathMLmpaddedFrame.cpp
@@ -43,26 +43,27 @@ nsMathMLmpaddedFrame::InheritAutomaticDa
   nsMathMLContainerFrame::InheritAutomaticData(aParent);
 
   mPresentationData.flags |= NS_MATHML_STRETCH_ALL_CHILDREN_VERTICALLY;
 
   return NS_OK;
 }
 
 void nsMathMLmpaddedFrame::ProcessAttributes() {
+  // clang-format off
   /*
   parse the attributes
 
-  width  = [+|-] unsigned-number (% [pseudo-unit] | pseudo-unit | h-unit |
-  namedspace) height = [+|-] unsigned-number (% [pseudo-unit] | pseudo-unit |
-  v-unit | namedspace) depth  = [+|-] unsigned-number (% [pseudo-unit] |
-  pseudo-unit | v-unit | namedspace) lspace = [+|-] unsigned-number (%
-  [pseudo-unit] | pseudo-unit | h-unit | namedspace) voffset= [+|-]
-  unsigned-number (% [pseudo-unit] | pseudo-unit | v-unit | namedspace)
+  width  = [+|-] unsigned-number (% [pseudo-unit] | pseudo-unit | h-unit | namedspace)
+  height = [+|-] unsigned-number (% [pseudo-unit] | pseudo-unit | v-unit | namedspace)
+  depth  = [+|-] unsigned-number (% [pseudo-unit] | pseudo-unit | v-unit | namedspace)
+  lspace = [+|-] unsigned-number (% [pseudo-unit] | pseudo-unit | h-unit | namedspace)
+  voffset= [+|-] unsigned-number (% [pseudo-unit] | pseudo-unit | v-unit | namedspace)
   */
+  // clang-format on
 
   nsAutoString value;
 
   // width
   mWidthSign = NS_MATHML_SIGN_INVALID;
   mContent->AsElement()->GetAttr(kNameSpaceID_None, nsGkAtoms::width, value);
   if (!value.IsEmpty()) {
     if (!ParseAttribute(value, mWidthSign, mWidth, mWidthPseudoUnit)) {
--- a/layout/mathml/nsMathMLmtableFrame.cpp
+++ b/layout/mathml/nsMathMLmtableFrame.cpp
@@ -631,18 +631,18 @@ static void ParseAlignAttribute(nsString
 #ifdef DEBUG_rbs_off
 // call ListMathMLTree(mParent) to get the big picture
 static void ListMathMLTree(nsIFrame* atLeast) {
   // climb up to <math> or <body> if <math> isn't there
   nsIFrame* f = atLeast;
   for (; f; f = f->GetParent()) {
     nsIContent* c = f->GetContent();
     if (!c || c->IsMathMLElement(nsGkAtoms::math) ||
-        c->NodeInfo()->NameAtom(
-            nsGkAtoms::body))  // XXXbaku which kind of body tag?
+        // XXXbaku which kind of body tag?
+        c->NodeInfo()->NameAtom(nsGkAtoms::body))
       break;
   }
   if (!f) f = atLeast;
   f->List(stdout, 0);
 }
 #endif
 
 // --------
--- a/layout/painting/FrameLayerBuilder.cpp
+++ b/layout/painting/FrameLayerBuilder.cpp
@@ -382,22 +382,20 @@ DisplayItemData* DisplayItemData::Assert
 }
 
 /**
  * This is the userdata we associate with a layer manager.
  */
 class LayerManagerData : public LayerUserData {
  public:
   explicit LayerManagerData(LayerManager* aManager)
-      : mLayerManager(aManager)
+      : mLayerManager(aManager),
 #ifdef DEBUG_DISPLAY_ITEM_DATA
-        ,
-        mParent(nullptr)
+        mParent(nullptr),
 #endif
-        ,
         mInvalidateAllLayers(false) {
     MOZ_COUNT_CTOR(LayerManagerData);
   }
   ~LayerManagerData() override { MOZ_COUNT_DTOR(LayerManagerData); }
 
 #ifdef DEBUG_DISPLAY_ITEM_DATA
   void Dump(const char* aPrefix = "") {
     printf_stderr("%sLayerManagerData %p\n", aPrefix, this);
--- a/layout/style/CounterStyleManager.cpp
+++ b/layout/style/CounterStyleManager.cpp
@@ -198,91 +198,82 @@ enum CJKIdeographicLang { CHINESE, KOREA
 struct CJKIdeographicData {
   char16_t digit[10];
   char16_t unit[3];
   char16_t unit10K[2];
   uint8_t lang;
   bool informal;
 };
 static const CJKIdeographicData gDataJapaneseInformal = {
-    {// digit
-     0x3007, 0x4e00, 0x4e8c, 0x4e09, 0x56db, 0x4e94, 0x516d, 0x4e03, 0x516b,
-     0x4e5d},
+    {0x3007, 0x4e00, 0x4e8c, 0x4e09, 0x56db, 0x4e94, 0x516d, 0x4e03, 0x516b,
+     0x4e5d},                  // digit
     {0x5341, 0x767e, 0x5343},  // unit
     {0x4e07, 0x5104},          // unit10K
     JAPANESE,                  // lang
     true                       // informal
 };
 static const CJKIdeographicData gDataJapaneseFormal = {
-    {// digit
-     0x96f6, 0x58f1, 0x5f10, 0x53c2, 0x56db, 0x4f0d, 0x516d, 0x4e03, 0x516b,
-     0x4e5d},
+    {0x96f6, 0x58f1, 0x5f10, 0x53c2, 0x56db, 0x4f0d, 0x516d, 0x4e03, 0x516b,
+     0x4e5d},                  // digit
     {0x62fe, 0x767e, 0x9621},  // unit
     {0x842c, 0x5104},          // unit10K
     JAPANESE,                  // lang
     false                      // informal
 };
 static const CJKIdeographicData gDataKoreanHangulFormal = {
-    {// digit
-     0xc601, 0xc77c, 0xc774, 0xc0bc, 0xc0ac, 0xc624, 0xc721, 0xce60, 0xd314,
-     0xad6c},
+    {0xc601, 0xc77c, 0xc774, 0xc0bc, 0xc0ac, 0xc624, 0xc721, 0xce60, 0xd314,
+     0xad6c},                  // digit
     {0xc2ed, 0xbc31, 0xcc9c},  // unit
     {0xb9cc, 0xc5b5},          // unit10K
     KOREAN,                    // lang
     false                      // informal
 };
 static const CJKIdeographicData gDataKoreanHanjaInformal = {
-    {// digit
-     0x96f6, 0x4e00, 0x4e8c, 0x4e09, 0x56db, 0x4e94, 0x516d, 0x4e03, 0x516b,
-     0x4e5d},
+    {0x96f6, 0x4e00, 0x4e8c, 0x4e09, 0x56db, 0x4e94, 0x516d, 0x4e03, 0x516b,
+     0x4e5d},                  // digit
     {0x5341, 0x767e, 0x5343},  // unit
     {0x842c, 0x5104},          // unit10K
     KOREAN,                    // lang
     true                       // informal
 };
 static const CJKIdeographicData gDataKoreanHanjaFormal = {
-    {// digit
-     0x96f6, 0x58f9, 0x8cb3, 0x53c3, 0x56db, 0x4e94, 0x516d, 0x4e03, 0x516b,
-     0x4e5d},
+    {0x96f6, 0x58f9, 0x8cb3, 0x53c3, 0x56db, 0x4e94, 0x516d, 0x4e03, 0x516b,
+     0x4e5d},                  // digit
     {0x62fe, 0x767e, 0x4edf},  // unit
     {0x842c, 0x5104},          // unit10K
     KOREAN,                    // lang
     false                      // informal
 };
 static const CJKIdeographicData gDataSimpChineseInformal = {
-    {// digit
-     0x96f6, 0x4e00, 0x4e8c, 0x4e09, 0x56db, 0x4e94, 0x516d, 0x4e03, 0x516b,
-     0x4e5d},
+    {0x96f6, 0x4e00, 0x4e8c, 0x4e09, 0x56db, 0x4e94, 0x516d, 0x4e03, 0x516b,
+     0x4e5d},                  // digit
     {0x5341, 0x767e, 0x5343},  // unit
     {0x4e07, 0x4ebf},          // unit10K
     CHINESE,                   // lang
     true                       // informal
 };
 static const CJKIdeographicData gDataSimpChineseFormal = {
-    {// digit
-     0x96f6, 0x58f9, 0x8d30, 0x53c1, 0x8086, 0x4f0d, 0x9646, 0x67d2, 0x634c,
-     0x7396},
+    {0x96f6, 0x58f9, 0x8d30, 0x53c1, 0x8086, 0x4f0d, 0x9646, 0x67d2, 0x634c,
+     0x7396},                  // digit
     {0x62fe, 0x4f70, 0x4edf},  // unit
     {0x4e07, 0x4ebf},          // unit10K
     CHINESE,                   // lang
     false                      // informal
 };
 static const CJKIdeographicData gDataTradChineseInformal = {
-    {// digit
-     0x96f6, 0x4e00, 0x4e8c, 0x4e09, 0x56db, 0x4e94, 0x516d, 0x4e03, 0x516b,
-     0x4e5d},
+    {0x96f6, 0x4e00, 0x4e8c, 0x4e09, 0x56db, 0x4e94, 0x516d, 0x4e03, 0x516b,
+     0x4e5d},                  // digit
     {0x5341, 0x767e, 0x5343},  // unit
     {0x842c, 0x5104},          // unit10K
     CHINESE,                   // lang
     true                       // informal
 };
 static const CJKIdeographicData gDataTradChineseFormal = {
-    {// digit
-     0x96f6, 0x58f9, 0x8cb3, 0x53c3, 0x8086, 0x4f0d, 0x9678, 0x67d2, 0x634c,
-     0x7396},
+    {0x96f6, 0x58f9, 0x8cb3, 0x53c3, 0x8086, 0x4f0d, 0x9678, 0x67d2, 0x634c,
+     0x7396},                  // digit
     {0x62fe, 0x4f70, 0x4edf},  // unit
     {0x842c, 0x5104},          // unit10K
     CHINESE,                   // lang
     false                      // informal
 };
 
 static bool CJKIdeographicToText(CounterValue aOrdinal, nsAString& aResult,
                                  const CJKIdeographicData& data) {
--- a/layout/style/FontFaceSet.cpp
+++ b/layout/style/FontFaceSet.cpp
@@ -635,19 +635,18 @@ nsresult FontFaceSet::StartLoad(gfxUserF
   rv = channel->AsyncOpen2(streamLoader);
   if (NS_FAILED(rv)) {
     fontLoader->DropChannel();  // explicitly need to break ref cycle
   }
 
   if (NS_SUCCEEDED(rv)) {
     mLoaders.PutEntry(fontLoader);
     fontLoader->StartedLoading(streamLoader);
-    aUserFontEntry->SetLoader(
-        fontLoader);  // let the font entry remember the
-                      // loader, in case we need to cancel it
+    // let the font entry remember the loader, in case we need to cancel it
+    aUserFontEntry->SetLoader(fontLoader);
   }
 
   return rv;
 }
 
 bool FontFaceSet::UpdateRules(const nsTArray<nsFontFaceRuleContainer>& aRules) {
   MOZ_ASSERT(mUserFontSet);
 
--- a/layout/style/StyleSheet.cpp
+++ b/layout/style/StyleSheet.cpp
@@ -48,24 +48,22 @@ StyleSheet::StyleSheet(const StyleSheet&
                        dom::DocumentOrShadowRoot* aDocumentOrShadowRoot,
                        nsINode* aOwningNodeToUse)
     : mParent(aParentToUse),
       mTitle(aCopy.mTitle),
       mDocumentOrShadowRoot(aDocumentOrShadowRoot),
       mOwningNode(aOwningNodeToUse),
       mOwnerRule(aOwnerRuleToUse),
       mParsingMode(aCopy.mParsingMode),
-      mState(aCopy.mState)
+      mState(aCopy.mState),
       // We only use this constructor during cloning.  It's the cloner's
       // responsibility to notify us if we end up being owned by a document.
-      ,
       mAssociationMode(NotOwnedByDocumentOrShadowRoot),
-      mInner(
-          aCopy.mInner)  // Shallow copy, but concrete subclasses will fix up.
-{
+      // Shallow copy, but concrete subclasses will fix up.
+      mInner(aCopy.mInner) {
   MOZ_ASSERT(mInner, "Should only copy StyleSheets with an mInner.");
   mInner->AddSheet(this);
 
   if (HasForcedUniqueInner()) {  // CSSOM's been there, force full copy now
     MOZ_ASSERT(IsComplete(),
                "Why have rules been accessed on an incomplete sheet?");
     // FIXME: handle failure?
     EnsureUniqueInner();
@@ -852,19 +850,20 @@ already_AddRefed<StyleSheet> StyleSheet:
   return child.forget();
 }
 
 // We disable parallel stylesheet parsing if any of the following three
 // conditions hold:
 //
 // (1) The pref is off.
 // (2) The browser is recording CSS errors (which parallel parsing can't
-// handle). (3) The stylesheet is a chrome stylesheet, since those can use
-// -moz-bool-pref,
-//     which needs to access the pref service, which is not threadsafe.
+//     handle).
+// (3) The stylesheet is a chrome stylesheet, since those can use
+//     -moz-bool-pref, which needs to access the pref service, which is not
+//     threadsafe.
 static bool AllowParallelParse(css::Loader* aLoader, nsIURI* aSheetURI) {
   // Check the pref.
   if (!StaticPrefs::layout_css_parsing_parallel()) {
     return false;
   }
 
   // If the browser is recording CSS errors, we need to use the sequential path
   // because the parallel path doesn't support that.
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -116,18 +116,17 @@ nsStyleFont::nsStyleFont(const nsPresCon
       mSize(ZoomText(aContext, mFont.size)),
       mFontSizeFactor(1.0),
       mFontSizeOffset(0),
       mFontSizeKeyword(NS_STYLE_FONT_SIZE_MEDIUM),
       mGenericID(kGenericFont_NONE),
       mScriptLevel(0),
       mMathVariant(NS_MATHML_MATHVARIANT_NONE),
       mMathDisplay(NS_MATHML_DISPLAYSTYLE_INLINE),
-      mMinFontSizeRatio(100)  // 100%
-      ,
+      mMinFontSizeRatio(100),  // 100%
       mExplicitLanguage(false),
       mAllowZoom(true),
       mScriptUnconstrainedSize(mSize),
       mScriptMinSize(nsPresContext::CSSTwipsToAppUnits(
           NS_POINTS_TO_TWIPS(NS_MATHML_DEFAULT_SCRIPT_MIN_SIZE_PT))),
       mScriptSizeMultiplier(NS_MATHML_DEFAULT_SCRIPT_SIZE_MULTIPLIER),
       mLanguage(GetLanguage(aContext)) {
   MOZ_COUNT_CTOR(nsStyleFont);
@@ -648,18 +647,17 @@ nsChangeHint nsStyleColumn::CalcDifferen
 
   return nsChangeHint(0);
 }
 
 // --------------------
 // nsStyleSVG
 //
 nsStyleSVG::nsStyleSVG(const nsPresContext* aContext)
-    : mFill(eStyleSVGPaintType_Color)  // Will be initialized to NS_RGB(0, 0, 0)
-      ,
+    : mFill(eStyleSVGPaintType_Color),  // Will be initialized to NS_RGB(0,0,0)
       mStroke(eStyleSVGPaintType_None),
       mStrokeDashoffset(0, nsStyleCoord::CoordConstructor),
       mStrokeWidth(nsPresContext::CSSPixelsToAppUnits(1),
                    nsStyleCoord::CoordConstructor),
       mFillOpacity(1.0f),
       mStrokeMiterlimit(4.0f),
       mStrokeOpacity(1.0f),
       mClipRule(StyleFillRule::Nonzero),
--- a/layout/svg/SVGTextFrame.cpp
+++ b/layout/svg/SVGTextFrame.cpp
@@ -479,18 +479,21 @@ struct TextRenderedRun {
    * GetTransformFromRunUserSpaceToUserSpace is that when calling in to
    * nsTextFrame::PaintText, it will already take into account any left clip
    * edge (that is, it doesn't just apply a visual clip to the rendered text, it
    * shifts the glyphs over so that they are painted with their left edge at the
    * x coordinate passed in to it). Thus we need to account for this in our
    * transform.
    *
    *
-   * Assume that we have <text x="100" y="100" rotate="0 0 1 0 0
-   * 1">abcdef</text>. This would result in four text rendered runs:
+   * Assume that we have:
+   *
+   *   <text x="100" y="100" rotate="0 0 1 0 0 * 1">abcdef</text>.
+   *
+   * This would result in four text rendered runs:
    *
    *   - one for "ab"
    *   - one for "c"
    *   - one for "de"
    *   - one for "f"
    *
    * Assume now that we are painting the third TextRenderedRun.  It will have
    * a left clip edge that is the sum of the advances of "abc", and it will
--- a/layout/tables/nsTableFrame.cpp
+++ b/layout/tables/nsTableFrame.cpp
@@ -1824,72 +1824,76 @@ void nsTableFrame::RequestSpecialBSizeRe
 
 /******************************************************************************************
  * Before reflow, intrinsic inline-size calculation is done using GetMinISize
  * and GetPrefISize.  This used to be known as pass 1 reflow.
  *
  * After the intrinsic isize calculation, the table determines the
  * column widths using BalanceColumnISizes() and
  * then reflows each child again with a constrained avail isize. This reflow is
- *referred to as the pass 2 reflow.
+ * referred to as the pass 2 reflow.
  *
  * A special bsize reflow (pass 3 reflow) can occur during an initial or resize
- *reflow if (a) a row group, row, cell, or a frame inside a cell has a percent
- *bsize but no computed bsize or (b) in paginated mode, a table has a bsize. (a)
- *supports percent nested tables contained inside cells whose bsizes aren't
- *known until after the pass 2 reflow. (b) is necessary because the table cannot
- *split until after the pass 2 reflow. The mechanics of the special bsize reflow
- *(variety a) are as follows:
+ * reflow if (a) a row group, row, cell, or a frame inside a cell has a percent
+ * bsize but no computed bsize or (b) in paginated mode, a table has a bsize.
+ * (a) supports percent nested tables contained inside cells whose bsizes aren't
+ * known until after the pass 2 reflow. (b) is necessary because the table
+ * cannot split until after the pass 2 reflow. The mechanics of the special
+ * bsize reflow (variety a) are as follows:
  *
  * 1) Each table related frame (table, row group, row, cell) implements
- *NeedsSpecialReflow() to indicate that it should get the reflow. It does this
- *when it has a percent bsize but no computed bsize by calling
- *CheckRequestSpecialBSizeReflow(). This method calls
+ *    NeedsSpecialReflow() to indicate that it should get the reflow. It does
+ *    this when it has a percent bsize but no computed bsize by calling
+ *    CheckRequestSpecialBSizeReflow(). This method calls
  *    RequestSpecialBSizeReflow() which calls SetNeedSpecialReflow() on its
- *ancestors until it reaches the containing table and calls
- *SetNeedToInitiateSpecialReflow() on it. For percent bsize frames inside cells,
- *during DidReflow(), the cell's NotifyPercentBSize() is called (the cell is the
- *reflow state's mPercentBSizeObserver in this case). NotifyPercentBSize() calls
- *RequestSpecialBSizeReflow().
+ *    ancestors until it reaches the containing table and calls
+ *    SetNeedToInitiateSpecialReflow() on it. For percent bsize frames inside
+ *    cells, during DidReflow(), the cell's NotifyPercentBSize() is called
+ *    (the cell is the reflow state's mPercentBSizeObserver in this case).
+ *    NotifyPercentBSize() calls RequestSpecialBSizeReflow().
  *
  * XXX (jfkthame) This comment appears to be out of date; it refers to
- *methods/flags that are no longer present in the code. 2) After the pass 2
- *reflow, if the table's NeedToInitiateSpecialReflow(true) was called, it will
- *do the special bsize reflow, setting the reflow state's
- *mFlags.mSpecialBSizeReflow to true and mSpecialHeightInitiator to itself. It
- *won't do this if IsPrematureSpecialHeightReflow() returns true because in that
- *case another special bsize reflow will be coming along with the containing
- *table as the mSpecialHeightInitiator. It is only relevant to do the reflow
- *when the mSpecialHeightInitiator is the containing table, because if it is a
- *remote ancestor, then appropriate bsizes will not be known.
+ * methods/flags that are no longer present in the code.
+ *
+ * 2) After the pass 2 reflow, if the table's NeedToInitiateSpecialReflow(true)
+ *    was called, it will do the special bsize reflow, setting the reflow
+ *    state's mFlags.mSpecialBSizeReflow to true and mSpecialHeightInitiator to
+ *    itself. It won't do this if IsPrematureSpecialHeightReflow() returns true
+ *    because in that case another special bsize reflow will be coming along
+ *    with the containing table as the mSpecialHeightInitiator. It is only
+ *    relevant to do the reflow when the mSpecialHeightInitiator is the
+ *    containing table, because if it is a remote ancestor, then appropriate
+ *    bsizes will not be known.
  *
  * 3) Since the bsizes of the table, row groups, rows, and cells was determined
- *during the pass 2 reflow, they return their last desired sizes during the
- *special bsize reflow. The reflow only permits percent bsize frames inside the
- *cells to resize based on the cells bsize and that bsize was determined during
- *the pass 2 reflow.
+ *    during the pass 2 reflow, they return their last desired sizes during the
+ *    special bsize reflow. The reflow only permits percent bsize frames inside
+ *    the cells to resize based on the cells bsize and that bsize was
+ *    determined during the pass 2 reflow.
  *
  * So, in the case of deeply nested tables, all of the tables that were told to
- *initiate a special reflow will do so, but if a table is already in a special
- *reflow, it won't inititate the reflow until the current initiator is its
- *containing table. Since these reflows are only received by frames that need
- *them and they don't cause any rebalancing of tables, the extra overhead is
- *minimal.
+ * initiate a special reflow will do so, but if a table is already in a special
+ * reflow, it won't inititate the reflow until the current initiator is its
+ * containing table. Since these reflows are only received by frames that need
+ * them and they don't cause any rebalancing of tables, the extra overhead is
+ * minimal.
  *
  * The type of special reflow that occurs during printing (variety b) follows
- *the same mechanism except that all frames will receive the reflow even if they
- *don't really need them.
+ * the same mechanism except that all frames will receive the reflow even if
+ * they don't really need them.
  *
  * Open issues with the special bsize reflow:
  *
  * 1) At some point there should be 2 kinds of special bsize reflows because (a)
- *and (b) above are really quite different. This would avoid unnecessary reflows
- *during printing. 2) When a cell contains frames whose percent bsizes > 100%,
- *there is data loss (see bug 115245). However, this can also occur if a cell
- *has a fixed bsize and there is no special bsize reflow.
+ *    and (b) above are really quite different. This would avoid unnecessary
+ *    reflows during printing.
+ *
+ * 2) When a cell contains frames whose percent bsizes > 100%, there is data
+ *    loss (see bug 115245). However, this can also occur if a cell has a fixed
+ *    bsize and there is no special bsize reflow.
  *
  * XXXldb Special bsize reflow should really be its own method, not
  * part of nsIFrame::Reflow.  It should then call nsIFrame::Reflow on
  * the contents of the cells to do the necessary block-axis resizing.
  *
  ******************************************************************************************/
 
 /* Layout the entire inner table. */
@@ -4055,18 +4059,18 @@ bool nsTableFrame::ColumnHasCellSpacingB
  * Collapsing Borders
  *
  *  The CSS spec says to resolve border conflicts in this order:
  *  1) any border with the style HIDDEN wins
  *  2) the widest border with a style that is not NONE wins
  *  3) the border styles are ranked in this order, highest to lowest precedence:
  *     double, solid, dashed, dotted, ridge, outset, groove, inset
  *  4) borders that are of equal width and style (differ only in color) have
- *this precedence: cell, row, rowgroup, col, colgroup, table 5) if all border
- *styles are NONE, then that's the computed border style.
+ *     this precedence: cell, row, rowgroup, col, colgroup, table
+ *  5) if all border styles are NONE, then that's the computed border style.
  *******************************************************************************/
 
 #ifdef DEBUG
 #define VerifyNonNegativeDamageRect(r)                       \
   NS_ASSERTION((r).StartCol() >= 0, "negative col index");   \
   NS_ASSERTION((r).StartRow() >= 0, "negative row index");   \
   NS_ASSERTION((r).ColCount() >= 0, "negative cols damage"); \
   NS_ASSERTION((r).RowCount() >= 0, "negative rows damage");
@@ -5544,48 +5548,57 @@ BCCellBorder BCMapCellInfo::GetBStartInt
 
 /* XXX This comment is still written in physical (horizontal-tb) terms.
 
    Here is the order for storing border edges in the cell map as a cell is
    processed. There are n=colspan top and bottom border edges per cell and
    n=rowspan left and right border edges per cell.
 
    1) On the top edge of the table, store the top edge. Never store the top edge
-   otherwise, since a bottom edge from a cell above will take care of it. 2) On
-   the left edge of the table, store the left edge. Never store the left edge
-   othewise, since a right edge from a cell to the left will take care of it. 3)
-   Store the right edge (or edges if a row span) 4) Store the bottom edge (or
-   edges if a col span)
+      otherwise, since a bottom edge from a cell above will take care of it.
+
+   2) On the left edge of the table, store the left edge. Never store the left
+      edge othewise, since a right edge from a cell to the left will take care
+      of it.
+
+   3) Store the right edge (or edges if a row span)
+
+   4) Store the bottom edge (or edges if a col span)
 
    Since corners are computed with only an array of BCCornerInfo indexed by the
    number-of-cols, corner calculations are somewhat complicated. Using an array
    with number-of-rows * number-of-col entries would simplify this, but at an
    extra in memory cost of nearly 12 bytes per cell map entry. Collapsing
    borders already have about an extra 8 byte per cell map entry overhead (this
    could be reduced to 4 bytes if we are willing to not store border widths in
    nsTableCellFrame), Here are the rules in priority order for storing cornes in
    the cell map as a cell is processed. top-left means the left endpoint of the
    border edge on the top of the cell. There are n=colspan top and bottom border
    edges per cell and n=rowspan left and right border edges per cell.
 
    1) On the top edge of the table, store the top-left corner, unless on the
-   left edge of the table. Never store the top-right corner, since it will get
-   stored as a right-top corner. 2) On the left edge of the table, store the
-   left-top corner. Never store the left-bottom corner, since it will get stored
-   as a bottom-left corner. 3) Store the right-top corner if (a) it is the top
-   right corner of the table or (b) it is not on the top edge of the table.
-   Never store the right-bottom corner since it will get stored as a
-      bottom-right corner.
+      left edge of the table. Never store the top-right corner, since it will
+      get stored as a right-top corner.
+
+   2) On the left edge of the table, store the left-top corner. Never store the
+      left-bottom corner, since it will get stored as a bottom-left corner.
+
+   3) Store the right-top corner if (a) it is the top right corner of the table
+      or (b) it is not on the top edge of the table. Never store the
+      right-bottom corner since it will get stored as a bottom-right corner.
+
    4) Store the bottom-right corner, if it is the bottom right corner of the
-   table. Never store it otherwise, since it will get stored as either a
-   right-top corner by a cell below or a bottom-left corner from a cell to the
-   right. 5) Store the bottom-left corner, if (a) on the bottom edge of the
-   table or (b) if the left edge hits the top side of a colspan in its interior.
-   Never store the corner otherwise, since it will get stored as a right-top
-   corner by a cell from below.
+      table. Never store it otherwise, since it will get stored as either a
+      right-top corner by a cell below or a bottom-left corner from a cell to
+      the right.
+
+   5) Store the bottom-left corner, if (a) on the bottom edge of the table or
+      (b) if the left edge hits the top side of a colspan in its interior.
+      Never store the corner otherwise, since it will get stored as a right-top
+      corner by a cell from below.
 
    XXX the BC-RTL hack - The correct fix would be a rewrite as described in bug
    203686. In order to draw borders in rtl conditions somehow correct, the
    existing structure which relies heavily on the assumption that the next cell
    sibling will be on the right side, has been modified. We flip the border
    during painting and during style lookup. Look for tableIsLTR for places where
    the flipping is done.
  */
--- a/layout/xul/nsBoxFrame.cpp
+++ b/layout/xul/nsBoxFrame.cpp
@@ -9,22 +9,27 @@
 // Netscape Communications
 //
 // See documentation in associated header file
 //
 
 // How boxes layout
 // ----------------
 // Boxes layout a bit differently than html. html does a bottom up layout. Where
-// boxes do a top down. 1) First thing a box does it goes out and askes each
-// child for its min, max, and preferred sizes. 2) It then adds them up to
-// determine its size. 3) If the box was asked to layout it self intrinically it
-// will layout its children at their preferred size
-//    otherwise it will layout the child at the size it was told to. It will
-//    squeeze or stretch its children if Necessary.
+// boxes do a top down.
+//
+// 1) First thing a box does it goes out and askes each child for its min, max,
+//    and preferred sizes.
+//
+// 2) It then adds them up to determine its size.
+//
+// 3) If the box was asked to layout it self intrinically it will layout its
+//    children at their preferred size otherwise it will layout the child at
+//    the size it was told to. It will squeeze or stretch its children if
+//    Necessary.
 //
 // However there is a catch. Some html components like block frames can not
 // determine their preferred size. this is their size if they were laid out
 // intrinsically. So the box will flow the child to determine this can cache the
 // value.
 
 // Boxes and Incremental Reflow
 // ----------------------------
--- a/layout/xul/nsImageBoxFrame.cpp
+++ b/layout/xul/nsImageBoxFrame.cpp
@@ -164,20 +164,20 @@ void nsImageBoxFrame::DestroyFrom(nsIFra
                                           &mRequestRegistered);
 
     mImageRequest->UnlockImage();
 
     // Release image loader first so that it's refcnt can go to zero
     mImageRequest->CancelAndForgetObserver(NS_ERROR_FAILURE);
   }
 
-  if (mListener)
-    reinterpret_cast<nsImageBoxListener*>(mListener.get())
-        ->ClearFrame();  // set the frame to null so we don't send messages to a
-                         // dead object.
+  if (mListener) {
+    // set the frame to null so we don't send messages to a dead object.
+    reinterpret_cast<nsImageBoxListener*>(mListener.get())->ClearFrame();
+  }
 
   nsLeafBoxFrame::DestroyFrom(aDestructRoot, aPostDestroyData);
 }
 
 void nsImageBoxFrame::Init(nsIContent* aContent, nsContainerFrame* aParent,
                            nsIFrame* aPrevInFlow) {
   if (!mListener) {
     RefPtr<nsImageBoxListener> listener = new nsImageBoxListener(this);
--- a/layout/xul/nsMenuFrame.cpp
+++ b/layout/xul/nsMenuFrame.cpp
@@ -874,18 +874,17 @@ void nsMenuFrame::UpdateMenuSpecialState
   while (sib) {
     nsMenuFrame* menu = do_QueryFrame(sib);
     if (sib != this) {
       if (menu && menu->GetMenuType() == eMenuType_Radio && menu->IsChecked() &&
           menu->GetRadioGroupName() == mGroupName) {
         /* uncheck the old item */
         sib->GetContent()->AsElement()->UnsetAttr(kNameSpaceID_None,
                                                   nsGkAtoms::checked, true);
-        /* XXX in DEBUG, check to make sure that there aren't two checked items
-         */
+        // XXX in DEBUG, check to make sure that there aren't two checked items
         return;
       }
     }
     sib = nsXULPopupManager::GetNextMenuItem(GetParent(), menu, true, true);
     if (sib == firstMenuItem) {
       break;
     }
   }
--- a/layout/xul/nsScrollbarFrame.cpp
+++ b/layout/xul/nsScrollbarFrame.cpp
@@ -278,29 +278,28 @@ int32_t nsScrollbarFrame::MoveToNewPosit
     }
   }
   content->UnsetAttr(kNameSpaceID_None, nsGkAtoms::smooth, false);
   return curpos;
 }
 
 nsresult nsScrollbarFrame::CreateAnonymousContent(
     nsTArray<ContentInfo>& aElements) {
-  // <xul:scrollbarbutton sbattr="scrollbar-up-top" type="decrement"
-  // xbl:inherits="curpos,maxpos,disabled"/> <xul:scrollbarbutton
-  // sbattr="scrollbar-down-top" type="increment"
-  // xbl:inherits="curpos,maxpos,disabled"/> <xul:slider flex="1"
-  // xbl:inherits="disabled,curpos,maxpos,pageincrement,increment,orient">
-  //   <xul:thumb sbattr="scrollbar-thumb"
-  //   xbl:inherits="orient,collapsed=disabled"
+  // clang-format off
+
+  // <xul:scrollbarbutton sbattr="scrollbar-up-top" type="decrement" xbl:inherits="curpos,maxpos,disabled"/>
+  // <xul:scrollbarbutton sbattr="scrollbar-down-top" type="increment" xbl:inherits="curpos,maxpos,disabled"/>
+  // <xul:slider flex="1" xbl:inherits="disabled,curpos,maxpos,pageincrement,increment,orient">
+  //   <xul:thumb sbattr="scrollbar-thumb" xbl:inherits="orient,collapsed=disabled"
   //              align="center" pack="center"/>
   // </xul:slider>
-  // <xul:scrollbarbutton sbattr="scrollbar-up-bottom" type="decrement"
-  // xbl:inherits="curpos,maxpos,disabled"/> <xul:scrollbarbutton
-  // sbattr="scrollbar-down-bottom" type="increment"
-  // xbl:inherits="curpos,maxpos,disabled"/>
+  // <xul:scrollbarbutton sbattr="scrollbar-up-bottom" type="decrement" xbl:inherits="curpos,maxpos,disabled"/>
+  // <xul:scrollbarbutton sbattr="scrollbar-down-bottom" type="increment" xbl:inherits="curpos,maxpos,disabled"/>
+
+  // clang-format on
 
   nsNodeInfoManager* nodeInfoManager = mContent->NodeInfo()->NodeInfoManager();
 
   Element* el(GetContent()->AsElement());
 
   // If there are children already in the node, don't create any anonymous
   // content (this only apply to crashtests/369038-1.xhtml)
   if (el->HasChildren()) {