The whole implementation of this class, barring my small functional change of adjustTextLength, is completely ripped (and kept structurally identical) to the original implementation of AttributeNameRegion. I was tempted to clean this code up too, but since we this class needs to change whenever AttributeNameRegion changes, I thought it might be smart to keep it as similar to the original. That way if the original changes, it will be easier see the differences and maintain this class. What do you think?