Bug 882602 - clean up getText* line boundary code, r=tbsaunde