Justices to rule in gun case with US raw from mass shootings