Workaround for WebKit redraw bug