Bug 1574310: clang-reformat the layout directory. (no review, just doing automated reformatting)
authorDaniel Holbert <dholbert@cs.stanford.edu>
Thu, 15 Aug 2019 22:13:49 +0000
changeset 488364 02d1367829fc0b4737ac7ea7ce2c76b608ff3199
parent 488363 9bee211ea1fa598a01d70db6c6535bfd96302227
child 488365 0bbcb428a2f93f6192bee689ee877db4ca2c34d0
push id113906
push userncsoregi@mozilla.com
push dateFri, 16 Aug 2019 04:07:24 +0000
treeherdermozilla-inbound@d887276421d3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1574310
milestone70.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 1574310: clang-reformat the layout directory. (no review, just doing automated reformatting) This patch is auto-generated by the following command: ./mach clang-format -p layout/ Differential Revision: https://phabricator.services.mozilla.com/D42218
layout/base/RestyleManager.cpp
layout/base/nsCSSFrameConstructor.cpp
layout/base/nsCounterManager.cpp
layout/generic/nsBlockFrame.cpp
layout/generic/nsFrame.cpp
layout/painting/nsCSSRendering.cpp
layout/painting/nsCSSRendering.h
layout/style/Loader.cpp
layout/style/nsComputedDOMStyle.cpp
layout/style/nsStyleConsts.h
layout/style/nsStyleStruct.h
--- a/layout/base/RestyleManager.cpp
+++ b/layout/base/RestyleManager.cpp
@@ -2713,18 +2713,17 @@ bool RestyleManager::ProcessPostTraversa
         maybeAnonBoxChild->ParentIsWrapperAnonBox()) {
       aRestyleState.AddPendingWrapperRestyle(
           ServoRestyleState::TableAwareParentFor(maybeAnonBoxChild));
     }
 
     // If we don't have a ::marker pseudo-element, but need it, then
     // reconstruct the frame.  (The opposite situation implies 'display'
     // changes so doesn't need to be handled explicitly here.)
