How do courts balance freedom of speech with respect for historical figures in India?

The Bombay High Court dismissed a petition against Rahul Gandhi over his remarks on Savarkar. I want to understand how courts decide what counts as free speech and what might be disrespectful or defamatory, especially when it involves historical personalities.