#pragma once
#include <wtf/EnumTraits.h>
#include <wtf/text/AtomString.h>
#include <wtf/text/WTFString.h>
namespace WebCore {
enum class AutofillMantle {
Expectation,
Anchor
};
enum class AutofillFieldName {
None,
Name,
HonorificPrefix,
GivenName,
AdditionalName,
FamilyName,
HonorificSuffix,
Nickname,
Username,
NewPassword,
CurrentPassword,
OrganizationTitle,
Organization,
StreetAddress,
AddressLine1,
AddressLine2,
AddressLine3,
AddressLevel4,
AddressLevel3,
AddressLevel2,
AddressLevel1,
Country,
CountryName,
PostalCode,
CcName,
CcGivenName,
CcAdditionalName,
CcFamilyName,
CcNumber,
CcExp,
CcExpMonth,
CcExpYear,
CcCsc,
CcType,
TransactionCurrency,
TransactionAmount,
Language,
Bday,
BdayDay,
BdayMonth,
BdayYear,
Sex,
URL,
Photo,
Tel,
TelCountryCode,
TelNational,
TelAreaCode,
TelLocal,
TelLocalPrefix,
TelLocalSuffix,
TelExtension,
Email,
Impp
};
WEBCORE_EXPORT AutofillFieldName toAutofillFieldName(const AtomString&);
class HTMLFormControlElement;
class AutofillData {
public:
static AutofillData createFromHTMLFormControlElement(const HTMLFormControlElement&);
AutofillData(const AtomString& fieldName, const String& idlExposedValue)
: fieldName(fieldName)
, idlExposedValue(idlExposedValue)
{
}
AtomString fieldName;
String idlExposedValue;
};
}
namespace WTF {
template<> struct EnumTraits<WebCore::AutofillFieldName> {
using values = EnumValues<
WebCore::AutofillFieldName,
WebCore::AutofillFieldName::None,
WebCore::AutofillFieldName::Name,
WebCore::AutofillFieldName::HonorificPrefix,
WebCore::AutofillFieldName::GivenName,
WebCore::AutofillFieldName::AdditionalName,
WebCore::AutofillFieldName::FamilyName,
WebCore::AutofillFieldName::HonorificSuffix,
WebCore::AutofillFieldName::Nickname,
WebCore::AutofillFieldName::Username,
WebCore::AutofillFieldName::NewPassword,
WebCore::AutofillFieldName::CurrentPassword,
WebCore::AutofillFieldName::OrganizationTitle,
WebCore::AutofillFieldName::Organization,
WebCore::AutofillFieldName::StreetAddress,
WebCore::AutofillFieldName::AddressLine1,
WebCore::AutofillFieldName::AddressLine2,
WebCore::AutofillFieldName::AddressLine3,
WebCore::AutofillFieldName::AddressLevel4,
WebCore::AutofillFieldName::AddressLevel3,
WebCore::AutofillFieldName::AddressLevel2,
WebCore::AutofillFieldName::AddressLevel1,
WebCore::AutofillFieldName::Country,
WebCore::AutofillFieldName::CountryName,
WebCore::AutofillFieldName::PostalCode,
WebCore::AutofillFieldName::CcName,
WebCore::AutofillFieldName::CcGivenName,
WebCore::AutofillFieldName::CcAdditionalName,
WebCore::AutofillFieldName::CcFamilyName,
WebCore::AutofillFieldName::CcNumber,
WebCore::AutofillFieldName::CcExp,
WebCore::AutofillFieldName::CcExpMonth,
WebCore::AutofillFieldName::CcExpYear,
WebCore::AutofillFieldName::CcCsc,
WebCore::AutofillFieldName::CcType,
WebCore::AutofillFieldName::TransactionCurrency,
WebCore::AutofillFieldName::TransactionAmount,
WebCore::AutofillFieldName::Language,
WebCore::AutofillFieldName::Bday,
WebCore::AutofillFieldName::BdayDay,
WebCore::AutofillFieldName::BdayMonth,
WebCore::AutofillFieldName::BdayYear,
WebCore::AutofillFieldName::Sex,
WebCore::AutofillFieldName::URL,
WebCore::AutofillFieldName::Photo,
WebCore::AutofillFieldName::Tel,
WebCore::AutofillFieldName::TelCountryCode,
WebCore::AutofillFieldName::TelNational,
WebCore::AutofillFieldName::TelAreaCode,
WebCore::AutofillFieldName::TelLocal,
WebCore::AutofillFieldName::TelLocalPrefix,
WebCore::AutofillFieldName::TelLocalSuffix,
WebCore::AutofillFieldName::TelExtension,
WebCore::AutofillFieldName::Email,
WebCore::AutofillFieldName::Impp
>;
};
}