Bug 1511854 - Part 1: Fix some formatting oddities in layout/ after the clang-format. r=TYLin
authorCameron McCormack <cam@mcc.id.au>
Wed, 05 Dec 2018 18:44:03 +0000
changeset 508652 9d18f3b4b898108d8ab5c924d366d145e5e62df0
parent 508651 6fd0a7cc9a43b818853c98f2134745a517d706fb
child 508653 89fd36f5fbe5e90bf16563342819fa6700431ccb
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
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 1: Fix some formatting oddities in layout/ after the clang-format. r=TYLin Differential Revision: https://phabricator.services.mozilla.com/D13686
layout/base/MobileViewportManager.h
layout/base/ZoomConstraintsClient.h
layout/base/nsBidiPresUtils.h
layout/base/nsCSSFrameConstructor.h
layout/base/nsFrameTraversal.h
layout/base/nsIDocumentViewerPrint.h
layout/base/nsIPresShell.h
layout/base/nsLayoutUtils.h
layout/base/nsPresContext.h
layout/generic/ReflowInput.h
layout/generic/WritingModes.h
layout/generic/nsBlockFrame.h
layout/generic/nsFrameSelection.h
layout/generic/nsFrameSetFrame.h
layout/generic/nsIFrame.h
layout/mathml/nsIMathMLFrame.h
layout/mathml/nsMathMLContainerFrame.h
layout/printing/nsPrintData.h
layout/style/StyleSheet.h
layout/style/URLExtraData.h
layout/style/nsCSSAnonBoxes.h
layout/style/nsCSSProps.h
layout/style/nsCSSValue.h
layout/style/nsStyleConsts.h
layout/style/nsStyleCoord.h
layout/style/nsStyleStruct.h
layout/svg/nsSVGDisplayableFrame.h
layout/svg/nsSVGOuterSVGFrame.h
layout/tables/celldata.h
layout/tables/nsTableColFrame.h
layout/tables/nsTableColGroupFrame.h
layout/tables/nsTableFrame.h
layout/tables/nsTableRowFrame.h
layout/tables/nsTableRowGroupFrame.h
layout/xul/BoxObject.h
layout/xul/nsMenuBarFrame.h
layout/xul/nsMenuPopupFrame.h
layout/xul/nsXULPopupManager.h
layout/xul/tree/nsTreeBodyFrame.h
--- a/layout/base/MobileViewportManager.h
+++ b/layout/base/MobileViewportManager.h
@@ -131,18 +131,18 @@ class MobileViewportManager final : publ
   /*
    * Shrink the content to fit it to the display width if no initial-scale is
    * specified and if the content is still wider than the display width.
    */
   void ShrinkToDisplaySizeIfNeeded(nsViewportInfo& aViewportInfo,
                                    const mozilla::ScreenIntSize& aDisplaySize);
 
   nsCOMPtr<nsIDocument> mDocument;
-  nsIPresShell* MOZ_NON_OWNING_REF
-      mPresShell;  // raw ref since the presShell owns this
+  // raw ref since the presShell owns this
+  nsIPresShell* MOZ_NON_OWNING_REF mPresShell;
   nsCOMPtr<mozilla::dom::EventTarget> mEventTarget;
   bool mIsFirstPaint;
   bool mPainted;
   mozilla::LayoutDeviceIntSize mDisplaySize;
   mozilla::CSSSize mMobileViewportSize;
   mozilla::Maybe<float> mRestoreResolution;
   mozilla::Maybe<mozilla::ScreenIntSize> mRestoreDisplaySize;
 };
--- a/layout/base/ZoomConstraintsClient.h
+++ b/layout/base/ZoomConstraintsClient.h
@@ -38,15 +38,15 @@ class ZoomConstraintsClient final : publ
   void Init(nsIPresShell* aPresShell, nsIDocument* aDocument);
   void Destroy();
   void ScreenSizeChanged();
 
  private:
   void RefreshZoomConstraints();
 
   nsCOMPtr<nsIDocument> mDocument;
-  nsIPresShell* MOZ_NON_OWNING_REF
-      mPresShell;  // raw ref since the presShell owns this
+  // raw ref since the presShell owns this
+  nsIPresShell* MOZ_NON_OWNING_REF mPresShell;
   nsCOMPtr<mozilla::dom::EventTarget> mEventTarget;
   mozilla::Maybe<mozilla::layers::ScrollableLayerGuid> mGuid;
 };
 
 #endif
--- a/layout/base/nsBidiPresUtils.h
+++ b/layout/base/nsBidiPresUtils.h
@@ -422,33 +422,33 @@ class nsBidiPresUtils {
    * @param aIsEvenLevel         TRUE means the embedding level of this frame
    *                             is even (LTR)
    * @param aStartOrEnd          The distance to the start or the end of aFrame
    *                             without considering its inline margin. If the
    *                             container is reordering frames in reverse
    *                             direction, it's the distance to the end,
    *                             otherwise, it's the distance to the start.
    * @param aContinuationStates  A map from nsIFrame* to
-   * nsFrameContinuationState
+   *                             nsFrameContinuationState
    * @return                     The isize aFrame takes, including margins.
    */
   static nscoord RepositionFrame(
       nsIFrame* aFrame, bool aIsEvenLevel, nscoord aStartOrEnd,
       const nsContinuationStates* aContinuationStates,
       mozilla::WritingMode aContainerWM, bool aContainerReverseOrder,
       const nsSize& aContainerSize);
 
   /*
    * Initialize the continuation state(nsFrameContinuationState) to
    * (nullptr, 0) for aFrame and its descendants.
    *
    * @param aFrame               The frame which itself and its descendants will
    *                             be initialized
    * @param aContinuationStates  A map from nsIFrame* to
-   * nsFrameContinuationState
+   *                             nsFrameContinuationState
    */
   static void InitContinuationStates(nsIFrame* aFrame,
                                      nsContinuationStates* aContinuationStates);
 
   /*
    * Determine if aFrame is first or last, and set aIsFirst and
    * aIsLast values. Also set continuation states of
    * aContinuationStates.
--- a/layout/base/nsCSSFrameConstructor.h
+++ b/layout/base/nsCSSFrameConstructor.h
@@ -1201,18 +1201,17 @@ class nsCSSFrameConstructor final : publ
     void* operator new(size_t) = delete;
     void* operator new[](size_t) = delete;
 #ifdef _MSC_VER /* Visual Studio */
     void operator delete(void*) { MOZ_CRASH("FrameConstructionItem::delete"); }
 #else
     void operator delete(void*) = delete;
 #endif
     void operator delete[](void*) = delete;
-    FrameConstructionItem(const FrameConstructionItem& aOther) =
-        delete; /* not implemented */
+    FrameConstructionItem(const FrameConstructionItem& aOther) = delete;
     // Not allocated from the stack!
     ~FrameConstructionItem() {
       MOZ_COUNT_DTOR(FrameConstructionItem);
       MOZ_ASSERT(mChildItems.IsEmpty(), "leaking");
     }
   };
 
   /**
@@ -1977,17 +1976,16 @@ class nsCSSFrameConstructor final : publ
   void WrapFramesInFirstLetterFrame(
       nsContainerFrame* aBlockFrame, nsContainerFrame* aBlockContinuation,
       nsContainerFrame* aParentFrame, nsIFrame* aParentFrameList,
       nsContainerFrame** aModifiedParent, nsIFrame** aTextFrame,
       nsIFrame** aPrevFrame, nsFrameItems& aLetterFrames, bool* aStopLooking);
 
   void RecoverLetterFrames(nsContainerFrame* aBlockFrame);
 
-  //
   void RemoveLetterFrames(nsIPresShell* aPresShell,
                           nsContainerFrame* aBlockFrame);
 
   // Recursive helper for RemoveLetterFrames
   void RemoveFirstLetterFrames(nsIPresShell* aPresShell,
                                nsContainerFrame* aFrame,
                                nsContainerFrame* aBlockFrame,
                                bool* aStopLooking);
--- a/layout/base/nsFrameTraversal.h
+++ b/layout/base/nsFrameTraversal.h
@@ -1,13 +1,14 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
 #ifndef NSFRAMETRAVERSAL_H
 #define NSFRAMETRAVERSAL_H
 
 #include "mozilla/Attributes.h"
 #include "nsIFrameTraversal.h"
 
 class nsIFrame;
 
--- a/layout/base/nsIDocumentViewerPrint.h
+++ b/layout/base/nsIDocumentViewerPrint.h
@@ -1,13 +1,14 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
 #ifndef nsIDocumentViewerPrint_h___
 #define nsIDocumentViewerPrint_h___
 
 #include "nsISupports.h"
 #include "mozilla/UniquePtr.h"
 
 class nsIDocument;
 namespace mozilla {
--- a/layout/base/nsIPresShell.h
+++ b/layout/base/nsIPresShell.h
@@ -693,48 +693,47 @@ class nsIPresShell : public nsStubDocume
     SCROLL_IF_NOT_VISIBLE,
     SCROLL_IF_NOT_FULLY_VISIBLE
   };
   typedef struct ScrollAxis {
     int16_t mWhereToScroll;
     WhenToScroll mWhenToScroll : 8;
     bool mOnlyIfPerceivedScrollableDirection : 1;
     /**
-     * @param aWhere: Either a percentage or a special value.
-     *                nsIPresShell defines:
-     *                * (Default) SCROLL_MINIMUM = -1: The visible area is
-     * scrolled the minimum amount to show as much as possible of the frame.
-     *                This won't hide any initially visible part of the frame.
-     *                * SCROLL_TOP = 0: The frame's upper edge is aligned with
-     * the top edge of the visible area.
-     *                * SCROLL_BOTTOM = 100: The frame's bottom edge is aligned
-     *                with the bottom edge of the visible area.
-     *                * SCROLL_LEFT = 0: The frame's left edge is aligned with
-     * the left edge of the visible area.
-     *                * SCROLL_RIGHT = 100: The frame's right edge is aligned
-     * with the right edge of the visible area.
-     *                * SCROLL_CENTER = 50: The frame is centered along the axis
-     *                the ScrollAxis is used for.
+     * aWhere:
+     *   Either a percentage or a special value. nsIPresShell defines:
+     *   * (Default) SCROLL_MINIMUM = -1: The visible area is scrolled the
+     *     minimum amount to show as much as possible of the frame. This won't
+     *     hide any initially visible part of the frame.
+     *   * SCROLL_TOP = 0: The frame's upper edge is aligned with the top edge
+     *     of the visible area.
+     *   * SCROLL_BOTTOM = 100: The frame's bottom edge is aligned with the
+     *     bottom edge of the visible area.
+     *   * SCROLL_LEFT = 0: The frame's left edge is aligned with the left edge
+     *     of the visible area.
+     *   * SCROLL_RIGHT = 100: The frame's right edge is aligned* with the right
+     *     edge of the visible area.
+     *   * SCROLL_CENTER = 50: The frame is centered along the axis the
+     *     ScrollAxis is used for.
      *
-     *                Other values are treated as a percentage, and the point
-     *                "percent" down the frame is placed at the point "percent"
-     *                down the visible area.
-     * @param aWhen:
-     *                * (Default) SCROLL_IF_NOT_FULLY_VISIBLE: Move the frame
-     * only if it is not fully visible (including if it's not visible at all).
-     * Note that in this case if the frame is too large to fit in view, it will
-     * only be scrolled if more of it can fit than is already in view.
-     *                * SCROLL_IF_NOT_VISIBLE: Move the frame only if none of it
-     *                is visible.
-     *                * SCROLL_ALWAYS: Move the frame regardless of its current
-     *                visibility.
-     * @param aOnlyIfPerceivedScrollableDirection:
-     *                If the direction is not a perceived scrollable direction
-     * (i.e. no scrollbar showing and less than one device pixel of scrollable
-     * distance), don't scroll. Defaults to false.
+     *   Other values are treated as a percentage, and the point*"percent"
+     *   down the frame is placed at the point "percent" down the visible area.
+     *
+     * aWhen:
+     *   * (Default) SCROLL_IF_NOT_FULLY_VISIBLE: Move the frame only if it is
+     *     not fully visible (including if it's not visible at all). Note that
+     *     in this case if the frame is too large to fit in view, it will only
+     *     be scrolled if more of it can fit than is already in view.
+     *   * SCROLL_IF_NOT_VISIBLE: Move the frame only if none of it is visible.
+     *   * SCROLL_ALWAYS: Move the frame regardless of its current visibility.
+     *
+     * aOnlyIfPerceivedScrollableDirection:
+     *   If the direction is not a perceived scrollable direction (i.e. no
+     *   scrollbar showing and less than one device pixel of scrollable
+     *   distance), don't scroll. Defaults to false.
      */
     explicit ScrollAxis(int16_t aWhere = SCROLL_MINIMUM,
                         WhenToScroll aWhen = SCROLL_IF_NOT_FULLY_VISIBLE,
                         bool aOnlyIfPerceivedScrollableDirection = false)
         : mWhereToScroll(aWhere),
           mWhenToScroll(aWhen),
           mOnlyIfPerceivedScrollableDirection(
               aOnlyIfPerceivedScrollableDirection) {}
