Bug 1508472 - Part 3: Third batch of comment fix-ups in preparation for the tree reformat (layout/) r=Ehsan
☠☠ backed out by 193a2a5ad0e6 ☠ ☠
authorSylvestre Ledru <sledru@mozilla.com>
Tue, 27 Nov 2018 21:39:24 +0000
changeset 507595 af951294cf96812660b2ac9918eb6df32758d420
parent 507594 2320933cb7bc8255b7e484df1ef27718154362d5
child 507596 cd922858805d95123ce8cbab50a23cc365c7fe39
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)
reviewersEhsan
bugs1508472
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1508472 - Part 3: Third batch of comment fix-ups in preparation for the tree reformat (layout/) r=Ehsan Differential Revision: https://phabricator.services.mozilla.com/D13125
layout/base/nsBidi.h
layout/base/nsCSSFrameConstructor.cpp
layout/base/nsDocumentViewer.cpp
layout/base/nsIPresShell.h
layout/forms/nsComboboxControlFrame.cpp
layout/forms/nsComboboxControlFrame.h
layout/generic/nsBulletFrame.cpp
layout/generic/nsColumnSetFrame.cpp
layout/generic/nsFlexContainerFrame.cpp
layout/generic/nsFrame.cpp
layout/generic/nsFrameSelection.h
layout/generic/nsFrameSetFrame.cpp
layout/generic/nsIFrame.h
layout/generic/nsLineLayout.cpp
layout/mathml/nsIMathMLFrame.h
layout/mathml/nsMathMLContainerFrame.h
layout/mathml/nsMathMLmpaddedFrame.cpp
layout/mathml/nsMathMLmunderoverFrame.cpp
layout/style/StyleSheet.cpp
layout/style/nsCSSProps.h
layout/svg/SVGTextFrame.cpp
layout/tables/celldata.h
layout/tables/nsCellMap.h
layout/tables/nsTableFrame.cpp
layout/tables/nsTableRowFrame.h
layout/tables/nsTableRowGroupFrame.h
layout/xul/BoxObject.cpp
layout/xul/grid/nsGrid.cpp
layout/xul/nsScrollbarFrame.cpp
--- a/layout/base/nsBidi.h
+++ b/layout/base/nsBidi.h
@@ -36,17 +36,18 @@ public:
   }
 
   /**
    * Perform the Unicode Bidi algorithm.
    *
    * @param aText is a pointer to the single-paragraph text that the
    *      Bidi algorithm will be performed on
    *      (step (P1) of the algorithm is performed externally).
-   *      <strong>The text must be (at least) <code>aLength</code> long.</strong>
+   *      <strong>The text must be (at least) <code>aLength</code> long.
+   *      </strong>
    *
    * @param aLength is the length of the text; if <code>aLength==-1</code> then
    *      the text must be zero-terminated.
    *
    * @param aParaLevel specifies the default level for the paragraph;
    *      it is typically 0 (LTR) or 1 (RTL).
    *      If the function shall determine the paragraph level from the text,
    *      then <code>aParaLevel</code> can be set to
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -2767,29 +2767,30 @@ nsCSSFrameConstructor::SetUpDocElementCo
   [abs-cb]: the default containing block for abs-pos content
 
   Meaning of nsCSSFrameConstructor fields:
     mRootElementFrame is "root element frame".  This is the primary frame for
       the root element.
     mDocElementContainingBlock is the parent of mRootElementFrame
       (i.e. nsCanvasFrame or nsRootBoxFrame)
 
-    mPageSequenceFrame is the nsSimplePageSequenceFrame, or null if there isn't one
+    mPageSequenceFrame is the nsSimplePageSequenceFrame,
+    or null if there isn't one
   */
 
   // --------- CREATE ROOT FRAME -------
 
 
   // Create the root frame. The document element's frame is a child of the
   // root frame.
   //
   // The root frame serves two purposes:
   // - reserves space for any margins needed for the document element's frame
-  // - renders the document element's background. This ensures the background covers
-  //   the entire canvas as specified by the CSS2 spec
+  // - renders the document element's background. This ensures the background
+  //   covers the entire canvas as specified by the CSS2 spec
 
   nsPresContext* presContext = mPresShell->GetPresContext();
   bool isPaginated = presContext->IsRootPaginatedDocument();
   nsContainerFrame* viewportFrame = static_cast<nsContainerFrame*>(GetRootFrame());
   ComputedStyle* viewportPseudoStyle = viewportFrame->Style();
 
   nsContainerFrame* rootFrame = nullptr;
   nsAtom* rootPseudo;
