Refactor to have two kinds of bitmap tests, one for spark label and one for textfield.