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
This commit is contained in:
Chris Peterson 2015-11-22 21:33:47 -08:00
parent 6c253164e7
commit 7d079c2c75
25 changed files with 86 additions and 51 deletions

View File

@ -198,6 +198,7 @@ TouchManager::PreHandleEvent(WidgetEvent* aEvent,
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

View File

@ -3956,6 +3956,7 @@ nsCSSRendering::DrawTableBorderSegment(nsRenderingContext& aContext,
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))) {
@ -4126,6 +4127,7 @@ nsCSSRendering::DrawTableBorderSegment(nsRenderingContext& aContext,
break;
}
// else fall through to solid
MOZ_FALLTHROUGH;
case NS_STYLE_BORDER_STYLE_SOLID:
DrawSolidBorderSegment(drawTarget, aBorder, aBorderColor,
aAppUnitsPerDevPixel, twipsPerPixel, aStartBevelSide,

View File

@ -642,7 +642,7 @@ MakeBorderColor(nscolor aColor, nscolor aBackgroundColor,
case BorderColorStyleLight:
k = 1;
/* fall through */
MOZ_FALLTHROUGH;
case BorderColorStyleDark:
NS_GetSpecial3DColors(colors, aBackgroundColor, aColor);
return Color::FromABGR(colors[k]);

View File

@ -4304,7 +4304,7 @@ GetBSizeTakenByBoxSizing(StyleBoxSizing aBoxSizing,
bSizeTakenByBoxSizing +=
aHorizontalAxis ? styleBorder->GetComputedBorder().TopBottom()
: styleBorder->GetComputedBorder().LeftRight();
// fall through
MOZ_FALLTHROUGH;
}
case StyleBoxSizing::Padding: {
if (!aIgnorePadding) {
@ -4329,7 +4329,7 @@ GetBSizeTakenByBoxSizing(StyleBoxSizing aBoxSizing,
bSizeTakenByBoxSizing += pad;
}
}
// fall through
MOZ_FALLTHROUGH;
}
case StyleBoxSizing::Content:
default:
@ -5076,10 +5076,10 @@ nsLayoutUtils::ComputeSizeWithIntrinsicDimensions(WritingMode 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;

View File

@ -2494,6 +2494,7 @@ MainAxisPositionTracker::
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;
@ -2684,6 +2685,7 @@ CrossAxisPositionTracker::
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;
@ -2970,6 +2972,7 @@ SingleLineCrossAxisPositionTracker::
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;

View File

@ -4349,10 +4349,10 @@ nsFrame::ComputeSize(nsRenderingContext *aRenderingContext,
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;
@ -6796,6 +6796,7 @@ nsIFrame::PeekOffset(nsPeekOffsetStruct* aPos)
aPos->mWordMovementType = eEndWord;
}
// Intentionally fall through the eSelectWord case.
MOZ_FALLTHROUGH;
case eSelectWord:
{
// wordSelectEatSpace means "are we looking for a boundary between whitespace

View File

@ -1196,6 +1196,7 @@ AlignJustifySelf(uint8_t aAlignment, bool aOverflowSafe, LogicalAxis aAxis,
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;
@ -2959,6 +2960,7 @@ nsGridContainerFrame::Tracks::AlignJustifyContent(
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;

View File

@ -1149,10 +1149,10 @@ nsHTMLReflowState::CalculateBorderPaddingMargin(
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;

View File

@ -3008,6 +3008,7 @@ nsLineLayout::ExpandRubyBox(PerFrameData* aFrame, nscoord aReservedISize,
}
// 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.
@ -3199,6 +3200,7 @@ nsLineLayout::TextAlignLine(nsLineBox* aLine,
}
// Fall through to the default case if we could not justify to fill
// the space.
MOZ_FALLTHROUGH;
}
case NS_STYLE_TEXT_ALIGN_DEFAULT:

View File

@ -195,7 +195,7 @@ nsPrintPreviewListener::HandleEvent(nsIDOMEvent* aEvent)
}
}
}
// fall-through
MOZ_FALLTHROUGH;
case eEventAction_Suppress:
aEvent->StopPropagation();
aEvent->PreventDefault();

View File

@ -125,7 +125,7 @@ CSSLexer::NextToken(Nullable<CSSToken>& aResult)
case eCSSToken_Dimension:
resultToken.mText.Construct(token.mIdent);
/* FALLTHROUGH */
MOZ_FALLTHROUGH;
case eCSSToken_Number:
case eCSSToken_Percentage:
resultToken.mNumber.Construct(token.mNumber);

View File

@ -438,6 +438,7 @@ Declaration::GetValue(nsCSSProperty aProperty, nsAString& aValue,
}
// tweak aProperty and fall through
aProperty = eCSSProperty_border_top;
MOZ_FALLTHROUGH;
}
case eCSSProperty_border_top:
case eCSSProperty_border_right:
@ -1065,6 +1066,7 @@ Declaration::GetValue(nsCSSProperty aProperty, nsAString& aValue,
return;
}
// Fall through to eCSSProperty_grid_template
MOZ_FALLTHROUGH;
}
case eCSSProperty_grid_template: {
const nsCSSValue& areasValue =

View File

@ -136,6 +136,7 @@ AppendFunction(nsCSSKeyword aTransformFunction)
break;
default:
NS_ERROR("must be a transform function");
MOZ_FALLTHROUGH;
case eCSSKeyword_translatex:
case eCSSKeyword_translatey:
case eCSSKeyword_translatez:
@ -1684,6 +1685,7 @@ AddFilterFunctionImpl(double aCoeff1, const nsCSSValueList* aList1,
case eCSSKeyword_invert:
case eCSSKeyword_sepia:
initialVal = 0.0f;
MOZ_FALLTHROUGH;
case eCSSKeyword_brightness:
case eCSSKeyword_contrast:
case eCSSKeyword_opacity:
@ -1864,7 +1866,7 @@ AddTransformLists(double aCoeff1, const nsCSSValueList* aList1,
arr->Item(4));
break;
}
// FALL THROUGH
MOZ_FALLTHROUGH;
}
case eCSSKeyword_matrix:
case eCSSKeyword_matrix3d:
@ -3982,4 +3984,3 @@ StyleAnimationValue::operator==(const StyleAnimationValue& aOther) const
NS_NOTREACHED("incomplete case");
return false;
}

View File

@ -2730,8 +2730,7 @@ CSSParserImpl::ResolveValueWithVariableReferencesRec(
break;
default:
NS_NOTREACHED("unexpected token type");
// fall through
MOZ_FALLTHROUGH_ASSERT("unexpected token type");
case eCSSToken_ID:
case eCSSToken_String:
case eCSSToken_Includes:
@ -4329,7 +4328,7 @@ CSSParserImpl::ParseKeyframeSelectorList(InfallibleTArray<float>& aSelectorList)
value = 1.0f;
break;
}
// fall through
MOZ_FALLTHROUGH;
default:
UngetToken();
// The first time through the loop, this means we got an empty
@ -7409,7 +7408,7 @@ CSSParserImpl::ParseVariantWithRestrictions(nsCSSValue& aValue,
{
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:
@ -10099,7 +10098,7 @@ CSSParserImpl::IsLegacyGradientLine(const nsCSSTokenType& aType,
haveGradientLine = true;
break;
}
// fall through
MOZ_FALLTHROUGH;
case eCSSToken_ID:
case eCSSToken_Hash:
// this is a color
@ -10751,8 +10750,10 @@ CSSParserImpl::ParseBoxProperties(const nsCSSProperty aPropIDs[])
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;
}
@ -10794,8 +10795,10 @@ CSSParserImpl::ParseGroupedBoxProperty(int32_t aVariantMask,
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;
}
@ -10891,15 +10894,25 @@ CSSParserImpl::ParseBoxCornerRadiiInternals(nsCSSValue array[])
// 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) {

View File

@ -536,10 +536,10 @@ nsComputedDOMStyle::GetAdjustedValuesForBoxSizing()
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;
@ -3838,7 +3838,7 @@ nsComputedDOMStyle::DoGetTextSizeAdjust()
switch (StyleText()->mTextSizeAdjust) {
default:
NS_NOTREACHED("unexpected value");
// fall through
MOZ_FALLTHROUGH;
case NS_STYLE_TEXT_SIZE_ADJUST_AUTO:
val->SetIdent(eCSSKeyword_auto);
break;

View File

@ -187,6 +187,7 @@ nsRuleNode::EnsureBlockDisplay(uint8_t& display,
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*
@ -751,8 +752,7 @@ GetFloatFromBoxPosition(int32_t aEnumValue)
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;
}

View File

@ -2580,8 +2580,7 @@ void nsTimingFunction::AssignFromKeyword(int32_t aTimingFunctionType)
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;

View File

@ -260,10 +260,10 @@ FixedTableLayoutStrategy::ComputeColumnISizes(const nsHTMLReflowState& aReflowSt
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;

View File

@ -108,7 +108,7 @@ SpanningCellSorter::GetNext(int32_t *aColSpan)
/* prepare to enumerate the array */
mState = ENUMERATING_ARRAY;
mEnumerationIndex = 0;
/* fall through */
MOZ_FALLTHROUGH;
case ENUMERATING_ARRAY:
while (mEnumerationIndex < ARRAY_SIZE && !mArray[mEnumerationIndex])
++mEnumerationIndex;
@ -138,7 +138,7 @@ SpanningCellSorter::GetNext(int32_t *aColSpan)
SortArray, nullptr);
mSortedHashTable = sh;
}
/* fall through */
MOZ_FALLTHROUGH;
case ENUMERATING_HASH:
if (mEnumerationIndex < mHashTable.EntryCount()) {
Item *result = mSortedHashTable[mEnumerationIndex]->mItems;
@ -153,7 +153,7 @@ SpanningCellSorter::GetNext(int32_t *aColSpan)
return result;
}
mState = DONE;
/* fall through */
MOZ_FALLTHROUGH;
case DONE:
;
}

View File

@ -926,7 +926,7 @@ nsTableCellMap::ResetBStartStart(LogicalSide aSide,
switch(aSide) {
case eLogicalSideBEnd:
aRowIndex++;
// FALLTHROUGH
MOZ_FALLTHROUGH;
case eLogicalSideBStart:
cellData = (BCCellData*)aCellMap.GetDataAt(aRowIndex, aColIndex);
if (cellData) {
@ -949,7 +949,7 @@ nsTableCellMap::ResetBStartStart(LogicalSide aSide,
break;
case eLogicalSideIEnd:
aColIndex++;
// FALLTHROUGH
MOZ_FALLTHROUGH;
case eLogicalSideIStart:
cellData = (BCCellData*)aCellMap.GetDataAt(aRowIndex, aColIndex);
if (cellData) {
@ -994,6 +994,7 @@ nsTableCellMap::SetBCBorderEdge(LogicalSide aSide,
case eLogicalSideBEnd:
rgYPos++;
yPos++;
MOZ_FALLTHROUGH;
case eLogicalSideBStart:
lastIndex = xPos + aLength - 1;
for (xIndex = xPos; xIndex <= lastIndex; xIndex++) {
@ -1040,6 +1041,7 @@ nsTableCellMap::SetBCBorderEdge(LogicalSide aSide,
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;

View File

@ -6984,7 +6984,8 @@ BCBlockDirSeg::Paint(BCPaintBorderIterator& aIter,
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();
@ -6994,20 +6995,22 @@ BCBlockDirSeg::Paint(BCPaintBorderIterator& aIter,
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");
@ -7015,7 +7018,8 @@ BCBlockDirSeg::Paint(BCPaintBorderIterator& aIter,
break;
case eAjaCellOwner:
side = eLogicalSideIEnd;
cell = mAjaCell; // and fall through
cell = mAjaCell;
MOZ_FALLTHROUGH;
case eCellOwner:
owner = cell;
break;
@ -7192,7 +7196,7 @@ BCInlineDirSeg::Paint(BCPaintBorderIterator& aIter,
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");
@ -7202,7 +7206,7 @@ BCInlineDirSeg::Paint(BCPaintBorderIterator& aIter,
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");
@ -7211,14 +7215,14 @@ BCInlineDirSeg::Paint(BCPaintBorderIterator& aIter,
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;
@ -7227,7 +7231,7 @@ BCInlineDirSeg::Paint(BCPaintBorderIterator& aIter,
// 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;

View File

@ -659,6 +659,7 @@ nsTableRowFrame::CalculateCellActualBSize(nsTableCellFrame* aCellFrame,
break;
}
// Fall through to the coord case
MOZ_FALLTHROUGH;
}
case eStyleUnit_Coord: {
nscoord outsideBoxSizing = 0;

View File

@ -83,10 +83,10 @@ nsResizerFrame::HandleEvent(nsPresContext* aPresContext,
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;
@ -102,7 +102,7 @@ nsResizerFrame::HandleEvent(nsPresContext* aPresContext,
break;
doDefault = false;
// ask the widget implementation to begin a resize drag if it can
Direction direction = GetDirection();
nsresult rv = aEvent->widget->BeginResizeDrag(aEvent,

View File

@ -556,6 +556,7 @@ nsSliderFrame::HandleEvent(nsPresContext* aPresContext,
//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;

View File

@ -2263,6 +2263,7 @@ nsXULPopupManager::HandleKeyboardEventWithKeyCode(
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.