@@ -4440,46 +4441,51 @@ void
 nsCSSFrameConstructor::FinishBuildingScrollFrame(nsContainerFrame* aScrollFrame,
                                                  nsIFrame* aScrolledFrame)
 {
   nsFrameList scrolled(aScrolledFrame, aScrolledFrame);
   aScrollFrame->AppendFrames(kPrincipalList, scrolled);
 }
 
 /**
- * Called to wrap a gfx scrollframe around a frame. The hierarchy will look like this
- *
+ * Called to wrap a gfx scrollframe around a frame. The hierarchy will look like
+ * this
  * ------- for gfx scrollbars ------
  *
  *
  *            ScrollFrame
  *                 ^
  *                 |
  *               Frame (scrolled frame you passed in)
  *
  *
  *-----------------------------------
  * LEGEND:
  *
- * ScrollFrame: This is a frame that manages gfx cross platform frame based scrollbars.
+ * ScrollFrame: This is a frame that manages gfx cross platform frame based
+ * scrollbars.
  *
  * @param aContent the content node of the child to wrap.
+ *
  * @param aScrolledFrame The frame of the content to wrap. This should not be
- *                    Initialized. This method will initialize it with a scrolled pseudo
- *                    and no nsIContent. The content will be attached to the scrollframe
- *                    returned.
- * @param aContentStyle the style that has already been resolved for the content
- *                      being passed in.
+ *                       Initialized. This method will initialize it with a
+ *                       scrolled pseudo and no nsIContent. The content will be
+ *                       attached to the scrollframe returned.
+ *
+ * @param aContentStyle  the style that has already been resolved for the content
+ *                       being passed in.
  *
- * @param aParentFrame The parent to attach the scroll frame to
+ * @param aParentFrame   The parent to attach the scroll frame to
  *
- * @param aNewFrame The new scrollframe or gfx scrollframe that we create. It will contain the
- *                  scrolled frame you passed in. (returned)
+ * @param aNewFrame The new scrollframe or gfx scrollframe that we create. It
+ *                  will contain the scrolled frame you passed in. (returned)
  *                  If this is not null, we'll just use it
- * @param aScrolledContentStyle the style that was resolved for the scrolled frame. (returned)
+ *
+ * @param aScrolledContentStyle the style that was resolved for the scrolled
+                                frame. (returned)
  */
 void
 nsCSSFrameConstructor::BuildScrollFrame(nsFrameConstructorState& aState,
                                         nsIContent*              aContent,
                                         ComputedStyle*           aContentStyle,
                                         nsIFrame*                aScrolledFrame,
                                         nsContainerFrame*        aParentFrame,
                                         nsContainerFrame*&       aNewFrame)
--- a/layout/base/nsDocumentViewer.cpp
+++ b/layout/base/nsDocumentViewer.cpp
@@ -3380,18 +3380,19 @@ NS_IMETHODIMP nsDocumentViewer::GetHintC
 
 /* [noscript,notxpcom] Encoding getHintCharset (); */
 NS_IMETHODIMP_(const Encoding *)
 nsDocumentViewer::GetHintCharset()
 {
   if(kCharsetUninitialized == mHintCharsetSource) {
     return nullptr;
   }
-  // this can't possibly be right.  we can't set a value just because somebody got a related value!
-  //mHintCharsetSource = kCharsetUninitialized;
+  // this can't possibly be right.  we can't set a value just because somebody
+  // got a related value!
+  // mHintCharsetSource = kCharsetUninitialized;
   return mHintCharset;
 }
 
 NS_IMETHODIMP nsDocumentViewer::GetHintCharacterSetSource(int32_t *aHintCharacterSetSource)
 {
   NS_ENSURE_ARG_POINTER(aHintCharacterSetSource);
 
   *aHintCharacterSetSource = mHintCharsetSource;
--- a/layout/base/nsIPresShell.h
+++ b/layout/base/nsIPresShell.h
@@ -715,18 +715,19 @@ public:
   };
   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.
+   *                * (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
@@ -743,19 +744,19 @@ public:
    *                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.
+   *                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)
     {}
   } ScrollAxis;
