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

Issue 50038: Fix for autofill bug 8627 (Closed)

Created:
11 years, 9 months ago by jcampan
Modified:
9 years, 7 months ago
Reviewers:
eroman
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

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. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=12367

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 3

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -27 lines) Patch
M webkit/glue/dom_operations.h View 2 chunks +10 lines, -0 lines 0 comments Download
M webkit/glue/dom_operations.cc View 3 chunks +15 lines, -9 lines 0 comments Download
M webkit/glue/editor_client_impl.cc View 1 2 2 chunks +5 lines, -8 lines 0 comments Download
M webkit/glue/webview_impl.cc View 1 2 2 chunks +24 lines, -10 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
jcampan
11 years, 9 months ago (2009-03-19 22:40:17 UTC) #1
eroman
11 years, 9 months ago (2009-03-20 00:34:25 UTC) #2
LGTM

feel free to commit with/without the nits.

http://codereview.chromium.org/50038/diff/1004/7
File webkit/glue/webview_impl.cc (right):

http://codereview.chromium.org/50038/diff/1004/7#newcode429
Line 429: EditorClientImpl::NodeToHTMLInputElement(focused_node.get())) {
I like the cleanups related to having these functions, but i'm not sure
EditorClientImpl is the best place to put them.

Perhaps declare in |dom_operations.h|?
(looking at dom_operations.cc there is some similarity, for example
GetNodeAsInputElement()).

Not a biggie, but something to think about :-)

http://codereview.chromium.org/50038/diff/1004/7#newcode432
Line 432: result =
page_->mainFrame()->eventHandler()->hitTestResultAtPoint(point,
this is good that you do the hit test before dispatching the mouse event (since
the event listener might move the field).

http://codereview.chromium.org/50038/diff/1004/7#newcode435
Line 435: // Already focused text field was clicked, let's remember this.  If
spelling: i think you want "lets" here.

Powered by Google App Engine
This is Rietveld 408576698