Does HTTPS protect against a man-in-the-browser attack?
No. HTTPS secures data in transit between the browser and server, but a man-in-the-browser attack operates inside the browser, after the page is decrypted and before a submission is encrypted. The channel stays valid while the content is tampered with, so the padlock offers no protection here.