Bug 1235306 - Fix -Wimplicit-fallthrough warnings in layout/. r=dholbert
authorChris Peterson <cpeterson@mozilla.com>
Sun, 22 Nov 2015 21:33:47 -0800
changeset 277729 aab78aed1c92f6a838eaf737b6302eb7a7b6c93a
parent 277728 7752a04d13add587ac0decb59daf57fce513ae0d
child 277730 1b5c9493e4e97d5039882ff861117dfe63380878
push id69576
push usercpeterson@mozilla.com
push dateTue, 29 Dec 2015 01:57:18 +0000
treeherdermozilla-inbound@1b5c9493e4e9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1235306, 10628, 10630, 10671, 10673, 10769, 10770, 10774, 10775, 10776, 10780
milestone46.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 1235306 - Fix -Wimplicit-fallthrough warnings in layout/. r=dholbert layout/base/nsCSSRendering.cpp:3913:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/base/nsCSSRendering.cpp:3943:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/base/nsCSSRendering.cpp:4066:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/base/nsCSSRendering.cpp:4096:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/base/nsCSSRenderingBorders.cpp:646:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/base/nsLayoutUtils.cpp:4639:9 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/base/nsLayoutUtils.cpp:4659:9 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/base/nsLayoutUtils.cpp:5004:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/base/nsLayoutUtils.cpp:5200:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/base/TouchManager.cpp:192:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/base/TouchManager.cpp:196:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/generic/nsFlexContainerFrame.cpp:2497:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/generic/nsFlexContainerFrame.cpp:2687:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/generic/nsFlexContainerFrame.cpp:2973:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/generic/nsFrame.cpp:4277:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/generic/nsFrame.cpp:4310:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/generic/nsFrame.cpp:4313:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/generic/nsFrame.cpp:6703:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/generic/nsFrame.cpp:6751:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/generic/nsGridContainerFrame.cpp:2649:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/generic/nsGridContainerFrame.cpp:935:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/generic/nsHTMLReflowState.cpp:1141:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/generic/nsHTMLReflowState.cpp:1145:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/generic/nsHTMLReflowState.cpp:1148:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/generic/nsLineLayout.cpp:2942:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/generic/nsLineLayout.cpp:2958:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/generic/nsLineLayout.cpp:3134:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/generic/nsLineLayout.cpp:3150:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/printing/nsPrintPreviewListener.cpp:199:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/CSSLexer.cpp:129:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/Declaration.cpp:1069:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/Declaration.cpp:366:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/Declaration.cpp:442:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/Declaration.cpp:981:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/nsComputedDOMStyle.cpp:3597:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/nsComputedDOMStyle.cpp:3616:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/nsComputedDOMStyle.cpp:539:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/nsComputedDOMStyle.cpp:540:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/nsComputedDOMStyle.cpp:542:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/nsCSSParser.cpp:10628:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/nsCSSParser.cpp:10630:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/nsCSSParser.cpp:10671:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/nsCSSParser.cpp:10673:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/nsCSSParser.cpp:10769:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/nsCSSParser.cpp:10770:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/nsCSSParser.cpp:10774:43 [-Wimplicit-fallthrough] fallthrough annotation does not directly precede switch label layout/style/nsCSSParser.cpp:10775:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/nsCSSParser.cpp:10776:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/nsCSSParser.cpp:10780:43 [-Wimplicit-fallthrough] fallthrough annotation does not directly precede switch label layout/style/nsCSSParser.cpp:2542:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/nsCSSParser.cpp:2715:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/nsCSSParser.cpp:4124:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/nsCSSParser.cpp:4313:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/nsCSSParser.cpp:9513:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/nsCSSParser.cpp:9697:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/nsCSSParser.cpp:9699:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/nsCSSParser.cpp:9743:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/nsCSSParser.cpp:9745:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/nsCSSParser.cpp:9826:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/nsCSSParser.cpp:9827:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/nsCSSParser.cpp:9832:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/nsCSSParser.cpp:9833:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/nsCSSParser.cpp:9980:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/nsRuleNode.cpp:160:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/nsRuleNode.cpp:187:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/nsRuleNode.cpp:722:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/nsRuleNode.cpp:753:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/StyleAnimationValue.cpp:139:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/StyleAnimationValue.cpp:1687:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/style/StyleAnimationValue.cpp:1869:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/tables/FixedTableLayoutStrategy.cpp:264:13 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/tables/FixedTableLayoutStrategy.cpp:267:13 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/tables/nsCellMap.cpp:1043:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/tables/nsCellMap.cpp:930:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/tables/nsCellMap.cpp:953:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/tables/nsCellMap.cpp:997:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/tables/nsTableFrame.cpp:6943:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/tables/nsTableFrame.cpp:6953:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/tables/nsTableFrame.cpp:6959:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/tables/nsTableFrame.cpp:6966:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/tables/nsTableFrame.cpp:6974:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/tables/nsTableFrame.cpp:7151:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/tables/nsTableFrame.cpp:7161:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/tables/nsTableFrame.cpp:7170:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/tables/nsTableFrame.cpp:7177:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/tables/nsTableFrame.cpp:7186:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/tables/nsTableRowFrame.cpp:663:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/tables/SpanningCellSorter.cpp:112:9 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/tables/SpanningCellSorter.cpp:142:9 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/tables/SpanningCellSorter.cpp:157:9 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/xul/nsResizerFrame.cpp:86:13 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/xul/nsResizerFrame.cpp:87:13 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/xul/nsResizerFrame.cpp:88:13 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/xul/nsResizerFrame.cpp:90:13 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/xul/nsSliderFrame.cpp:551:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/xul/nsSliderFrame.cpp:560:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels layout/xul/nsXULPopupManager.cpp:2268:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
layout/base/TouchManager.cpp
layout/base/nsCSSRendering.cpp
layout/base/nsCSSRenderingBorders.cpp
layout/base/nsLayoutUtils.cpp
layout/generic/nsFlexContainerFrame.cpp
layout/generic/nsFrame.cpp
layout/generic/nsGridContainerFrame.cpp
layout/generic/nsHTMLReflowState.cpp
layout/generic/nsLineLayout.cpp
layout/printing/nsPrintPreviewListener.cpp
layout/style/CSSLexer.cpp
layout/style/Declaration.cpp
layout/style/StyleAnimationValue.cpp
layout/style/nsCSSParser.cpp
layout/style/nsComputedDOMStyle.cpp
layout/style/nsRuleNode.cpp
layout/style/nsStyleStruct.cpp
layout/tables/FixedTableLayoutStrategy.cpp
layout/tables/SpanningCellSorter.cpp
layout/tables/nsCellMap.cpp
layout/tables/nsTableFrame.cpp
layout/tables/nsTableRowFrame.cpp
layout/xul/nsResizerFrame.cpp
layout/xul/nsSliderFrame.cpp
layout/xul/nsXULPopupManager.cpp
--- a/layout/base/TouchManager.cpp
+++ b/layout/base/TouchManager.cpp
@@ -193,16 +193,17 @@ TouchManager::PreHandleEvent(WidgetEvent
           return false;
         }
       }
       break;
     }
     case eTouchEnd:
       aIsHandlingUserInput = true;
       // Fall through to touchcancel code
