make WebKit spin code more DRY everywhere