Index: Source/core/html/forms/EmailInputType.cpp |
diff --git a/Source/core/html/forms/EmailInputType.cpp b/Source/core/html/forms/EmailInputType.cpp |
index fc846f831687fb54ea74fa25d130a66b8f7dabe3..7c31462add9c988c5086667d939dd594289875da 100644 |
--- a/Source/core/html/forms/EmailInputType.cpp |
+++ b/Source/core/html/forms/EmailInputType.cpp |
@@ -133,7 +133,7 @@ static bool isValidEmailAddress(const String& address) |
return !matchOffset && matchLength == addressLength; |
} |
-PassRefPtr<InputType> EmailInputType::create(HTMLInputElement* element) |
+PassRefPtr<InputType> EmailInputType::create(HTMLInputElement& element) |
{ |
return adoptRef(new EmailInputType(element)); |
} |
@@ -156,7 +156,7 @@ String EmailInputType::findInvalidAddress(const String& value) const |
{ |
if (value.isEmpty()) |
return String(); |
- if (!element()->multiple()) |
+ if (!element().multiple()) |
return isValidEmailAddress(value) ? String() : value; |
Vector<String> addresses; |
value.split(',', true, addresses); |
@@ -175,12 +175,12 @@ bool EmailInputType::typeMismatchFor(const String& value) const |
bool EmailInputType::typeMismatch() const |
{ |
- return typeMismatchFor(element()->value()); |
+ return typeMismatchFor(element().value()); |
} |
String EmailInputType::typeMismatchText() const |
{ |
- String invalidAddress = findInvalidAddress(element()->value()); |
+ String invalidAddress = findInvalidAddress(element().value()); |
ASSERT(!invalidAddress.isNull()); |
if (invalidAddress.isEmpty()) |
return locale().queryString(WebLocalizedString::ValidationTypeMismatchForEmailEmpty); |
@@ -212,7 +212,7 @@ String EmailInputType::typeMismatchText() const |
ASSERT(atIndexInUnicode != kNotFound); |
return locale().queryString(WebLocalizedString::ValidationTypeMismatchForEmailInvalidDots, String("."), unicodeAddress.substring(atIndexInUnicode + 1)); |
} |
- if (element()->multiple()) |
+ if (element().multiple()) |
return locale().queryString(WebLocalizedString::ValidationTypeMismatchForMultipleEmail); |
return locale().queryString(WebLocalizedString::ValidationTypeMismatchForEmail); |
} |
@@ -230,7 +230,7 @@ bool EmailInputType::supportsSelectionAPI() const |
String EmailInputType::sanitizeValue(const String& proposedValue) const |
{ |
String noLineBreakValue = proposedValue.removeCharacters(isHTMLLineBreak); |
- if (!element()->multiple()) |
+ if (!element().multiple()) |
return stripLeadingAndTrailingHTMLSpaces(noLineBreakValue); |
Vector<String> addresses; |
noLineBreakValue.split(',', true, addresses); |
@@ -246,7 +246,7 @@ String EmailInputType::sanitizeValue(const String& proposedValue) const |
String EmailInputType::convertFromVisibleValue(const String& visibleValue) const |
{ |
String sanitizedValue = sanitizeValue(visibleValue); |
- if (!element()->multiple()) |
+ if (!element().multiple()) |
return convertEmailAddressToASCII(sanitizedValue); |
Vector<String> addresses; |
sanitizedValue.split(',', true, addresses); |
@@ -262,8 +262,8 @@ String EmailInputType::convertFromVisibleValue(const String& visibleValue) const |
String EmailInputType::visibleValue() const |
{ |
- String value = element()->value(); |
- if (!element()->multiple()) |
+ String value = element().value(); |
+ if (!element().multiple()) |
return convertEmailAddressToUnicode(value); |
Vector<String> addresses; |