Refine WebKit workaround.
And still more hackery required for Safari.