I disagree with the ruling!
These people are protesting a military and government policy. However, they directing their protest at a grieving family and community. If they want to protest the homosexuals in the military issues they can go to the Pentagon or any enlistment center and do it, but to do it at the place where a grieving family is gathered to remember a life lost in a violent and tragic manor and to disrupt that service is infringing on their Rights to gather and exercise their religious beliefs.
Myself, as a Patriot Guard member I will stand silently and shield a family while not confronting or acknowledging the protesters. But if they disturb a service for a close friend or relative while I am in the mourners group, I will make sure they know and remember I was there and exercised my right to express myself.