// Hack to trigger layout change in latest Mozilla
Then, whoever interested in the hack can read the full explanation from the commit message.Basically, for simple code with unclear purpose, I'd go with short comment in the code plus full explanation in the commit message. For hard-to-read code with complicated logic, I'd go with long comment in the code. Or refactoring.
Ticket description, commit message, code comment, and the code itself are all necessary to keep the codebase "documented".