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

Issue 225853005: Add support for setting password value gated on user's gesture in a page (Closed)

Created:
6 years, 8 months ago by vabr (Chromium)
Modified:
6 years, 8 months ago
CC:
blink-reviews, jamesr, arv+blink, abarth-chromium, dglazkov+blink, adamk+blink_chromium.org, watchdog-blink-watchlist_google.com, Inactive
Visibility:
Public.

Description

Add support for setting password value gated on user's gesture in a page A new way to set value is exposed for password input elements: setValueAfterUserGesture -- unlike setValue, which sets the new value immediately, setValueAfterUserGesture delays the effect until the user interacts with the page in any way. This has security motivation, detailed here: https://docs.google.com/document/d/1_Es0qQVrKZSZoXuQBuPmNW8-EAUDsuQGSMIlRFPzs_0/edit?usp=sharing This improves the current status, when a workaround involving setSuggestedValue and checking for a user gesture outside of Blink is used. That workaround does not work for Android, and can be seen as a layering violation in the sense, that checking for user gesture is a Blink internal thing. This is the Blink part, two more CLs are planned as follow-ups: 1) Chromium part: PasswordAutofillAgent using setValueAfterUserGesture instead of setSuggestedValue + clean-up (basically getting rid of content/ changes from https://codereview.chromium.org/163843002) 2) Blink clean-up: making WebInputEvent::isUserGestureEventType Blink-internal This CL was closed without landing, in favour of https://codereview.chromium.org/235983016/. BUG=163072

Patch Set 1 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+114 lines, -0 lines) Patch
A LayoutTests/fast/forms/user-gesture-gated-value.html View 1 chunk +33 lines, -0 lines 0 comments Download
A LayoutTests/fast/forms/user-gesture-gated-value-expected.txt View 1 chunk +14 lines, -0 lines 0 comments Download
M Source/core/html/HTMLInputElement.h View 2 chunks +2 lines, -0 lines 0 comments Download
M Source/core/html/HTMLInputElement.cpp View 4 chunks +16 lines, -0 lines 0 comments Download
M Source/core/html/forms/InputType.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/forms/InputType.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/html/forms/PasswordInputType.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/forms/PasswordInputType.cpp View 1 chunk +6 lines, -0 lines 0 comments Download
M Source/core/page/Page.h View 2 chunks +6 lines, -0 lines 0 comments Download
M Source/core/page/Page.cpp View 2 chunks +2 lines, -0 lines 0 comments Download
M Source/core/testing/Internals.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/testing/Internals.cpp View 1 chunk +15 lines, -0 lines 0 comments Download
M Source/core/testing/Internals.idl View 1 chunk +1 line, -0 lines 0 comments Download
M Source/web/WebInputElement.cpp View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/web/WebViewImpl.cpp View 1 chunk +3 lines, -0 lines 0 comments Download
M public/web/WebInputElement.h View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
vabr (Chromium)
Hi Jochen, It would be great if you could review this, but feel free to ...
6 years, 8 months ago (2014-04-14 14:37:43 UTC) #1
jochen (gone - plz use gerrit)
adding Kent who knows more about input than I do will this work on mobile?
6 years, 8 months ago (2014-04-14 14:40:08 UTC) #2
vabr (Chromium)
On 2014/04/14 14:40:08, jochen wrote: > adding Kent who knows more about input than I ...
6 years, 8 months ago (2014-04-14 14:45:27 UTC) #3
tkent
This behavior is too specific to add to core/. Adding new data member to HTMLInputElement ...
6 years, 8 months ago (2014-04-15 05:01:17 UTC) #4
vabr (Chromium)
6 years, 8 months ago (2014-04-15 17:09:41 UTC) #5
On 2014/04/15 05:01:17, tkent wrote:
> This behavior is too specific to add to core/.  Adding new data member to
> HTMLInputElement just for this feature is not reasonable.
> IMO, the best approach is to notify the first user-gesture to Chromium (via
> WebAutofillClient or WebViewClient?).

Thanks Kent, fair enough. I tried to got the way you suggested in a new CL:
https://codereview.chromium.org/235983016/
If that CL ends up landing, I'll close this one.

Cheers,
Vaclav

Powered by Google App Engine
This is Rietveld 408576698