+      MOZ_FALLTHROUGH;
     case eTouchCancel: {
       // Remove the changed touches
       // need to make sure we only remove touches that are ending here
       WidgetTouchEvent* touchEvent = aEvent->AsTouchEvent();
       WidgetTouchEvent::TouchArray& touches = touchEvent->touches;
       for (uint32_t i = 0; i < touches.Length(); ++i) {
         dom::Touch* touch = touches[i];
         if (!touch) {
--- a/layout/base/nsCSSRendering.cpp
+++ b/layout/base/nsCSSRendering.cpp
@@ -3951,16 +3951,17 @@ nsCSSRendering::DrawTableBorderSegment(n
         rect.height = endDashLength;
         DrawSolidBorderSegment(drawTarget, rect, aBorderColor,
                                aAppUnitsPerDevPixel, twipsPerPixel);
       }
     }
     break;
   case NS_STYLE_BORDER_STYLE_GROOVE:
     ridgeGroove = NS_STYLE_BORDER_STYLE_GROOVE; // and fall through to ridge
+    MOZ_FALLTHROUGH;
   case NS_STYLE_BORDER_STYLE_RIDGE:
     if ((horizontal && (twipsPerPixel >= aBorder.height)) ||
         (!horizontal && (twipsPerPixel >= aBorder.width))) {
       // a one pixel border
       DrawSolidBorderSegment(drawTarget, aBorder, aBorderColor,
                              aAppUnitsPerDevPixel, twipsPerPixel,
                              aStartBevelSide, aStartBevelOffset,
                              aEndBevelSide, aEndBevelOffset);
@@ -4121,16 +4122,17 @@ nsCSSRendering::DrawTableBorderSegment(n
         DrawSolidBorderSegment(drawTarget, rightRect, aBorderColor,
                                aAppUnitsPerDevPixel, twipsPerPixel,
                                aStartBevelSide, startBevel, aEndBevelSide,
                                endBevel);
       }
       break;
     }
     // else fall through to solid
+    MOZ_FALLTHROUGH;
   case NS_STYLE_BORDER_STYLE_SOLID:
     DrawSolidBorderSegment(drawTarget, aBorder, aBorderColor,
                            aAppUnitsPerDevPixel, twipsPerPixel, aStartBevelSide,
                            aStartBevelOffset, aEndBevelSide, aEndBevelOffset);
     break;
   case NS_STYLE_BORDER_STYLE_OUTSET:
   case NS_STYLE_BORDER_STYLE_INSET:
     NS_ASSERTION(false, "inset, outset should have been converted to groove, ridge");
--- a/layout/base/nsCSSRenderingBorders.cpp
+++ b/layout/base/nsCSSRenderingBorders.cpp
@@ -637,17 +637,17 @@ MakeBorderColor(nscolor aColor, nscolor 
   int k = 0;
 
   switch (aBorderColorStyle) {
     case BorderColorStyleNone:
       return Color(0.f, 0.f, 0.f, 0.f); // transparent black
 
     case BorderColorStyleLight:
       k = 1;
-      /* fall through */
+      MOZ_FALLTHROUGH;
     case BorderColorStyleDark:
       NS_GetSpecial3DColors(colors, aBackgroundColor, aColor);
       return Color::FromABGR(colors[k]);
 
     case BorderColorStyleSolid:
     default:
       return Color::FromABGR(aColor);
   }
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -4299,17 +4299,17 @@ GetBSizeTakenByBoxSizing(StyleBoxSizing 
 {
   nscoord bSizeTakenByBoxSizing = 0;
   switch (aBoxSizing) {
   case StyleBoxSizing::Border: {
     const nsStyleBorder* styleBorder = aFrame->StyleBorder();
     bSizeTakenByBoxSizing +=
       aHorizontalAxis ? styleBorder->GetComputedBorder().TopBottom()
                       : styleBorder->GetComputedBorder().LeftRight();
-    // fall through
+    MOZ_FALLTHROUGH;
   }
   case StyleBoxSizing::Padding: {
     if (!aIgnorePadding) {
       const nsStyleSides& stylePadding =
         aFrame->StylePadding()->mPadding;
       const nsStyleCoord& paddingStart =
         stylePadding.Get(aHorizontalAxis ? NS_SIDE_TOP : NS_SIDE_LEFT);
       const nsStyleCoord& paddingEnd =
@@ -4324,17 +4324,17 @@ GetBSizeTakenByBoxSizing(StyleBoxSizing 
           GetPercentBSize(paddingStart, aFrame, aHorizontalAxis, pad)) {
         bSizeTakenByBoxSizing += pad;
       }
       if (GetAbsoluteCoord(paddingEnd, pad) ||
           GetPercentBSize(paddingEnd, aFrame, aHorizontalAxis, pad)) {
         bSizeTakenByBoxSizing += pad;
       }
     }
-    // fall through
+    MOZ_FALLTHROUGH;
   }
   case StyleBoxSizing::Content:
   default:
     break;
   }
   return bSizeTakenByBoxSizing;
 }
 
@@ -5071,20 +5071,20 @@ nsLayoutUtils::ComputeSizeWithIntrinsicD
 
   const bool isAutoISize = inlineStyleCoord->GetUnit() == eStyleUnit_Auto;
   const bool isAutoBSize = IsAutoBSize(*blockStyleCoord, aCBSize.BSize(aWM));
 
   LogicalSize boxSizingAdjust(aWM);
   switch (stylePos->mBoxSizing) {
     case StyleBoxSizing::Border:
       boxSizingAdjust += aBorder;
-      // fall through
+      MOZ_FALLTHROUGH;
     case StyleBoxSizing::Padding:
       boxSizingAdjust += aPadding;
-      // fall through
+      MOZ_FALLTHROUGH;
     case StyleBoxSizing::Content:
       // nothing
       break;
   }
   nscoord boxSizingToMarginEdgeISize =
     aMargin.ISize(aWM) + aBorder.ISize(aWM) + aPadding.ISize(aWM) -
       boxSizingAdjust.ISize(aWM);
 
--- a/layout/generic/nsFlexContainerFrame.cpp
+++ b/layout/generic/nsFlexContainerFrame.cpp
@@ -2489,16 +2489,17 @@ MainAxisPositionTracker::
       !aLine->IsEmpty()) {
     switch (mJustifyContent) {
       case NS_STYLE_JUSTIFY_LEFT:
       case NS_STYLE_JUSTIFY_RIGHT:
       case NS_STYLE_JUSTIFY_BASELINE:
       case NS_STYLE_JUSTIFY_LAST_BASELINE:
       case NS_STYLE_JUSTIFY_SPACE_EVENLY:
         NS_WARNING("NYI: justify-content:left/right/baseline/last-baseline/space-evenly");
+        MOZ_FALLTHROUGH;
       case NS_STYLE_JUSTIFY_FLEX_START:
         // All packing space should go at the end --> nothing to do here.
         break;
       case NS_STYLE_JUSTIFY_FLEX_END:
         // All packing space goes at the beginning
         mPosition += mPackingSpaceRemaining;
         break;
       case NS_STYLE_JUSTIFY_CENTER:
@@ -2679,16 +2680,17 @@ CrossAxisPositionTracker::
       case NS_STYLE_JUSTIFY_LEFT:
       case NS_STYLE_JUSTIFY_RIGHT:
       case NS_STYLE_ALIGN_SELF_START:
       case NS_STYLE_ALIGN_SELF_END:
       case NS_STYLE_ALIGN_SPACE_EVENLY:
       case NS_STYLE_ALIGN_BASELINE:
       case NS_STYLE_ALIGN_LAST_BASELINE:
         NS_WARNING("NYI: align-self:left/right/self-start/self-end/space-evenly/baseline/last-baseline");
+        MOZ_FALLTHROUGH;
       case NS_STYLE_ALIGN_FLEX_START:
         // All packing space should go at the end --> nothing to do here.
         break;
       case NS_STYLE_ALIGN_FLEX_END:
         // All packing space goes at the beginning
         mPosition += mPackingSpaceRemaining;
         break;
       case NS_STYLE_ALIGN_CENTER:
@@ -2965,16 +2967,17 @@ SingleLineCrossAxisPositionTracker::
 
   switch (alignSelf) {
     case NS_STYLE_JUSTIFY_LEFT:
     case NS_STYLE_JUSTIFY_RIGHT:
     case NS_STYLE_ALIGN_SELF_START:
     case NS_STYLE_ALIGN_SELF_END:
     case NS_STYLE_ALIGN_LAST_BASELINE:
       NS_WARNING("NYI: align-self:left/right/self-start/self-end/last-baseline");
+      MOZ_FALLTHROUGH;
     case NS_STYLE_ALIGN_FLEX_START:
       // No space to skip over -- we're done.
       break;
     case NS_STYLE_ALIGN_FLEX_END:
       mPosition += aLine.GetLineCrossSize() - aItem.GetOuterCrossSize(mAxis);
       break;
     case NS_STYLE_ALIGN_CENTER:
       // Note: If cross-size is odd, the "after" space will get the extra unit.
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -4344,20 +4344,20 @@ nsFrame::ComputeSize(nsRenderingContext 
                                        aMargin, aBorder, aPadding,
                                        aFlags & ComputeSizeFlags::eShrinkWrap);
   LogicalSize boxSizingAdjust(aWM);
   const nsStylePosition *stylePos = StylePosition();
 
   switch (stylePos->mBoxSizing) {
     case StyleBoxSizing::Border:
       boxSizingAdjust += aBorder;
-      // fall through
+      MOZ_FALLTHROUGH;
     case StyleBoxSizing::Padding:
       boxSizingAdjust += aPadding;
-      // fall through
+      MOZ_FALLTHROUGH;
     case StyleBoxSizing::Content:
       // nothing
       break;
   }
   nscoord boxSizingToMarginEdgeISize =
     aMargin.ISize(aWM) + aBorder.ISize(aWM) + aPadding.ISize(aWM) -
     boxSizingAdjust.ISize(aWM);
 
@@ -6791,16 +6791,17 @@ nsIFrame::PeekOffset(nsPeekOffsetStruct*
       // mWordMovementType to eEndWord if we're moving forwards, and to eStartWord
       // if we're moving backwards.
       if (aPos->mDirection == eDirPrevious) {
         aPos->mWordMovementType = eStartWord;
       } else {
         aPos->mWordMovementType = eEndWord;
       }
       // Intentionally fall through the eSelectWord case.
+      MOZ_FALLTHROUGH;
     case eSelectWord:
     {
       // wordSelectEatSpace means "are we looking for a boundary between whitespace
       // and non-whitespace (in the direction we're moving in)".
       // It is true when moving forward and looking for a beginning of a word, or
       // when moving backwards and looking for an end of a word.
       bool wordSelectEatSpace;
       if (aPos->mWordMovementType != eDefaultBehavior) {
--- a/layout/generic/nsGridContainerFrame.cpp
+++ b/layout/generic/nsGridContainerFrame.cpp
@@ -1191,16 +1191,17 @@ AlignJustifySelf(uint8_t aAlignment, boo
 
   // Set the position and size (aPos/aContentSize) for the requested alignment.
   bool didResize = false;
   nscoord offset = 0; // NOTE: this is the resulting frame offset (border box).
   switch (aAlignment) {
     case NS_STYLE_ALIGN_BASELINE:
     case NS_STYLE_ALIGN_LAST_BASELINE:
       NS_WARNING("NYI: baseline/last-baseline for grid (bug 1151204)"); // XXX
+      MOZ_FALLTHROUGH;
     case NS_STYLE_ALIGN_START:
       offset = marginStart;
       break;
     case NS_STYLE_ALIGN_END: {
       nscoord size = aAxis == eLogicalAxisBlock ? aChildSize.BSize(wm)
                                                 : aChildSize.ISize(wm);
       offset = aCBSize - (size + marginEnd);
       break;
@@ -2954,16 +2955,17 @@ nsGridContainerFrame::Tracks::AlignJusti
 
   // Optimize the cases where we just need to set each track's position.
   nscoord pos = 0;
   bool distribute = true;
   switch (alignment) {
     case NS_STYLE_ALIGN_BASELINE:
     case NS_STYLE_ALIGN_LAST_BASELINE:
       NS_WARNING("'NYI: baseline/last-baseline' (bug 1151204)"); // XXX
+      MOZ_FALLTHROUGH;
     case NS_STYLE_ALIGN_START:
       distribute = false;
       break;
     case NS_STYLE_ALIGN_END:
       pos = space;
       distribute = false;
       break;
     case NS_STYLE_ALIGN_CENTER:
--- a/layout/generic/nsHTMLReflowState.cpp
+++ b/layout/generic/nsHTMLReflowState.cpp
@@ -1144,20 +1144,20 @@ nsHTMLReflowState::CalculateBorderPaddin
     marginStartEnd = start + end;
   }
 
   nscoord outside = paddingStartEnd + borderStartEnd + marginStartEnd;
   nscoord inside = 0;
   switch (mStylePosition->mBoxSizing) {
     case StyleBoxSizing::Border:
       inside += borderStartEnd;
-      // fall through
+      MOZ_FALLTHROUGH;
     case StyleBoxSizing::Padding:
       inside += paddingStartEnd;
-      // fall through
+      MOZ_FALLTHROUGH;
     case StyleBoxSizing::Content:
       // nothing
       break;
   }
   outside -= inside;
   *aInsideBoxSizing = inside;
   *aOutsideBoxSizing = outside;
   return;
--- a/layout/generic/nsLineLayout.cpp
+++ b/layout/generic/nsLineLayout.cpp
@@ -3003,16 +3003,17 @@ nsLineLayout::ExpandRubyBox(PerFrameData
       }
       if (gaps > 0) {
         JustificationApplicationState state(gaps, aReservedISize);
         ApplyFrameJustification(aFrame->mSpan, state);
         break;
       }
       // If there are no justification opportunities for space-between,
       // fall-through to center per spec.
+      MOZ_FALLTHROUGH;
     }
     case NS_STYLE_RUBY_ALIGN_CENTER:
       // Indent all children by half of the reserved inline size.
       for (PerFrameData* child = aFrame->mSpan->mFirstFrame;
            child; child = child->mNext) {
         child->mBounds.IStart(lineWM) += aReservedISize / 2;
         child->mFrame->SetRect(lineWM, child->mBounds, aContainerSize);
       }
@@ -3194,16 +3195,17 @@ nsLineLayout::TextAlignLine(nsLineBox* a
           MOZ_ASSERT(applyState.mGaps.mHandled == applyState.mGaps.mCount,
                      "Unprocessed justification gaps");
           MOZ_ASSERT(applyState.mWidth.mConsumed == applyState.mWidth.mAvailable,
                      "Unprocessed justification width");
           break;
         }
         // Fall through to the default case if we could not justify to fill
         // the space.
+        MOZ_FALLTHROUGH;
       }
 
       case NS_STYLE_TEXT_ALIGN_DEFAULT:
         // default alignment is to start edge so do nothing
         break;
 
       case NS_STYLE_TEXT_ALIGN_LEFT:
       case NS_STYLE_TEXT_ALIGN_MOZ_LEFT:
--- a/layout/printing/nsPrintPreviewListener.cpp
+++ b/layout/printing/nsPrintPreviewListener.cpp
@@ -190,17 +190,17 @@ nsPrintPreviewListener::HandleEvent(nsID
             nsCOMPtr<nsIDOMElement> result;
             fm->MoveFocus(win, from,
                           forward ? nsIFocusManager::MOVEFOCUS_FORWARD :
                                     nsIFocusManager::MOVEFOCUS_BACKWARD,
                           nsIFocusManager::FLAG_BYKEY, getter_AddRefs(result));
           }
         }
       }
-      // fall-through
+      MOZ_FALLTHROUGH;
       case eEventAction_Suppress:
         aEvent->StopPropagation();
         aEvent->PreventDefault();
         break;
       case eEventAction_StopPropagation:
         aEvent->StopPropagation();
         break;
       case eEventAction_Propagate:
--- a/layout/style/CSSLexer.cpp
+++ b/layout/style/CSSLexer.cpp
@@ -120,17 +120,17 @@ CSSLexer::NextToken(Nullable<CSSToken>& 
     case eCSSToken_AtKeyword:
     case eCSSToken_ID:
     case eCSSToken_Hash:
       resultToken.mText.Construct(token.mIdent);
       break;
 
     case eCSSToken_Dimension:
       resultToken.mText.Construct(token.mIdent);
-      /* FALLTHROUGH */
+      MOZ_FALLTHROUGH;
     case eCSSToken_Number:
     case eCSSToken_Percentage:
       resultToken.mNumber.Construct(token.mNumber);
       resultToken.mHasSign.Construct(token.mHasSign);
       resultToken.mIsInteger.Construct(token.mIntegerValid);
       break;
 
     case eCSSToken_String:
--- a/layout/style/Declaration.cpp
+++ b/layout/style/Declaration.cpp
@@ -433,16 +433,17 @@ Declaration::GetValue(nsCSSProperty aPro
         }
       }
       if (!match) {
         // We can't express what we have in the border shorthand
         break;
       }
       // tweak aProperty and fall through
       aProperty = eCSSProperty_border_top;
+      MOZ_FALLTHROUGH;
     }
     case eCSSProperty_border_top:
     case eCSSProperty_border_right:
     case eCSSProperty_border_bottom:
     case eCSSProperty_border_left:
     case eCSSProperty_border_inline_start:
     case eCSSProperty_border_inline_end:
     case eCSSProperty_border_block_start:
@@ -1060,16 +1061,17 @@ Declaration::GetValue(nsCSSProperty aPro
       } else if (!(autoFlowValue.GetUnit() == eCSSUnit_Enumerated &&
                    autoFlowValue.GetIntValue() == NS_STYLE_GRID_AUTO_FLOW_ROW &&
                    autoColumnsValue.GetUnit() == eCSSUnit_Auto &&
                    autoRowsValue.GetUnit() == eCSSUnit_Auto)) {
         // Not serializable, bail.
         return;
       }
       // Fall through to eCSSProperty_grid_template
+      MOZ_FALLTHROUGH;
     }
     case eCSSProperty_grid_template: {
       const nsCSSValue& areasValue =
         *data->ValueFor(eCSSProperty_grid_template_areas);
       const nsCSSValue& columnsValue =
         *data->ValueFor(eCSSProperty_grid_template_columns);
       const nsCSSValue& rowsValue =
         *data->ValueFor(eCSSProperty_grid_template_rows);
--- a/layout/style/StyleAnimationValue.cpp
+++ b/layout/style/StyleAnimationValue.cpp
@@ -131,16 +131,17 @@ AppendFunction(nsCSSKeyword aTransformFu
       break;
     case eCSSKeyword_translate:
     case eCSSKeyword_skew:
     case eCSSKeyword_scale:
       nargs = 2;
       break;
     default:
       NS_ERROR("must be a transform function");
+      MOZ_FALLTHROUGH;
     case eCSSKeyword_translatex:
     case eCSSKeyword_translatey:
     case eCSSKeyword_translatez:
     case eCSSKeyword_scalex:
     case eCSSKeyword_scaley:
     case eCSSKeyword_scalez:
     case eCSSKeyword_skewx:
     case eCSSKeyword_skewy:
@@ -1679,16 +1680,17 @@ AddFilterFunctionImpl(double aCoeff1, co
         return false;
       }
       break;
     }
     case eCSSKeyword_grayscale:
     case eCSSKeyword_invert:
     case eCSSKeyword_sepia:
       initialVal = 0.0f;
+      MOZ_FALLTHROUGH;
     case eCSSKeyword_brightness:
     case eCSSKeyword_contrast:
     case eCSSKeyword_opacity:
     case eCSSKeyword_saturate:
       AddCSSValuePercentNumber(restrictions,
                                aCoeff1, funcArg1,
                                aCoeff2, funcArg2,
                                resultArg,
@@ -1859,17 +1861,17 @@ AddTransformLists(double aCoeff1, const 
           arr->Item(1).SetFloatValue(vector1.x, eCSSUnit_Number);
           arr->Item(2).SetFloatValue(vector1.y, eCSSUnit_Number);
           arr->Item(3).SetFloatValue(vector1.z, eCSSUnit_Number);
 
           AddCSSValueAngle(aCoeff1, a1->Item(4), aCoeff2, a2->Item(4),
                            arr->Item(4));
           break;
         }
-        // FALL THROUGH
+        MOZ_FALLTHROUGH;
       }
       case eCSSKeyword_matrix:
       case eCSSKeyword_matrix3d:
       case eCSSKeyword_interpolatematrix:
       case eCSSKeyword_perspective: {
         // FIXME: If the matrix contains only numbers then we could decompose
         // here.
 
@@ -3977,9 +3979,8 @@ StyleAnimationValue::operator==(const St
     case eUnit_UnparsedString:
       return (NS_strcmp(GetStringBufferValue(),
                         aOther.GetStringBufferValue()) == 0);
   }
 
   NS_NOTREACHED("incomplete case");
   return false;
 }
-
--- a/layout/style/nsCSSParser.cpp
+++ b/layout/style/nsCSSParser.cpp
@@ -2725,18 +2725,17 @@ CSSParserImpl::ResolveValueWithVariableR
         UPDATE_RECORDING_TOKENS(eCSSTokenSerialization_DashMatch);
         break;
 
       case eCSSToken_Containsmatch:
         UPDATE_RECORDING_TOKENS(eCSSTokenSerialization_ContainsMatch);
         break;
 
       default:
-        NS_NOTREACHED("unexpected token type");
-        // fall through
+        MOZ_FALLTHROUGH_ASSERT("unexpected token type");
       case eCSSToken_ID:
       case eCSSToken_String:
       case eCSSToken_Includes:
       case eCSSToken_Beginsmatch:
       case eCSSToken_Endsmatch:
         UPDATE_RECORDING_TOKENS(eCSSTokenSerialization_Other);
         break;
     }
@@ -4324,17 +4323,17 @@ CSSParserImpl::ParseKeyframeSelectorList
         if (mToken.mIdent.LowerCaseEqualsLiteral("from")) {
           value = 0.0f;
           break;
         }
         if (mToken.mIdent.LowerCaseEqualsLiteral("to")) {
           value = 1.0f;
           break;
         }
-        // fall through
+        MOZ_FALLTHROUGH;
       default:
         UngetToken();
         // The first time through the loop, this means we got an empty
         // list.  Otherwise, it means we have a trailing comma.
         return false;
     }
     aSelectorList.AppendElement(value);
     if (!ExpectSymbol(',', true)) {
@@ -7404,17 +7403,17 @@ CSSParserImpl::TranslateDimension(nsCSSV
 CSSParseResult
 CSSParserImpl::ParseVariantWithRestrictions(nsCSSValue& aValue,
                                             int32_t aVariantMask,
                                             const KTableEntry aKeywordTable[],
                                             uint32_t aRestrictions)
 {
   switch (aRestrictions) {
     default:
-      MOZ_ASSERT(false, "should not be reached");
+      MOZ_FALLTHROUGH_ASSERT("should not be reached");
     case 0:
       return ParseVariant(aValue, aVariantMask, aKeywordTable);
     case CSS_PROPERTY_VALUE_NONNEGATIVE:
       return ParseNonNegativeVariant(aValue, aVariantMask, aKeywordTable);
     case CSS_PROPERTY_VALUE_AT_LEAST_ONE:
       return ParseOneOrLargerVariant(aValue, aVariantMask, aKeywordTable);
   }
 }
@@ -10094,17 +10093,17 @@ CSSParserImpl::IsLegacyGradientLine(cons
     break;
 
   case eCSSToken_Function:
     if (aId.LowerCaseEqualsLiteral("calc") ||
         aId.LowerCaseEqualsLiteral("-moz-calc")) {
       haveGradientLine = true;
       break;
     }
-    // fall through
+    MOZ_FALLTHROUGH;
   case eCSSToken_ID:
   case eCSSToken_Hash:
     // this is a color
     break;
 
   case eCSSToken_Ident: {
     // This is only a gradient line if it's a box position keyword.
     nsCSSKeyword kw = nsCSSKeywords::LookupKeyword(aId);
@@ -10746,18 +10745,20 @@ CSSParserImpl::ParseBoxProperties(const 
       }
     }
   }
 
   // Provide missing values by replicating some of the values found
   switch (count) {
     case 1: // Make right == top
       result.mRight = result.mTop;
+      MOZ_FALLTHROUGH;
     case 2: // Make bottom == top
       result.mBottom = result.mTop;
+      MOZ_FALLTHROUGH;
     case 3: // Make left == right
       result.mLeft = result.mRight;
   }
 
   NS_FOR_CSS_SIDES (index) {
     AppendValue(aPropIDs[index], result.*(nsCSSRect::sides[index]));
   }
   return true;
@@ -10789,18 +10790,20 @@ CSSParserImpl::ParseGroupedBoxProperty(i
   if (count == 0) {
     return false;
   }
 
   // Provide missing values by replicating some of the values found
   switch (count) {
     case 1: // Make right == top
       result.mRight = result.mTop;
+      MOZ_FALLTHROUGH;
     case 2: // Make bottom == top
       result.mBottom = result.mTop;
+      MOZ_FALLTHROUGH;
     case 3: // Make left == right
       result.mLeft = result.mRight;
   }
 
   return true;
 }
 
 bool
@@ -10886,25 +10889,35 @@ CSSParserImpl::ParseBoxCornerRadiiIntern
   // if we have no Y-values, use the X-values
   if (countY == 0) {
     dimenY = dimenX;
     countY = countX;
   }
 
   // Provide missing values by replicating some of the values found
   switch (countX) {
-    case 1: dimenX.mRight = dimenX.mTop;  // top-right same as top-left, and
-    case 2: dimenX.mBottom = dimenX.mTop; // bottom-right same as top-left, and 
-    case 3: dimenX.mLeft = dimenX.mRight; // bottom-left same as top-right
+    case 1: // Make top-right same as top-left
+      dimenX.mRight = dimenX.mTop;
+      MOZ_FALLTHROUGH;
+    case 2: // Make bottom-right same as top-left
+      dimenX.mBottom = dimenX.mTop;
+      MOZ_FALLTHROUGH;
+    case 3: // Make bottom-left same as top-right
+      dimenX.mLeft = dimenX.mRight;
   }
 
   switch (countY) {
-    case 1: dimenY.mRight = dimenY.mTop;  // top-right same as top-left, and
-    case 2: dimenY.mBottom = dimenY.mTop; // bottom-right same as top-left, and 
-    case 3: dimenY.mLeft = dimenY.mRight; // bottom-left same as top-right
+    case 1: // Make top-right same as top-left
+      dimenY.mRight = dimenY.mTop;
+      MOZ_FALLTHROUGH;
+    case 2: // Make bottom-right same as top-left
+      dimenY.mBottom = dimenY.mTop;
+      MOZ_FALLTHROUGH;
+    case 3: // Make bottom-left same as top-right
+      dimenY.mLeft = dimenY.mRight;
   }
 
   NS_FOR_CSS_SIDES(side) {
     nsCSSValue& x = dimenX.*nsCSSRect::sides[side];
     nsCSSValue& y = dimenY.*nsCSSRect::sides[side];
 
     if (x == y) {
       array[side] = x;
--- a/layout/style/nsComputedDOMStyle.cpp
+++ b/layout/style/nsComputedDOMStyle.cpp
@@ -531,20 +531,20 @@ nsComputedDOMStyle::GetAdjustedValuesFor
   // We want the width/height of whatever parts 'width' or 'height' controls,
   // which can be different depending on the value of the 'box-sizing' property.
   const nsStylePosition* stylePos = StylePosition();
 
   nsMargin adjustment;
   switch(stylePos->mBoxSizing) {
     case StyleBoxSizing::Border:
       adjustment += mInnerFrame->GetUsedBorder();
-      // fall through
+      MOZ_FALLTHROUGH;
     case StyleBoxSizing::Padding:
       adjustment += mInnerFrame->GetUsedPadding();
-      // fall through
+      MOZ_FALLTHROUGH;
     case StyleBoxSizing::Content:
       // nothing
       break;
   }
 
   return adjustment;
 }
 
@@ -3833,17 +3833,17 @@ nsComputedDOMStyle::DoGetHyphens()
 
 already_AddRefed<CSSValue>
 nsComputedDOMStyle::DoGetTextSizeAdjust()
 {
   RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
   switch (StyleText()->mTextSizeAdjust) {
     default:
       NS_NOTREACHED("unexpected value");
-      // fall through
+      MOZ_FALLTHROUGH;
     case NS_STYLE_TEXT_SIZE_ADJUST_AUTO:
       val->SetIdent(eCSSKeyword_auto);
       break;
     case NS_STYLE_TEXT_SIZE_ADJUST_NONE:
       val->SetIdent(eCSSKeyword_none);
       break;
   }
   return val.forget();
--- a/layout/style/nsRuleNode.cpp
+++ b/layout/style/nsRuleNode.cpp
@@ -182,16 +182,17 @@ nsRuleNode::EnsureBlockDisplay(uint8_t& 
 {
   // see if the display value is already a block
   switch (display) {
   case NS_STYLE_DISPLAY_LIST_ITEM :
     if (aConvertListItem) {
       display = NS_STYLE_DISPLAY_BLOCK;
       break;
     } // else, fall through to share the 'break' for non-changing display vals
+    MOZ_FALLTHROUGH;
   case NS_STYLE_DISPLAY_NONE :
   case NS_STYLE_DISPLAY_CONTENTS :
     // never change display:none or display:contents *ever*
   case NS_STYLE_DISPLAY_TABLE :
   case NS_STYLE_DISPLAY_BLOCK :
   case NS_STYLE_DISPLAY_FLEX :
   case NS_STYLE_DISPLAY_GRID :
     // do not muck with these at all - already blocks
@@ -746,18 +747,17 @@ GetFloatFromBoxPosition(int32_t aEnumVal
   switch (aEnumValue) {
   case NS_STYLE_BG_POSITION_LEFT:
   case NS_STYLE_BG_POSITION_TOP:
     return 0.0f;
   case NS_STYLE_BG_POSITION_RIGHT:
   case NS_STYLE_BG_POSITION_BOTTOM:
     return 1.0f;
   default:
-    NS_NOTREACHED("unexpected value");
-    // fall through
+    MOZ_FALLTHROUGH_ASSERT("unexpected box position value");
   case NS_STYLE_BG_POSITION_CENTER:
     return 0.5f;
   }
 }
 
 #define SETCOORD_NORMAL                 0x01   // N
 #define SETCOORD_AUTO                   0x02   // A
 #define SETCOORD_INHERIT                0x04   // H
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -2575,18 +2575,17 @@ void nsTimingFunction::AssignFromKeyword
 {
   switch (aTimingFunctionType) {
     case NS_STYLE_TRANSITION_TIMING_FUNCTION_STEP_START:
       mType = Type::StepStart;
       mStepSyntax = StepSyntax::Keyword;
       mSteps = 1;
       return;
     default:
-      MOZ_ASSERT_UNREACHABLE("aTimingFunctionType must be a keyword value");
-      // fall through
+      MOZ_FALLTHROUGH_ASSERT("aTimingFunctionType must be a keyword value");
     case NS_STYLE_TRANSITION_TIMING_FUNCTION_STEP_END:
       mType = Type::StepEnd;
       mStepSyntax = StepSyntax::Keyword;
       mSteps = 1;
       return;
     case NS_STYLE_TRANSITION_TIMING_FUNCTION_EASE:
     case NS_STYLE_TRANSITION_TIMING_FUNCTION_LINEAR:
     case NS_STYLE_TRANSITION_TIMING_FUNCTION_EASE_IN:
--- a/layout/tables/FixedTableLayoutStrategy.cpp
+++ b/layout/tables/FixedTableLayoutStrategy.cpp
@@ -255,20 +255,20 @@ FixedTableLayoutStrategy::ComputeColumnI
             cellFrame->IntrinsicISizeOffsets();
           float pct = styleISize->GetPercentValue();
           colISize = NSToCoordFloor(pct * float(tableISize));
 
           nscoord boxSizingAdjust = 0;
           switch (cellFrame->StylePosition()->mBoxSizing) {
             case StyleBoxSizing::Content:
               boxSizingAdjust += offsets.hPadding;
-              // Fall through
+              MOZ_FALLTHROUGH;
             case StyleBoxSizing::Padding:
               boxSizingAdjust += offsets.hBorder;
-              // Fall through
+              MOZ_FALLTHROUGH;
             case StyleBoxSizing::Border:
               // Don't add anything
               break;
           }
           colISize += boxSizingAdjust;
 
           pct /= float(colSpan);
           colFrame->AddPrefPercent(pct);
--- a/layout/tables/SpanningCellSorter.cpp
+++ b/layout/tables/SpanningCellSorter.cpp
@@ -103,17 +103,17 @@ SpanningCellSorter::GetNext(int32_t *aCo
 {
     NS_ASSERTION(mState != DONE, "done enumerating, stop calling");
 
     switch (mState) {
         case ADDING:
             /* prepare to enumerate the array */
             mState = ENUMERATING_ARRAY;
             mEnumerationIndex = 0;
-            /* fall through */
+            MOZ_FALLTHROUGH;
         case ENUMERATING_ARRAY:
             while (mEnumerationIndex < ARRAY_SIZE && !mArray[mEnumerationIndex])
                 ++mEnumerationIndex;
             if (mEnumerationIndex < ARRAY_SIZE) {
                 Item *result = mArray[mEnumerationIndex];
                 *aColSpan = IndexToSpan(mEnumerationIndex);
                 NS_ASSERTION(result, "logic error");
 #ifdef DEBUG_SPANNING_CELL_SORTER
@@ -133,29 +133,29 @@ SpanningCellSorter::GetNext(int32_t *aCo
                 int32_t j = 0;
                 for (auto iter = mHashTable.Iter(); !iter.Done(); iter.Next()) {
                     sh[j++] = static_cast<HashTableEntry*>(iter.Get());
                 }
                 NS_QuickSort(sh, mHashTable.EntryCount(), sizeof(sh[0]),
                              SortArray, nullptr);
                 mSortedHashTable = sh;
             }
-            /* fall through */
+            MOZ_FALLTHROUGH;
         case ENUMERATING_HASH:
             if (mEnumerationIndex < mHashTable.EntryCount()) {
                 Item *result = mSortedHashTable[mEnumerationIndex]->mItems;
                 *aColSpan = mSortedHashTable[mEnumerationIndex]->mColSpan;
                 NS_ASSERTION(result, "holes in hash table");
 #ifdef DEBUG_SPANNING_CELL_SORTER
                 printf("SpanningCellSorter[%p]:"
                        " returning list for colspan=%d from hash\n",
                        static_cast<void*>(this), *aColSpan);
 #endif
                 ++mEnumerationIndex;
                 return result;
             }
             mState = DONE;
-            /* fall through */
+            MOZ_FALLTHROUGH;
         case DONE:
             ;
     }
     return nullptr;
 }
--- a/layout/tables/nsCellMap.cpp
+++ b/layout/tables/nsCellMap.cpp
@@ -921,17 +921,17 @@ nsTableCellMap::ResetBStartStart(Logical
   if (!mBCInfo || aIsBEndIEnd) ABORT0();
 
   BCCellData* cellData;
   BCData* bcData = nullptr;
 
   switch(aSide) {
   case eLogicalSideBEnd:
     aRowIndex++;
-    // FALLTHROUGH
+    MOZ_FALLTHROUGH;
   case eLogicalSideBStart:
     cellData = (BCCellData*)aCellMap.GetDataAt(aRowIndex, aColIndex);
     if (cellData) {
       bcData = &cellData->mData;
     }
     else {
       NS_ASSERTION(aSide == eLogicalSideBEnd, "program error");
       // try the next row group
@@ -944,17 +944,17 @@ nsTableCellMap::ResetBStartStart(Logical
         else {
           bcData = GetBEndMostBorder(aColIndex);
         }
       }
     }
     break;
   case eLogicalSideIEnd:
     aColIndex++;
-    // FALLTHROUGH
+    MOZ_FALLTHROUGH;
   case eLogicalSideIStart:
     cellData = (BCCellData*)aCellMap.GetDataAt(aRowIndex, aColIndex);
     if (cellData) {
       bcData = &cellData->mData;
     }
     else {
       NS_ASSERTION(aSide == eLogicalSideIEnd, "program error");
       bcData = GetIEndMostBorder(aRowIndex);
@@ -989,16 +989,17 @@ nsTableCellMap::SetBCBorderEdge(LogicalS
   int32_t yPos = aRowIndex;
   int32_t rgYPos = aRowIndex - aCellMapStart;
   bool changed;
 
   switch(aSide) {
   case eLogicalSideBEnd:
     rgYPos++;
     yPos++;
+    MOZ_FALLTHROUGH;
   case eLogicalSideBStart:
     lastIndex = xPos + aLength - 1;
     for (xIndex = xPos; xIndex <= lastIndex; xIndex++) {
       changed = aChanged && (xIndex == xPos);
       BCData* bcData = nullptr;
       cellData = (BCCellData*)aCellMap.GetDataAt(rgYPos, xIndex);
       if (!cellData) {
         int32_t numRgRows = aCellMap.GetRowCount();
@@ -1035,16 +1036,17 @@ nsTableCellMap::SetBCBorderEdge(LogicalS
       if (bcData) {
         bcData->SetBStartEdge(aOwner, aSize, changed);
       }
       else NS_ERROR("Cellmap: BStart edge not found");
     }
     break;
   case eLogicalSideIEnd:
     xPos++;
+    MOZ_FALLTHROUGH;
   case eLogicalSideIStart:
     // since bStart, bEnd borders were set, there should already be a cellData entry
     lastIndex = rgYPos + aLength - 1;
     for (yIndex = rgYPos; yIndex <= lastIndex; yIndex++) {
       changed = aChanged && (yIndex == rgYPos);
       cellData = (BCCellData*)aCellMap.GetDataAt(yIndex, xPos);
       if (cellData) {
         cellData->mData.SetIStartEdge(aOwner, aSize, changed);
--- a/layout/tables/nsTableFrame.cpp
+++ b/layout/tables/nsTableFrame.cpp
@@ -6979,48 +6979,52 @@ BCBlockDirSeg::Paint(BCPaintBorderIterat
   switch (mOwner) {
     case eTableOwner:
       owner = aIter.mTable;
       break;
     case eAjaColGroupOwner:
       side = eLogicalSideIEnd;
       if (!aIter.IsTableIEndMost() && (relColIndex > 0)) {
         col = aIter.mBlockDirInfo[relColIndex - 1].mCol;
-      } // and fall through
+      }
+      MOZ_FALLTHROUGH;
     case eColGroupOwner:
       if (col) {
         owner = col->GetParent();
       }
       break;
     case eAjaColOwner:
       side = eLogicalSideIEnd;
       if (!aIter.IsTableIEndMost() && (relColIndex > 0)) {
         col = aIter.mBlockDirInfo[relColIndex - 1].mCol;
-      } // and fall through
+      }
+      MOZ_FALLTHROUGH;
     case eColOwner:
       owner = col;
       break;
     case eAjaRowGroupOwner:
       NS_ERROR("a neighboring rowgroup can never own a vertical border");
-      // and fall through
+      MOZ_FALLTHROUGH;
     case eRowGroupOwner:
       NS_ASSERTION(aIter.IsTableIStartMost() || aIter.IsTableIEndMost(),
                   "row group can own border only at table edge");
       owner = mFirstRowGroup;
       break;
     case eAjaRowOwner:
-      NS_ERROR("program error"); // and fall through
+      NS_ERROR("program error");
+      MOZ_FALLTHROUGH;
     case eRowOwner:
       NS_ASSERTION(aIter.IsTableIStartMost() || aIter.IsTableIEndMost(),
                    "row can own border only at table edge");
       owner = mFirstRow;
       break;
     case eAjaCellOwner:
       side = eLogicalSideIEnd;
-      cell = mAjaCell; // and fall through
+      cell = mAjaCell;
+      MOZ_FALLTHROUGH;
     case eCellOwner:
       owner = cell;
       break;
   }
   if (owner) {
     ::GetPaintStyleInfo(owner, aIter.mTableWM, side, &style, &color);
   }
   BCPixelSize smallHalf, largeHalf;
@@ -7187,52 +7191,52 @@ BCInlineDirSeg::Paint(BCPaintBorderItera
   nscolor color = 0xFFFFFFFF;
 
   switch (mOwner) {
     case eTableOwner:
       owner = aIter.mTable;
       break;
     case eAjaColGroupOwner:
       NS_ERROR("neighboring colgroups can never own an inline-dir border");
-      // and fall through
+      MOZ_FALLTHROUGH;
     case eColGroupOwner:
       NS_ASSERTION(aIter.IsTableBStartMost() || aIter.IsTableBEndMost(),
                    "col group can own border only at the table edge");
       col = aIter.mTableFirstInFlow->GetColFrame(aIter.mColIndex - 1);
       if (!col) ABORT0();
       owner = col->GetParent();
       break;
     case eAjaColOwner:
       NS_ERROR("neighboring column can never own an inline-dir border");
-      // and fall through
+      MOZ_FALLTHROUGH;
     case eColOwner:
       NS_ASSERTION(aIter.IsTableBStartMost() || aIter.IsTableBEndMost(),
                    "col can own border only at the table edge");
       owner = aIter.mTableFirstInFlow->GetColFrame(aIter.mColIndex - 1);
       break;
     case eAjaRowGroupOwner:
       side = eLogicalSideBEnd;
       rg = (aIter.IsTableBEndMost()) ? aIter.mRg : aIter.mPrevRg;
-      // and fall through
+      MOZ_FALLTHROUGH;
     case eRowGroupOwner:
       owner = rg;
       break;
     case eAjaRowOwner:
       side = eLogicalSideBEnd;
       row = (aIter.IsTableBEndMost()) ? aIter.mRow : aIter.mPrevRow;
-      // and fall through
+      MOZ_FALLTHROUGH;
     case eRowOwner:
       owner = row;
       break;
     case eAjaCellOwner:
       side = eLogicalSideBEnd;
       // if this is null due to the damage area origin-y > 0, then the border
       // won't show up anyway
       cell = mAjaCell;
-      // and fall through
+      MOZ_FALLTHROUGH;
     case eCellOwner:
       owner = cell;
       break;
   }
   if (owner) {
     ::GetPaintStyleInfo(owner, aIter.mTableWM, side, &style, &color);
   }
   BCPixelSize smallHalf, largeHalf;
--- a/layout/tables/nsTableRowFrame.cpp
+++ b/layout/tables/nsTableRowFrame.cpp
@@ -654,16 +654,17 @@ nsTableRowFrame::CalculateCellActualBSiz
   const nsStyleCoord& bsizeStyleCoord = position->BSize(aWM);
   switch (bsizeStyleCoord.GetUnit()) {
     case eStyleUnit_Calc: {
       if (bsizeStyleCoord.CalcHasPercent()) {
         // Treat this like "auto"
         break;
       }
       // Fall through to the coord case
+      MOZ_FALLTHROUGH;
     }
     case eStyleUnit_Coord: {
       nscoord outsideBoxSizing = 0;
       // In quirks mode, table cell isize should be content-box, but bsize
       // should be border-box.
       // Because of this historic anomaly, we do not use quirk.css
       // (since we can't specify one value of box-sizing for isize and another
       // for bsize)
--- a/layout/xul/nsResizerFrame.cpp
+++ b/layout/xul/nsResizerFrame.cpp
@@ -78,36 +78,36 @@ nsResizerFrame::HandleEvent(nsPresContex
 
           // cache the content rectangle for the frame to resize
           // GetScreenRectInAppUnits returns the border box rectangle, so
           // adjust to get the desired content rectangle.
           nsRect rect = frameToResize->GetScreenRectInAppUnits();
           switch (frameToResize->StylePosition()->mBoxSizing) {
             case StyleBoxSizing::Content:
               rect.Deflate(frameToResize->GetUsedPadding());
-              // fall through
+              MOZ_FALLTHROUGH;
             case StyleBoxSizing::Padding:
               rect.Deflate(frameToResize->GetUsedBorder());
-              // fall through
+              MOZ_FALLTHROUGH;
             case StyleBoxSizing::Border:
               // nothing
               break;
           }
 
           mMouseDownRect =
             LayoutDeviceIntRect::FromAppUnitsToNearest(rect, aPresContext->AppUnitsPerDevPixel());
           doDefault = false;
         }
         else {
           // If there is no window, then resizing isn't allowed.
           if (!window)
             break;
 
           doDefault = false;
-            
+
           // ask the widget implementation to begin a resize drag if it can
           Direction direction = GetDirection();
           nsresult rv = aEvent->widget->BeginResizeDrag(aEvent,
                         direction.mHorizontal, direction.mVertical);
           // for native drags, don't set the fields below
           if (rv != NS_ERROR_NOT_IMPLEMENTED)
              break;
              
--- a/layout/xul/nsSliderFrame.cpp
+++ b/layout/xul/nsSliderFrame.cpp
@@ -551,16 +551,17 @@ nsSliderFrame::HandleEvent(nsPresContext
 
     case eTouchEnd:
     case eMouseUp:
       if (ShouldScrollForEvent(aEvent)) {
         StopDrag();
         //we MUST call nsFrame HandleEvent for mouse ups to maintain the selection state and capture state.
         return nsFrame::HandleEvent(aPresContext, aEvent, aEventStatus);
       }
+      break;
 
     default:
       break;
     }
 
     //return nsFrame::HandleEvent(aPresContext, aEvent, aEventStatus);
     return NS_OK;
   } else if (ShouldScrollToClickForEvent(aEvent)) {
--- a/layout/xul/nsXULPopupManager.cpp
+++ b/layout/xul/nsXULPopupManager.cpp
@@ -2258,16 +2258,17 @@ nsXULPopupManager::HandleKeyboardEventWi
         // close popups or deactivate menubar when Tab or F10 are pressed
         Rollup(0, false, nullptr, nullptr);
         break;
       } else if (mActiveMenuBar) {
         mActiveMenuBar->MenuClosed();
         break;
       }
       // Intentional fall-through to RETURN case
+      MOZ_FALLTHROUGH;
 
     case nsIDOMKeyEvent::DOM_VK_RETURN: {
       // If there is a popup open, check if the current item needs to be opened.
       // Otherwise, tell the active menubar, if any, to activate the menu. The
       // Enter method will return a menu if one needs to be opened as a result.
       nsMenuFrame* menuToOpen = nullptr;
       WidgetGUIEvent* GUIEvent = aKeyEvent->GetInternalNSEvent()->AsGUIEvent();
       if (aTopVisibleMenuItem) {