-    if (wasRestyled &&
-        styleFrame->StyleDisplay()->IsListItem() &&
+    if (wasRestyled && styleFrame->StyleDisplay()->IsListItem() &&
         styleFrame->IsBlockFrameOrSubclass() &&
         !nsLayoutUtils::GetMarkerPseudo(aElement)) {
       RefPtr<ComputedStyle> pseudoStyle =
           aRestyleState.StyleSet().ProbePseudoElementStyle(
               *aElement, PseudoStyleType::marker, upToDateStyleIfRestyled);
       if (pseudoStyle) {
         changeHint |= nsChangeHint_ReconstructFrame;
       }
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -2357,19 +2357,18 @@ nsIFrame* nsCSSFrameConstructor::Constru
     // FrameConstructionData/Item, then we'd need the right function
     // here... but would probably be able to get away with less code in this
     // function in general.
     // Use a null PendingBinding, since our binding is not in fact pending.
     static const FrameConstructionData rootSVGData = FCDATA_DECL(0, nullptr);
     AutoFrameConstructionItem item(this, &rootSVGData, aDocElement, nullptr,
                                    do_AddRef(computedStyle), true);
 
-    contentFrame = static_cast<nsContainerFrame*>(
-        ConstructOuterSVG(state, item, mDocElementContainingBlock,
-                          display, frameList));
+    contentFrame = static_cast<nsContainerFrame*>(ConstructOuterSVG(
+        state, item, mDocElementContainingBlock, display, frameList));
   } else if (display->mDisplay == StyleDisplay::Flex ||
              display->mDisplay == StyleDisplay::WebkitBox ||
              display->mDisplay == StyleDisplay::Grid ||
              (StaticPrefs::layout_css_emulate_moz_box_with_flex() &&
               display->mDisplay == StyleDisplay::MozBox)) {
     auto func = display->mDisplay == StyleDisplay::Grid
                     ? NS_NewGridContainerFrame
                     : NS_NewFlexContainerFrame;
@@ -2393,28 +2392,27 @@ nsIFrame* nsCSSFrameConstructor::Constru
     // here... but would probably be able to get away with less code in this
     // function in general.
     // Use a null PendingBinding, since our binding is not in fact pending.
     static const FrameConstructionData rootTableData = FCDATA_DECL(0, nullptr);
     AutoFrameConstructionItem item(this, &rootTableData, aDocElement, nullptr,
                                    do_AddRef(computedStyle), true);
 
     // if the document is a table then just populate it.
-    contentFrame = static_cast<nsContainerFrame*>(
-        ConstructTable(state, item, mDocElementContainingBlock,
-                       display, frameList));
+    contentFrame = static_cast<nsContainerFrame*>(ConstructTable(
+        state, item, mDocElementContainingBlock, display, frameList));
   } else if (display->DisplayInside() == StyleDisplayInside::Ruby) {
     static const FrameConstructionData data =
         FULL_CTOR_FCDATA(0, &nsCSSFrameConstructor::ConstructBlockRubyFrame);
     AutoFrameConstructionItem item(this, &data, aDocElement, nullptr,
                                    do_AddRef(computedStyle), true);
-    contentFrame = static_cast<nsContainerFrame*>(
-        ConstructBlockRubyFrame(state, item,
-            state.GetGeometricParent(*display, mDocElementContainingBlock),
-            display, frameList));
+    contentFrame = static_cast<nsContainerFrame*>(ConstructBlockRubyFrame(
+        state, item,
+        state.GetGeometricParent(*display, mDocElementContainingBlock), display,
+        frameList));
   } else {
     MOZ_ASSERT(display->mDisplay == StyleDisplay::Block ||
                    display->mDisplay == StyleDisplay::FlowRoot,
                "Unhandled display type for root element");
     contentFrame = NS_NewBlockFormattingContext(mPresShell, computedStyle);
     // Use a null PendingBinding, since our binding is not in fact pending.
     ConstructBlock(
         state, aDocElement,
@@ -3200,18 +3198,18 @@ nsIFrame* nsCSSFrameConstructor::Constru
   aState.AddChild(newFrame, aFrameList, content, aParentFrame);
 
   if (!mRootElementFrame) {
     // The frame we're constructing will be the root element frame.
     SetRootElementFrameAndConstructCanvasAnonContent(newFrame, aState,
                                                      aFrameList);
   }
   nsFrameList childList;
-  ProcessChildren(aState, content, rubyStyle, rubyFrame, true, childList,
-                  false, nullptr);
+  ProcessChildren(aState, content, rubyStyle, rubyFrame, true, childList, false,
+                  nullptr);
   rubyFrame->SetInitialChildList(kPrincipalList, childList);
 
   return newFrame;
 }
 
 static nsIFrame* FindAncestorWithGeneratedContentPseudo(nsIFrame* aFrame) {
   for (nsIFrame* f = aFrame->GetParent(); f; f = f->GetParent()) {
     NS_ASSERTION(f->IsGeneratedContentFrame(),
@@ -4367,240 +4365,236 @@ nsCSSFrameConstructor::FindDisplayData(c
                      !mPresShell->GetPresContext()->IsPaginated(),
                  "Shouldn't propagate scroll in paginated contexts");
     }
   }
 
   switch (aDisplay.DisplayInside()) {
     case StyleDisplayInside::Block:
     case StyleDisplayInside::FlowRoot: {
-      // If the frame is a block-level frame and is scrollable, then wrap it in a
-      // scroll frame.  Except we don't want to do that for paginated contexts for
-      // frames that are block-outside and aren't frames for native anonymous
-      // stuff.
+      // If the frame is a block-level frame and is scrollable, then wrap it in
+      // a scroll frame.  Except we don't want to do that for paginated contexts
+      // for frames that are block-outside and aren't frames for native
+      // anonymous stuff.
       // XXX Ignore tables for the time being (except caption)
       const uint32_t kCaptionCtorFlags =
           FCDATA_IS_TABLE_PART | FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeTable);
       bool caption = aDisplay.mDisplay == StyleDisplay::TableCaption;
       bool suppressScrollFrame = false;
       bool needScrollFrame =
           aDisplay.IsScrollableOverflow() && !propagatedScrollToViewport;
       if (needScrollFrame) {
         suppressScrollFrame = mPresShell->GetPresContext()->IsPaginated() &&
                               aDisplay.IsBlockOutsideStyle() &&
                               !aElement.IsInNativeAnonymousSubtree();
         if (!suppressScrollFrame) {
           static const FrameConstructionData sScrollableBlockData[2] = {
-              FULL_CTOR_FCDATA(0,
-                               &nsCSSFrameConstructor::ConstructScrollableBlock),
-              FULL_CTOR_FCDATA(kCaptionCtorFlags,
-                               &nsCSSFrameConstructor::ConstructScrollableBlock)};
+              FULL_CTOR_FCDATA(
+                  0, &nsCSSFrameConstructor::ConstructScrollableBlock),
+              FULL_CTOR_FCDATA(
+                  kCaptionCtorFlags,
+                  &nsCSSFrameConstructor::ConstructScrollableBlock)};
           return &sScrollableBlockData[caption];
         }
 
         // If the scrollable frame would have propagated its scrolling to the
         // viewport, we still want to construct a regular block rather than a
         // scrollframe so that it paginates correctly, but we don't want to set
         // the bit on the block that tells it to clip at paint time.
         if (mPresShell->GetPresContext()->ElementWouldPropagateScrollStyles(
                 aElement)) {
           suppressScrollFrame = false;
         }
       }
 
       // Handle various non-scrollable blocks.
       static const FrameConstructionData sNonScrollableBlockData[2][2] = {
-          {FULL_CTOR_FCDATA(0,
-                            &nsCSSFrameConstructor::ConstructNonScrollableBlock),
-           FULL_CTOR_FCDATA(kCaptionCtorFlags,
-                            &nsCSSFrameConstructor::ConstructNonScrollableBlock)},
-          {FULL_CTOR_FCDATA(FCDATA_FORCED_NON_SCROLLABLE_BLOCK,
-                            &nsCSSFrameConstructor::ConstructNonScrollableBlock),
+          {FULL_CTOR_FCDATA(
+               0, &nsCSSFrameConstructor::ConstructNonScrollableBlock),
+           FULL_CTOR_FCDATA(
+               kCaptionCtorFlags,
+               &nsCSSFrameConstructor::ConstructNonScrollableBlock)},
+          {FULL_CTOR_FCDATA(
+               FCDATA_FORCED_NON_SCROLLABLE_BLOCK,
+               &nsCSSFrameConstructor::ConstructNonScrollableBlock),
            FULL_CTOR_FCDATA(
                FCDATA_FORCED_NON_SCROLLABLE_BLOCK | kCaptionCtorFlags,
                &nsCSSFrameConstructor::ConstructNonScrollableBlock)}};
       return &sNonScrollableBlockData[suppressScrollFrame][caption];
     }
     case StyleDisplayInside::Inline: {
       static const FrameConstructionData data =
-        FULL_CTOR_FCDATA(FCDATA_IS_INLINE | FCDATA_IS_LINE_PARTICIPANT,
-                         &nsCSSFrameConstructor::ConstructInline);
+          FULL_CTOR_FCDATA(FCDATA_IS_INLINE | FCDATA_IS_LINE_PARTICIPANT,
+                           &nsCSSFrameConstructor::ConstructInline);
       return &data;
     }
     case StyleDisplayInside::Table: {
       static const FrameConstructionData data =
-        FULL_CTOR_FCDATA(0, &nsCSSFrameConstructor::ConstructTable);
+          FULL_CTOR_FCDATA(0, &nsCSSFrameConstructor::ConstructTable);
       return &data;
     }
     // NOTE: In the unlikely event that we add another table-part here that
     // has a desired-parent-type (& hence triggers table fixup), we'll need to
     // also update the flexbox chunk in ComputedStyle::ApplyStyleFixups().
     case StyleDisplayInside::TableRowGroup: {
-      static const FrameConstructionData data =
-        FULL_CTOR_FCDATA(
-            FCDATA_IS_TABLE_PART |
-                FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeTable),
-            &nsCSSFrameConstructor::ConstructTableRowOrRowGroup);
+      static const FrameConstructionData data = FULL_CTOR_FCDATA(
+          FCDATA_IS_TABLE_PART | FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeTable),
+          &nsCSSFrameConstructor::ConstructTableRowOrRowGroup);
       return &data;
     }
     case StyleDisplayInside::TableColumn: {
-      static const FrameConstructionData data =
-        FULL_CTOR_FCDATA(
-            FCDATA_IS_TABLE_PART |
-                FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeColGroup),
-            &nsCSSFrameConstructor::ConstructTableCol);
+      static const FrameConstructionData data = FULL_CTOR_FCDATA(
+          FCDATA_IS_TABLE_PART |
+              FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeColGroup),
+          &nsCSSFrameConstructor::ConstructTableCol);
       return &data;
     }
     case StyleDisplayInside::TableColumnGroup: {
       static const FrameConstructionData data =
-        FCDATA_DECL(FCDATA_IS_TABLE_PART | FCDATA_DISALLOW_OUT_OF_FLOW |
-                        FCDATA_SKIP_ABSPOS_PUSH |
-                        FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeTable),
-                    NS_NewTableColGroupFrame);
+          FCDATA_DECL(FCDATA_IS_TABLE_PART | FCDATA_DISALLOW_OUT_OF_FLOW |
+                          FCDATA_SKIP_ABSPOS_PUSH |
+                          FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeTable),
+                      NS_NewTableColGroupFrame);
       return &data;
     }
     case StyleDisplayInside::TableHeaderGroup: {
-      static const FrameConstructionData data =
-        FULL_CTOR_FCDATA(
-            FCDATA_IS_TABLE_PART |
-                FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeTable),
-            &nsCSSFrameConstructor::ConstructTableRowOrRowGroup);
+      static const FrameConstructionData data = FULL_CTOR_FCDATA(
+          FCDATA_IS_TABLE_PART | FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeTable),
+          &nsCSSFrameConstructor::ConstructTableRowOrRowGroup);
       return &data;
     }
     case StyleDisplayInside::TableFooterGroup: {
-      static const FrameConstructionData data =
-        FULL_CTOR_FCDATA(
-            FCDATA_IS_TABLE_PART |
-                FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeTable),
-            &nsCSSFrameConstructor::ConstructTableRowOrRowGroup);
+      static const FrameConstructionData data = FULL_CTOR_FCDATA(
+          FCDATA_IS_TABLE_PART | FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeTable),
+          &nsCSSFrameConstructor::ConstructTableRowOrRowGroup);
       return &data;
     }
     case StyleDisplayInside::TableRow: {
-      static const FrameConstructionData data =
-        FULL_CTOR_FCDATA(
-            FCDATA_IS_TABLE_PART |
-                FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeRowGroup),
-            &nsCSSFrameConstructor::ConstructTableRowOrRowGroup);
+      static const FrameConstructionData data = FULL_CTOR_FCDATA(
+          FCDATA_IS_TABLE_PART |
+              FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeRowGroup),
+          &nsCSSFrameConstructor::ConstructTableRowOrRowGroup);
       return &data;
     }
     case StyleDisplayInside::TableCell: {
-      static const FrameConstructionData data =
-        FULL_CTOR_FCDATA(FCDATA_IS_TABLE_PART |
-                             FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeRow),
-                         &nsCSSFrameConstructor::ConstructTableCell);
+      static const FrameConstructionData data = FULL_CTOR_FCDATA(
+          FCDATA_IS_TABLE_PART | FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeRow),
+          &nsCSSFrameConstructor::ConstructTableCell);
       return &data;
     }
     case StyleDisplayInside::MozBox:
     case StyleDisplayInside::MozInlineBox: {
       if (!aElement.IsInNativeAnonymousSubtree() &&
           aElement.OwnerDoc()->IsContentDocument()) {
         aElement.OwnerDoc()->WarnOnceAbout(Document::eMozBoxOrInlineBoxDisplay);
       }
 
       // If we're emulating -moz-box with flexbox, then treat it as non-XUL and
-      // fall through (except for scrollcorners which have to be XUL becuase their
-      // parent reflows them with BoxReflow() which means they have to get
+      // fall through (except for scrollcorners which have to be XUL becuase
+      // their parent reflows them with BoxReflow() which means they have to get
       // actual-XUL frames).
       if (!StaticPrefs::layout_css_emulate_moz_box_with_flex() ||
           aElement.IsXULElement(nsGkAtoms::scrollcorner)) {
         static const FrameConstructionData data =
-          SCROLLABLE_ABSPOS_CONTAINER_XUL_FCDATA(NS_NewBoxFrame);
+            SCROLLABLE_ABSPOS_CONTAINER_XUL_FCDATA(NS_NewBoxFrame);
         return &data;
       }
       MOZ_FALLTHROUGH;
     }
     case StyleDisplayInside::Flex:
     case StyleDisplayInside::WebkitBox: {
       static const FrameConstructionData nonScrollableData =
-        FCDATA_DECL(0, NS_NewFlexContainerFrame);
+          FCDATA_DECL(0, NS_NewFlexContainerFrame);
       static const FrameConstructionData data =
-        FCDATA_DECL(FCDATA_MAY_NEED_SCROLLFRAME, NS_NewFlexContainerFrame);
-      return MOZ_UNLIKELY(propagatedScrollToViewport) ? &nonScrollableData : &data;
+          FCDATA_DECL(FCDATA_MAY_NEED_SCROLLFRAME, NS_NewFlexContainerFrame);
+      return MOZ_UNLIKELY(propagatedScrollToViewport) ? &nonScrollableData
+                                                      : &data;
     }
     case StyleDisplayInside::Grid: {
       static const FrameConstructionData nonScrollableData =
-        FCDATA_DECL(0, NS_NewGridContainerFrame);
+          FCDATA_DECL(0, NS_NewGridContainerFrame);
       static const FrameConstructionData data =
-        FCDATA_DECL(FCDATA_MAY_NEED_SCROLLFRAME, NS_NewGridContainerFrame);
-      return MOZ_UNLIKELY(propagatedScrollToViewport) ? &nonScrollableData : &data;
+          FCDATA_DECL(FCDATA_MAY_NEED_SCROLLFRAME, NS_NewGridContainerFrame);
+      return MOZ_UNLIKELY(propagatedScrollToViewport) ? &nonScrollableData
+                                                      : &data;
     }
     case StyleDisplayInside::Ruby: {
       static const FrameConstructionData data[] = {
-        FULL_CTOR_FCDATA(FCDATA_MAY_NEED_SCROLLFRAME,
-                         &nsCSSFrameConstructor::ConstructBlockRubyFrame),
-        FCDATA_DECL(FCDATA_IS_LINE_PARTICIPANT, NS_NewRubyFrame),
+          FULL_CTOR_FCDATA(FCDATA_MAY_NEED_SCROLLFRAME,
+                           &nsCSSFrameConstructor::ConstructBlockRubyFrame),
+          FCDATA_DECL(FCDATA_IS_LINE_PARTICIPANT, NS_NewRubyFrame),
       };
       bool isInline = aDisplay.DisplayOutside() == StyleDisplayOutside::Inline;
       return &data[isInline];
     }
     case StyleDisplayInside::RubyBase: {
-      static const FrameConstructionData data =
-        FCDATA_DECL(FCDATA_IS_LINE_PARTICIPANT |
-                        FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeRubyBaseContainer),
-                    NS_NewRubyBaseFrame);
+      static const FrameConstructionData data = FCDATA_DECL(
+          FCDATA_IS_LINE_PARTICIPANT |
+              FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeRubyBaseContainer),
+          NS_NewRubyBaseFrame);
       return &data;
     }
     case StyleDisplayInside::RubyBaseContainer: {
       static const FrameConstructionData data =
-        FCDATA_DECL(FCDATA_IS_LINE_PARTICIPANT |
-                        FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeRuby),
-                    NS_NewRubyBaseContainerFrame);
+          FCDATA_DECL(FCDATA_IS_LINE_PARTICIPANT |
+                          FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeRuby),
+                      NS_NewRubyBaseContainerFrame);
       return &data;
     }
     case StyleDisplayInside::RubyText: {
-      static const FrameConstructionData data =
-        FCDATA_DECL(FCDATA_IS_LINE_PARTICIPANT |
-                        FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeRubyTextContainer),
-                    NS_NewRubyTextFrame);
+      static const FrameConstructionData data = FCDATA_DECL(
+          FCDATA_IS_LINE_PARTICIPANT |
+              FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeRubyTextContainer),
+          NS_NewRubyTextFrame);
       return &data;
     }
     case StyleDisplayInside::RubyTextContainer: {
       static const FrameConstructionData data =
-        FCDATA_DECL(FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeRuby),
-                    NS_NewRubyTextContainerFrame);
+          FCDATA_DECL(FCDATA_DESIRED_PARENT_TYPE_TO_BITS(eTypeRuby),
+                      NS_NewRubyTextContainerFrame);
       return &data;
     }
 #ifdef MOZ_XUL
     case StyleDisplayInside::MozGrid:
     case StyleDisplayInside::MozInlineGrid: {
       static const FrameConstructionData data =
-        SCROLLABLE_XUL_FCDATA(NS_NewGridBoxFrame);
+          SCROLLABLE_XUL_FCDATA(NS_NewGridBoxFrame);
       return &data;
     }
     case StyleDisplayInside::MozGridGroup: {
       static const FrameConstructionData data =
-        SCROLLABLE_XUL_FCDATA(NS_NewGridRowGroupFrame);
+          SCROLLABLE_XUL_FCDATA(NS_NewGridRowGroupFrame);
       return &data;
     }
     case StyleDisplayInside::MozGridLine: {
       static const FrameConstructionData data =
-        SCROLLABLE_XUL_FCDATA(NS_NewGridRowLeafFrame);
+          SCROLLABLE_XUL_FCDATA(NS_NewGridRowLeafFrame);
       return &data;
     }
     case StyleDisplayInside::MozStack:
     case StyleDisplayInside::MozInlineStack: {
       static const FrameConstructionData data =
-        SCROLLABLE_XUL_FCDATA(NS_NewStackFrame);
+          SCROLLABLE_XUL_FCDATA(NS_NewStackFrame);
       return &data;
     }
     case StyleDisplayInside::MozDeck: {
       static const FrameConstructionData data =
-        SIMPLE_XUL_FCDATA(NS_NewDeckFrame);
+          SIMPLE_XUL_FCDATA(NS_NewDeckFrame);
       return &data;
     }
     case StyleDisplayInside::MozGroupbox: {
       static const FrameConstructionData data =
-        SCROLLABLE_XUL_FCDATA(NS_NewGroupBoxFrame);
+          SCROLLABLE_XUL_FCDATA(NS_NewGroupBoxFrame);
       return &data;
     }
     case StyleDisplayInside::MozPopup: {
       static const FrameConstructionData data =
-        FCDATA_DECL(FCDATA_DISALLOW_OUT_OF_FLOW | FCDATA_IS_POPUP |
-                        FCDATA_SKIP_ABSPOS_PUSH,
-                    NS_NewMenuPopupFrame);
+          FCDATA_DECL(FCDATA_DISALLOW_OUT_OF_FLOW | FCDATA_IS_POPUP |
+                          FCDATA_SKIP_ABSPOS_PUSH,
+                      NS_NewMenuPopupFrame);
       return &data;
     }
 #endif /* MOZ_XUL */
     default:
       MOZ_ASSERT_UNREACHABLE("unknown 'display' value");
       return nullptr;
   }
 }
