Hm, which version of Firefox do you refer to? For my version 26, the password is not filled in if `autocomplete="off"`. I do not see why we need that much code.