Fix weird rendering artifacts on WebKit