High Court ruling reshapes custody case