Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Unified Diff: Source/WebKit/chromium/src/WebPasswordFormUtils.cpp

Issue 19510005: [oilpan] Completely move HTMLFormControlElement's hierarchy to the managed heap Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/WebKit/chromium/src/WebPasswordFormUtils.cpp
diff --git a/Source/WebKit/chromium/src/WebPasswordFormUtils.cpp b/Source/WebKit/chromium/src/WebPasswordFormUtils.cpp
index f40d3ccadc1b63f1e74477e1a9b4a41fcec3c49f..2224b431863df507af2adbaa57cc692c07137dff 100644
--- a/Source/WebKit/chromium/src/WebPasswordFormUtils.cpp
+++ b/Source/WebKit/chromium/src/WebPasswordFormUtils.cpp
@@ -61,19 +61,19 @@ void findPasswordFormFields(HTMLFormElement* form, PasswordFormFields* fields)
ASSERT(form);
ASSERT(fields);
- HTMLInputElement* latestInputElement = 0;
+ Handle<HTMLInputElement> latestInputElement;
const Vector<FormAssociatedElement*>& formElements = form->associatedElements();
for (size_t i = 0; i < formElements.size(); i++) {
if (!formElements[i]->isFormControlElement())
continue;
- HTMLFormControlElement* formElement = static_cast<HTMLFormControlElement*>(formElements[i]);
+ Handle<HTMLFormControlElement> formElement(static_cast<HTMLFormControlElement*>(formElements[i]));
if (formElement->isActivatedSubmit())
- fields->submit = formElement;
+ fields->submit = formElement.raw();
if (!formElement->hasTagName(HTMLNames::inputTag))
continue;
- HTMLInputElement* inputElement = formElement->toInputElement();
+ Handle<HTMLInputElement> inputElement = formElement->toInputElement();
if (inputElement->isDisabledFormControl())
continue;
@@ -82,12 +82,12 @@ void findPasswordFormFields(HTMLFormElement* form, PasswordFormFields* fields)
// We assume that the username is the input element before the
// first password element.
if (fields->passwords.isEmpty() && latestInputElement) {
- fields->userName = latestInputElement;
+ fields->userName = latestInputElement.raw();
// Remove the selected username from alternateUserNames.
if (!fields->alternateUserNames.isEmpty() && !latestInputElement->value().isEmpty())
fields->alternateUserNames.removeLast();
}
- fields->passwords.append(inputElement);
+ fields->passwords.append(inputElement.raw());
}
// Various input types such as text, url, email can be a username field.
« no previous file with comments | « Source/WebKit/chromium/src/WebPasswordFormUtils.h ('k') | Source/WebKit/chromium/src/WebSearchableFormData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698