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

Unified Diff: Source/web/WebViewImpl.cpp

Issue 288423002: WebView: speed up user gesture notification for GestureTap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Check for the presence of the autofill agent + avoid duplicated 1st user gesture reports Created 6 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebViewImpl.cpp
diff --git a/Source/web/WebViewImpl.cpp b/Source/web/WebViewImpl.cpp
index 4ba3f0cac83701f6a1535202b38c4d5ba6022374..2a345e9bf0cb8b35860545a4954f7ab1498fc279 100644
--- a/Source/web/WebViewImpl.cpp
+++ b/Source/web/WebViewImpl.cpp
@@ -1827,6 +1827,17 @@ const WebInputEvent* WebViewImpl::m_currentInputEvent = 0;
bool WebViewImpl::handleInputEvent(const WebInputEvent& inputEvent)
{
UserGestureNotifier notifier(m_autofillClient, &m_userGestureObserved);
+ // On the first input event since page load, |notifier| instructs the
+ // autofill client to unblock values of password input fields of any forms
+ // on the page. There is a single input event, GestureTap, which can both
+ // be the first event after page load, and cause a form submission. In that
+ // case, the form submission happens before the autofill client is told
+ // to unblock the password values, and so the password values are not
+ // submitted. To avoid that, GestureTap is handled explicitly:
+ if (inputEvent.type == WebInputEvent::GestureTap && m_autofillClient) {
+ m_userGestureObserved = true;
+ m_autofillClient->firstUserGestureObserved();
+ }
TRACE_EVENT0("input", "WebViewImpl::handleInputEvent");
// If we've started a drag and drop operation, ignore input events until
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698