diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-24 21:27:02 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-24 21:27:02 +0000 |
commit | 7f3281457403023700e82f56efe919f9445cae6f (patch) | |
tree | 4addb1c86be41ac3efc1383651c2461fda6abd9e | |
parent | 9ce59a62d6c7bc425d128e21c0889cdf3745fb66 (diff) | |
download | chromium_src-7f3281457403023700e82f56efe919f9445cae6f.zip chromium_src-7f3281457403023700e82f56efe919f9445cae6f.tar.gz chromium_src-7f3281457403023700e82f56efe919f9445cae6f.tar.bz2 |
Remove ViewMsg_FormFill and the underlying implementation FillForm which are not used anymore.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/657059
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39925 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/renderer_host/render_view_host.cc | 4 | ||||
-rw-r--r-- | chrome/browser/renderer_host/render_view_host.h | 3 | ||||
-rw-r--r-- | chrome/renderer/render_view.cc | 5 | ||||
-rw-r--r-- | chrome/renderer/render_view.h | 1 | ||||
-rw-r--r-- | webkit/glue/dom_operations.cc | 27 | ||||
-rw-r--r-- | webkit/glue/dom_operations.h | 6 |
6 files changed, 7 insertions, 39 deletions
diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc index 0fbf69b..939bdce 100644 --- a/chrome/browser/renderer_host/render_view_host.cc +++ b/chrome/browser/renderer_host/render_view_host.cc @@ -411,10 +411,6 @@ void RenderViewHost::SetAlternateErrorPageURL(const GURL& url) { Send(new ViewMsg_SetAltErrorPageURL(routing_id(), url)); } -void RenderViewHost::FillForm(const FormData& form_data) { - Send(new ViewMsg_FormFill(routing_id(), form_data)); -} - void RenderViewHost::FillPasswordForm( const PasswordFormDomManager::FillData& form_data) { Send(new ViewMsg_FillPasswordForm(routing_id(), form_data)); diff --git a/chrome/browser/renderer_host/render_view_host.h b/chrome/browser/renderer_host/render_view_host.h index 46f7a50..2dfaf9f 100644 --- a/chrome/browser/renderer_host/render_view_host.h +++ b/chrome/browser/renderer_host/render_view_host.h @@ -221,9 +221,6 @@ class RenderViewHost : public RenderWidgetHost { // alternate error pages. void SetAlternateErrorPageURL(const GURL& url); - // Fill out a form within the page with the specified data. - void FillForm(const FormData& form_data); - // Fill out a password form and trigger DOM autocomplete in the case // of multiple matching logins. void FillPasswordForm( diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index 74acd9c..860e909 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -530,7 +530,6 @@ void RenderView::OnMessageReceived(const IPC::Message& message) { IPC_MESSAGE_HANDLER(ViewMsg_CSSInsertRequest, OnCSSInsertRequest) IPC_MESSAGE_HANDLER(ViewMsg_AddMessageToConsole, OnAddMessageToConsole) IPC_MESSAGE_HANDLER(ViewMsg_ReservePageIDRange, OnReservePageIDRange) - IPC_MESSAGE_HANDLER(ViewMsg_FormFill, OnFormFill) IPC_MESSAGE_HANDLER(ViewMsg_FillPasswordForm, OnFillPasswordForm) IPC_MESSAGE_HANDLER(ViewMsg_DragTargetDragEnter, OnDragTargetDragEnter) IPC_MESSAGE_HANDLER(ViewMsg_DragTargetDragOver, OnDragTargetDragOver) @@ -3485,10 +3484,6 @@ void RenderView::OnDragSourceSystemDragEnded() { webview()->dragSourceSystemDragEnded(); } -void RenderView::OnFormFill(const FormData& form) { - webkit_glue::FillForm(this->webview(), form); -} - void RenderView::OnFillPasswordForm( const webkit_glue::PasswordFormDomManager::FillData& form_data) { webkit_glue::FillPasswordForm(this->webview(), form_data); diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h index 85cd503..b64de01 100644 --- a/chrome/renderer/render_view.h +++ b/chrome/renderer/render_view.h @@ -632,7 +632,6 @@ class RenderView : public RenderWidget, const std::vector<GURL>& links, const std::vector<FilePath>& local_paths, const FilePath& local_directory_name); - void OnFormFill(const FormData& form); void OnFillPasswordForm( const webkit_glue::PasswordFormDomManager::FillData& form_data); void OnDragTargetDragEnter(const WebDropData& drop_data, diff --git a/webkit/glue/dom_operations.cc b/webkit/glue/dom_operations.cc index dbf4ea9..eab8e40f5 100644 --- a/webkit/glue/dom_operations.cc +++ b/webkit/glue/dom_operations.cc @@ -203,7 +203,7 @@ static bool FillFormImpl(FormElements* fe, const FormData& data, bool submit) { // Helper to search the given form element for the specified input elements // in |data|, and add results to |result|. -static bool FindFormInputElements(WebFormElement& fe, +static bool FindFormInputElements(WebFormElement* fe, const FormData& data, FormElements* result) { // Loop through the list of elements we need to find on the form in @@ -211,7 +211,7 @@ static bool FindFormInputElements(WebFormElement& fe, // processing this form; it can't be the right one. for (size_t j = 0; j < data.elements.size(); j++) { WebVector<WebNode> temp_elements; - fe.getNamedElements(data.elements[j], temp_elements); + fe->getNamedElements(data.elements[j], temp_elements); if (temp_elements.isEmpty()) { // We didn't find a required element. This is not the right form. // Make sure no input elements from a partially matched form @@ -266,7 +266,7 @@ static void FindFormElements(WebView* view, continue; scoped_ptr<FormElements> curr_elements(new FormElements); - if (!FindFormInputElements(fe, data, curr_elements.get())) + if (!FindFormInputElements(&fe, data, curr_elements.get())) continue; // We found the right element. @@ -277,21 +277,6 @@ static void FindFormElements(WebView* view, } } -bool FillForm(WebView* view, const FormData& data) { - FormElementsList forms; - FindFormElements(view, data, &forms); - bool success = false; - if (!forms.empty()) - success = FillFormImpl(forms[0], data, false); - - // TODO(timsteele): Move STLDeleteElements to base/ and have FormElementsList - // use that. - FormElementsList::iterator iter; - for (iter = forms.begin(); iter != forms.end(); ++iter) - delete *iter; - return success; -} - void FillPasswordForm(WebView* view, const PasswordFormDomManager::FillData& data) { FormElementsList forms; @@ -351,7 +336,7 @@ WebString GetSubResourceLinkFromElement(const WebElement& element) { } else if (element.hasTagName("link")) { // If the link element is not linked to css, ignore it. if (LowerCaseEqualsASCII(element.getAttribute("type"), "text/css")) { - // TODO(jnd). Add support for extracting links of sub-resources which + // TODO(jnd): Add support for extracting links of sub-resources which // are inside style-sheet such as @import, url(), etc. // See bug: http://b/issue?id=1111667. attribute_name = "href"; @@ -363,7 +348,7 @@ WebString GetSubResourceLinkFromElement(const WebElement& element) { // If value has content and not start with "javascript:" then return it, // otherwise return NULL. if (!value.isNull() && !value.isEmpty() && - !StartsWithASCII(value.utf8(),"javascript:", false)) + !StartsWithASCII(value.utf8(), "javascript:", false)) return value; return WebString(); @@ -614,4 +599,4 @@ int NumberOfActiveAnimations(WebView* view) { return controller->numberOfActiveAnimations(); } -} // webkit_glue +} // webkit_glue diff --git a/webkit/glue/dom_operations.h b/webkit/glue/dom_operations.h index 551666b..2156b31 100644 --- a/webkit/glue/dom_operations.h +++ b/webkit/glue/dom_operations.h @@ -7,6 +7,7 @@ #include <string> #include <map> +#include <vector> #include "base/gfx/size.h" #include "googleurl/src/gurl.h" @@ -16,14 +17,9 @@ namespace WebKit { class WebView; } -struct FormData; - // A collection of operations that access the underlying WebKit DOM directly. namespace webkit_glue { -// Fill in a form identified by form |data|. -bool FillForm(WebKit::WebView* view, const FormData& data); - // Fill matching password forms and trigger autocomplete in the case of multiple // matching logins. void FillPasswordForm(WebKit::WebView* view, |