@@ -7207,17 +7201,17 @@ void nsCSSFrameConstructor::ContentRange
   bool haveFirstLetterStyle = false;
   bool haveFirstLineStyle = false;
 
   // In order to shave off some cycles, we only dig up the
   // containing block haveFirst* flags if the parent frame where
   // the insertion/append is occurring is an inline or block
   // container. For other types of containers this isn't relevant.
   StyleDisplayInside parentDisplayInside =
-    insertion.mParentFrame->StyleDisplay()->DisplayInside();
+      insertion.mParentFrame->StyleDisplay()->DisplayInside();
 
   // Examine the insertion.mParentFrame where the insertion is taking
   // place. If it's a certain kind of container then some special
   // processing is done.
   if (StyleDisplayInside::Block == parentDisplayInside ||
       StyleDisplayInside::Inline == parentDisplayInside) {
     // Recover the special style flags for the containing block
     if (containingBlock) {
--- a/layout/base/nsCounterManager.cpp
+++ b/layout/base/nsCounterManager.cpp
@@ -198,18 +198,17 @@ bool nsCounterManager::AddCounterChanges
   // 'counter-increment:list-item' unless 'counter-increment' already has a
   // value for 'list-item'.
   //
   // https://drafts.csswg.org/css-lists-3/#declaring-a-list-item
   //
   // We inherit `display` for some anonymous boxes, but we don't want them to
   // increment the list-item counter.
   const bool requiresListItemIncrement =
-      aFrame->StyleDisplay()->IsListItem() &&
-      !aFrame->Style()->IsAnonBox();
+      aFrame->StyleDisplay()->IsListItem() && !aFrame->Style()->IsAnonBox();
 
   const nsStyleContent* styleContent = aFrame->StyleContent();
 
   if (!requiresListItemIncrement && !HasCounters(*styleContent)) {
     MOZ_ASSERT(!aFrame->HasAnyStateBits(NS_FRAME_HAS_CSS_COUNTER_STYLE));
     return false;
   }
 
--- a/layout/generic/nsBlockFrame.cpp
+++ b/layout/generic/nsBlockFrame.cpp
@@ -5619,17 +5619,18 @@ void nsBlockFrame::AddFrames(nsFrameList
   MOZ_ASSERT(aFrameList.IsEmpty());
   VerifyLines(true);
 #endif
 }
 
 nsContainerFrame* nsBlockFrame::GetRubyContentPseudoFrame() {
   auto* firstChild = PrincipalChildList().FirstChild();
   if (firstChild && firstChild->IsRubyFrame() &&
-      firstChild->Style()->GetPseudoType() == mozilla::PseudoStyleType::blockRubyContent) {
+      firstChild->Style()->GetPseudoType() ==
+          mozilla::PseudoStyleType::blockRubyContent) {
     return static_cast<nsContainerFrame*>(firstChild);
   }
   return nullptr;
 }
 
 nsContainerFrame* nsBlockFrame::GetContentInsertionFrame() {
   // 'display:block ruby' use the inner (Ruby) frame for insertions.
   if (auto* rubyContentPseudoFrame = GetRubyContentPseudoFrame()) {
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -541,17 +541,18 @@ static bool IsFontSizeInflationContainer
   // The root frame should always be an inflation container.
   if (!aFrame->GetParent()) {
     return true;
   }
 
   nsIContent* content = aFrame->GetContent();
   LayoutFrameType frameType = aFrame->Type();
   bool isInline =
-      (nsStyleDisplay::DisplayInside(aFrame->GetDisplay()) == StyleDisplayInside::Inline ||
+      (nsStyleDisplay::DisplayInside(aFrame->GetDisplay()) ==
+           StyleDisplayInside::Inline ||
        RubyUtils::IsRubyBox(frameType) ||
        (aFrame->IsFloating() && frameType == LayoutFrameType::Letter) ||
        // Given multiple frames for the same node, only the
        // outer one should be considered a container.
        // (Important, e.g., for nsSelectsAreaFrame.)
        (aFrame->GetParent()->GetContent() == content) ||
        (content &&
         (content->IsAnyOfHTMLElements(nsGkAtoms::option, nsGkAtoms::optgroup,
@@ -5298,17 +5299,18 @@ static nsIFrame::ContentOffsets OffsetsF
     offsets.secondaryOffset = range.end;
     offsets.associate = CARET_ASSOCIATE_AFTER;
     return offsets;
   }
 
   // Figure out whether the offsets should be over, after, or before the frame
   nsRect rect(nsPoint(0, 0), aFrame->GetSize());
 
-  bool isBlock = nsStyleDisplay::DisplayInside(aFrame->GetDisplay()) != StyleDisplayInside::Inline;
+  bool isBlock = nsStyleDisplay::DisplayInside(aFrame->GetDisplay()) !=
+                 StyleDisplayInside::Inline;
   bool isRtl =
       (aFrame->StyleVisibility()->mDirection == NS_STYLE_DIRECTION_RTL);
   if ((isBlock && rect.y < aPoint.y) ||
       (!isBlock && ((isRtl && rect.x + rect.width / 2 > aPoint.x) ||
                     (!isRtl && rect.x + rect.width / 2 < aPoint.x)))) {
     offsets.offset = range.end;
     if (rect.Contains(aPoint))
       offsets.secondaryOffset = range.start;
--- a/layout/painting/nsCSSRendering.cpp
+++ b/layout/painting/nsCSSRendering.cpp
@@ -753,20 +753,19 @@ ImgDrawResult nsCSSRendering::CreateWebR
     return result;
   }
 
   return bir->CreateWebRenderCommands(aItem, aForFrame, aBuilder, aResources,
                                       aSc, aManager, aDisplayListBuilder);
 }
 
 static nsCSSBorderRenderer ConstructBorderRenderer(
-    nsPresContext* aPresContext, ComputedStyle* aStyle,
-    DrawTarget* aDrawTarget, nsIFrame* aForFrame, const nsRect& aDirtyRect,
-    const nsRect& aBorderArea, const nsStyleBorder& aStyleBorder,
-    Sides aSkipSides, bool* aNeedsClip) {
+    nsPresContext* aPresContext, ComputedStyle* aStyle, DrawTarget* aDrawTarget,
+    nsIFrame* aForFrame, const nsRect& aDirtyRect, const nsRect& aBorderArea,
+    const nsStyleBorder& aStyleBorder, Sides aSkipSides, bool* aNeedsClip) {
   nsMargin border = aStyleBorder.GetComputedBorder();
 
   // Compute the outermost boundary of the area that might be painted.
   // Same coordinate space as aBorderArea & aBGClipRect.
   nsRect joinedBorderArea = nsCSSRendering::BoxDecorationRectForBorder(
       aForFrame, aBorderArea, aSkipSides, &aStyleBorder);
   RectCornerRadii bgRadii;
   ::GetRadii(aForFrame, aStyleBorder, aBorderArea, joinedBorderArea, &bgRadii);
@@ -892,18 +891,18 @@ ImgDrawResult nsCSSRendering::PaintBorde
   if (0 == border.left && 0 == border.right && 0 == border.top &&
       0 == border.bottom) {
     // Empty border area
     return result;
   }
 
   bool needsClip = false;
   nsCSSBorderRenderer br = ConstructBorderRenderer(
-      aPresContext, aStyle, &aDrawTarget, aForFrame, aDirtyRect,
-      aBorderArea, aStyleBorder, aSkipSides, &needsClip);
+      aPresContext, aStyle, &aDrawTarget, aForFrame, aDirtyRect, aBorderArea,
+      aStyleBorder, aSkipSides, &needsClip);
   if (needsClip) {
     aDrawTarget.PushClipRect(NSRectToSnappedRect(
         aBorderArea, aForFrame->PresContext()->AppUnitsPerDevPixel(),
         aDrawTarget));
   }
 
   br.DrawBorders();
 
@@ -951,18 +950,18 @@ nsCSSRendering::CreateNullBorderRenderer
     if (aOutBorderIsEmpty) {
       *aOutBorderIsEmpty = true;
     }
     return Nothing();
   }
 
   bool needsClip = false;
   nsCSSBorderRenderer br = ConstructBorderRenderer(
-      aPresContext, aStyle, aDrawTarget, aForFrame, aDirtyRect,
-      aBorderArea, aStyleBorder, aSkipSides, &needsClip);
+      aPresContext, aStyle, aDrawTarget, aForFrame, aDirtyRect, aBorderArea,
+      aStyleBorder, aSkipSides, &needsClip);
   return Some(br);
 }
 
 static nsRect GetOutlineInnerRect(nsIFrame* aFrame) {
   nsRect* savedOutlineInnerRect =
       aFrame->GetProperty(nsIFrame::OutlineInnerRectProperty());
   if (savedOutlineInnerRect) {
     return *savedOutlineInnerRect;
@@ -2361,18 +2360,17 @@ static nscolor GetBackgroundColor(nsIFra
               CalcScrollbarColor(aFrame, ScrollbarColorKind::Track)) {
         return *overrideColor;
       }
       break;
     }
     default:
       break;
   }
-  return aStyle->GetVisitedDependentColor(
-      &nsStyleBackground::mBackgroundColor);
+  return aStyle->GetVisitedDependentColor(&nsStyleBackground::mBackgroundColor);
 }
 
 nscolor nsCSSRendering::DetermineBackgroundColor(nsPresContext* aPresContext,
                                                  ComputedStyle* aStyle,
                                                  nsIFrame* aFrame,
                                                  bool& aDrawBackgroundImage,
                                                  bool& aDrawBackgroundColor) {
   aDrawBackgroundImage = true;
--- a/layout/painting/nsCSSRendering.h
+++ b/layout/painting/nsCSSRendering.h
@@ -338,19 +338,21 @@ struct nsCSSRendering {
    * usually not what you want.
    */
   static nsIFrame* FindNonTransparentBackgroundFrame(
       nsIFrame* aFrame, bool aStartAtParent = false);
 
   /**
    * Determine the background color to draw taking into account print settings.
    */
-  static nscolor DetermineBackgroundColor(
-      nsPresContext* aPresContext, mozilla::ComputedStyle* aStyle,
-      nsIFrame* aFrame, bool& aDrawBackgroundImage, bool& aDrawBackgroundColor);
+  static nscolor DetermineBackgroundColor(nsPresContext* aPresContext,
+                                          mozilla::ComputedStyle* aStyle,
+                                          nsIFrame* aFrame,
+                                          bool& aDrawBackgroundImage,
+                                          bool& aDrawBackgroundColor);
 
   static nsRect ComputeImageLayerPositioningArea(
       nsPresContext* aPresContext, nsIFrame* aForFrame,
       const nsRect& aBorderArea, const nsStyleImageLayers::Layer& aLayer,
       nsIFrame** aAttachedToFrame, bool* aOutTransformedFixed);
 
   // Implementation of the formula for computation of background-repeat round
   // See http://dev.w3.org/csswg/css3-background/#the-background-size
--- a/layout/style/Loader.cpp
+++ b/layout/style/Loader.cpp
@@ -141,18 +141,17 @@ class SheetLoadDataHashKey : public nsUR
         mPrincipal(aKey->mPrincipal),
         mReferrerInfo(aKey->mReferrerInfo),
         mCORSMode(aKey->mCORSMode),
         mParsingMode(aKey->mParsingMode) {
     MOZ_COUNT_CTOR(SheetLoadDataHashKey);
   }
 
   SheetLoadDataHashKey(nsIURI* aURI, nsIPrincipal* aPrincipal,
-                       nsIReferrerInfo* aReferrerInfo,
-                       CORSMode aCORSMode,
+                       nsIReferrerInfo* aReferrerInfo, CORSMode aCORSMode,
                        css::SheetParsingMode aParsingMode)
       : nsURIHashKey(aURI),
         mPrincipal(aPrincipal),
         mReferrerInfo(aReferrerInfo),
         mCORSMode(aCORSMode),
         mParsingMode(aParsingMode) {
     MOZ_COUNT_CTOR(SheetLoadDataHashKey);
   }
@@ -216,17 +215,16 @@ class SheetLoadDataHashKey : public nsUR
 
  protected:
   nsCOMPtr<nsIPrincipal> mPrincipal;
   nsCOMPtr<nsIReferrerInfo> mReferrerInfo;
   CORSMode mCORSMode;
   css::SheetParsingMode mParsingMode;
 };
 
-
 SheetLoadDataHashKey::SheetLoadDataHashKey(css::SheetLoadData* aLoadData)
     : nsURIHashKey(aLoadData->mURI),
       mPrincipal(aLoadData->mLoaderPrincipal),
       mReferrerInfo(aLoadData->ReferrerInfo()),
       mCORSMode(aLoadData->mSheet->GetCORSMode()),
       mParsingMode(aLoadData->mSheet->ParsingMode()) {
   MOZ_COUNT_CTOR(SheetLoadDataHashKey);
 }
@@ -459,19 +457,17 @@ struct Loader::Sheets {
  * Loader Implementation *
  *************************/
 
 Loader::Loader()
     : mDocument(nullptr),
       mDatasToNotifyOn(0),
       mCompatMode(eCompatibility_FullStandards),
       mEnabled(true),
-      mReporter(new ConsoleReportCollector())
-{
-}
+      mReporter(new ConsoleReportCollector()) {}
 
 Loader::Loader(DocGroup* aDocGroup) : Loader() { mDocGroup = aDocGroup; }
 
 Loader::Loader(Document* aDocument) : Loader() {
   MOZ_ASSERT(aDocument, "We should get a valid document from the caller!");
   mDocument = aDocument;
   mCompatMode = aDocument->GetCompatibilityMode();
 }
@@ -989,17 +985,18 @@ nsresult Loader::CreateSheet(
       MOZ_ASSERT(sheet->ParsingMode() == aParsingMode);
 
       // Make sure it hasn't been forced to have a unique inner;
       // that is an indication that its rules have been exposed to
       // CSSOM and so we can't use it.
       //
       // Similarly, if the sheet doesn't have the right parsing mode just bail.
       if (sheet->HasForcedUniqueInner()) {
-        LOG(("  Not cloning completed sheet %p because it has a "
+        LOG(
+            ("  Not cloning completed sheet %p because it has a "
              "forced unique inner",
              sheet.get()));
         sheet = nullptr;
         fromCompleteSheets = false;
       }
     }
 
     // Then loading sheets
--- a/layout/style/nsComputedDOMStyle.cpp
+++ b/layout/style/nsComputedDOMStyle.cpp
@@ -795,18 +795,19 @@ static nsIFrame* StyleFrame(nsIFrame* aO
                "table wrapper frames should have just one child, the inner "
                "table");
   return inner;
 }
 
 static bool IsNonReplacedInline(nsIFrame* aFrame) {
   // FIXME: this should be IsInlineInsideStyle() since width/height
   // doesn't apply to ruby boxes.
-  return aFrame->StyleDisplay()->DisplayInside() == StyleDisplayInside::Inline &&
-    !aFrame->IsFrameOfType(nsIFrame::eReplaced);
+  return aFrame->StyleDisplay()->DisplayInside() ==
+             StyleDisplayInside::Inline &&
+         !aFrame->IsFrameOfType(nsIFrame::eReplaced);
 }
 
 static Side SideForPaddingOrMarginOrInsetProperty(nsCSSPropertyID aPropID) {
   switch (aPropID) {
     case eCSSProperty_top:
     case eCSSProperty_margin_top:
     case eCSSProperty_padding_top:
       return eSideTop;
--- a/layout/style/nsStyleConsts.h
+++ b/layout/style/nsStyleConsts.h
@@ -22,67 +22,104 @@ namespace mozilla {
 
 static constexpr uint16_t STYLE_DISPLAY_LIST_ITEM_BIT = 0x8000;
 static constexpr uint8_t STYLE_DISPLAY_OUTSIDE_BITS = 7;
 static constexpr uint8_t STYLE_DISPLAY_INSIDE_BITS = 8;
 
 // The `display` longhand.
 uint16_t constexpr StyleDisplayFrom(StyleDisplayOutside aOuter,
                                     StyleDisplayInside aInner) {
-  return uint16_t(uint16_t(aOuter) << STYLE_DISPLAY_INSIDE_BITS) | uint16_t(aInner);
+  return uint16_t(uint16_t(aOuter) << STYLE_DISPLAY_INSIDE_BITS) |
+         uint16_t(aInner);
 }
 
 enum class StyleDisplay : uint16_t {
-  // These MUST be in sync with the Rust enum values in servo/components/style/values/specified/box.rs
+  // These MUST be in sync with the Rust enum values in
+  // servo/components/style/values/specified/box.rs
   /// https://drafts.csswg.org/css-display/#the-display-properties
   None = StyleDisplayFrom(StyleDisplayOutside::None, StyleDisplayInside::None),
-  Contents = StyleDisplayFrom(StyleDisplayOutside::None, StyleDisplayInside::Contents),
-  Inline = StyleDisplayFrom(StyleDisplayOutside::Inline, StyleDisplayInside::Inline),
-  InlineBlock = StyleDisplayFrom(StyleDisplayOutside::Inline, StyleDisplayInside::FlowRoot),
-  Block = StyleDisplayFrom(StyleDisplayOutside::Block, StyleDisplayInside::Block),
-  FlowRoot = StyleDisplayFrom(StyleDisplayOutside::Block, StyleDisplayInside::FlowRoot),
+  Contents =
+      StyleDisplayFrom(StyleDisplayOutside::None, StyleDisplayInside::Contents),
+  Inline =
+      StyleDisplayFrom(StyleDisplayOutside::Inline, StyleDisplayInside::Inline),
+  InlineBlock = StyleDisplayFrom(StyleDisplayOutside::Inline,
+                                 StyleDisplayInside::FlowRoot),
+  Block =
+      StyleDisplayFrom(StyleDisplayOutside::Block, StyleDisplayInside::Block),
+  FlowRoot = StyleDisplayFrom(StyleDisplayOutside::Block,
+                              StyleDisplayInside::FlowRoot),
   Flex = StyleDisplayFrom(StyleDisplayOutside::Block, StyleDisplayInside::Flex),
-  InlineFlex = StyleDisplayFrom(StyleDisplayOutside::Inline, StyleDisplayInside::Flex),
+  InlineFlex =
+      StyleDisplayFrom(StyleDisplayOutside::Inline, StyleDisplayInside::Flex),
   Grid = StyleDisplayFrom(StyleDisplayOutside::Block, StyleDisplayInside::Grid),
-  InlineGrid = StyleDisplayFrom(StyleDisplayOutside::Inline, StyleDisplayInside::Grid),
-  Table = StyleDisplayFrom(StyleDisplayOutside::Block, StyleDisplayInside::Table),
-  InlineTable = StyleDisplayFrom(StyleDisplayOutside::Inline, StyleDisplayInside::Table),
-  TableCaption = StyleDisplayFrom(StyleDisplayOutside::TableCaption, StyleDisplayInside::Block),
-  Ruby = StyleDisplayFrom(StyleDisplayOutside::Inline, StyleDisplayInside::Ruby),
-  WebkitBox = StyleDisplayFrom(StyleDisplayOutside::Block, StyleDisplayInside::WebkitBox),
-  WebkitInlineBox = StyleDisplayFrom(StyleDisplayOutside::Inline, StyleDisplayInside::WebkitBox),
+  InlineGrid =
+      StyleDisplayFrom(StyleDisplayOutside::Inline, StyleDisplayInside::Grid),
+  Table =
+      StyleDisplayFrom(StyleDisplayOutside::Block, StyleDisplayInside::Table),
+  InlineTable =
+      StyleDisplayFrom(StyleDisplayOutside::Inline, StyleDisplayInside::Table),
+  TableCaption = StyleDisplayFrom(StyleDisplayOutside::TableCaption,
+                                  StyleDisplayInside::Block),
+  Ruby =
+      StyleDisplayFrom(StyleDisplayOutside::Inline, StyleDisplayInside::Ruby),
+  WebkitBox = StyleDisplayFrom(StyleDisplayOutside::Block,
+                               StyleDisplayInside::WebkitBox),
+  WebkitInlineBox = StyleDisplayFrom(StyleDisplayOutside::Inline,
+                                     StyleDisplayInside::WebkitBox),
   ListItem = Block | STYLE_DISPLAY_LIST_ITEM_BIT,
 
   /// Internal table boxes.
-  TableRowGroup = StyleDisplayFrom(StyleDisplayOutside::InternalTable, StyleDisplayInside::TableRowGroup),
-  TableHeaderGroup = StyleDisplayFrom(StyleDisplayOutside::InternalTable, StyleDisplayInside::TableHeaderGroup),
-  TableFooterGroup = StyleDisplayFrom(StyleDisplayOutside::InternalTable, StyleDisplayInside::TableFooterGroup),
-  TableColumn = StyleDisplayFrom(StyleDisplayOutside::InternalTable, StyleDisplayInside::TableColumn),
-  TableColumnGroup = StyleDisplayFrom(StyleDisplayOutside::InternalTable, StyleDisplayInside::TableColumnGroup),
-  TableRow = StyleDisplayFrom(StyleDisplayOutside::InternalTable, StyleDisplayInside::TableRow),
-  TableCell = StyleDisplayFrom(StyleDisplayOutside::InternalTable, StyleDisplayInside::TableCell),
+  TableRowGroup = StyleDisplayFrom(StyleDisplayOutside::InternalTable,
+                                   StyleDisplayInside::TableRowGroup),
+  TableHeaderGroup = StyleDisplayFrom(StyleDisplayOutside::InternalTable,
+                                      StyleDisplayInside::TableHeaderGroup),
+  TableFooterGroup = StyleDisplayFrom(StyleDisplayOutside::InternalTable,
+                                      StyleDisplayInside::TableFooterGroup),
+  TableColumn = StyleDisplayFrom(StyleDisplayOutside::InternalTable,
+                                 StyleDisplayInside::TableColumn),
+  TableColumnGroup = StyleDisplayFrom(StyleDisplayOutside::InternalTable,
+                                      StyleDisplayInside::TableColumnGroup),
+  TableRow = StyleDisplayFrom(StyleDisplayOutside::InternalTable,
+                              StyleDisplayInside::TableRow),
+  TableCell = StyleDisplayFrom(StyleDisplayOutside::InternalTable,
+                               StyleDisplayInside::TableCell),
 
   /// Internal ruby boxes.
-  RubyBase = StyleDisplayFrom(StyleDisplayOutside::InternalRuby, StyleDisplayInside::RubyBase),
-  RubyBaseContainer = StyleDisplayFrom(StyleDisplayOutside::InternalRuby, StyleDisplayInside::RubyBaseContainer),
-  RubyText = StyleDisplayFrom(StyleDisplayOutside::InternalRuby, StyleDisplayInside::RubyText),
-  RubyTextContainer = StyleDisplayFrom(StyleDisplayOutside::InternalRuby, StyleDisplayInside::RubyTextContainer),
+  RubyBase = StyleDisplayFrom(StyleDisplayOutside::InternalRuby,
+                              StyleDisplayInside::RubyBase),
+  RubyBaseContainer = StyleDisplayFrom(StyleDisplayOutside::InternalRuby,
+                                       StyleDisplayInside::RubyBaseContainer),
+  RubyText = StyleDisplayFrom(StyleDisplayOutside::InternalRuby,
+                              StyleDisplayInside::RubyText),
+  RubyTextContainer = StyleDisplayFrom(StyleDisplayOutside::InternalRuby,
+                                       StyleDisplayInside::RubyTextContainer),
 
   /// XUL boxes.
-  MozBox = StyleDisplayFrom(StyleDisplayOutside::XUL, StyleDisplayInside::MozBox),
-  MozInlineBox = StyleDisplayFrom(StyleDisplayOutside::XUL, StyleDisplayInside::MozInlineBox),
-  MozGrid = StyleDisplayFrom(StyleDisplayOutside::XUL, StyleDisplayInside::MozGrid),
-  MozInlineGrid = StyleDisplayFrom(StyleDisplayOutside::XUL, StyleDisplayInside::MozInlineGrid),
-  MozGridGroup = StyleDisplayFrom(StyleDisplayOutside::XUL, StyleDisplayInside::MozGridGroup),
-  MozGridLine = StyleDisplayFrom(StyleDisplayOutside::XUL, StyleDisplayInside::MozGridLine),
-  MozStack = StyleDisplayFrom(StyleDisplayOutside::XUL, StyleDisplayInside::MozStack),
-  MozInlineStack = StyleDisplayFrom(StyleDisplayOutside::XUL, StyleDisplayInside::MozInlineStack),
-  MozDeck = StyleDisplayFrom(StyleDisplayOutside::XUL, StyleDisplayInside::MozDeck),
-  MozGroupbox = StyleDisplayFrom(StyleDisplayOutside::XUL, StyleDisplayInside::MozGroupbox),
-  MozPopup = StyleDisplayFrom(StyleDisplayOutside::XUL, StyleDisplayInside::MozPopup),
+  MozBox =
+      StyleDisplayFrom(StyleDisplayOutside::XUL, StyleDisplayInside::MozBox),
+  MozInlineBox = StyleDisplayFrom(StyleDisplayOutside::XUL,
+                                  StyleDisplayInside::MozInlineBox),
+  MozGrid =
+      StyleDisplayFrom(StyleDisplayOutside::XUL, StyleDisplayInside::MozGrid),
+  MozInlineGrid = StyleDisplayFrom(StyleDisplayOutside::XUL,
+                                   StyleDisplayInside::MozInlineGrid),
+  MozGridGroup = StyleDisplayFrom(StyleDisplayOutside::XUL,
+                                  StyleDisplayInside::MozGridGroup),
+  MozGridLine = StyleDisplayFrom(StyleDisplayOutside::XUL,
+                                 StyleDisplayInside::MozGridLine),
+  MozStack =
+      StyleDisplayFrom(StyleDisplayOutside::XUL, StyleDisplayInside::MozStack),
+  MozInlineStack = StyleDisplayFrom(StyleDisplayOutside::XUL,
+                                    StyleDisplayInside::MozInlineStack),
+  MozDeck =
+      StyleDisplayFrom(StyleDisplayOutside::XUL, StyleDisplayInside::MozDeck),
+  MozGroupbox = StyleDisplayFrom(StyleDisplayOutside::XUL,
+                                 StyleDisplayInside::MozGroupbox),
+  MozPopup =
+      StyleDisplayFrom(StyleDisplayOutside::XUL, StyleDisplayInside::MozPopup),
 };
 // The order of the StyleDisplay values isn't meaningful.
 bool operator<(const StyleDisplay&, const StyleDisplay&) = delete;
 bool operator<=(const StyleDisplay&, const StyleDisplay&) = delete;
 bool operator>(const StyleDisplay&, const StyleDisplay&) = delete;
 bool operator>=(const StyleDisplay&, const StyleDisplay&) = delete;
 
 // Basic shapes
--- a/layout/style/nsStyleStruct.h
+++ b/layout/style/nsStyleStruct.h
@@ -1593,27 +1593,31 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
   mozilla::NonNegativeLengthPercentage mShapeMargin;
 
   mozilla::StyleShapeSource mShapeOutside;
 
   bool HasAppearance() const {
     return mAppearance != mozilla::StyleAppearance::None;
   }
 
-  static mozilla::StyleDisplayOutside DisplayOutside(mozilla::StyleDisplay aDisplay) {
-    return mozilla::StyleDisplayOutside((uint16_t(aDisplay) >> mozilla::STYLE_DISPLAY_INSIDE_BITS) &
-                                        uint16_t(((1 << mozilla::STYLE_DISPLAY_OUTSIDE_BITS) - 1)));
+  static mozilla::StyleDisplayOutside DisplayOutside(
+      mozilla::StyleDisplay aDisplay) {
+    return mozilla::StyleDisplayOutside(
+        (uint16_t(aDisplay) >> mozilla::STYLE_DISPLAY_INSIDE_BITS) &
+        uint16_t(((1 << mozilla::STYLE_DISPLAY_OUTSIDE_BITS) - 1)));
   }
   mozilla::StyleDisplayOutside DisplayOutside() const {
     return DisplayOutside(mDisplay);
   }
 
-  static mozilla::StyleDisplayInside DisplayInside(mozilla::StyleDisplay aDisplay) {
-    return mozilla::StyleDisplayInside(uint16_t(aDisplay) &
-                                       uint16_t(((1 << mozilla::STYLE_DISPLAY_INSIDE_BITS) - 1)));
+  static mozilla::StyleDisplayInside DisplayInside(
+      mozilla::StyleDisplay aDisplay) {
+    return mozilla::StyleDisplayInside(
+        uint16_t(aDisplay) &
+        uint16_t(((1 << mozilla::STYLE_DISPLAY_INSIDE_BITS) - 1)));
   }
   mozilla::StyleDisplayInside DisplayInside() const {
     return DisplayInside(mDisplay);
   }
 
   static bool IsListItem(mozilla::StyleDisplay aDisplay) {
     return !!(uint16_t(aDisplay) & mozilla::STYLE_DISPLAY_LIST_ITEM_BIT);
   }