@@ -1209,25 +1208,29 @@ class nsIPresShell : public nsStubDocume
   virtual void UpdateCanvasBackground() = 0;
 
   /**
    * Add a solid color item to the bottom of aList with frame aFrame and bounds
    * aBounds. Checks first if this needs to be done by checking if aFrame is a
    * canvas frame (if the FORCE_DRAW flag is passed then this check is skipped).
    * aBackstopColor is composed behind the background color of the canvas, it is
    * transparent by default.
+   *
    * We attempt to make the background color part of the scrolled canvas (to
    * reduce transparent layers), and if async scrolling is enabled (and the
    * background is opaque) then we add a second, unscrolled item to handle the
-   * checkerboarding case. ADD_FOR_SUBDOC shoud be specified when calling this
-   * for a subdocument, and LayoutUseContainersForRootFrame might cause the
-   * whole list to be scrolled. In that case the second unscrolled item will be
-   * elided. APPEND_UNSCROLLED_ONLY only attempts to add the unscrolled item, so
-   * that we can add it manually after LayoutUseContainersForRootFrame has built
-   * the scrolling ContainerLayer.
+   * checkerboarding case.
+   *
+   * ADD_FOR_SUBDOC should be specified when calling this for a subdocument, and
+   * LayoutUseContainersForRootFrame might cause the whole list to be scrolled.
+   * In that case the second unscrolled item will be elided.
+   *
+   * APPEND_UNSCROLLED_ONLY only attempts to add the unscrolled item, so that
+   * we can add it manually after LayoutUseContainersForRootFrame has built the
+   * scrolling ContainerLayer.
    */
   enum {
     FORCE_DRAW = 0x01,
     ADD_FOR_SUBDOC = 0x02,
     APPEND_UNSCROLLED_ONLY = 0x04,
   };
   virtual void AddCanvasBackgroundColorItem(
       nsDisplayListBuilder& aBuilder, nsDisplayList& aList, nsIFrame* aFrame,
--- a/layout/base/nsLayoutUtils.h
+++ b/layout/base/nsLayoutUtils.h
@@ -848,23 +848,27 @@ class nsLayoutUtils {
   /**
    * Transform aRect relative to aFrame up to the coordinate system of
    * aAncestor. Computes the bounding-box of the true quadrilateral.
    * Pass non-null aPreservesAxisAlignedRectangles and it will be set to true if
    * we only need to use a 2d transform that PreservesAxisAlignedRectangles().
    *
    * |aMatrixCache| allows for optimizations in recomputing the same matrix over
    * and over. The argument can be one of the following values:
+   *
    * nullptr (the default) - No optimization; the transform matrix is computed
-   * on every call to this function. non-null pointer to an empty
-   * Maybe<Matrix4x4> - Upon return, the Maybe is filled with the transform
-   * matrix that was computed. This can then be passed in to subsequent calls
-   * with the same source and destination frames to avoid recomputing the
-   * matrix. non-null pointer to a non-empty Matrix4x4 - The provided matrix
-   * will be used as the transform matrix and applied to the rect.
+   * on every call to this function.
+   *
+   * non-null pointer to an empty Maybe<Matrix4x4> - Upon return, the Maybe is
+   * filled with the transform matrix that was computed. This can then be passed
+   * in to subsequent calls with the same source and destination frames to avoid
+   * recomputing the matrix.
+   *
+   * non-null pointer to a non-empty Matrix4x4 - The provided matrix will be
+   * used as the transform matrix and applied to the rect.
    */
   static nsRect TransformFrameRectToAncestor(
       const nsIFrame* aFrame, const nsRect& aRect, const nsIFrame* aAncestor,
       bool* aPreservesAxisAlignedRectangles = nullptr,
       mozilla::Maybe<Matrix4x4Flagged>* aMatrixCache = nullptr,
       bool aStopAtStackingContextAndDisplayPortAndOOFFrame = false,
       nsIFrame** aOutAncestor = nullptr);
 
@@ -1738,40 +1742,45 @@ class nsLayoutUtils {
   /* N.B. The only difference between variants of the Draw*Image
    * functions below is the type of the aImage argument.
    */
 
   /**
    * Draw a background image.  The image's dimensions are as specified in aDest;
    * the image itself is not consulted to determine a size.
    * See https://wiki.mozilla.org/Gecko:Image_Snapping_and_Rendering
-   *   @param aContext          The context to draw to, already set up with an
-   *                            appropriate scale and transform for drawing in
-   *                            app units.
-   *   @param aForFrame         The nsIFrame that we're drawing this image for.
-   *   @param aImage            The image.
-   *   @param aImageSize        The unscaled size of the image being drawn.
-   *                            (This might be the image's size if no scaling
-   *                            occurs, or it might be the image's size if
-   *                            the image is a vector image being rendered at
-   *                            that size.)
-   *   @param aDest             The position and scaled area where one copy of
-   *                            the image should be drawn. This area represents
-   *                            the image itself in its correct position as
-   * defined with the background-position css property.
-   *   @param aFill             The area to be filled with copies of the image.
-   *   @param aRepeatSize       The distance between the positions of two
-   * subsequent repeats of the image. Sizes larger than aDest.Size() create gaps
-   * between the images.
-   *   @param aAnchor           A point in aFill which we will ensure is
-   *                            pixel-aligned in the output.
-   *   @param aDirty            Pixels outside this area may be skipped.
-   *   @param aImageFlags       Image flags of the imgIContainer::FLAG_*
-   * variety.
-   *   @param aExtendMode       How to extend the image over the dest rect.
+   *
+   * @param aContext
+   *   The context to draw to, already set up with an appropriate scale and
+   *   transform for drawing in app units.
+   * @param aForFrame
+   *   The nsIFrame that we're drawing this image for.
+   * @param aImage
+   *   The image.
+   * @param aImageSize
+   *  The unscaled size of the image being drawn. (This might be the image's
+   *  size if no scaling occurs, or it might be the image's size if the image is
+   *  a vector image being rendered at that size.)
+   * @param aDest
+   *  The position and scaled area where one copy of the image should be drawn.
+   *  This area represents the image itself in its correct position as defined
+   *  with the background-position css property.
+   * @param aFill
+   *  The area to be filled with copies of the image.
+   * @param aRepeatSize
+   *  The distance between the positions of two subsequent repeats of the image.
+   *  Sizes larger than aDest.Size() create gaps between the images.
+   * @param aAnchor
+   *  A point in aFill which we will ensure is pixel-aligned in the output.
+   * @param aDirty
+   *   Pixels outside this area may be skipped.
+   * @param aImageFlags
+   *   Image flags of the imgIContainer::FLAG_* variety.
+   * @param aExtendMode
+   *   How to extend the image over the dest rect.
    */
   static ImgDrawResult DrawBackgroundImage(
       gfxContext& aContext, nsIFrame* aForFrame, nsPresContext* aPresContext,
       imgIContainer* aImage, const CSSIntSize& aImageSize,
       SamplingFilter aSamplingFilter, const nsRect& aDest, const nsRect& aFill,
       const nsSize& aRepeatSize, const nsPoint& aAnchor, const nsRect& aDirty,
       uint32_t aImageFlags, ExtendMode aExtendMode, float aOpacity);
 
@@ -2907,23 +2916,25 @@ class nsLayoutUtils {
                                             const nsRect& aOverflow,
                                             const nsSize& aPrerenderSize);
 
   /*
    * Checks whether a node is an invisible break.
    * If not, returns the first frame on the next line if such a next line
    * exists.
    *
-   * @return  true if the node is an invisible break.
-   *          aNextLineFrame is returned null in this case.
-   *          false if the node causes a visible break or if the node is no
-   * break.
+   * @return
+   *   true if the node is an invisible break. aNextLineFrame is returned null
+   *   in this case.
    *
-   * @param   aNextLineFrame  assigned to first frame on the next line if such a
-   *                          next line exists, null otherwise.
+   *   false if the node causes a visible break or if the node is no break.
+   *
+   * @param aNextLineFrame
+   *   assigned to first frame on the next line if such a next line exists, null
+   *   otherwise.
    */
   static bool IsInvisibleBreak(nsINode* aNode,
                                nsIFrame** aNextLineFrame = nullptr);
 
   static nsRect ComputeGeometryBox(nsIFrame* aFrame,
                                    StyleGeometryBox aGeometryBox);
 
   static nsPoint ComputeOffsetToUserSpace(nsDisplayListBuilder* aBuilder,
--- a/layout/base/nsPresContext.h
+++ b/layout/base/nsPresContext.h
@@ -97,20 +97,21 @@ enum nsPresContext_CachedBoolPrefType {
 enum nsPresContext_CachedIntPrefType {
   kPresContext_ScrollbarSide = 1,
   kPresContext_BidiDirection
 };
 
 // IDs for the default variable and fixed fonts (not to be changed, see
 // nsFont.h) To be used for Get/SetDefaultFont(). The other IDs in nsFont.h are
 // also supported.
-const uint8_t kPresContext_DefaultVariableFont_ID =
-    0x00;  // kGenericFont_moz_variable
-const uint8_t kPresContext_DefaultFixedFont_ID =
-    0x01;  // kGenericFont_moz_fixed
+//
+// kGenericFont_moz_variable
+const uint8_t kPresContext_DefaultVariableFont_ID = 0x00;
+// kGenericFont_moz_fixed
+const uint8_t kPresContext_DefaultFixedFont_ID = 0x01;
 
 #ifdef DEBUG
 struct nsAutoLayoutPhase;
 
 enum nsLayoutPhase {
   eLayoutPhase_Paint,
   eLayoutPhase_DisplayListBuilding,  // sometimes a subset of the paint phase
   eLayoutPhase_Reflow,
--- a/layout/generic/ReflowInput.h
+++ b/layout/generic/ReflowInput.h
@@ -180,65 +180,84 @@ struct SizeComputationInput {
         mWritingMode(aFrame->GetWritingMode()) {}
 
   SizeComputationInput(nsIFrame* aFrame, gfxContext* aRenderingContext,
                        mozilla::WritingMode aContainingBlockWritingMode,
                        nscoord aContainingBlockISize);
 
   struct ReflowInputFlags {
     ReflowInputFlags() { memset(this, 0, sizeof(*this)); }
-    bool mSpecialBSizeReflow : 1;   // used by tables to communicate special
-                                    // reflow (in process) to handle percent
-                                    // bsize frames inside cells which may not
-                                    // have computed bsizes
-    bool mNextInFlowUntouched : 1;  // nothing in the frame's next-in-flow (or
-                                    // its descendants) is changing
-    bool mIsTopOfPage : 1;          // Is the current context at the top of a
-                                    // page?  When true, we force something
-                                    // that's too tall for a page/column to
-                                    // fit anyway to avoid infinite loops.
-    bool mAssumingHScrollbar : 1;   // parent frame is an nsIScrollableFrame and
-                                    // it is assuming a horizontal scrollbar
-    bool mAssumingVScrollbar : 1;   // parent frame is an nsIScrollableFrame and
-                                    // it is assuming a vertical scrollbar
+
+    // used by tables to communicate special reflow (in process) to handle
+    // percent bsize frames inside cells which may not have computed bsizes
+    bool mSpecialBSizeReflow : 1;
+
+    // nothing in the frame's next-in-flow (or its descendants) is changing
+    bool mNextInFlowUntouched : 1;
+
+    // Is the current context at the top of a page?  When true, we force
+    // something that's too tall for a page/column to fit anyway to avoid
+    // infinite loops.
+    bool mIsTopOfPage : 1;
 
-    bool mIsIResize : 1;  // Is frame (a) not dirty and (b) a
-                          // different inline-size than before?
+    // parent frame is an nsIScrollableFrame and it is assuming a horizontal
+    // scrollbar
+    bool mAssumingHScrollbar : 1;
+
+    // parent frame is an nsIScrollableFrame and it is assuming a vertical
+    // scrollbar
+    bool mAssumingVScrollbar : 1;
+
+    // Is frame (a) not dirty and (b) a different inline-size than before?
+    bool mIsIResize : 1;
+
+    // Is frame (a) not dirty and (b) a different block-size than before or
+    // (potentially) in a context where percent block-sizes have a different
+    // basis?
+    bool mIsBResize : 1;
+
+    // tables are splittable, this should happen only inside a page and never
+    // insider a column frame
+    bool mTableIsSplittable : 1;
 
-    bool mIsBResize : 1;          // Is frame (a) not dirty and (b) a
-                                  // different block-size than before or
-                                  // (potentially) in a context where
-                                  // percent block-sizes have a different
-                                  // basis?
-    bool mTableIsSplittable : 1;  // tables are splittable, this should happen
-                                  // only inside a page and never insider a
-                                  // column frame
-    bool mHeightDependsOnAncestorCell : 1;  // Does frame height depend on
-                                            // an ancestor table-cell?
-    bool mIsColumnBalancing : 1;  // nsColumnSetFrame is balancing columns
-    bool mIsFlexContainerMeasuringBSize : 1;  // nsFlexContainerFrame is
-                                              // reflowing this child to
-                                              // measure its intrinsic BSize.
-    bool mDummyParentReflowInput : 1;         // a "fake" reflow state made
-                                              // in order to be the parent
-                                              // of a real one
-    bool mMustReflowPlaceholders : 1;  // Should this frame reflow its place-
-                                       // holder children? If the available
-                                       // height of this frame didn't change,
-                                       // but its in a paginated environment
-                                       // (e.g. columns), it should always
-                                       // reflow its placeholder children.
-    bool mShrinkWrap : 1;    // stores the COMPUTE_SIZE_SHRINK_WRAP ctor flag
-    bool mUseAutoBSize : 1;  // stores the COMPUTE_SIZE_USE_AUTO_BSIZE ctor flag
-    bool mStaticPosIsCBOrigin : 1;     // the STATIC_POS_IS_CB_ORIGIN ctor flag
-    bool mIClampMarginBoxMinSize : 1;  // the I_CLAMP_MARGIN_BOX_MIN_SIZE ctor
-                                       // flag
-    bool mBClampMarginBoxMinSize : 1;  // the B_CLAMP_MARGIN_BOX_MIN_SIZE ctor
-                                       // flag
-    bool mApplyAutoMinSize : 1;        // the I_APPLY_AUTO_MIN_SIZE ctor flag
+    // Does frame height depend on an ancestor table-cell?
+    bool mHeightDependsOnAncestorCell : 1;
+
+    // nsColumnSetFrame is balancing columns
+    bool mIsColumnBalancing : 1;
+
+    // nsFlexContainerFrame is reflowing this child to measure its intrinsic
+    // BSize.
+    bool mIsFlexContainerMeasuringBSize : 1;
+
+    // a "fake" reflow state made in order to be the parent of a real one
+    bool mDummyParentReflowInput : 1;
+
+    // Should this frame reflow its place-holder children? If the available
+    // height of this frame didn't change, but its in a paginated environment
+    // (e.g. columns), it should always reflow its placeholder children.
+    bool mMustReflowPlaceholders : 1;
+
+    // stores the COMPUTE_SIZE_SHRINK_WRAP ctor flag
+    bool mShrinkWrap : 1;
+
+    // stores the COMPUTE_SIZE_USE_AUTO_BSIZE ctor flag
+    bool mUseAutoBSize : 1;
+
+    // the STATIC_POS_IS_CB_ORIGIN ctor flag
+    bool mStaticPosIsCBOrigin : 1;
+
+    // the I_CLAMP_MARGIN_BOX_MIN_SIZE ctor flag
+    bool mIClampMarginBoxMinSize : 1;
+
+    // the B_CLAMP_MARGIN_BOX_MIN_SIZE ctor flag
+    bool mBClampMarginBoxMinSize : 1;
+
+    // the I_APPLY_AUTO_MIN_SIZE ctor flag
+    bool mApplyAutoMinSize : 1;
 
     // If set, the following two flags indicate that:
     // (1) this frame is absolutely-positioned (or fixed-positioned).
     // (2) this frame's static position depends on the CSS Box Alignment.
     // (3) we do need to compute the static position, because the frame's
     //     {Inline and/or Block} offsets actually depend on it.
     // When these bits are set, the offset values (IStart/IEnd, BStart/BEnd)
     // represent the "start" edge of the frame's CSS Box Alignment container
@@ -833,17 +852,17 @@ struct ReflowInput : public SizeComputat
     return aHeight - aConsumed;
   }
 
   /**
    * Apply the mComputed(Min/Max)BSize constraints to the content
    * size computed so far.
    *
    * @param aBSize The block-size that we've computed an to which we want to
-   * apply min/max constraints.
+   *        apply min/max constraints.
    * @param aConsumed The amount of the computed block-size that was consumed by
    *        our prev-in-flows.
    */
   nscoord ApplyMinMaxBSize(nscoord aBSize, nscoord aConsumed = 0) const {
     aBSize += aConsumed;
 
     if (NS_UNCONSTRAINEDSIZE != ComputedMaxBSize()) {
       aBSize = std::min(aBSize, ComputedMaxBSize());
--- a/layout/generic/WritingModes.h
+++ b/layout/generic/WritingModes.h
@@ -371,57 +371,59 @@ class WritingMode {
   }
 
   /**
    * Returns the logical side corresponding to the specified physical side,
    * given the current writing mode.
    * (This is the inverse of the PhysicalSide() method above.)
    */
   LogicalSide LogicalSideForPhysicalSide(mozilla::Side aSide) const {
+    // clang-format off
     // indexes are four-bit values:
     //   bit 0 = the eOrientationMask value
     //   bit 1 = the eInlineFlowMask value
     //   bit 2 = the eBlockFlowMask value
     //   bit 3 = the eLineOrientMask value
     static const LogicalSide kPhysicalToLogicalSides[][4] = {
-        // top                right
-        // bottom             left
-        {eLogicalSideBStart, eLogicalSideIEnd, eLogicalSideBEnd,
-         eLogicalSideIStart},  // horizontal-tb         ltr
-        {eLogicalSideIStart, eLogicalSideBStart, eLogicalSideIEnd,
-         eLogicalSideBEnd},  // vertical-rl           ltr
-        {eLogicalSideBStart, eLogicalSideIStart, eLogicalSideBEnd,
-         eLogicalSideIEnd},  // horizontal-tb         rtl
-        {eLogicalSideIEnd, eLogicalSideBStart, eLogicalSideIStart,
-         eLogicalSideBEnd},  // vertical-rl           rtl
-        {eLogicalSideBEnd, eLogicalSideIStart, eLogicalSideBStart,
-         eLogicalSideIEnd},  // (horizontal-bt) (inv) ltr
-        {eLogicalSideIStart, eLogicalSideBEnd, eLogicalSideIEnd,
-         eLogicalSideBStart},  // vertical-lr   sw-left rtl
-        {eLogicalSideBEnd, eLogicalSideIEnd, eLogicalSideBStart,
-         eLogicalSideIStart},  // (horizontal-bt) (inv) rtl
-        {eLogicalSideIEnd, eLogicalSideBEnd, eLogicalSideIStart,
-         eLogicalSideBStart},  // vertical-lr   sw-left ltr
-        {eLogicalSideBStart, eLogicalSideIEnd, eLogicalSideBEnd,
-         eLogicalSideIStart},  // horizontal-tb   (inv) rtl
-        {eLogicalSideIStart, eLogicalSideBStart, eLogicalSideIEnd,
-         eLogicalSideBEnd},  // vertical-rl   sw-left rtl
-        {eLogicalSideBStart, eLogicalSideIStart, eLogicalSideBEnd,
-         eLogicalSideIEnd},  // horizontal-tb   (inv) ltr
-        {eLogicalSideIEnd, eLogicalSideBStart, eLogicalSideIStart,
-         eLogicalSideBEnd},  // vertical-rl   sw-left ltr
-        {eLogicalSideBEnd, eLogicalSideIEnd, eLogicalSideBStart,
-         eLogicalSideIStart},  // (horizontal-bt)       ltr
-        {eLogicalSideIStart, eLogicalSideBEnd, eLogicalSideIEnd,
-         eLogicalSideBStart},  // vertical-lr           ltr
-        {eLogicalSideBEnd, eLogicalSideIStart, eLogicalSideBStart,
-         eLogicalSideIEnd},  // (horizontal-bt)       rtl
-        {eLogicalSideIEnd, eLogicalSideBEnd, eLogicalSideIStart,
-         eLogicalSideBStart},  // vertical-lr           rtl
+      // top                right
+      // bottom             left
+      { eLogicalSideBStart, eLogicalSideIEnd,
+        eLogicalSideBEnd,   eLogicalSideIStart },  // horizontal-tb         ltr
+      { eLogicalSideIStart, eLogicalSideBStart,
+        eLogicalSideIEnd,   eLogicalSideBEnd   },  // vertical-rl           ltr
+      { eLogicalSideBStart, eLogicalSideIStart,
+        eLogicalSideBEnd,   eLogicalSideIEnd   },  // horizontal-tb         rtl
+      { eLogicalSideIEnd,   eLogicalSideBStart,
+        eLogicalSideIStart, eLogicalSideBEnd   },  // vertical-rl           rtl
+      { eLogicalSideBEnd,   eLogicalSideIStart,
+        eLogicalSideBStart, eLogicalSideIEnd   },  // (horizontal-bt) (inv) ltr
+      { eLogicalSideIStart, eLogicalSideBEnd,
+        eLogicalSideIEnd,   eLogicalSideBStart },  // vertical-lr   sw-left rtl
+      { eLogicalSideBEnd,   eLogicalSideIEnd,
+        eLogicalSideBStart, eLogicalSideIStart },  // (horizontal-bt) (inv) rtl
+      { eLogicalSideIEnd,   eLogicalSideBEnd,
+        eLogicalSideIStart, eLogicalSideBStart },  // vertical-lr   sw-left ltr
+      { eLogicalSideBStart, eLogicalSideIEnd,
+        eLogicalSideBEnd,   eLogicalSideIStart },  // horizontal-tb   (inv) rtl
+      { eLogicalSideIStart, eLogicalSideBStart,
+        eLogicalSideIEnd,   eLogicalSideBEnd   },  // vertical-rl   sw-left rtl
+      { eLogicalSideBStart, eLogicalSideIStart,
+        eLogicalSideBEnd,   eLogicalSideIEnd   },  // horizontal-tb   (inv) ltr
+      { eLogicalSideIEnd,   eLogicalSideBStart,
+        eLogicalSideIStart, eLogicalSideBEnd   },  // vertical-rl   sw-left ltr
+      { eLogicalSideBEnd,   eLogicalSideIEnd,
+        eLogicalSideBStart, eLogicalSideIStart },  // (horizontal-bt)       ltr
+      { eLogicalSideIStart, eLogicalSideBEnd,
+        eLogicalSideIEnd,   eLogicalSideBStart },  // vertical-lr           ltr
+      { eLogicalSideBEnd,   eLogicalSideIStart,
+        eLogicalSideBStart, eLogicalSideIEnd   },  // (horizontal-bt)       rtl
+      { eLogicalSideIEnd,   eLogicalSideBEnd,
+        eLogicalSideIStart, eLogicalSideBStart },  // vertical-lr           rtl
     };
+    // clang-format on
 
     static_assert(eOrientationMask == 0x01 && eInlineFlowMask == 0x02 &&
                       eBlockFlowMask == 0x04 && eLineOrientMask == 0x08,
                   "unexpected mask values");
     int index = mWritingMode & 0x0F;
     return kPhysicalToLogicalSides[index][aSide];
   }
 
@@ -609,22 +611,23 @@ class WritingMode {
    */
   explicit WritingMode(uint8_t aValue) : mWritingMode(aValue) {}
 
   uint8_t mWritingMode;
 
   enum Masks {
     // Masks for our bits; true chosen as opposite of commonest case
     eOrientationMask = 0x01,  // true means vertical text
-    eInlineFlowMask =
-        0x02,  // true means absolute RTL/BTT (against physical coords)
-    eBlockFlowMask =
-        0x04,  // true means vertical-LR (or horizontal-BT if added)
-    eLineOrientMask = 0x08,  // true means over != block-start
-    eBidiMask = 0x10,        // true means line-relative RTL (bidi RTL)
+    eInlineFlowMask = 0x02,   // true means absolute RTL/BTT (against physical
+                              // coords)
+    eBlockFlowMask = 0x04,    // true means vertical-LR (or horizontal-BT if
+                              // added)
+    eLineOrientMask = 0x08,   // true means over != block-start
+    eBidiMask = 0x10,         // true means line-relative RTL (bidi RTL)
+
     // Note: We have one excess bit of info; WritingMode can pack into 4 bits.
     // But since we have space, we're caching interesting things for fast
     // access.
 
     eSidewaysMask = 0x20,  // true means text is being rendered vertically
                            // using rotated glyphs (i.e. writing-mode is
                            // sideways-*, or writing-mode is vertical-* AND
                            // text-orientation is sideways),
--- a/layout/generic/nsBlockFrame.h
+++ b/layout/generic/nsBlockFrame.h
@@ -524,20 +524,22 @@ class nsBlockFrame : public nsContainerF
 
   void ReparentFloats(nsIFrame* aFirstFrame, nsBlockFrame* aOldParent,
                       bool aReparentSiblings, ReparentingDirection aDirection);
 
   virtual bool ComputeCustomOverflow(nsOverflowAreas& aOverflowAreas) override;
 
   virtual void UnionChildOverflow(nsOverflowAreas& aOverflowAreas) override;
 
-  /** Load all of aFrame's floats into the float manager iff aFrame is not a
-   *  block formatting context. Handles all necessary float manager
-   * translations; assumes float manager is in aFrame's parent's coord system.
-   *  Safe to call on non-blocks (does nothing).
+  /**
+   * Load all of aFrame's floats into the float manager iff aFrame is not a
+   * block formatting context. Handles all necessary float manager translations;
+   * assumes float manager is in aFrame's parent's coord system.
+   *
+   * Safe to call on non-blocks (does nothing).
    */
   static void RecoverFloatsFor(nsIFrame* aFrame, nsFloatManager& aFloatManager,
                                mozilla::WritingMode aWM,
                                const nsSize& aContainerSize);
 
   /**
    * Determine if we have any pushed floats from a previous continuation.
    *
@@ -668,21 +670,24 @@ class nsBlockFrame : public nsContainerF
 
   /** Mark a given line dirty due to reflow being interrupted on or before it */
   void MarkLineDirtyForInterrupt(nsLineBox* aLine);
 
   //----------------------------------------
   // Methods for line reflow
   /**
    * Reflow a line.
-   * @param aState           the current reflow state
-   * @param aLine            the line to reflow.  can contain a single block
-   * frame or contain 1 or more inline frames.
-   * @param aKeepReflowGoing [OUT] indicates whether the caller should continue
-   * to reflow more lines
+   *
+   * @param aState
+   *   the current reflow state
+   * @param aLine
+   *   the line to reflow.  can contain a single block frame or contain 1 or
+   *   more inline frames.
+   * @param aKeepReflowGoing [OUT]
+   *   indicates whether the caller should continue to reflow more lines
    */
   void ReflowLine(BlockReflowInput& aState, LineIterator aLine,
                   bool* aKeepReflowGoing);
 
   // Return false if it needs another reflow because of reduced space
   // between floats that are next to it (but not next to its top), and
   // return true otherwise.
   bool PlaceLine(BlockReflowInput& aState, nsLineLayout& aLineLayout,
--- a/layout/generic/nsFrameSelection.h
+++ b/layout/generic/nsFrameSelection.h
@@ -76,91 +76,95 @@ struct MOZ_STACK_CLASS nsPeekOffsetStruc
 
   // Note: Most arguments (input and output) are only used with certain values
   // of mAmount. These values are indicated for each argument below.
   // Arguments with no such indication are used with all values of mAmount.
 
   /*** Input arguments ***/
   // Note: The value of some of the input arguments may be changed upon exit.
 
-  // mAmount: The type of movement requested (by character, word, line, etc.)
+  // The type of movement requested (by character, word, line, etc.)
   nsSelectionAmount mAmount;
 
-  // mDirection: eDirPrevious or eDirNext.
-  //             * Note for visual bidi movement:
-  //             eDirPrevious means 'left-then-up' if the containing block is
-  //             LTR, 'right-then-up' if it is RTL. eDirNext means
-  //             'right-then-down' if the containing block is LTR,
-  //             'left-then-down' if it is RTL.
-  //             Between paragraphs, eDirPrevious means "go to the visual end of
-  //             the previous paragraph", and eDirNext means "go to the visual
-  //             beginning of the next paragraph". Used with: eSelectCharacter,
-  //             eSelectWord, eSelectLine, eSelectParagraph.
+  // eDirPrevious or eDirNext.
+  //
+  // Note for visual bidi movement:
+  //   * eDirPrevious means 'left-then-up' if the containing block is LTR,
+  //     'right-then-up' if it is RTL.
+  //   * eDirNext means 'right-then-down' if the containing block is LTR,
+  //     'left-then-down' if it is RTL.
+  //   * Between paragraphs, eDirPrevious means "go to the visual end of
+  //     the previous paragraph", and eDirNext means "go to the visual
+  //     beginning of the next paragraph".
+  //
+  // Used with: eSelectCharacter, eSelectWord, eSelectLine, eSelectParagraph.
   nsDirection mDirection;
 
-  // mStartOffset: Offset into the content of the current frame where the peek
-  // starts.
-  //               Used with: eSelectCharacter, eSelectWord
+  // Offset into the content of the current frame where the peek starts.
+  //
+  // Used with: eSelectCharacter, eSelectWord
   int32_t mStartOffset;
 
-  // mDesiredPos: The desired inline coordinate for the caret
-  //              (one of .x or .y will be used, depending on line's writing
-  //              mode) Used with: eSelectLine.
+  // The desired inline coordinate for the caret (one of .x or .y will be used,
+  // depending on line's writing mode)
+  //
+  // Used with: eSelectLine.
   nsPoint mDesiredPos;
 
-  // mWordMovementType: An enum that determines whether to prefer the start or
-  // end of a word
-  //                    or to use the default beahvior, which is a combination
-  //                    of direction and the platform-based pref
-  //                    "layout.word_select.eat_space_to_next_word"
+  // An enum that determines whether to prefer the start or end of a word or to
+  // use the default beahvior, which is a combination of direction and the
+  // platform-based pref "layout.word_select.eat_space_to_next_word"
   mozilla::EWordMovementType mWordMovementType;
 
-  // mJumpLines: Whether to allow jumping across line boundaries.
-  //             Used with: eSelectCharacter, eSelectWord.
+  // Whether to allow jumping across line boundaries.
+  //
+  // Used with: eSelectCharacter, eSelectWord.
   bool mJumpLines;
 
-  // mScrollViewStop: Whether to stop when reaching a scroll view boundary.
-  //                  Used with: eSelectCharacter, eSelectWord, eSelectLine.
+  // Whether to stop when reaching a scroll view boundary.
+  //
+  // Used with: eSelectCharacter, eSelectWord, eSelectLine.
   bool mScrollViewStop;
 
-  // mIsKeyboardSelect: Whether the peeking is done in response to a keyboard
-  // action.
-  //                    Used with: eSelectWord.
+  // Whether the peeking is done in response to a keyboard action.
+  //
+  // Used with: eSelectWord.
   bool mIsKeyboardSelect;
 
-  // mVisual: Whether bidi caret behavior is visual (true) or logical (false).
-  //          Used with: eSelectCharacter, eSelectWord, eSelectBeginLine,
-  //          eSelectEndLine.
+  // Whether bidi caret behavior is visual (true) or logical (false).
+  //
+  // Used with: eSelectCharacter, eSelectWord, eSelectBeginLine, eSelectEndLine.
   bool mVisual;
 
-  // mExtend: Whether the selection is being extended or moved.
+  // Whether the selection is being extended or moved.
   bool mExtend;
 
-  // mForceEditableRegion: If true, the offset has to end up in an editable
-  // node, otherwise we'll keep searching.
+  // If true, the offset has to end up in an editable node, otherwise we'll keep
+  // searching.
   const bool mForceEditableRegion;
 
   /*** Output arguments ***/
 
-  // mResultContent: Content reached as a result of the peek.
+  // Content reached as a result of the peek.
   nsCOMPtr<nsIContent> mResultContent;
 
-  // mResultFrame: Frame reached as a result of the peek.
-  //               Used with: eSelectCharacter, eSelectWord.
+  // Frame reached as a result of the peek.
+  //
+  // Used with: eSelectCharacter, eSelectWord.
   nsIFrame* mResultFrame;
 
-  // mContentOffset: Offset into content reached as a result of the peek.
+  // Offset into content reached as a result of the peek.
   int32_t mContentOffset;
 
-  // mAttachForward: When the result position is between two frames,
-  //                 indicates which of the two frames the caret should be
-  //                 painted in. false means "the end of the frame logically
-  //                 before the caret", true means "the beginning of the frame
-  //                 logically after the caret". Used with: eSelectLine,
-  //                 eSelectBeginLine, eSelectEndLine.
+  // When the result position is between two frames, indicates which of the two
+  // frames the caret should be painted in. false means "the end of the frame
+  // logically before the caret", true means "the beginning of the frame
+  // logically after the caret".
+  //
+  // Used with: eSelectLine, eSelectBeginLine, eSelectEndLine.
   mozilla::CaretAssociationHint mAttach;
 };
 
 struct nsPrevNextBidiLevels {
   void SetData(nsIFrame* aFrameBefore, nsIFrame* aFrameAfter,
                nsBidiLevel aLevelBefore, nsBidiLevel aLevelAfter) {
     mFrameBefore = aFrameBefore;
     mFrameAfter = aFrameAfter;
@@ -204,71 +208,95 @@ class nsFrameSelection final {
  public:
   typedef mozilla::CaretAssociationHint CaretAssociateHint;
 
   /*interfaces for addref and release and queryinterface*/
 
   NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(nsFrameSelection)
   NS_DECL_CYCLE_COLLECTION_NATIVE_CLASS(nsFrameSelection)
 
-  /** Init will initialize the frame selector with the necessary pres shell to
-   *  be used by most of the methods
-   *  @param aShell is the parameter to be used for most of the other calls for
+  /**
+   * Init will initialize the frame selector with the necessary pres shell to
+   * be used by most of the methods
+   *
+   * @param aShell is the parameter to be used for most of the other calls for
    * callbacks etc
-   *  @param aLimiter limits the selection to nodes with aLimiter parents
-   *  @param aAccessibleCaretEnabled true if we should enable the accessible
+   *
+   * @param aLimiter limits the selection to nodes with aLimiter parents
+   *
+   * @param aAccessibleCaretEnabled true if we should enable the accessible
    * caret.
    */
   void Init(nsIPresShell* aShell, nsIContent* aLimiter,
             bool aAccessibleCaretEnabled);
 
-  /** HandleClick will take the focus to the new frame at the new offset and
-   *  will either extend the selection from the old anchor, or replace the old
+  /**
+   * HandleClick will take the focus to the new frame at the new offset and
+   * will either extend the selection from the old anchor, or replace the old
    * anchor. the old anchor and focus position may also be used to deselect
    * things
-   *  @param aNewfocus is the content that wants the focus
-   *  @param aContentOffset is the content offset of the parent aNewFocus
-   *  @param aContentOffsetEnd is the content offset of the parent aNewFocus and
+   *
+   * @param aNewfocus is the content that wants the focus
+   *
+   * @param aContentOffset is the content offset of the parent aNewFocus
+   *
+   * @param aContentOffsetEnd is the content offset of the parent aNewFocus and
    * is specified different when you need to select to and include both start
    * and end points
-   *  @param aContinueSelection is the flag that tells the selection to keep the
+   *
+   * @param aContinueSelection is the flag that tells the selection to keep the
    * old anchor point or not.
-   *  @param aMultipleSelection will tell the frame selector to replace /or not
+   *
+   * @param aMultipleSelection will tell the frame selector to replace /or not
    * the old selection. cannot coexist with aContinueSelection
-   *  @param aHint will tell the selection which direction geometrically to
+   *
+   * @param aHint will tell the selection which direction geometrically to
    * actually show the caret on. 1 = end of this line 0 = beginning of this line
    */
   MOZ_CAN_RUN_SCRIPT_BOUNDARY
   nsresult HandleClick(nsIContent* aNewFocus, uint32_t aContentOffset,
                        uint32_t aContentEndOffset, bool aContinueSelection,
                        bool aMultipleSelection, CaretAssociateHint aHint);
 
-  /** HandleDrag extends the selection to contain the frame closest to aPoint.
-   *  @param aPresContext is the context to use when figuring out what frame
+  /**
+   * HandleDrag extends the selection to contain the frame closest to aPoint.
+   *
+   * @param aPresContext is the context to use when figuring out what frame
    * contains the point.
-   *  @param aFrame is the parent of all frames to use when searching for the
+   *
+   * @param aFrame is the parent of all frames to use when searching for the
    * closest frame to the point.
-   *  @param aPoint is relative to aFrame
+   *
+   * @param aPoint is relative to aFrame
    */
   /*unsafe*/
   void HandleDrag(nsIFrame* aFrame, const nsPoint& aPoint);
 
-  /** HandleTableSelection will set selection to a table, cell, etc
-   *   depending on information contained in aFlags
-   *  @param aParentContent is the paretent of either a table or cell that user
+  /**
+   * HandleTableSelection will set selection to a table, cell, etc
+   * depending on information contained in aFlags
+   *
+   * @param aParentContent is the paretent of either a table or cell that user
    * clicked or dragged the mouse in
-   *  @param aContentOffset is the offset of the table or cell
-   *  @param aTarget indicates what to select
-   *    TableSelection::Cell     We should select a cell (content points to the
-   * cell) TableSelection::Row      We should select a row (content points to
-   * any cell in row) TableSelection::Column   We should select a row (content
-   * points to any cell in column) TableSelection::Table    We should select a
-   * table (content points to the table) TableSelection::AllCells We should
-   * select all cells (content points to any cell in table)
-   *  @param aMouseEvent         passed in so we can get where event occurred
+   *
+   * @param aContentOffset is the offset of the table or cell
+   *
+   * @param aTarget indicates what to select
+   *   * TableSelection::Cell
+   *       We should select a cell (content points to the cell)
+   *   * TableSelection::Row
+   *       We should select a row (content points to any cell in row)
+   *   * TableSelection::Column
+   *       We should select a row (content points to any cell in column)
+   *   * TableSelection::Table
+   *       We should select a table (content points to the table)
+   *   * TableSelection::AllCells
+   *       We should select all cells (content points to any cell in table)
+   *
+   * @param aMouseEvent passed in so we can get where event occurred
    * and what keys are pressed
    */
   /*unsafe*/
   nsresult HandleTableSelection(nsINode* aParentContent, int32_t aContentOffset,
                                 mozilla::TableSelection aTarget,
                                 mozilla::WidgetMouseEvent* aMouseEvent);
 
   /**
@@ -314,104 +342,118 @@ class nsFrameSelection final {
    * @param  aEndRowIndex       [in] row index where the cells range ends
    * @param  aEndColumnIndex    [in] column index where the cells range ends
    */
   nsresult RestrictCellsToSelection(nsIContent* aTable, int32_t aStartRowIndex,
                                     int32_t aStartColumnIndex,
                                     int32_t aEndRowIndex,
                                     int32_t aEndColumnIndex);
 
-  /** StartAutoScrollTimer is responsible for scrolling frames so that
-   *  aPoint is always visible, and for selecting any frame that contains
-   *  aPoint. The timer will also reset itself to fire again if we have
-   *  not scrolled to the end of the document.
-   *  @param aFrame is the outermost frame to use when searching for
-   *  the closest frame for the point, i.e. the frame that is capturing
-   *  the mouse
-   *  @param aPoint is relative to aFrame.
-   *  @param aDelay is the timer's interval.
+  /**
+   * StartAutoScrollTimer is responsible for scrolling frames so that
+   * aPoint is always visible, and for selecting any frame that contains
+   * aPoint. The timer will also reset itself to fire again if we have
+   * not scrolled to the end of the document.
+   *
+   * @param aFrame is the outermost frame to use when searching for
+   * the closest frame for the point, i.e. the frame that is capturing
+   * the mouse
+   *
+   * @param aPoint is relative to aFrame.
+   *
+   * @param aDelay is the timer's interval.
    */
   /*unsafe*/
   nsresult StartAutoScrollTimer(nsIFrame* aFrame, const nsPoint& aPoint,
                                 uint32_t aDelay);
 
-  /** StopAutoScrollTimer stops any active auto scroll timer.
+  /**
+   * Stops any active auto scroll timer.
    */
   void StopAutoScrollTimer();
 
-  /** Lookup Selection
-   *  returns in frame coordinates the selection beginning and ending with the
+  /**
+   * Returns in frame coordinates the selection beginning and ending with the
    * type of selection given
+   *
    * @param aContent is the content asking
    * @param aContentOffset is the starting content boundary
    * @param aContentLength is the length of the content piece asking
    * @param aSlowCheck will check using slow method with no shortcuts
    */
   mozilla::UniquePtr<SelectionDetails> LookUpSelection(nsIContent* aContent,
                                                        int32_t aContentOffset,
                                                        int32_t aContentLength,
                                                        bool aSlowCheck) const;
 
-  /** SetDragState(bool);
-   *  sets the drag state to aState for resons of drag state.
+  /**
+   * Sets the drag state to aState for resons of drag state.
+   *
    * @param aState is the new state of drag
    */
   MOZ_CAN_RUN_SCRIPT_BOUNDARY
   void SetDragState(bool aState);
 
-  /** GetDragState(bool *);
-   *  gets the drag state to aState for resons of drag state.
+  /**
+   * Gets the drag state to aState for resons of drag state.
+   *
    * @param aState will hold the state of drag
    */
   bool GetDragState() const { return mDragState; }
 
   /**
-    if we are in table cell selection mode. aka ctrl click in table cell
+   * If we are in table cell selection mode. aka ctrl click in table cell
    */
   bool GetTableCellSelection() const {
     return mSelectingTableCellMode != mozilla::TableSelection::None;
   }
   void ClearTableCellSelection() {
     mSelectingTableCellMode = mozilla::TableSelection::None;
   }
 
-  /** GetSelection
-   * no query interface for selection. must use this method now.
+  /**
+   * No query interface for selection. must use this method now.
+   *
    * @param aSelectionType The selection type what you want.
    */
   mozilla::dom::Selection* GetSelection(
       mozilla::SelectionType aSelectionType) const;
 
   /**
    * ScrollSelectionIntoView scrolls a region of the selection,
    * so that it is visible in the scrolled view.
    *
    * @param aSelectionType the selection to scroll into view.
+   *
    * @param aRegion the region inside the selection to scroll into view.
+   *
    * @param aFlags the scroll flags.  Valid bits include:
-   * SCROLL_SYNCHRONOUS: when set, scrolls the selection into view
-   * before returning. If not set, posts a request which is processed
-   * at some point after the method returns.
-   * SCROLL_FIRST_ANCESTOR_ONLY: if set, only the first ancestor will be
-   * scrolled into view.
-   *
+   *   * SCROLL_SYNCHRONOUS: when set, scrolls the selection into view
+   *     before returning. If not set, posts a request which is processed
+   *     at some point after the method returns.
+   *   * SCROLL_FIRST_ANCESTOR_ONLY: if set, only the first ancestor will be
+   *     scrolled into view.
    */
   /*unsafe*/
   nsresult ScrollSelectionIntoView(mozilla::SelectionType aSelectionType,
                                    SelectionRegion aRegion,
                                    int16_t aFlags) const;
 
-  /** RepaintSelection repaints the selected frames that are inside the
+  /**
+   * RepaintSelection repaints the selected frames that are inside the
    * selection specified by aSelectionType.
+   *
    * @param aSelectionType The selection type what you want to repaint.
    */
   nsresult RepaintSelection(mozilla::SelectionType aSelectionType);
 
-  /** GetFrameForNodeOffset given a node and its child offset, return the
-   * nsIFrame and the offset into that frame.
+  /**
+   * Given a node and its child offset, return the nsIFrame and the offset into
+   * that frame.
+   *
    * @param aNode input parameter for the node to look at
    * @param aOffset offset into above node.
    * @param aReturnOffset will contain offset into frame.
    */
   nsIFrame* GetFrameForNodeOffset(nsIContent* aNode, int32_t aOffset,
                                   CaretAssociateHint aHint,
                                   int32_t* aReturnOffset) const;
 
@@ -454,182 +496,204 @@ class nsFrameSelection final {
    */
   nsBidiLevel GetCaretBidiLevel() const;
 
   /**
    * UndefineCaretBidiLevel sets the caret bidi level to "undefined".
    */
   void UndefineCaretBidiLevel();
 
-  /** PhysicalMove will generally be called from the nsiselectioncontroller
+  /**
+   * PhysicalMove will generally be called from the nsiselectioncontroller
    * implementations. the effect being the selection will move one unit
    * 'aAmount' in the given aDirection.
    * @param aDirection  the direction to move the selection
    * @param aAmount     amount of movement (char/line; word/page; eol/doc)
    * @param aExtend     continue selection
    */
   /*unsafe*/
   nsresult PhysicalMove(int16_t aDirection, int16_t aAmount, bool aExtend);
 
-  /** CharacterMove will generally be called from the nsiselectioncontroller
+  /**
+   * CharacterMove will generally be called from the nsiselectioncontroller
    * implementations. the effect being the selection will move one character
    * left or right.
    * @param aForward move forward in document.
    * @param aExtend continue selection
    */
   /*unsafe*/
   nsresult CharacterMove(bool aForward, bool aExtend);
 
-  /** CharacterExtendForDelete extends the selection forward (logically) to
+  /**
+   * CharacterExtendForDelete extends the selection forward (logically) to
    * the next character cell, so that the selected cell can be deleted.
    */
   /*unsafe*/
   nsresult CharacterExtendForDelete();
 
-  /** CharacterExtendForBackspace extends the selection backward (logically) to
+  /**
+   * CharacterExtendForBackspace extends the selection backward (logically) to
    * the previous character cell, so that the selected cell can be deleted.
    */
   /*unsafe*/
   nsresult CharacterExtendForBackspace();
 
-  /** WordMove will generally be called from the nsiselectioncontroller
+  /**
+   * WordMove will generally be called from the nsiselectioncontroller
    * implementations. the effect being the selection will move one word left or
    * right.
    * @param aForward move forward in document.
    * @param aExtend continue selection
    */
   /*unsafe*/
   nsresult WordMove(bool aForward, bool aExtend);
 
-  /** WordExtendForDelete extends the selection backward or forward (logically)
+  /**
+   * WordExtendForDelete extends the selection backward or forward (logically)
    * to the next word boundary, so that the selected word can be deleted.
    * @param aForward select forward in document.
    */
   /*unsafe*/
   nsresult WordExtendForDelete(bool aForward);
 
-  /** LineMove will generally be called from the nsiselectioncontroller
+  /**
+   * LineMove will generally be called from the nsiselectioncontroller
    * implementations. the effect being the selection will move one line up or
    * down.
    * @param aForward move forward in document.
    * @param aExtend continue selection
    */
   /*unsafe*/
   nsresult LineMove(bool aForward, bool aExtend);
 
-  /** IntraLineMove will generally be called from the nsiselectioncontroller
+  /**
+   * IntraLineMove will generally be called from the nsiselectioncontroller
    * implementations. the effect being the selection will move to beginning or
    * end of line
    * @param aForward move forward in document.
    * @param aExtend continue selection
    */
   /*unsafe*/
   nsresult IntraLineMove(bool aForward, bool aExtend);
 
-  /** Select All will generally be called from the nsiselectioncontroller
+  /**
+   * Select All will generally be called from the nsiselectioncontroller
    * implementations. it will select the whole doc
    */
   MOZ_CAN_RUN_SCRIPT_BOUNDARY nsresult SelectAll();
 
   /** Sets/Gets The display selection enum.
    */
   void SetDisplaySelection(int16_t aState) { mDisplaySelection = aState; }
   int16_t GetDisplaySelection() const { return mDisplaySelection; }
 
-  /** This method can be used to store the data received during a MouseDown
-   *  event so that we can place the caret during the MouseUp event.
-   * @aMouseEvent the event received by the selection MouseDown
-   *  handling method. A nullptr value can be use to tell this method
-   *  that any data is storing is no longer valid.
+  /**
+   * This method can be used to store the data received during a MouseDown
+   * event so that we can place the caret during the MouseUp event.
+   *
+   * @param aMouseEvent the event received by the selection MouseDown
+   * handling method. A nullptr value can be use to tell this method
+   * that any data is storing is no longer valid.
    */
   void SetDelayedCaretData(mozilla::WidgetMouseEvent* aMouseEvent);
 
-  /** Get the delayed MouseDown event data necessary to place the
-   *  caret during MouseUp processing.
+  /**
+   * Get the delayed MouseDown event data necessary to place the
+   * caret during MouseUp processing.
+   *
    * @return a pointer to the event received
-   *  by the selection during MouseDown processing. It can be nullptr
-   *  if the data is no longer valid.
+   * by the selection during MouseDown processing. It can be nullptr
+   * if the data is no longer valid.
    */
   bool HasDelayedCaretData() { return mDelayedMouseEventValid; }
   bool IsShiftDownInDelayedCaretData() {
     NS_ASSERTION(mDelayedMouseEventValid, "No valid delayed caret data");
     return mDelayedMouseEventIsShift;
   }
   uint32_t GetClickCountInDelayedCaretData() {
     NS_ASSERTION(mDelayedMouseEventValid, "No valid delayed caret data");
     return mDelayedMouseEventClickCount;
   }
 
   bool MouseDownRecorded() {
     return !GetDragState() && HasDelayedCaretData() &&
            GetClickCountInDelayedCaretData() < 2;
   }
 
-  /** Get the content node that limits the selection
-   *  When searching up a nodes for parents, as in a text edit field
-   *    in an browser page, we must stop at this node else we reach into the
-   *    parent page, which is very bad!
+  /**
+   * Get the content node that limits the selection
+   *
+   * When searching up a nodes for parents, as in a text edit field
+   * in an browser page, we must stop at this node else we reach into the
+   * parent page, which is very bad!
    */
   nsIContent* GetLimiter() const { return mLimiter; }
 
   nsIContent* GetAncestorLimiter() const { return mAncestorLimiter; }
   MOZ_CAN_RUN_SCRIPT_BOUNDARY void SetAncestorLimiter(nsIContent* aLimiter);
 
-  /** This will tell the frame selection that a double click has been pressed
-   *  so it can track abort future drags if inside the same selection
-   *  @aDoubleDown has the double click down happened
+  /**
+   * This will tell the frame selection that a double click has been pressed
+   * so it can track abort future drags if inside the same selection
+   * @param aDoubleDown has the double click down happened
    */
   void SetMouseDoubleDown(bool aDoubleDown) {
     mMouseDoubleDownState = aDoubleDown;
   }
 
-  /** This will return whether the double down flag was set.
-   *  @return whether the double down flag was set
+  /**
+   * This will return whether the double down flag was set.
+   * @return whether the double down flag was set
    */
   bool GetMouseDoubleDown() const { return mMouseDoubleDownState; }
 
   /**
    * GetPrevNextBidiLevels will return the frames and associated Bidi levels of
    * the characters logically before and after a (collapsed) selection.
-   *  @param aNode is the node containing the selection
-   *  @param aContentOffset is the offset of the selection in the node
-   *  @param aJumpLines If true, look across line boundaries.
-   *                    If false, behave as if there were base-level frames at
-   * line edges.
    *
-   *  @return A struct holding the before/after frame and the before/after
+   * @param aNode is the node containing the selection
+   * @param aContentOffset is the offset of the selection in the node
+   * @param aJumpLines
+   *   If true, look across line boundaries.
+   *   If false, behave as if there were base-level frames at line edges.
+   *
+   * @return A struct holding the before/after frame and the before/after
    * level.
    *
-   *  At the beginning and end of each line there is assumed to be a frame with
-   *   Bidi level equal to the paragraph embedding level.
-   *  In these cases the before frame and after frame respectively will be
-   *   nullptr.
+   * At the beginning and end of each line there is assumed to be a frame with
+   * Bidi level equal to the paragraph embedding level.
+   *
+   * In these cases the before frame and after frame respectively will be
+   * nullptr.
    */
   nsPrevNextBidiLevels GetPrevNextBidiLevels(nsIContent* aNode,
                                              uint32_t aContentOffset,
                                              bool aJumpLines) const;
 
-  /** GetFrameFromLevel will scan in a given direction
-   *   until it finds a frame with a Bidi level less than or equal to a given
+  /**
+   * GetFrameFromLevel will scan in a given direction
+   * until it finds a frame with a Bidi level less than or equal to a given
    * level. It will return the last frame before this.
-   *  @param aPresContext is the context to use
-   *  @param aFrameIn is the frame to start from
-   *  @param aDirection is the direction to scan
-   *  @param aBidiLevel is the level to search for
-   *  @param aFrameOut will hold the frame returned
+   *
+   * @param aPresContext is the context to use
+   * @param aFrameIn is the frame to start from
+   * @param aDirection is the direction to scan
+   * @param aBidiLevel is the level to search for
+   * @param aFrameOut will hold the frame returned
    */
   nsresult GetFrameFromLevel(nsIFrame* aFrameIn, nsDirection aDirection,
                              nsBidiLevel aBidiLevel,
                              nsIFrame** aFrameOut) const;
 
   /**
    * MaintainSelection will track the current selection as being "sticky".
    * Dragging or extending selection will never allow for a subset
    * (or the whole) of the maintained selection to become unselected.
    * Primary use: double click selecting then dragging on second click
+   *
    * @param aAmount the initial amount of text selected (word, line or
    * paragraph). For "line", use eSelectBeginLine.
    */
   nsresult MaintainSelection(nsSelectionAmount aAmount = eSelectNoAmount);
 
   nsresult ConstrainFrameAndPointToAnchorSubtree(nsIFrame* aFrame,
                                                  const nsPoint& aPoint,
                                                  nsIFrame** aRetFrame,
--- a/layout/generic/nsFrameSetFrame.h
+++ b/layout/generic/nsFrameSetFrame.h
@@ -40,18 +40,18 @@ struct nsBorderColor {
 
 enum nsFrameborder {
   eFrameborder_Yes = 0,
   eFrameborder_No,
   eFrameborder_Notset
 };
 
 struct nsFramesetDrag {
-  nsHTMLFramesetFrame*
-      mSource;      // frameset whose border was dragged to cause the resize
+  nsHTMLFramesetFrame* mSource;  // frameset whose border was dragged to cause
+                                 // the resize
   int32_t mIndex;   // index of left col or top row of effected area
   int32_t mChange;  // pos for left to right or top to bottom, neg otherwise
   bool mVertical;   // vertical if true, otherwise horizontal
 
   nsFramesetDrag();
   void Reset(bool aVertical, int32_t aIndex, int32_t aChange,
              nsHTMLFramesetFrame* aSource);
   void UnSet();
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -333,26 +333,25 @@ std::ostream& operator<<(std::ostream& a
  * When there is no scrollable overflow rect, the visual overflow rect
  * may be stored as four 1-byte deltas each strictly LESS THAN 0xff, for
  * the four edges of the rectangle, or the four bytes may be read as a
  * single 32-bit "overflow-rect type" value including at least one 0xff
  * byte as an indicator that the value does NOT represent four deltas.
  * If all four deltas are zero, this means that no overflow rect has
  * actually been set (this is the initial state of newly-created frames).
  */
-#define NS_FRAME_OVERFLOW_DELTA_MAX 0xfe  // max delta we can store
-
-#define NS_FRAME_OVERFLOW_NONE \
-  0x00000000  // there are no overflow rects;
-              // code relies on this being
-              // the all-zero value
-
-#define NS_FRAME_OVERFLOW_LARGE \
-  0x000000ff  // overflow is stored as a
-              // separate rect property
+
+// max delta we can store
+#define NS_FRAME_OVERFLOW_DELTA_MAX 0xfe
+
+// there are no overflow rects; code relies on this being the all-zero value
+#define NS_FRAME_OVERFLOW_NONE 0x00000000
+
+// overflow is stored as a separate rect property
+#define NS_FRAME_OVERFLOW_LARGE 0x000000ff
 
 /**
  * nsBidiLevel is the type of the level values in our Unicode Bidi
  * implementation.
  * It holds an embedding level and indicates the visual direction
  * by its bit 0 (even/odd value).<p>
  *
  * <li><code>aParaLevel</code> can be set to the
@@ -376,33 +375,34 @@ std::ostream& operator<<(std::ostream& a
  *
  * @see NSBIDI_DEFAULT_LTR
  * @see NSBIDI_DEFAULT_RTL
  * @see NSBIDI_LEVEL_OVERRIDE
  * @see NSBIDI_MAX_EXPLICIT_LEVEL
  */
 typedef uint8_t nsBidiLevel;
 
-/** Paragraph level setting.
- *  If there is no strong character, then set the paragraph level to 0
+/**
+ * Paragraph level setting.
+ * If there is no strong character, then set the paragraph level to 0
  * (left-to-right).
  */
 #define NSBIDI_DEFAULT_LTR 0xfe
 
-/** Paragraph level setting.
- *  If there is no strong character, then set the paragraph level to 1
+/**
+ * Paragraph level setting.
+ * If there is no strong character, then set the paragraph level to 1
  * (right-to-left).
  */
 #define NSBIDI_DEFAULT_RTL 0xff
 
 /**
  * Maximum explicit embedding level.
  * (The maximum resolved level can be up to
  * <code>NSBIDI_MAX_EXPLICIT_LEVEL+1</code>).
- *
  */
 #define NSBIDI_MAX_EXPLICIT_LEVEL 125
 
 /** Bit flag for level input.
  *  Overrides directional properties.
  */
 #define NSBIDI_LEVEL_OVERRIDE 0x80
 
@@ -612,17 +612,18 @@ class nsIFrame : public nsQueryFrame {
    * removal and destruction.
    */
   void Destroy() {
     AutoPostDestroyData data(PresContext());
     DestroyFrom(this, data.mData);
     // Note that |this| is deleted at this point.
   }
 
-  /** Flags for PeekOffsetCharacter, PeekOffsetNoAmount, PeekOffsetWord return
+  /**
+   * Flags for PeekOffsetCharacter, PeekOffsetNoAmount, PeekOffsetWord return
    * values.
    */
   enum FrameSearchResult {
     // Peek found a appropriate offset within frame.
     FOUND = 0x00,
     // try next frame for offset.
     CONTINUE = 0x1,
     // offset not found because the frame was empty of text.
@@ -1142,23 +1143,23 @@ class nsIFrame : public nsQueryFrame {
   }
 
 #define NS_DECLARE_FRAME_PROPERTY_DELETABLE(prop, type) \
   NS_DECLARE_FRAME_PROPERTY_WITH_DTOR(prop, type, DeleteValue)
 
 #define NS_DECLARE_FRAME_PROPERTY_RELEASABLE(prop, type) \
   NS_DECLARE_FRAME_PROPERTY_WITH_DTOR(prop, type, ReleaseValue)
 
-#define NS_DECLARE_FRAME_PROPERTY_WITH_DTOR_NEVER_CALLED(prop, type)     \
-  static void AssertOnDestroyingProperty##prop(type*) {                  \
-    MOZ_ASSERT_UNREACHABLE("Frame property " #prop                       \
-                           " should never "                              \
-                           "be destroyed by the FrameProperties class"); \
-  }                                                                      \
-  NS_DECLARE_FRAME_PROPERTY_WITH_DTOR(prop, type,                        \
+#define NS_DECLARE_FRAME_PROPERTY_WITH_DTOR_NEVER_CALLED(prop, type) \
+  static void AssertOnDestroyingProperty##prop(type*) {              \
+    MOZ_ASSERT_UNREACHABLE(                                          \
+        "Frame property " #prop                                      \
+        " should never be destroyed by the FrameProperties class");  \
+  }                                                                  \
+  NS_DECLARE_FRAME_PROPERTY_WITH_DTOR(prop, type,                    \
                                       AssertOnDestroyingProperty##prop)
 
 #define NS_DECLARE_FRAME_PROPERTY_SMALL_VALUE(prop, type) \
   NS_DECLARE_FRAME_PROPERTY_WITHOUT_DTOR(prop, mozilla::SmallValueHolder<type>)
 
   NS_DECLARE_FRAME_PROPERTY_WITHOUT_DTOR(IBSplitSibling, nsContainerFrame)
   NS_DECLARE_FRAME_PROPERTY_WITHOUT_DTOR(IBSplitPrevSibling, nsContainerFrame)
 
@@ -1828,21 +1829,21 @@ class nsIFrame : public nsQueryFrame {
   /**
    * Returns the number of ancestors between this and the root of our frame tree
    */
   uint32_t GetDepthInFrameTree() const;
 
   /**
    * Event handling of GUI events.
    *
-   * @param   aEvent event structure describing the type of event and rge widget
-   *            where the event originated
-   *          The |point| member of this is in the coordinate system of the
-   *          view returned by GetOffsetFromView.
-   * @param   aEventStatus a return value indicating whether the event was
+   * @param aEvent event structure describing the type of event and rge widget
+   * where the event originated. The |point| member of this is in the coordinate
+   * system of the view returned by GetOffsetFromView.
+   *
+   * @param aEventStatus a return value indicating whether the event was
    * handled and whether default processing should be done
    *
    * XXX From a frame's perspective it's unclear what the effect of the event
    * status is. Does it cause the event to continue propagating through the
    * frame hierarchy or is it just returned to the widgets?
    *
    * @see     WidgetGUIEvent
    * @see     nsEventStatus
@@ -2319,18 +2320,18 @@ class nsIFrame : public nsQueryFrame {
     eBClampMarginBoxMinSize = 1 << 3,  // clamp in our block axis
     /**
      * The frame is stretching (per CSS Box Alignment) and doesn't have an
      * Automatic Minimum Size in the indicated axis.
      * (may be used for both flex/grid items, but currently only used for Grid)
      * https://drafts.csswg.org/css-grid/#min-size-auto
      * https://drafts.csswg.org/css-align-3/#valdef-justify-self-stretch
      */
-    eIApplyAutoMinSize =
-        1 << 4,  // only has an effect when eShrinkWrap is false
+    eIApplyAutoMinSize = 1 << 4,  // only has an effect when eShrinkWrap is
+                                  // false
   };
 
   /**
    * Compute the size that a frame will occupy.  Called while
    * constructing the ReflowInput to be used to Reflow the frame,
    * in order to fill its mComputedWidth and mComputedHeight member
    * variables.
    *
@@ -3179,90 +3180,104 @@ class nsIFrame : public nsQueryFrame {
    */
   bool IsSelected() const {
     return (GetContent() && GetContent()->IsSelectionDescendant())
                ? IsFrameSelected()
                : false;
   }
 
   /**
-   *  called to discover where this frame, or a parent frame has user-select
+   * Called to discover where this frame, or a parent frame has user-select
    * style applied, which affects that way that it is selected.
    *
-   *  @param aSelectStyle  out param. Returns the type of selection style found
-   *                        (using values defined in nsStyleConsts.h).
+   * @param aSelectStyle out param. Returns the type of selection style found
+   * (using values defined in nsStyleConsts.h).
    *
-   *  @return Whether the frame can be selected (i.e. is not affected by
-   *          user-select: none)
+   * @return Whether the frame can be selected (i.e. is not affected by
+   * user-select: none)
    */
   bool IsSelectable(mozilla::StyleUserSelect* aSelectStyle) const;
 
   /**
-   *  Called to retrieve the SelectionController associated with the frame.
-   *  @param aSelCon will contain the selection controller associated with
-   *  the frame.
+   * Called to retrieve the SelectionController associated with the frame.
+   *
+   * @param aSelCon will contain the selection controller associated with
+   * the frame.
    */
   virtual nsresult GetSelectionController(nsPresContext* aPresContext,
                                           nsISelectionController** aSelCon) = 0;
 
   /**
-   *  Call to get nsFrameSelection for this frame.
+   * Call to get nsFrameSelection for this frame.
    */
   already_AddRefed<nsFrameSelection> GetFrameSelection();
 
   /**
    * GetConstFrameSelection returns an object which methods are safe to use for
    * example in nsIFrame code.
    */
   const nsFrameSelection* GetConstFrameSelection() const;
 
   /**
-   *  called to find the previous/next character, word, or line  returns the
-   * actual nsIFrame and the frame offset.  THIS DOES NOT CHANGE SELECTION STATE
-   *  uses frame's begin selection state to start. if no selection on this frame
-   * will return NS_ERROR_FAILURE
-   *  @param aPOS is defined in nsFrameSelection
+   * called to find the previous/next character, word, or line. Returns the
+   * actual nsIFrame and the frame offset. THIS DOES NOT CHANGE SELECTION STATE.
+   * Uses frame's begin selection state to start. If no selection on this frame
+   * will return NS_ERROR_FAILURE.
+   *
+   * @param aPOS is defined in nsFrameSelection
    */
   virtual nsresult PeekOffset(nsPeekOffsetStruct* aPos);
 
   /**
-   *  called to find the previous/next non-anonymous selectable leaf frame.
-   *  @param aDirection [in] the direction to move in (eDirPrevious or eDirNext)
-   *  @param aVisual [in] whether bidi caret behavior is visual (true) or
+   * Called to find the previous/next non-anonymous selectable leaf frame.
+   *
+   * @param aDirection [in] the direction to move in (eDirPrevious or eDirNext)
+   *
+   * @param aVisual [in] whether bidi caret behavior is visual (true) or
    * logical (false)
-   *  @param aJumpLines [in] whether to allow jumping across line boundaries
-   *  @param aScrollViewStop [in] whether to stop when reaching a scroll frame
+   *
+   * @param aJumpLines [in] whether to allow jumping across line boundaries
+   * @param aScrollViewStop [in] whether to stop when reaching a scroll frame
    * boundary
-   *  @param aOutFrame [out] the previous/next selectable leaf frame
-   *  @param aOutOffset [out] 0 indicates that we arrived at the beginning of
+   *
+   * @param aOutFrame [out] the previous/next selectable leaf frame
+   *
+   * @param aOutOffset [out] 0 indicates that we arrived at the beginning of
    * the output frame; -1 indicates that we arrived at its end.
-   *  @param aOutJumpedLine [out] whether this frame and the returned frame are
+   *
+   * @param aOutJumpedLine [out] whether this frame and the returned frame are
    * on different lines
-   *  @param aOutMovedOverNonSelectableText [out] whether we jumped over a
+   *
+   * @param aOutMovedOverNonSelectableText [out] whether we jumped over a
    * non-selectable frame during the search
    */
   nsresult GetFrameFromDirection(nsDirection aDirection, bool aVisual,
                                  bool aJumpLines, bool aScrollViewStop,
                                  bool aForceEditableRegion,
                                  nsIFrame** aOutFrame, int32_t* aOutOffset,
                                  bool* aOutJumpedLine,
                                  bool* aOutMovedOverNonSelectableText);
 
   /**
-   *  called to see if the children of the frame are visible from indexstart to
-   * index end. this does not change any state. returns true only if the indexes
-   * are valid and any of the children are visible.  for textframes this index
-   * is the character index. if aStart = aEnd result will be false
-   *  @param aStart start index of first child from 0-N (number of children)
-   *  @param aEnd   end index of last child from 0-N
-   *  @param aRecurse should this frame talk to siblings to get to the contents
+   * Called to see if the children of the frame are visible from indexstart to
+   * index end. This does not change any state. Returns true only if the indexes
+   * are valid and any of the children are visible. For textframes this index
+   * is the character index. If aStart = aEnd result will be false.
+   *
+   * @param aStart start index of first child from 0-N (number of children)
+   *
+   * @param aEnd end index of last child from 0-N
+   *
+   * @param aRecurse should this frame talk to siblings to get to the contents
    * other children?
-   *  @param aFinished did this frame have the aEndIndex? or is there more work
+   *
+   * @param aFinished did this frame have the aEndIndex? or is there more work
    * to do
-   *  @param _retval  return value true or false. false = range is not rendered.
+   *
+   * @param _retval return value true or false. false = range is not rendered.
    */
   virtual nsresult CheckVisibility(nsPresContext* aContext, int32_t aStartIndex,
                                    int32_t aEndIndex, bool aRecurse,
                                    bool* aFinished, bool* _retval) = 0;
 
   /**
    * Called to tell a frame that one of its child frames is dirty (i.e.,
    * has the NS_FRAME_IS_DIRTY *or* NS_FRAME_HAS_DIRTY_CHILDREN bit
@@ -4278,40 +4293,48 @@ class nsIFrame : public nsQueryFrame {
   bool mAllDescendantsAreInvisible : 1;
 
  protected:
   // There is a 1-bit gap left here.
 
   // Helpers
   /**
    * Can we stop inside this frame when we're skipping non-rendered whitespace?
-   * @param  aForward [in] Are we moving forward (or backward) in content order.
-   * @param  aOffset [in/out] At what offset into the frame to start looking.
-   *         on output - what offset was reached (whether or not we found a
-   * place to stop).
-   * @return STOP: An appropriate offset was found within this frame,
-   *         and is given by aOffset.
-   *         CONTINUE: Not found within this frame, need to try the next frame.
-   *         see enum FrameSearchResult for more details.
+   *
+   * @param aForward [in] Are we moving forward (or backward) in content order.
+   *
+   * @param aOffset [in/out] At what offset into the frame to start looking.
+   * at offset was reached (whether or not we found a place to stop).
+   *
+   * @return
+   *   * STOP: An appropriate offset was found within this frame,
+   *     and is given by aOffset.
+   *   * CONTINUE: Not found within this frame, need to try the next frame.
+   *     See enum FrameSearchResult for more details.
    */
   virtual FrameSearchResult PeekOffsetNoAmount(bool aForward,
                                                int32_t* aOffset) = 0;
 
   /**
    * Search the frame for the next character
-   * @param  aForward [in] Are we moving forward (or backward) in content order.
-   * @param  aOffset [in/out] At what offset into the frame to start looking.
-   *         on output - what offset was reached (whether or not we found a
-   * place to stop).
-   * @param  aOptions [in] Options, see the comment in
-   *         PeekOffsetCharacterOptions for the detail.
-   * @return STOP: An appropriate offset was found within this frame,
-   *         and is given by aOffset.
-   *         CONTINUE: Not found within this frame, need to try the next frame.
-   *         see enum FrameSearchResult for more details.
+   *
+   * @param aForward [in] Are we moving forward (or backward) in content order.
+   *
+   * @param aOffset [in/out] At what offset into the frame to start looking.
+   * on output - what offset was reached (whether or not we found a place to
+   * stop).
+   *
+   * @param aOptions [in] Options, see the comment in PeekOffsetCharacterOptions
+   * for the detail.
+   *
+   * @return
+   *   * STOP: An appropriate offset was found within this frame, and is given
+   *     by aOffset.
+   *   * CONTINUE: Not found within this frame, need to try the next frame. See
+   *     enum FrameSearchResult for more details.
    */
   virtual FrameSearchResult PeekOffsetCharacter(
       bool aForward, int32_t* aOffset,
       PeekOffsetCharacterOptions aOptions = PeekOffsetCharacterOptions()) = 0;
   static_assert(sizeof(PeekOffsetCharacterOptions) <= sizeof(intptr_t),
                 "aOptions should be changed to const reference");
 
   /**
--- a/layout/mathml/nsIMathMLFrame.h
+++ b/layout/mathml/nsIMathMLFrame.h
@@ -122,29 +122,29 @@ class nsIMathMLFrame {
    * As a rule of thumb:
    *
    * 1. Use InheritAutomaticData() to set properties related to your ancestors:
    *    - set properties that are intrinsic to yourself
    *    - set properties that depend on the state that you expect your ancestors
    *      to have already reached in their own InheritAutomaticData().
    *    - set properties that your descendants assume that you would have set in
    *      your InheritAutomaticData() -- this way, they can safely query them
-   * and the process will feed upon itself.
+   *      and the process will feed upon itself.
    *
    * 2. Use TransmitAutomaticData() to set properties related to your
    * descendants:
    *    - set properties that depend on the state that you expect your
-   * descendants to have reached upon processing their own
-   * TransmitAutomaticData().
+   *      descendants to have reached upon processing their own
+   *      TransmitAutomaticData().
    *    - transmit properties that your descendants expect that you will
-   * transmit to them in your TransmitAutomaticData() -- this way, they remain
-   * up-to-date.
+   *      transmit to them in your TransmitAutomaticData() -- this way, they
+   *      remain up-to-date.
    *    - set properties that your ancestors expect that you would set in your
    *      TransmitAutomaticData() -- this way, they can safely query them and
-   * the process will feed upon itself.
+   *      the process will feed upon itself.
    */
 
   NS_IMETHOD
   InheritAutomaticData(nsIFrame* aParent) = 0;
 
   NS_IMETHOD
   TransmitAutomaticData() = 0;
 
--- a/layout/mathml/nsMathMLContainerFrame.h
+++ b/layout/mathml/nsMathMLContainerFrame.h
@@ -119,18 +119,17 @@ class nsMathMLContainerFrame : public ns
   //    implemented by this base class.
   //
   // 2. If the MathML frame class has cached automatic data that depends on
   //    the attribute:
   //    2a. If the automatic data to update resides only within the descendants,
   //        we just re-layout them using ReLayoutChildren(this);
   //        (e.g., this happens with <ms>).
   //    2b. If the automatic data to update affects us in some way, we ask our
-  //    parent
-  //        to re-layout its children using ReLayoutChildren(mParent);
+  //        parent to re-layout its children using ReLayoutChildren(mParent);
   //        Therefore, there is an overhead here in that our siblings are
   //        re-laid too (e.g., this happens with <munder>, <mover>,
   //        <munderover>).
   virtual nsresult AttributeChanged(int32_t aNameSpaceID, nsAtom* aAttribute,
                                     int32_t aModType) override;
 
   // helper function to apply mirroring to a horizontal coordinate, if needed.
   nscoord MirrorIfRTL(nscoord aParentWidth, nscoord aChildWidth,
--- a/layout/printing/nsPrintData.h
+++ b/layout/printing/nsPrintData.h
@@ -56,18 +56,18 @@ class nsPrintData {
   ePrintDataType mType;  // the type of data this is (Printing or Print Preview)
   RefPtr<nsDeviceContext> mPrintDC;
 
   mozilla::UniquePtr<nsPrintObject> mPrintObject;
 
   nsCOMArray<nsIWebProgressListener> mPrintProgressListeners;
   nsCOMPtr<nsIPrintProgressParams> mPrintProgressParams;
 
-  nsCOMPtr<nsPIDOMWindowOuter>
-      mCurrentFocusWin;  // cache a pointer to the currently focused window
+  nsCOMPtr<nsPIDOMWindowOuter> mCurrentFocusWin;  // cache a pointer to the
+                                                  // currently focused window
 
   // Array of non-owning pointers to all the nsPrintObjects owned by this
   // nsPrintData. This includes this->mPrintObject, as well as all of its
   // mKids (and their mKids, etc.)
   nsTArray<nsPrintObject*> mPrintDocList;
 
   bool mIsIFrameSelected;
   bool mIsParentAFrameSet;
--- a/layout/style/StyleSheet.h
+++ b/layout/style/StyleSheet.h
@@ -453,19 +453,19 @@ class StyleSheet final : public nsICSSLo
   void TraverseInner(nsCycleCollectionTraversalCallback&);
 
   // Return whether the given @import rule has pending child sheet.
   static bool RuleHasPendingChildSheet(css::Rule* aRule);
 
   StyleSheet* mParent;  // weak ref
 
   nsString mTitle;
-  dom::DocumentOrShadowRoot*
-      mDocumentOrShadowRoot;       // weak ref; parents maintain this for their
-                                   // children
+
+  // weak ref; parents maintain this for their children
+  dom::DocumentOrShadowRoot* mDocumentOrShadowRoot;
   nsINode* mOwningNode;            // weak ref
   dom::CSSImportRule* mOwnerRule;  // weak ref
 
   RefPtr<dom::MediaList> mMedia;
 
   RefPtr<StyleSheet> mNext;
 
   // mParsingMode controls access to nonstandard style constructs that
--- a/layout/style/URLExtraData.h
+++ b/layout/style/URLExtraData.h
@@ -23,20 +23,19 @@ namespace mozilla {
 struct URLExtraData {
   URLExtraData(already_AddRefed<nsIURI> aBaseURI,
                already_AddRefed<nsIURI> aReferrer,
                already_AddRefed<nsIPrincipal> aPrincipal,
                net::ReferrerPolicy aReferrerPolicy)
       : mBaseURI(std::move(aBaseURI)),
         mReferrer(std::move(aReferrer)),
         mReferrerPolicy(aReferrerPolicy),
-        mPrincipal(std::move(aPrincipal))
+        mPrincipal(std::move(aPrincipal)),
         // When we hold the URI data of a style sheet, mReferrer is always
         // equal to the sheet URI.
-        ,
         mIsChrome(mReferrer ? dom::IsChromeURI(mReferrer) : false) {
     MOZ_ASSERT(mBaseURI);
     MOZ_ASSERT(mPrincipal);
   }
 
   URLExtraData(nsIURI* aBaseURI, nsIURI* aReferrer, nsIPrincipal* aPrincipal,
                net::ReferrerPolicy aReferrerPolicy)
       : URLExtraData(do_AddRef(aBaseURI), do_AddRef(aReferrer),
--- a/layout/style/nsCSSAnonBoxes.h
+++ b/layout/style/nsCSSAnonBoxes.h
@@ -66,26 +66,29 @@ class nsCSSAnonBoxes {
   }
 #endif  // DEBUG
 
   // This function is rather slow; you probably don't want to use it outside
   // asserts unless you have to.
   static bool IsWrapperAnonBox(nsAtom* aPseudo) {
     // We commonly get null passed here, and want to quickly return false for
     // it.
-    return aPseudo && (
+    if (!aPseudo) {
+      return false;
+    }
+    return
 #define CSS_ANON_BOX(_name, _value) /* nothing */
 #define CSS_WRAPPER_ANON_BOX(_name, _value) \
   nsGkAtoms::AnonBox_##_name == aPseudo ||
 #define CSS_NON_INHERITING_ANON_BOX(_name, _value) /* nothing */
 #include "nsCSSAnonBoxList.h"
 #undef CSS_NON_INHERITING_ANON_BOX
 #undef CSS_WRAPPER_ANON_BOX
 #undef CSS_ANON_BOX
-                          false);
+        false;
   }
 
   // Get the NonInheriting type for a given pseudo tag.  The pseudo tag must
   // test true for IsNonInheritingAnonBox.
   static NonInheriting NonInheritingTypeForPseudoTag(nsAtom* aPseudo);
 
 #ifdef DEBUG
   static void AssertAtoms();
--- a/layout/style/nsCSSProps.h
+++ b/layout/style/nsCSSProps.h
@@ -288,37 +288,34 @@ class nsCSSProps {
   // "layout.css.background-clip.text" changes:
   static const KTableEntry kShapeRadiusKTable[];
   static const KTableEntry kFilterFunctionKTable[];
   static const KTableEntry kBoxShadowTypeKTable[];
   static const KTableEntry kCursorKTable[];
   // Not const because we modify its entries when various
   // "layout.css.*.enabled" prefs changes:
   static KTableEntry kDisplayKTable[];
-  // -- tables for parsing the {align,justify}-{content,items,self} properties
-  // --
+  // clang-format off
+  // -- tables for parsing the {align,justify}-{content,items,self} properties --
   static const KTableEntry kAlignAllKeywords[];
   static const KTableEntry kAlignOverflowPosition[];  // <overflow-position>
   static const KTableEntry kAlignSelfPosition[];      // <self-position>
   static const KTableEntry kAlignLegacy[];            // 'legacy'
   static const KTableEntry kAlignLegacyPosition[];    // 'left/right/center'
-  static const KTableEntry
-      kAlignAutoNormalStretchBaseline[];  // 'auto/normal/stretch/baseline'
-  static const KTableEntry
-      kAlignNormalStretchBaseline[];                // 'normal/stretch/baseline'
+  static const KTableEntry kAlignAutoNormalStretchBaseline[];  // 'auto/normal/stretch/baseline'
+  static const KTableEntry kAlignNormalStretchBaseline[];  // 'normal/stretch/baseline'
   static const KTableEntry kAlignNormalBaseline[];  // 'normal/baseline'
-  static const KTableEntry
-      kAlignContentDistribution[];                   // <content-distribution>
+  static const KTableEntry kAlignContentDistribution[];  // <content-distribution>
   static const KTableEntry kAlignContentPosition[];  // <content-position>
-  // -- tables for auto-completion of the {align,justify}-{content,items,self}
-  // properties --
+  // -- tables for auto-completion of the {align,justify}-{content,items,self} properties --
   static const KTableEntry kAutoCompletionAlignJustifySelf[];
   static const KTableEntry kAutoCompletionAlignItems[];
   static const KTableEntry kAutoCompletionAlignJustifyContent[];
   // ------------------------------------------------------------------
+  // clang-format on
   static const KTableEntry kFontSmoothingKTable[];
   static const KTableEntry kGridAutoFlowKTable[];
   static const KTableEntry kGridTrackBreadthKTable[];
   static const KTableEntry kLineHeightKTable[];
   static const KTableEntry kContainKTable[];
   static const KTableEntry kOverflowSubKTable[];
   static const KTableEntry kOverflowClipBoxKTable[];
   static const KTableEntry kOverscrollBehaviorKTable[];
--- a/layout/style/nsCSSValue.h
+++ b/layout/style/nsCSSValue.h
@@ -245,92 +245,87 @@ struct GridTemplateAreasValue final {
 enum nsCSSUnit {
   eCSSUnit_Null = 0,     // (n/a) null unit, value is not specified
   eCSSUnit_Auto = 1,     // (n/a) value is algorithmic
   eCSSUnit_Inherit = 2,  // (n/a) value is inherited
   eCSSUnit_Initial = 3,  // (n/a) value is default UA value
   eCSSUnit_Unset = 4,    // (n/a) value equivalent to 'initial' if on a reset
                          // property, 'inherit' otherwise
   eCSSUnit_None = 5,     // (n/a) value is none
-  eCSSUnit_Normal =
-      6,  // (n/a) value is normal (algorithmic, different than auto)
+  eCSSUnit_Normal = 6,   // (n/a) value is normal (algorithmic, different than
+                         // auto)
   eCSSUnit_System_Font = 7,    // (n/a) value is -moz-use-system-font
   eCSSUnit_All = 8,            // (n/a) value is all
   eCSSUnit_Dummy = 9,          // (n/a) a fake but specified value, used
                                //       only in temporary values
   eCSSUnit_DummyInherit = 10,  // (n/a) a fake but specified value, used
                                //       only in temporary values
 
   eCSSUnit_String = 11,   // (char16_t*) a string value
   eCSSUnit_Ident = 12,    // (char16_t*) a string value
   eCSSUnit_Attr = 14,     // (char16_t*) a attr(string) value
   eCSSUnit_Element = 15,  // (char16_t*) an element id
 
-  eCSSUnit_Array = 20,  // (nsCSSValue::Array*) a list of values
-  eCSSUnit_Counter =
-      21,  // (nsCSSValue::Array*) a counter(string,[string]) value
-  eCSSUnit_Counters =
-      22,  // (nsCSSValue::Array*) a counters(string,string[,string]) value
-  eCSSUnit_Cubic_Bezier = 23,  // (nsCSSValue::Array*) a list of float values
-  eCSSUnit_Steps = 24,  // (nsCSSValue::Array*) a list of (integer, enumerated)
-  eCSSUnit_Symbols =
-      25,  // (nsCSSValue::Array*) a symbols(enumerated, symbols) value
-  eCSSUnit_Function = 26,  // (nsCSSValue::Array*) a function with
-                           //  parameters.  First elem of array is name,
-                           //  an nsCSSKeyword as eCSSUnit_Enumerated,
-                           //  the rest of the values are arguments.
+  // nsCSSValue::Array* values
+  eCSSUnit_Array = 20,     // (Array*) a list of values
+  eCSSUnit_Counter = 21,   // (Array*) a counter(string,[string]) value
+  eCSSUnit_Counters = 22,  // (Array*) a counters(string,string[,string]) value
+  eCSSUnit_Cubic_Bezier = 23,  // (Array*) a list of float values
+  eCSSUnit_Steps = 24,         // (Array*) a list of (integer, enumerated)
+  eCSSUnit_Symbols = 25,       // (Array*) a symbols(enumerated, symbols) value
+  eCSSUnit_Function = 26,  // (Array*) a function with parameters. First elem of
+                           // array is name, an nsCSSKeyword as
+                           // eCSSUnit_Enumerated, the rest of the values are
+                           // arguments.
 
   // The top level of a calc() expression is eCSSUnit_Calc.  All
   // remaining eCSSUnit_Calc_* units only occur inside these toplevel
   // calc values.
 
-  // eCSSUnit_Calc has an array with exactly 1 element.  eCSSUnit_Calc
-  // exists so we can distinguish calc(2em) from 2em as specified values
-  // (but we drop this distinction for nsStyleCoord when we store
+  // eCSSUnit_Calc exists so we can distinguish calc(2em) from 2em as specified
+  // values (but we drop this distinction for nsStyleCoord when we store
   // computed values).
-  eCSSUnit_Calc = 30,  // (nsCSSValue::Array*) calc() value
-  // Plus, Minus, Times_* and Divided have arrays with exactly 2
-  // elements.  a + b + c + d is grouped as ((a + b) + c) + d
-  eCSSUnit_Calc_Plus = 31,  // (nsCSSValue::Array*) + node within calc()
+  eCSSUnit_Calc = 30,       // (Array*) calc() value -- exactly 1 elt.
+  eCSSUnit_Calc_Plus = 31,  // (Array*) + node within calc(); exactly 2 elts.
+                            // a + b + c + d is grouped as ((a + b) + c) + d
 
   eCSSUnit_Pair = 50,        // (nsCSSValuePair*) pair of values
   eCSSUnit_List = 53,        // (nsCSSValueList*) list of values
   eCSSUnit_SharedList = 55,  // (nsCSSValueSharedList*) same as list
                              //   but reference counted and shared
   eCSSUnit_PairList = 56,    // (nsCSSValuePairList*) list of value pairs
 
   // Atom units
   eCSSUnit_AtomIdent = 60,  // (nsAtom*) for its string as an identifier
 
   eCSSUnit_Integer = 70,     // (int) simple value
   eCSSUnit_Enumerated = 71,  // (int) value has enumerated meaning
 
-  eCSSUnit_Percent =
-      100,  // (float) 1.0 == 100%) value is percentage of something
-  eCSSUnit_Number = 101,  // (float) value is numeric (usually multiplier,
-                          // different behavior than percent)
+  eCSSUnit_Percent = 100,  // (float) (1.0 == 100%) value is percentage of
+                           // something
+  eCSSUnit_Number = 101,   // (float) value is numeric (usually multiplier,
+                           // different behavior than percent)
 
   // Length units - relative
   // Viewport relative measure
-  eCSSUnit_ViewportWidth =
-      700,  // (float) 1% of the width of the initial containing block
-  eCSSUnit_ViewportHeight =
-      701,  // (float) 1% of the height of the initial containing block
-  eCSSUnit_ViewportMin =
-      702,  // (float) smaller of ViewportWidth and ViewportHeight
-  eCSSUnit_ViewportMax =
-      703,  // (float) larger of ViewportWidth and ViewportHeight
+  eCSSUnit_ViewportWidth = 700,   // (float) 1% of the width of the initial
+                                  // containing block (ICB)
+  eCSSUnit_ViewportHeight = 701,  // (float) 1% of the height of the ICB
+  eCSSUnit_ViewportMin = 702,     // (float) smaller of ViewportWidth and
+                                  // ViewportHeight
+  eCSSUnit_ViewportMax = 703,     // (float) larger of ViewportWidth and
+                                  // ViewportHeight
 
   // Font relative measure
-  eCSSUnit_EM = 800,  // (float) == current font size
-  eCSSUnit_XHeight =
-      801,  // (float) distance from top of lower case x to baseline
-  eCSSUnit_Char =
-      802,  // (float) number of characters, used for width with monospace font
-  eCSSUnit_RootEM = 803,  // (float) == root element font size
+  eCSSUnit_EM = 800,       // (float) == current font size
+  eCSSUnit_XHeight = 801,  // (float) distance from top of lower case x to
+                           // baseline
+  eCSSUnit_Char = 802,     // (float) number of characters, used for width with
+                           // monospace font
+  eCSSUnit_RootEM = 803,   // (float) == root element font size
 
   // Screen relative measure
   eCSSUnit_Point = 900,       // (float) 4/3 of a CSS pixel
   eCSSUnit_Inch = 901,        // (float) 96 CSS pixels
   eCSSUnit_Millimeter = 902,  // (float) 96/25.4 CSS pixels
   eCSSUnit_Centimeter = 903,  // (float) 96/2.54 CSS pixels
   eCSSUnit_Pica = 904,        // (float) 12 points == 16 CSS pixls
   eCSSUnit_Quarter = 905,     // (float) 96/101.6 CSS pixels
--- a/layout/style/nsStyleConsts.h
+++ b/layout/style/nsStyleConsts.h
@@ -748,18 +748,17 @@ enum class StyleWhiteSpace : uint8_t {
 #define NS_STYLE_RUBY_ALIGN_START 0
 #define NS_STYLE_RUBY_ALIGN_CENTER 1
 #define NS_STYLE_RUBY_ALIGN_SPACE_BETWEEN 2
 #define NS_STYLE_RUBY_ALIGN_SPACE_AROUND 3
 
 // ruby-position, see nsStyleText
 #define NS_STYLE_RUBY_POSITION_OVER 0
 #define NS_STYLE_RUBY_POSITION_UNDER 1
-#define NS_STYLE_RUBY_POSITION_INTER_CHARACTER \
-  2 /* placeholder, not yet parsed */
+#define NS_STYLE_RUBY_POSITION_INTER_CHARACTER 2  // placeholder, not yet parsed
 
 // See nsStyleText
 #define NS_STYLE_TEXT_SIZE_ADJUST_NONE 0
 #define NS_STYLE_TEXT_SIZE_ADJUST_AUTO 1
 
 // See nsStyleText
 #define NS_STYLE_TEXT_ORIENTATION_MIXED 0
 #define NS_STYLE_TEXT_ORIENTATION_UPRIGHT 1
--- a/layout/style/nsStyleCoord.h
+++ b/layout/style/nsStyleCoord.h
@@ -178,18 +178,18 @@ class nsStyleCoord {
            (IsCalcUnit(aUnit) && !AsCalcValue(aValue)->mHasPercent);
   }
 
   bool ConvertsToLength() const { return ConvertsToLength(mUnit, mValue); }
 
   static nscoord ToLength(nsStyleUnit aUnit, nsStyleUnion aValue) {
     MOZ_ASSERT(ConvertsToLength(aUnit, aValue));
     if (IsCalcUnit(aUnit)) {
-      return AsCalcValue(aValue)
-          ->ToLength();  // Note: This asserts !mHasPercent
+      // Note: ToLength asserts !mHasPercent
+      return AsCalcValue(aValue)->ToLength();
     }
     MOZ_ASSERT(aUnit == eStyleUnit_Coord);
     return aValue.mInt;
   }
 
   nscoord ToLength() const { return ToLength(GetUnit(), mValue); }
 
   // Callers must verify IsCalcUnit before calling this function.
--- a/layout/style/nsStyleStruct.h
+++ b/layout/style/nsStyleStruct.h
@@ -601,40 +601,37 @@ struct nsStyleImageLayers {
     typedef mozilla::StyleGeometryBox StyleGeometryBox;
     typedef mozilla::StyleImageLayerAttachment StyleImageLayerAttachment;
 
     nsStyleImage mImage;
     mozilla::Position mPosition;
     Size mSize;
     StyleGeometryBox mClip;
     MOZ_INIT_OUTSIDE_CTOR StyleGeometryBox mOrigin;
+
+    // This property is used for background layer only.
+    // For a mask layer, it should always be the initial value, which is
+    // StyleImageLayerAttachment::Scroll.
     StyleImageLayerAttachment mAttachment;
-    // background-only property
-    // This property is used for background layer
-    // only. For a mask layer, it should always
-    // be the initial value, which is
-    // StyleImageLayerAttachment::Scroll.
+
+    // This property is used for background layer only.
+    // For a mask layer, it should always be the initial value, which is
+    // NS_STYLE_BLEND_NORMAL.
     uint8_t mBlendMode;  // NS_STYLE_BLEND_*
-                         // background-only property
-                         // This property is used for background layer
-                         // only. For a mask layer, it should always
-                         // be the initial value, which is
-                         // NS_STYLE_BLEND_NORMAL.
+
+    // This property is used for mask layer only.
+    // For a background layer, it should always be the initial value, which is
+    // NS_STYLE_COMPOSITE_MODE_ADD.
     uint8_t mComposite;  // NS_STYLE_MASK_COMPOSITE_*
-                         // mask-only property
-                         // This property is used for mask layer only.
-                         // For a background layer, it should always
-                         // be the initial value, which is
-                         // NS_STYLE_COMPOSITE_MODE_ADD.
-    uint8_t mMaskMode;   // NS_STYLE_MASK_MODE_*
-                         // mask-only property
-                         // This property is used for mask layer only.
-                         // For a background layer, it should always
-                         // be the initial value, which is
-                         // NS_STYLE_MASK_MODE_MATCH_SOURCE.
+
+    // mask-only property. This property is used for mask layer only. For a
+    // background layer, it should always be the initial value, which is
+    // NS_STYLE_MASK_MODE_MATCH_SOURCE.
+    uint8_t mMaskMode;  // NS_STYLE_MASK_MODE_*
+
     Repeat mRepeat;
 
     // This constructor does not initialize mRepeat or mOrigin and Initialize()
     // must be called to do that.
     Layer();
     ~Layer();
 
     // Initialize mRepeat and mOrigin by specified layer type
@@ -657,19 +654,27 @@ struct nsStyleImageLayers {
     // An equality operator that compares the images using URL-equality
     // rather than pointer-equality.
     bool operator==(const Layer& aOther) const;
     bool operator!=(const Layer& aOther) const { return !(*this == aOther); }
   };
 
   // The (positive) number of computed values of each property, since
   // the lengths of the lists are independent.
-  uint32_t mAttachmentCount, mClipCount, mOriginCount, mRepeatCount,
-      mPositionXCount, mPositionYCount, mImageCount, mSizeCount, mMaskModeCount,
-      mBlendModeCount, mCompositeCount;
+  uint32_t mAttachmentCount;
+  uint32_t mClipCount;
+  uint32_t mOriginCount;
+  uint32_t mRepeatCount;
+  uint32_t mPositionXCount;
+  uint32_t mPositionYCount;
+  uint32_t mImageCount;
+  uint32_t mSizeCount;
+  uint32_t mMaskModeCount;
+  uint32_t mBlendModeCount;
+  uint32_t mCompositeCount;
 
   // Layers are stored in an array, matching the top-to-bottom order in
   // which they are specified in CSS.  The number of layers to be used
   // should come from the background-image property.  We create
   // additional |Layer| objects for *any* property, not just
   // background-image.  This means that the bottommost layer that
   // callers in layout care about (which is also the one whose
   // background-clip applies to the background-color) may not be last
@@ -1940,25 +1945,27 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
   RefPtr<nsCSSValueSharedList> mIndividualTransform;
   mozilla::UniquePtr<mozilla::StyleMotion> mMotion;
 
   nsStyleCoord mTransformOrigin[3];    // percent, coord, calc, 3rd param is
                                        // coord, calc only
   nsStyleCoord mChildPerspective;      // none, coord
   nsStyleCoord mPerspectiveOrigin[2];  // percent, coord, calc
 
-  nsStyleCoord
-      mVerticalAlign;  // coord, percent, calc, enum (NS_STYLE_VERTICAL_ALIGN_*)
+  nsStyleCoord mVerticalAlign;  // coord, percent, calc, enum
+                                // (NS_STYLE_VERTICAL_ALIGN_*)
 
   nsStyleAutoArray<mozilla::StyleTransition> mTransitions;
 
   // The number of elements in mTransitions that are not from repeating
   // a list due to another property being longer.
-  uint32_t mTransitionTimingFunctionCount, mTransitionDurationCount,
-      mTransitionDelayCount, mTransitionPropertyCount;
+  uint32_t mTransitionTimingFunctionCount;
+  uint32_t mTransitionDurationCount;
+  uint32_t mTransitionDelayCount;
+  uint32_t mTransitionPropertyCount;
 
   nsCSSPropertyID GetTransitionProperty(uint32_t aIndex) const {
     return mTransitions[aIndex % mTransitionPropertyCount].GetProperty();
   }
   float GetTransitionDelay(uint32_t aIndex) const {
     return mTransitions[aIndex % mTransitionDelayCount].GetDelay();
   }
   float GetTransitionDuration(uint32_t aIndex) const {
@@ -1975,20 +1982,24 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
                0.0f) +
            mTransitions[aIndex % mTransitionDelayCount].GetDelay();
   }
 
   nsStyleAutoArray<mozilla::StyleAnimation> mAnimations;
 
   // The number of elements in mAnimations that are not from repeating
   // a list due to another property being longer.
-  uint32_t mAnimationTimingFunctionCount, mAnimationDurationCount,
-      mAnimationDelayCount, mAnimationNameCount, mAnimationDirectionCount,
-      mAnimationFillModeCount, mAnimationPlayStateCount,
-      mAnimationIterationCountCount;
+  uint32_t mAnimationTimingFunctionCount;
+  uint32_t mAnimationDurationCount;
+  uint32_t mAnimationDelayCount;
+  uint32_t mAnimationNameCount;
+  uint32_t mAnimationDirectionCount;
+  uint32_t mAnimationFillModeCount;
+  uint32_t mAnimationPlayStateCount;
+  uint32_t mAnimationIterationCountCount;
 
   nsAtom* GetAnimationName(uint32_t aIndex) const {
     return mAnimations[aIndex % mAnimationNameCount].GetName();
   }
   float GetAnimationDelay(uint32_t aIndex) const {
     return mAnimations[aIndex % mAnimationDelayCount].GetDelay();
   }
   float GetAnimationDuration(uint32_t aIndex) const {
--- a/layout/svg/nsSVGDisplayableFrame.h
+++ b/layout/svg/nsSVGDisplayableFrame.h
@@ -99,25 +99,26 @@ class nsSVGDisplayableFrame : public nsQ
   // to update and then invalidate their cached bounds. This method is not
   // called until after the nsSVGOuterSVGFrame has had its initial reflow
   // (i.e. once the SVG viewport dimensions are known). It should also only
   // be called by nsSVGOuterSVGFrame during its reflow.
   virtual void ReflowSVG() = 0;
 
   // Flags to pass to NotifySVGChange:
   //
-  // DO_NOT_NOTIFY_RENDERING_OBSERVERS - this should only be used when
-  //                           updating the descendant frames of a clipPath,
-  //                           mask, pattern or marker frame (or other similar
-  //                           NS_FRAME_IS_NONDISPLAY frame) immediately
-  //                           prior to painting that frame's descendants.
-  // TRANSFORM_CHANGED     - the current transform matrix for this frame has
-  // changed COORD_CONTEXT_CHANGED - the dimensions of this frame's coordinate
-  // context has
-  //                           changed (percentage lengths must be reevaluated)
+  // DO_NOT_NOTIFY_RENDERING_OBSERVERS:
+  //   this should only be used when updating the descendant frames of a
+  //   clipPath, mask, pattern or marker frame (or other similar
+  //   NS_FRAME_IS_NONDISPLAY frame) immediately prior to painting that frame's
+  //   descendants.
+  // TRANSFORM_CHANGED:
+  //   the current transform matrix for this frame has changed
+  // COORD_CONTEXT_CHANGED:
+  //   the dimensions of this frame's coordinate context has changed (percentage
+  //   lengths must be reevaluated)
   enum SVGChangedFlags {
     TRANSFORM_CHANGED = 0x01,
     COORD_CONTEXT_CHANGED = 0x02,
     FULL_ZOOM_CHANGED = 0x04
   };
   /**
    * This is called on a frame when there has been a change to one of its
    * ancestors that might affect the frame too. SVGChangedFlags are passed
--- a/layout/svg/nsSVGOuterSVGFrame.h
+++ b/layout/svg/nsSVGOuterSVGFrame.h
@@ -171,17 +171,17 @@ class nsSVGOuterSVGFrame final : public 
    */
   bool IsRootOfImage();
 
   // This is temporary until display list based invalidation is implemented for
   // SVG.
   // A hash-set containing our nsSVGForeignObjectFrame descendants. Note we use
   // a hash-set to avoid the O(N^2) behavior we'd get tearing down an SVG frame
   // subtree if we were to use a list (see bug 381285 comment 20).
-  nsAutoPtr<nsTHashtable<nsPtrHashKey<nsSVGForeignObjectFrame> > >
+  nsAutoPtr<nsTHashtable<nsPtrHashKey<nsSVGForeignObjectFrame>>>
       mForeignObjectHash;
 
   nsRegion mInvalidRegion;
 
   float mFullZoom;
 
   bool mViewportInitialized;
   bool mIsRootContent;
--- a/layout/tables/celldata.h
+++ b/layout/tables/celldata.h
@@ -105,23 +105,23 @@ class CellData {
    *            is only a spanned entry
    */
   nsTableCellFrame* GetCellFrame() const;
 
  private:
   friend class nsCellMap;
   friend class BCCellData;
 
-  /** constructor.
+  /**
+   * Implemented in nsCellMap.cpp
+   *
    * @param aOrigCell  the table cell frame which will be stored in mOrigCell.
    */
-  explicit CellData(
-      nsTableCellFrame* aOrigCell);  // implemented in nsCellMap.cpp
+  explicit CellData(nsTableCellFrame* aOrigCell);
 
-  /** destructor */
   ~CellData();  // implemented in nsCellMap.cpp
 
  protected:
   // this union relies on the assumption that an object (not primitive type)
   // does not start on an odd bit boundary. If mSpan is 0 then mOrigCell is in
   // effect and the data does not represent a span. If mSpan is 1, then mBits is
   // in effect and the data represents a span. mBits must match the size of
   // mOrigCell on both 32- and 64-bit platforms.
--- a/layout/tables/nsTableColFrame.h
+++ b/layout/tables/nsTableColFrame.h
@@ -15,24 +15,26 @@
 
 class nsTableColFrame final : public nsSplittableFrame {
  public:
   NS_DECL_FRAMEARENA_HELPERS(nsTableColFrame)
 
   enum {
     eWIDTH_SOURCE_NONE = 0,  // no cell has contributed to the width style
     eWIDTH_SOURCE_CELL = 1,  // a cell specified a width
-    eWIDTH_SOURCE_CELL_WITH_SPAN =
-        2  // a cell implicitly specified a width via colspan
+    eWIDTH_SOURCE_CELL_WITH_SPAN = 2  // a cell implicitly specified a width via
+                                      // colspan
   };
 
   nsTableColType GetColType() const;
   void SetColType(nsTableColType aType);
 
-  /** instantiate a new instance of nsTableRowFrame.
+  /**
+   * instantiate a new instance of nsTableRowFrame.
+   *
    * @param aPresShell the pres shell for this frame
    *
    * @return           the frame that was created
    */
   friend nsTableColFrame* NS_NewTableColFrame(nsIPresShell* aPresShell,
                                               ComputedStyle* aContext);
 
   // nsIFrame overrides
--- a/layout/tables/nsTableColGroupFrame.h
+++ b/layout/tables/nsTableColGroupFrame.h
@@ -16,17 +16,19 @@ class nsTableColFrame;
 /**
  * nsTableColGroupFrame
  * data structure to maintain information about a single table cell's frame
  */
 class nsTableColGroupFrame final : public nsContainerFrame {
  public:
   NS_DECL_FRAMEARENA_HELPERS(nsTableColGroupFrame)
 
-  /** instantiate a new instance of nsTableRowFrame.
+  /**
+   * instantiate a new instance of nsTableRowFrame.
+   *
    * @param aPresShell the pres shell for this frame
    *
    * @return           the frame that was created
    */
   friend nsTableColGroupFrame* NS_NewTableColGroupFrame(
       nsIPresShell* aPresShell, ComputedStyle* aStyle);
 
   // nsIFrame overrides
--- a/layout/tables/nsTableFrame.h
+++ b/layout/tables/nsTableFrame.h
@@ -93,18 +93,17 @@ class nsAutoPushCurrentTableItem {
  private:
   nsDisplayListBuilder* mBuilder;
   nsDisplayTableItem* mOldCurrentItem;
 #ifdef DEBUG
   nsDisplayTableItem* mPushedItem;
 #endif
 };
 
-/* ============================================================================
- */
+/* ========================================================================== */
 
 enum nsTableColType {
   eColContent = 0,            // there is real col content associated
   eColAnonymousCol = 1,       // the result of a span on a col
   eColAnonymousColGroup = 2,  // the result of a span on a col group
   eColAnonymousCell = 3       // the result of a cell alone
 };
 
@@ -126,17 +125,19 @@ class nsTableFrame : public nsContainerF
   NS_DECL_FRAMEARENA_HELPERS(nsTableFrame)
 
   typedef nsTArray<nsIFrame*> FrameTArray;
   NS_DECLARE_FRAME_PROPERTY_DELETABLE(PositionedTablePartArray, FrameTArray)
 
   /** nsTableWrapperFrame has intimate knowledge of the inner table frame */
   friend class nsTableWrapperFrame;
 
-  /** instantiate a new instance of nsTableRowFrame.
+  /**
+   * instantiate a new instance of nsTableRowFrame.
+   *
    * @param aPresShell the pres shell for this frame
    *
    * @return           the frame that was created
    */
   friend nsTableFrame* NS_NewTableFrame(nsIPresShell* aPresShell,
                                         ComputedStyle* aStyle);
 
   /** sets defaults for table-specific style.
@@ -317,26 +318,33 @@ class nsTableFrame : public nsContainerF
   /**
    * A copy of nsFrame::ShrinkWidthToFit that calls a different
    * GetPrefISize, since tables have two different ones.
    */
   nscoord TableShrinkISizeToFit(gfxContext* aRenderingContext,
                                 nscoord aWidthInCB);
 
   // XXXldb REWRITE THIS COMMENT!
-  /** inner tables are reflowed in two steps.
+  // clang-format off
+  /**
+   * Inner tables are reflowed in two steps.
    * <pre>
-   * if mFirstPassValid is false, this is our first time through since content
-   * was last changed set pass to 1 do pass 1 get min/max info for all cells in
-   * an infinite space do column balancing set mFirstPassValid to true do pass 2
+   * if mFirstPassValid is false, this is our first time through since content was last changed
+   *   set pass to 1
+   *   do pass 1
+   *     get min/max info for all cells in an infinite space
+   *   do column balancing
+   *   set mFirstPassValid to true
+   *   do pass 2
    *     use column widths to Reflow cells
    * </pre>
    *
    * @see nsIFrame::Reflow
    */
+  // clang-format on
   virtual void Reflow(nsPresContext* aPresContext, ReflowOutput& aDesiredSize,
                       const ReflowInput& aReflowInput,
                       nsReflowStatus& aStatus) override;
 
   void ReflowTable(ReflowOutput& aDesiredSize, const ReflowInput& aReflowInput,
                    nscoord aAvailBSize, nsIFrame*& aLastChildReflowed,
                    nsReflowStatus& aStatus);
 
@@ -834,36 +842,36 @@ class nsTableFrame : public nsContainerF
   AutoTArray<nsTableColFrame*, 8> mColFrames;
 
   struct TableBits {
     uint32_t mHaveReflowedColGroups : 1;  // have the col groups gotten their
                                           // initial reflow
     uint32_t mHasPctCol : 1;        // does any cell or col have a pct width
     uint32_t mCellSpansPctCol : 1;  // does any cell span a col with a pct width
                                     // (or containing a cell with a pct width)
-    uint32_t
-        mIsBorderCollapse : 1;  // border collapsing model vs. separate model
+    uint32_t mIsBorderCollapse : 1;  // border collapsing model vs. separate
+                                     // model
     uint32_t mRowInserted : 1;
     uint32_t mNeedToCalcBCBorders : 1;
     uint32_t mGeometryDirty : 1;
     uint32_t mIStartContBCBorder : 8;
     uint32_t mNeedToCollapse : 1;  // rows, cols that have visibility:collapse
                                    // need to be collapsed
     uint32_t mResizedColumns : 1;  // have we resized columns since last reflow?
     uint32_t mNeedToCalcHasBCBorders : 1;
     uint32_t mHasBCBorders : 1;
   } mBits;
 
   std::map<int32_t, int32_t> mDeletedRowIndexRanges;  // maintains ranges of row
                                                       // indices of deleted rows
-  nsTableCellMap*
-      mCellMap;  // maintains the relationships between rows, cols, and cells
-  nsITableLayoutStrategy*
-      mTableLayoutStrategy;  // the layout strategy for this frame
-  nsFrameList mColGroups;    // the list of colgroup frames
+  nsTableCellMap* mCellMap;  // maintains the relationships between rows, cols,
+                             // and cells
+  nsITableLayoutStrategy* mTableLayoutStrategy;  // the layout strategy for this
+                                                 // frame
+  nsFrameList mColGroups;                        // the list of colgroup frames
 };
 
 inline bool nsTableFrame::IsRowGroup(mozilla::StyleDisplay aDisplayType) const {
   return mozilla::StyleDisplay::TableHeaderGroup == aDisplayType ||
          mozilla::StyleDisplay::TableFooterGroup == aDisplayType ||
          mozilla::StyleDisplay::TableRowGroup == aDisplayType;
 }
 
--- a/layout/tables/nsTableRowFrame.h
+++ b/layout/tables/nsTableRowFrame.h
@@ -75,18 +75,22 @@ class nsTableRowFrame : public nsContain
   virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
                                 const nsDisplayListSet& aLists) override;
 
   // Implemented in nsTableCellFrame.h, because it needs to know about the
   // nsTableCellFrame class, but we can't include nsTableCellFrame.h here.
   inline nsTableCellFrame* GetFirstCell() const;
 
   /** calls Reflow for all of its child cells.
+   *
    * Cells with rowspan=1 are all set to the same height and stacked
-   * horizontally. <P> Cells are not split unless absolutely necessary. <P>
+   * horizontally.
+   *
+   * Cells are not split unless absolutely necessary.
+   *
    * Cells are resized in nsTableFrame::BalanceColumnWidths and
    * nsTableFrame::ShrinkWrapChildren
    *
    * @param aDesiredSize width set to width of the sum of the cells, height set
    * to height of cells with rowspan=1.
    *
    * @see nsIFrame::Reflow
    * @see nsTableFrame::BalanceColumnWidths
--- a/layout/tables/nsTableRowGroupFrame.h
+++ b/layout/tables/nsTableRowGroupFrame.h
@@ -70,19 +70,22 @@ class nsTableRowGroupFrame final : publi
 
   virtual nsMargin GetUsedMargin() const override;
   virtual nsMargin GetUsedBorder() const override;
   virtual nsMargin GetUsedPadding() const override;
 
   virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
                                 const nsDisplayListSet& aLists) override;
 
-  /** calls Reflow for all of its child rows.
+  /**
+   * Calls Reflow for all of its child rows.
+   *
    * Rows are all set to the same isize and stacked in the block direction.
-   * <P> rows are not split unless absolutely necessary.
+   *
+   * Rows are not split unless absolutely necessary.
    *
    * @param aDesiredSize isize set to isize of rows, bsize set to
    *                     sum of bsize of rows that fit in AvailableBSize.
    *
    * @see nsIFrame::Reflow
    */
   virtual void Reflow(nsPresContext* aPresContext, ReflowOutput& aDesiredSize,
                       const ReflowInput& aReflowInput,
@@ -218,21 +221,20 @@ class nsTableRowGroupFrame final : publi
    *                       frame and the index is at least aStartLine.
    *                       -1 if the frame cannot be found.
    */
   virtual int32_t FindLineContaining(nsIFrame* aFrame,
                                      int32_t aStartLine = 0) override;
 
   /** Find the orginating cell frame on a row that is the nearest to the
    * inline-dir coordinate of aPos.
-   * @param aLineNumber          - the index of the row relative to the row
-   * group
-   * @param aPos                 - coordinate in twips relative to the
-   *                               origin of the row group
-   * @param aFrameFound          - pointer to the cellframe
+   * @param aLineNumber        - the index of the row relative to the row group
+   * @param aPos               - coordinate in twips relative to the
+   *                             origin of the row group
+   * @param aFrameFound        - pointer to the cellframe
    * @param aPosIsBeforeFirstFrame - the point is before the first originating
    *                               cellframe
    * @param aPosIsAfterLastFrame   - the point is after the last originating
    *                               cellframe
    */
   NS_IMETHOD FindFrameAt(int32_t aLineNumber, nsPoint aPos,
                          nsIFrame** aFrameFound, bool* aPosIsBeforeFirstFrame,
                          bool* aPosIsAfterLastFrame) override;
--- a/layout/xul/BoxObject.h
+++ b/layout/xul/BoxObject.h
@@ -77,18 +77,17 @@ class BoxObject : public nsPIBoxObject, 
   Element* GetFirstChild();
   Element* GetLastChild();
   Element* GetNextSibling();
   Element* GetPreviousSibling();
 
  protected:
   virtual ~BoxObject();
 
-  nsAutoPtr<nsInterfaceHashtable<nsStringHashKey, nsISupports> >
-      mPropertyTable;  //[OWNER]
+  nsAutoPtr<nsInterfaceHashtable<nsStringHashKey, nsISupports>> mPropertyTable;
 
   Element* mContent;  // [WEAK]
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif
--- a/layout/xul/nsMenuBarFrame.h
+++ b/layout/xul/nsMenuBarFrame.h
@@ -46,18 +46,19 @@ class nsMenuBarFrame final : public nsBo
 
   NS_IMETHOD SetActive(bool aActiveFlag) override;
 
   virtual bool IsMenuBar() override { return true; }
   virtual bool IsContextMenu() override { return false; }
   virtual bool IsActive() override { return mIsActive; }
   virtual bool IsMenu() override { return false; }
   virtual bool IsOpen() override {
+    // menubars are considered always open
     return true;
-  }  // menubars are considered always open
+  }
 
   bool IsMenuOpen() { return mCurrentMenu && mCurrentMenu->IsOpen(); }
 
   void InstallKeyboardNavigator();
   void RemoveKeyboardNavigator();
 
   virtual void Init(nsIContent* aContent, nsContainerFrame* aParent,
                     nsIFrame* aPrevInFlow) override;
--- a/layout/xul/nsMenuPopupFrame.h
+++ b/layout/xul/nsMenuPopupFrame.h
@@ -183,18 +183,19 @@ class nsMenuPopupFrame final : public ns
                             bool aFromKey) override;
 
   // as popups are opened asynchronously, the popup pending state is used to
   // prevent multiple requests from attempting to open the same popup twice
   nsPopupState PopupState() { return mPopupState; }
   void SetPopupState(nsPopupState aPopupState) { mPopupState = aPopupState; }
 
   NS_IMETHOD SetActive(bool aActiveFlag) override {
+    // We don't care.
     return NS_OK;
-  }  // We don't care.
+  }
   virtual bool IsActive() override { return false; }
   virtual bool IsMenuBar() override { return false; }
 
   /*
    * When this popup is open, should clicks outside of it be consumed?
    * Return true if the popup should rollup on an outside click,
    * but consume that click so it can't be used for anything else.
    * Return false to allow clicks outside the popup to activate content
--- a/layout/xul/nsXULPopupManager.h
+++ b/layout/xul/nsXULPopupManager.h
@@ -472,18 +472,18 @@ class nsXULPopupManager final : public n
 
   /*
    * Hide a popup aPopup. If the popup is in a <menu>, then also inform the
    * menu that the popup is being hidden.
    *
    * aHideChain - true if the entire chain of menus should be closed. If false,
    *              only this popup is closed.
    * aDeselectMenu - true if the parent <menu> of the popup should be
-   * deselected. This will be false when the menu is closed by pressing the
-   *                 Escape key.
+   *                 deselected. This will be false when the menu is closed by
+   *                 pressing the Escape key.
    * aAsynchronous - true if the first popuphiding event should be sent
    *                 asynchrously. This should be true if HidePopup is called
    *                 from a frame.
    * aIsCancel - true if this popup is hiding due to being cancelled.
    * aLastPopup - optional popup to close last when hiding a chain of menus.
    *              If null, then all popups will be closed.
    */
   void HidePopup(nsIContent* aPopup, bool aHideChain, bool aDeselectMenu,
--- a/layout/xul/tree/nsTreeBodyFrame.h
+++ b/layout/xul/tree/nsTreeBodyFrame.h
@@ -468,17 +468,17 @@ class nsTreeBodyFrame final : public nsL
    * that is used to expose the information structures described by method
    * arguments via a property bag.
    *
    * @param aStartRow  the start index of invalidated rows, -1 means that
    *                   columns have been invalidated only
    * @param aEndRow    the end index of invalidated rows, -1 means that columns
    *                   have been invalidated only
    * @param aStartCol  the start invalidated column, nullptr means that only
-   * rows have been invalidated
+   *                   rows have been invalidated
    * @param aEndCol    the end invalidated column, nullptr means that rows have
    *                   been invalidated only
    */
   void FireInvalidateEvent(int32_t aStartRow, int32_t aEndRow,
                            nsTreeColumn* aStartCol, nsTreeColumn* aEndCol);
 #endif
 
  protected:  // Data Members