--- a/layout/forms/nsComboboxControlFrame.cpp
+++ b/layout/forms/nsComboboxControlFrame.cpp
@@ -854,17 +854,18 @@ nsComboboxControlFrame::Reflow(nsPresCon
   // 5) Block Size of display area is GetBSizeOfARow() on the
   //    mListControlFrame.
 
   if (!mDisplayFrame || !mButtonFrame || !mDropdownFrame) {
     NS_ERROR("Why did the frame constructor allow this to happen?  Fix it!!");
     return;
   }
 
-  // Make sure the displayed text is the same as the selected option, bug 297389.
+  // Make sure the displayed text is the same as the selected option,
+  // bug 297389.
   if (!mDroppedDown) {
     mDisplayedIndex = mListControlFrame->GetSelectedIndex();
   }
   // In dropped down mode the "selected index" is the hovered menu item,
   // we want the last selected item which is |mDisplayedIndex| in this case.
   RedisplayText();
 
   // First reflow our dropdown so that we know how tall we should be.
--- a/layout/forms/nsComboboxControlFrame.h
+++ b/layout/forms/nsComboboxControlFrame.h
@@ -120,17 +120,18 @@ public:
 
   // nsIFormControlFrame
   virtual nsresult SetFormProperty(nsAtom* aName, const nsAString& aValue) override;
   /**
    * Inform the control that it got (or lost) focus.
    * If it lost focus, the dropdown menu will be rolled up if needed,
    * and FireOnChange() will be called.
    * @param aOn true if got focus, false if lost focus.
-   * @param aRepaint if true then force repaint (NOTE: we always force repaint currently)
+   * @param aRepaint if true then force repaint (NOTE: we always force repaint
+   *        currently)
    * @note This method might destroy |this|.
    */
   MOZ_CAN_RUN_SCRIPT_BOUNDARY
   virtual void SetFocus(bool aOn, bool aRepaint) override;
 
   bool IsDroppedDown() { return mDroppedDown; }
   /**
    * @note This method might destroy |this|.
--- a/layout/generic/nsBulletFrame.cpp
+++ b/layout/generic/nsBulletFrame.cpp
@@ -325,17 +325,17 @@ private:
   // generating proper WebRender commands. When webrender is disabled the Path is lazily created
   // for these items before painting.
   // TODO: The size of this structure doesn't seem to be an issue since it has so many fields
   // that are specific to a bullet style or another, but if it becomes one we can easily
   // store mDest and mPathRect into the same memory location since they are never used by
   // the same bullet types.
   LayoutDeviceRect mPathRect;
 
-  // mColor indicate the color of list-style. Both text and path type would use this memeber.
+  // mColor indicate the color of list-style. Both text and path type would use this member.
   nscolor mColor;
 
   // mPath record the path of the list-style for later drawing.
   // Included following types: square, circle, disc, disclosure open and disclosure closed.
   RefPtr<Path> mPath;
 
   // mText, mFontMertrics, mPoint, mFont and mGlyphs are for other
   // list-style-type which can be drawed by text.
--- a/layout/generic/nsColumnSetFrame.cpp
+++ b/layout/generic/nsColumnSetFrame.cpp
@@ -619,18 +619,19 @@ nsColumnSetFrame::ReflowChildren(ReflowO
 
   if (colBSizeChanged) {
     mLastBalanceBSize = aConfig.mColMaxBSize;
     // XXX Seems like this could fire if incremental reflow pushed the column set
     // down so we reflow incrementally with a different available height.
     // We need a way to do an incremental reflow and be sure availableHeight
     // changes are taken account of! Right now I think block frames with absolute
     // children might exit early.
-    //NS_ASSERTION(aKidReason != eReflowReason_Incremental,
-    //             "incremental reflow should not have changed the balance height");
+    // NS_ASSERTION(aKidReason != eReflowReason_Incremental,
+    //             "incremental reflow should not have changed the
+    //             balance height");
   }
 
   // get our border and padding
   LogicalMargin borderPadding = aReflowInput.ComputedLogicalBorderPadding();
   borderPadding.ApplySkipSides(GetLogicalSkipSides(&aReflowInput));
 
   nsRect contentRect(0, 0, 0, 0);
   nsOverflowAreas overflowRects;
--- a/layout/generic/nsFlexContainerFrame.cpp
+++ b/layout/generic/nsFlexContainerFrame.cpp
@@ -1635,17 +1635,18 @@ static bool
 ResolveAutoFlexBasisFromRatio(FlexItem& aFlexItem,
                               const ReflowInput& aItemReflowInput,
                               const FlexboxAxisTracker& aAxisTracker)
 {
   MOZ_ASSERT(NS_AUTOHEIGHT == aFlexItem.GetFlexBaseSize(),
              "Should only be called to resolve an 'auto' flex-basis");
   // If the flex item has ...
   //  - an intrinsic aspect ratio,
-  //  - a [used] flex-basis of 'main-size' [auto?] [We have this, if we're here.]
+  //  - a [used] flex-basis of 'main-size' [auto?]
+  //    [We have this, if we're here.]
   //  - a definite cross size
   // then the flex base size is calculated from its inner cross size and the
   // flex item’s intrinsic aspect ratio.
   if (aAxisTracker.GetCrossComponent(aFlexItem.IntrinsicRatio()) != 0) {
     // We have a usable aspect ratio. (not going to divide by 0)
     const bool useMinSizeIfCrossSizeIsIndefinite = false;
     nscoord crossSizeToUseWithRatio =
       CrossSizeToUseWithRatio(aFlexItem, aItemReflowInput,
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -8608,22 +8608,22 @@ nsIFrame::PeekOffset(nsPeekOffsetStruct*
         // This pref only affects whether moving forward by word should go to the end of this word or start of the next word.
         // When going backwards, the start of the word is always used, on every operating system.
         wordSelectEatSpace = aPos->mDirection == eDirNext &&
           Preferences::GetBool("layout.word_select.eat_space_to_next_word");
       }
 
       // mSawBeforeType means "we already saw characters of the type
       // before the boundary we're looking for". Examples:
-      // 1. If we're moving forward, looking for a word beginning (i.e. a boundary
-      //    between whitespace and non-whitespace), then eatingWS==true means
-      //    "we already saw some whitespace".
-      // 2. If we're moving backward, looking for a word beginning (i.e. a boundary
-      //    between non-whitespace and whitespace), then eatingWS==true means
-      //    "we already saw some non-whitespace".
+      // 1. If we're moving forward, looking for a word beginning (i.e. a
+      //    boundary between whitespace and non-whitespace), then
+      //    eatingWS==true means "we already saw some whitespace".
+      // 2. If we're moving backward, looking for a word beginning (i.e. a
+      //    boundary between non-whitespace and whitespace), then
+      //     eatingWS==true means "we already saw some non-whitespace".
       PeekWordState state;
       int32_t offsetAdjustment = 0;
       bool done = false;
       while (!done) {
         bool movingInFrameDirection =
           IsMovingInFrameDirection(current, aPos->mDirection, aPos->mVisual);
 
         done = current->PeekOffsetWord(movingInFrameDirection, wordSelectEatSpace,
--- a/layout/generic/nsFrameSelection.h
+++ b/layout/generic/nsFrameSelection.h
@@ -225,63 +225,79 @@ public:
 
   /*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 callbacks etc
+   *  @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 caret.
+   *  @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 anchor.
+   *  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 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 old anchor point 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 actually show the caret on.
+   *  @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 old anchor point 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
+   *               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 contains the point.
-   *  @param aFrame is the parent of all frames to use when searching for the closest frame to the point.
+   *  @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
+   *                closest frame to the point.
    *  @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 clicked or dragged the mouse in
+   *  @param aParentContent is the parent 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 and what keys are pressed
+   *    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);
 
   /**
@@ -351,17 +367,18 @@ public:
                                 const nsPoint& aPoint,
                                 uint32_t aDelay);
 
   /** StopAutoScrollTimer stops any active auto scroll timer.
    */
   void StopAutoScrollTimer();
 
   /** Lookup Selection
-   *  returns in frame coordinates the selection beginning and ending with the type of selection given
+   *  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,
@@ -514,32 +531,35 @@ public:
   /** 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) to the
-   *  next word boundary, so that the selected word can be deleted.
+  /** 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 implementations.
+  /** 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 implementations.
+  /** 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 implementations.
--- a/layout/generic/nsFrameSetFrame.cpp
+++ b/layout/generic/nsFrameSetFrame.cpp
@@ -800,17 +800,18 @@ nsHTMLFramesetFrame::Reflow(nsPresContex
   DISPLAY_REFLOW(aPresContext, this, aReflowInput, aDesiredSize, aStatus);
   MOZ_ASSERT(aStatus.IsEmpty(), "Caller should pass a fresh reflow status!");
 
   nsIPresShell *shell = aPresContext->PresShell();
   ServoStyleSet* styleSet = shell->StyleSet();
 
   GetParent()->AddStateBits(NS_FRAME_CONTAINS_RELATIVE_BSIZE);
 
-  //printf("FramesetFrame2::Reflow %X (%d,%d) \n", this, aReflowInput.AvailableWidth(), aReflowInput.AvailableHeight());
+  // printf("FramesetFrame2::Reflow %X (%d,%d) \n", this,
+  // aReflowInput.AvailableWidth(), aReflowInput.AvailableHeight());
   // Always get the size so that the caller knows how big we are
   GetDesiredSize(aPresContext, aReflowInput, aDesiredSize);
 
   nscoord width  = (aDesiredSize.Width() <= aReflowInput.AvailableWidth())
     ? aDesiredSize.Width() : aReflowInput.AvailableWidth();
   nscoord height = (aDesiredSize.Height() <= aReflowInput.AvailableHeight())
     ? aDesiredSize.Height() : aReflowInput.AvailableHeight();
 
--- a/layout/generic/nsIFrame.h
+++ b/layout/generic/nsIFrame.h
@@ -48,28 +48,29 @@
 #include "nsDisplayItemTypes.h"
 
 #ifdef ACCESSIBILITY
 #include "mozilla/a11y/AccTypes.h"
 #endif
 
 /**
  * New rules of reflow:
- * 1. you get a WillReflow() followed by a Reflow() followed by a DidReflow() in order
- *    (no separate pass over the tree)
- * 2. it's the parent frame's responsibility to size/position the child's view (not
- *    the child frame's responsibility as it is today) during reflow (and before
- *    sending the DidReflow() notification)
- * 3. positioning of child frames (and their views) is done on the way down the tree,
- *    and sizing of child frames (and their views) on the way back up
- * 4. if you move a frame (outside of the reflow process, or after reflowing it),
- *    then you must make sure that its view (or its child frame's views) are re-positioned
- *    as well. It's reasonable to not position the view until after all reflowing the
- *    entire line, for example, but the frame should still be positioned and sized (and
- *    the view sized) during the reflow (i.e., before sending the DidReflow() notification)
+ * 1. you get a WillReflow() followed by a Reflow() followed by a DidReflow() in
+ *    order (no separate pass over the tree)
+ * 2. it's the parent frame's responsibility to size/position the child's view
+ *    (not the child frame's responsibility as it is today) during reflow (and
+ *    before sending the DidReflow() notification)
+ * 3. positioning of child frames (and their views) is done on the way down the
+ *    tree, and sizing of child frames (and their views) on the way back up
+ * 4. if you move a frame (outside of the reflow process, or after reflowing
+ *    it), then you must make sure that its view (or its child frame's views)
+ *    are re-positioned as well. It's reasonable to not position the view until
+ *    after all reflowing the entire line, for example, but the frame should
+ *    still be positioned and sized (and the view sized) during the reflow
+ *    (i.e., before sending the DidReflow() notification)
  * 5. the view system handles moving of widgets, i.e., it's not our problem
  */
 
 class nsAtom;
 class nsPresContext;
 class nsIPresShell;
 class nsView;
 class nsIWidget;
@@ -3271,40 +3272,48 @@ public:
    *  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 logical (false)
+   *  @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 boundary
+   *  @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 the output 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 on different lines
-   *  @param aOutMovedOverNonSelectableText [out] whether we jumped over a non-selectable
+   *  @param aOutJumpedLine [out] whether this frame and the returned frame
+                                  are on different lines
+   *  @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.
+   *  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 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 to do
    *  @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
@@ -4343,17 +4352,18 @@ 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).
+   *         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.
    */
   virtual FrameSearchResult PeekOffsetNoAmount(bool aForward, int32_t* aOffset) = 0;
 
   /**
@@ -4426,18 +4436,18 @@ protected:
       mAtStart = false;
     }
   };
   virtual FrameSearchResult PeekOffsetWord(bool aForward, bool aWordSelectEatSpace, bool aIsKeyboardSelect,
                                 int32_t* aOffset, PeekWordState* aState) = 0;
 
   /**
    * Search for the first paragraph boundary before or after the given position
-   * @param  aPos See description in nsFrameSelection.h. The following fields are
-   *              used by this method:
+   * @param  aPos See description in nsFrameSelection.h. The following fields
+   *              are used by this method:
    *              Input: mDirection
    *              Output: mResultContent, mContentOffset
    */
   nsresult PeekOffsetParagraph(nsPeekOffsetStruct *aPos);
 
 private:
   // Get a pointer to the overflow areas property attached to the frame.
   nsOverflowAreas* GetOverflowAreasProperty() const {
--- a/layout/generic/nsLineLayout.cpp
+++ b/layout/generic/nsLineLayout.cpp
@@ -2288,19 +2288,19 @@ nsLineLayout::VerticalAlignFrames(PerSpa
     // Update minBCoord/maxBCoord for frames that we just placed. Do not factor
     // text into the equation.
     if (pfd->mBlockDirAlign == VALIGN_OTHER) {
       // Text frames do not contribute to the min/max Y values for the
       // line (instead their parent frame's font-size contributes).
       // XXXrbs -- relax this restriction because it causes text frames
       //           to jam together when 'font-size-adjust' is enabled
       //           and layout is using dynamic font heights (bug 20394)
-      //        -- Note #1: With this code enabled and with the fact that we are not
-      //           using Em[Ascent|Descent] as nsDimensions for text metrics in
-      //           GFX mean that the discussion in bug 13072 cannot hold.
+      //        -- Note #1: With this code enabled and with the fact that we are
+      //           not using Em[Ascent|Descent] as nsDimensions for text
+      //           metrics in GFX mean that the discussion in bug 13072 cannot hold.
       //        -- Note #2: We still don't want empty-text frames to interfere.
       //           For example in quirks mode, avoiding empty text frames prevents
       //           "tall" lines around elements like <hr> since the rules of <hr>
       //           in quirks.css have pseudo text contents with LF in them.
       bool canUpdate;
       if (pfd->mIsTextFrame) {
         // Only consider text frames if they're not empty and
         // line-height=normal.
--- a/layout/mathml/nsIMathMLFrame.h
+++ b/layout/mathml/nsIMathMLFrame.h
@@ -122,27 +122,30 @@ public:
    *
    * 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.
+   *      your InheritAutomaticData() -- this way, they can safely query them
+   *      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().
-   *    - transmit properties that your descendants expect that you will transmit to
-   *      them in your TransmitAutomaticData() -- this way, they remain up-to-date.
+   * 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().
+   *    - transmit properties that your descendants expect that you will
+   *      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.
+   *      TransmitAutomaticData() -- this way, they can safely query them and
+   *      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
@@ -394,18 +394,20 @@ private:
 
 
 // --------------------------------------------------------------------------
 // Currently, to benefit from line-breaking inside the <math> element, <math> is
 // simply mapping to nsBlockFrame or nsInlineFrame.
 // A separate implemention needs to provide:
 // 1) line-breaking
 // 2) proper inter-frame spacing
-// 3) firing of Stretch() (in which case FinalizeReflow() would have to be cleaned)
-// Issues: If/when mathml becomes a pluggable component, the separation will be needed.
+// 3) firing of Stretch() (in which case FinalizeReflow() would have to be
+//    cleaned)
+// Issues: If/when mathml becomes a pluggable component, the separation will be
+// needed.
 class nsMathMLmathBlockFrame final : public nsBlockFrame
 {
 public:
   NS_DECL_QUERYFRAME
   NS_DECL_FRAMEARENA_HELPERS(nsMathMLmathBlockFrame)
 
   friend nsContainerFrame* NS_NewMathMLmathBlockFrame(nsIPresShell* aPresShell,
           ComputedStyle* aStyle);
--- a/layout/mathml/nsMathMLmpaddedFrame.cpp
+++ b/layout/mathml/nsMathMLmpaddedFrame.cpp
@@ -50,25 +50,27 @@ nsMathMLmpaddedFrame::InheritAutomaticDa
   mPresentationData.flags |= NS_MATHML_STRETCH_ALL_CHILDREN_VERTICALLY;
 
   return NS_OK;
 }
 
 void
 nsMathMLmpaddedFrame::ProcessAttributes()
 {
+  // clang-format off
   /*
   parse the attributes
 
   width  = [+|-] unsigned-number (% [pseudo-unit] | pseudo-unit | h-unit | namedspace)
   height = [+|-] unsigned-number (% [pseudo-unit] | pseudo-unit | v-unit | namedspace)
   depth  = [+|-] unsigned-number (% [pseudo-unit] | pseudo-unit | v-unit | namedspace)
   lspace = [+|-] unsigned-number (% [pseudo-unit] | pseudo-unit | h-unit | namedspace)
   voffset= [+|-] unsigned-number (% [pseudo-unit] | pseudo-unit | v-unit | namedspace)
   */
+  // clang-format on
 
   nsAutoString value;
 
   // width
   mWidthSign = NS_MATHML_SIGN_INVALID;
   mContent->AsElement()->GetAttr(kNameSpaceID_None, nsGkAtoms::width, value);
   if (!value.IsEmpty()) {
     if (!ParseAttribute(value, mWidthSign, mWidth, mWidthPseudoUnit)) {
--- a/layout/mathml/nsMathMLmunderoverFrame.cpp
+++ b/layout/mathml/nsMathMLmunderoverFrame.cpp
@@ -10,17 +10,18 @@
 #include "nsMathMLElement.h"
 #include <algorithm>
 #include "gfxContext.h"
 #include "gfxMathTable.h"
 
 using namespace mozilla;
 
 //
-// <munderover> -- attach an underscript-overscript pair to a base - implementation
+// <munderover> -- attach an underscript-overscript pair to a base
+//                 implementation
 // <mover> -- attach an overscript to a base - implementation
 // <munder> -- attach an underscript to a base - implementation
 //
 
 nsIFrame*
 NS_NewMathMLmunderoverFrame(nsIPresShell* aPresShell, ComputedStyle* aStyle)
 {
   return new (aPresShell) nsMathMLmunderoverFrame(aStyle);
--- a/layout/style/StyleSheet.cpp
+++ b/layout/style/StyleSheet.cpp
@@ -981,19 +981,21 @@ StyleSheet::CreateEmptyChildSheet(
   child->mMedia = aMediaList;
   return child.forget();
 }
 
 // We disable parallel stylesheet parsing if any of the following three
 // conditions hold:
 //
 // (1) The pref is off.
-// (2) The browser is recording CSS errors (which parallel parsing can't handle).
-// (3) The stylesheet is a chrome stylesheet, since those can use -moz-bool-pref,
-//     which needs to access the pref service, which is not threadsafe.
+// (2) The browser is recording CSS errors (which parallel parsing can't
+//     handle).
+// (3) The stylesheet is a chrome stylesheet, since those can use
+//     -moz-bool-pref, which needs to access the pref service, which is
+//     not threadsafe.
 static bool
 AllowParallelParse(css::Loader* aLoader, nsIURI* aSheetURI)
 {
   // Check the pref.
   if (!StaticPrefs::layout_css_parsing_parallel()) {
     return false;
   }
 
--- a/layout/style/nsCSSProps.h
+++ b/layout/style/nsCSSProps.h
@@ -312,28 +312,29 @@ public:
   static const KTableEntry kBorderStyleKTable[];
   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 --
+  // -- 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 kAlignNormalBaseline[]; // 'normal/baseline'
   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[];
   // ------------------------------------------------------------------
   static const KTableEntry kFontSmoothingKTable[];
   static const KTableEntry kGridAutoFlowKTable[];
   static const KTableEntry kGridTrackBreadthKTable[];
   static const KTableEntry kLineHeightKTable[];
--- a/layout/svg/SVGTextFrame.cpp
+++ b/layout/svg/SVGTextFrame.cpp
@@ -529,17 +529,18 @@ struct TextRenderedRun
    * The difference between this method and GetTransformFromRunUserSpaceToUserSpace
    * is that when calling in to nsTextFrame::PaintText, it will already take
    * into account any left clip edge (that is, it doesn't just apply a visual
    * clip to the rendered text, it shifts the glyphs over so that they are
    * painted with their left edge at the x coordinate passed in to it).
    * Thus we need to account for this in our transform.
    *
    *
-   * Assume that we have <text x="100" y="100" rotate="0 0 1 0 0 1">abcdef</text>.
+   * Assume that we have
+   * <text x="100" y="100" rotate="0 0 1 0 0 1">abcdef</text>.
    * This would result in four text rendered runs:
    *
    *   - one for "ab"
    *   - one for "c"
    *   - one for "de"
    *   - one for "f"
    *
    * Assume now that we are painting the third TextRenderedRun.  It will have
--- a/layout/tables/celldata.h
+++ b/layout/tables/celldata.h
@@ -57,48 +57,52 @@ public:
     */
   bool IsZeroRowSpan() const;
 
   /** mark the current entry as spanned by a zero rowspan
     * @param aIsZero    if true mark the entry as covered by a zero rowspan
     */
   void SetZeroRowSpan(bool aIsZero);
 
-  /** get the distance from the current entry to the corresponding origin of the rowspan
-    * @return    containing the distance in the column to the originating cell
-    */
+  /** get the distance from the current entry to the corresponding origin of the
+   * rowspan
+   * @return    containing the distance in the column to the originating cell
+   */
   uint32_t GetRowSpanOffset() const;
 
-  /** set the distance from the current entry to the corresponding origin of the rowspan
-    * @param    the distance in the column to the originating cell
-    */
+  /** set the distance from the current entry to the corresponding origin of
+   * the rowspan
+   * @param    the distance in the column to the originating cell
+   */
   void SetRowSpanOffset(uint32_t aSpan);
 
   /** is the entry spanned by colspan
     * @return    is true if the entry is spanned by a colspan
     */
   bool IsColSpan() const;
 
-  /** get the distance from the current entry to the corresponding origin of the colspan
-    * @return    containing the distance in the row to the originating cell
-    */
+  /** get the distance from the current entry to the corresponding origin of
+   *  the colspan
+   * @return    containing the distance in the row to the originating cell
+   */
   uint32_t GetColSpanOffset() const;
 
   /** set the distance from the current entry to the corresponding origin of the colspan
     * @param    the distance in the column to the originating cell
     */
   void SetColSpanOffset(uint32_t aSpan);
 
   /** is the entry spanned by a row- and a colspan
     * @return    is true if the entry is spanned by a row- and a colspan
     */
   bool IsOverlap() const;
 
   /** mark the current entry as spanned by a row- and a colspan
-    * @param aOverlap    if true mark the entry as covered by a row- and a colspan
+    * @param aOverlap    if true mark the entry as covered by a row- and
+    *                    a colspan
     */
   void SetOverlap(bool aOverlap);
 
   /** get the table cell frame for this entry
     * @return    a pointer to the cellframe, this will be nullptr when the entry
     *            is only a spanned entry
     */
   nsTableCellFrame* GetCellFrame() const;
--- a/layout/tables/nsCellMap.h
+++ b/layout/tables/nsCellMap.h
@@ -318,23 +318,24 @@ public:
   void GetRowAndColumnByIndex(int32_t aColCount, int32_t aIndex,
                               int32_t *aRow, int32_t *aColumn) const;
 
   /** append the cellFrame at an empty or dead cell or finally at the end of
     * the row at aRowIndex and return a pointer to the celldata entry in the
     * cellmap
     *
     * @param aMap               - reference to the table cell map
-    * @param aCellFrame         - a pointer to the cellframe which will be appended
-    *                             to the row
+    * @param aCellFrame         - a pointer to the cellframe which will be
+    *                             appended to the row
     * @param aRowIndex          - to this row the celldata entry will be added
     * @param aRebuildIfNecessay - if a cell spans into a row below it might be
-    *                             necesserary to rebuild the cellmap as this rowspan
-    *                             might overlap another cell.
-    * @param aDamageArea        - area in cellmap coordinates which have been updated.
+    *                             necesserary to rebuild the cellmap as this
+    *                             rowspan might overlap another cell.
+    * @param aDamageArea        - area in cellmap coordinates which have been
+    *                             updated.
     * @param aColToBeginSearch  - if not null contains the column number where
     *                             the search for a empty or dead cell in the
     *                             row should start
     * @return                   - a pointer to the celldata entry inserted into
     *                             the cellmap
     */
   CellData* AppendCell(nsTableCellMap&   aMap,
                        nsTableCellFrame* aCellFrame,
--- a/layout/tables/nsTableFrame.cpp
+++ b/layout/tables/nsTableFrame.cpp
@@ -4332,18 +4332,18 @@ nsTableFrame::ColumnHasCellSpacingBefore
 /********************************************************************************
  * Collapsing Borders
  *
  *  The CSS spec says to resolve border conflicts in this order:
  *  1) any border with the style HIDDEN wins
  *  2) the widest border with a style that is not NONE wins
  *  3) the border styles are ranked in this order, highest to lowest precedence:
  *     double, solid, dashed, dotted, ridge, outset, groove, inset
- *  4) borders that are of equal width and style (differ only in color) have this precedence:
- *     cell, row, rowgroup, col, colgroup, table
+ *  4) borders that are of equal width and style (differ only in color) have
+ *     this precedence: cell, row, rowgroup, col, colgroup, table
  *  5) if all border styles are NONE, then that's the computed border style.
  *******************************************************************************/
 
 #ifdef DEBUG
 #define VerifyNonNegativeDamageRect(r)                                  \
   NS_ASSERTION((r).StartCol() >= 0, "negative col index");              \
   NS_ASSERTION((r).StartRow() >= 0, "negative row index");              \
   NS_ASSERTION((r).ColCount() >= 0, "negative cols damage");            \
--- a/layout/tables/nsTableRowFrame.h
+++ b/layout/tables/nsTableRowFrame.h
@@ -80,23 +80,24 @@ public:
   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.
+    * Cells with rowspan=1 are all set to the same height and stacked
+    * horizontally.
     * <P> Cells are not split unless absolutely necessary.
     * <P> 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.
+    * @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
     * @see nsTableFrame::ShrinkWrapChildren
     */
   virtual void Reflow(nsPresContext*           aPresContext,
                       ReflowOutput&     aDesiredSize,
                       const ReflowInput& aReflowInput,
@@ -295,17 +296,18 @@ private:
   nscoord mContentBSize;
   // the bsize based on a style percentage bsize on either the row or any cell
   // if mHasPctBSize is set
   nscoord mStylePctBSize;
   // the bsize based on a style pixel bsize on the row or any
   // cell if mHasFixedBSize is set
   nscoord mStyleFixedBSize;
 
-  // max-ascent and max-descent amongst all cells that have 'vertical-align: baseline'
+  // max-ascent and max-descent amongst all cells that have
+  // 'vertical-align: baseline'
   nscoord mMaxCellAscent;  // does include cells with rowspan > 1
   nscoord mMaxCellDescent; // does *not* include cells with rowspan > 1
 
   // border widths in pixels in the collapsing border model of the *inner*
   // half of the border only
   BCPixelSize mBStartBorderWidth;
   BCPixelSize mBEndBorderWidth;
   BCPixelSize mIEndContBorderWidth;
--- a/layout/tables/nsTableRowGroupFrame.h
+++ b/layout/tables/nsTableRowGroupFrame.h
@@ -229,17 +229,18 @@ public:
     * @return               row index relative to the row group if this a row
     *                       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 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
     */
@@ -295,20 +296,20 @@ public:
       mFrames.Compact();
     }
   };
 
   // Clear out row cursor because we're disturbing the rows (e.g., Reflow)
   void ClearRowCursor();
 
   /**
-   * Get the first row that might contain y-coord 'aY', or nullptr if you must search
-   * all rows.
-   * The actual row returned might not contain 'aY', but if not, it is guaranteed
-   * to be before any row which does contain 'aY'.
+   * Get the first row that might contain y-coord 'aY', or nullptr if you must
+   * search all rows.
+   * The actual row returned might not contain 'aY', but if not, it is
+   * guaranteed to be before any row which does contain 'aY'.
    * aOverflowAbove is the maximum over all rows of -row.GetOverflowRect().y.
    * To find all rows that intersect the vertical interval aY/aYMost, call
    * GetFirstRowContaining(aY, &overflowAbove), and then iterate through all
    * rows until reaching a row where row->GetRect().y - overflowAbove >= aYMost.
    * That row and all subsequent rows cannot intersect the interval.
    */
   nsIFrame* GetFirstRowContaining(nscoord aY, nscoord* aOverflowAbove);
 
--- a/layout/xul/BoxObject.cpp
+++ b/layout/xul/BoxObject.cpp
@@ -16,17 +16,17 @@
 #include "nsView.h"
 #include "nsLayoutUtils.h"
 #include "nsISupportsPrimitives.h"
 #include "nsSupportsPrimitives.h"
 #include "mozilla/dom/Element.h"
 #include "nsComponentManagerUtils.h"
 #include "mozilla/dom/BoxObjectBinding.h"
 
-// Implementation /////////////////////////////////////////////////////////////////
+// Implementation /////////////////////////////////////////////////////////////
 
 namespace mozilla {
 namespace dom {
 
 // Static member variable initialization
 
 // Implement our nsISupports methods
 NS_IMPL_CYCLE_COLLECTION_CLASS(BoxObject)
@@ -69,17 +69,17 @@ BoxObject::~BoxObject()
 NS_IMETHODIMP
 BoxObject::GetElement(Element** aResult)
 {
   RefPtr<Element> element = mContent;
   element.forget(aResult);
   return NS_OK;
 }
 
-// nsPIBoxObject //////////////////////////////////////////////////////////////////////////
+// nsPIBoxObject //////////////////////////////////////////////////////////////
 
 nsresult
 BoxObject::Init(Element* aElement)
 {
   mContent = aElement;
   return NS_OK;
 }
 
--- a/layout/xul/grid/nsGrid.cpp
+++ b/layout/xul/grid/nsGrid.cpp
@@ -1048,17 +1048,18 @@ nsGrid::GetRowFlex(int32_t aIndex, bool 
 
   if (box) {
 
     // We need our flex but a inflexible row could be around us. If so
     // neither are we. However if its the row tag just inside the grid it won't
     // affect us. We need to do this for this case:
     // <grid>
     //   <rows>
-    //     <rows> // this is not flexible. So our children should not be flexible
+    //     <rows> // this is not flexible.
+    //            // So our children should not be flexible
     //        <row flex="1"/>
     //        <row flex="1"/>
     //     </rows>
     //        <row/>
     //   </rows>
     // </grid>
     //
     // or..
--- a/layout/xul/nsScrollbarFrame.cpp
+++ b/layout/xul/nsScrollbarFrame.cpp
@@ -305,25 +305,26 @@ nsScrollbarFrame::MoveToNewPosition()
   }
   content->UnsetAttr(kNameSpaceID_None, nsGkAtoms::smooth, false);
   return curpos;
 }
 
 nsresult
 nsScrollbarFrame::CreateAnonymousContent(nsTArray<ContentInfo>& aElements)
 {
+  // clang-format off
   // <xul:scrollbarbutton sbattr="scrollbar-up-top" type="decrement" xbl:inherits="curpos,maxpos,disabled"/>
   // <xul:scrollbarbutton sbattr="scrollbar-down-top" type="increment" xbl:inherits="curpos,maxpos,disabled"/>
   // <xul:slider flex="1" xbl:inherits="disabled,curpos,maxpos,pageincrement,increment,orient">
   //   <xul:thumb sbattr="scrollbar-thumb" xbl:inherits="orient,collapsed=disabled"
   //              align="center" pack="center"/>
   // </xul:slider>
   // <xul:scrollbarbutton sbattr="scrollbar-up-bottom" type="decrement" xbl:inherits="curpos,maxpos,disabled"/>
   // <xul:scrollbarbutton sbattr="scrollbar-down-bottom" type="increment" xbl:inherits="curpos,maxpos,disabled"/>
-
+  // clang-format on
   nsNodeInfoManager* nodeInfoManager = mContent->NodeInfo()->NodeInfoManager();
 
   Element* el(GetContent()->AsElement());
 
   // If there are children already in the node, don't create any anonymous content
   // (this only apply to crashtests/369038-1.xhtml)
   if (el->HasChildren()) {
     return NS_OK;