summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-20 22:49:47 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-20 22:49:47 +0000
commit51bd36619bfaa05e98b3a6f58d48aaca6a66e307 (patch)
tree93b978a5ac16359aee752c8d41413e24410fc51d /webkit
parent655aa8d8075c12a8846bedfb080ab71f4231aaa0 (diff)
downloadchromium_src-51bd36619bfaa05e98b3a6f58d48aaca6a66e307.zip
chromium_src-51bd36619bfaa05e98b3a6f58d48aaca6a66e307.tar.gz
chromium_src-51bd36619bfaa05e98b3a6f58d48aaca6a66e307.tar.bz2
Rename AutoFillForm to FormFieldValues to better reflect the purpose of the data structure.
BUG=none TEST=none Review URL: http://codereview.chromium.org/306014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29580 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/editor_client_impl.cc21
-rw-r--r--webkit/glue/form_field_values.cc (renamed from webkit/glue/autofill_form.cc)14
-rw-r--r--webkit/glue/form_field_values.h (renamed from webkit/glue/autofill_form.h)14
-rw-r--r--webkit/webkit.gyp4
4 files changed, 26 insertions, 27 deletions
diff --git a/webkit/glue/editor_client_impl.cc b/webkit/glue/editor_client_impl.cc
index fe80246..1790ef9 100644
--- a/webkit/glue/editor_client_impl.cc
+++ b/webkit/glue/editor_client_impl.cc
@@ -16,7 +16,6 @@
#include "KeyboardCodes.h"
#include "HTMLInputElement.h"
#include "HTMLNames.h"
-#include "Frame.h"
#include "KeyboardEvent.h"
#include "PlatformKeyboardEvent.h"
#include "PlatformString.h"
@@ -31,15 +30,15 @@
#include "webkit/api/public/WebViewClient.h"
// Can include api/src since eventually editor_client_impl will be there too.
#include "webkit/api/src/DOMUtilitiesPrivate.h"
-#include "webkit/glue/autofill_form.h"
#include "webkit/glue/editor_client_impl.h"
+#include "webkit/glue/form_field_values.h"
#include "webkit/glue/glue_util.h"
#include "webkit/glue/webview_impl.h"
using WebKit::WebEditingAction;
using WebKit::WebString;
using WebKit::WebTextAffinity;
-using webkit_glue::AutofillForm;
+using webkit_glue::FormFieldValues;
// Arbitrary depth limit for the undo stack, to keep it from using
// unbounded memory. This is the maximum number of distinct undoable
@@ -637,7 +636,8 @@ void EditorClientImpl::handleKeyboardEvent(WebCore::KeyboardEvent* evt) {
evt->setDefaultHandled();
}
-void EditorClientImpl::handleInputMethodKeydown(WebCore::KeyboardEvent* keyEvent) {
+void EditorClientImpl::handleInputMethodKeydown(
+ WebCore::KeyboardEvent* keyEvent) {
// We handle IME within chrome.
}
@@ -706,7 +706,7 @@ bool EditorClientImpl::Autofill(WebCore::HTMLInputElement* input_element,
return false;
}
- string16 name = AutofillForm::GetNameForInputElement(input_element);
+ string16 name = FormFieldValues::GetNameForInputElement(input_element);
if (name.empty()) // If the field has no name, then we won't have values.
return false;
@@ -766,7 +766,7 @@ void EditorClientImpl::DoAutofill(WebCore::Timer<EditorClientImpl>* timer) {
}
// Then trigger form autofill.
- string16 name = AutofillForm::GetNameForInputElement(input_element);
+ string16 name = FormFieldValues::GetNameForInputElement(input_element);
ASSERT(static_cast<int>(name.length()) > 0);
if (webview_->client()) {
@@ -865,9 +865,8 @@ WebCore::String EditorClientImpl::getAutoCorrectSuggestionForMisspelledWord(
}
void EditorClientImpl::checkGrammarOfString(const UChar*, int length,
- WTF::Vector<WebCore::GrammarDetail>&,
- int* badGrammarLocation,
- int* badGrammarLength) {
+ WTF::Vector<WebCore::GrammarDetail>&, int* badGrammarLocation,
+ int* badGrammarLength) {
NOTIMPLEMENTED();
if (badGrammarLocation)
*badGrammarLocation = 0;
@@ -876,7 +875,7 @@ void EditorClientImpl::checkGrammarOfString(const UChar*, int length,
}
void EditorClientImpl::updateSpellingUIWithGrammarString(const WebCore::String&,
- const WebCore::GrammarDetail& detail) {
+ const WebCore::GrammarDetail& detail) {
NOTIMPLEMENTED();
}
@@ -900,7 +899,7 @@ bool EditorClientImpl::spellingUIIsShowing() {
}
void EditorClientImpl::getGuessesForWord(const WebCore::String&,
- WTF::Vector<WebCore::String>& guesses) {
+ WTF::Vector<WebCore::String>& guesses) {
NOTIMPLEMENTED();
}
diff --git a/webkit/glue/autofill_form.cc b/webkit/glue/form_field_values.cc
index 5c1a77b..97ce119 100644
--- a/webkit/glue/autofill_form.cc
+++ b/webkit/glue/form_field_values.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -14,14 +14,14 @@
#include "base/logging.h"
#include "base/string_util.h"
#include "webkit/api/public/WebForm.h"
-#include "webkit/glue/autofill_form.h"
+#include "webkit/glue/form_field_values.h"
#include "webkit/glue/glue_util.h"
using WebKit::WebForm;
namespace webkit_glue {
-AutofillForm* AutofillForm::Create(const WebForm& webform) {
+FormFieldValues* FormFieldValues::Create(const WebForm& webform) {
RefPtr<WebCore::HTMLFormElement> form = WebFormToHTMLFormElement(webform);
DCHECK(form);
@@ -36,8 +36,8 @@ AutofillForm* AutofillForm::Create(const WebForm& webform) {
const WTF::Vector<WebCore::HTMLFormControlElement*>& form_elements =
form->formElements;
- // Construct a new AutofillForm.
- AutofillForm* result = new AutofillForm();
+ // Construct a new FormFieldValues.
+ FormFieldValues* result = new FormFieldValues();
size_t form_element_count = form_elements.size();
@@ -66,14 +66,14 @@ AutofillForm* AutofillForm::Create(const WebForm& webform) {
if (name.length() == 0)
continue; // If we have no name, there is nothing to store.
- result->elements.push_back(AutofillForm::Element(name, value));
+ result->elements.push_back(FormFieldValues::Element(name, value));
}
return result;
}
// static
-string16 AutofillForm::GetNameForInputElement(WebCore::HTMLInputElement*
+string16 FormFieldValues::GetNameForInputElement(WebCore::HTMLInputElement*
element) {
string16 name = StringToString16(element->name());
string16 trimmed_name;
diff --git a/webkit/glue/autofill_form.h b/webkit/glue/form_field_values.h
index 487c556..6f50304 100644
--- a/webkit/glue/autofill_form.h
+++ b/webkit/glue/form_field_values.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_GLUE_AUTOFILL_FORM_H_
-#define WEBKIT_GLUE_AUTOFILL_FORM_H_
+#ifndef WEBKIT_GLUE_FORM_FIELD_VALUES_H_
+#define WEBKIT_GLUE_FORM_FIELD_VALUES_H_
#include <string>
#include <vector>
@@ -18,9 +18,9 @@ class WebForm;
namespace webkit_glue {
-// The AutofillForm struct represents a single HTML form together with the
+// The FormFieldValues struct represents a single HTML form together with the
// values entered in the fields.
-class AutofillForm {
+class FormFieldValues {
public:
// Struct for storing name/value pairs.
struct Element {
@@ -33,7 +33,7 @@ class AutofillForm {
string16 value;
};
- static AutofillForm* Create(const WebKit::WebForm& form);
+ static FormFieldValues* Create(const WebKit::WebForm& form);
// Returns the name that should be used for the specified |element| when
// storing autofill data. This is either the field name or its id, an empty
@@ -47,4 +47,4 @@ class AutofillForm {
} // namespace webkit_glue
-#endif // WEBKIT_GLUE_AUTOFILL_FORM_H_
+#endif // WEBKIT_GLUE_FORM_FIELD_VALUES_H_
diff --git a/webkit/webkit.gyp b/webkit/webkit.gyp
index 89e0b47..3ef4f5a 100644
--- a/webkit/webkit.gyp
+++ b/webkit/webkit.gyp
@@ -541,8 +541,6 @@
'glue/plugins/webplugin_delegate_impl_win.cc',
'glue/alt_error_page_resource_fetcher.cc',
'glue/alt_error_page_resource_fetcher.h',
- 'glue/autofill_form.cc',
- 'glue/autofill_form.h',
'glue/back_forward_list_client_impl.cc',
'glue/back_forward_list_client_impl.h',
'glue/chrome_client_impl.cc',
@@ -569,6 +567,8 @@
'glue/entity_map.cc',
'glue/entity_map.h',
'glue/form_data.h',
+ 'glue/form_field_values.cc',
+ 'glue/form_field_values.h',
'glue/ftp_directory_listing_response_delegate.cc',
'glue/ftp_directory_listing_response_delegate.h',
'glue/glue_accessibility_object.cc',