summaryrefslogtreecommitdiffstats
path: root/webkit/glue/dom_operations.h
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-24 17:56:58 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-24 17:56:58 +0000
commitc8fed0d1f958d14c71aeaddc43bea1b11b5a5328 (patch)
tree1dcbd8bb7ed7e3f7012550facc9c8183861081da /webkit/glue/dom_operations.h
parent0b45add7a298db2c8e4f07ef6117ebfd0ab30c80 (diff)
downloadchromium_src-c8fed0d1f958d14c71aeaddc43bea1b11b5a5328.zip
chromium_src-c8fed0d1f958d14c71aeaddc43bea1b11b5a5328.tar.gz
chromium_src-c8fed0d1f958d14c71aeaddc43bea1b11b5a5328.tar.bz2
Clicking a text field that is already focused triggers the autofill. However the code triggering this was just checking that the focused element before and after processing the event was the same.
We need to do a hit test to ensure the click is really on the text field, otherwise in cases where clicking somewhere in the page does not change the focus, we would bogusly bring up the autofill popup. BUG=8627 TEST=Ensure autocomplete popup still works as expected: when entering text, when using up/down arrows, when clicking selected text field. Also ensures the scenario from the bug does not trigger the popup. Review URL: http://codereview.chromium.org/50038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12367 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/dom_operations.h')
-rw-r--r--webkit/glue/dom_operations.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/webkit/glue/dom_operations.h b/webkit/glue/dom_operations.h
index c6276de..a088ef7 100644
--- a/webkit/glue/dom_operations.h
+++ b/webkit/glue/dom_operations.h
@@ -12,6 +12,11 @@
#include "googleurl/src/gurl.h"
#include "webkit/glue/password_form_dom_manager.h"
+namespace WebCore {
+class Element;
+class Node;
+}
+
struct FormData;
class WebFrameImpl;
class WebView;
@@ -146,6 +151,11 @@ bool ElementDoesAutoCompleteForElementWithId(WebView* view,
// Returns the number of animations currently running.
int NumberOfActiveAnimations(WebView* view);
+// Returns the passed element/node casted to an HTMLInputElement if it is one,
+// NULL if it is not an HTMLInputElement.
+WebCore::HTMLInputElement* ElementToHTMLInputElement(WebCore::Element* element);
+WebCore::HTMLInputElement* NodeToHTMLInputElement(WebCore::Node* node);
+
} // namespace webkit_glue
#endif // WEBKIT_GLUE_DOM_OPERATIONS_H__