diff --git a/layout/generic/nsGridContainerFrame.cpp b/layout/generic/nsGridContainerFrame.cpp index deaf71683f1f..edc4bd29d57e 100644 --- a/layout/generic/nsGridContainerFrame.cpp +++ b/layout/generic/nsGridContainerFrame.cpp @@ -2936,15 +2936,17 @@ nsGridContainerFrame::Tracks::AlignJustifyContent( const bool isAlign = mAxis == eLogicalAxisBlock; auto stylePos = aReflowState.mStylePosition; - const auto valueAndFallback = isAlign ? - stylePos->ComputedAlignContent() : - stylePos->ComputedJustifyContent(); + auto valueAndFallback = isAlign ? stylePos->ComputedAlignContent() : + stylePos->ComputedJustifyContent(); WritingMode wm = aReflowState.GetWritingMode(); bool overflowSafe; auto alignment = ::GetAlignJustifyValue(valueAndFallback, wm, isAlign, &overflowSafe); if (alignment == NS_STYLE_ALIGN_NORMAL) { - alignment = NS_STYLE_ALIGN_START; + MOZ_ASSERT(valueAndFallback == NS_STYLE_ALIGN_NORMAL, + "*-content:normal cannot be specified with explicit fallback"); + alignment = NS_STYLE_ALIGN_STRETCH; + valueAndFallback = alignment; // we may need a fallback for 'stretch' below } // Compute the free space and count auto-sized tracks.