bool VisibleSelection::isInPasswordField() const { HTMLTextFormControlElement* textControl = enclosingTextFormControl(start()); return is<HTMLInputElement>(textControl) && downcast<HTMLInputElement>(*textControl).isPasswordField(); }
bool isSelectionInTextFormControl(const VisibleSelection& selection) { return !!enclosingTextFormControl(selection.start()); }