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

Unified Diff: webkit/glue/editor_client_impl.cc

Issue 50038: Fix for autofill bug 8627 (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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
« no previous file with comments | « webkit/glue/dom_operations.cc ('k') | webkit/glue/webview_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/editor_client_impl.cc
===================================================================
--- webkit/glue/editor_client_impl.cc (revision 12331)
+++ webkit/glue/editor_client_impl.cc (working copy)
@@ -28,6 +28,7 @@
#include "base/string_util.h"
#include "third_party/WebKit/WebKit/chromium/public/WebKit.h"
#include "webkit/glue/autofill_form.h"
+#include "webkit/glue/dom_operations.h"
#include "webkit/glue/editor_client_impl.h"
#include "webkit/glue/glue_util.h"
#include "webkit/glue/webkit_glue.h"
@@ -664,14 +665,10 @@
}
void EditorClientImpl::ShowAutofillForNode(WebCore::Node* node) {
- if (node->nodeType() == WebCore::Node::ELEMENT_NODE) {
- WebCore::Element* element = static_cast<WebCore::Element*>(node);
- if (element->hasLocalName(WebCore::HTMLNames::inputTag)) {
- WebCore::HTMLInputElement* input_element =
- static_cast<WebCore::HTMLInputElement*>(element);
- Autofill(input_element, true);
- }
- }
+ WebCore::HTMLInputElement* input_element =
+ webkit_glue::NodeToHTMLInputElement(node);
+ if (input_element)
+ Autofill(input_element, true);
}
void EditorClientImpl::Autofill(WebCore::HTMLInputElement* input_element,
« no previous file with comments | « webkit/glue/dom_operations.cc ('k') | webkit/glue/webview_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698