fix hit test in FireFox, painter in animation frame